fix emporio, sermone
This commit is contained in:
parent
96b71ed35e
commit
5762306ab1
@ -203,10 +203,10 @@ class Game:
|
|||||||
def emporio(self):
|
def emporio(self):
|
||||||
pls = self.get_alive_players()
|
pls = self.get_alive_players()
|
||||||
self.available_cards = [self.deck.draw(True) for i in range(len(pls))]
|
self.available_cards = [self.deck.draw(True) for i in range(len(pls))]
|
||||||
pls[self.turn].pending_action = pl.PendingAction.CHOOSE
|
self.players[self.turn].pending_action = pl.PendingAction.CHOOSE
|
||||||
pls[self.turn].choose_text = 'choose_card_to_get'
|
self.players[self.turn].choose_text = 'choose_card_to_get'
|
||||||
pls[self.turn].available_cards = self.available_cards
|
self.players[self.turn].available_cards = self.available_cards
|
||||||
pls[self.turn].notify_self()
|
self.players[self.turn].notify_self()
|
||||||
|
|
||||||
def respond_emporio(self, player, i):
|
def respond_emporio(self, player, i):
|
||||||
player.hand.append(self.available_cards.pop(i))
|
player.hand.append(self.available_cards.pop(i))
|
||||||
@ -269,7 +269,7 @@ class Game:
|
|||||||
|
|
||||||
def play_turn(self):
|
def play_turn(self):
|
||||||
self.incremental_turn += 1
|
self.incremental_turn += 1
|
||||||
if self.players[self.turn].lives <= 0 or self.players[self.turn].is_dead:
|
if self.players[self.turn].is_dead:
|
||||||
pl = sorted(self.get_dead_players(), key=lambda x:x.death_turn)[0]
|
pl = sorted(self.get_dead_players(), key=lambda x:x.death_turn)[0]
|
||||||
if self.check_event(ce.DeadMan) and not self.did_resuscitate_deadman and pl != self.players[self.turn]:
|
if self.check_event(ce.DeadMan) and not self.did_resuscitate_deadman and pl != self.players[self.turn]:
|
||||||
print(f'{self.players[self.turn]} is dead, revive')
|
print(f'{self.players[self.turn]} is dead, revive')
|
||||||
|
@ -702,7 +702,7 @@ class Player:
|
|||||||
if self.character.check(self.game, chars.CalamityJanet) and cs.Bang(0, 0).name not in self.expected_response:
|
if self.character.check(self.game, chars.CalamityJanet) 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)
|
||||||
elif self.character.check(self.game, chd.ElenaFuente):
|
elif self.character.check(self.game, chd.ElenaFuente):
|
||||||
self.expected_response = self.game.deck.all_cards_str
|
self.expected_response = self.game.deck.all_cards_str.copy()
|
||||||
self.on_failed_response_cb = self.take_damage_response
|
self.on_failed_response_cb = self.take_damage_response
|
||||||
self.notify_self()
|
self.notify_self()
|
||||||
|
|
||||||
@ -732,7 +732,7 @@ class Player:
|
|||||||
if self.character.check(self.game, chars.CalamityJanet) and cs.Bang(0, 0).name not in self.expected_response:
|
if self.character.check(self.game, chars.CalamityJanet) 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)
|
||||||
elif self.character.check(self.game, chd.ElenaFuente):
|
elif self.character.check(self.game, chd.ElenaFuente):
|
||||||
self.expected_response = self.game.deck.all_cards_str
|
self.expected_response = self.game.deck.all_cards_str.copy()
|
||||||
self.on_failed_response_cb = self.take_no_damage_response
|
self.on_failed_response_cb = self.take_no_damage_response
|
||||||
self.notify_self()
|
self.notify_self()
|
||||||
|
|
||||||
@ -768,11 +768,11 @@ class Player:
|
|||||||
self.pending_action = PendingAction.RESPOND
|
self.pending_action = PendingAction.RESPOND
|
||||||
self.expected_response = self.game.deck.mancato_cards.copy()
|
self.expected_response = self.game.deck.mancato_cards.copy()
|
||||||
if self.attacker and self.attacker in self.game.get_alive_players() and isinstance(self.attacker.character, chd.BelleStar) or self.game.check_event(ce.Lazo):
|
if self.attacker and self.attacker in self.game.get_alive_players() and isinstance(self.attacker.character, chd.BelleStar) or self.game.check_event(ce.Lazo):
|
||||||
self.expected_response = self.game.deck.mancato_cards_not_green
|
self.expected_response = self.game.deck.mancato_cards_not_green.copy()
|
||||||
elif self.character.check(self.game, chars.CalamityJanet) and cs.Bang(0, 0).name not in self.expected_response:
|
elif self.character.check(self.game, chars.CalamityJanet) 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)
|
||||||
elif self.character.check(self.game, chd.ElenaFuente):
|
elif self.character.check(self.game, chd.ElenaFuente):
|
||||||
self.expected_response = self.game.deck.all_cards_str
|
self.expected_response = self.game.deck.all_cards_str.copy()
|
||||||
if not no_dmg:
|
if not no_dmg:
|
||||||
self.on_failed_response_cb = self.take_damage_response
|
self.on_failed_response_cb = self.take_damage_response
|
||||||
else:
|
else:
|
||||||
@ -808,7 +808,7 @@ class Player:
|
|||||||
|
|
||||||
def get_dueled(self, attacker):
|
def get_dueled(self, attacker):
|
||||||
self.attacker = attacker
|
self.attacker = attacker
|
||||||
if self.game.check_event(ceh.Sermone) or (not self.game.is_competitive and len([c for c in self.hand if isinstance(c, cs.Bang) or (self.character.check(self.game, chars.CalamityJanet) and isinstance(c, cs.Mancato))]) == 0):
|
if (self.game.check_event(ceh.Sermone) and self.is_my_turn) or (not self.game.is_competitive and len([c for c in self.hand if isinstance(c, cs.Bang) or (self.character.check(self.game, chars.CalamityJanet) and isinstance(c, cs.Mancato))]) == 0):
|
||||||
print('Cant defend')
|
print('Cant defend')
|
||||||
self.take_damage_response()
|
self.take_damage_response()
|
||||||
self.game.responders_did_respond_resume_turn(did_lose=True)
|
self.game.responders_did_respond_resume_turn(did_lose=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user