Compare commits
2 Commits
647d230fe0
...
0a2305f4cc
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a2305f4cc | |||
| 2e59e718e6 |
8
game.py
8
game.py
@ -84,14 +84,10 @@ class Game(gameUtils.Game):
|
||||
self.playSound(self.gunShot)
|
||||
self.turnHandler.playing[0].punish(self.shockScale)
|
||||
print(f'{self.turnHandler.playing[0].name} is fucking dead.')
|
||||
self.turnHandler.next()
|
||||
print(f'{self.turnHandler.playing[0].name} is up')
|
||||
return 0.04
|
||||
#remember to add shock
|
||||
else:
|
||||
self.playSound(self.gunBlank)
|
||||
self.turnHandler.next()
|
||||
print(f'{self.turnHandler.playing[0].name} is up')
|
||||
return 0
|
||||
|
||||
def onEvent(self, event):
|
||||
@ -119,9 +115,11 @@ class Game(gameUtils.Game):
|
||||
self.timeout("FireDelay",randint(750,2000)/1000)
|
||||
self.playSound(self.gunCyclinderStop)
|
||||
|
||||
elif event.type == gameUtils.Timeout:
|
||||
elif event.type == gameUtils.Timeout and event.timeoutID == 'FireDelay':
|
||||
self.shockScale += self.fire() #check if the user gets shot
|
||||
self.shockScale = min(self.shockScale, 1) #keeps shockScale in bounds
|
||||
self.turnHandler.next()
|
||||
self.popup('Next player', f'Pass shocker to {self.turnHandler.playing[0].name},\nthen press R-CTRL+ENTER to continue.')
|
||||
|
||||
def update(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user