data/states/brother_house/brother_house.py (view raw)
1"""This is the house on the lower left hand
2corner of the town. Most of its functionality is inherited
3from the level_state.py module. Most of the level data is contained
4in the tilemap .txt files in this state's directory. Essentially the
5only purpose of house.py is to assign dialogue to each sprite.
6"""
7
8
9from .. import levels
10from ... import constants as c
11
12class House(levels.LevelState):
13 def __init__(self):
14 super(House, self).__init__()
15 self.name = c.BROTHER_HOUSE
16 self.map_width = 25
17 self.map_height = 19
18
19 def set_sprite_dialogue(self):
20 """Sets unique dialogue for each sprite"""
21 for sprite in self.sprites:
22 if sprite.location == [9, 6]:
23 sprite.dialogue = ["My brother is sick?!?",
24 "I haven't seen him in years. I had no idea he was not well.",
25 "Quick, take this ELIXIR to him immediately."]
26 sprite.item = self.game_data['old man item']