diff --git a/src/model/card_behaviour.py b/src/model/card_behaviour.py index 910bdc2..06f7dca 100644 --- a/src/model/card_behaviour.py +++ b/src/model/card_behaviour.py @@ -93,7 +93,7 @@ async def effect_restack_discarded(_effect: Effect, turn: "Turn", target: str): async def effect_stack_next_action(_effect: Effect, turn: "Turn", target: str): - return await turn.buy_card(target, turn.player.buy_on_stack) + return await turn.buy_card(target, turn.player.stack_next_action_bought_check) async def effect_stack_next_card(_effect: Effect, turn: "Turn", target: str): diff --git a/src/model/turn.py b/src/model/turn.py index 9671e82..6203f1f 100644 --- a/src/model/turn.py +++ b/src/model/turn.py @@ -230,6 +230,13 @@ class Turn(Serializable): else: return await self.player.put_on_stack_from_discard(str(card.uuid)) + async def stack_next_action_bought_check(self, card: Card) -> bool: + if card.card_type != CardType.ACTION: + print("You can only buy actions with this effect!") + return False + + return await self.stack_next_card_bought_check(card) + 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")