Beispiel #1
0
 def set_negative_quality(self):
     new_quality = words.get_negative_quality()
     md_writer.print_chapter_sentence('Because of this great failure ' +
                                      self.get_name() +
                                      " became known as 'The " +
                                      new_quality.title() + "'.")
     self.qualities = [new_quality]
    def __init__(self, character, cause):
        self.character = character
        self.description = random.choice(["broken rib", "shattered sternum", "broken leg",
                                          "bruised face", "broken arm", "broken nose",
                                          "concussion", "herniated disc", "bruised skull",
                                          "shattered elbow", "injured spine", "sliced hamstring",
                                          "torn spleen", "pierced guts"])

        if (cause == None):
            md_writer.print_chapter_sentence(character.get_description().title() + " was injured with " + aOrAn(self.description) + " " + self.description + ".")
        else:
            md_writer.print_chapter_sentence(cause.get_description().title() + "'s attack caused " + self.character.get_description() + " to have " + aOrAn.aOrAn(self.description) + " " + self.description + ".")
 def write_chapter(self):
     md_writer.print_chapter_heading(self.inn_name)
     md_writer.print_chapter_sentence(self.first_sentence())
     md_writer.print_chapter_sentence("Suddenly, the powerful wizard, " + self.state.wizard_name + " appeared in a flash of light.")
     md_writer.print_chapter_sentence(self.state.wizard_name + " said, " + '"You must take ' + self.state.macguffin_name + ' to ' + self.state.goal_setting_name + ' and destroy it, or the world will end! Many agents of chaos will oppose you, but only you can save the world!"')
     c = random.choice(self.state.get_characters())
     md_writer.print_chapter_sentence(c.get_description() + " took " + self.state.macguffin_name + ", and the three heroes went off.")
     md_writer.end_chapter()
 def write_chapter(self):
     md_writer.print_chapter_heading(self.state.goal_setting_name)
     md_writer.print_chapter_sentence(self.first_sentence())
     c = random.choice(self.state.get_characters())
     md_writer.print_chapter_sentence(c.get_description() + " threw " + self.state.macguffin_name + " into the burning void.")
     md_writer.print_chapter_sentence("Suddenly, the powerful wizard, " + self.state.wizard_name + " appeared in a flash of light.")
     md_writer.print_chapter_sentence(self.state.wizard_name + " said, " + '"You have saved the world! It was a terrible journey but you did it!"')
     md_writer.end_chapter()
Beispiel #5
0
 def add_injury(self, cause):
     if len(self.injuries) < 1:
         self.injuries.append(Injury(self, cause))
     else:
         self.dead = True
         if cause != None:
             md_writer.print_chapter_sentence(
                 cause.get_description().title()
                 + " struck "
                 + self.get_description()
                 + " killing "
                 + self.possessive_pronoun
                 + "."
             )
         else:
             md_writer.print_chapter_sentence(self.get_description().title() + " died.")
Beispiel #6
0
    def __init__(self, character, cause):
        self.character = character
        self.description = random.choice([
            "broken rib", "shattered sternum", "broken leg", "bruised face",
            "broken arm", "broken nose", "concussion", "herniated disc",
            "bruised skull", "shattered elbow", "injured spine",
            "sliced hamstring", "torn spleen", "pierced guts"
        ])

        if (cause == None):
            md_writer.print_chapter_sentence(
                character.get_description().title() + " was injured with " +
                aOrAn(self.description) + " " + self.description + ".")
        else:
            md_writer.print_chapter_sentence(cause.get_description().title() +
                                             "'s attack caused " +
                                             self.character.get_description() +
                                             " to have " +
                                             aOrAn.aOrAn(self.description) +
                                             " " + self.description + ".")
 def write_chapter(self):
     md_writer.print_chapter_heading(self.state.goal_setting_name)
     md_writer.print_chapter_sentence(self.first_sentence())
     c = random.choice(self.state.get_characters())
     md_writer.print_chapter_sentence(c.get_description() + " threw " +
                                      self.state.macguffin_name +
                                      " into the burning void.")
     md_writer.print_chapter_sentence("Suddenly, the powerful wizard, " +
                                      self.state.wizard_name +
                                      " appeared in a flash of light.")
     md_writer.print_chapter_sentence(
         self.state.wizard_name + " said, " +
         '"You have saved the world! It was a terrible journey but you did it!"'
     )
     md_writer.end_chapter()
Beispiel #8
0
 def write_chapter(self):
     md_writer.print_chapter_heading(self.inn_name)
     md_writer.print_chapter_sentence(self.first_sentence())
     md_writer.print_chapter_sentence("Suddenly, the powerful wizard, " +
                                      self.state.wizard_name +
                                      " appeared in a flash of light.")
     md_writer.print_chapter_sentence(
         self.state.wizard_name + " said, " + '"You must take ' +
         self.state.macguffin_name + ' to ' + self.state.goal_setting_name +
         ' and destroy it, or the world will end! Many agents of chaos will oppose you, but only you can save the world!"'
     )
     c = random.choice(self.state.get_characters())
     md_writer.print_chapter_sentence(c.get_description() + " took " +
                                      self.state.macguffin_name +
                                      ", and the three heroes went off.")
     md_writer.end_chapter()
    def searching(self, c):
        # Find a place to search for food
        food = random.choice([
            'bird eggs', 'wild barley', 'berries', 'mushrooms', 'almonds',
            'chickpeas', 'wild carrots', 'olives', 'apples', 'bananas',
            'avocados'
        ])
        md_writer.print_chapter_sentence(c.get_name() +
                                         ' went searching for ' + food + '.')
        if c.challenge('survival'):
            md_writer.print_chapter_sentence(
                c.get_pronoun().title() + ' looked around the ' +
                self.state.get_current_setting().get_name() + ' for ' + food +
                '.')
        else:
            md_writer.print_chapter_sentence('After a lengthy search, ' +
                                             c.get_pronoun() +
                                             ' gave up - no ' + food +
                                             ' were to be found here.')
            return 0

        if random.random() < 0.05:
            md_writer.print_chapter_sentence(
                self.state.get_current_setting().mood_sentence())

        # Gather the food
        if c.challenge('survival'):
            md_writer.print_chapter_sentence(c.get_name() + ' filled ' +
                                             c.get_possessive_pronoun() +
                                             ' arms with ' + food + '.')
        else:
            md_writer.print_chapter_sentence(c.get_name() + ' tasted the ' +
                                             food + '.')
            taste = random.choice(
                ['bitter', 'disgusting', 'sour', 'dizzying', 'gross', 'fiery'])
            md_writer.print_chapter_sentence('It was ' + taste + '.')
            md_writer.print_chapter_sentence(
                says_sentence(c, 'Must be poisonous'))
            return 0

        return random.randint(7, 15)
    def generate_sentences(self):
        c1 = random.choice(self.state.get_characters())
        c = random.choice(self.state.get_characters())
        others = [
            char for char in self.state.get_characters()
            if char.get_name() != c.get_name()
        ]
        md_writer.print_chapter_sentence(self.state.generate_food_sentence(c1))
        md_writer.print_chapter_sentence(c.get_name() + ' decided to go ' +
                                         self.method + '.')
        memory = c.get_memory(self.method)
        if memory != None:
            md_writer.print_chapter_sentence(memory)

        food = 0
        if self.method == 'hunting':
            food = self.hunting(c)
        elif self.method == 'searching for food':
            food = self.searching(c)
        else:
            food = self.fishing(c)

        if food > 0:
            md_writer.print_chapter_sentence(c.get_name() + ' returned to ' +
                                             others[0].get_name() + ' with ' +
                                             c.get_possessive_pronoun() +
                                             ' food.')
            md_writer.print_chapter_sentence(
                says_sentence(others[0], 'Great job ' + c.get_name()))
            c.set_positive_quality()
        else:
            md_writer.print_chapter_sentence(c.get_name() + ' returned to ' +
                                             others[0].get_name() +
                                             ' empty handed.')
            md_writer.print_chapter_sentence(
                says_sentence(
                    c,
                    "We will have to just keep going, there was no food to find here"
                ))
            if random.random() < 0.5:
                c.set_negative_quality()

        self.state.add_food(food)
    def hunting(self, c):
        animal = random.choice([
            'rabbit', 'turkey', 'deer', 'boar', 'elk', 'caribou', 'sheep',
            'bison', 'hare', 'raccoon', 'squirrel'
        ])

        md_writer.print_chapter_sentence(
            c.get_pronoun().title() + ' searched the ' +
            self.state.get_current_setting().get_name() + ' for signs of ' +
            pattern.en.pluralize(animal) + ".")

        # Find a place to hunt
        if c.challenge('survival'):
            md_writer.print_chapter_sentence(animal.title() +
                                             ' tracks were spotted by ' +
                                             c.get_possessive_pronoun() +
                                             ' in the mud.')
        else:
            md_writer.print_chapter_sentence('But ' + c.get_pronoun() +
                                             ' failed to find any ' + animal +
                                             ' signs.')
            return 0

        if random.random() < 0.05:
            md_writer.print_chapter_sentence(
                self.state.get_current_setting().mood_sentence())

        if c.challenge('survival'):
            md_writer.print_chapter_sentence(
                c.get_name() +
                ' followed the tracks, staying upwind so as not to alert the '
                + animal + '.')
        else:
            md_writer.print_chapter_sentence(c.get_name() +
                                             ' followed the tracks, but the ' +
                                             animal + ' noticed ' +
                                             c.get_possessive_pronoun() +
                                             ' and ran.')
            return 0

        if random.random() < 0.05:
            md_writer.print_chapter_sentence(
                self.state.get_current_setting().mood_sentence())

        md_writer.print_chapter_sentence(c.get_pronoun().title() + ' aimed ' +
                                         c.get_possessive_pronoun() +
                                         ' bow at the ' + animal +
                                         ' and fired.')
        if c.challenge('survival'):
            md_writer.print_chapter_sentence(c.get_pronoun().title() +
                                             ' hit ' +
                                             c.get_possessive_pronoun() +
                                             ' target.')
        else:
            md_writer.print_chapter_sentence(c.get_pronoun().title() +
                                             ' fired, but missed.')
            md_writer.print_chapter_sentence('The ' + animal + ' ran off.')
            return 0

        return random.randint(7, 15)
Beispiel #12
0
 def set_negative_quality(self):
     new_quality = words.get_negative_quality()
     md_writer.print_chapter_sentence('Because of this great failure ' + self.get_name() + " became known as 'The " + new_quality.title()+"'.")
     self.qualities = [new_quality]
    def generate_sentences(self):
        md_writer.print_chapter_sentence(self.state.character_list() + " made camp.")

        energy = 0

        cs = self.state.get_characters()
        random.shuffle(cs)
        c1 = cs[0]
        c2 = cs[1]
        c3 = cs[2]

        sentences = []

        if random.random() < 0.05:
            md_writer.print_chapter_sentence(self.state.get_current_setting().mood_sentence())

        md_writer.print_chapter_sentence(c1.get_name() + ' searched for dry wood for a fire.')
        if c1.challenge('survival'):
            wood_found = random.choice(['dry ash kindling', ' birch twigs', 'large dried mushrooms', 'grassy dried reeds', 'dessicated cow dung'])
            location = random.choice(['in a nearby copse', 'inside a hollow log', 'beneath a spindly pine', 'along the ' + self.state.get_current_setting().get_name() + ' floor'])
            md_writer.print_chapter_sentence(c1.get_pronoun().title() + ' found ' + wood_found + ' ' + location + '.')
            fire_sound = random.choice(['roaring', 'crackling', 'hissing'])
            fire_type = random.choice(['campfire', 'blaze', 'bonfire'])
            md_writer.print_chapter_sentence(c2.get_name() + ' started a ' + fire_sound + ' ' + fire_type + '.')
            energy += 5
            md_writer.print_chapter_sentence('While ' + c1.get_name() + ' and ' + c2.get_name() + ' made a fire, ' + c3.get_name() + ' scouted around the campsite.')
        else:
            md_writer.print_chapter_sentence(c1.get_pronoun().title() + ' searched for an hour, but all the wood was wet, and ' + c1.get_pronoun() + ' gave up' + '.')
            md_writer.print_chapter_sentence('Meanwhile, ' + c3.get_name() + ' went scouting.')

        if random.random() < 0.05:
            md_writer.print_chapter_sentence(self.state.get_current_setting().mood_sentence())

        if c3.challenge('survival'):
            sense = random.choice(['saw', 'heard', 'spotted', 'noticed', 'observed'])
            grouping = random.choice(['band', 'family', 'patrol'])
            race = random.choice(self.words.fantasy_races)
            critter = copy.copy(race)
            critter = pattern.en.pluralize(critter)
            md_writer.print_chapter_sentence(c3.get_pronoun().title() + ' ' + sense + ' a ' + grouping + ' of ' + critter + '.')
            characteristic = Npc(race).characteristic
            md_writer.print_chapter_sentence('One of the ' + critter + ' had ' + aOrAn.aOrAn(characteristic) + " " + characteristic + ".")
            watching_adj = random.choice(['quietly', 'patiently', 'tirelessly'])
            md_writer.print_chapter_sentence(c3.get_pronoun().title() + ' ' + watching_adj + ' watched the ' + critter +'.')
            if (len(self.state.get_current_setting().get_known_props()) > 0):
                prop = random.choice(self.state.get_current_setting().get_known_props())
                md_writer.print_chapter_sentence('The ' + critter + ' took the ' + prop + ' from the ' + self.state.get_current_setting().get_name() + '.')
            md_writer.print_chapter_sentence('But the ' + critter + ' soon left the ' + self.state.get_current_setting().get_name() + '.')
            energy += 5
        else:
            critter = random.choice(self.words.fantasy_races)
            self.state.add_enemy_patrol(critter)
            critter_description = c3.get_pronoun().title() + " thought " + c3.get_pronoun() + ' saw ' + pattern.en.pluralize(critter) + ' in the distance.'
            md_writer.print_chapter_sentence(critter_description)
            failure = random.choice(['fell in a hidden gorge', 'loudly broke a branch', 'accidentally knocked over a boulder', 'fell asleep', 'walked into a tree'])
            md_writer.print_chapter_sentence("Suddenly, " + c3.get_pronoun() + " " + failure + '.')

        night_description = random.choice(['inky', 'black', 'moonlit', 'silent', 'calm'])
        md_writer.print_chapter_sentence(night_description.title() + ' darkness fell over the camp.')

        c = random.choice(self.state.get_characters())
        if random.random() < 0.5:
            md_writer.print_chapter_sentence(c.get_name() + ' told a story.')
        else:
            md_writer.print_chapter_sentence(c.get_name() + ' sang a song from ' + c.get_possessive_pronoun() + ' childhood.')

        sleep_opening = random.choice(['As the fire crackled', 'While the wind gusted', 'As gentle rain fell', 'As the leaves rustled', 'As howls were heard in the distance', 'As the moon shone overhead', 'Although sadness washed over them'])
        md_writer.print_chapter_sentence(sleep_opening + ',' + ' they all fell asleep.')

        c = random.choice(self.state.get_characters())
        md_writer.print_chapter_sentence(c.get_name() + ' dreamt of a ' + self.words.get_fantasy_place() + ', ' + self.words.get_fantasy_occupation() + ', and ' + self.words.get_living_thing_adj() + ' ' + pattern.en.pluralize(self.words.get_living_thing()) + '.')
        energy += 5

        self.state.add_energy(energy)
    def searching(self, c):
        # Find a place to search for food
        food = random.choice(['bird eggs', 'wild barley', 'berries', 'mushrooms', 'almonds', 'chickpeas', 'wild carrots', 'olives', 'apples', 'bananas', 'avocados'])
        md_writer.print_chapter_sentence(c.get_name() + ' went searching for ' + food + '.')
        if c.challenge('survival'):
            md_writer.print_chapter_sentence(c.get_pronoun().title() + ' looked around the ' + self.state.get_current_setting().get_name() + ' for ' + food + '.')
        else:
            md_writer.print_chapter_sentence('After a lengthy search, ' + c.get_pronoun() + ' gave up - no ' + food + ' were to be found here.')
            return 0

        if random.random() < 0.05:
            md_writer.print_chapter_sentence(self.state.get_current_setting().mood_sentence())

        # Gather the food
        if c.challenge('survival'):
            md_writer.print_chapter_sentence(c.get_name() + ' filled ' + c.get_possessive_pronoun() + ' arms with ' + food + '.')
        else:
            md_writer.print_chapter_sentence(c.get_name() + ' tasted the ' + food + '.')
            taste = random.choice(['bitter', 'disgusting', 'sour', 'dizzying', 'gross', 'fiery'])
            md_writer.print_chapter_sentence('It was ' + taste + '.')
            md_writer.print_chapter_sentence(says_sentence(c, 'Must be poisonous'))
            return 0

        return random.randint(7, 15)
    def hunting(self, c):
        animal = random.choice(['rabbit', 'turkey', 'deer', 'boar', 'elk', 'caribou', 'sheep', 'bison', 'hare', 'raccoon', 'squirrel'])

        md_writer.print_chapter_sentence(c.get_pronoun().title() + ' searched the ' + self.state.get_current_setting().get_name() + ' for signs of ' + pattern.en.pluralize(animal) +".")

        # Find a place to hunt
        if c.challenge('survival'):
            md_writer.print_chapter_sentence(animal.title() + ' tracks were spotted by ' + c.get_possessive_pronoun() + ' in the mud.')
        else:
            md_writer.print_chapter_sentence('But ' + c.get_pronoun() + ' failed to find any ' + animal + ' signs.')
            return 0

        if random.random() < 0.05:
            md_writer.print_chapter_sentence(self.state.get_current_setting().mood_sentence())

        if c.challenge('survival'):
            md_writer.print_chapter_sentence(c.get_name() + ' followed the tracks, staying upwind so as not to alert the ' + animal + '.')
        else:
            md_writer.print_chapter_sentence(c.get_name() + ' followed the tracks, but the ' + animal + ' noticed ' + c.get_possessive_pronoun() + ' and ran.')
            return 0

        if random.random() < 0.05:
            md_writer.print_chapter_sentence(self.state.get_current_setting().mood_sentence())

        md_writer.print_chapter_sentence(c.get_pronoun().title() + ' aimed ' + c.get_possessive_pronoun() + ' bow at the ' + animal + ' and fired.')
        if c.challenge('survival'):
            md_writer.print_chapter_sentence(c.get_pronoun().title() + ' hit ' + c.get_possessive_pronoun() + ' target.')
        else:
            md_writer.print_chapter_sentence(c.get_pronoun().title() + ' fired, but missed.')
            md_writer.print_chapter_sentence('The ' + animal + ' ran off.')
            return 0

        return random.randint(7, 15)
    def generate_sentences(self):
        md_writer.print_chapter_sentence(self.setting_sentence(self.state))

        for i in range(10):
            r = random.random()
            if r < 0.2 and self.state.get_current_setting().has_more_lore():
                md_writer.print_chapter_sentence(self.generate_lore_sentence(self.state))
            elif r < 0.3:
                md_writer.print_chapter_sentence(self.state.generate_status_sentence())
            elif r < 0.5:
                md_writer.print_chapter_sentence(generate_concept_sentence.generate_concept_sentence(random.choice((random.choice(self.state.get_characters()).first_name, None)), self.state.get_current_setting().get_name()))
            else:
                if len(self.state.get_current_setting().get_props()) > 0:
                    md_writer.print_chapter_sentence(self.state.get_current_setting().discover_prop(random.choice((random.choice(self.state.get_characters()).first_name, None)), random.choice(self.state.get_current_setting().get_props()), self.state.get_current_setting().get_description()))
                elif len(self.state.get_current_setting().get_known_props()) > 0:
                    try:
                        print md_writer.print_chapter_sentence(generate_concept_sentence.generate_concept_sentence(random.choice((random.choice(self.state.get_characters()).first_name, None)), random.choice(self.state.get_current_setting().get_known_props())))
                    except Exception:
                        continue
    def generate_sentences(self):
        race = self.patrol[0].race
        number = num2words.numToWords(len(self.patrol))
        md_writer.print_chapter_sentence("Suddenly " + number + " " + pattern.en.pluralize(race) + " ambushed the group.")

        done = False

        while not done:
            done = True
            for npc in self.patrol:
                if npc.is_dead() == False:
                    done = False
                    break

            if done == False:
                enemy = self.living_npc()
                c = random.choice(self.state.get_characters())
                if random.random() > 0.2 or (len(enemy.injuries) > 0 and random.random() > 0.5):
                    if c.challenge('combat'): # c attacks e
                        md_writer.print_chapter_sentence(self.hit_sentence(c, enemy))
                        enemy.add_injury(c)
                    else: # c misses e
                        md_writer.print_chapter_sentence(self.miss_sentence(c, enemy))
                else: # e attack c
                    if not c.challenge('combat'):
                        md_writer.print_chapter_sentence(self.hit_sentence(enemy, c))
                        c.add_injury(enemy)
                    else: # e misses c
                        md_writer.print_chapter_sentence(self.miss_sentence(enemy, c))

        md_writer.print_chapter_sentence("All of the " + pattern.en.pluralize(race) + " were defeated.")
Beispiel #18
0
    def generate_sentences(self):
        md_writer.print_chapter_sentence(self.setting_sentence(self.state))

        for i in range(10):
            r = random.random()
            if r < 0.2 and self.state.get_current_setting().has_more_lore():
                md_writer.print_chapter_sentence(
                    self.generate_lore_sentence(self.state))
            elif r < 0.3:
                md_writer.print_chapter_sentence(
                    self.state.generate_status_sentence())
            elif r < 0.5:
                md_writer.print_chapter_sentence(
                    generate_concept_sentence.generate_concept_sentence(
                        random.choice((random.choice(
                            self.state.get_characters()).first_name, None)),
                        self.state.get_current_setting().get_name()))
            else:
                if len(self.state.get_current_setting().get_props()) > 0:
                    md_writer.print_chapter_sentence(
                        self.state.get_current_setting().discover_prop(
                            random.choice((random.choice(
                                self.state.get_characters()).first_name,
                                           None)),
                            random.choice(
                                self.state.get_current_setting().get_props()),
                            self.state.get_current_setting().get_description()
                        ))
                elif len(self.state.get_current_setting().get_known_props()
                         ) > 0:
                    try:
                        print md_writer.print_chapter_sentence(
                            generate_concept_sentence.
                            generate_concept_sentence(
                                random.choice((random.choice(
                                    self.state.get_characters()).first_name,
                                               None)),
                                random.choice(self.state.get_current_setting().
                                              get_known_props())))
                    except Exception:
                        continue
    def generate_sentences(self):
        race = self.patrol[0].race
        number = num2words.numToWords(len(self.patrol))
        md_writer.print_chapter_sentence("Suddenly " + number + " " +
                                         pattern.en.pluralize(race) +
                                         " ambushed the group.")

        done = False

        while not done:
            done = True
            for npc in self.patrol:
                if npc.is_dead() == False:
                    done = False
                    break

            if done == False:
                enemy = self.living_npc()
                c = random.choice(self.state.get_characters())
                if random.random() > 0.2 or (len(enemy.injuries) > 0
                                             and random.random() > 0.5):
                    if c.challenge('combat'):  # c attacks e
                        md_writer.print_chapter_sentence(
                            self.hit_sentence(c, enemy))
                        enemy.add_injury(c)
                    else:  # c misses e
                        md_writer.print_chapter_sentence(
                            self.miss_sentence(c, enemy))
                else:  # e attack c
                    if not c.challenge('combat'):
                        md_writer.print_chapter_sentence(
                            self.hit_sentence(enemy, c))
                        c.add_injury(enemy)
                    else:  # e misses c
                        md_writer.print_chapter_sentence(
                            self.miss_sentence(enemy, c))

        md_writer.print_chapter_sentence("All of the " +
                                         pattern.en.pluralize(race) +
                                         " were defeated.")
    def generate_sentences(self):
        c1 = random.choice(self.state.get_characters())
        c = random.choice(self.state.get_characters())
        others = [char for char in self.state.get_characters() if char.get_name() != c.get_name()]
        md_writer.print_chapter_sentence(self.state.generate_food_sentence(c1))
        md_writer.print_chapter_sentence(c.get_name() + ' decided to go ' + self.method + '.')
        memory = c.get_memory(self.method)
        if memory != None:
            md_writer.print_chapter_sentence(memory)

        food = 0
        if self.method == 'hunting':
            food = self.hunting(c)
        elif self.method == 'searching for food':
            food = self.searching(c)
        else:
            food = self.fishing(c)

        if food > 0:
            md_writer.print_chapter_sentence(c.get_name() + ' returned to ' + others[0].get_name() + ' with ' + c.get_possessive_pronoun() + ' food.')
            md_writer.print_chapter_sentence(says_sentence(others[0], 'Great job ' + c.get_name()))
            c.set_positive_quality()
        else:
            md_writer.print_chapter_sentence(c.get_name() + ' returned to ' + others[0].get_name() + ' empty handed.')
            md_writer.print_chapter_sentence(says_sentence(c, "We will have to just keep going, there was no food to find here"))
            if random.random() < 0.5:
                c.set_negative_quality()

        self.state.add_food(food)
    def fishing(self, c):
        fishing_location = random.choice(
            ['clear pool', 'gentle stream', 'burbling brook', 'rapid river'])

        # Find a place to fish
        md_writer.print_chapter_sentence(
            c.get_pronoun().title() + ' searched the ' +
            self.state.get_current_setting().get_name() +
            ' for a place to go fishing.')
        if c.challenge('survival'):
            md_writer.print_chapter_sentence('Nearby, ' + c.get_pronoun() +
                                             ' found a ' + fishing_location +
                                             '.')
        else:
            md_writer.print_chapter_sentence(
                c.get_pronoun().title() +
                ' searched far and wide, but there were no suitable fishing locations nearby.'
            )
            return 0

        if random.random() < 0.05:
            md_writer.print_chapter_sentence(
                self.state.get_current_setting().mood_sentence())

        # See what you catch
        md_writer.print_chapter_sentence(c.get_name() + " cast " +
                                         c.get_possessive_pronoun() +
                                         " net into the " + fishing_location +
                                         ".")

        fish_adj = random.choice([
            '', '', '', '', 'huge', 'slimey', 'gigantic', 'mutated', 'unusual',
            'wiggly', 'smelly', 'odd', 'beautiful'
        ])
        fish = fish_adj + ' ' + random.choice([
            'bass', 'catfish', 'trout', 'mud sunfish', 'bluegill',
            'brown bullhead', 'black crappie', 'brown trout', 'carp',
            'calico bass', 'channel catfish', 'creek chubsucker',
            'chain pickerel', 'fallfish', 'green sunfish', 'largemouth bass',
            'longnose sucker', 'pumpkinseed', 'rainbow trout',
            'smallmouth bass', 'white catfish', 'white perch', 'white sucker',
            'yellow bullhead', 'yellow perch'
        ])
        if c.challenge('survival'):
            md_writer.print_chapter_sentence(
                'There was a ' + random.choice(['sharp', 'gentle']) +
                ' tug on ' + c.get_possessive_pronoun() + ' line.')
            md_writer.print_chapter_sentence(c.get_name() + ' pulled in a ' +
                                             fish + '!')
            return random.randint(7, 10)
        else:
            md_writer.print_chapter_sentence(
                'After a relaxing hour without any bites ' + c.get_name() +
                ' fell asleep and gave up on fishing.')
            return 0
    def fishing(self, c):
        fishing_location = random.choice(['clear pool', 'gentle stream', 'burbling brook', 'rapid river'])

        # Find a place to fish
        md_writer.print_chapter_sentence(c.get_pronoun().title() + ' searched the ' + self.state.get_current_setting().get_name() + ' for a place to go fishing.')
        if c.challenge('survival'):
            md_writer.print_chapter_sentence('Nearby, ' + c.get_pronoun() + ' found a ' + fishing_location + '.')
        else:
            md_writer.print_chapter_sentence(c.get_pronoun().title() + ' searched far and wide, but there were no suitable fishing locations nearby.')
            return 0

        if random.random() < 0.05:
            md_writer.print_chapter_sentence(self.state.get_current_setting().mood_sentence())

        # See what you catch
        md_writer.print_chapter_sentence(c.get_name() + " cast " + c.get_possessive_pronoun() + " net into the " + fishing_location + ".")

        fish_adj = random.choice(['', '', '', '', 'huge', 'slimey', 'gigantic', 'mutated', 'unusual', 'wiggly', 'smelly', 'odd', 'beautiful'])
        fish = fish_adj + ' ' + random.choice(['bass', 'catfish', 'trout', 'mud sunfish', 'bluegill', 'brown bullhead', 'black crappie', 'brown trout', 'carp', 'calico bass', 'channel catfish', 'creek chubsucker', 'chain pickerel', 'fallfish', 'green sunfish', 'largemouth bass', 'longnose sucker', 'pumpkinseed', 'rainbow trout', 'smallmouth bass', 'white catfish', 'white perch', 'white sucker', 'yellow bullhead', 'yellow perch'])
        if c.challenge('survival'):
            md_writer.print_chapter_sentence('There was a ' + random.choice(['sharp', 'gentle']) + ' tug on ' + c.get_possessive_pronoun() + ' line.')
            md_writer.print_chapter_sentence(c.get_name() + ' pulled in a ' + fish + '!')
            return random.randint(7, 10)
        else:
            md_writer.print_chapter_sentence('After a relaxing hour without any bites ' + c.get_name() + ' fell asleep and gave up on fishing.')
            return 0
    def generate_sentences(self):
        md_writer.print_chapter_sentence(self.state.character_list() +
                                         " made camp.")

        energy = 0

        cs = self.state.get_characters()
        random.shuffle(cs)
        c1 = cs[0]
        c2 = cs[1]
        c3 = cs[2]

        sentences = []

        if random.random() < 0.05:
            md_writer.print_chapter_sentence(
                self.state.get_current_setting().mood_sentence())

        md_writer.print_chapter_sentence(c1.get_name() +
                                         ' searched for dry wood for a fire.')
        if c1.challenge('survival'):
            wood_found = random.choice([
                'dry ash kindling', ' birch twigs', 'large dried mushrooms',
                'grassy dried reeds', 'dessicated cow dung'
            ])
            location = random.choice([
                'in a nearby copse', 'inside a hollow log',
                'beneath a spindly pine', 'along the ' +
                self.state.get_current_setting().get_name() + ' floor'
            ])
            md_writer.print_chapter_sentence(c1.get_pronoun().title() +
                                             ' found ' + wood_found + ' ' +
                                             location + '.')
            fire_sound = random.choice(['roaring', 'crackling', 'hissing'])
            fire_type = random.choice(['campfire', 'blaze', 'bonfire'])
            md_writer.print_chapter_sentence(c2.get_name() + ' started a ' +
                                             fire_sound + ' ' + fire_type +
                                             '.')
            energy += 5
            md_writer.print_chapter_sentence('While ' + c1.get_name() +
                                             ' and ' + c2.get_name() +
                                             ' made a fire, ' + c3.get_name() +
                                             ' scouted around the campsite.')
        else:
            md_writer.print_chapter_sentence(
                c1.get_pronoun().title() +
                ' searched for an hour, but all the wood was wet, and ' +
                c1.get_pronoun() + ' gave up' + '.')
            md_writer.print_chapter_sentence('Meanwhile, ' + c3.get_name() +
                                             ' went scouting.')

        if random.random() < 0.05:
            md_writer.print_chapter_sentence(
                self.state.get_current_setting().mood_sentence())

        if c3.challenge('survival'):
            sense = random.choice(
                ['saw', 'heard', 'spotted', 'noticed', 'observed'])
            grouping = random.choice(['band', 'family', 'patrol'])
            race = random.choice(self.words.fantasy_races)
            critter = copy.copy(race)
            critter = pattern.en.pluralize(critter)
            md_writer.print_chapter_sentence(c3.get_pronoun().title() + ' ' +
                                             sense + ' a ' + grouping +
                                             ' of ' + critter + '.')
            characteristic = Npc(race).characteristic
            md_writer.print_chapter_sentence('One of the ' + critter +
                                             ' had ' +
                                             aOrAn.aOrAn(characteristic) +
                                             " " + characteristic + ".")
            watching_adj = random.choice(
                ['quietly', 'patiently', 'tirelessly'])
            md_writer.print_chapter_sentence(c3.get_pronoun().title() + ' ' +
                                             watching_adj + ' watched the ' +
                                             critter + '.')
            if (len(self.state.get_current_setting().get_known_props()) > 0):
                prop = random.choice(
                    self.state.get_current_setting().get_known_props())
                md_writer.print_chapter_sentence(
                    'The ' + critter + ' took the ' + prop + ' from the ' +
                    self.state.get_current_setting().get_name() + '.')
            md_writer.print_chapter_sentence(
                'But the ' + critter + ' soon left the ' +
                self.state.get_current_setting().get_name() + '.')
            energy += 5
        else:
            critter = random.choice(self.words.fantasy_races)
            self.state.add_enemy_patrol(critter)
            critter_description = c3.get_pronoun().title(
            ) + " thought " + c3.get_pronoun(
            ) + ' saw ' + pattern.en.pluralize(critter) + ' in the distance.'
            md_writer.print_chapter_sentence(critter_description)
            failure = random.choice([
                'fell in a hidden gorge', 'loudly broke a branch',
                'accidentally knocked over a boulder', 'fell asleep',
                'walked into a tree'
            ])
            md_writer.print_chapter_sentence("Suddenly, " + c3.get_pronoun() +
                                             " " + failure + '.')

        night_description = random.choice(
            ['inky', 'black', 'moonlit', 'silent', 'calm'])
        md_writer.print_chapter_sentence(night_description.title() +
                                         ' darkness fell over the camp.')

        c = random.choice(self.state.get_characters())
        if random.random() < 0.5:
            md_writer.print_chapter_sentence(c.get_name() + ' told a story.')
        else:
            md_writer.print_chapter_sentence(c.get_name() +
                                             ' sang a song from ' +
                                             c.get_possessive_pronoun() +
                                             ' childhood.')

        sleep_opening = random.choice([
            'As the fire crackled', 'While the wind gusted',
            'As gentle rain fell', 'As the leaves rustled',
            'As howls were heard in the distance',
            'As the moon shone overhead', 'Although sadness washed over them'
        ])
        md_writer.print_chapter_sentence(sleep_opening + ',' +
                                         ' they all fell asleep.')

        c = random.choice(self.state.get_characters())
        md_writer.print_chapter_sentence(
            c.get_name() + ' dreamt of a ' + self.words.get_fantasy_place() +
            ', ' + self.words.get_fantasy_occupation() + ', and ' +
            self.words.get_living_thing_adj() + ' ' +
            pattern.en.pluralize(self.words.get_living_thing()) + '.')
        energy += 5

        self.state.add_energy(energy)