pokered/engine/battle/moveEffects/leech_seed_effect.asm

41 lines
756 B
NASM
Raw Normal View History

2014-05-22 22:13:20 +00:00
LeechSeedEffect_: ; 2bea9 (a:7ea9)
callab MoveHitTest
2015-06-11 22:41:33 +00:00
ld a, [W_MOVEMISSED]
2014-05-22 22:13:20 +00:00
and a
jr nz, .moveMissed
2015-06-11 22:41:33 +00:00
ld hl, W_ENEMYBATTSTATUS2
ld de, wEnemyMonType1
ld a, [H_WHOSETURN]
2014-05-22 22:13:20 +00:00
and a
jr z, .leechSeedEffect
2015-06-11 22:41:33 +00:00
ld hl, W_PLAYERBATTSTATUS2
ld de, wBattleMonType1
.leechSeedEffect
; miss if the target is grass-type or already seeded
2014-05-22 22:13:20 +00:00
ld a, [de]
cp GRASS
2015-06-11 22:41:33 +00:00
jr z, .moveMissed
2014-05-22 22:13:20 +00:00
inc de
ld a, [de]
cp GRASS
jr z, .moveMissed
bit Seeded, [hl]
jr nz, .moveMissed
set Seeded, [hl]
2015-02-08 00:24:16 +00:00
callab PlayCurrentMoveAnimation
ld hl, WasSeededText
2014-05-22 22:13:20 +00:00
jp PrintText
.moveMissed
ld c, 50
2014-05-22 22:13:20 +00:00
call DelayFrames
ld hl, EvadedAttackText
2014-05-22 22:13:20 +00:00
jp PrintText
WasSeededText: ; 2bef2 (a:7ef2)
TX_FAR _WasSeededText
db "@"
EvadedAttackText: ; 2bef7 (a:7ef7)
TX_FAR _EvadedAttackText
db "@"