Fixed Explosion & Intimidate's 'interaction'
This commit is contained in:
parent
c72274ee98
commit
773e7f0de2
4 changed files with 22 additions and 0 deletions
|
@ -2037,6 +2037,11 @@
|
||||||
various \battler, VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES
|
various \battler, VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
.macro jumpifnovalidtargets ptr:req
|
||||||
|
various BS_ATTACKER, VARIOUS_JUMP_IF_NO_VALID_TARGETS
|
||||||
|
.4byte \ptr
|
||||||
|
.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
|
||||||
|
|
|
@ -8479,6 +8479,7 @@ 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
|
||||||
|
|
|
@ -254,6 +254,7 @@
|
||||||
#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
|
||||||
|
|
||||||
// Cmd_manipulatedamage
|
// Cmd_manipulatedamage
|
||||||
#define DMG_CHANGE_SIGN 0
|
#define DMG_CHANGE_SIGN 0
|
||||||
|
|
|
@ -10214,6 +10214,21 @@ static void Cmd_various(void)
|
||||||
gBattlescriptCurrInstr += 3;
|
gBattlescriptCurrInstr += 3;
|
||||||
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:
|
||||||
|
{
|
||||||
|
u32 count = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < gBattlersCount; i++)
|
||||||
|
{
|
||||||
|
if (GetBattlerSide(i) != GetBattlerSide(gBattlerAttacker) && IsBattlerAlive(i))
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
if (count == 0)
|
||||||
|
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
|
||||||
|
else
|
||||||
|
gBattlescriptCurrInstr += 7;
|
||||||
|
}
|
||||||
|
return;
|
||||||
} // End of switch (gBattlescriptCurrInstr[2])
|
} // End of switch (gBattlescriptCurrInstr[2])
|
||||||
|
|
||||||
gBattlescriptCurrInstr += 3;
|
gBattlescriptCurrInstr += 3;
|
||||||
|
|
Loading…
Reference in a new issue