Fixes Wandering Spirit overwriting battlers (#7407)
This commit is contained in:
parent
845838bbc0
commit
38964e4f0a
@ -8189,6 +8189,8 @@ BattleScript_MummyActivates::
|
||||
return
|
||||
|
||||
BattleScript_WanderingSpiritActivates::
|
||||
saveattacker
|
||||
savetarget
|
||||
.if B_ABILITY_POP_UP == TRUE
|
||||
copybyte gBattlerAbility, gBattlerTarget
|
||||
sethword sABILITY_OVERWRITE, ABILITY_WANDERING_SPIRIT
|
||||
@ -8205,6 +8207,8 @@ BattleScript_WanderingSpiritActivates::
|
||||
jumpiffainted BS_TARGET, TRUE, BattleScript_WanderingSpiritActivatesRet
|
||||
switchinabilities BS_TARGET
|
||||
BattleScript_WanderingSpiritActivatesRet:
|
||||
restoreattacker
|
||||
restoretarget
|
||||
return
|
||||
|
||||
BattleScript_TargetsStatWasMaxedOut::
|
||||
|
||||
@ -232,3 +232,21 @@ DOUBLE_BATTLE_TEST("Eject Button activation will not trigger an attack from the
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Eject Button activates after Wandring Spirit")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_EKANS) { Ability(ABILITY_INTIMIDATE); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_YAMASK_GALAR) { Item(ITEM_EJECT_BUTTON); Ability(ABILITY_WANDERING_SPIRIT); }
|
||||
} WHEN {
|
||||
TURN {
|
||||
SWITCH(opponent, 1);
|
||||
MOVE(player, MOVE_DRAGON_CLAW);
|
||||
SEND_OUT(opponent, 0);
|
||||
}
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_DRAGON_CLAW, player);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user