def build_options(self, player):
     self.options = OptionList()
     self.options.add(
         Option('1', 'cottage_field', 'Step back into the field.',
                advmessages.Message('You miander on back into the field.')))
     self.options.add(
         Option(
             '2', 'cottage_kitchen', 'Burst into the kitchen.',
             advmessages.Message(
                 'You kick open the the kitchen doors and rush inside.')))
 def build_options(self, player):
     self.options = OptionList()
     self.options.add(
         Option(
             '1', 'field_quietSpot', 'Head to the tree to lie down.',
             advmessages.Message('You head over to the tree to lie down.')))
     message = 'You make your way into the forest. It is dark.'
     self.options.add(
         Option('2', 'field_cave', 'Head north into the forest.',
                advmessages.Message(message)))
     self.options_handle_troll_around(player)
    def __init__(self):
        self.optionList = {}
        self.messages = {}
        self.messages['prefix'] = advmessages.Message(
            "\nYou have the following options")
        self.messages['bad_option'] = advmessages.Message(
            "Sorry, that's not an option. Something else?")
        self.messages['nothing_list'] =\
            advmessages.Message('There are no options.')

        self.update_selector_list()
    def options_handle_tim_tam(self, player):
        if not player.conditions['ate_tim_tam']:
            message = \
                'You tremble as you raise the last tim tam to your lips.'

            self.options.add(
                Option('2', 'eat_tim_tam', 'Eat the last tim tam.',
                       advmessages.Message(message)))
 def build_options(self, player):
     self.options = OptionList()
     self.options.add(
         Option(
             '1', 'kitchen_cottage', 'Step out of the kitchen.',
             advmessages.Message(
                 'You make your way back out of the kitchen.')))
     self.options_handle_tim_tam(player)
 def build_options(self, player):
     self.options = OptionList()
     self.options.add(
         Option(
             '1', 'cave_field', 'Make your way back to the field.',
             advmessages.Message(
                 'You start the journey back to the field.')))
     self.options_handle_sword(player)
    def options_handle_sword(self, player):
        if not player.conditions['has_sword']:
            message = \
                f'The {story_data.cave_weapon} feels warm in your hands.'

            self.options.add(
                Option('2', 'get_sword',
                       f'Pick up the {story_data.cave_weapon}.',
                       advmessages.Message(message)))
    def options_handle_troll_around(self, player):
        # Different options are available based on the player conditions.
        # This function changes which messages get played out based on those
        # conditions.
        if player.conditions['troll_around']:
            cottageOptionDesc = self.get_option_msg('optDesc',
                                                    'random_troll_around')

            cottageOptionResp = advmessages.Message(
                self.get_option_msg(
                    'optResp',
                    'random_troll_around',
                ))
        else:
            cottageOptionDesc = self.get_option_msg('optDesc',
                                                    'random_troll_gone')

            cottageOptionResp = advmessages.Message(
                self.get_option_msg('optResp', 'random_troll_gone'))

        self.options.add(
            Option('3', 'field_cottage', cottageOptionDesc, cottageOptionResp))
Beispiel #9
0
field_messages['optDesc'] = {}
field_messages['optResp'] = {}
field_messages['paths'] = {}
field_messages['paths']['field_quietSpot'] = {}
field_messages['paths']['field_cottage'] = {}

# Field Messages - Paths

field_messages['paths']['field_quietSpot']['path_closed'] = \
        advmessages.MultiLineMsg([
                'You don\'t have enough energy to get there.',
                'You need to eat something first.'
                ])
field_messages['paths']['field_cottage']['path_closed'] = \
        advmessages.Message(
                'Going back to the cottage is not an option without a weapon.'
                )

# Field Messages - First Visit

field_messages['first_visit'] = advmessages.MultiLineMsg([
    '', '',
    '\nAs you look around the field, you notice there is a cottage a short',
    'distance from where you are standing.',
    '\nThere is also a path leading into a dark forest off to the north.',
    '\nA shady tree swaying nearby looks like a nice place to lie down.'
])

# Field Messages - On Arrival

field_messages['on_arrival']['intro'] = advmessages.Message(