corsa all'oro

This commit is contained in:
Alberto Xamin 2020-12-23 16:14:38 +01:00
parent d6a84bbb88
commit 2b5e2dd128
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2
2 changed files with 13 additions and 2 deletions

View File

@ -56,6 +56,12 @@ class Sparatoria(CardEvent):
self.desc = "Il limite di bang è 2 invece che 1!" self.desc = "Il limite di bang è 2 invece che 1!"
self.desc_eng = "" self.desc_eng = ""
class CorsaAllOro(CardEvent):
def __init__(self):
super().__init__("Corsa All'Oro", "‼️")
self.desc = "Si gioca in senso antiorario!"
self.desc_eng = ""
class MezzogiornoDiFuoco(CardEvent): class MezzogiornoDiFuoco(CardEvent):
def __init__(self): def __init__(self):
super().__init__("Mezzogiorno di Fuoco", "🔥") super().__init__("Mezzogiorno di Fuoco", "🔥")
@ -67,7 +73,7 @@ def get_all_events():
Benedizione(), Benedizione(),
Maledizione(), Maledizione(),
# CittaFantasma(), # CittaFantasma(),
# CorsaAllOro(), CorsaAllOro(),
# IDalton(), # IDalton(),
IlDottore(), IlDottore(),
IlReverendo(), IlReverendo(),

View File

@ -259,6 +259,8 @@ class Game:
self.players[self.turn].notify_self() self.players[self.turn].notify_self()
def next_player(self): def next_player(self):
if self.check_event(ceh.CorsaAllOro):
return self.players[(self.turn - 1) % len(self.players)]
return self.players[(self.turn + 1) % len(self.players)] return self.players[(self.turn + 1) % len(self.players)]
def play_turn(self): def play_turn(self):
@ -300,7 +302,10 @@ class Game:
def next_turn(self): def next_turn(self):
if self.shutting_down: return if self.shutting_down: return
if len(self.players) > 0: if len(self.players) > 0:
self.turn = (self.turn + 1) % len(self.players) if self.check_event(ceh.CorsaAllOro):
self.turn = (self.turn - 1) % len(self.players)
else:
self.turn = (self.turn + 1) % len(self.players)
self.play_turn() self.play_turn()
def notify_event_card(self): def notify_event_card(self):