From a846ccc0cc20fe49b5ee07e252b370dc005b38cd Mon Sep 17 00:00:00 2001 From: Astatin Date: Fri, 11 Apr 2025 16:20:31 +0200 Subject: Make hop the only default attack and make cats drop heal --- entity/cat.gbasm | 36 ++++++++++++++++++++++++++++++++++++ entity/list.gbasm | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) (limited to 'entity') diff --git a/entity/cat.gbasm b/entity/cat.gbasm index 35d0b0c..1ddaac0 100644 --- a/entity/cat.gbasm +++ b/entity/cat.gbasm @@ -32,6 +32,42 @@ Cat_Turn: LD A, $mem_enemies_alive_count DEC A LD $mem_enemies_alive_count, A + + CALL =RNG_Step + AND $07 + CP $00 + JR NZ, =.skip_spawn_loot + PUSH HL + CALL =Find_Free_Object_slot + LD A, $80 + CP L + JR Z, =.skip_spawn_loot_pop_hl + + LD A, $6C + LD (HL+), A + LD A, B + LD (HL+), A + LD A, C + LD (HL+), A + CALL =Check_other_object_collision + CP $00 + JR NZ, =.skip_spawn_loot_pop_hl + LD A, L + AND $f8 + ADD $03 + LD L, A + LD (HL), $04 + LD A, L + SRA A + SRA A + SRA A + SUB $01 + LD $mem_object_load_counter, A + + .skip_spawn_loot_pop_hl: + POP HL + .skip_spawn_loot: + JP NZ, =.Skip_turn .Health_check.end: diff --git a/entity/list.gbasm b/entity/list.gbasm index 0e2ba86..762f43f 100644 --- a/entity/list.gbasm +++ b/entity/list.gbasm @@ -19,7 +19,7 @@ Entity_list: .DB $05 ; Spawning rate (2 lsb) - .DB 0b11 + .DB 0b10 .PADTO =.Fox+8 -- cgit v1.2.3-70-g09d2