mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Implemented Toxic Debris' effect
This commit is contained in:
parent
aa051dab02
commit
a961980e0f
@ -7135,6 +7135,15 @@ BattleScript_WindPowerActivates::
|
||||
BattleScript_WindPowerActivates_Ret:
|
||||
return
|
||||
|
||||
BattleScript_ToxicDebrisActivates::
|
||||
call BattleScript_AbilityPopUp
|
||||
pause B_WAIT_TIME_SHORT
|
||||
settoxicspikes BattleScript_ToxicDebrisRet
|
||||
printstring STRINGID_POISONSPIKESSCATTERED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_ToxicDebrisRet:
|
||||
return
|
||||
|
||||
BattleScript_PerishSongCountGoesDown::
|
||||
printstring STRINGID_PKMNPERISHCOUNTFELL
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
|
@ -447,6 +447,7 @@ extern const u8 BattleScript_RuinAbilityActivates[];
|
||||
extern const u8 BattleScript_CudChewActivates[];
|
||||
extern const u8 BattleScript_SupremeOverlordActivates[];
|
||||
extern const u8 BattleScript_CostarActivates[];
|
||||
extern const u8 BattleScript_ToxicDebrisActivates[];
|
||||
|
||||
// zmoves
|
||||
extern const u8 BattleScript_ZMoveActivateDamaging[];
|
||||
|
@ -5911,6 +5911,20 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_TOXIC_DEBRIS:
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
|
||||
&& IS_MOVE_PHYSICAL(gCurrentMove)
|
||||
&& TARGET_TURN_DAMAGED
|
||||
&& !(gSideStatuses[gBattlerAttacker] & SIDE_STATUS_TOXIC_SPIKES)
|
||||
&& IsBattlerAlive(gBattlerTarget))
|
||||
{
|
||||
gBattlerTarget = gBattlerAttacker;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_ToxicDebrisActivates;
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker
|
||||
|
Loading…
Reference in New Issue
Block a user