2014-05-22 22:13:20 +00:00
|
|
|
LeechSeedEffect_: ; 2bea9 (a:7ea9)
|
|
|
|
callab MoveHitTest
|
2015-04-08 10:15:08 +00:00
|
|
|
ld a, [W_MOVEMISSED]
|
2014-05-22 22:13:20 +00:00
|
|
|
and a
|
2015-04-08 10:15:08 +00:00
|
|
|
jr nz, .moveMissed
|
|
|
|
ld hl, W_ENEMYBATTSTATUS2
|
|
|
|
ld de, wEnemyMonType1
|
|
|
|
ld a, [H_WHOSETURN]
|
2014-05-22 22:13:20 +00:00
|
|
|
and a
|
2015-04-08 10:15:08 +00:00
|
|
|
jr z, .leechSeedEffect
|
|
|
|
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-04-08 10:15:08 +00:00
|
|
|
jr z, .moveMissed
|
2014-05-22 22:13:20 +00:00
|
|
|
inc de
|
|
|
|
ld a, [de]
|
|
|
|
cp GRASS
|
2015-04-08 10:15:08 +00:00
|
|
|
jr z, .moveMissed
|
2015-02-03 19:51:53 +00:00
|
|
|
bit Seeded, [hl]
|
2015-04-08 10:15:08 +00:00
|
|
|
jr nz, .moveMissed
|
2015-02-03 19:51:53 +00:00
|
|
|
set Seeded, [hl]
|
2015-02-08 00:24:16 +00:00
|
|
|
callab PlayCurrentMoveAnimation
|
2014-05-22 22:13:20 +00:00
|
|
|
ld hl, WasSeededText ; $7ef2
|
|
|
|
jp PrintText
|
2015-04-08 10:15:08 +00:00
|
|
|
.moveMissed
|
2014-05-22 22:13:20 +00:00
|
|
|
ld c, $32
|
|
|
|
call DelayFrames
|
|
|
|
ld hl, EvadedAttackText ; $7ef7
|
|
|
|
jp PrintText
|
|
|
|
|
|
|
|
WasSeededText: ; 2bef2 (a:7ef2)
|
|
|
|
TX_FAR _WasSeededText
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
EvadedAttackText: ; 2bef7 (a:7ef7)
|
|
|
|
TX_FAR _EvadedAttackText
|
|
|
|
db "@"
|