fu
This commit is contained in:
@@ -15,6 +15,7 @@ from lamps.LampGroup import TUNNEL_SCORE_LAMPS
|
|||||||
from lamps.LampGroup import BONUS_MULTIPLIER_LAMPS
|
from lamps.LampGroup import BONUS_MULTIPLIER_LAMPS
|
||||||
from lamps.LampGroup import BONUS_LAMPS
|
from lamps.LampGroup import BONUS_LAMPS
|
||||||
from lamps.LampGroup import PLAYER_LAMPS
|
from lamps.LampGroup import PLAYER_LAMPS
|
||||||
|
from lamps.LampGroup import ORANGE_SPECIAL_LAMPS
|
||||||
|
|
||||||
from Sound import Sound
|
from Sound import Sound
|
||||||
|
|
||||||
@@ -57,6 +58,7 @@ class PlayerState:
|
|||||||
redSpecial = 0
|
redSpecial = 0
|
||||||
redSpecialLit = False
|
redSpecialLit = False
|
||||||
|
|
||||||
|
orangeSpecial = 0
|
||||||
orangeSpecialLeft = False
|
orangeSpecialLeft = False
|
||||||
orangeSpecialRight = False
|
orangeSpecialRight = False
|
||||||
orangeSpecialLit = False
|
orangeSpecialLit = False
|
||||||
@@ -229,6 +231,13 @@ class PlayerState:
|
|||||||
self.orangeSpecialLit = self.orangeSpecialRight and self.orangeSpecialLeft
|
self.orangeSpecialLit = self.orangeSpecialRight and self.orangeSpecialLeft
|
||||||
|
|
||||||
if self.orangeSpecialLit:
|
if self.orangeSpecialLit:
|
||||||
|
self.orangeSpecial += 1
|
||||||
|
ORANGE_SPECIAL_LAMPS.activateNext()
|
||||||
|
|
||||||
|
if self.orangeSpecial > 2:
|
||||||
|
self.orangeSpecial = 0
|
||||||
|
ORANGE_SPECIAL_LAMPS.deactivate()
|
||||||
|
|
||||||
Sound(21).play()
|
Sound(21).play()
|
||||||
time.sleep(0.9)
|
time.sleep(0.9)
|
||||||
Sound(20).play()
|
Sound(20).play()
|
||||||
@@ -244,7 +253,7 @@ class PlayerState:
|
|||||||
if self.redSpecial == config.RED_SPECIAL_TIMES:
|
if self.redSpecial == config.RED_SPECIAL_TIMES:
|
||||||
Sound(21).play()
|
Sound(21).play()
|
||||||
time.sleep(0.9)
|
time.sleep(0.9)
|
||||||
Sound(20).play()
|
Sound(23).play()
|
||||||
self.redSpecialLit = True
|
self.redSpecialLit = True
|
||||||
Lamp("Special Red").activate()
|
Lamp("Special Red").activate()
|
||||||
|
|
||||||
@@ -313,6 +322,9 @@ class PlayerState:
|
|||||||
self.bonusTime -= 1
|
self.bonusTime -= 1
|
||||||
self.printSpecial()
|
self.printSpecial()
|
||||||
|
|
||||||
|
if self.bonus_time == 5:
|
||||||
|
Sound(28).play()
|
||||||
|
|
||||||
if self.bonusTime == 0:
|
if self.bonusTime == 0:
|
||||||
self.stopReplayBall()
|
self.stopReplayBall()
|
||||||
return
|
return
|
||||||
@@ -370,6 +382,8 @@ class PlayerState:
|
|||||||
self.upperPlayfieldTimer.start()
|
self.upperPlayfieldTimer.start()
|
||||||
|
|
||||||
def updatePlayfieldTime(self):
|
def updatePlayfieldTime(self):
|
||||||
|
if self.upperPlayfieldTime == 5:
|
||||||
|
Sound(28).play()
|
||||||
if self.upperPlayfieldTime in [0, 5, 10, 20]:
|
if self.upperPlayfieldTime in [0, 5, 10, 20]:
|
||||||
UPPER_PLAYFIELD_TIME_LAMPS.deactivateCurrent()
|
UPPER_PLAYFIELD_TIME_LAMPS.deactivateCurrent()
|
||||||
|
|
||||||
|
|||||||
@@ -6,11 +6,20 @@ import config
|
|||||||
class OrangeSpecialEvent(SpecialEvent):
|
class OrangeSpecialEvent(SpecialEvent):
|
||||||
def __init__(self, gameState):
|
def __init__(self, gameState):
|
||||||
super().__init__("Orange Special Event", gameState)
|
super().__init__("Orange Special Event", gameState)
|
||||||
self.points = 200000
|
self.points = 100000
|
||||||
|
|
||||||
def trigger(self, target):
|
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)
|
super().trigger(target)
|
||||||
|
|
||||||
if self.gameState.currentPlayer.orangeSpecialLit:
|
if self.gameState.currentPlayer.orangeSpecialLit:
|
||||||
config.ORANGE_SPECIAL(self)
|
#config.ORANGE_SPECIAL(self)
|
||||||
|
self.bonus_time()
|
||||||
self.gameState.currentPlayer.resetOrangeSpecial()
|
self.gameState.currentPlayer.resetOrangeSpecial()
|
||||||
|
|
||||||
|
|||||||
@@ -132,3 +132,9 @@ BONUS_LAMPS = LampGroup([
|
|||||||
Lamp("Bonus 19000"),
|
Lamp("Bonus 19000"),
|
||||||
Lamp("Bonus 20000")
|
Lamp("Bonus 20000")
|
||||||
])
|
])
|
||||||
|
|
||||||
|
ORANGE_SPECIAL_LAMPS = LampGroup([
|
||||||
|
Lamp("Special 100000 Points"),
|
||||||
|
Lamp("Special 200000 Points"),
|
||||||
|
Lamp("Special 300000 Points")
|
||||||
|
])
|
||||||
Reference in New Issue
Block a user