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_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):
def __init__(self):
super().__init__("Mezzogiorno di Fuoco", "🔥")
@ -67,7 +73,7 @@ def get_all_events():
Benedizione(),
Maledizione(),
# CittaFantasma(),
# CorsaAllOro(),
CorsaAllOro(),
# IDalton(),
IlDottore(),
IlReverendo(),

View File

@ -259,6 +259,8 @@ class Game:
self.players[self.turn].notify_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)]
def play_turn(self):
@ -300,6 +302,9 @@ class Game:
def next_turn(self):
if self.shutting_down: return
if len(self.players) > 0:
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()