🐐
This commit is contained in:
@@ -262,6 +262,7 @@ WIKIDATA_INSTANCE_TYPE_MAP = {
|
||||
"Q47913": CardType.organization, # intelligence agency
|
||||
"Q35535": CardType.organization, # police
|
||||
"Q4830453": CardType.organization, # business
|
||||
"Q4671277": CardType.organization, # academic institution
|
||||
}
|
||||
|
||||
import asyncio
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user