if one of two battlers mega evolves their pokemon as another pokemon is swapped in, then the pokemon that is swapped in is killed no matter what the damage would do.
Ex: Lopunny Mega evolves and uses fake out as Landorus swaps in. Landorus hits 0 HP and dies.
Battle Log: (sorry I can not seem to figure out if I can upload a file or not so here's the text from it :))
Pixelmon Version 9.1.5
Battle data 2023-06-15T01:39:00.208Z
Team #0 Player MorganReborn minecraft:overworld (-104.97708564034218, 78.0, -2.794571761069043)
Gholdengo {MoveSkillCooldown:[{MoveSkillCooldownCurrent:1686793136112L,MoveSkillCooldownTarget:1684362472944L,MoveSkillCooldownId:"rock_smash"}],EVSpeed:0s,StatsDefense:260s,IVAttack:31b,Growth:3b,Moveset:[{MoveID:"Astonish",MovePP:15b},{MoveID:"Tackle",MovePP:35b},{MoveID:"Night Shade",MovePP:15b},{MoveID:"Substitute",MovePP:10b}],PersistentData:{},Gender:2b,ribbon_display2:{receiver:'{"text":""}',received:1683435980027L,type:"destiny"},originalTrainerUUID:[I;433143915,733497145,-1357526514,-1082588689],GigantamaxFactor:0b,Friendship:48s,eggCycles:-1,EVAttack:0s,StatsSpecialAttack:302s,IVSpDef:31b,CaughtBall:"poke_ball",IVHP:31b,EVHP:252s,ndex:1000,palette:"none",UUID:[I;-1673938718,1783578876,-1922087812,1794288664],StatsSpecialDefense:218s,Nature:5b,Ability:"GoodAsGold",StatsHP:378s,IVDefense:31b,Health:0,originalTrainer:"MorganReborn",SpecFlags:[],DoesLevel:1b,EVDefense:252s,DynamaxLevel:0,Variant:"",StatsSpeed:204s,EVSpecialAttack:0s,StatsAttack:171s,IVSpeed:31b,Level:100,IVSpAtt:31b,NBT_VERSION:2b,EVSpecialDefense:0s,EXP:0,RelrnMoves:[],ribbons2:[{receiver:'{"text":""}',received:1683435980027L,type:"destiny"}]}
Electrike {EVSpeed:0s,StatsDefense:14s,IVAttack:13b,Growth:3b,Moveset:[{MoveID:"Thunder Wave",MovePP:20b},{MoveID:"Howl",MovePP:40b},{MoveID:"Quick Attack",MovePP:30b},{MoveID:"Bite",MovePP:25b}],PersistentData:{},Gender:0b,originalTrainerUUID:[I;433143915,733497145,-1357526514,-1082588689],GigantamaxFactor:0b,Friendship:70s,eggCycles:-1,EVAttack:0s,StatsSpecialAttack:19s,IVSpDef:17b,CaughtBall:"master_ball",IVHP:15b,EVHP:0s,ndex:309,palette:"shiny",UUID:[I;-501815139,-458210921,-1937893666,-1054448865],StatsSpecialDefense:12s,Nature:12b,Ability:"LightningRod",StatsHP:29s,IVDefense:5b,Health:29,originalTrainer:"MorganReborn",SpecFlags:[],DoesLevel:1b,EVDefense:0s,DynamaxLevel:0,Variant:"",StatsSpeed:18s,EVSpecialAttack:0s,StatsAttack:15s,IVSpeed:5b,Level:10,IVSpAtt:11b,NBT_VERSION:2b,EVSpecialDefense:0s,EXP:0,RelrnMoves:[],ribbons2:[]}
Thundurus {EVSpeed:0s,StatsDefense:117s,IVAttack:6b,Growth:5b,Moveset:[{MoveID:"Thunder Shock",MovePP:30b},{MoveID:"Agility",MovePP:30b},{MoveID:"Volt Switch",MovePP:20b},{MoveID:"Uproar",MovePP:10b}],PersistentData:{},Gender:0b,originalTrainerUUID:[I;433143915,733497145,-1357526514,-1082588689],GigantamaxFactor:0b,Friendship:90s,eggCycles:-1,EVAttack:1s,StatsSpecialAttack:180s,IVSpDef:31b,CaughtBall:"master_ball",IVHP:21b,EVHP:0s,ndex:642,palette:"none",UUID:[I;-343706394,1274691813,-1335444954,961674939],StatsSpecialDefense:151s,Nature:24b,Ability:"Prankster",StatsHP:205s,IVDefense:21b,Health:205,originalTrainer:"MorganReborn",SpecFlags:[],DoesLevel:1b,EVDefense:0s,DynamaxLevel:0,Variant:"incarnate",StatsSpeed:182s,EVSpecialAttack:0s,StatsAttack:170s,IVSpeed:31b,Level:70,IVSpAtt:31b,NBT_VERSION:2b,EVSpecialDefense:0s,EXP:216,RelrnMoves:[],ribbons2:[]}
Espeon {EVSpeed:0s,StatsDefense:60s,IVAttack:0b,Growth:2b,Moveset:[{MoveID:"Copycat",MovePP:20b},{MoveID:"Growl",MovePP:40b},{MoveID:"Helping Hand",MovePP:20b},{MoveID:"Psybeam",MovePP:20b}],PersistentData:{},Gender:0b,originalTrainerUUID:[I;433143915,733497145,-1357526514,-1082588689],GigantamaxFactor:0b,Friendship:72s,eggCycles:-1,EVAttack:0s,StatsSpecialAttack:117s,IVSpDef:27b,CaughtBall:"poke_ball",IVHP:1b,EVHP:0s,ndex:196,palette:"none",UUID:[I;-651240511,-157397770,-1686751910,-742617648],StatsSpecialDefense:81s,Nature:8b,Ability:"Synchronize",StatsHP:102s,IVDefense:18b,Health:102,originalTrainer:"MorganReborn",SpecFlags:[],DoesLevel:1b,EVDefense:0s,DynamaxLevel:0,Variant:"",StatsSpeed:96s,EVSpecialAttack:0s,StatsAttack:62s,IVSpeed:8b,Level:40,IVSpAtt:22b,NBT_VERSION:2b,EVSpecialDefense:0s,EXP:0,RelrnMoves:[],ribbons2:[]}
Drilbur {EVSpeed:0s,StatsDefense:35s,IVAttack:7b,Growth:1b,Moveset:[{MoveID:"Mud-Slap",MovePP:10b},{MoveID:"Rapid Spin",MovePP:40b},{MoveID:"Fury Swipes",MovePP:15b},{MoveID:"Metal Claw",MovePP:35b}],PersistentData:{},Gender:1b,originalTrainerUUID:[I;433143915,733497145,-1357526514,-1082588689],GigantamaxFactor:0b,Friendship:70s,eggCycles:-1,EVAttack:0s,StatsSpecialAttack:31s,IVSpDef:3b,CaughtBall:"master_ball",IVHP:31b,EVHP:0s,ndex:529,palette:"shiny",UUID:[I;-2124783306,-1897970016,-2109583749,672673260],StatsSpecialDefense:32s,Nature:0b,Ability:"SandRush",StatsHP:85s,IVDefense:21b,Health:85,originalTrainer:"MorganReborn",SpecFlags:[],DoesLevel:1b,EVDefense:0s,DynamaxLevel:0,Variant:"",StatsSpeed:52s,EVSpecialAttack:0s,StatsAttack:58s,IVSpeed:21b,Level:30,IVSpAtt:28b,NBT_VERSION:2b,EVSpecialDefense:0s,EXP:0,RelrnMoves:[],ribbons2:[]}
Latios {EVSpeed:0s,StatsDefense:138s,IVAttack:24b,Growth:3b,Moveset:[{MoveID:"Dragon Dance",MovePP:20b},{MoveID:"Zen Headbutt",MovePP:15b},{MoveID:"Simple Beam",MovePP:15b},{MoveID:"Memento",MovePP:10b}],PersistentData:{},Gender:0b,originalTrainerUUID:[I;433143915,733497145,-1357526514,-1082588689],GigantamaxFactor:0b,Friendship:90s,eggCycles:-1,EVAttack:0s,StatsSpecialAttack:192s,IVSpDef:31b,CaughtBall:"master_ball",IVHP:20b,EVHP:0s,ndex:381,palette:"none",UUID:[I;-633439195,740772590,-1841276986,1125728325],StatsSpecialDefense:162s,Nature:8b,Ability:"Levitate",StatsHP:206s,IVDefense:31b,Health:206,originalTrainer:"MorganReborn",SpecFlags:[],DoesLevel:1b,EVDefense:0s,DynamaxLevel:0,Variant:"",StatsSpeed:180s,EVSpecialAttack:0s,StatsAttack:161s,IVSpeed:31b,Level:70,IVSpAtt:8b,NBT_VERSION:2b,EVSpecialDefense:0s,EXP:0,RelrnMoves:[],ribbons2:[]}
URL: https://pokepast.es//bbcb9961ff079174
Team #1 Trainer Steve minecraft:overworld (-104.51268646484769, 78.0, 0.22493319995965289)
Lopunny {EVSpeed:252s,StatsDefense:204s,IVAttack:31b,Growth:3b,Moveset:[{MoveID:"U-turn",MovePP:20b},{MoveID:"Fake Out",MovePP:10b},{MoveID:"Close Combat",MovePP:5b},{MoveID:"Frustration",MovePP:20b}],PersistentData:{},Gender:0b,GigantamaxFactor:0b,Friendship:255s,eggCycles:-1,EVAttack:252s,StatsSpecialAttack:129s,IVSpDef:31b,CaughtBall:"poke_ball",IVHP:31b,EVHP:0s,ndex:428,palette:"none",UUID:[I;-90683514,872431692,-1817573278,323402887],StatsSpecialDefense:229s,Nature:15b,Ability:"Klutz",StatsHP:271s,IVDefense:31b,Health:271,HeldItemStack:{id:"pixelmon:lopunnite",Count:1b},SpecFlags:[],DoesLevel:1b,EVDefense:0s,DynamaxLevel:0,Variant:"",StatsSpeed:339s,EVSpecialAttack:0s,StatsAttack:251s,IVSpeed:31b,Level:100,IVSpAtt:31b,NBT_VERSION:2b,EVSpecialDefense:4s,EXP:0,RelrnMoves:[],ribbons2:[]}
URL: https://pokepast.es//6df62f1db5dc98c8
Turn #0 has begun
Terrain: NONE[5 turns remaining]
Weather: none
Pokemon:
Thundurus[health=205, , max health=205, , escape attempts=0, damage taken this turn=0, priority=0.0, can attack=true, will try flee=false, switching=false, evolve=false, status=, held item=air, moveset=Moveset{pokemon=Pokemon{Thundurus}, attacks=[Thunder Shock[pp 30, ppLevel 0, movePower 40, moveAccuracy 0, cantMiss false, disabled false, savedAttack null, savedPower 0, savedAccuracy 0, overridePPMax null, overrideAttackCategory null, overrideType null, isZ false, isMax false, originalMove null], Agility[pp 30, ppLevel 0, movePower 0, moveAccuracy 0, cantMiss false, disabled false, savedAttack null, savedPower 0, savedAccuracy 0, overridePPMax null, overrideAttackCategory null, overrideType null, isZ false, isMax false, originalMove null], Volt Switch[pp 20, ppLevel 0, movePower 70, moveAccuracy 0, cantMiss false, disabled false, savedAttack null, savedPower 0, savedAccuracy 0, overridePPMax null, overrideAttackCategory null, overrideType null, isZ false, isMax false, originalMove null], Uproar[pp 10, ppLevel 0, movePower 90, moveAccuracy 0, cantMiss false, disabled false, savedAttack null, savedPower 0, savedAccuracy 0, overridePPMax null, overrideAttackCategory null, overrideType null, isZ false, isMax false, originalMove null]], ability=com.pixelmonmod.pixelmon.api.pokemon.ability.abilities.Prankster@64b40d4a, reminderMoves=[]}]
Stats: ACCURACY=100, EVASION=100, ATTACK=0, DEFENSE=0, SPECIAL_ATTACK=0, SPECIAL_DEFENSE=0, SPEED=0
Thundurus stats changed from [ACCURACY=100, EVASION=100, ATTACK=0, DEFENSE=0, SPECIAL_ATTACK=0, SPECIAL_DEFENSE=0, SPEED=0] to [ACCURACY=100, EVASION=100, ATTACK=170, DEFENSE=117, SPECIAL_ATTACK=180, SPECIAL_DEFENSE=151, SPEED=182] delta: ATTACK=-170, DEFENSE=-117, SPECIAL_ATTACK=-180, SPECIAL_DEFENSE=-151, SPEED=-182
Lopunny stats changed from [ACCURACY=100, EVASION=100, ATTACK=0, DEFENSE=0, SPECIAL_ATTACK=0, SPECIAL_DEFENSE=0, SPEED=0] to [ACCURACY=100, EVASION=100, ATTACK=251, DEFENSE=204, SPECIAL_ATTACK=129, SPECIAL_DEFENSE=229, SPEED=339] delta: ATTACK=-251, DEFENSE=-204, SPECIAL_ATTACK=-129, SPECIAL_DEFENSE=-229, SPEED=-339
Steve selected attack Fake Out for Lopunny targeting Thundurus and opted to mega evolve
MorganReborn switching from Thundurus to Gholdengo
Battle Message: Lopunny's Lopunnite is reacting to Steve's Key Stone!
Lopunny stats changed from [ACCURACY=100, EVASION=100, ATTACK=251, DEFENSE=204, SPECIAL_ATTACK=129, SPECIAL_DEFENSE=229, SPEED=339] to [ACCURACY=100, EVASION=100, ATTACK=371, DEFENSE=224, SPECIAL_ATTACK=129, SPECIAL_DEFENSE=229, SPEED=405] delta: ATTACK=-120, DEFENSE=-20, SPEED=-66
Lopunny changed abilities from Scrappy to Scrappy
Lopunny has mega evolved into mega
Battle Message: Lopunny used Fake Out!
Battle Message: It wasn't very effective...
Gholdengo was damaged by Lopunny type ATTACK for 378 before: 378 after: 0
Battle Message: Gholdengo fainted!
Steve told Lopunny to use Fake Out against Gholdengo with results MoveResults{damage=378, fullDamage=8415, accuracy=0, priority=3.0, result=killed, weightMod=0.0}
BATTLE ENDED
Lopunny stats changed from [ACCURACY=100, EVASION=100, ATTACK=371, DEFENSE=224, SPECIAL_ATTACK=129, SPECIAL_DEFENSE=229, SPEED=405] to [ACCURACY=100, EVASION=100, ATTACK=251, DEFENSE=204, SPECIAL_ATTACK=129, SPECIAL_DEFENSE=229, SPEED=339] delta: ATTACK=120, DEFENSE=20, SPEED=66