Miniera abbandonata

This commit is contained in:
Alberto Xamin 2020-12-20 13:06:10 +01:00
parent 20e4ea5196
commit 6aafd48e16
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2
2 changed files with 17 additions and 8 deletions

View File

@ -42,8 +42,12 @@ class Deck:
return None
def pick_and_scrap(self) -> cs.Card:
card = self.cards.pop(0)
self.scrap_pile.append(card)
if self.game.check_event(ce.MinieraAbbandonata) and len(self.scrap_pile) > 0:
card = self.draw_from_scrap_pile()
self.put_on_top(card)
else:
card = self.cards.pop(0)
self.scrap_pile.append(card)
if len(self.cards) == 0:
self.reshuffle()
self.game.notify_scrap_pile()
@ -53,6 +57,8 @@ class Deck:
self.cards.insert(0, card)
def draw(self) -> cs.Card:
if self.game.check_event(ce.MinieraAbbandonata) and len(self.scrap_pile) > 0:
return self.draw_from_scrap_pile()
card = self.cards.pop(0)
if len(self.cards) == 0:
self.reshuffle()
@ -74,5 +80,8 @@ class Deck:
def scrap(self, card: cs.Card):
if card.usable_next_turn:
card.can_be_used_now = False
self.scrap_pile.append(card)
self.game.notify_scrap_pile()
if self.game.check_event(ce.MinieraAbbandonata):
self.put_on_top(card)
else:
self.scrap_pile.append(card)
self.game.notify_scrap_pile()

View File

@ -54,7 +54,7 @@ class LiquoreForte(CardEvent):
self.desc_eng = "Players can skip drawing to regain 1 HP (click on the event card to use)"
class MinieraAbbandonata(CardEvent):
def __init__(self):#TODO
def __init__(self):
super().__init__("Miniera Abbandonata", "")
self.desc = "I giocatori pescano dagli scarti e scartano in cima al mazzo"
self.desc_eng = "Players draw from the discarded pile and discard to the deck"
@ -62,11 +62,11 @@ class MinieraAbbandonata(CardEvent):
class PerUnPugnoDiCarte(CardEvent):
def __init__(self):#TODO
super().__init__("Per Un Pugno Di Carte", "🎴")
self.desc = "Il giocatore subisce tanti bang quante carte ha in mano"
self.desc = "Nel suo turno giocatore subisce tanti bang quante carte ha in mano"
self.desc_eng = "On his turn the player is target of as many Bang as how many cards he has in his hand"
class Peyote(CardEvent):
def __init__(self):#TODO
def __init__(self):
super().__init__("Peyote", "🌵")
self.desc = "Invece che pescare il giocatore prova a indovinare il colore del seme, se lo indovina continua"
self.desc_eng = "Instead of drawing, the player tries to guess the color of the suit, if he's right he repeats"
@ -105,7 +105,7 @@ def get_all_events():
Lazo(),
LeggeDelWest(),
LiquoreForte(),
# MinieraAbbandonata(),
MinieraAbbandonata(),
# PerUnPugnoDiCarte(),
Peyote(),
# Ranch(),