Get rid of duplicate bs command jumpiftype

This commit is contained in:
DizzyEggg 2018-07-14 12:02:29 +02:00
parent 1afbcda042
commit 2293d1ddbc
4 changed files with 10 additions and 15 deletions

View File

@ -356,11 +356,8 @@
.4byte \param0
.endm
.macro jumpiftype2 bank, type, param2
.macro jumpiftype2
.byte 0x42
.byte \bank
.byte \type
.4byte \param2
.endm
.macro jumpifabilitypresent ability, param1

View File

@ -1508,7 +1508,7 @@ BattleScript_EffectMinimize::
goto BattleScript_EffectStatUpAfterAtkCanceler
BattleScript_EffectCurse::
jumpiftype2 BS_ATTACKER, TYPE_GHOST, BattleScript_GhostCurse
jumpiftype BS_ATTACKER, TYPE_GHOST, BattleScript_GhostCurse
attackcanceler
attackstring
ppreduce

View File

@ -502,7 +502,10 @@ static void Task_ClearBitWhenSpecialAnimDone(u8 taskId)
// Great function to include newly added moves that don't have animation yet.
bool8 IsMoveWithoutAnimation(u16 moveId, u8 animationTurn)
{
return FALSE;
if (moveId >= (MOVES_COUNT_GEN3 - 1))
return TRUE;
else
return FALSE;
}
bool8 mplay_80342A4(u8 battlerId)

View File

@ -156,7 +156,7 @@ static void atk3E_end2(void);
static void atk3F_end3(void);
static void atk40_jumpifaffectedbyprotect(void);
static void atk41_call(void);
static void atk42_jumpiftype2(void);
static void atk42_nop(void);
static void atk43_jumpifabilitypresent(void);
static void atk44_endselectionscript(void);
static void atk45_playanimation(void);
@ -408,7 +408,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
atk3F_end3,
atk40_jumpifaffectedbyprotect,
atk41_call,
atk42_jumpiftype2,
atk42_nop,
atk43_jumpifabilitypresent,
atk44_endselectionscript,
atk45_playanimation,
@ -4265,14 +4265,9 @@ static void atk41_call(void)
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
}
static void atk42_jumpiftype2(void)
static void atk42_nop(void)
{
u8 battlerId = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
if (gBattlescriptCurrInstr[2] == gBattleMons[battlerId].type1 || gBattlescriptCurrInstr[2] == gBattleMons[battlerId].type2)
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
else
gBattlescriptCurrInstr += 7;
gBattlescriptCurrInstr++;
}
static void atk43_jumpifabilitypresent(void)