add sean mallory

This commit is contained in:
Alberto Xamin 2020-12-13 16:39:14 +01:00
parent 0ccaa3751d
commit 54ffc93565
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2
4 changed files with 14 additions and 4 deletions

View File

@ -57,6 +57,13 @@ class ApacheKid(Character):
self.desc_eng = "Cards of diamonds ♦️ played against him, do no have effect (doesn't work in duels)."
self.icon = '♦️'
class SeanMallory(Character):
def __init__(self):
super().__init__("Sean Mallory", max_lives=3)
self.desc = "Quando finisce il suo turno può tenere fino a 10 carte in mano"
self.desc_eng = "He can keep up to 10 cards in his hand when ending the turn."
self.icon = '🍟'
def all_characters() -> List[Character]:
return [
PixiePete(),
@ -67,6 +74,7 @@ def all_characters() -> List[Character]:
BillNoface(),
MollyStark(),
ApacheKid(),
SeanMallory(),
]
#Apache Kid: il suo effetto non conta nei duelli

View File

@ -233,7 +233,8 @@ class Player:
self.play_card(len(self.hand)+i, against=target['name'])
has_played = True
break
if not has_played and len(self.hand) > self.lives:
maxcards = self.lives if not isinstance(self.character, chd.SeanMallory) else 10
if not has_played and len(self.hand) > maxcards:
self.scrap(0)
else:
self.end_turn()
@ -640,7 +641,8 @@ class Player:
def end_turn(self, forced=False):
if not self.is_my_turn:
return
if len(self.hand) > self.max_lives and not forced:
maxcards = self.lives if not isinstance(self.character, chd.SeanMallory) else 10
if len(self.hand) > maxcards and not forced:
print(
f"I {self.name} have to many cards in my hand and I can't end the turn")
elif self.pending_action == PendingAction.PLAY or forced:

View File

@ -50,7 +50,7 @@ class Vice(Role):
class Outlaw(Role):
def __init__(self, alternative_goal=None, alternative_goal_eng=None):
super().__init__("Fuorilegge", "Elimina lo Sceriffo!")
self.goal_eng = "Kill the sSheriff!"
self.goal_eng = "Kill the Sheriff!"
if alternative_goal:
self.goal = alternative_goal
self.goal_eng = alternative_goal_eng

View File

@ -189,7 +189,7 @@ export default {
return x[this.pending_action]
},
canEndTurn() {
return (this.pending_action == 2 && this.hand.length <= this.lives)
return (this.pending_action == 2 && this.hand.length <= (this.character.name === "Sean Mallory"?10:this.lives))
},
respondCards() {
let cc = [{