The player's turn is now ended after a move
authorLukas Krickl <lukas@krickl.dev>
Mon, 18 Nov 2024 17:48:26 +0000 (18:48 +0100)
committerLukas Krickl <lukas@krickl.dev>
Mon, 18 Nov 2024 17:48:26 +0000 (18:48 +0100)
for now now other actor is handling turns so the player can only move
  once

src/player.s

index e9fc1fdd21e5025ffd357235f543055d1adde6d1..e5f8d71388e8c7a87c7d95f07e8c1455540b18f3 100644 (file)
@@ -80,9 +80,16 @@ player_update:
   ; play move animation 
   ; and skip inputs if it is still 
   ; ongoing
+  ld a, [end_turn]
+  cp a, 0
+  jr z, @no_anim REL ; do not play anim if turn is not ended
+
   call anim_move
   cp a, 0
   jp nz, @skip_input
+  call who_next ; next actor's turn
+  jp nz, @skip_input
+@no_anim:
 
   ; set collision mask
   ld a, RF_WALL