Archived
Temporary fix for restack_discarded_card not working
This commit is contained in:
+7
-5
@@ -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
@@ -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:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user