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
|
Basic_Enemy_Attack: ; Direction to face in E. Result in BC (XY), Direction in D
LD A, E
OR $10
LD D, A
; For Future Attacks: This is an attack that would freeze the bunny and move -4 x the entity
; LD A, $01
; LD $mem_bunny_status, A
; LD A, $02
; LD $mem_bunny_flags, A
; LD A, $mem_bunny_direction
; AND $07
; LD $mem_bunny_direction, A
; CALL =Fix_Bunny_screen
; LD A, B
; SUB $04
; LD B, A
LD A, $mem_bunny_health
SUB $01
JR C, =.health_underflow_fix
DAA
LD $mem_bunny_health, A
JR =.Skip_health_underflow_fix
.health_underflow_fix:
LD A, $00
LD $mem_bunny_health, A
.Skip_health_underflow_fix:
RET
|