Remove pursuitSwitchByMove and additional if statement (#6326)
This commit is contained in:
parent
7c78053a8c
commit
9479b67964
@ -816,7 +816,6 @@ struct BattleStruct
|
||||
u8 additionalEffectsCounter:4; // A counter for the additionalEffects applied by the current move in Cmd_setadditionaleffects
|
||||
u8 redCardActivates:1;
|
||||
u8 padding2:2; // padding in the middle so pursuit fields are together
|
||||
u8 pursuitSwitchByMove:1;
|
||||
u8 pursuitStoredSwitch; // Stored id for the Pursuit target's switch
|
||||
s32 battlerExpReward;
|
||||
u16 prevTurnSpecies[MAX_BATTLERS_COUNT]; // Stores species the AI has in play at start of turn
|
||||
|
||||
@ -7329,7 +7329,7 @@ static void Cmd_moveend(void)
|
||||
else if (IsBattlerAlive(gBattlerTarget))
|
||||
{
|
||||
gBattlerAttacker = gBattlerTarget;
|
||||
if (gBattleStruct->pursuitSwitchByMove)
|
||||
if (gBattleStruct->pursuitStoredSwitch == PARTY_SIZE)
|
||||
gBattlescriptCurrInstr = BattleScript_MoveSwitchOpenPartyScreen;
|
||||
else
|
||||
gBattlescriptCurrInstr = BattleScript_DoSwitchOut;
|
||||
@ -14270,7 +14270,6 @@ static void Cmd_jumpifnopursuitswitchdmg(void)
|
||||
{
|
||||
ChangeOrderTargetAfterAttacker();
|
||||
gBattleStruct->battlerState[gBattlerAttacker].pursuitTarget = TRUE;
|
||||
gBattleStruct->pursuitSwitchByMove = gActionsByTurnOrder[gCurrentTurnActionNumber] == B_ACTION_USE_MOVE;
|
||||
gBattleStruct->pursuitStoredSwitch = gBattleStruct->monToSwitchIntoId[gBattlerAttacker];
|
||||
gBattleStruct->moveTarget[gBattlerTarget] = gBattlerAttacker;
|
||||
gBattlerTarget = savedTarget;
|
||||
|
||||
@ -3214,7 +3214,6 @@ static void CancellerAsleep(u32 *effect)
|
||||
{
|
||||
u32 moveEffect = GetMoveEffect(gChosenMove);
|
||||
if (moveEffect != EFFECT_SNORE && moveEffect != EFFECT_SLEEP_TALK)
|
||||
if (gChosenMove != MOVE_SNORE && gChosenMove != MOVE_SLEEP_TALK)
|
||||
{
|
||||
gBattlescriptCurrInstr = BattleScript_MoveUsedIsAsleep;
|
||||
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;
|
||||
@ -12256,8 +12255,7 @@ void ClearPursuitValues(void)
|
||||
{
|
||||
for (u32 i = 0; i < gBattlersCount; i++)
|
||||
gBattleStruct->battlerState[i].pursuitTarget = FALSE;
|
||||
gBattleStruct->pursuitSwitchByMove = FALSE;
|
||||
gBattleStruct->pursuitStoredSwitch = 0;
|
||||
gBattleStruct->pursuitStoredSwitch = PARTY_SIZE;
|
||||
}
|
||||
|
||||
void ClearPursuitValuesIfSet(u32 battler)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user