Fix crash when partialtrapping a Substitute
Fix crash when partialtrapping a Substitute

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