Overhaul the stat system and implement chaining
Overhaul the stat system and implement chaining

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