2016-06-12 00:24:04 +00:00
|
|
|
LeechSeedEffect_:
|
2014-05-22 22:13:20 +00:00
|
|
|
callab MoveHitTest
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wMoveMissed]
|
2014-05-22 22:13:20 +00:00
|
|
|
and a
|
2015-04-08 10:15:08 +00:00
|
|
|
jr nz, .moveMissed
|
2015-08-31 02:38:41 +00:00
|
|
|
ld hl, wEnemyBattleStatus2
|
2015-06-11 22:41:33 +00:00
|
|
|
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
|
2015-08-31 02:38:41 +00:00
|
|
|
ld hl, wPlayerBattleStatus2
|
2015-06-11 22:41:33 +00:00
|
|
|
ld de, wBattleMonType1
|
2015-04-08 10:15:08 +00:00
|
|
|
.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
|
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
|
2015-07-03 19:37:53 +00:00
|
|
|
ld hl, WasSeededText
|
2014-05-22 22:13:20 +00:00
|
|
|
jp PrintText
|
2015-04-08 10:15:08 +00:00
|
|
|
.moveMissed
|
2015-07-03 19:37:53 +00:00
|
|
|
ld c, 50
|
2014-05-22 22:13:20 +00:00
|
|
|
call DelayFrames
|
2015-07-03 19:37:53 +00:00
|
|
|
ld hl, EvadedAttackText
|
2014-05-22 22:13:20 +00:00
|
|
|
jp PrintText
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
WasSeededText:
|
2014-05-22 22:13:20 +00:00
|
|
|
TX_FAR _WasSeededText
|
|
|
|
db "@"
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
EvadedAttackText:
|
2014-05-22 22:13:20 +00:00
|
|
|
TX_FAR _EvadedAttackText
|
|
|
|
db "@"
|