Пример #1
0
    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
 def create_events(self):
     prots = set(self.subject)
     a = random.extract(prots)
     b = random.extract(prots)
     return [
         BumpIntoForceFieldEvent(subject=a),
         BecomeSadEvent(subject=a),
         EventSequence(
             WhatWasThatEvent(subject=b),
             BumpIntoForceFieldEvent(subject=b),
             BecomeSadEvent(subject=b),
         ) if b else None,
         MustRetraceStepsEvent(subject=a),
         StateDutyEvent(subject=a),
     ]
Пример #3
0
 def create_events(self):
     prots = set(self.subject)
     b = random.extract(prots, filter=lambda x: isinstance(x, MarySue))
     if not b:
         b = random.extract(prots)
     a = random.extract(prots)
     if not a:
         a = b
     e = [
         WeMustFindThemEvent(subject=a, object=self.object),
         LocationHunchEvent(subject=b, object=self.object, object2=self.object2),
     ]
     if self.setting == a.home:
         e.append(SetCourseEvent(subject=a, object=self.object2))
     else:
         e.append(WeMustGoToEvent(subject=a, object=self.object2))
     return e
Пример #4
0
 def create_events(self):
     prots = set(self.subject)
     snarker = random.extract(prots, filter=lambda x: not isinstance(x, TheOptimist))
     reader = random.extract(prots)
     e = []
     if snarker:
         e.append(EventSequence(
             BecomeSadEvent(subject=snarker),
             CommentOnPlaceEvent(subject=snarker),
         ))
         if reader:
             e.append(EventSequence(
                 TakeReadingsEvent(subject=reader),
                 ReadingsBanterEvent(subject=snarker),
             ))
     elif reader:
         e.append(TakeReadingsEvent(subject=reader))
     return e
Пример #5
0
    def create_events(self):
        prots = set(self.subject)

        ms = random.extract(prots, filter=lambda x: isinstance(x, MarySue))
        capt = random.extract(prots, filter=lambda x: isinstance(x, TheOptimist))

        assert ms and capt
        e = [
            ComplimentActionEvent(subject=capt, object=ms),
            OfferPromotionEvent(subject=capt, object=ms),
            OhYouEvent(subject=ms, object=capt),
            RefusePromotionEvent(subject=ms, object=capt),
        ]
        e += [
            EventSequence(
                BecomeHappyEvent(subject=s),
                ConvalesceEvent(subject=s),
            ) for s in self.subject
        ]
        return e
Пример #6
0
 def create_events(self):
     prots = set(self.subject)
     a = random.extract(prots)
     return [
         EncounterEvent(subject=self.object, object=self.subject),
         GoonBanterEvent(subject=a, object=self.object),
         GoonParlayEvent(subject=self.object),
     ] + [
         EventSequence(
             BecomeAngryEvent(subject=s),
         ) for s in self.subject
     ] + [
         EventSequence(    
             GenericBattleDescription(),
         )
     ]