Ugly hack to fix burn+Explosion damage Currently, if a burned Pokemon explodes in doubles, all targets except the first will take full damage, because it's fainted (and no longer burned) by the time those damage calculations are done.
Ugly hack to fix burn+Explosion damage
Currently, if a burned Pokemon explodes in doubles, all targets except
the first will take full damage, because it's fainted (and no longer
burned) by the time those damage calculations are done.

The correct solution is to do all damage calculations before dealing
any damage, which I will do someday. Today is not that day.

Today, we move fainting the Explosion user to after damage is dealt.
Which, aside from making the faint order wrong, doesn't really have
any other consequences, and is better than the current buggy
damage calculation.

Git-Worm/City-PS,MasterFloat/Pokemon-Showdown,MayukhKundu/Mudkip-Server,Breakfastqueen/advanced,abulechu/Lumen-Pokemon-Showdown,SkyeTheFemaleSylveon/Pokemon-Showdown,Flareninja/Showdown-Boilerplate,TheDiabolicGift/Lumen-Pokemon-Showdown,megaslowbro1/Pokemon-Showdown,Firestatics/Firestatics46,Kokonoe-san/Glacia-PS,Atwar/http-server-femalehq.rhcloud.com-80.psim.us-,psnsVGC/Wish-Server,Darkshadow6/PokeMoon-Creation,AWailOfATail/awoat,yashagl/pokemon-showdown,sirDonovan/Pokemon-Showdown,Lauc1an/Perulink-Showdown,TheManwithskills/Dusk--Showdown,Ridukuo/Test2,AvinashSwaminathan/lotus-v2,Wando94/Spite,AWailOfATail/Pokemon-Showdown,comedianchameleon/test,Syurra/Pokemon-Showdown,TheDiabolicGift/Showdown-Boilerplate,SilverTactic/Pokemon-Showdown,ShowdownHelper/Saffron,DesoGit/Tsunami_PS,ehk12/coregit,TheManwithskills/serenity,AbsolitoSweep/Absol-server,yashagl/pokecommunity,lAlejandro22/lolipoop,TheFenderStory/Showdown-Boilerplate,kuroscafe/Paradox,comedianchameleon/servertest1,brettjbush/Pokemon-Showdown,superman8900/Pokemon-Showdown,TheManwithskills/serenity,UniversalMan12/Universe-Server,KewlStatics/Alliance,SolarisFox/Pokemon-Showdown,ShowdownHelper/Saffron,Atwar/http-server-femalehq.rhcloud.com-80.psim.us-,hayleysworld/serenityc9,SkyeTheFemaleSylveon/Mudkip-Server,lFernanl/Zero-Pokemon-Showdown,superman8900/Pokemon-Showdown,SkyeTheFemaleSylveon/Pokemon-Showdown,Firestatics/Omega-Alpha,cadaeic/Pokemon-Showdown,Evil-kun/Pokemon-Showdown,gustavo515/gashoro,jd4564/Pokemon-Showdown,SerperiorBae/Bae-Showdown-2,MayukhKundu/Pokemon-Domain,Firestatics/omega,MayukhKundu/Technogear-Final,LightningStormServer/Lightning-Storm,Elveman/RPCShowdownServer,LightningStormServer/Lightning-Storm,svivian/Pokemon-Showdown,ehk12/bigbangtempclone,Evil-kun/Pokemon-Showdown,johtooo/PS,lFernanl/Mudkip-Server,asdfghjklohhnhn/Pokemon-Showdown,comedianchameleon/test,DarkSuicune/Kakuja-2.0,azum4roll/Pokemon-Showdown,ZeroParadox/ugh,zczd/enculer,RustServer/Pokemon-Showdown,aakashrajput/Pokemon-Showdown,Atwar/server-epilogueleague.rhcloud.com,Enigami/Pokemon-Showdown,Celecitia/Plux-Pokemon-Showdown,BuzzyOG/Pokemon-Showdown,panpawn/Pokemon-Showdown,ankailou/Pokemon-Showdown,Kokonoe-san/Glacia-PS,k3naan/Pokemon-Showdown,MayukhKundu/Technogear,BadSteel/Pokemon-Showdown,Lord-Haji/SpacialGaze,aakashrajput/Pokemon-Showdown,hayleysworld/serenityserver,yashagl/pokecommunity,Extradeath/advanced,ehk12/clone,sama2/Viridian-Pokemon-Showdown,MeliodasBH/boarhat,Tesarand/Pokemon-Showdown,CreaturePhil/Pokemon-Showdown,SerperiorBae/Bae-Showdown,BadSteel/Omega-Pokemon-Showdown,yashagl/pokemon,CreaturePhil/Pokemon-Showdown,PrimalGallade45/Dropp-Pokemon-Showdown,TheManwithskills/Server-2,Sora-League/Sora,Zarel/Pokemon-Showdown,PauLucario/LQP-Server-Showdown,Atwar/ServerClassroom,SerperiorBae/BaeShowdown,Tesarand/Pokemon-Showdown,HoeenCoder/SpacialGaze,HoeenKid/Pokemon-Showdown-Johto,Irraquated/Pokemon-Showdown,yashagl/pokemon-showdown,jumbowhales/Pokemon-Showdown,ShowdownHelper/Saffron,DalleTest/Pokemon-Showdown,DesoGit/Tsunami_PS,Vacate/Pokemon-Showdown,KewlStatics/Showdown-Template,UniversalMan12/Universe-Server,lFernanl/Lumen-Pokemon-Showdown,zczd/enculer,Guernouille/Pokemon-Showdown,TheManwithskills/Server---Thermal,AvinashSwaminathan/lotus,panpawn/Pokemon-Showdown,yashagl/pokemon,SerperiorBae/Bae-Showdown-2,SerperiorBae/Bae-Showdown,kupochu/Pokemon-Showdown,QuiteQuiet/Pokemon-Showdown,CorruptedHelix/Pokemon-Showdown,iFaZe/SilverZ,Flareninja/Lumen-Pokemon-Showdown,ehk12/coregit,Firestatics/Omega-Alpha,sirDonovan/Pokemon-Showdown,Stroke123/POKEMON,panpawn/Gold-Server,Enigami/Pokemon-Showdown,Johto-Serverr/Werfin-Boilerplate,Flareninja/Pokemon-Showdown,megaslowbro1/Pokemon-Showdown-Server-for-megaslowbro1,AWailOfATail/Pokemon-Showdown,megaslowbro1/Showdown-Server-again,Lauc1an/Perulink-Showdown,Atwar/ServerClassroom,SSJGVegito007/Vegito-s-Server,Lord-Haji/SpacialGaze,KaitoV4X/Showdown,Parukia/Pokemon-Showdown,Enigami/Pokemon-Showdown,DarkSuicune/Kakuja-2.0,DesoGit/TsunamiPS,gustavo515/batata,Pikachuun/Joimmon-Showdown,Chespin14/Custom-Platform-Pokemon-Showdown,arkanox/MistShowdown,TheManwithskills/COC,HoeenCoder/SpacialGaze,Arcticblast/Pokemon-Showdown,AbsolitoSweep/Absol-server,sama2/Universe-Pokemon-Showdown,Kill-The-Noise/BlakJack-Boilerplate,ankailou/Pokemon-Showdown,DB898/theregalias,abrulochp/Lumen-Pokemon-Showdown,javi501/Lumen-Pokemon-Showdown,Pikachuun/Pokemon-Showdown-SMCMDM,FakeSloth/wulu,Extradeath/psserver,jumbowhales/Pokemon-Showdown,hayleysworld/Showdown-Boilerplate,abrulochp/Dropp-Pokemon-Showdown,Kevinxzllz/PS-Openshift-Server,BuzzyOG/Pokemon-Showdown,BuzzyOG/Pokemon-Showdown,SerperiorBae/Pokemon-Showdown,zek7rom/SpacialGaze,Pikachuun/Pokemon-Showdown,sama2/Viridian-Pokemon-Showdown,kotarou3/Krister-Pokemon-Showdown,DesoGit/Tsunami_PS,LegendBorned/PS-Boilerplate,DB898/theregalias,javi501/Lumen-Pokemon-Showdown,ehk12/bigbangtempclone,LustyAsh/EOS-Master,Werfin96/Ultimate,Thiediev/Pokemon-Showdown,Raina4uberz/Light-server,MeliodasBH/Articuno-Land,xfix/Pokemon-Showdown,BasedGod7/PH,Darkshadow6/PokeMoon-Creation,kuroscafe/Showdown-Boilerplate,Pikachuun/Joimmon-Showdown,Lord-Haji/SpacialGaze,jd4564/Pokemon-Showdown,Adithya4Uberz/The-Tsunami-League,sama2/Lumen-Pokemon-Showdown,iFaZe/SliverX,urkerab/Pokemon-Showdown,Alpha-Devs/OmegaRuby-Server,Enigami/Pokemon-Showdown,kotarou3/Krister-Pokemon-Showdown,lAlejandro22/lolipoop,abulechu/Dropp-Pokemon-Showdown,SerperiorBae/BaeShowdown,xfix/Pokemon-Showdown,xCrystal/Pokemon-Showdown,Kill-The-Noise/BlakJack-Boilerplate,piiiikachuuu/Pokemon-Showdown,DarkSuicune/Pokemon-Showdown,k3naan/Pokemon-Showdown,yashagl/yash-showdown,CreaturePhil/Showdown-Boilerplate,hayleysworld/asdfasdf,MeliodasBH/boarhat,hayleysworld/harmonia,PrimalGallade45/Dropp-Pokemon-Showdown,Irraquated/Pokemon-Showdown,PrimalGallade45/Lumen-Pokemon-Showdown,abulechu/Dropp-Pokemon-Showdown,Pikachuun/Pokemon-Showdown,SerperiorBae/Pokemon-Showdown,comedianchameleon/test,Checkinator/Pokemon-Showdown,Parukia/Pokemon-Showdown,FakeSloth/Infinite,CreaturePhil/Showdown-Boilerplate,Adithya4Uberz/The-Tsunami-League,Irraquated/Pokemon-Showdown,MayukhKundu/Mudkip-Server,TogeSR/Lumen-Pokemon-Showdown,Hopenub/Pokemon-Showdown,TheFenderStory/Showdown-Boilerplate,sama2/Universe-Pokemon-Showdown,PS-Spectral/Spectral,RustServer/Pokemon-Showdown,VoltStorm/Server-pokemon-showdown,TheManwithskills/COC,SubZeroo99/Pokemon-Showdown,miahjennatills/Pokemon-Showdown,Yggdrasil-League/Yggdrasil,Ransei1/Alt,BlazingAura/Showdown-Boilerplate,gustavo515/test,MasterFloat/LQP-Server-Showdown,lFernanl/Pokemon-Showdown,Darkshadow6/git-remote-add-scalingo-git-scalingo.com-pokemoonforums,TheManwithskills/Creature-phil-boiler,KewlStatics/Shit,MasterFloat/LQP-Server-Showdown,svivian/Pokemon-Showdown,Breakfastqueen/advanced,xfix/Pokemon-Showdown,urkerab/Pokemon-Showdown,Wando94/Pokemon-Showdown,Pikachuun/Touhoumon-Showdown,abrulochp/Dropp-Pokemon-Showdown,SilverTactic/Dragotica-Pokemon-Showdown,TheDiabolicGift/Showdown-Boilerplate,Alpha-Devs/Alpha-Server,Articuno-I/Pokemon-Showdown,Alpha-Devs/OmegaRuby-Server,Nineage/Showdown-Boilerplate,lFernanl/Lumen-Pokemon-Showdown,Syurra/Pokemon-Showdown,Mystifi/Exiled,Pokemon-Devs/Pokemon-Showdown,gustavo515/batata,Fusxfaranto/Pokemon-Showdown,TheManwithskills/DS,hayleysworld/Pokemon-Showdown,Stroke123/POKEMON,SubZeroo99/Pokemon-Showdown,Extradeath/advanced,EienSeiryuu/Pokemon-Showdown,danpantry/Pokemon-Showdown,Pablo000/aaa,AnaRitaTorres/Pokemon-Showdown,kubetz/Pokemon-Showdown,miahjennatills/Pokemon-Showdown,theodelhay/test,gustavo515/test,TbirdClanWish/Pokemon-Showdown,NoahVSGamingYT/Pokemon-Showdown,Ransei1/Alt,sama2/Dropp-Pokemon-Showdown,Firestatics/omega,PauLucario/LQP-Server-Showdown,Wando94/Spite,MayukhKundu/Technogear-Final,Wando94/Pokemon-Showdown,JellalTheMage/PS-,Mystifi/Exiled,hayleysworld/serenity,Hidden-Mia/Roleplay-PS,InvalidDN/Pokemon-Showdown,TheFenderStory/Pokemon-Showdown,FakeSloth/Infinite,PS-Spectral/Spectral,forbiddennightmare/Pokemon-Showdown-1,SolarisFox/Pokemon-Showdown,yashagl/yash-showdown,Ridukuo/Test,Flareninja/Showdown-Boilerplate,JellalTheMage/Jellals-Server,Articuno-I/Pokemon-Showdown,NoahVSGamingYT/Pokemon-Showdown,theodelhay/test,TheManwithskills/Server-2,sirDonovan/Pokemon-Showdown,KewlStatics/Shit,abulechu/Lumen-Pokemon-Showdown,HoeenCoder/SpacialGaze,KewlStatics/Pokeindia-Codes,xfix/Pokemon-Showdown,Sora-League/Sora,Atwar/server-epilogueleague.rhcloud.com,Flareninja/Sora,MayukhKundu/Pokemon-Domain,abrulochp/Lumen-Pokemon-Showdown,Tesarand/Pokemon-Showdown,UniversalMan12/Universe-Server,DarkSuicune/Pokemon-Showdown,Legit99/Lightning-Storm-Server,lFernanl/Zero-Pokemon-Showdown,Psyientist/Showdown-Boilerplate,bai2/Dropp,SilverTactic/Pokemon-Showdown,Nineage/Origin,Ecuacion/Lumen-Pokemon-Showdown,Raina4uberz/Light-server,BlakJack/Kill-The-Noise,KewlStatics/Showdown-Template,MayukhKundu/Technogear,Pokemon-Devs/Pokemon-Showdown,lFernanl/Mudkip-Server,EienSeiryuu/Pokemon-Showdown,TheManwithskills/DS,arkanox/MistShowdown,Sora-Server/Sora,LustyAsh/EOS-Master,megaslowbro1/Showdown-Server-again,Sora-Server/Sora,TheManwithskills/Dusk--Showdown,TheManwithskills/Server---Thermal,xCrystal/Pokemon-Showdown,MayukhKundu/Flame-Savior,scotchkorean27/Pokemon-Showdown,hayleysworld/serenityc9,forbiddennightmare/Pokemon-Showdown-1,Bryan-0/Pokemon-Showdown,AWailOfATail/awoat,TogeSR/Lumen-Pokemon-Showdown,catanatron/pokemon-rebalance,Luobata/Pokemon-Showdown,Flareninja/Pokemon-Showdown-1,TheFenderStory/Pokemon-Showdown,gustavo515/final,Darkshadow6/PokeMoon-Creation,JellalTheMage/Jellals-Server,megaslowbro1/Pokemon-Showdown,Irraquated/Showdown-Boilerplate,Ecuacion/Pokemon-Showdown,EmmaKitty/Pokemon-Showdown,Elveman/RPCShowdownServer,Hidden-Mia/Roleplay-PS,SkyeTheFemaleSylveon/Mudkip-Server,PrimalGallade45/Lumen-Pokemon-Showdown,Flareninja/Sora,Irraquated/EOS-Master,ScottehMax/Pokemon-Showdown,Flareninja/Lumen-Pokemon-Showdown,ZestOfLife/FestiveLife,Checkinator/Pokemon-Showdown,Ecuacion/Lumen-Pokemon-Showdown,CorruptedHelix/Pokemon-Showdown,MeliodasBH/Articuno-Land,kupochu/Pokemon-Showdown,piiiikachuuu/Pokemon-Showdown,Zarel/Pokemon-Showdown,svivian/Pokemon-Showdown,KewlStatics/Alliance,Neosweiss/Pokemon-Showdown,Volcos/SpacialGaze,KewlStatics/Pokeindia-Codes,Irraquated/Showdown-Boilerplate,Extradeath/psserver,hayleysworld/harmonia,Kevinxzllz/PS-Openshift-Server,gustavo515/gashoro,SerperiorBae/Pokemon-Showdown-1,Git-Worm/City-PS,Oiawesome/DPPtServ2,Zipzapadam/Server,Gold-Solox/Pokemon-Showdown,AustinXII/Pokemon-Showdown,AWailOfATail/Pokemon-Showdown,SilverTactic/Showdown-Boilerplate,Irraquated/EOS-Master,anubhabsen/Pokemon-Showdown,Volcos/SpacialGaze,SerperiorBae/Pokemon-Showdown,TheManwithskills/New-boiler-test,Psyientist/Showdown-Boilerplate,scotchkorean27/Pokemon-Showdown,LegendBorned/PS-Boilerplate,Legendaryhades/Oblivion,Flareninja/Pokemon-Showdown,xCrystal/Pokemon-Showdown,ehk12/clone,InvalidDN/Pokemon-Showdown,SerperiorBae/Bae-Showdown-2,Vacate/Pokemon-Showdown,TheManwithskills/Server,EmmaKitty/Pokemon-Showdown,Sora-Server/Sora,ZeroParadox/BlastBurners,Ridukuo/Test,CreaturePhil/Showdown-Boilerplate,PS-Spectral/Spectral,Sora-League/Sora,Adithya4Uberz/KTN,MasterFloat/Pokemon-Showdown,ZestOfLife/PSserver,brettjbush/Pokemon-Showdown,kuroscafe/Paradox,Parukia/Pokemon-Showdown,hayleysworld/serenityserver,Flareninja/Hispano-Pokemon-Showdown,azum4roll/Pokemon-Showdown,TheDiabolicGift/Lumen-Pokemon-Showdown,Alpha-Devs/Alpha-Server,SilverTactic/Showdown-Boilerplate,panpawn/Gold-Server,Breakfastqueen/advanced,aakashrajput/Pokemon-Showdown,Legit99/Lightning-Storm-Server,Disaster-Area/Pokemon-Showdown,psnsVGC/Wish-Server,hayleysworld/Showdown-Boilerplate,Zipzapadam/Server,LightningStormServer/Lightning-Storm,CharizardtheFireMage/Showdown-Boilerplate,svivian/Pokemon-Showdown,QuiteQuiet/Pokemon-Showdown,Kenny-/Pokemon-Showdown,urkerab/Pokemon-Showdown,JennyPRO/Jenny,ZestOfLife/PSserver,Disaster-Area/Pokemon-Showdown,danpantry/Pokemon-Showdown,Bryan-0/Pokemon-Showdown,Firestatics/Firestatics46,ScottehMax/Pokemon-Showdown,AvinashSwaminathan/Pokelegends,HoeenCoder/SpacialGaze,TbirdClanWish/Pokemon-Showdown,JellalTheMage/PS-,ZestOfLife/FestiveLife,Zarel/Pokemon-Showdown,Ridukuo/Test2,Yggdrasil-League/Yggdrasil,AnaRitaTorres/Pokemon-Showdown,hayleysworld/serenity,ZeroParadox/ugh,DesoGit/TsunamiPS,hayleysworld/asdfasdf,Nineage/Origin,KaitoV4X/Showdown,sama2/Dropp-Pokemon-Showdown,Flareninja/Sora,svivian/Pokemon-Showdown,SerperiorBae/PokemonShowdown2,AvinashSwaminathan/lotus-v3,Flareninja/Hispano-Pokemon-Showdown,Oiawesome/DPPtServ2,CharizardtheFireMage/Showdown-Boilerplate,SerperiorBae/PokemonShowdown2,asdfghjklohhnhn/Pokemon-Showdown,AustinXII/Pokemon-Showdown,bai2/Dropp,Pikachuun/Pokemon-Showdown-SMCMDM,SerperiorBae/Pokemon-Showdown-1,TheManwithskills/Server-2,xfix/Pokemon-Showdown,sama2/Lumen-Pokemon-Showdown,Darkshadow6/git-remote-add-scalingo-git-scalingo.com-pokemoonforums,TheManwithskills/New-boiler-test,lFernanl/Pokemon-Showdown,SerperiorBae/BaeShowdown,Guernouille/Pokemon-Showdown,comedianchameleon/servertest1,BlazingAura/Showdown-Boilerplate,anubhabsen/Pokemon-Showdown,JennyPRO/Jenny,panpawn/Gold-Server,Kill-The-Noise/BlakJack-Boilerplate,Celecitia/Plux-Pokemon-Showdown,cadaeic/Pokemon-Showdown,Darkshadow6/git-remote-add-scalingo-git-scalingo.com-pokemoonforums,SilverTactic/Dragotica-Pokemon-Showdown,QuiteQuiet/Pokemon-Showdown,Flareninja/Pokemon-Showdown-1,Gold-Solox/Pokemon-Showdown,Pablo000/aaa,megaslowbro1/Pokemon-Showdown-Server-for-megaslowbro1,zek7rom/SpacialGaze,kuroscafe/Showdown-Boilerplate,AustinXII/Pokemon-Showdown,hayleysworld/Pokemon-Showdown,DalleTest/Pokemon-Showdown,TheManwithskills/Creature-phil-boiler,johtooo/PS,Ecuacion/Pokemon-Showdown,Mystifi/Exiled,ZeroParadox/BlastBurners,MayukhKundu/Flame-Savior,jumbowhales/Pokemon-Showdown,TheManwithskills/Server,gustavo515/final,Neosweiss/Pokemon-Showdown,SSJGVegito007/Vegito-s-Server,SerperiorBae/Bae-Showdown,catanatron/pokemon-rebalance,CrestfallPS/Pokemon-Showdown,SerperiorBae/Pokemon-Showdown-1,kubetz/Pokemon-Showdown