aboutsummaryrefslogtreecommitdiff
path: root/entity
diff options
context:
space:
mode:
authorAstatin <[email protected]>2025-05-02 14:07:14 +0200
committerAstatin <[email protected]>2025-05-02 14:07:14 +0200
commitf51e51ebdfc71a429fd1a4ef359f9d8ce52fb1d2 (patch)
tree6a9fbde65c0ac14e4b87c463343187d1428ecd2f /entity
parente322573ecc55a821506e5313e3b9994e1b58745e (diff)
Fix fimshes and give them a placeholder items to drop
Diffstat (limited to 'entity')
-rw-r--r--entity/cat.gbasm5
-rw-r--r--entity/fimsh.gbasm52
-rw-r--r--entity/fox.gbasm5
-rw-r--r--entity/list.gbasm2
-rw-r--r--entity/penguin.gbasm5
-rw-r--r--entity/utils.gbasm4
6 files changed, 14 insertions, 59 deletions
diff --git a/entity/cat.gbasm b/entity/cat.gbasm
index 23d1510..837dd39 100644
--- a/entity/cat.gbasm
+++ b/entity/cat.gbasm
@@ -36,7 +36,10 @@ Cat_Turn:
PUSH DE
LD D, $6C
LD E, $04
- CALL =Spawn_object
+ CALL =RNG_Step
+ AND $03
+ CP $00
+ CALL Z, =Spawn_object
POP DE
JP =.Skip_turn
diff --git a/entity/fimsh.gbasm b/entity/fimsh.gbasm
index 9368c2b..49c4f53 100644
--- a/entity/fimsh.gbasm
+++ b/entity/fimsh.gbasm
@@ -35,7 +35,7 @@ Fimsh_Turn:
PUSH DE
LD D, $6C
- LD E, $05
+ LD E, $07
CALL =Spawn_object
POP DE
@@ -82,56 +82,6 @@ Fimsh_Turn:
BIT 0, (HL)
JP NZ, =.Skip_turn
- .Start_action_or_movement:
- LD A, $mem_moving_animation_step
- CP $00
- JP NZ, =.Start_action_or_movement.end
-
- LD A, L
- AND $f0
- OR $07
- LD L, A
- RES 3, (HL)
-
- LD A, $mem_bunny_status
- CP $01
- JR Z, =.Run_away
- CP $04
- JR Z, =.Run_away
-
- .Try_Freeze_Attack:
- LD A, L
- AND $f0
- ADD $09
- LD L, A
- XOR A
- CP (HL)
- JR Z, =.Try_Walking
-
- CALL =Check_player_next_to
- LD A, E
- CP $00
- JR Z, =.Try_Walking
- CALL =Freeze_Enemy_Attack
-
- LD A, L
- AND $f0
- ADD $09
- LD L, A
-
- DEC (HL)
-
- JR =.Start_action_or_movement.end
-
- .Run_away:
- CALL =Walking_Away
-
- JR =.Start_action_or_movement.end
-
- .Try_Walking:
- CALL =Walking
- .Start_action_or_movement.end:
-
.End_movement:
LD A, $mem_moving_animation_step
CP $0f
diff --git a/entity/fox.gbasm b/entity/fox.gbasm
index 33eb51a..ce6da24 100644
--- a/entity/fox.gbasm
+++ b/entity/fox.gbasm
@@ -36,7 +36,10 @@ Fox_Turn:
PUSH DE
LD D, $6C
LD E, $06
- CALL =Spawn_object
+ CALL =RNG_Step
+ AND $03
+ CP $00
+ CALL Z, =Spawn_object
POP DE
JP NZ, =.Skip_turn
diff --git a/entity/list.gbasm b/entity/list.gbasm
index d32ce95..ac2908a 100644
--- a/entity/list.gbasm
+++ b/entity/list.gbasm
@@ -127,7 +127,7 @@ Entity_list:
.DB $06
; Interaction Jump Table index
- .DB $02
+ .DB $01
; Starting health
.DB $01
diff --git a/entity/penguin.gbasm b/entity/penguin.gbasm
index a317301..401c28a 100644
--- a/entity/penguin.gbasm
+++ b/entity/penguin.gbasm
@@ -36,7 +36,10 @@ Penguin_Turn:
PUSH DE
LD D, $6C
LD E, $05
- CALL =Spawn_object
+ CALL =RNG_Step
+ AND $03
+ CP $00
+ CALL Z, =Spawn_object
POP DE
JP =.Skip_turn
diff --git a/entity/utils.gbasm b/entity/utils.gbasm
index 592b473..944faa8 100644
--- a/entity/utils.gbasm
+++ b/entity/utils.gbasm
@@ -108,10 +108,6 @@ Entity_idx_to_entity_list_ptr: ; loaded idx in A, return in BC
RET
Spawn_object: ; Texture in D, XY in BC, jump table thingy in E
- CALL =RNG_Step
- AND $03
- CP $00
- JR NZ, =.skip_spawn_loot
PUSH HL
CALL =Find_Free_Object_slot
LD A, $80