diff --git a/config.py b/config.py index 9ba8b3d..767f2da 100644 --- a/config.py +++ b/config.py @@ -22,9 +22,9 @@ BONUS_TIME_MIN_RANDOM_TIME = 5 BONUS_TIME_MAX_RANDOM_TIME = 15 BONUS_TIME_ACTIVATION_PROBABILITY = 0.1 ## Special config -RED_SPECIAL = SpecialEvent.replay +RED_SPECIAL = SpecialEvent.extra_ball RED_SPECIAL_TIMES = 1 -ORANGE_SPECIAL = SpecialEvent.points +ORANGE_SPECIAL = SpecialEvent.bonus_time ORANGE_SPECIAL_BANK = ORANGE_SPECIAL_BANK_OPTIONS["BOTH"] ## Tech config LOG_FILE="flippr-game.log" diff --git a/events/SpecialEvent.py b/events/SpecialEvent.py index 7bb1477..a4def82 100644 --- a/events/SpecialEvent.py +++ b/events/SpecialEvent.py @@ -2,9 +2,9 @@ from Event import Event class SpecialEvent(Event): - def __init__(self, name, playerState): + def __init__(self, name, gameState): super().__init__(name) - self.gameState = playerState + self.gameState = gameState def replay(self): self.gameState.currentPlayer.setReplayBall() @@ -15,5 +15,8 @@ class SpecialEvent(Event): def points(self): self.gameState.currentPlayer.addPoints(self.points) + def bonus_time(self): + self.gameState.currentPlayer.addBonusTimeSecond() + def super_bonus(self): pass diff --git a/events/TunnelEvent.py b/events/TunnelEvent.py index 1f87ca4..2dff496 100644 --- a/events/TunnelEvent.py +++ b/events/TunnelEvent.py @@ -1,9 +1,9 @@ from Event import Event class TunnelEvent(Event): - def __init__(self, playerState): + def __init__(self, gameState): super().__init__("Tunnel Event") - self.gameState = playerState + self.gameState = gameState def trigger(self, target): super().trigger(target)