Skip to content

Commit

Permalink
Checkpoint before the boss.
Browse files Browse the repository at this point in the history
  • Loading branch information
Grant Mathews committed Aug 22, 2011
1 parent baa42f3 commit 57e1302
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
Binary file added getstuff.wav
Binary file not shown.
20 changes: 17 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
# sound fx

land_sound = None
get_sound = None
escape_sound = None

# Following 2 methods found online.
Expand Down Expand Up @@ -562,6 +563,8 @@ def death(self, game_map):
game_map.update_map(self.res_death['mx'], self.res_death['my'], True)

Updater.remove_all(lambda x: isinstance(x, HoverText))
Updater.remove_all(lambda x: isinstance(x, Replicated))
Updater.remove_all(lambda x: isinstance(x, Boss))

def set_restore_point(self):
self.restore_x = self.x
Expand Down Expand Up @@ -619,8 +622,15 @@ class Dialog:
],
(2, 0) : [
("Narrator", "That guy looks annoying."),
("Narrator", "Fortunately you have perfect perception of him (from your escape artist powers)."),
("Narrator", "This ability is really helpful. Believe me."),
("Narrator", "Since you are the greatest escape artist, you don't even want to be seen by him."),
("Narrator", "(His line of sight is indicated by the circles)"),
],
(4, 1) : [
("Narrator", "Aha!"),
("Narrator", "To the right, my sensors are indicating there is..."),
("Narrator", "An ESCAPE!"),
("Narrator", "And also a big scary monster in your way."),
("Narrator", "Well, that stinks"),
],
# replicator GET dialog
"replicator": [ ("Narrator", "Ooh."),
Expand Down Expand Up @@ -862,6 +872,8 @@ def update(self):
if self.char.touching_item(self):
self.char.get_item(self.pickup_type)
if not self.pickup_type.startswith("signpost"):
if not DEBUG:
get_sound.play()
return False
else:
return True
Expand Down Expand Up @@ -1295,6 +1307,8 @@ def __init__(self):
global escape_sound
escape_sound = pygame.mixer.Sound("escape.wav")

global get_sound
get_sound = pygame.mixer.Sound("getstuff.wav")

self.screen = pygame.display.set_mode((ABS_MAP_SIZE * 2, ABS_MAP_SIZE * 2))
self.buff = pygame.Surface((ABS_MAP_SIZE, ABS_MAP_SIZE))
Expand All @@ -1310,7 +1324,7 @@ def __init__(self):
Dialog.begin(self)

if DEBUG:
self.map = Map("map.png", [5, 1], self.char, self)
self.map = Map("map.png", [4, 1], self.char, self)
self.state = States.Normal
else:
self.map = Map("map.png", [0, 0], self.char, self)
Expand Down
Binary file modified map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified wall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 57e1302

Please sign in to comment.