This commit is contained in:
2026-03-18 21:00:28 +01:00
parent 20de591cb6
commit 46b7a12d30
3 changed files with 17 additions and 3 deletions

View File

@@ -456,9 +456,18 @@ async def run_ai_turn(game_id: str):
for slot in range(BOARD_SIZE):
slot_card = player.board[slot]
if slot_card is not None and player.energy + slot_card.cost <= most_expensive_in_hand:
if ws:
try:
await ws.send_json({
"type": "sacrifice_animation",
"instance_id": slot_card.instance_id,
})
except Exception:
pass
await asyncio.sleep(0.65)
action_sacrifice(state, slot)
await send_state(state)
await asyncio.sleep(1)
await asyncio.sleep(0.35)
play_order = list(range(BOARD_SIZE))
random.shuffle(play_order)