mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Fixed Explosion & Intimidate's 'interaction'
This commit is contained in:
parent
c72274ee98
commit
773e7f0de2
@ -2037,6 +2037,11 @@
|
||||
various \battler, VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES
|
||||
.endm
|
||||
|
||||
.macro jumpifnovalidtargets ptr:req
|
||||
various BS_ATTACKER, VARIOUS_JUMP_IF_NO_VALID_TARGETS
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
@ helpful macros
|
||||
.macro setstatchanger stat:req, stages:req, down:req
|
||||
setbyte sSTATCHANGER, \stat | \stages << 3 | \down << 7
|
||||
|
@ -8479,6 +8479,7 @@ BattleScript_TryAdrenalineOrbRet:
|
||||
return
|
||||
|
||||
BattleScript_IntimidateActivates::
|
||||
jumpifnovalidtargets BattleScript_IntimidateEnd
|
||||
showabilitypopup BS_ATTACKER
|
||||
pause B_WAIT_TIME_LONG
|
||||
destroyabilitypopup
|
||||
|
@ -254,6 +254,7 @@
|
||||
#define VARIOUS_TRY_WIND_RIDER_POWER 163
|
||||
#define VARIOUS_ACTIVATE_WEATHER_CHANGE_ABILITIES 164
|
||||
#define VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES 165
|
||||
#define VARIOUS_JUMP_IF_NO_VALID_TARGETS 166
|
||||
|
||||
// Cmd_manipulatedamage
|
||||
#define DMG_CHANGE_SIGN 0
|
||||
|
@ -10214,6 +10214,21 @@ static void Cmd_various(void)
|
||||
gBattlescriptCurrInstr += 3;
|
||||
AbilityBattleEffects(ABILITYEFFECT_ON_TERRAIN, gActiveBattler, 0, 0, 0);
|
||||
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])
|
||||
|
||||
gBattlescriptCurrInstr += 3;
|
||||
|
Loading…
Reference in New Issue
Block a user