Fixes defrosting if frozon mon is not damaged by opponent (#6016)
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
This commit is contained in:
parent
536f386bed
commit
f1eebc978d
@ -5846,6 +5846,7 @@ static void Cmd_moveend(void)
|
||||
break;
|
||||
case MOVEEND_DEFROST: // defrosting check
|
||||
if (gBattleMons[gBattlerTarget].status1 & STATUS1_FREEZE
|
||||
&& TARGET_TURN_DAMAGED
|
||||
&& IsBattlerAlive(gBattlerTarget)
|
||||
&& gBattlerAttacker != gBattlerTarget
|
||||
&& (moveType == TYPE_FIRE || CanBurnHitThaw(gCurrentMove))
|
||||
|
||||
@ -43,3 +43,21 @@ SINGLE_BATTLE_TEST("Freeze is thawed by user's Flame Wheel")
|
||||
MESSAGE("Wobbuffet used Flame Wheel!");
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Freeze isn't thawed if opponent is asleep during thawing attack")
|
||||
{
|
||||
PASSES_RANDOMLY(80, 100, RNG_FROZEN);
|
||||
GIVEN {
|
||||
ASSUME(GetMoveType(MOVE_EMBER) == TYPE_FIRE);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_FREEZE); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Status1(STATUS1_SLEEP); };
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_EMBER); MOVE(player, MOVE_CELEBRATE); }
|
||||
} SCENE {
|
||||
NONE_OF {
|
||||
MESSAGE("The opposing Wobbuffet used Ember!");
|
||||
MESSAGE("Wobbuffet thawed out!");
|
||||
STATUS_ICON(player, none: TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user