diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-10-11 20:49:56 -0400 |
---|---|---|
committer | GriffinR <griffin.g.richards@gmail.com> | 2021-10-12 01:14:17 -0400 |
commit | b0598b1aef16815272187adf84a999b6f190c8ba (patch) | |
tree | f553592609a866b428822bf72ebf909533e10296 /src/battle_script_commands.c | |
parent | f23e0beebac9aa983620c024d691690fedc4e784 (diff) |
Clean up recorded_battle, add MOVE_IS_PERMANENT
Diffstat (limited to 'src/battle_script_commands.c')
-rw-r--r-- | src/battle_script_commands.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index b564fe680..3e91b64b1 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -1235,8 +1235,7 @@ static void Cmd_ppreduce(void) else gBattleMons[gBattlerAttacker].pp[gCurrMovePos] = 0; - if (!(gBattleMons[gBattlerAttacker].status2 & STATUS2_TRANSFORMED) - && !((gDisableStructs[gBattlerAttacker].mimickedMoves) & gBitTable[gCurrMovePos])) + if (MOVE_IS_PERMANENT(gBattlerAttacker, gCurrMovePos)) { gActiveBattler = gBattlerAttacker; BtlController_EmitSetMonData(0, REQUEST_PPMOVE1_BATTLE + gCurrMovePos, 0, 1, &gBattleMons[gBattlerAttacker].pp[gCurrMovePos]); @@ -5436,17 +5435,14 @@ static void Cmd_yesnoboxlearnmove(void) RemoveMonPPBonus(&gPlayerParty[gBattleStruct->expGetterMonId], movePosition); SetMonMoveSlot(&gPlayerParty[gBattleStruct->expGetterMonId], gMoveToLearn, movePosition); - if (gBattlerPartyIndexes[0] == gBattleStruct->expGetterMonId - && !(gBattleMons[0].status2 & STATUS2_TRANSFORMED) - && !(gDisableStructs[0].mimickedMoves & gBitTable[movePosition])) + if (gBattlerPartyIndexes[0] == gBattleStruct->expGetterMonId && MOVE_IS_PERMANENT(0, movePosition)) { RemoveBattleMonPPBonus(&gBattleMons[0], movePosition); SetBattleMonMoveSlot(&gBattleMons[0], gMoveToLearn, movePosition); } if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && gBattlerPartyIndexes[2] == gBattleStruct->expGetterMonId - && !(gBattleMons[2].status2 & STATUS2_TRANSFORMED) - && !(gDisableStructs[2].mimickedMoves & gBitTable[movePosition])) + && MOVE_IS_PERMANENT(2, movePosition)) { RemoveBattleMonPPBonus(&gBattleMons[2], movePosition); SetBattleMonMoveSlot(&gBattleMons[2], gMoveToLearn, movePosition); @@ -8241,6 +8237,7 @@ static void Cmd_tryspiteppreduce(void) gBattleMons[gBattlerTarget].pp[i] -= ppToDeduct; gActiveBattler = gBattlerTarget; + // if (MOVE_IS_PERMANENT(gActiveBattler, i)), but backwards if (!(gDisableStructs[gActiveBattler].mimickedMoves & gBitTable[i]) && !(gBattleMons[gActiveBattler].status2 & STATUS2_TRANSFORMED)) { |