Minor dialogue changes.
Justin Armstrong justinmeister@gmail.com
Mon, 02 Jun 2014 22:21:09 -0700
5 files changed,
54 insertions(+),
23 deletions(-)
M
data/components/textbox.py
→
data/components/textbox.py
@@ -148,6 +148,13 @@ else:
self.end_dialogue(current_time) elif self.talking_sprite.name == 'king': + if not self.game_data['talked to king']: + self.game_data['talked to king'] = True + new_dialogue = ['Hurry to the castle in the NorthWest!', + 'The sorceror who lives there has my crown.', + 'Please retrieve it for me.'] + self.talking_sprite.dialogue = new_dialogue + self.end_dialogue(current_time) if (self.game_data['crown quest'] and not self.game_data['delivered crown']): retrieved_crown_dialogue = ['My crown! You recovered my stolen crown!!!',@@ -217,7 +224,10 @@
if item: if item in self.game_data['player inventory']: if 'quantity' in self.game_data['player inventory'][item]: - self.game_data['player inventory'][item]['quantity'] += 1 + if item == 'GOLD': + self.game_data['player inventory'][item]['quantity'] += 100 + else: + self.game_data['player inventory'][item]['quantity'] += 1 else: self.add_new_item_to_inventory(item)
M
data/states/levels.py
→
data/states/levels.py
@@ -180,6 +180,11 @@ battle = properties['battle']
else: battle = None + if 'state' in properties: + sprite_state = properties['state'] + else: + sprite_state = None + x = properties['x'] * 2 y = ((properties['y']) * 2) - 32@@ -204,11 +209,17 @@ 'evilwizard': person.Person('evilwizard', x, y, direction),
'treasurechest': person.Chest(x, y, id)} sprite = sprite_dict[properties['type']] + if sprite_state: + sprite.state = sprite_state + if sprite.name == 'oldman': if self.game_data['old man gift'] and not self.game_data['elixir received']: sprite.item = self.game_data['old man gift'] else: sprite.item = item + elif sprite.name == 'king': + if not self.game_data['talked to king']: + sprite.item = self.game_data['king item'] else: sprite.item = item sprite.battle = battle
M
data/tools.py
→
data/tools.py
@@ -217,8 +217,7 @@
data_dict = {'last location': None, 'last state': None, 'last direction': 'down', - 'king item': {'GOLD': dict([('quantity', 100), - ('value',0)])}, + 'king item': 'GOLD', 'old man item': {'ELIXIR': dict([('value',1000), ('quantity',1)])}, 'player inventory': player_items,@@ -229,6 +228,7 @@ 'treasure2': True,
'treasure3': True, 'treasure4': True, 'treasure5': True, + 'talked to king': False, 'brother quest complete': False, 'talked to sick brother': False, 'has brother elixir': False,
M
resources/tmx/town.tmx
→
resources/tmx/town.tmx
@@ -380,16 +380,16 @@ </object>
<object name="sprite" type="soldier" gid="124" x="160" y="224"> <properties> <property name="dialogue length" value="2"/> - <property name="dialogue0" value="Only those given special permission by the King can leave this town."/> - <property name="dialogue1" value="It is for our own good, as few could survive in the outside world."/> + <property name="dialogue0" value="The castle to the NorthWest is very dangerous."/> + <property name="dialogue1" value="Make sure to buy a Long Sword before attempting to enter it."/> </properties> </object> <object name="sprite" type="soldier" gid="124" x="208" y="224"> <properties> - <property name="dialogue length" value="3"/> - <property name="dialogue0" value="Be careful. There are monsters surrounding our town."/> - <property name="dialogue1" value="Make sure to equip sufficient armor and weapons."/> - <property name="dialogue2" value="Spells and potions are useful too."/> + <property name="" value=""/> + <property name="dialogue length" value="2"/> + <property name="dialogue0" value="Armor is important to protect you from monsters."/> + <property name="dialogue1" value="The Armor Shop sells excellent shields and chain mail."/> </properties> </object> <object name="portal" type="castle" gid="139" x="176" y="112"/>@@ -416,11 +416,5 @@ <object name="blocker" gid="120" x="144" y="784"/>
<object name="blocker" gid="120" x="128" y="784"/> <object name="blocker" gid="120" x="112" y="768"/> <object name="blocker" gid="120" x="112" y="752"/> - <object name="sprite" type="soldier" gid="124" x="112" y="576"> - <properties> - <property name="dialogue length" value="1"/> - <property name="dialogue0" value="Hey, there."/> - </properties> - </object> </objectgroup> </map>