remove unneeded VARIOUS_JUMP_IF_NO_VALID_TARGETS

This commit is contained in:
DizzyEggg 2023-02-22 09:28:12 +01:00
parent bca47a0891
commit 31138455de
4 changed files with 3 additions and 26 deletions

View File

@ -2049,11 +2049,6 @@
various \battler, VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES various \battler, VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES
.endm .endm
.macro jumpifnovalidtargets jumpInstr:req
various BS_ATTACKER, VARIOUS_JUMP_IF_NO_VALID_TARGETS
.4byte \jumpInstr
.endm
@ helpful macros @ helpful macros
.macro setstatchanger stat:req, stages:req, down:req .macro setstatchanger stat:req, stages:req, down:req
setbyte sSTATCHANGER, \stat | \stages << 3 | \down << 7 setbyte sSTATCHANGER, \stat | \stages << 3 | \down << 7

View File

@ -8573,7 +8573,6 @@ BattleScript_TryAdrenalineOrbRet:
return return
BattleScript_IntimidateActivates:: BattleScript_IntimidateActivates::
jumpifnovalidtargets BattleScript_IntimidateEnd
showabilitypopup BS_ATTACKER showabilitypopup BS_ATTACKER
pause B_WAIT_TIME_LONG pause B_WAIT_TIME_LONG
destroyabilitypopup destroyabilitypopup

View File

@ -255,10 +255,9 @@
#define VARIOUS_TRY_WIND_RIDER_POWER 163 #define VARIOUS_TRY_WIND_RIDER_POWER 163
#define VARIOUS_ACTIVATE_WEATHER_CHANGE_ABILITIES 164 #define VARIOUS_ACTIVATE_WEATHER_CHANGE_ABILITIES 164
#define VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES 165 #define VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES 165
#define VARIOUS_JUMP_IF_NO_VALID_TARGETS 166 #define VARIOUS_JUMP_IF_EMERGENCY_EXITED 166
#define VARIOUS_JUMP_IF_EMERGENCY_EXITED 167 #define VARIOUS_STORE_HEALING_WISH 167
#define VARIOUS_STORE_HEALING_WISH 168 #define VARIOUS_HIT_SWITCH_TARGET_FAILED 168
#define VARIOUS_HIT_SWITCH_TARGET_FAILED 169
// Cmd_manipulatedamage // Cmd_manipulatedamage
#define DMG_CHANGE_SIGN 0 #define DMG_CHANGE_SIGN 0

View File

@ -11068,22 +11068,6 @@ static void Cmd_various(void)
AbilityBattleEffects(ABILITYEFFECT_ON_TERRAIN, gActiveBattler, 0, 0, 0); AbilityBattleEffects(ABILITYEFFECT_ON_TERRAIN, gActiveBattler, 0, 0, 0);
return; return;
} }
case VARIOUS_JUMP_IF_NO_VALID_TARGETS:
{
VARIOUS_ARGS(const u8 *jumpInstr);
u32 count = 0;
for (i = 0; i < gBattlersCount; i++)
{
if (GetBattlerSide(i) != GetBattlerSide(gBattlerAttacker) && IsBattlerAlive(i))
count++;
}
if (count == 0)
gBattlescriptCurrInstr = cmd->jumpInstr;
else
gBattlescriptCurrInstr = cmd->nextInstr;
return;
}
case VARIOUS_JUMP_IF_EMERGENCY_EXITED: case VARIOUS_JUMP_IF_EMERGENCY_EXITED:
{ {
VARIOUS_ARGS(const u8 *jumpInstr); VARIOUS_ARGS(const u8 *jumpInstr);