Skip to content

Commit 4c0fad9

Browse files
committed
Shield Dust+Covert Cloak protects against Poison Touch
Non-move sources of flinching was already handled.
1 parent 10eb4d2 commit 4c0fad9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

engine/battle/abilities.asm

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,24 @@ StaticAbility:
834834
AfflictStatusAbility:
835835
ld b, 1
836836
_AfflictStatusAbility:
837+
; Shield Dust+Covert Cloak will protect against attacker's status ability.
838+
inc b
839+
dec b
840+
jr nz, .enemy_ability
841+
call GetOpponentAbility
842+
cp SHIELD_DUST
843+
ret z
844+
845+
push hl
846+
push bc
847+
call GetOpponentItemAfterUnnerve
848+
ld a, b
849+
cp HELD_COVERT_CLOAK
850+
pop bc
851+
pop hl
852+
ret z
853+
854+
.enemy_ability
837855
; Only works 30% of the time.
838856
ld a, 10
839857
call BattleRandomRange

0 commit comments

Comments
 (0)