il reverendo

This commit is contained in:
Alberto Xamin 2020-12-23 14:57:33 +01:00
parent c0a2481b00
commit 8f18bee200
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2
3 changed files with 11 additions and 2 deletions

View File

@ -209,6 +209,9 @@ class Birra(Card):
self.desc_eng = "Play this card to regain a life point. You cannot heal more than your character's maximum limit. If you are about to lose your last life point, you can also play this card on your opponent's turn. Beer no longer takes effect if there are only two players"
def play_card(self, player, against, _with=None):
import bang.expansions.high_noon.card_events as ceh
if player.game.check_event(ceh.IlReverendo):
return False
if len(player.game.players) != 2:
super().play_card(player, against=against)
player.lives = min(player.lives+1, player.max_lives)

View File

@ -31,6 +31,12 @@ class IlTreno(CardEvent):
self.desc = "I giocatori pescano 1 carta extra"
self.desc_eng = ""
class IlReverendo(CardEvent):
def __init__(self):
super().__init__("Il Reverendo", "⛪️")
self.desc = "Non si possono giocare birre"
self.desc_eng = ""
class MezzogiornoDiFuoco(CardEvent):
def __init__(self):
super().__init__("Mezzogiorno di Fuoco", "🔥")
@ -45,7 +51,7 @@ def get_all_events():
# CorsaAllOro(),
# IDalton(),
# IlDottore(),
# IlReverendo(),
IlReverendo(),
IlTreno(),
Sbornia(),
# Seromone(),

View File

@ -229,7 +229,7 @@ class Player:
self.draw('')
elif self.pending_action == PendingAction.PLAY:
equippables = [c for c in self.hand if (c.is_equipment or c.usable_next_turn) and not isinstance(c, cs.Prigione) and not any([type(c) == type(x) for x in self.equipment])]
misc = [c for c in self.hand if (isinstance(c, cs.WellsFargo) and not c.usable_next_turn) or isinstance(c, cs.Diligenza) or isinstance(c, cs.Emporio) or (isinstance(c, cs.Birra) and self.lives < self.max_lives)]
misc = [c for c in self.hand if (isinstance(c, cs.WellsFargo) and not c.usable_next_turn) or isinstance(c, cs.Diligenza) or isinstance(c, cs.Emporio) or (isinstance(c, cs.Birra) and self.lives < self.max_lives and not self.game.check_event(ceh.IlReverendo))]
need_target = [c for c in self.hand if c.need_target and c.can_be_used_now and not (c.need_with and len(self.hand) < 2) and not (self.has_played_bang and not (any([isinstance(c, cs.Volcanic) for c in self.equipment]) and not self.game.check_event(ce.Lazo))) and not ( isinstance(c, cs.Prigione) and self.game.check_event(ce.IlGiudice))]
green_cards = [c for c in self.equipment if not self.game.check_event(ce.Lazo) and not isinstance(c, cs.Mancato) and c.usable_next_turn and c.can_be_used_now]
if len(equippables) > 0 and not self.game.check_event(ce.IlGiudice):