Properly implement Crush Grip and Wring Out
Properly implement Crush Grip and Wring Out

Use fixed-point decimals and proper rounding to calculate the base power.

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