Fix incorrectly applied change in atkcanceler (#8641)

This commit is contained in:
Alex 2025-12-24 01:16:26 +01:00 committed by GitHub
parent 582a643d1f
commit ac221a3aa8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 9 deletions

View File

@ -148,7 +148,7 @@ enum MoveCanceler
MOVE_STEP_SUCCESS,
MOVE_STEP_BREAK, // Breaks out of the function to run a script
MOVE_STEP_FAILURE, // Same as break but breaks out of it due to move failure and jumps to script that handles the failure
MOVE_STEP_REMOVES_STATUS,
MOVE_STEP_STATUS_CHANGE,
};
extern const struct TypePower gNaturalGiftTable[];

View File

@ -2046,7 +2046,7 @@ static enum MoveCanceler CancelerAsleepOrFrozen(struct BattleContext *ctx)
gEffectBattler = ctx->battlerAtk;
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WOKE_UP_UPROAR;
BattleScriptCall(BattleScript_MoveUsedWokeUp);
return MOVE_STEP_REMOVES_STATUS;
return MOVE_STEP_STATUS_CHANGE;
}
else
{
@ -2068,7 +2068,6 @@ static enum MoveCanceler CancelerAsleepOrFrozen(struct BattleContext *ctx)
gProtectStructs[ctx->battlerAtk].nonVolatileStatusImmobility = TRUE;
gBattlescriptCurrInstr = BattleScript_MoveUsedIsAsleep;
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;
return MOVE_STEP_FAILURE;
}
}
else
@ -2077,8 +2076,8 @@ static enum MoveCanceler CancelerAsleepOrFrozen(struct BattleContext *ctx)
gBattleMons[ctx->battlerAtk].volatiles.nightmare = FALSE;
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WOKE_UP;
BattleScriptCall(BattleScript_MoveUsedWokeUp);
return MOVE_STEP_REMOVES_STATUS;
}
return MOVE_STEP_STATUS_CHANGE;
}
}
else if (gBattleMons[ctx->battlerAtk].status1 & STATUS1_FREEZE && !MoveThawsUser(ctx->currentMove))
@ -2095,7 +2094,7 @@ static enum MoveCanceler CancelerAsleepOrFrozen(struct BattleContext *ctx)
BattleScriptCall(BattleScript_MoveUsedUnfroze);
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DEFROSTED;
}
return MOVE_STEP_REMOVES_STATUS; // Move failure but also removes status
return MOVE_STEP_STATUS_CHANGE; // Move failure but also removes status
}
return MOVE_STEP_SUCCESS;
}
@ -2500,7 +2499,7 @@ static enum MoveCanceler CancelerThaw(struct BattleContext *ctx)
BattleScriptCall(BattleScript_MoveUsedUnfroze);
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DEFROSTED_BY_MOVE;
}
return MOVE_STEP_REMOVES_STATUS;
return MOVE_STEP_STATUS_CHANGE;
}
if (gBattleMons[ctx->battlerAtk].status1 & STATUS1_FROSTBITE && MoveThawsUser(ctx->currentMove))
{
@ -2510,7 +2509,7 @@ static enum MoveCanceler CancelerThaw(struct BattleContext *ctx)
BattleScriptCall(BattleScript_MoveUsedUnfrostbite);
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_FROSTBITE_HEALED_BY_MOVE;
}
return MOVE_STEP_REMOVES_STATUS;
return MOVE_STEP_STATUS_CHANGE;
}
return MOVE_STEP_SUCCESS;
}
@ -3047,7 +3046,7 @@ enum MoveCanceler AtkCanceler_MoveSuccessOrder(struct BattleContext *ctx)
gBattleStruct->eventState.atkCanceler++;
}
if (effect == MOVE_STEP_REMOVES_STATUS)
if (effect == MOVE_STEP_STATUS_CHANGE)
{
BtlController_EmitSetMonData(
ctx->battlerAtk,
@ -6983,7 +6982,7 @@ static inline u32 IsFieldWaterSportAffected(enum Type moveType)
{
if (moveType != TYPE_FIRE)
return FALSE;
if (gFieldStatuses & STATUS_FIELD_WATERSPORT)
return TRUE;