-
Notifications
You must be signed in to change notification settings - Fork 210
/
Copy pathhealinglight.asm
62 lines (58 loc) · 968 Bytes
/
healinglight.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
BattleCommand_healweather:
farcall CheckFullHP
jr z, .full
ldh a, [hBattleTurn]
and a
ld a, [wBattleMonType1]
ld b, a
ld a, [wBattleMonType2]
ld c, a
jr z, .got_types
ld a, [wEnemyMonType1]
ld b, a
ld a, [wEnemyMonType2]
ld c, a
.got_types
ld a, b
cp GRASS
jr z, .synthesis_anim
ld a, c
cp GRASS
jr z, .synthesis_anim
ld a, [wTimeOfDay]
cp NITE
jr nc, .moonlight_anim
xor a ; Morning Sun anim
jr .got_anim
.moonlight_anim
ld a, $1
jr .got_anim
.synthesis_anim
ld a, $2
.got_anim
ld [wKickCounter], a
call AnimateCurrentMove
call GetWeatherAfterUserUmbrella
cp WEATHER_SUN
jr z, .goodheal
and a
jr nz, .badheal
call GetHalfMaxHP
jr .amount_ok
.badheal
call GetQuarterMaxHP
jr .amount_ok
.goodheal
call GetThirdMaxHP
sla c
rl b
.amount_ok
farcall RestoreHP
call UpdateUserInParty
; 'regained health!'
ld hl, RegainedHealthText
jmp StdBattleTextbox
.full
call AnimateFailedMove
ld hl, HPIsFullText
jmp StdBattleTextbox