You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Moves that cause a non-volatile status condition as well as moves that lower stats have a 25% chance to fail when used by the AI, but they are also supposed to not do this if the target has the Lock-On status.
However, this appears to be a bit of an oversight, as it is not possible for the target to actually have the Lock-On status, since the status gets consumed by the checkhit command.
For example, here's the part of the BattleCommand_StatDown subroutine that checks if Lock-On is in effect, and if not, it rolls for the 25% chance to miss:
; Return nz if we are locked-on and aren't trying to use Earthquake,
; Fissure or Magnitude on a monster that is flying.
ld a, BATTLE_VARS_SUBSTATUS5_OPP
call GetBattleVarAddr
bit SUBSTATUS_LOCK_ON,[hl]
res SUBSTATUS_LOCK_ON,[hl]
ret z
A rather infamous example of this is when fighting Chuck's Poliwrath. His strategy is to use Mind Reader combined with inaccurate moves like DynamicPunch and Hypnosis. However, if he uses Mind Reader, Hypnosis will still have a 25% chance to fail.
The text was updated successfully, but these errors were encountered:
SnowyMouse
changed the title
Bug: Mind Reader and Lock-On don't prevent the AI from failing status moves that they have a 25% chance to fail
Bug: Mind Reader and Lock-On don't prevent the AI from failing status moves that have a 25% chance to fail
Aug 13, 2023
SnowyMouse
changed the title
Bug: Mind Reader and Lock-On don't prevent the AI from failing status moves that have a 25% chance to fail
Bug: Mind Reader and Lock-On don't prevent the AI from failing status moves that have a 25% chance to fail (when used by AI)
Aug 13, 2023
I think you're right, that seems like a bug, but since lock on is supposed to reset after the turn it takes effect, the logic makes sense.
Maybe it should be handled in engine/battle/core.asm:HandleBetweenTurnEffects, instead, to preserve the flag for the entire turn, though you'd have to check if the attack actually hit...
Moves that cause a non-volatile status condition as well as moves that lower stats have a 25% chance to fail when used by the AI, but they are also supposed to not do this if the target has the Lock-On status.
However, this appears to be a bit of an oversight, as it is not possible for the target to actually have the Lock-On status, since the status gets consumed by the
checkhit
command.For example, here's the part of the BattleCommand_StatDown subroutine that checks if Lock-On is in effect, and if not, it rolls for the 25% chance to miss:
pokecrystal/engine/battle/effect_commands.asm
Lines 4365 to 4378 in 768b3bd
And here is where BattleCommand_CheckHit removes the Lock-On status:
pokecrystal/engine/battle/effect_commands.asm
Lines 1659 to 1666 in 768b3bd
A rather infamous example of this is when fighting Chuck's Poliwrath. His strategy is to use Mind Reader combined with inaccurate moves like DynamicPunch and Hypnosis. However, if he uses Mind Reader, Hypnosis will still have a 25% chance to fail.
The text was updated successfully, but these errors were encountered: