Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes freeze on Galvanize Explosion against Volt Absorb #4601

Merged
merged 1 commit into from
May 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions data/battle_scripts_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -8097,7 +8097,6 @@ BattleScript_MoveStatDrain::
.endif
BattleScript_MoveStatDrain_Cont:
clearsemiinvulnerablebit
tryfaintmon BS_ATTACKER
goto BattleScript_MoveEnd

BattleScript_MonMadeMoveUseless_PPLoss::
Expand All @@ -8108,7 +8107,6 @@ BattleScript_MonMadeMoveUseless::
call BattleScript_AbilityPopUp
printstring STRINGID_PKMNSXMADEYUSELESS
waitmessage B_WAIT_TIME_LONG
tryfaintmon BS_ATTACKER
orhalfword gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE
goto BattleScript_MoveEnd

Expand All @@ -8120,7 +8118,6 @@ BattleScript_FlashFireBoost::
call BattleScript_AbilityPopUp
printfromtable gFlashFireStringIds
waitmessage B_WAIT_TIME_LONG
tryfaintmon BS_ATTACKER
goto BattleScript_MoveEnd

BattleScript_AbilityPreventsPhasingOut::
Expand Down
22 changes: 22 additions & 0 deletions test/battle/move_effect/explosion.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,25 @@ SINGLE_BATTLE_TEST("Explosion does not trigger Destiny Bond")
NOT HP_BAR(opponent);
}
}

DOUBLE_BATTLE_TEST("Explosion boosted by Galvanize is correctly blocked by Volt Absorb")
{
GIVEN {
PLAYER(SPECIES_GEODUDE_ALOLAN) { Ability(ABILITY_GALVANIZE); }
PLAYER(SPECIES_WYNAUT) { HP(1); }
OPPONENT(SPECIES_LANTURN) { Ability(ABILITY_VOLT_ABSORB); }
OPPONENT(SPECIES_WOBBUFFET) { HP(1); }
} WHEN {
TURN { MOVE(playerLeft, MOVE_EXPLOSION); }
} SCENE {
MESSAGE("Geodude used Explosion!");
HP_BAR(playerLeft, hp: 0);
ABILITY_POPUP(opponentLeft, ABILITY_VOLT_ABSORB);
NOT HP_BAR(opponentLeft, hp: 0);
HP_BAR(playerRight, hp: 0);
MESSAGE("Wynaut fainted!");
HP_BAR(opponentRight, hp: 0);
MESSAGE("Foe Wobbuffet fainted!");
MESSAGE("Geodude fainted!");
}
}
Loading