コード例 #1
0
ファイル: plot.py プロジェクト: catseye/MARYSUE
    def create_events(self):
        e = [
            AfterBattleEvent(subject=self.object),
        ]
        s = random.choice(self.subject)
        e.append(
            EventSequence(
                AfterBattleBanterEvent(subject=random.choice(self.subject)),
            )
        )
        for s in self.subject:
            e.append(BecomeHappyEvent(subject=s))

        subjects = set(self.subject)
        a = random.extract(subjects)
        b = random.extract(subjects, filter=lambda x: not isinstance(x, TheOptimist))
        e.append(
            EventSequence(
                BecomeAngryEvent(subject=self.object2),  # b/c they need to have a mood assigned first!
                ObserveAfterBattleEvent(subject=a, object=self.object, object2=self.object2),
                RemindReportEvent(subject=a),
            )
        )
        if b:
            e.append(
                EventSequence(
                    BecomeSadEvent(subject=b),
                    IfWeGetHomeEvent(subject=b),
                )
            )

        return e
コード例 #2
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def simile(self):
     return 'like {} {}'.format(
         random.choice((
             'a tiger',
             'charcoal',
             'an elephant',
             'a ninja',
             'a gangster',
             'a giraffe',
             'a hurricane',
             'a samurai',
             'a rabid dog',
             'a crazed bull',
             'a baboon',
             'a gorilla',
         )),
         random.choice((
             'in a snowstorm',
             'in a rainstorm',
             'piloting a helicopter',
             'driving a race car',
             'in a gymnasium parking lot',
             'in a pet shop',
             'in a bazaar',
             'in a video arcade',
             'at a baseball game',
             'in a performance art piece',
             'in a jewellery store',
             'in a mosh pit',
             'at a square dance',
             'at a monster truck rally',
         )))
コード例 #3
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def simile(self):
     return 'like {} {}'.format(
         random.choice((
             'a tiger',
             'charcoal',
             'an elephant',
             'a ninja',
             'a gangster',
             'a giraffe',
             'a hurricane',
             'a samurai',
             'a rabid dog',
             'a crazed bull',
             'a baboon',
             'a gorilla',
         )),
         random.choice((
             'in a snowstorm',
             'in a rainstorm',
             'piloting a helicopter',
             'driving a race car',
             'in a gymnasium parking lot',
             'in a pet shop',
             'in a bazaar',
             'in a video arcade',
             'at a baseball game',
             'in a performance art piece',
             'in a jewellery store',
             'in a mosh pit',
             'at a square dance',
             'at a monster truck rally',
         ))
     )
コード例 #4
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def costume_decoration(self):
     if random.chance(75):
         return ''
     return random.choice(self.costume_decorations).format(
         colour=self.colour,
         costume_material=random.choice(self.costume_materials),
     )
コード例 #5
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def costume_decoration(self):
     if random.chance(75):
         return ''
     return random.choice(self.costume_decorations).format(
         colour=self.colour,
         costume_material=random.choice(self.costume_materials),
     )
コード例 #6
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def __init__(self, names, **kwargs):
     super(FeminineCharacter, self).__init__(names, **kwargs)
     self.feature_adj = random.choice((
         'small', 'perky', 'narrow', 'large',
     ))
     self.feature = random.choice((
         'nose', 'mouth', 'forehead', 'chin',
     ))
コード例 #7
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def costume_decoration(self):
     return random.choice(self.costume_decorations).format(
         colour=self.colour,
         costume_material=random.choice(self.costume_materials),
         gems=random.choice((
             'jewels', 'gems', 'rubies', 'emeralds', 'sapphires',
         )),
     )
コード例 #8
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def __init__(self, names, **kwargs):
     super(MasculineCharacter, self).__init__(names, **kwargs)
     self.feature_adj = random.choice((
         'strong', 'deep', 'wide', 'large',
     ))
     self.feature = random.choice((
         'nose', 'mouth', 'brow', 'chin',
     ))
コード例 #9
0
ファイル: plot.py プロジェクト: catseye/MARYSUE
    def create_events(self):
        from marysue.events import get_all_event_classes

        classes = get_all_event_classes()
        z = [random.choice(classes) for x in xrange(0, 20)]
        z = [cls(subject=random.choice(subjects),
                 object=random.choice(subjects)) for cls in z]

        return z
コード例 #10
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def yet(self):
     return '{} yet {}'.format(
         random.choice((
             'smooth', 'graceful', 'gentle', 'supple', 'soft', 'exquisite',
         )),
         random.choice((
             'powerful', 'forceful', 'firm', 'masterful', 'confident', 'strong',
         ))
     )
コード例 #11
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def __init__(self, names, **kwargs):
     super(BadGal, self).__init__(names, **kwargs)
     self.feature_adj = random.choice((
         'ugly', 'jutting', 'overbearing', 'scarred',
     ))
     self.feature = random.choice((
         'nose', 'mouth', 'brow', 'chin',
     ))
     self.hair_colour = random.choice((
         'black', 'platinum blonde', 'white', 'green',
     ))
コード例 #12
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def costume_decoration(self):
     return random.choice(self.costume_decorations).format(
         colour=self.colour,
         costume_material=random.choice(self.costume_materials),
         gems=random.choice((
             'jewels',
             'gems',
             'rubies',
             'emeralds',
             'sapphires',
         )),
     )
コード例 #13
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def __init__(self, names, **kwargs):
     super(DreamBoat, self).__init__(names, **kwargs)
     self.feature_adj = random.choice((
         'handsome', 'perfect', 'beautiful', 'enthralling',
     ))
     self.feature = random.choice((
         'nose', 'mouth', 'brow', 'chin',
     ))
     self.stature = random.choice((
         'a bit on the short side, but in a cute way',
         'of perfectly normal height like a normal person should be',
         'quite tall, but really handsomely tall, not freakishly tall',
     ))
コード例 #14
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def __init__(self, names, **kwargs):
     super(FeminineCharacter, self).__init__(names, **kwargs)
     self.feature_adj = random.choice((
         'small',
         'perky',
         'narrow',
         'large',
     ))
     self.feature = random.choice((
         'nose',
         'mouth',
         'forehead',
         'chin',
     ))
コード例 #15
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def __init__(self, names, **kwargs):
     super(MasculineCharacter, self).__init__(names, **kwargs)
     self.feature_adj = random.choice((
         'strong',
         'deep',
         'wide',
         'large',
     ))
     self.feature = random.choice((
         'nose',
         'mouth',
         'brow',
         'chin',
     ))
コード例 #16
0
def make_costume(character, item_choices):
    adjective = character.costume_adjective
    if adjective:
        adjective = adjective + ' '
    colour = character.colour
    material = random.choice(character.costume_materials)
    (item, cls_) = random.choice(item_choices)
    with_ = character.costume_decoration

    names = (
        '{}{} {} {}{}'.format(adjective, colour, material, item, with_),
        item
    )

    return cls_(names=names)
コード例 #17
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
コード例 #18
0
ファイル: plot.py プロジェクト: catseye/MARYSUE
    def create_events(self):
        s = self.subject
        duty = RetrieveDuty(self.object)
        e = [
            LookAroundEvent(subject=s),
            HoldEvent(subject=s, object=self.object),
            #CommentOnItemEvent(subject=s, object=self.object),
            TripEvent(subject=s),
            DropEvent(subject=s, object=self.object),
            LoseEvent(subject=self.object),
            BecomeEmbarrassedEvent(subject=s),
            OopsEvent(subject=s),
            AcquireDutyEvent(subject=s, object=duty),
        ]
        for bystander in self.bystanders:
            e.append(BecomeSadEvent(subject=bystander))
            e.append(AcquireDutyEvent(subject=bystander, object=duty))
            e.append(
                random.choice((
                    LookAtEvent(subject=bystander, object=s),
                    GestureAtEvent(subject=bystander, object=s),
                ))
            )

        return e
コード例 #19
0
ファイル: plot.py プロジェクト: catseye/MARYSUE
 def create_events(self):
     e = [BecomeHappyEvent(subject=s) for s in self.subject]
     seen = set()
     for s in self.subject:
         if not seen or random.chance(66):
             if random.chance(85):
                 e.append(PoseDescription(subject=s))
             else:
                 e.append(random.choice((
                     OutOfEggsEvent(subject=s),
                     GenericHyperCrystalUsageEvent(subject=s),
                 )))
         if seen and random.chance(66):
             e.append(GreetEvent(subject=s, object=random.choice(seen)))
         seen.add(s)
     return e
コード例 #20
0
ファイル: state.py プロジェクト: catseye/MARYSUE
 def emoted(self):
     assert self.mood, 'mood not assigned to %r' % self
     emoteds = {
         'happy': (
             'smiled',
             'whistled',
             'grinned',
             'beamed',
             'winked',
         ),
         'sad': (
             'frowned',
             'gasped',
             'blinked',
             'pouted',
         ),
         'angry': (
             'frowned',
             'grimaced',
             'blinked',
         ),
         'embarrassed': (
             'blushed',
             'frowned',
             'looked away',
         ),
     }
     return random.choice(emoteds[self.mood])
コード例 #21
0
ファイル: publisher.py プロジェクト: catseye/MARYSUE
    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
コード例 #22
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def wearing(self):
     return random.choice((
         'wearing',
         'sporting',
         'looking exciting in',
         'resplendent in',
         'looking ready for action in',
     ))
コード例 #23
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def wearing(self):
     return random.choice((
         'wearing',
         'looking frumpy in',
         'looking tastless in',
         'looking completely unimpressive in',
         'gotten up in',
     ))
コード例 #24
0
ファイル: plot.py プロジェクト: catseye/MARYSUE
 def create_events(self):
     holder = self.subject
     asker = random.choice(self.bystanders)
     return [
         EventSequence(
             RememberMacGuffinEvent(subject=asker, object=holder, object2=self.object),
         )
     ]
コード例 #25
0
ファイル: state.py プロジェクト: catseye/MARYSUE
 def emoted(self):
     assert self.mood, "mood not assigned to %r" % self
     emoteds = {
         "happy": ("smiled", "whistled", "grinned", "beamed", "winked"),
         "sad": ("frowned", "gasped", "blinked", "pouted"),
         "angry": ("frowned", "grimaced", "blinked"),
         "embarrassed": ("blushed", "frowned", "looked away"),
     }
     return random.choice(emoteds[self.mood])
コード例 #26
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def wearing(self):
     return random.choice((
         'wearing',
         'looking menacing in',
         'looking villanous in',
         'looking impressive in',
         'gotten up in',
         'looking intimidating in',
     ))
コード例 #27
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def yet(self):
     return '{} yet {}'.format(
         random.choice((
             'smooth',
             'graceful',
             'gentle',
             'supple',
             'soft',
             'exquisite',
         )),
         random.choice((
             'powerful',
             'forceful',
             'firm',
             'masterful',
             'confident',
             'strong',
         )))
コード例 #28
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def __init__(self, names, **kwargs):
     super(DreamBoat, self).__init__(names, **kwargs)
     self.feature_adj = random.choice((
         'handsome',
         'perfect',
         'beautiful',
         'enthralling',
     ))
     self.feature = random.choice((
         'nose',
         'mouth',
         'brow',
         'chin',
     ))
     self.stature = random.choice((
         'a bit on the short side, but in a cute way',
         'of perfectly normal height like a normal person should be',
         'quite tall, but really handsomely tall, not freakishly tall',
     ))
コード例 #29
0
ファイル: state.py プロジェクト: catseye/MARYSUE
 def _fnite(self):
     # helper function
     if not self.first_occurrence:
         if len(self.object.names) == 1:
             return self.object.name
         else:
             r = random.choice(self.object.names[1:])
             return r.replace("{rank}", str(getattr(self.object, "rank", "")))
     else:
         return self.object.name
コード例 #30
0
ファイル: plot.py プロジェクト: catseye/MARYSUE
 def create_events(self):
     holder = self.subject
     asker = random.choice(self.bystanders)
     return [
         EventSequence(
             IntroduceItemEvent(subject=holder, object=self.object),
             AskAboutItemEvent(subject=asker, object=self.object),
             ReplyAboutItemEvent(subject=holder, object=asker),
         )
     ]
コード例 #31
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def __init__(self, names, **kwargs):
     super(BadGal, self).__init__(names, **kwargs)
     self.feature_adj = random.choice((
         'ugly',
         'jutting',
         'overbearing',
         'scarred',
     ))
     self.feature = random.choice((
         'nose',
         'mouth',
         'brow',
         'chin',
     ))
     self.hair_colour = random.choice((
         'black',
         'platinum blonde',
         'white',
         'green',
     ))
コード例 #32
0
ファイル: state.py プロジェクト: catseye/MARYSUE
 def _fnite(self):
     # helper function
     if not self.first_occurrence:
         if len(self.object.names) == 1:
             return self.object.name
         else:
             r = random.choice(self.object.names[1:])
             return r.replace('{rank}', str(getattr(self.object, 'rank',
                                                    '')))
     else:
         return self.object.name
コード例 #33
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def __init__(self, names, **kwargs):
     super(Character, self).__init__(names, **kwargs)
     self.stature = random.choice((
         'somewhat short',
         'of average height',
         'rather tall',
     ))
     self.hair_length = random.choice((
         'long',
         'shoulder length',
         'short',
         'close cropped',
     ))
     self.hair_colour = random.choice((
         'blonde', 'brown', 'red', 'auburn', 'black',
     ))
     self.eye_colour = random.choice((
         'brown', 'blue', 'grey', 'green', 'hazel',
     ))
     self.war_cry = "BY THE " + random.choice((
         'MOONS',
         'RINGS',
         'MOUNTAINS',
         'METEORS',
     )) + " OF " + random.choice((
         'VENUS',
         'MARS',
         'JUPITER',
         'NEPTUNE',
     ))
コード例 #34
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def __init__(self, names, **kwargs):
     super(MarySue, self).__init__(names, **kwargs)
     self.feature_adj = random.choice((
         'wicked cute', 'perfect', 'beautiful', 'enchanting',
     ))
     self.feature = random.choice((
         'nose', 'mouth', 'forehead', 'chin',
     ))
     self.stature = random.choice((
         'enchantingly petite',
         'a bit on the short side, but in a cute way',
         'neither short nor tall but not average either',
         'sort of tall for a girl, but not in a bad way',
     ))
     self.hair_length = random.choice((
         'exceptionally long (down to her knees)',
         'wicked long (down to her knees)',
         'beautiful long',
         'perky shoulder length',
     ))
     self.hair_colour = random.choice((
         'purple', 'indigo', 'violet', 'midnight black',
         'black and purple',
         'multi coloured', 'rainbow coloured', 'multi hued',
         'rainbow hued', 'shimmering rainbow coloured',
         'shimmering multi hued', 'shimmering rainbow hued',
     ))
     self.eye_colour = random.choice((
         'purple', 'indigo', 'violet', 'icy blue',
         'multi coloured', 'rainbow coloured', 'multi hued', 'rainbow hued',
         'shimmering multi coloured', 'shimmering rainbow coloured', 'shimmering multi hued', 'shimmering rainbow hued',
         'kaleidoscope coloured', 'shimmering kaleidoscope coloured',
     ))
コード例 #35
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def __init__(self, names, **kwargs):
     super(MarySue, self).__init__(names, **kwargs)
     self.feature_adj = random.choice((
         'wicked cute',
         'perfect',
         'beautiful',
         'enchanting',
     ))
     self.feature = random.choice((
         'nose',
         'mouth',
         'forehead',
         'chin',
     ))
     self.stature = random.choice((
         'enchantingly petite',
         'a bit on the short side, but in a cute way',
         'neither short nor tall but not average either',
         'sort of tall for a girl, but not in a bad way',
     ))
     self.hair_length = random.choice((
         'exceptionally long (down to her knees)',
         'wicked long (down to her knees)',
         'beautiful long',
         'perky shoulder length',
     ))
     self.hair_colour = random.choice((
         'purple',
         'indigo',
         'violet',
         'midnight black',
         'black and purple',
         'multi coloured',
         'rainbow coloured',
         'multi hued',
         'rainbow hued',
         'shimmering rainbow coloured',
         'shimmering multi hued',
         'shimmering rainbow hued',
     ))
     self.eye_colour = random.choice((
         'purple',
         'indigo',
         'violet',
         'icy blue',
         'multi coloured',
         'rainbow coloured',
         'multi hued',
         'rainbow hued',
         'shimmering multi coloured',
         'shimmering rainbow coloured',
         'shimmering multi hued',
         'shimmering rainbow hued',
         'kaleidoscope coloured',
         'shimmering kaleidoscope coloured',
     ))
コード例 #36
0
ファイル: plot.py プロジェクト: catseye/MARYSUE
 def create_events(self):
     e = []
     # maybe later a fight will have all subjects.  FOR NOW,
     s = random.choice(self.subject)
     w = s.weapon
     e.append(
         EventSequence(
             WarCryEvent(subject=s),
             UnsheathEvent(subject=s, object=w),
             LiftWeaponEvent(subject=s, object=w),
             BringDownWeaponEvent(subject=s, object=w),
             WeaponContactEvent(subject=w, object=self.object),
             FlyAcrossEvent(subject=self.object),
         )
     )
     return e
コード例 #37
0
ファイル: plot.py プロジェクト: catseye/MARYSUE
 def create_events(self):
     s = self.subject
     duty = RescueDuty(self.subject)
     return [
         RumblingSoundEvent(),
         WhatWasThatNoiseEvent(subject=random.choice(self.bystanders)),
         CaveInEvent(subject=self.setting.roof),
         StunnedEvent(subject=s),
         BuriedUnderRubbleEvent(subject=s),
         BecomeSadEvent(subject=s),
     ] + [
         EventSequence(
             BecomeSadEvent(subject=bystander),
             PanicEvent(subject=bystander),
             AcquireDutyEvent(subject=bystander, object=duty),
         ) for bystander in self.bystanders
     ]
コード例 #38
0
ファイル: plot.py プロジェクト: catseye/MARYSUE
 def create_events(self):
     s = self.subject
     duty = RetrieveDuty(self.object)
     return [
         LookAroundEvent(subject=s),
         HunchEvent(subject=s),
         LookBehindEvent(subject=s, object=self.setting.nearby_scenery),
         FindEvent(subject=s, object=self.object),
         RelieveDutyEvent(subject=s, object=duty),
         BecomeHappyEvent(subject=s),
     ] + [
         EventSequence(
             RelieveDutyEvent(subject=bystander, object=duty),
             BecomeHappyEvent(subject=bystander),
         ) for bystander in self.bystanders
     ] + [
         ReliefEvent(subject=random.choice(self.bystanders))
     ]
コード例 #39
0
ファイル: plot.py プロジェクト: catseye/MARYSUE
 def create_events(self):
     # Note: even though this is a different Duty object than was
     # put in the character's duties list, apparently it will work
     # because we made these things immutable -- they hash the same.
     duty = RescueDuty(self.object)
     return [
         KeepMovingEvent(subject=random.choice(self.subject)),
         #WhatWasThatNoiseEvent(subject=random.choice(self.subject)),
         TurnCornerEvent(subject=self.subject),
         BehindBarsDescription(subject=self.object),
     ] + [
         RescueEvent(subject=self.subject, object=self.object),
         BecomeHappyEvent(subject=self.object),
     ] + [
         RelieveDutyEvent(subject=s, object=duty) for s in self.subject
     ] + [
         EventSequence(
             ThankEvent(subject=self.object, object=s),
             BecomeHappyEvent(subject=s),
         ) for s in self.subject
     ]
コード例 #40
0
ファイル: plot.py プロジェクト: catseye/MARYSUE
 def create_events(self):
     all_protagonists = list(self.bystanders) + [self.object]
     perp = self.subject
     duty = RescueDuty(self.object)
     return [
         BecomeHappyEvent(subject=perp),
         AppearEvent(subject=perp),
     ] + [
         BecomeAngryEvent(subject=s) for s in all_protagonists
     ] + [
         NoticeAntagonistEvent(subject=random.choice(self.bystanders), object=perp),
         CackleEvent(subject=perp),
         AntagonistBanterEvent(subject=perp),
         AbductEvent(subject=perp, object=self.object),
         DisappearEvent(subject=perp, object=self.object),
     ] + [
         EventSequence(
             BecomeAngryEvent(subject=s),
             PanicEvent(subject=s),
             AcquireDutyEvent(subject=s, object=duty),
         ) for s in self.bystanders
     ]
コード例 #41
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def __init__(self, names, **kwargs):
     super(Character, self).__init__(names, **kwargs)
     self.stature = random.choice((
         'somewhat short',
         'of average height',
         'rather tall',
     ))
     self.hair_length = random.choice((
         'long',
         'shoulder length',
         'short',
         'close cropped',
     ))
     self.hair_colour = random.choice((
         'blonde',
         'brown',
         'red',
         'auburn',
         'black',
     ))
     self.eye_colour = random.choice((
         'brown',
         'blue',
         'grey',
         'green',
         'hazel',
     ))
     self.war_cry = "BY THE " + random.choice((
         'MOONS',
         'RINGS',
         'MOUNTAINS',
         'METEORS',
     )) + " OF " + random.choice((
         'VENUS',
         'MARS',
         'JUPITER',
         'NEPTUNE',
     ))
コード例 #42
0
 def nearby_scenery(self):
     return random.choice(tuple(x for x in self._nearby if not x.takeable))
コード例 #43
0
ファイル: events.py プロジェクト: catseye/MARYSUE
 def render(self):
     if self.subject.legs_costume:
         template = random.choice(self.two_piece_templates)
     else:
         template = random.choice(self.one_piece_templates)
     return self.render_t(template)
コード例 #44
0
 def nearby(self):
     return random.choice(self._nearby)
コード例 #45
0
 def nearby_takeable(self):
     return random.choice(tuple(x for x in self._nearby if x.takeable))
コード例 #46
0
 def render(self):
     if self.subject.legs_costume:
         template = random.choice(self.two_piece_templates)
     else:
         template = random.choice(self.one_piece_templates)
     return self.render_t(template)
コード例 #47
0
ファイル: objects.py プロジェクト: catseye/MARYSUE
 def colour(self):
     return random.choice(self.colours)
コード例 #48
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def wearing(self):
     return random.choice(('wearing', 'sporting', 'looking fine in',
                           'looking smashing in', 'looking delightful in',
                           'looking impressive in', 'decked out in'))
コード例 #49
0
 def pick_one(match):
     return random.choice(tuple(match.group(1).split('|')))
コード例 #50
0
ファイル: settings.py プロジェクト: catseye/MARYSUE
 def nearby_takeable(self):
     return random.choice(tuple(x for x in self._nearby if x.takeable))
コード例 #51
0
ファイル: state.py プロジェクト: catseye/MARYSUE
 def pick_duty(self):
     if self.duties:
         return random.choice(self.duties)
     else:
         return Duty(names=('uphold the code of the Star Fighters', ))
コード例 #52
0
ファイル: state.py プロジェクト: catseye/MARYSUE
 def shouted(self):
     assert self.mood, 'mood not assigned to %r' % self
     return random.choice(self.shouteds[self.mood])
コード例 #53
0
 def colour(self):
     return random.choice(self.colours)
コード例 #54
0
ファイル: settings.py プロジェクト: catseye/MARYSUE
 def nearby_scenery(self):
     return random.choice(tuple(x for x in self._nearby if not x.takeable))
コード例 #55
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def costume_adjective(self):
     if random.chance(4):
         return 'WICKED AWESOME'
     else:
         return random.choice(self.costume_adjectives)
コード例 #56
0
ファイル: state.py プロジェクト: catseye/MARYSUE
 def adverb(self):
     assert self.mood, 'mood not assigned to %r' % self
     adverbs = {
         'happy': (
             'courageously',
             'obsequiously',
             'fawningly',
             'blissfully',
             'virtuously',
             'happily',
             'lightly',
             'energetically',
             'laughingly',
             'placidly',
             'peacefully',
             'calmly',
             'enigmatically',
             'strongly',
             'firmly',
         ),
         'sad': (
             'drily',
             'heavily',
             'irritatedly',
             'exasperatedly',
             'slowly',
             'drably',
             'unhappily',
             'sadly',
             'irksomely',
             'weakly',
             'downheartedly',
             'grumpily',
             'enigmatically',
         ),
         'angry': (
             'viciously',
             'menacingly',
             'drily',
             'gratingly',
             'heavily',
             'threateningly',
             'firmly',
             'impatiently',
             'icily',
             'acidly',
             'sternly',
             'emphatically',
             'annoyingly',
             'irritatedly',
             'exasperatedly',
             'outrageously',
             'strongly',
             'enigmatically',
             # 'cunningly', 'slyly',
         ),
         'embarrassed': (
             'awkwardly',
             'slumblingly',
             'coyly',
             'slowly',
             'carefully',
             'painfully',
             'painingly',
             'enigmatically',
             # 'cunningly', 'slyly',
         ),
     }
     return random.choice(adverbs[self.mood])
コード例 #57
0
ファイル: settings.py プロジェクト: catseye/MARYSUE
 def nearby(self):
     return random.choice(self._nearby)
コード例 #58
0
ファイル: characters.py プロジェクト: catseye/MARYSUE
 def costume_adjective(self):
     if random.chance(60):
         return ''
     else:
         return random.choice(self.costume_adjectives)