Fix Cherim and Castfrom not reverting to baseform when Teraform Zero is triggered (#7961)
This commit is contained in:
parent
de3c031fc5
commit
864377f99a
@ -8883,14 +8883,28 @@ BattleScript_ActivateTeraformZero_RemoveWeather:
|
||||
removeweather
|
||||
printfromtable gWeatherEndsStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
jumpifhalfword CMP_NO_COMMON_BITS, gFieldStatuses, STATUS_FIELD_TERRAIN_ANY, BattleScript_ActivateTeraformZero_End
|
||||
call BattleScript_ActivateWeatherAbilities
|
||||
jumpifhalfword CMP_NO_COMMON_BITS, gFieldStatuses, STATUS_FIELD_TERRAIN_ANY, BattleScript_ActivateTeraformZeroEffects
|
||||
BattleScript_ActivateTeraformZero_RemoveTerrain:
|
||||
removeterrain
|
||||
playanimation BS_ATTACKER, B_ANIM_RESTORE_BG
|
||||
printfromtable gTerrainStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_ActivateTeraformZero_End:
|
||||
BattleScript_ActivateTeraformZeroEffects:
|
||||
saveattacker
|
||||
savetarget
|
||||
tryboosterenergy ON_ANY
|
||||
resetterrainabilityflags
|
||||
setbyte gBattlerAttacker, 0
|
||||
BattleScript_ActivateTeraformZeroLoop:
|
||||
copyarraywithindex gBattlerTarget, gBattlerByTurnOrder, gBattlerAttacker, 1
|
||||
activateterrainchangeabilities BS_TARGET
|
||||
activateweatherchangeabilities BS_TARGET
|
||||
addbyte gBattlerAttacker, 1
|
||||
jumpifbytenotequal gBattlerAttacker, gBattlersCount, BattleScript_ActivateTeraformZeroLoop
|
||||
restoreattacker
|
||||
restoretarget
|
||||
BattleScript_ActivateTeraformZero_End:
|
||||
end3
|
||||
|
||||
BattleScript_QuickClawActivation::
|
||||
|
||||
@ -199,4 +199,23 @@ SINGLE_BATTLE_TEST("Flower Gift transforms Cherrim back when it uses a move that
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Flower Gift reverts Cherrim back after Teraform Zero clears weather")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_TERAPAGOS_TERASTAL);
|
||||
PLAYER(SPECIES_CHERRIM) { Ability(ABILITY_FLOWER_GIFT); }
|
||||
OPPONENT(SPECIES_GROUDON) { Ability(ABILITY_DROUGHT); }
|
||||
OPPONENT(SPECIES_WYNAUT);
|
||||
} WHEN {
|
||||
TURN { MOVE(playerLeft, MOVE_CELEBRATE, gimmick: GIMMICK_TERA); }
|
||||
} SCENE {
|
||||
ABILITY_POPUP(opponentLeft, ABILITY_DROUGHT);
|
||||
ABILITY_POPUP(playerRight, ABILITY_FLOWER_GIFT);
|
||||
ABILITY_POPUP(playerLeft, ABILITY_TERAFORM_ZERO);
|
||||
ABILITY_POPUP(playerRight, ABILITY_FLOWER_GIFT);
|
||||
} THEN {
|
||||
EXPECT_EQ(playerRight->species, SPECIES_CHERRIM);
|
||||
}
|
||||
}
|
||||
|
||||
TO_DO_BATTLE_TEST("Flower Gift does not transform Cherrim back to normal when suppressed if Cherrim is Dynamaxed");
|
||||
|
||||
@ -419,3 +419,22 @@ SINGLE_BATTLE_TEST("Forecast transforms Castform when Cloud Nine ability user le
|
||||
MESSAGE("Castform transformed!");
|
||||
}
|
||||
}
|
||||
|
||||
DOUBLE_BATTLE_TEST("Forecast reverts Castform back after Teraform Zero clears weather")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_TERAPAGOS_TERASTAL);
|
||||
PLAYER(SPECIES_CASTFORM) { Ability(ABILITY_FORECAST); }
|
||||
OPPONENT(SPECIES_KYOGRE) { Ability(ABILITY_DRIZZLE); }
|
||||
OPPONENT(SPECIES_WYNAUT);
|
||||
} WHEN {
|
||||
TURN { MOVE(playerLeft, MOVE_CELEBRATE, gimmick: GIMMICK_TERA); }
|
||||
} SCENE {
|
||||
ABILITY_POPUP(opponentLeft, ABILITY_DRIZZLE);
|
||||
ABILITY_POPUP(playerRight, ABILITY_FORECAST);
|
||||
ABILITY_POPUP(playerLeft, ABILITY_TERAFORM_ZERO);
|
||||
ABILITY_POPUP(playerRight, ABILITY_FORECAST);
|
||||
} THEN {
|
||||
EXPECT_EQ(playerRight->species, SPECIES_CASTFORM_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user