Implemented Toxic Debris' effect

This commit is contained in:
LOuroboros 2022-12-06 05:14:05 -03:00
parent aa051dab02
commit a961980e0f
3 changed files with 24 additions and 0 deletions

View File

@ -7135,6 +7135,15 @@ BattleScript_WindPowerActivates::
BattleScript_WindPowerActivates_Ret: BattleScript_WindPowerActivates_Ret:
return 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:: BattleScript_PerishSongCountGoesDown::
printstring STRINGID_PKMNPERISHCOUNTFELL printstring STRINGID_PKMNPERISHCOUNTFELL
waitmessage B_WAIT_TIME_LONG waitmessage B_WAIT_TIME_LONG

View File

@ -447,6 +447,7 @@ extern const u8 BattleScript_RuinAbilityActivates[];
extern const u8 BattleScript_CudChewActivates[]; extern const u8 BattleScript_CudChewActivates[];
extern const u8 BattleScript_SupremeOverlordActivates[]; extern const u8 BattleScript_SupremeOverlordActivates[];
extern const u8 BattleScript_CostarActivates[]; extern const u8 BattleScript_CostarActivates[];
extern const u8 BattleScript_ToxicDebrisActivates[];
// zmoves // zmoves
extern const u8 BattleScript_ZMoveActivateDamaging[]; extern const u8 BattleScript_ZMoveActivateDamaging[];

View File

@ -5911,6 +5911,20 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
effect++; effect++;
} }
break; 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; break;
case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker