Temporary fix for restack_discarded_card not working

This commit is contained in:
2024-05-01 11:10:39 +02:00
parent 09e5d64422
commit 3a6bb5ccfc
2 changed files with 8 additions and 6 deletions
+7 -5
View File
@@ -204,13 +204,15 @@ class Player(Serializable):
await self.notify_update() await self.notify_update()
async def put_on_stack_from_discard(self, card: Card) -> bool: async def put_on_stack_from_discard(self, card_id: str) -> bool:
if card not in self.discard_pile:
card = self.source_card(card_id, self.discard_pile)
if card is not None:
self.stack_pile.append(card)
else:
print("Card not found in discard pile") print("Card not found in discard pile")
return False return
self.discard_pile.remove(card)
self.stack_pile.append(card)
await self.notify_update() await self.notify_update()
return True return True
+1 -1
View File
@@ -280,7 +280,7 @@ class Turn(Serializable):
print("card is not a champion") print("card is not a champion")
return False return False
else: else:
return await self.player.put_on_stack_from_discard(card) return await self.player.put_on_stack_from_discard(str(card.uuid))
async def stack_next_card_bought_check(self, card: Card) -> bool: async def stack_next_card_bought_check(self, card: Card) -> bool: