added nuova identità event
Co-authored-by: Alberto Xamin <alberto@xamin.it>
This commit is contained in:
parent
104daf2e4d
commit
baa31a8892
@ -75,7 +75,7 @@ class Manette(CardEvent):
|
||||
|
||||
class NuovaIdentita(CardEvent):
|
||||
def __init__(self):
|
||||
super().__init__("Nuova Identità", "🕶")
|
||||
super().__init__("Nuova Identita", "🕶")
|
||||
#self.desc = "All'inizio del proprio turno, ogni giocatore potrà decidere se sostituire il suo personaggio attuale con quello era stato proposto ad inizio partita, se lo fa riparte con 2 punti vita"
|
||||
#self.desc_eng = ""
|
||||
|
||||
@ -111,7 +111,7 @@ def get_all_events():
|
||||
Sete(),
|
||||
Sparatoria(),
|
||||
# Manette(),
|
||||
# NuovaIdentita(),
|
||||
NuovaIdentita(),
|
||||
]
|
||||
random.shuffle(cards)
|
||||
for c in cards:
|
||||
|
@ -64,6 +64,7 @@ class Player:
|
||||
self.is_dead = False
|
||||
self.death_turn = 0
|
||||
self.is_ghost = False
|
||||
self.not_chosen_character = None
|
||||
|
||||
def reset(self):
|
||||
self.hand: cs.Card = []
|
||||
@ -358,6 +359,10 @@ class Player:
|
||||
self.choose_text = 'choose_fratelli_di_sangue'
|
||||
self.pending_action = PendingAction.CHOOSE
|
||||
self.is_giving_life = True
|
||||
elif self.game.check_event(ceh.NuovaIdentita) and self.not_chosen_character != None and not again:
|
||||
self.available_cards = [self.character, self.not_chosen_character]
|
||||
self.choose_text = 'choose_nuova_identita'
|
||||
self.pending_action = PendingAction.CHOOSE
|
||||
elif not self.game.check_event(ce.Lazo) and any([isinstance(c, cs.Dinamite) or isinstance(c, cs.Prigione) for c in self.equipment]):
|
||||
self.is_giving_life = False
|
||||
self.pending_action = PendingAction.PICK
|
||||
@ -595,6 +600,14 @@ class Player:
|
||||
while self.target_p == self.name or len(self.game.players[self.game.players_map[self.target_p]].hand) + len(self.game.players[self.game.players_map[self.target_p]].equipment) == 0:
|
||||
self.target_p = self.game.players[(self.game.players_map[self.target_p]+1)%len(self.game.players)].name
|
||||
self.notify_self()
|
||||
elif self.game.check_event(ceh.NuovaIdentita) and self.choose_text == 'choose_nuova_identita':
|
||||
if card_index == 1: # the other character
|
||||
self.character = self.not_chosen_character
|
||||
self.real_character = self.character
|
||||
self.max_lives = self.character.max_lives + self.role.health_mod
|
||||
self.lives = 2
|
||||
self.sio.emit('chat_message', room=self.game.name, data=f'_choose_character|{self.name}|{self.character.name}')
|
||||
self.play_turn(again = True)
|
||||
elif self.is_giving_life and self.game.check_event(ce.FratelliDiSangue):
|
||||
try:
|
||||
player = self.game.get_player_named(self.available_cards[card_index]['name'])
|
||||
|
@ -46,6 +46,7 @@
|
||||
"choose_cecchino": "Choose who to shoot",
|
||||
"choose_rimbalzo_player": "Choose the target of the bang",
|
||||
"choose_rimbalzo_card": "Choose the card to discard the bang to",
|
||||
"choose_nuova_identita": "Choose if you want to keep your current character, or if you want to change it and start from 2 HP",
|
||||
"emporio_others": "{0} is choosing which card to get from the General Store",
|
||||
"you_died": "YOU DIED",
|
||||
"spectate": "SPECTATE",
|
||||
@ -535,6 +536,14 @@
|
||||
"name": "Thirst",
|
||||
"desc": "Players only draw 1 card at the start of their turn"
|
||||
},
|
||||
"Nuova Identita": {
|
||||
"name": "New Identity",
|
||||
"desc": ""
|
||||
},
|
||||
"Manette": {
|
||||
"name": "Handcuffs",
|
||||
"desc": ""
|
||||
},
|
||||
"Mezzogiorno di Fuoco":{
|
||||
"name": "High Noon",
|
||||
"desc": "Every player loses 1 HP when their turn starts"
|
||||
|
@ -46,6 +46,7 @@
|
||||
"choose_cecchino": "Scegli contro chi sparare",
|
||||
"choose_rimbalzo_player": "Scegli contro chi scartare il bang",
|
||||
"choose_rimbalzo_card": "Scegli contro che carta scartare il bang",
|
||||
"choose_nuova_identita": "Scegli se rimanere con il tuo personaggio corrente o se cambiarlo e ripartire con 2 vite.",
|
||||
"emporio_others": "{0} sta scegliendo che carta prendere dall'emporio",
|
||||
"you_died": "SEI MORTO",
|
||||
"spectate": "SPETTATORE",
|
||||
@ -535,6 +536,14 @@
|
||||
"name": "Sbornia",
|
||||
"desc": "I personaggi perdono le loro abilit\u00e0 speciali"
|
||||
},
|
||||
"Nuova Identita": {
|
||||
"name": "Nuova Identit\u00e0",
|
||||
"desc": "All'inizio del proprio turno, ogni giocatore potrà decidere se sostituire il suo personaggio attuale con quello era stato proposto ad inizio partita, se lo fa riparte con 2 punti vita"
|
||||
},
|
||||
"Manette": {
|
||||
"name": "Manette",
|
||||
"desc": "Dopo aver pescato in fase 1, il giocatore di turno dichiara un seme: potrà usare solamente carte di quel seme nel suo turno"
|
||||
},
|
||||
"Mezzogiorno di Fuoco":{
|
||||
"name": "Mezzogiorno di Fuoco",
|
||||
"desc": "Ogni giocatore perde 1 punto vita all'inizio del turno"
|
||||
|
Loading…
Reference in New Issue
Block a user