fix scrap cards of the dead players

with Vulture Sam
This commit is contained in:
GM 2023-01-20 11:48:07 +00:00
parent 89dfb533b5
commit ce0611cf8d

View File

@ -226,14 +226,10 @@ class Player:
self.end_turn(forced=True) self.end_turn(forced=True)
elif self.is_ghost and not self.game.check_event(ceh.CittaFantasma): elif self.is_ghost and not self.game.check_event(ceh.CittaFantasma):
self.is_ghost = False self.is_ghost = False
#mi assicuro che non i morti non abbiano carte for i in range(len(self.hand)):
if self.is_dead and not self.is_ghost: self.game.deck.scrap(self.hand.pop(), True)
if len(self.hand): for i in range(len(self.equipment)):
for i in range(len(self.hand)): self.game.deck.scrap(self.equipment.pop(), True)
self.game.deck.scrap(self.hand.pop(), True)
if len(self.equipment):
for i in range(len(self.equipment)):
self.game.deck.scrap(self.equipment.pop(), True)
if self.is_ghost: self.lives = 0 if self.is_ghost: self.lives = 0
if self.pending_action == PendingAction.DRAW and self.game.check_event(ce.Peyote): if self.pending_action == PendingAction.DRAW and self.game.check_event(ce.Peyote):
self.available_cards = [{ self.available_cards = [{
@ -762,7 +758,8 @@ class Player:
target.notify_self() target.notify_self()
if self.choose_action == 'steal': if self.choose_action == 'steal':
card.reset_card() card.reset_card()
self.hand.append(card) if card.name != "Fantasma" or self.name != target.name: #se si uccide facendo panico su fantasma la carta non gli viene messa in mano
self.hand.append(card)
else: else:
self.game.deck.scrap(card, True) self.game.deck.scrap(card, True)
if self.event_type != 'rissa' or len(self.rissa_targets) == 0: if self.event_type != 'rissa' or len(self.rissa_targets) == 0: