Implementation of the move Protect #6010
Labels
bug
Bug
category: battle-mechanic
Pertains to battle mechanics
status: unconfirmed
This bug has not been reproduced yet
Description
two points of note, both in
src/battle_script_commands.c
:Cmd_setprotectlike
, lines that incrementprotectUses
don't bounds-check and will exceed the array length ofsProtectSuccessRates
on the 5th use and onwards, causing it to read incorrect values such as fromsFinalStrikeOnlyEffects
sProtectSuccessRates
has no config for gen 6 onwards where successive uses multiply the success rate by 1/3 instead of 1/2Attached is game and log for the array index going OOB (threshold 67 corresponds to
MOVE_EFFECT_BUG_BITE
value fromsFinalStrikeOnlyEffects
)Version
1.10.1 (Latest release)
Upcoming/master Version
No response
Discord contact info
No response
The text was updated successfully, but these errors were encountered: