projects
/
naja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://ctpug.org.za/naja
[naja.git]
/
naja
/
actions.py
diff --git
a/naja/actions.py
b/naja/actions.py
index d73a66aae4ba0dfede3cbd60e1961531f9299146..9f3b221b3af18cf033093465d0306a9ec1ddab93 100644
(file)
--- a/
naja/actions.py
+++ b/
naja/actions.py
@@
-82,6
+82,7
@@
class LoseHealthOrMSB(LocationAction):
def perform_action(self, board, location):
if not self.check_and_clear_MSB(board.player):
def perform_action(self, board, location):
if not self.check_and_clear_MSB(board.player):
+ sound.play_sound('awwww.ogg')
board.lose_health()
board.lose_health()
@@
-120,6
+121,7
@@
class LoseHealthOrMSBAndSetBits(LocationAction):
def perform_action(self, board, location):
if not self.check_and_clear_MSB(board.player):
def perform_action(self, board, location):
if not self.check_and_clear_MSB(board.player):
+ sound.play_sound('awwww.ogg')
board.lose_health()
board.player.bits.set_bits(location.bitwise_operand)
board.lose_health()
board.player.bits.set_bits(location.bitwise_operand)
@@
-129,6
+131,7
@@
class AcquireWinToken(LocationAction):
GLYPHS = (ACTION_GLYPHS.WINTOKEN,)
def perform_action(self, board, location):
GLYPHS = (ACTION_GLYPHS.WINTOKEN,)
def perform_action(self, board, location):
+ sound.play_sound('yipee.ogg')
board.acquire_win_token()
board.player.bits.clear_bits(set([
BITS.RED, BITS.GREEN, BITS.BLUE,
board.acquire_win_token()
board.player.bits.clear_bits(set([
BITS.RED, BITS.GREEN, BITS.BLUE,
@@
-140,6
+143,7
@@
class GainHealth(LocationAction):
GLYPHS = (ACTION_GLYPHS.HEAL,)
def perform_action(self, board, location):
GLYPHS = (ACTION_GLYPHS.HEAL,)
def perform_action(self, board, location):
+ sound.play_sound('aha.ogg')
board.gain_health()
board.gain_health()
@@
-149,6
+153,7
@@
class GainHealthAndClearBitsOrMSB(LocationAction):
MSB_GLYPH = ACTION_GLYPHS.CLEAR_BITS
def perform_action(self, board, location):
MSB_GLYPH = ACTION_GLYPHS.CLEAR_BITS
def perform_action(self, board, location):
+ sound.play_sound('aha.ogg')
board.gain_health()
if not self.check_and_clear_MSB(board.player):
board.player.bits.clear_bits(location.bitwise_operand)
board.gain_health()
if not self.check_and_clear_MSB(board.player):
board.player.bits.clear_bits(location.bitwise_operand)