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,12 +108,15 @@ class RegolamentoDiConti(CardEvent):
def on_clicked(self, game, player): def on_clicked(self, game, player):
super().on_clicked(game, player) super().on_clicked(game, player)
if len(player.hand) > 0: if (
if not player.has_played_bang and any( len(player.hand) > 0
and not player.has_played_bang
and any(
( (
player.get_sight() >= p["dist"] player.get_sight() >= p["dist"]
for p in game.get_visible_players(player) for p in game.get_visible_players(player)
) )
)
): ):
player.available_cards = player.hand.copy() player.available_cards = player.hand.copy()
player.pending_action = players.PendingAction.CHOOSE player.pending_action = players.PendingAction.CHOOSE

View File

@ -2075,8 +2075,8 @@ class Player:
) )
if ( if (
self.character.check(self.game, chars.CalamityJanet) 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) self.expected_response.append(cs.Bang(0, 0).name)
if self.character.check(self.game, chw.BigSpencer): if self.character.check(self.game, chw.BigSpencer):
self.expected_response = [] self.expected_response = []