コード例 #1
0
    def NPC_offers(self, camp):
        mylist = list()
        mychallenge: pbge.challenges.Challenge = self.elements["CHALLENGE"]

        if "threat" in mychallenge.data:
            mylist.append(
                Offer(
                    "[HELLO] I need to obtain more mecha for the battle against {}."
                    .format(mychallenge.data["threat"]),
                    ContextTag([
                        context.HELLO,
                    ])))
        else:
            mylist.append(
                Offer(
                    "[HELLO] I need to obtain more mecha for the war effort.",
                    ContextTag([
                        context.HELLO,
                    ])))

        ghdialogue.SkillBasedPartyReply(
            Offer(
                "[THANKS_FOR_HELP] With your guidance we've been able to strip one wreck for the parts to get two more running again.",
                ContextTag([
                    context.CUSTOM,
                ]),
                effect=self._win_the_mission,
                subject="obtain more mecha",
                data={
                    "reply":
                    "I can use my repair knowledge to help you get some of these wrecks back into working order."
                }), camp, mylist, gears.stats.Knowledge, gears.stats.Repair,
            self.rank, gears.stats.DIFFICULTY_HARD)

        ghdialogue.SkillBasedPartyReply(
            Offer(
                "[THANKS_FOR_HELP] The improvements you've suggested should produce immediate savings in both time and resources.",
                ContextTag([
                    context.CUSTOM,
                ]),
                effect=self._win_the_mission,
                subject="obtain more mecha",
                data={
                    "reply":
                    "My scientific knowledge might be able to increase your mecha production capacity."
                }), camp, mylist, gears.stats.Knowledge, gears.stats.Science,
            self.rank, gears.stats.DIFFICULTY_AVERAGE)

        if self._rumor_memo_delivered:
            mylist.append(
                Offer(
                    "Yes, I've been hard at work to obtain more mecha for {}. We have a ton of salvage, but nothing that will put up a fight."
                    .format(mychallenge.key[0]),
                    ContextTag([
                        context.INFO,
                    ]),
                    data={"subject": "the war effort"}))

        return mylist
コード例 #2
0
    def _get_generic_offers(self, npc: gears.base.Character, camp: gears.GearHeadCampaign):
        """Get any offers that could apply to non-element NPCs."""
        goffs = list()
        if npc.faction is self.elements["FACTION"]:
            rank = self.rank + 10 - npc.get_reaction_score(camp.pc, camp)//10
            qol: gears.QualityOfLife = self.elements["METRO"].get_quality_of_life()
            if qol.defense > 0:
                # This town has good defenses. Convincing them to help will be easier.
                diff = gears.stats.DIFFICULTY_EASY
            elif qol.defense < 0:
                diff = gears.stats.DIFFICULTY_LEGENDARY
            else:
                diff = gears.stats.DIFFICULTY_AVERAGE

            goffs.append(Offer(
                "[YOUR_PLAN_IS_HOPELESS] {}".format(random.choice(self.RETORTS)),
                context=ContextTag((context.CUSTOM,)), subject=self, subject_start=True,
                data={"reply":random.choice(self.PLEAS).format(**self.elements)}
            ))

            ghdialogue.SkillBasedPartyReply(
                Offer(
                    "Alright, when you fight Cetus, you will have the support of {}.".format(self.elements["METROSCENE"]),
                    context=ContextTag((context.CUSTOMREPLY,)), subject=self,
                    data={"reply":self.NEGCHARM[min(camp.campdata.get(DZDCVAR_NUM_ALLIANCES,0),3)]},
                    effect=self._win_plot
                ), camp, goffs, gears.stats.Charm, gears.stats.Negotiation, rank, diff
            )

        return goffs
コード例 #3
0
    def NPC_offers(self, camp):
        mylist = list()

        subject = random.choice(
            self.elements["CHALLENGE"].data["challenge_statements"])

        mylist.append(
            Offer("[HELLO] [CONTROVERSIAL_OPINION]",
                  ContextTag([
                      context.HELLO,
                  ]),
                  data={"opinion": subject}))

        ghdialogue.SkillBasedPartyReply(
            Offer(
                "[MAYBE_YOU_ARE_RIGHT_ABOUT_OPINION] [I_MUST_CONSIDER_MY_NEXT_STEP]",
                ContextTag([
                    context.CUSTOM,
                ]),
                effect=self._win_the_mission,
                data={
                    "reply":
                    "[HAVE_YOU_CONSIDERED]",
                    "consider_this":
                    random.choice(
                        self.elements["CHALLENGE"].data["pc_rebuttals"]),
                    "opinion":
                    random.choice(
                        self.elements["CHALLENGE"].data["npc_agreement"])
                },
                subject=subject), camp, mylist, gears.stats.Charm,
            gears.stats.Negotiation, self.rank, gears.stats.DIFFICULTY_AVERAGE)

        mylist.append(
            Offer("{}. [GOODBYE]".format(
                random.choice(
                    self.elements["CHALLENGE"].data["npc_disagreement"])),
                  ContextTag([context.CUSTOM]),
                  effect=self.end_plot,
                  data={"reply": "[YOU_COULD_BE_RIGHT]"},
                  subject=subject))

        return mylist
コード例 #4
0
    def _commander_offers(self, camp):
        mylist = list()
        npc = self.elements["_commander"]

        ghdialogue.SkillBasedPartyReply(Offer(
            "[CHANGE_MIND_AND_RETREAT]",
            context=ContextTag([
                context.RETREAT,
            ]),
            effect=self._retreat,
        ),
                                        camp,
                                        mylist,
                                        gears.stats.Ego,
                                        gears.stats.Negotiation,
                                        rank=npc.renown,
                                        difficulty=gears.stats.DIFFICULTY_HARD,
                                        no_random=False)

        return mylist
コード例 #5
0
    def NPC_offers(self, camp):
        mylist = list()

        mylist.append(
            Offer(
                "No, but I can't have {DISEASE}... [I_AM_STILL_STANDING]".
                format(**self.elements),
                ContextTag([context.CUSTOM]),
                subject=self,
                subject_start=True,
                data={
                    "reply":
                    "You don't look well. Have you been tested for {DISEASE}?".
                    format(**self.elements)
                }))

        ghdialogue.SkillBasedPartyReply(
            Offer("[I_FEEL_BETTER_NOW] [THANKS_FOR_HELP]",
                  ContextTag([
                      context.CUSTOMREPLY,
                  ]),
                  effect=self._win_the_mission,
                  data={"reply": "I'm a medic; let me treat you."},
                  subject=self), camp, mylist, gears.stats.Knowledge,
            gears.stats.Medicine, self.rank, gears.stats.DIFFICULTY_AVERAGE)

        mylist.append(
            Offer(
                "[MAYBE_YOU_ARE_RIGHT] I better not take any chances.".format(
                    **self.elements),
                ContextTag([context.CUSTOMREPLY]),
                subject=self,
                effect=self._semi_win,
                data={"reply":
                      "At least you should go home and have a rest."}))

        return mylist
コード例 #6
0
    def NPC_offers(self, camp):
        mylist = list()

        if not self.mission_active:
            mychallenge: pbge.challenges.Challenge = self.elements["CHALLENGE"]

            mylist.append(
                Offer(
                    "[HELLO] {LEADER} is a great {LEADER.gender.noun} and deserves our support."
                    .format(**self.elements), ContextTag([
                        context.HELLO,
                    ])))

            mylist.append(
                Offer("[YOU_DONT_UNDERSTAND] The truth is that {}.".format(
                    random.choice(mychallenge.data["reasons_to_support"])),
                      ContextTag([context.CUSTOM]),
                      data={
                          "reply":
                          "But {}!".format(
                              random.choice(
                                  mychallenge.data["reasons_to_dethrone"]))
                      },
                      subject=self,
                      subject_start=True))

            mylist.append(
                Offer("[YOU_DONT_UNDERSTAND] In reality {}.".format(
                    random.choice(mychallenge.data["reasons_to_support"])),
                      ContextTag([context.UNFAVORABLE_CUSTOM]),
                      data={
                          "reply":
                          "You know that {}!".format(
                              random.choice(
                                  mychallenge.data["reasons_to_dethrone"]))
                      },
                      subject=self,
                      subject_start=True))

            mylist.append(
                Offer(
                    "[ACCEPT_CHALLENGE] I will meet you outside of town, to defend the honor of {LEADER}!"
                    .format(**self.elements),
                    ContextTag([context.CUSTOMREPLY]),
                    effect=self.activate_mission,
                    subject=self,
                    data={
                        "reply": "[ARE_YOU_WILLING_TO_BET_YOUR_LIFE_ON_THAT]"
                    }))

            vv = mychallenge.data.get("violated_virtue")
            if vv and vv in self.elements["NPC"].personality:
                ghdialogue.SkillBasedPartyReply(
                    Offer(
                        "[MAYBE_YOU_ARE_RIGHT_ABOUT_OPINION] [I_MUST_CONSIDER_MY_NEXT_STEP]",
                        ContextTag([
                            context.CUSTOMREPLY,
                        ]),
                        effect=self._conversation_win,
                        data={
                            "reply":
                            "[HAVE_YOU_CONSIDERED]",
                            "consider_this":
                            "{} is working against {}".format(
                                self.elements["LEADER"], vv),
                            "opinion":
                            "{LEADER} may not be as great as I thought".format(
                                **self.elements)
                        },
                        subject=self), camp, mylist, gears.stats.Perception,
                    gears.stats.Negotiation, self.rank,
                    gears.stats.DIFFICULTY_AVERAGE)

        return mylist