Merge pull request #2205 from Mitsunee/standardize-spelling-of-canceler
Standardize spelling of "canceler"
This commit is contained in:
@@ -431,7 +431,7 @@ struct BattleStruct
|
|||||||
u8 wishPerishSongState;
|
u8 wishPerishSongState;
|
||||||
u8 wishPerishSongBattlerId;
|
u8 wishPerishSongBattlerId;
|
||||||
bool8 overworldWeatherDone;
|
bool8 overworldWeatherDone;
|
||||||
u8 atkCancellerTracker;
|
u8 atkCancelerTracker;
|
||||||
struct BattleTvMovePoints tvMovePoints;
|
struct BattleTvMovePoints tvMovePoints;
|
||||||
struct BattleTv tv;
|
struct BattleTv tv;
|
||||||
u8 unused_7[0x28];
|
u8 unused_7[0x28];
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ u8 DoBattlerEndTurnEffects(void);
|
|||||||
bool8 HandleWishPerishSongOnTurnEnd(void);
|
bool8 HandleWishPerishSongOnTurnEnd(void);
|
||||||
bool8 HandleFaintedMonActions(void);
|
bool8 HandleFaintedMonActions(void);
|
||||||
void TryClearRageStatuses(void);
|
void TryClearRageStatuses(void);
|
||||||
u8 AtkCanceller_UnableToUseMove(void);
|
u8 AtkCanceler_UnableToUseMove(void);
|
||||||
bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2);
|
bool8 HasNoMonsToSwitch(u8 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2);
|
||||||
u8 CastformDataTypeChange(u8 battler);
|
u8 CastformDataTypeChange(u8 battler);
|
||||||
u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveArg);
|
u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveArg);
|
||||||
|
|||||||
@@ -927,7 +927,7 @@ static void Cmd_attackcanceler(void)
|
|||||||
gBattlescriptCurrInstr = BattleScript_MoveEnd;
|
gBattlescriptCurrInstr = BattleScript_MoveEnd;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (AtkCanceller_UnableToUseMove())
|
if (AtkCanceler_UnableToUseMove())
|
||||||
return;
|
return;
|
||||||
if (AbilityBattleEffects(ABILITYEFFECT_MOVES_BLOCK, gBattlerTarget, 0, 0, 0))
|
if (AbilityBattleEffects(ABILITYEFFECT_MOVES_BLOCK, gBattlerTarget, 0, 0, 0))
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ void HandleAction_UseMove(void)
|
|||||||
|
|
||||||
gCritMultiplier = 1;
|
gCritMultiplier = 1;
|
||||||
gBattleScripting.dmgMultiplier = 1;
|
gBattleScripting.dmgMultiplier = 1;
|
||||||
gBattleStruct->atkCancellerTracker = 0;
|
gBattleStruct->atkCancelerTracker = 0;
|
||||||
gMoveResultFlags = 0;
|
gMoveResultFlags = 0;
|
||||||
gMultiHitCounter = 0;
|
gMultiHitCounter = 0;
|
||||||
gBattleCommunication[MISS_TYPE] = 0;
|
gBattleCommunication[MISS_TYPE] = 0;
|
||||||
@@ -1982,37 +1982,37 @@ void TryClearRageStatuses(void)
|
|||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
CANCELLER_FLAGS,
|
CANCELER_FLAGS,
|
||||||
CANCELLER_ASLEEP,
|
CANCELER_ASLEEP,
|
||||||
CANCELLER_FROZEN,
|
CANCELER_FROZEN,
|
||||||
CANCELLER_TRUANT,
|
CANCELER_TRUANT,
|
||||||
CANCELLER_RECHARGE,
|
CANCELER_RECHARGE,
|
||||||
CANCELLER_FLINCH,
|
CANCELER_FLINCH,
|
||||||
CANCELLER_DISABLED,
|
CANCELER_DISABLED,
|
||||||
CANCELLER_TAUNTED,
|
CANCELER_TAUNTED,
|
||||||
CANCELLER_IMPRISONED,
|
CANCELER_IMPRISONED,
|
||||||
CANCELLER_CONFUSED,
|
CANCELER_CONFUSED,
|
||||||
CANCELLER_PARALYSED,
|
CANCELER_PARALYSED,
|
||||||
CANCELLER_IN_LOVE,
|
CANCELER_IN_LOVE,
|
||||||
CANCELLER_BIDE,
|
CANCELER_BIDE,
|
||||||
CANCELLER_THAW,
|
CANCELER_THAW,
|
||||||
CANCELLER_END,
|
CANCELER_END,
|
||||||
};
|
};
|
||||||
|
|
||||||
u8 AtkCanceller_UnableToUseMove(void)
|
u8 AtkCanceler_UnableToUseMove(void)
|
||||||
{
|
{
|
||||||
u8 effect = 0;
|
u8 effect = 0;
|
||||||
s32 *bideDmg = &gBattleScripting.bideDmg;
|
s32 *bideDmg = &gBattleScripting.bideDmg;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
switch (gBattleStruct->atkCancellerTracker)
|
switch (gBattleStruct->atkCancelerTracker)
|
||||||
{
|
{
|
||||||
case CANCELLER_FLAGS: // flags clear
|
case CANCELER_FLAGS: // flags clear
|
||||||
gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_DESTINY_BOND;
|
gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_DESTINY_BOND;
|
||||||
gStatuses3[gBattlerAttacker] &= ~STATUS3_GRUDGE;
|
gStatuses3[gBattlerAttacker] &= ~STATUS3_GRUDGE;
|
||||||
gBattleStruct->atkCancellerTracker++;
|
gBattleStruct->atkCancelerTracker++;
|
||||||
break;
|
break;
|
||||||
case CANCELLER_ASLEEP: // check being asleep
|
case CANCELER_ASLEEP: // check being asleep
|
||||||
if (gBattleMons[gBattlerAttacker].status1 & STATUS1_SLEEP)
|
if (gBattleMons[gBattlerAttacker].status1 & STATUS1_SLEEP)
|
||||||
{
|
{
|
||||||
if (UproarWakeUpCheck(gBattlerAttacker))
|
if (UproarWakeUpCheck(gBattlerAttacker))
|
||||||
@@ -2054,9 +2054,9 @@ u8 AtkCanceller_UnableToUseMove(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gBattleStruct->atkCancellerTracker++;
|
gBattleStruct->atkCancelerTracker++;
|
||||||
break;
|
break;
|
||||||
case CANCELLER_FROZEN: // check being frozen
|
case CANCELER_FROZEN: // check being frozen
|
||||||
if (gBattleMons[gBattlerAttacker].status1 & STATUS1_FREEZE)
|
if (gBattleMons[gBattlerAttacker].status1 & STATUS1_FREEZE)
|
||||||
{
|
{
|
||||||
if (Random() % 5)
|
if (Random() % 5)
|
||||||
@@ -2068,7 +2068,7 @@ u8 AtkCanceller_UnableToUseMove(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gBattleStruct->atkCancellerTracker++;
|
gBattleStruct->atkCancelerTracker++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2081,9 +2081,9 @@ u8 AtkCanceller_UnableToUseMove(void)
|
|||||||
}
|
}
|
||||||
effect = 2;
|
effect = 2;
|
||||||
}
|
}
|
||||||
gBattleStruct->atkCancellerTracker++;
|
gBattleStruct->atkCancelerTracker++;
|
||||||
break;
|
break;
|
||||||
case CANCELLER_TRUANT: // truant
|
case CANCELER_TRUANT: // truant
|
||||||
if (gBattleMons[gBattlerAttacker].ability == ABILITY_TRUANT && gDisableStructs[gBattlerAttacker].truantCounter)
|
if (gBattleMons[gBattlerAttacker].ability == ABILITY_TRUANT && gDisableStructs[gBattlerAttacker].truantCounter)
|
||||||
{
|
{
|
||||||
CancelMultiTurnMoves(gBattlerAttacker);
|
CancelMultiTurnMoves(gBattlerAttacker);
|
||||||
@@ -2093,9 +2093,9 @@ u8 AtkCanceller_UnableToUseMove(void)
|
|||||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||||
effect = 1;
|
effect = 1;
|
||||||
}
|
}
|
||||||
gBattleStruct->atkCancellerTracker++;
|
gBattleStruct->atkCancelerTracker++;
|
||||||
break;
|
break;
|
||||||
case CANCELLER_RECHARGE: // recharge
|
case CANCELER_RECHARGE: // recharge
|
||||||
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_RECHARGE)
|
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_RECHARGE)
|
||||||
{
|
{
|
||||||
gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_RECHARGE;
|
gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_RECHARGE;
|
||||||
@@ -2105,9 +2105,9 @@ u8 AtkCanceller_UnableToUseMove(void)
|
|||||||
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;
|
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;
|
||||||
effect = 1;
|
effect = 1;
|
||||||
}
|
}
|
||||||
gBattleStruct->atkCancellerTracker++;
|
gBattleStruct->atkCancelerTracker++;
|
||||||
break;
|
break;
|
||||||
case CANCELLER_FLINCH: // flinch
|
case CANCELER_FLINCH: // flinch
|
||||||
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_FLINCHED)
|
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_FLINCHED)
|
||||||
{
|
{
|
||||||
gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_FLINCHED;
|
gBattleMons[gBattlerAttacker].status2 &= ~STATUS2_FLINCHED;
|
||||||
@@ -2117,9 +2117,9 @@ u8 AtkCanceller_UnableToUseMove(void)
|
|||||||
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;
|
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;
|
||||||
effect = 1;
|
effect = 1;
|
||||||
}
|
}
|
||||||
gBattleStruct->atkCancellerTracker++;
|
gBattleStruct->atkCancelerTracker++;
|
||||||
break;
|
break;
|
||||||
case CANCELLER_DISABLED: // disabled move
|
case CANCELER_DISABLED: // disabled move
|
||||||
if (gDisableStructs[gBattlerAttacker].disabledMove == gCurrentMove && gDisableStructs[gBattlerAttacker].disabledMove != MOVE_NONE)
|
if (gDisableStructs[gBattlerAttacker].disabledMove == gCurrentMove && gDisableStructs[gBattlerAttacker].disabledMove != MOVE_NONE)
|
||||||
{
|
{
|
||||||
gProtectStructs[gBattlerAttacker].usedDisabledMove = 1;
|
gProtectStructs[gBattlerAttacker].usedDisabledMove = 1;
|
||||||
@@ -2129,9 +2129,9 @@ u8 AtkCanceller_UnableToUseMove(void)
|
|||||||
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;
|
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;
|
||||||
effect = 1;
|
effect = 1;
|
||||||
}
|
}
|
||||||
gBattleStruct->atkCancellerTracker++;
|
gBattleStruct->atkCancelerTracker++;
|
||||||
break;
|
break;
|
||||||
case CANCELLER_TAUNTED: // taunt
|
case CANCELER_TAUNTED: // taunt
|
||||||
if (gDisableStructs[gBattlerAttacker].tauntTimer && gBattleMoves[gCurrentMove].power == 0)
|
if (gDisableStructs[gBattlerAttacker].tauntTimer && gBattleMoves[gCurrentMove].power == 0)
|
||||||
{
|
{
|
||||||
gProtectStructs[gBattlerAttacker].usedTauntedMove = 1;
|
gProtectStructs[gBattlerAttacker].usedTauntedMove = 1;
|
||||||
@@ -2140,9 +2140,9 @@ u8 AtkCanceller_UnableToUseMove(void)
|
|||||||
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;
|
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;
|
||||||
effect = 1;
|
effect = 1;
|
||||||
}
|
}
|
||||||
gBattleStruct->atkCancellerTracker++;
|
gBattleStruct->atkCancelerTracker++;
|
||||||
break;
|
break;
|
||||||
case CANCELLER_IMPRISONED: // imprisoned
|
case CANCELER_IMPRISONED: // imprisoned
|
||||||
if (GetImprisonedMovesCount(gBattlerAttacker, gCurrentMove))
|
if (GetImprisonedMovesCount(gBattlerAttacker, gCurrentMove))
|
||||||
{
|
{
|
||||||
gProtectStructs[gBattlerAttacker].usedImprisonedMove = 1;
|
gProtectStructs[gBattlerAttacker].usedImprisonedMove = 1;
|
||||||
@@ -2151,9 +2151,9 @@ u8 AtkCanceller_UnableToUseMove(void)
|
|||||||
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;
|
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;
|
||||||
effect = 1;
|
effect = 1;
|
||||||
}
|
}
|
||||||
gBattleStruct->atkCancellerTracker++;
|
gBattleStruct->atkCancelerTracker++;
|
||||||
break;
|
break;
|
||||||
case CANCELLER_CONFUSED: // confusion
|
case CANCELER_CONFUSED: // confusion
|
||||||
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_CONFUSION)
|
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_CONFUSION)
|
||||||
{
|
{
|
||||||
gBattleMons[gBattlerAttacker].status2 -= STATUS2_CONFUSION_TURN(1);
|
gBattleMons[gBattlerAttacker].status2 -= STATUS2_CONFUSION_TURN(1);
|
||||||
@@ -2183,9 +2183,9 @@ u8 AtkCanceller_UnableToUseMove(void)
|
|||||||
}
|
}
|
||||||
effect = 1;
|
effect = 1;
|
||||||
}
|
}
|
||||||
gBattleStruct->atkCancellerTracker++;
|
gBattleStruct->atkCancelerTracker++;
|
||||||
break;
|
break;
|
||||||
case CANCELLER_PARALYSED: // paralysis
|
case CANCELER_PARALYSED: // paralysis
|
||||||
if ((gBattleMons[gBattlerAttacker].status1 & STATUS1_PARALYSIS) && (Random() % 4) == 0)
|
if ((gBattleMons[gBattlerAttacker].status1 & STATUS1_PARALYSIS) && (Random() % 4) == 0)
|
||||||
{
|
{
|
||||||
gProtectStructs[gBattlerAttacker].prlzImmobility = 1;
|
gProtectStructs[gBattlerAttacker].prlzImmobility = 1;
|
||||||
@@ -2195,9 +2195,9 @@ u8 AtkCanceller_UnableToUseMove(void)
|
|||||||
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;
|
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;
|
||||||
effect = 1;
|
effect = 1;
|
||||||
}
|
}
|
||||||
gBattleStruct->atkCancellerTracker++;
|
gBattleStruct->atkCancelerTracker++;
|
||||||
break;
|
break;
|
||||||
case CANCELLER_IN_LOVE: // infatuation
|
case CANCELER_IN_LOVE: // infatuation
|
||||||
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_INFATUATION)
|
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_INFATUATION)
|
||||||
{
|
{
|
||||||
gBattleScripting.battler = CountTrailingZeroBits((gBattleMons[gBattlerAttacker].status2 & STATUS2_INFATUATION) >> 0x10);
|
gBattleScripting.battler = CountTrailingZeroBits((gBattleMons[gBattlerAttacker].status2 & STATUS2_INFATUATION) >> 0x10);
|
||||||
@@ -2215,9 +2215,9 @@ u8 AtkCanceller_UnableToUseMove(void)
|
|||||||
gBattlescriptCurrInstr = BattleScript_MoveUsedIsInLove;
|
gBattlescriptCurrInstr = BattleScript_MoveUsedIsInLove;
|
||||||
effect = 1;
|
effect = 1;
|
||||||
}
|
}
|
||||||
gBattleStruct->atkCancellerTracker++;
|
gBattleStruct->atkCancelerTracker++;
|
||||||
break;
|
break;
|
||||||
case CANCELLER_BIDE: // bide
|
case CANCELER_BIDE: // bide
|
||||||
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_BIDE)
|
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_BIDE)
|
||||||
{
|
{
|
||||||
gBattleMons[gBattlerAttacker].status2 -= STATUS2_BIDE_TURN(1);
|
gBattleMons[gBattlerAttacker].status2 -= STATUS2_BIDE_TURN(1);
|
||||||
@@ -2245,9 +2245,9 @@ u8 AtkCanceller_UnableToUseMove(void)
|
|||||||
}
|
}
|
||||||
effect = 1;
|
effect = 1;
|
||||||
}
|
}
|
||||||
gBattleStruct->atkCancellerTracker++;
|
gBattleStruct->atkCancelerTracker++;
|
||||||
break;
|
break;
|
||||||
case CANCELLER_THAW: // move thawing
|
case CANCELER_THAW: // move thawing
|
||||||
if (gBattleMons[gBattlerAttacker].status1 & STATUS1_FREEZE)
|
if (gBattleMons[gBattlerAttacker].status1 & STATUS1_FREEZE)
|
||||||
{
|
{
|
||||||
if (gBattleMoves[gCurrentMove].effect == EFFECT_THAW_HIT)
|
if (gBattleMoves[gCurrentMove].effect == EFFECT_THAW_HIT)
|
||||||
@@ -2259,13 +2259,13 @@ u8 AtkCanceller_UnableToUseMove(void)
|
|||||||
}
|
}
|
||||||
effect = 2;
|
effect = 2;
|
||||||
}
|
}
|
||||||
gBattleStruct->atkCancellerTracker++;
|
gBattleStruct->atkCancelerTracker++;
|
||||||
break;
|
break;
|
||||||
case CANCELLER_END:
|
case CANCELER_END:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
} while (gBattleStruct->atkCancellerTracker != CANCELLER_END && effect == 0);
|
} while (gBattleStruct->atkCancelerTracker != CANCELER_END && effect == 0);
|
||||||
|
|
||||||
if (effect == 2)
|
if (effect == 2)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user