Merge pull request #1377 from ghoulslash/thaw

Update Thawing Moves
This commit is contained in:
ultima-soul 2021-01-31 13:57:44 -08:00 committed by GitHub
commit eb78b5434c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2834,6 +2834,29 @@ void TryClearRageAndFuryCutter(void)
}
}
static bool32 IsThawingMove(u8 battlerId, u16 move)
{
switch (move)
{
case MOVE_BURN_UP:
if (!IS_BATTLER_OF_TYPE(battlerId, TYPE_FIRE))
return FALSE;
//fallthrough
case MOVE_FLAME_WHEEL:
case MOVE_FLARE_BLITZ:
case MOVE_FUSION_FLARE:
case MOVE_PYRO_BALL:
case MOVE_SACRED_FIRE:
case MOVE_SCALD:
case MOVE_SCORCHING_SANDS:
case MOVE_SIZZLY_SLIDE:
case MOVE_STEAM_ERUPTION:
return TRUE;
default:
return FALSE;
}
}
enum
{
CANCELLER_FLAGS,
@ -3133,8 +3156,7 @@ u8 AtkCanceller_UnableToUseMove(void)
case CANCELLER_THAW: // move thawing
if (gBattleMons[gBattlerAttacker].status1 & STATUS1_FREEZE)
{
if (gBattleMoves[gCurrentMove].effect == EFFECT_THAW_HIT
|| (gBattleMoves[gCurrentMove].effect == EFFECT_BURN_UP && IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_FIRE)))
if (IsThawingMove(gBattlerAttacker, gCurrentMove))
{
gBattleMons[gBattlerAttacker].status1 &= ~(STATUS1_FREEZE);
BattleScriptPushCursor();