Three related call sites in the RBY/shared battle pipeline decided
in-game behavior by string-matching a message that had already been
routed through Strings()/romText -- correct in English, silently wrong
under any translation catalog, since a translated message no longer
contains the English substring being searched for:
- BattleState:sayStatusMsg played the sleep/confusion SFX by searching
the status message for "is fast asleep!"/"is confused!". Under a
translation catalog the SFX silently stopped firing.
Status.beforeMove now returns onomatopoeiaKind/onomatopoeiaIndex,
pinning the SFX to the specific still-asleep/still-confused message
it belongs to (not necessarily the last one: confusion not
self-hitting can fall through into the disabled-move check or the
paralysis roll, appending one more, unrelated message after it).
- primaryEffectFailed decided whether to suppress a status/stat move's
success animation by string-matching msgs[1] against six known
English fail lines ("But, it failed!", "Nothing happened!", "didn't
affect", "is unaffected", "protected by MIST", "already asleep").
Extended the msgs.failed flag Substitute's own two failure lines
already used (#644) to every other MoveEffects.primary handler that
can fail without landing: changeStage, confuse, statusMove, and the
single-condition guards in LEECH_SEED, HEAL (including REST),
LIGHT_SCREEN, REFLECT, MIST, FOCUS_ENERGY, CONVERSION and DISABLE --
every function actually reachable through primaryEffectFailed (only
MoveEffects.primary entries are, via performMove's power == 0 and
record.kind == "primary" gate; the many other "But, it failed!"
sites elsewhere in this file belong to secondary/full-kind handlers
on a different pipeline and don't reach this function at all, left
alone here as a much larger separate follow-up). Removed the
six-substring sniffer now that every real producer sets the flag
explicitly; "is unaffected" had no live producer reaching this
function to begin with (SWITCH_AND_TELEPORT_EFFECT's own copy goes
through battle:cancelMoveAnim() directly, a different code path).
Removing the sniffer also fixes three pre-existing test failures
(parity_substitute_anim, two assertions in parity_trainer_ball_block)
that were crashing on a TextBox.strip call this test environment
doesn't stub -- that call only existed to support the sniffer.
- statusInterrupt decided whether a blocked move came from PAR's own
63/256 full-paralysis roll (which clears bide/thrash/charge/
trapping) by checking mon.status == "PAR" together with the message
containing "fully paralyzed". mon.status == "PAR" alone isn't a safe
replacement either: a paralyzed-and-flinched battler also has
status == "PAR" while canMove == false comes from the flinch, not
the paralysis roll. Status.beforeMove now also returns
statusBlockedId, set to the status record's own id only when that
record's own beforeMove handler is what returned canMove == false.
Extended tests/parity_status_onomatopoeia.lua with regression cases
for confusion overriding both ROM text labels with non-English text,
confusion stacked with a disabled selected move, and confusion stacked
with paralysis. Verified against the existing paralysis cases in
tests/mod_battle_tests.lua and the full test suite, no regressions.
# Closed issues
CLOSES#17: Incorrect Character Visuals (Only with GBC filter)
CLOSES#23: Could you allow the player to change the order of the moves
CLOSES#24: Evolution music not playing during evolution
CLOSES#26: Standing on door glitch
CLOSES#27: Battle Intro text automatically continues
CLOSES#29: Visual bug when zoomed out
CLOSES#32: Team Rocket recruiter doesn't battle with you unless you speak with him first
CLOSES#33: Developer/Debug Console
CLOSES#35: Professor Oak's introduction Inaccuracies
CLOSES#36: Missing Pokemon Dex entries when picking starter + Rival Pathing issues
CLOSES#39: Guy who stops player from skipping brock doesn't bring you to brock's gym + doesn't leave once you've beaten brock
CLOSES#40: Bill cutscene is broken
CLOSES#41: Ticket guy failing to be a Ticket guy
CLOSES#42: S.S. anne odd behavior + Missing sailing away animation
CLOSES#43: Dig Attack animation appears to be glitched
CLOSES#44: Pokeball flashing doesn't appear to be accurate
CLOSES#45: Inaccurate Cut Animation
CLOSES#46: Dugtrio i caught in diglett cave has two of the same move
CLOSES#47: Rival ignores player in Lavender Tower
CLOSES#48: Healing pad in lavender tower does not function
CLOSES#49: Incorrect dialogue with parched security guard
CLOSES#50: (Game Breaking!) Rocket grunt guarding poster refuses to move
CLOSES#51: Badges showing up as items I can deposit in PC
CLOSES#52: Visual bug on Celadon Department Store roof (Red Filter)
CLOSES#54: Visual issue on route 15 + Fuchsia City
CLOSES#56: Running animation missing
CLOSES#57: Safari Zone does not display steps while you are inside of it
CLOSES#58: (Game Breaking!) Softlock at cycling road gate
CLOSES#59: Bike visual issues
CLOSES#60: Cycling road not forcing you to get on your bike
CLOSES#61: No keycard doors in Silph Co.
CLOSES#63: Missing teleporter animation
CLOSES#64: Inaccurate spinning
CLOSES#65: Reimplement unused Silph Co. Chief and Professor Oak trainer battles