Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pret
GitHub Repository: pret/pokered
Path: blob/master/engine/battle/move_effects/leech_seed.asm
1271 views
1
LeechSeedEffect_:
2
callfar MoveHitTest
3
ld a, [wMoveMissed]
4
and a
5
jr nz, .moveMissed
6
ld hl, wEnemyBattleStatus2
7
ld de, wEnemyMonType1
8
ldh a, [hWhoseTurn]
9
and a
10
jr z, .leechSeedEffect
11
ld hl, wPlayerBattleStatus2
12
ld de, wBattleMonType1
13
.leechSeedEffect
14
; miss if the target is grass-type or already seeded
15
ld a, [de]
16
cp GRASS
17
jr z, .moveMissed
18
inc de
19
ld a, [de]
20
cp GRASS
21
jr z, .moveMissed
22
bit SEEDED, [hl]
23
jr nz, .moveMissed
24
set SEEDED, [hl]
25
callfar PlayCurrentMoveAnimation
26
ld hl, WasSeededText
27
jp PrintText
28
.moveMissed
29
ld c, 50
30
call DelayFrames
31
ld hl, EvadedAttackText
32
jp PrintText
33
34
WasSeededText:
35
text_far _WasSeededText
36
text_end
37
38
EvadedAttackText:
39
text_far _EvadedAttackText
40
text_end
41
42