This commit is contained in:
Jonas Zeunert
2022-09-03 14:57:07 +02:00
parent db8075016c
commit 7c0937d329
3 changed files with 32 additions and 3 deletions

View File

@@ -15,6 +15,7 @@ from lamps.LampGroup import TUNNEL_SCORE_LAMPS
from lamps.LampGroup import BONUS_MULTIPLIER_LAMPS
from lamps.LampGroup import BONUS_LAMPS
from lamps.LampGroup import PLAYER_LAMPS
from lamps.LampGroup import ORANGE_SPECIAL_LAMPS
from Sound import Sound
@@ -57,6 +58,7 @@ class PlayerState:
redSpecial = 0
redSpecialLit = False
orangeSpecial = 0
orangeSpecialLeft = False
orangeSpecialRight = False
orangeSpecialLit = False
@@ -229,6 +231,13 @@ class PlayerState:
self.orangeSpecialLit = self.orangeSpecialRight and self.orangeSpecialLeft
if self.orangeSpecialLit:
self.orangeSpecial += 1
ORANGE_SPECIAL_LAMPS.activateNext()
if self.orangeSpecial > 2:
self.orangeSpecial = 0
ORANGE_SPECIAL_LAMPS.deactivate()
Sound(21).play()
time.sleep(0.9)
Sound(20).play()
@@ -244,7 +253,7 @@ class PlayerState:
if self.redSpecial == config.RED_SPECIAL_TIMES:
Sound(21).play()
time.sleep(0.9)
Sound(20).play()
Sound(23).play()
self.redSpecialLit = True
Lamp("Special Red").activate()
@@ -313,6 +322,9 @@ class PlayerState:
self.bonusTime -= 1
self.printSpecial()
if self.bonus_time == 5:
Sound(28).play()
if self.bonusTime == 0:
self.stopReplayBall()
return
@@ -370,6 +382,8 @@ class PlayerState:
self.upperPlayfieldTimer.start()
def updatePlayfieldTime(self):
if self.upperPlayfieldTime == 5:
Sound(28).play()
if self.upperPlayfieldTime in [0, 5, 10, 20]:
UPPER_PLAYFIELD_TIME_LAMPS.deactivateCurrent()

View File

@@ -6,11 +6,20 @@ import config
class OrangeSpecialEvent(SpecialEvent):
def __init__(self, gameState):
super().__init__("Orange Special Event", gameState)
self.points = 200000
self.points = 100000
def trigger(self, target):
if self.gameState.currentPlayer.orangeSpecial == 0:
self.points = 100000
elif self.gameState.currentPlayer.orangeSpecial == 1:
self.points = 200000
elif self.gameState.currentPlayer.orangeSpecial == 2:
self.points = 300000
super().trigger(target)
if self.gameState.currentPlayer.orangeSpecialLit:
config.ORANGE_SPECIAL(self)
#config.ORANGE_SPECIAL(self)
self.bonus_time()
self.gameState.currentPlayer.resetOrangeSpecial()

View File

@@ -132,3 +132,9 @@ BONUS_LAMPS = LampGroup([
Lamp("Bonus 19000"),
Lamp("Bonus 20000")
])
ORANGE_SPECIAL_LAMPS = LampGroup([
Lamp("Special 100000 Points"),
Lamp("Special 200000 Points"),
Lamp("Special 300000 Points")
])