-
Notifications
You must be signed in to change notification settings - Fork 22
The "BUGFIX" compiler constant
Kermalis edited this page May 15, 2021
·
5 revisions
The BUGFIX
constant being defined will fix bugs from the official games, whereas the original bugs from generation 5 will be present in PokemonBattleEngine when it's undefined.
The bugs/glitches it will fix are:
- Description: When a Pokémon hurts itself in confusion, items such as Berry Juice, Figy Berry, and Liechi Berry do not activate.
- Explanation: There is a missing call to the function that checks for items that activate on low HP.
-
Status:
BUGFIX
adds the missing call to the function.
- Description: If a Pokémon with Contrary has maximized Attack, Belly Drum will still fail even though the Attack would be lowered, and if the Pokémon's Attack is already minimized, it will still deduct HP without lowering the Attack.
- Explanation: Belly Drum specifically checks if the target has maximized Attack instead of checking if the Attack would be changed.
-
Status:
BUGFIX
adds checks which see if the Attack would be changed and then fails if it wouldn't change, accounting for Contrary as well.
- Description: The chance of Secret Power's secondary effects is not doubled by Serene Grace.
- Explanation: They forgot to use the correct random function when creating the generation 5+ engine. It was fixed in generation 6.
-
Status:
BUGFIX
uses the correct function.
- Description: The Power Trick status is not cleared from a Pokémon that changes form or levels up, even though it is cleared when a Pokémon transforms.
- Explanation: They probably never stumbled upon this situation until Aegislash came out.
-
Status:
BUGFIX
will clear the Power Trick status after form changing or leveling up.
- Description: Heal Bell can affect targets with Soundproof.
- Explanation: Seems to be an oversight when porting the moves to the generation5+ engine. It was fixed in generation 6.
- Status: This oversight is present in PBE, but is not fixed at this time.
- Description: If a Pokémon is holding a Choice Item (Choice Band/Choice Scarf/Choice Specs) and then uses Metronome and calls a move it has in its moveset, the Pokémon will be locked into using that called move. Similarly, if the Pokémon uses Transform on a target that also has Transform, the Pokémon will be locked into using Transform after transforming.
- Explanation: This happens because a Choice Item only locks moves that the user knows in order to prevent moves called from other moves being locked. Since this happens after a move is executed, it locks the called move or Transform because the Pokémon has the executed move in its moveset.
- Status: This glitch is present in PBE, but is not fixed at this time.
- Description: Pokémon with 1809 or more Speed will still act before Pokémon slower than 1809.
- Explanation: Unknown; 1809 is not an immediately significant number, so this glitch doesn't make sense at this time.
- Status: This glitch is not present in PBE at this time.
- Description: (From Bulbapedia) In Generation V only, due to a glitch, if Gravity is used while two Pokémon are in the semi-invulnerable state of Sky Drop, Gravity will bring the user of Sky Drop down, but the target of Sky Drop will be stuck unable to move in the semi-invulnerable state, until the effect of Gravity ends, the user of Sky Drop switches out or is knocked out, or the Pokémon affected by Sky Drop is knocked out. This can only occur in Double and Triple Battles.
- Explanation: They probably have two volatile statuses for Sky Drop, one for the user and one for the target, and if this is the case, Gravity only checked for the first which is presumably the same as Fly/Bounce. If they only have one volatile status for Sky Drop, then they probably expected to handle this exact case correctly, but failed to do so in practice.
- Status: Sky Drop does not exist in PBE at this time.
- Description: (From Bulbapedia) If a Pokémon with Own Tempo is confused due to obtaining it from Baton Pass, it will not be cured of confusion until after a Pokémon takes its turn (uses a move, switches out, etc.).
- Explanation: The developers forgot to add a call to the anti-status abilities check after Baton Pass transfers the volatile statuses. It technically affects Inner Focus (flinching), but shows no symptoms because flinching only activates when a Pokémon uses a move, and flinching is cleared from each Pokémon at the end of every turn. It does not affect Oblivious (infatuation) because infatuation cannot be passed with Baton Pass.
- Status: Baton Pass does not exist in PBE at this time.
-
Description: (From Bulbapedia) If a Pokémon is already locked into a move due to a Choice item (the Choice Band, Choice Specs, or Choice Scarf), if the held Choice item is removed while the effect of the Pokémon's held item is negated (by Klutz, Embargo, or Magic Room), the Pokémon will remain locked into the move. When the Pokémon's held item regains its effect (e.g. Magic Room wears off), regardless of the Pokémon's held item (even if it has none), it cannot select moves other than the one it is locked into; if it attempts to select another move, the message
"The <HELD ITEM> allows the use of only <MOVE>!"
will be displayed. - Explanation: I do not currently have an explanation because I haven't had to explore/add these conditions yet.
- Status: These conditions do not exist in PBE at this time.