fix sbornia and Sean Mallory
This commit is contained in:
parent
a1edf476d5
commit
6cf24fcff7
@ -109,7 +109,7 @@ class Player:
|
|||||||
|
|
||||||
def set_role(self, role: r.Role):
|
def set_role(self, role: r.Role):
|
||||||
self.role = role
|
self.role = role
|
||||||
print(f'I {self.name} am a {role.name}, my goal is "{role.goal}"')
|
print(f'{self.name}: I am a {role.name}, my goal is "{role.goal}"')
|
||||||
self.sio.emit('role', room=self.sid, data=json.dumps(
|
self.sio.emit('role', room=self.sid, data=json.dumps(
|
||||||
role, default=lambda o: o.__dict__))
|
role, default=lambda o: o.__dict__))
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ class Player:
|
|||||||
x for x in self.available_characters if x.name == character)
|
x for x in self.available_characters if x.name == character)
|
||||||
self.real_character = self.character
|
self.real_character = self.character
|
||||||
self.available_characters = []
|
self.available_characters = []
|
||||||
print(f'I {self.name} chose character {self.character.name}')
|
print(f'{self.name}: I chose character {self.character.name}')
|
||||||
self.sio.emit('chat_message', room=self.game.name,
|
self.sio.emit('chat_message', room=self.game.name,
|
||||||
data=f'_did_choose_character|{self.name}')
|
data=f'_did_choose_character|{self.name}')
|
||||||
self.game.notify_character_selection()
|
self.game.notify_character_selection()
|
||||||
@ -143,7 +143,7 @@ class Player:
|
|||||||
|
|
||||||
def set_available_character(self, available):
|
def set_available_character(self, available):
|
||||||
self.available_characters = available
|
self.available_characters = available
|
||||||
print(f'I {self.name} have to choose between {available}')
|
print(f'{self.name}: I have to choose between {available}')
|
||||||
if not self.is_bot:
|
if not self.is_bot:
|
||||||
self.sio.emit('characters', room=self.sid, data=json.dumps(
|
self.sio.emit('characters', room=self.sid, data=json.dumps(
|
||||||
available, default=lambda o: o.__dict__))
|
available, default=lambda o: o.__dict__))
|
||||||
@ -322,7 +322,7 @@ class Player:
|
|||||||
self.can_play_vendetta = can_play_vendetta
|
self.can_play_vendetta = can_play_vendetta
|
||||||
self.sio.emit('chat_message', room=self.game.name,
|
self.sio.emit('chat_message', room=self.game.name,
|
||||||
data=f'_turn|{self.name}')
|
data=f'_turn|{self.name}')
|
||||||
print(f'I {self.name} was notified that it is my turn')
|
print(f'{self.name}: I was notified that it is my turn')
|
||||||
self.was_shot = False
|
self.was_shot = False
|
||||||
self.is_my_turn = True
|
self.is_my_turn = True
|
||||||
self.is_waiting_for_action = True
|
self.is_waiting_for_action = True
|
||||||
@ -973,7 +973,7 @@ class Player:
|
|||||||
maxcards = self.lives if not self.character.check(self.game, chd.SeanMallory) else 10
|
maxcards = self.lives if not self.character.check(self.game, chd.SeanMallory) else 10
|
||||||
if len(self.hand) > maxcards and not forced:
|
if len(self.hand) > maxcards and not forced:
|
||||||
print(
|
print(
|
||||||
f"I {self.name} have to many cards in my hand and I can't end the turn")
|
f"{self.name}: I have to many cards in my hand and I can't end the turn")
|
||||||
elif self.pending_action == PendingAction.PLAY or forced:
|
elif self.pending_action == PendingAction.PLAY or forced:
|
||||||
if not forced and self.game.check_event(ce.Vendetta) and self.can_play_vendetta:
|
if not forced and self.game.check_event(ce.Vendetta) and self.can_play_vendetta:
|
||||||
picked: cs.Card = self.game.deck.pick_and_scrap()
|
picked: cs.Card = self.game.deck.pick_and_scrap()
|
||||||
|
@ -232,7 +232,7 @@ export default {
|
|||||||
return x[this.pending_action]
|
return x[this.pending_action]
|
||||||
},
|
},
|
||||||
canEndTurn() {
|
canEndTurn() {
|
||||||
return (this.pending_action == 2 && this.hand.length <= (this.character.name === "Sean Mallory"?10:this.lives))
|
return (this.pending_action == 2 && this.hand.length <= (this.character.name === "Sean Mallory" && !(this.eventCard && this.eventCard.name == "Sbornia")?10:this.lives))
|
||||||
},
|
},
|
||||||
respondCards() {
|
respondCards() {
|
||||||
let cc = [{
|
let cc = [{
|
||||||
|
Loading…
Reference in New Issue
Block a user