Exemplo n.º 1
0
        private static List <Program.Transfer> GetAdvScript(TalkScene scene, int topicno, int personality, bool isnpc)
        {
            // todo variations for rejectng, already pregnant (don't need them anymore)
            var list = EventApi.CreateNewEvent();

            list.Add(Program.Transfer.Text(EventApi.Narrator, "I activated these earlier with my cum, I wonder if I should try giving this pack to her as a gift..."));
            list.Add(Program.Transfer.Text(EventApi.Heroine, "Hmm? What's wrong?"));
            list.Add(Program.Transfer.Text(EventApi.Player, "Umm, actually I bought you a gift, but it might be a bit weird."));
            list.Add(Program.Transfer.Text(EventApi.Heroine, "Haha, don't worry you're plenty weird anyways. So, what's the gift?"));
            list.Add(Program.Transfer.Text(EventApi.Narrator, "I take out the box and offer it to her. There was a replacement seal included in the box so it looks unopened."));
            list.Add(Program.Transfer.Text(EventApi.Player, "Here."));
            list.Add(Program.Transfer.Text(EventApi.Heroine, "Huh? Are those..?"));
            list.Add(Program.Transfer.Text(EventApi.Narrator, "She stares at the box in silence for a good while."));
            list.Add(Program.Transfer.Text(EventApi.Player, "It's too weird after all. Sorry, can you forget about-"));
            list.Add(Program.Transfer.Text(EventApi.Heroine, "Ah, no it's fine! I was just surprised since I didn't know guys knew about these things."));
            list.Add(Program.Transfer.Text(EventApi.Player, "Yeah, I guess that's true."));
            list.Add(Program.Transfer.Text(EventApi.Heroine, "I use similar looking ones so they should be fine, I'll take them. You won't have any use for them anyways, haha."));
            list.Add(Program.Transfer.Text(EventApi.Player, "Really? Here you go then."));
            list.Add(Program.Transfer.Text(EventApi.Narrator, "She carefully takes the box from my hand."));
            list.Add(Program.Transfer.Text(EventApi.Heroine, "Thanks!"));
            list.Add(Program.Transfer.Text(EventApi.Heroine, "Ahh, just so you know, you shouldn't give these to other girls! You got lucky with me, but others might think it's sexual harassment and kick you in the groin."));
            list.Add(Program.Transfer.Text(EventApi.Player, "I-I'll keep that in mind."));
            list.Add(Program.Transfer.VAR("System.Boolean", "Success", "true"));
            list.Add(Program.Transfer.VAR("System.Int32", "FavorChange", "20"));
            list.Add(Program.Transfer.VAR("System.Int32", "LewdChange", "10"));
            list.Add(Program.Transfer.Close());
            return(list);
        }
Exemplo n.º 2
0
        private static void RunIntroEvent(Heroine heroine, PregnancyData preg, bool isPillEvent)
        {
            var loadedEvt = GetEvent(heroine, preg, isPillEvent);

            if (loadedEvt == null)
            {
                PregnancyPlugin.Logger.LogError("Unexpected null GetEvent result");
                return;
            }

            // Init needed first since the custom event starts empty
            var evt = EventApi.CreateNewEvent(setPlayerParam: true);

            heroine.SetADVParam(evt);
            var freePill = _personalityHasPills.TryGetValue(heroine.personality, out var val) && val;

            evt.Add(Program.Transfer.VAR("bool", "PillForFree", freePill.ToString(CultureInfo.InvariantCulture)));
            evt.Add(Program.Transfer.VAR("bool", "PlayerHasPill", (StoreApi.GetItemAmountBought(AfterpillStoreId) >= 1).ToString(CultureInfo.InvariantCulture)));
            // Give favor by default, gets overriden if the event specifies any other value
            evt.Add(Program.Transfer.VAR("int", "FavorChange", "30"));

            evt.AddRange(loadedEvt);

            var scene = TalkScene.instance;

            scene.StartADV(evt, scene.cancellation.Token)
            .ContinueWith(() => Program.ADVProcessingCheck(scene.cancellation.Token))
            .ContinueWith(() =>
            {
                PregnancyGameController.ApplyToAllDatas((chara, data) =>
                {
                    if (chara == heroine)
                    {
                        if (isPillEvent)
                        {
                            data.CanAskForAfterpill = false;
                        }
                        else
                        {
                            data.CanTellAboutPregnancy = false;
                        }
                        return(true);
                    }
                    return(false);
                });

                var vars = ActionScene.instance.AdvScene.Scenario.Vars;
                ApplyStatChangeVars(heroine, preg, vars);

                // Fix mouth getting permanently locked by the events
                heroine.chaCtrl.ChangeMouthFixed(false);
            })
            .Forget();
        }