some fixes

This commit is contained in:
Alberto Xamin 2021-01-01 13:52:44 +01:00
parent 3a6077b910
commit 3b310751f7
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2
2 changed files with 3 additions and 7 deletions

View File

@ -408,7 +408,7 @@ class Game:
player.attacker.hand.append(self.deck.draw(True))
player.attacker.notify_self()
print(f'player {player.name} died')
if (self.waiting_for > 0):
if self.waiting_for > 0 and player.pending_action == pl.PendingAction.RESPOND:
self.responders_did_respond_resume_turn()
if player.is_dead: return
@ -486,6 +486,8 @@ class Game:
herb[0].notify_self()
self.is_handling_death = False
if corpse.is_my_turn:
corpse.is_my_turn = False
corpse.notify_self()
self.next_turn()
def reset(self):

View File

@ -406,8 +406,6 @@ class Player:
self.hand.append(self.game.deck.draw_from_scrap_pile())
if not self.game.check_event(ceh.Sete):
self.hand.append(self.game.deck.draw())
if self.game.check_event(ceh.IlTreno) or (self.is_ghost and self.game.ceck_event(ceh.CittaFantasma)):
self.hand.append(self.game.deck.draw())
self.sio.emit('chat_message', room=self.game.name,
data=f'_draw_from_scrap|{self.name}')
elif type(pile) == str and pile != self.name and pile in self.game.players_map and self.character.check(self.game, chars.JesseJones) and len(self.game.get_player_named(pile).hand) > 0:
@ -418,15 +416,11 @@ class Player:
data=f'_draw_from_player|{self.name}|{pile}')
if not self.game.check_event(ceh.Sete):
self.hand.append(self.game.deck.draw())
if self.game.check_event(ceh.IlTreno) or (self.is_ghost and self.game.ceck_event(ceh.CittaFantasma)):
self.hand.append(self.game.deck.draw())
elif self.character.check(self.game, chd.BillNoface):
self.hand.append(self.game.deck.draw())
if not self.game.check_event(ceh.Sete):
for i in range(self.max_lives-self.lives):
self.hand.append(self.game.deck.draw())
if self.game.check_event(ceh.IlTreno):
self.hand.append(self.game.deck.draw())
else:
for i in range(2):
card: cs.Card = self.game.deck.draw()