aboutsummaryrefslogtreecommitdiff
path: root/entity
diff options
context:
space:
mode:
authorAstatin <[email protected]>2025-03-07 18:07:40 +0900
committerAstatin <[email protected]>2025-03-07 18:07:40 +0900
commit329953d54d3d07b517dcff391a40229acd89bd59 (patch)
tree811917d6b3284cb696fb2a943e7062039b5f0e42 /entity
parent3649b73eca599701db818dbbf470b1b17e660083 (diff)
Add floor counter + a lot of little bug fixes
Diffstat (limited to 'entity')
-rw-r--r--entity/fox.gbasm7
-rw-r--r--entity/init.gbasm13
2 files changed, 16 insertions, 4 deletions
diff --git a/entity/fox.gbasm b/entity/fox.gbasm
index 5e225ec..89df17e 100644
--- a/entity/fox.gbasm
+++ b/entity/fox.gbasm
@@ -149,9 +149,10 @@ Fox_Turn:
JR Z, =.End_movement.end
CALL =Laser_sight_check
- LD A, E
- CP $00
- JR Z, =.laser_sight_check_fail
+ LD A, D
+ AND $07
+ CP E
+ JR NZ, =.laser_sight_check_fail
CALL =Laser_Enemy_Attack
diff --git a/entity/init.gbasm b/entity/init.gbasm
index 76c96b4..970607b 100644
--- a/entity/init.gbasm
+++ b/entity/init.gbasm
@@ -74,8 +74,19 @@ Initialize_Entities:
LD A, $00
LD (HL+), A
+ INC HL ; skip health
+
+ LD A, $00
+
+ ; Flags
+ LD (HL+), A
+
+ ; Status
+ LD (HL+), A
+
LD A, L
- ADD $0a
+ AND $f0
+ ADD $10
LD L, A
LD A, $00