Game ready to be released! Woohoo
Justin Armstrong justinmeister@gmail.com
Wed, 18 Jun 2014 10:36:30 -0700
6 files changed,
9 insertions(+),
11 deletions(-)
M
data/constants.py
→
data/constants.py
@@ -86,6 +86,7 @@ FIRE = 'fire'
PUNCH = 'punch' POWERUP = 'powerup' TALK = 'talk' +MISS = 'whoosh' TRANSITION_SPEED = 35 DEATH_TRANSITION_SPEED = 5
M
data/states/battle.py
→
data/states/battle.py
@@ -214,11 +214,7 @@ """
Check user input to navigate GUI. """ if self.allow_input: - if keys[pg.K_RETURN]: - self.end_battle() - - elif keys[pg.K_SPACE]: - + if keys[pg.K_SPACE]: if self.state == c.SELECT_ACTION: self.notify(c.CLICK2) enter_state_function = self.select_action_state_dict[@@ -484,6 +480,7 @@ Add magic from ether to game data.
""" magic = self.game_data['player stats']['magic'] magic['current'] += magic_points + self.temp_magic += magic_points if magic['current'] > magic['maximum']: magic['current'] = magic['maximum']@@ -503,7 +500,6 @@ self.notify(c.FIRE)
self.state = self.info_box.state = c.FIRE_SPELL POWER = self.inventory['Fire Blast']['power'] MAGIC_POINTS = self.inventory['Fire Blast']['magic points'] - print MAGIC_POINTS self.game_data['player stats']['magic']['current'] -= MAGIC_POINTS for enemy in self.enemy_list: DAMAGE = random.randint(POWER//2, POWER)@@ -673,6 +669,8 @@ sfx_num = random.randint(1,3)
self.notify('punch{}'.format(sfx_num)) self.player.damaged = True self.player.enter_knock_back_state() + else: + self.notify(c.MISS) def enter_enemy_damaged_state(self): """
M
data/states/credits.py
→
data/states/credits.py
@@ -45,7 +45,8 @@ 'Matthew Pablo: Pleasant Creek (Brother Theme)'],
['SOUND EFFECTS', 'Kenney', 'Nic3_one', 'Ekokubza123', - 'kuzyaburst'], + 'kuzyaburst', + 'audione'], ['SPECIAL THANKS', '/r/pygame', 'Leif Theden', 'Stacey Hunniford']]
M
data/states/levels.py
→
data/states/levels.py
@@ -73,7 +73,7 @@ Set music based on name.
""" music_dict = {c.TOWN: ('town_theme', .4), c.OVERWORLD: ('overworld', .4), - c.CASTLE: ('kings_theme', .4), + c.CASTLE: ('town_theme', .4), c.DUNGEON: ('dungeon_theme', .4), c.DUNGEON2: ('dungeon_theme', .4), c.DUNGEON3: ('dungeon_theme', .4),@@ -82,7 +82,7 @@ c.DUNGEON5: ('dungeon_theme', .4),
c.HOUSE: ('pleasant_creek', .1), c.BROTHER_HOUSE: ('pleasant_creek', .1)} - if self.game_data['crown quest'] and self.name == c.TOWN: + if self.game_data['crown quest'] and (self.name == c.TOWN or self.name == c.CASTLE): self.music_title = 'kings_theme' return setup.MUSIC['kings_theme'], .4 elif self.name in music_dict:
M
data/tools.py
→
data/tools.py
@@ -65,8 +65,6 @@ for event in self.events:
if event.type == pg.QUIT: self.done = True elif event.type == pg.KEYDOWN: - if event.key == pg.K_ESCAPE: - self.done = True self.keys = pg.key.get_pressed() self.toggle_show_fps(event.key) self.state.get_event(event)