data/states/house/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 level_state
10from ... import constants as c
11
12class House(level_state.LevelState):
13 def __init__(self):
14 super(House, self).__init__()
15 self.name = c.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 == [14, 6]:
23 sprite.dialogue = ["There are evil forces surrounding our town.",
24 "Do not leave if you value your life."]