Fixes Razor Wind not activating after hit effects after the first target (#7413)

This commit is contained in:
PhallenTree 2025-07-28 13:21:12 +01:00 committed by GitHub
parent 95e45b5568
commit 8bfc5b3093
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 31 additions and 0 deletions

View File

@ -3529,6 +3529,7 @@ BattleScript_PowerHerbActivation:
BattleScript_EffectTwoTurnsAttack::
jumpifstatus2 BS_ATTACKER, STATUS2_MULTIPLETURNS, BattleScript_TwoTurnMovesSecondTurn
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_NO_ATTACKSTRING, BattleScript_TwoTurnMovesSecondTurn
jumpifword CMP_COMMON_BITS, gHitMarker, HITMARKER_ATTACKSTRING_PRINTED, BattleScript_EffectHit @ if it's not the first hit
tryfiretwoturnmovewithoutcharging BS_ATTACKER, BattleScript_EffectHit @ e.g. Solar Beam
call BattleScript_FirstChargingTurn
tryfiretwoturnmoveaftercharging BS_ATTACKER, BattleScript_TwoTurnMovesSecondTurn @ e.g. Electro Shot

View File

@ -67,6 +67,36 @@ SINGLE_BATTLE_TEST("Razor Wind doesn't need to charge with Power Herb")
}
}
DOUBLE_BATTLE_TEST("Razor Wind successfully KOs both opponents")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_POWER_HERB); }
PLAYER(SPECIES_WYNAUT);
OPPONENT(SPECIES_WOBBUFFET) { HP(1); }
OPPONENT(SPECIES_WYNAUT) { HP(1); }
} WHEN {
TURN { MOVE(playerLeft, MOVE_RAZOR_WIND); }
} SCENE {
if (B_UPDATED_MOVE_DATA >= GEN_5) {
NOT MESSAGE("Wobbuffet whipped up a whirlwind!");
MESSAGE("Wobbuffet used Razor Wind!");
} else
ANIMATION(ANIM_TYPE_MOVE, MOVE_RAZOR_WIND, playerLeft);
if (B_UPDATED_MOVE_DATA < GEN_5)
MESSAGE("Wobbuffet whipped up a whirlwind!");
else
ANIMATION(ANIM_TYPE_MOVE, MOVE_RAZOR_WIND, playerLeft);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, playerLeft);
MESSAGE("Wobbuffet became fully charged due to its Power Herb!");
if (B_UPDATED_MOVE_DATA < GEN_5)
MESSAGE("Wobbuffet used Razor Wind!");
ANIMATION(ANIM_TYPE_MOVE, MOVE_RAZOR_WIND, playerLeft);
HP_BAR(opponentLeft);
MESSAGE("The opposing Wobbuffet fainted!");
MESSAGE("The opposing Wynaut fainted!");
}
}
SINGLE_BATTLE_TEST("Skull Bash needs a charging turn")
{
GIVEN {