FIX #4; Champion lock at start of turn

This commit is contained in:
2024-05-07 18:46:24 +02:00
parent db549aac49
commit 082e07c48b
+4 -1
View File
@@ -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!")