From 082e07c48bdad0d2bbed19ce5601976c1bec89ff Mon Sep 17 00:00:00 2001 From: legonzaur Date: Tue, 7 May 2024 18:46:24 +0200 Subject: [PATCH] FIX #4; Champion lock at start of turn --- src/model/turn.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/model/turn.py b/src/model/turn.py index c8a5efc..e309463 100644 --- a/src/model/turn.py +++ b/src/model/turn.py @@ -189,7 +189,7 @@ class Turn(Serializable): async def start_turn(self) -> None: for c in self.player.board: if c.card_type == CardType.CHAMPION: - await self.lock_card(str(c.card_id)) + await self.lock_card(str(c.uuid)) def serialize(self): data = super().serialize() | { @@ -211,6 +211,9 @@ class Turn(Serializable): return await self.player.put_on_stack_from_discard(str(card.uuid)) async def stack_next_card_bought_check(self, card: Card) -> bool: + if card.cost is None: + print("You cannot buy a card that doesn't has any cost") + return False if self.gold_reserve < card.cost: print("Not enough gold to buy card!")