fix regolamento di conti

This commit is contained in:
Alberto Xamin 2023-04-09 10:24:44 +01:00
parent 1ebc4b4bd0
commit c81a806a6b
No known key found for this signature in database
GPG Key ID: 5ABFCD8A22EA6F5D
2 changed files with 12 additions and 9 deletions

View File

@ -108,17 +108,20 @@ class RegolamentoDiConti(CardEvent):
def on_clicked(self, game, player):
super().on_clicked(game, player)
if len(player.hand) > 0:
if not player.has_played_bang and any(
if (
len(player.hand) > 0
and not player.has_played_bang
and any(
(
player.get_sight() >= p["dist"]
for p in game.get_visible_players(player)
)
):
player.available_cards = player.hand.copy()
player.pending_action = players.PendingAction.CHOOSE
player.choose_text = "choose_play_as_bang"
player.notify_self()
)
):
player.available_cards = player.hand.copy()
player.pending_action = players.PendingAction.CHOOSE
player.choose_text = "choose_play_as_bang"
player.notify_self()
class Sacagaway(CardEvent):

View File

@ -2075,8 +2075,8 @@ class Player:
)
if (
self.character.check(self.game, chars.CalamityJanet)
and cs.Bang(0, 0).name not in self.expected_response
):
or self.game.check_event(cew.RegolamentoDiConti)
) and cs.Bang(0, 0).name not in self.expected_response:
self.expected_response.append(cs.Bang(0, 0).name)
if self.character.check(self.game, chw.BigSpencer):
self.expected_response = []