diff options
author | Astatin <[email protected]> | 2025-02-14 19:16:40 +0900 |
---|---|---|
committer | Astatin <[email protected]> | 2025-02-14 19:16:40 +0900 |
commit | c1ac8f71285f25c2b3baad3f65f91942867076c7 (patch) | |
tree | 6b6c1b6092fbe2fdd9a47825712fb70bf899a3aa | |
parent | cce14a83a5ef7b8bd3e8affa1cf5d52b00329b0a (diff) |
Fix bunny position predictions + add a bunch of ToDo
-rw-r--r-- | TODO | 25 | ||||
-rw-r--r-- | definitions.gbasm | 2 | ||||
-rw-r--r-- | enemiesattacks/freeze.gbasm | 4 | ||||
-rw-r--r-- | entity/bunny.gbasm | 21 | ||||
-rw-r--r-- | map/objects.gbasm | 2 |
5 files changed, 43 insertions, 11 deletions
@@ -1,5 +1,12 @@ +Bugs: + -> Health is not updated on death + -> Penguins freeze can cancel hops but not freezes + -> Foxes can attack even if bunny hopped away + -> Emulator crash with "not implemented: Only XKB keymaps are supported when unfocused (or workspace change maybe ?) + -> There is no way to change direction outside of moving + -> There is no indicator that the max health is 20 + Need to be refactored: - -> Fox is sometimes moving too far when walking thingy -> main is messy and unreadable -> rework mode checks (heatlh update should happen on both dungeon and dead mode) -> general structure is messy (why is Update_Animation_Step in entity/action.gbasm ?? What is even entity/action.gbasm supposed to be ??) @@ -15,12 +22,10 @@ x * Weaker attack on multiple foxes x * Freeze a/multiple fox(es) for X turns * Distance attack (maybe reuse laser of the enemies) - -> Limit attacks uses +x -> Limit attacks uses x -> Spawn enemies in far away rooms when less than X enemies on the map. (Maybe despawn some too) -? -> Remove some health to the bunny (probably to 10 points, maybe max health growing ?) - x -> Add objects to heal -> Add objects get back limited use attacks/learn new attacks @@ -29,10 +34,20 @@ x -> Add attacks for the foxes x -> Add other types of enemies - -> Make the different types of enemies behave different (fleeing/ambush/etc...) + -> Add more enemies & enemy behaviours: +x * Fox with distance limited attack and close unlimited attack +x * Penguin freezing and fleeing when the player is frozen + * Mouse weaker and only close attacks but can move 2x faster + * Cats being normal (only close attacks) + * Fimsh being super rare have a bunch of HP, not do anything but drop super cool objects + * Owls heal the enemies around (different pathfinding where it tries to stay 1 block away from the bnuy?) + cooldown + * Bugs move 2x faster and sacrifice themselves to give the bunny a status (poisoned & taking damages/slower and skipping one of 2 turns) + * Frogs: ? -> Have some enemies drop items + -> Add floor count + a kind of goal (rescuing another bunny/getting a rare item ?) + DEMO -> Allow enemy to join your team after beating/with an item/after completing a quest diff --git a/definitions.gbasm b/definitions.gbasm index 9cec50c..baa72a4 100644 --- a/definitions.gbasm +++ b/definitions.gbasm @@ -114,6 +114,8 @@ .DEFINE mem_bunny_attacks $c030 ; Takes the memory from c030 to c033 .DEFINE mem_current_focused_attack_ep_cost ($c034) +.DEFINE mem_bunny_next_mana_regen ($c035) + .DEFINE mem_next_free_head_lower_bytes ($c6ff) .DEFINE mem_dungeon_generation_heads $c700 ; Takes the memory from c700 to c717 diff --git a/enemiesattacks/freeze.gbasm b/enemiesattacks/freeze.gbasm index 321e924..ba393c8 100644 --- a/enemiesattacks/freeze.gbasm +++ b/enemiesattacks/freeze.gbasm @@ -10,6 +10,10 @@ Freeze_Enemy_Attack: ; Direction to face in E. Result in BC (XY), Direction in D LD A, $mem_bunny_direction AND $07 LD $mem_bunny_direction, A + LD A, $mem_bunny_x + LD $mem_bunny_predicted_x, A + LD A, $mem_bunny_y + LD $mem_bunny_predicted_y, A CALL =Fix_Bunny_screen LD A, $04 LD $mem_bunny_status_clear_turn_counter, A diff --git a/entity/bunny.gbasm b/entity/bunny.gbasm index 40cd047..c9bd141 100644 --- a/entity/bunny.gbasm +++ b/entity/bunny.gbasm @@ -92,16 +92,11 @@ Move_Bunny: BIT 3, D JR Z, =.Start_action_or_movement.end - PUSH BC - LD A, $01 - .ADD_A_TO_DIRECTION_BC LD A, B LD $mem_bunny_predicted_x, A LD A, C LD $mem_bunny_predicted_y, A - POP BC - JR =.Start_action_or_movement.end .Start_action_or_movement.test_action: @@ -241,6 +236,22 @@ Move_Bunny: LD A, $mem_bunny_y LD $mem_bunny_predicted_y, A + LD A, $mem_bunny_next_mana_regen + DEC A + AND $07 + LD $mem_bunny_next_mana_regen, A + CP $00 + JR NZ, =.End_movement.skip_mana_regen + LD A, $mem_bunny_mana + INC A + DAA + JR C, =.End_movement.skip_mana_regen + CP $30 + JR NC, =.End_movement.skip_mana_regen + LD $mem_bunny_mana, A + + .End_movement.skip_mana_regen: + .End_movement.end: .Middle_movement_doublespeed_viewport_update: diff --git a/map/objects.gbasm b/map/objects.gbasm index db49487..edf276f 100644 --- a/map/objects.gbasm +++ b/map/objects.gbasm @@ -192,7 +192,7 @@ Restore_EP_Action: CALL =Try_Launch_Animation POP BC - ; LD (HL), $00 + LD (HL), $00 RET |