CoolTrainer♀ 10-20% HP switch chance coding flaw (Generation I)  @ChickasaurusGL
CoolTrainer♀ 10-20% HP switch chance coding flaw (Generation I)  @ChickasaurusGL
Evie (ChickasaurusGL) 🌺 | CoolTrainer♀ 10-20% HP switch chance coding flaw (Generation I) @ChickasaurusGL | Uploaded November 2021 | Updated October 2024, 13 hours ago.
Notes: This demonstration would be incomplete without a description, so recommend reading it. It was documented by invalio19 in January, and added as a comment in the disassembly project file github.com/pret/pokered/blob/master/engine/battle/trainer_ai.asm earlier today by Rangi42.
github.com/pret/pokered/issues/308


When a CoolTrainer♀ (specifically) has between 10-20% HP the (relative) chance of her switching is 100% rather than 25% because of faulty code (however, low HP does not guarantee it will happen because she can also use a Hyper Potion, I don't know sorry but perhaps that happens at 1/10 health so 10% and less). Adding a ret no carry flag will fix this.


CooltrainerFAI:
; The intended 25% chance to consider switching will not apply.
; Uncomment the line below to fix this.
cp 25 percent + 1
; ret nc
ld a, 10
call AICheckIfHPBelowFraction
jp c, AIUseHyperPotion
ld a, 5
call AICheckIfHPBelowFraction
ret nc
jp AISwitchIfEnoughMons
CoolTrainer♀ 10-20% HP switch chance coding flaw (Generation I)Arbitrary sprites sequence concept but my code is glitchy (Pokémon Yellow)Making Kirby a Pokémon with arbitrary code execution (back sprite and menu sprite) (Pokémon Yellow)Hall of Fame party menu pseudo-OAM buffer (CC5B) art creation exploit (Pokémon Yellow)255 Pokémon Trainer battle corruption introduction (Generation II)The Poké Seer only reports caught origin levels modulo 64 (Pokémon Crystal)(Another) Pokémon Red link battle experiment with glitch Pokémon (VS. RNG controlled player)Unused jingles 0x2D (045) and 0x92 (146) (Replacing caught jingle) (Generation II)Surf on an artificial water tile originating from glitch item text (Pokémon Red and Blue)Cloning over/deleting a corrupted box contents w/arbitrary code execution (Gold/Silver EN request)Special text box IDs during Trainer-Fly that work independent of maps (Generation I)Small channel design update owo 🌺

CoolTrainer♀ 10-20% HP switch chance coding flaw (Generation I) @ChickasaurusGL

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER