Пример #1
0
    def pick_title(self, plot):
        titles = [o.definite for o in self.suggest_title_objects(plot)]
        if not titles:
            titles = ['The Destiny of Fate']
        base_title = capitalize(random.choice(tuple(titles)))
        prefixes = [
            'The Return of ',
            'The Revenge of ',
            'The Scourge of ',
            'The Menace of ',
            'The Secret of ',
            'The Time of ',
            'The Scourge of ',
            'The Mystery of ',
            'The Phantom of ',
        ]
        multipref = []
        for a in prefixes:
            for b in prefixes:
                multipref.append(a + b)
        prefixes.extend(multipref)

        title = base_title
        while title in self.used_titles:
            title = prefixes.pop(0) + base_title
        self.used_titles.add(title)

        return title
Пример #2
0
    def pick_title(self, plot):
        titles = [o.definite for o in self.suggest_title_objects(plot)]
        if not titles:
            titles = ['The Destiny of Fate']
        base_title = capitalize(random.choice(tuple(titles)))
        prefixes = [
            'The Return of ',
            'The Revenge of ',
            'The Scourge of ',
            'The Menace of ',
            'The Secret of ',
            'The Time of ',
            'The Scourge of ',
            'The Mystery of ',
            'The Phantom of ',
        ]
        multipref = []
        for a in prefixes:
            for b in prefixes:
                multipref.append(a + b)
        prefixes.extend(multipref)
    
        title = base_title
        while title in self.used_titles:
            title = prefixes.pop(0) + base_title
        self.used_titles.add(title)

        return title
Пример #3
0
    def render(self):
        from marysue.events import Event

        s = ''
        for child in self:
            s += capitalize(child.render())
            if isinstance(child, Event) and child.exciting:
                s += '!  '
            else:
                s += '.  '
        return s.rstrip()
Пример #4
0
 def render(self):
     return '\n\n'.join([capitalize(child.render()) for child in self])