Adds Toxic Chain's effect
This commit is contained in:
parent
6dc8b82e92
commit
a49c988b89
1 changed files with 16 additions and 0 deletions
|
@ -5799,6 +5799,22 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
|
|||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_TOXIC_CHAIN:
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& IsBattlerAlive(gBattlerTarget)
|
||||
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
|
||||
&& CanBePoisoned(gBattlerAttacker, gBattlerTarget)
|
||||
&& TARGET_TURN_DAMAGED // Need to actually hit the target
|
||||
&& (Random() % 3) == 0)
|
||||
{
|
||||
gBattleScripting.moveEffect = MOVE_EFFECT_TOXIC;
|
||||
PREPARE_ABILITY_BUFFER(gBattleTextBuff1, gLastUsedAbility);
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_AbilityStatusEffect;
|
||||
gHitMarker |= HITMARKER_STATUS_ABILITY_EFFECT;
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_STENCH:
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& IsBattlerAlive(gBattlerTarget)
|
||||
|
|
Loading…
Reference in a new issue