コード例 #1
0
        public override acegiak_RomanceChatNode BuildNode(acegiak_RomanceChatNode node)
        {
            string bodytext = "whoah";

            float g = (float)Stat.Rnd2.NextDouble();

            var vars = new Dictionary <string, string>();

            vars["*type*"] = factionName();

            if (g < 1)
            {
                //SetSampleObject(vars, exampleObject());
                return(Build_QA_Node(node, "faction.qa.them", (amount > 0) ? "gen_good" : "gen_bad", vars));

                /*bodytext = "<What do you think of|How do you feel about|What is your opinion of> "+factionName()+"?";
                 * node.AddChoice("likethem","I am quite fond of them.",amount>0?"They are lovely, aren't they?":"Oh, You must keep awful company.",amount>0?1:-1);
                 * node.AddChoice("dislikethem","<Loathsome creatures, one and all|They are wretched|I can't stand them>.",amount>0?"That's very judgemental":"Aren't they horrible?",amount>0?-1:1);*/
            }

            if (Romancable != null)
            {
                node.Text = node.Text + "\n\n" + Romancable.GetStory(node);
            }
            node.Text = node.Text + "\n\n" + bodytext;

            return(node);
        }
コード例 #2
0
        public override acegiak_RomanceChatNode BuildNode(acegiak_RomanceChatNode node)
        {
            string bodytext = "whoah";

            float g = (float)Stat.Rnd2.NextDouble();

            var vars = new Dictionary <string, string>();

            vars["*sultan*"]     = this.faveSultan.GetCurrentSnapshot().GetProperty("name", "a sultan");
            vars["*sultanLong*"] = vars["*sultan*"] + ", "
                                   + this.faveSultan.GetCurrentSnapshot().GetRandomElementFromListProperty("cognomen", "the ancient sultan", Stat.Rnd2);

            if (g < 1)
            {
                return(Build_QA_Node(node, "sultan.qa.heard", (amount > 0) ? "gen_good" : "gen_bad", vars, this.faveSultan.GetCurrentSnapshot()));

                /*bodytext = "Have you heard of "+this.faveSultan.GetCurrentSnapshot().GetProperty("name","a sultan")+", "+this.faveSultan.GetCurrentSnapshot().GetRandomElementFromListProperty("cognomen", "the ancient sultan", Stat.Rnd2)+"?";
                 * node.AddChoice("likethem","I have! An admirable hero.",amount>0?"Wasn't "+this.faveSultan.GetCurrentSnapshot().GetProperty("subjectPronoun","sultan")+" amazing?":"Oh, I think I disagree.",amount>0?1:-1);
                 * node.AddChoice("dislikethem","I am familiar with the tales of this villain.",amount>0?"That's very judgemental.":"Wasn't "+this.faveSultan.GetCurrentSnapshot().GetProperty("subjectPronoun","sultan")+" horrible?",amount>0?-1:1);
                 * node.AddChoice("dontknow","I've not heard of this "+this.faveSultan.GetCurrentSnapshot().GetProperty("name","sultan")+".",amount>0?"Well, "+this.faveSultan.GetCurrentSnapshot().GetProperty("subjectPronoun","sultan")+" was a hero.":"Well "+this.faveSultan.GetCurrentSnapshot().GetProperty("subjectPronoun","sultan")+" was a terror.",amount>0?-1:1);*/
            }

            if (Romancable != null)
            {
                node.Text = node.Text + "\n\n" + Romancable.GetStory(node);
            }
            node.Text = node.Text + "\n\n" + bodytext;

            return(node);
        }
コード例 #3
0
        public override acegiak_RomanceChatNode BuildNode(acegiak_RomanceChatNode node)
        {
            string bodytext = "whoah";

            float g = (float)Stat.Rnd2.NextDouble();

            var vars = new Dictionary <string, string>();

            if (g < 0.5)
            {
                vars["*sacredThing*"] = randomGood();
                return(Build_QA_Node(node, "patriot.qa.sacredThing", (amount > 0) ? "gen_good" : "gen_bad", vars));

                /*bodytext = "<What do you think of|How do you feel about|What is your opinion of> "+randomGood()+"?";
                 * node.AddChoice("likethem","I approve.",amount>0?"They are lovely, aren't they?":"Oh, You must keep awful company.",amount>0?1:-1);
                 * node.AddChoice("dislikethem","It is terrible.",amount>0?"That's very judgemental":"Aren't they horrible?",amount>0?-1:1);*/
            }
            else
            if (g < 1)
            {
                vars["*profaneThing*"] = randomBad();
                return(Build_QA_Node(node, "patriot.qa.profaneThing", (amount > 0) ? "gen_good" : "gen_bad", vars));

                /*bodytext = "<What do you think of|How do you feel about|What is your opinion of> "+randomBad()+"?";
                 * node.AddChoice("likethem","I approve.",amount>0?"Such blasphemy!":"They aren't so bad, are they?.",amount>0?1:-1);
                 * node.AddChoice("dislikethem","It is terrible.",amount>0?"Isn't it horrid?":"Then you are a fool.",amount>0?-1:1);*/
            }

            if (Romancable != null)
            {
                node.Text = node.Text + "\n\n" + Romancable.GetStory(node);
            }
            node.Text = node.Text + "\n\n" + bodytext;

            return(node);
        }
コード例 #4
0
        public override acegiak_RomanceChatNode BuildNode(acegiak_RomanceChatNode node)
        {
            string bodytext = "whoah";

            float g      = (float)Stat.Rnd2.NextDouble();
            bool  haskey = false;

            foreach (var item in verbs)
            {
                if (item.Key == wantedType)
                {
                    haskey = true;
                    break;
                }
            }

            var vars = new Dictionary <string, string>();

            vars["*type*"] = wantedType;

            if (g < 0.2 && haskey)
            {
                SetSampleObject(vars, exampleObject());
                return(Build_QA_Node(node, "weapon.qa.postal", (amount > 0) ? "gen_good" : "gen_bad", vars));

                /*bodytext = "Do you ever <think about|fantasize about|ponder|dream about> just "+verbs[wantedType]+" people?";
                 * node.AddChoice("yeahcleave","Oh yes, quite often.",amount>0?"Oh good. I thought I was the only one.":"Really? That is troubling.",amount>0?1:-1);
                 * node.AddChoice("nahcleave","No, that sounds bad.",amount>0?"Oh, I guess it is. Sorry.":"It does, doesn't it? How scary!",amount>0?-1:1);*/
            }
            else if (g < 0.4 && haskey)
            {
                bodytext = "How do you like to <slay|attack|fight|combat> your enemies?";
                foreach (var item in verbs)
                {
                    if ((item.Key == wantedType || Stat.Rnd2.NextDouble() < 0.5))
                    {
                        GameObject GO = EncountersAPI.GetAnObject((GameObjectBlueprint b) => b.GetPartParameter("MeleeWeapon", "Skill") == item.Key || b.GetPartParameter("MissileWeapon", "Skill") == item.Key);
                        if (item.Key == wantedType || (GO != null && Romancable.assessGift(GO, XRLCore.Core.Game.Player.Body).amount > 0))
                        {
                            node.AddChoice(item.Key, "&cI <like|prefer> " + item.Value + " them with a " + presentable[item.Key] + ".", amount > 0?"Me too!":"That's quite violent, isn't it?", amount > 0?1:-1);
                        }
                        else
                        {
                            node.AddChoice(item.Key, "&cI <like|prefer> " + item.Value + " them with a " + presentable[item.Key] + ".", amount > 0?"That sounds unpleasant.":"That's quite violent, isn't it?", amount > 0?1:-1);
                        }
                    }
                }
                node.AddChoice("notmelee", "&rI prefer to avoid combat entirely.", amount > 0?"That sounds cowardly.":"That sounds very wise.", amount > 0?-1:1);
            }
            else if (g < 0.60 && haskey)
            {
                SetSampleObject(vars, exampleObject());
                return(Build_QA_Node(node, "armor.qa.seen", (amount > 0) ? "gen_good" : "gen_bad", vars));

                /*string sample = exampleObjectName();
                 * bodytext = "Have you ever seen "+sample+"?";
                 * node.AddChoice("yesseen","Oh yes, I have seen "+sample+". It was great.",amount>0?"Wow, how excellent!":"Oh, I don't think I would agree.",amount>0?1:-1);
                 * node.AddChoice("yesseendislike","I have but I didn't like it.",amount>0?"Oh, I guess we have different tastes.":"I agree, I saw one once and didn't like it.",amount>0?-1:1);
                 * node.AddChoice("notseen","No, I've not seen such a thing.",amount>0?"Oh, that's disappointing.":"That's probably for the best.",amount>0?-1:1);*/
            }
            else if (g < 0.80)
            {
                return(Build_QA_Node(node, "weapon.qa.factoid", (amount > 0) ? "gen_good" : "gen_bad", vars));

                /*if(wantedType == "Cudgel"){
                 *  bodytext = "Did you know that heavy weapons like maces and clubs can sometimes stun people when they hit?";}
                 * if(wantedType == "ShortBlades"){
                 *  bodytext = "Are you familiar with short blades like daggers and knives? I hear that they make wounds that bleed profusely";}
                 * if(wantedType == "LongBlades"){
                 *  bodytext = "I hear long blades are very versatile. Talented swordsmen can use them for defence as well offence.";}
                 * if(wantedType == "Axe"){
                 *  bodytext = "Axes are very dangerous. No only can they crack armour but they can also cleave off whole limbs!";}
                 * if(wantedType == "Whip"){
                 *  bodytext = "I hear whips are usually used to keep dogs in line?";}
                 * if(wantedType == "Chain"){
                 *  bodytext = "I hear some people just beat their enemies with chains?";}
                 * if(wantedType == "HeavyWeapons"){
                 *  bodytext = "I heard heavy ranged weapons often fire explosives!";}
                 * if(wantedType == "Rifle"){
                 *  bodytext = "I hear bows and rifles are very good for shooting folks at long range.";}
                 * if(wantedType == "Pistol"){
                 *  bodytext = "Did you know some folks weild a pistol in each hand?";}
                 * node.AddChoice("approve","I have seen as much. It is <glorious|wonderful|fantastic>.",amount>0?"So fascinating!":"Oh, how scary.",amount>0?1:-1);
                 * node.AddChoice("disprove","That is, unfortunately, true.",amount>0?"Oh? I think it sounds very impressive.":"Yes it seems quite dangerous.",amount>0?-1:1);
                 * node.AddChoice("disagree","I'm not sure that is true.","Oh, isn't it? How odd.",-1);*/
            }
            else
            {
                return(Build_QA_Node(node, "weapon.qa.show_me", (amount > 0) ? "gen_good" : "gen_bad", vars));

                /*bodytext = "Do you have any interesting weapons?";
                 * List<GameObject> part2 = XRLCore.Core.Game.Player.Body.GetPart<Inventory>().GetObjects();
                 *
                 * List<BodyPart> equippedParts = XRLCore.Core.Game.Player.Body.GetPart<Body>().GetEquippedParts();
                 * foreach (BodyPart item in equippedParts)
                 * {
                 *  if(item.Equipped != null){
                 *      part2.Add(item.Equipped);
                 *  }
                 * }
                 *
                 * int c = 0;
                 * int s = 0;
                 * foreach(GameObject GO in part2)
                 * {
                 *  MeleeWeapon mw = GO.GetPart<MeleeWeapon>();
                 *  MissileWeapon rw = GO.GetPart<MissileWeapon>();
                 *  if((GO.GetBlueprint().InheritsFrom("BaseMissileWeapon") || GO.GetBlueprint().InheritsFrom("MeleeWeapon")) && (mw != null || rw != null) ){
                 *      if(Romancable.assessGift(GO,XRLCore.Core.Game.Player.Body).amount > 0){
                 *          node.AddChoice("weapon"+c.ToString(),"I have this "+GO.DisplayName+".",amount>0?"Wow, that's very interesting!":"Oh, is that all?",amount>0?2:-1);
                 *          s++;
                 *      }else{
                 *          node.AddChoice("weapon"+c.ToString(),"I have this "+GO.DisplayName+".",amount>0?"Oh, is that all?":"Hmm, that seems dangerous.",amount>0?0:-1);
                 *          s++;
                 *      }
                 *  }
                 *  // if(s>5){
                 *  //     break;
                 *  // }
                 *
                 * }
                 * node.AddChoice("noweapons","Not really, no.",amount>0?"That's a pity.":"That's sensible. Weapons are dangerous.",amount>0?-1:1);*/
            }

            if (Romancable != null)
            {
                node.Text = node.Text + "\n\n" + Romancable.GetStory(node);
            }
            node.Text = node.Text + "\n\n" + bodytext;

            return(node);
        }
コード例 #5
0
        public override acegiak_RomanceChatNode BuildNode(acegiak_RomanceChatNode node)
        {
            string bodytext = "whoah";

            float g = (float)Stat.Rnd2.NextDouble();

            var vars = new Dictionary <string, string>();

            vars["*type*"] = wantedType;

            if (g < 0.50)
            {
                SetSampleObject(vars, exampleObject());
                return(Build_QA_Node(node, "armor.qa.seen", (amount > 0) ? "gen_good" : "gen_bad", vars));

                /*string sample = exampleObjectName();
                 * bodytext = "Have you ever seen a "+sample+"?";
                 * node.AddChoice("yesseen","Oh yes, I have seen a "+sample+". It was great.",amount>0?"Wow, how excellent!":"Oh, I don't think I would agree.",amount>0?1:-1);
                 * node.AddChoice("yesseendislike","I have but I didn't like it.",amount>0?"Oh, I guess we have different tastes.":"I agree, I saw one once and didn't like it.",amount>0?-1:1);
                 * node.AddChoice("notseen","No, I've not seen such a thing.",amount>0?"Oh, that's disappointing.":"That's probably for the best.",amount>0?-1:1);*/
            }
            else
            {
                return(Build_QA_Node(node, "armor.qa.show_me", (amount > 0) ? "gen_good" : "gen_bad", vars));

                /*bodytext = "Do you have any interesting <clothing|armor|vestments>?";
                 * List<GameObject> part2 = XRLCore.Core.Game.Player.Body.GetPart<Inventory>().GetObjects();
                 *
                 * List<BodyPart> equippedParts = XRLCore.Core.Game.Player.Body.GetPart<Body>().GetEquippedParts();
                 * foreach (BodyPart item in equippedParts)
                 * {
                 *  if(item.Equipped != null){
                 *      part2.Add(item.Equipped);
                 *  }
                 * }
                 *
                 * int c = 0;
                 * int s = 0;
                 * foreach(GameObject GO in part2)
                 * {
                 *  Armor mw = GO.GetPart<Armor>();
                 *  if(GO.GetBlueprint().InheritsFrom("Armor") && mw != null  ){
                 *      if(Romancable.assessGift(GO,XRLCore.Core.Game.Player.Body).amount > 0){
                 *          node.AddChoice("armor"+c.ToString(),"I have this "+GO.ShortDisplayName+".",amount>0?"Wow, that's very interesting!":"Oh, is that all?",amount>0?2:-1);
                 *          s++;
                 *      }else{
                 *          node.AddChoice("armor"+c.ToString(),"I have this "+GO.ShortDisplayName+".",amount>0?"Oh, is that all?":"Oh, that's quite ugly.",amount>0?0:-1);
                 *          s++;
                 *      }
                 *  }
                 *  // if(s>5){
                 *  //     break;
                 *  // }
                 *
                 * }
                 * node.AddChoice("noweapons","Not really, no.",amount>0?"That's a pity.":"That's sensible. You probably don't need any.",amount>0?-1:1);*/
            }

            if (Romancable != null)
            {
                node.Text = node.Text + "\n\n" + Romancable.GetStory(node);
            }
            node.Text = node.Text + "\n\n" + bodytext;

            return(node);
        }
コード例 #6
0
        public override acegiak_RomanceChatNode BuildNode(acegiak_RomanceChatNode node)
        {
            string bodytext = "whoah";

            float g = (float)Stat.Rnd2.NextDouble();

            var vars = new Dictionary <string, string>();

            if (g < 0.3)
            {
                SetSampleObject(vars, exampleObject());
                return(Build_QA_Node(node, "food.qa.tasted", (amount > 0) ? "gen_good" : "gen_bad", vars));
            }
            else if (g < 0.6)
            {
                //SetSampleObject(vars, exampleObject());

                GameObject sample = exampleObject();
                SetSampleObject(vars, sample);
                string practice_name   = "default";
                string practice_result = null;

                if (sample != null)
                {
                    sample.MakeUnderstood();
                    if (sample.GetPart <PreparedCookingIngredient>() != null)
                    {
                        practice_name = "cooking";
                        string ingredient_type = "ProceduralCookingIngredient_" + sample.GetPart <PreparedCookingIngredient>().type;
                        practice_result = GameObjectFactory.Factory.CreateSampleObject(ingredient_type).GetTag("Description")
                                          + " effects";
                        //if (practice_result != null) practice_result = ingredient_type + ": " + practice_result.ToString();
                    }
                    else
                    if (sample.GetPart <PreservableItem>() != null)
                    {
                        practice_name   = "preserving";
                        practice_result = GameObjectFactory.Factory.CreateSampleObject(sample.GetPart <PreservableItem>().Result).DisplayNameOnlyDirect;
                    }
                    else
                    if (sample.GetPart <Food>() != null)
                    {
                        practice_name   = "eating";
                        practice_result = sample.GetPart <Food>().Satiation;
                    }
                }

                if (practice_result == null || practice_result.Count() == 0)
                {
                    practice_result = "sweet sustenance";
                }
                vars["*sampleResult*"] = practice_result;

                return(Build_QA_Node(node, "food.qa.practice_" + practice_name, (amount > 0) ? "gen_good" : "gen_bad", vars));
            }
            else
            {
                return(Build_QA_Node(node, "food.qa.show_me", (amount > 0) ? "gen_good" : "gen_bad", vars));
            }

            if (Romancable != null)
            {
                node.Text = node.Text + "\n\n" + Romancable.GetStory(node);
            }
            node.Text = node.Text + "\n\n" + bodytext;

            return(node);
        }