From e67ddaf2d8aad828de2a993385071aebfb183340 Mon Sep 17 00:00:00 2001 From: Astatin Date: Thu, 13 Mar 2025 19:51:48 +0900 Subject: Change the collision update from frame 5 to 9 for it to happen after basic attack execution --- definitions.gbasm | 5 +++-- enemiesattacks/freeze.gbasm | 4 ++++ entity/actions.gbasm | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/definitions.gbasm b/definitions.gbasm index 154384a..760751c 100644 --- a/definitions.gbasm +++ b/definitions.gbasm @@ -22,11 +22,12 @@ .DEFINE mem_button_direction ($c002) .DEFINE mem_button_action ($c003) .DEFINE mem_moving_animation_step ($c004) -; frame 0 (or 1 ?): movement can be initiated when with button actions +; frame 0: movement can be initiated when with button actions ; frame 2: applying bunny attack damages ; frame 3: checking entities health and death if 0 ; frame 4: new entity spawn -; frame 5: entity collision map is being updated +; frame 9: entity collision map is being updated +; frame 8: attack is executed on the enemies if it was predicted in frame "-1" ; frame 15: movement is ended and coordinates are updated .DEFINE mem_bunny_sprite ($cb00) diff --git a/enemiesattacks/freeze.gbasm b/enemiesattacks/freeze.gbasm index c8abd78..eb27a48 100644 --- a/enemiesattacks/freeze.gbasm +++ b/enemiesattacks/freeze.gbasm @@ -25,6 +25,10 @@ Freeze_Enemy_Attack: ; Direction to face in E. Result in BC (XY), Direction in D LD $mem_bunny_predicted_x, A LD A, $mem_bunny_y LD $mem_bunny_predicted_y, A + + LD A, $00 + LD $mem_entity_being_attacked_low, A + CALL =Fix_Bunny_screen LD A, $04 LD $mem_bunny_status_clear_turn_counter, A diff --git a/entity/actions.gbasm b/entity/actions.gbasm index ebbfb18..5168d42 100644 --- a/entity/actions.gbasm +++ b/entity/actions.gbasm @@ -1,6 +1,6 @@ Entities_Actions: LD A, $mem_moving_animation_step - CP $05 + CP $09 JR NZ, =.Action_Functions CALL =Reset_Entities_Collision_Map -- cgit v1.2.3-70-g09d2