all repos — Legends-RPG @ 7ffb96f9e29029896fd0d90de035beb42211b4ce

A fantasy mini-RPG built with Python and Pygame.

Tweaked game values to make game more challenging.
Justin Armstrong justinmeister@gmail.com
Mon, 26 May 2014 23:16:08 -0700
commit

7ffb96f9e29029896fd0d90de035beb42211b4ce

parent

615ae8672bd8ae22eed4bbfc45a4b324bc4eb945

3 files changed, 13 insertions(+), 14 deletions(-)

jump to
M data/components/person.pydata/components/person.py

@@ -576,7 +576,7 @@ weapon_power = 0

else: weapon_power = self.game_data['player inventory'][weapon]['power'] max_strength = weapon_power + (self.level * 5) - min_strength = max_strength // 2 + min_strength = max_strength // 4 return random.randint(min_strength, max_strength)
M data/states/battle.pydata/states/battle.py

@@ -44,7 +44,6 @@ self.select_action_state_dict = self.make_selection_state_dict()

self.observers = [observer.Battle(self)] self.player.observers.extend(self.observers) self.observers.append(observer.SoundEffects()) - print self.player.observers self.damage_points = pg.sprite.Group() self.player_actions = [] self.player_action_dict = self.make_player_action_dict()

@@ -100,7 +99,7 @@ """

gold = 0 for enemy in self.enemy_list: - max_gold = enemy.level * 10 + max_gold = enemy.level * 20 gold += (random.randint(1, max_gold)) return gold

@@ -305,7 +304,7 @@ if player_stats['experience to next level'] <= 0:

player_stats['Level'] += 1 player_stats['health']['maximum'] += int(player_stats['health']['maximum']*.25) player_stats['magic']['maximum'] += int(player_stats['magic']['maximum']*.20) - new_experience = int((player_stats['Level'] * 100) * .75) + new_experience = int((player_stats['Level'] * 50) * .75) player_stats['experience to next level'] = new_experience self.enter_level_up_state() self.just_leveled_up = True
M data/tools.pydata/tools.py

@@ -184,11 +184,11 @@ def create_game_data_dict():

"""Create a dictionary of persistant values the player carries between states""" - player_items = {'GOLD': dict([('quantity',600), + player_items = {'GOLD': dict([('quantity',100), ('value',0)]), - 'Healing Potion': dict([('quantity',5), + 'Healing Potion': dict([('quantity',2), ('value',15)]), - 'Ether Potion': dict([('quantity',5), + 'Ether Potion': dict([('quantity',1), ('value', 15)]), 'Cure': dict([('magic points', 25), ('power', 50)]),

@@ -198,15 +198,15 @@ ('power', 5)]),

'equipped weapon': 'Rapier', 'equipped armor': []} - player_health = {'current': 100, - 'maximum': 100} + player_health = {'current': 70, + 'maximum': 70} - player_magic = {'current': 100, - 'maximum': 100} + player_magic = {'current': 70, + 'maximum': 70} player_stats = {'health': player_health, - 'Level': 2, - 'experience to next level': 20, + 'Level': 1, + 'experience to next level': 30, 'magic': player_magic, 'attack points': 10, 'Defense Points': 10}

@@ -215,7 +215,7 @@

data_dict = {'last location': None, 'last state': None, 'last direction': 'down', - 'king item': {'GOLD': dict([('quantity', 500), + 'king item': {'GOLD': dict([('quantity', 100), ('value',0)])}, 'old man item': {'ELIXIR': dict([('value',1000), ('quantity',1)])},