Пример #1
0
        private void DoLotion(Creature consumer, ILotionable lotionable, UseItemCallback postItemUseCallback)
        {
            StringBuilder sb = new StringBuilder();

            if (lotionable is ILotionableCustomText customText)
            {
                bool succeeded = lotionable.AttemptToLotion(targetTexture);
                sb.Append(customText.DisplayResults(targetTexture, succeeded));
            }
            else if (!lotionable.IsDifferentTexture(targetTexture))
            {
                sb.Append("You " + (consumer.wearingAnything ? "take a second to disrobe before uncorking the flask of lotion and rubbing"
                                : "uncork the flask of lotion and rub") + " the " + LiquidDesc() + " across your " + lotionable.LocationDesc(out bool isPlural)
                          + ". Once you've finished you feel reinvigorated. ");
            }
            else
            {
                string location = lotionable.LocationDesc(out bool isPlural);
                sb.Append((consumer.wearingAnything ? "Once you've disrobed you take the lotion and" : "You take the lotion and") + " begin massaging it into your "
                          + location + ". As you do so," + location +
                          (isPlural ? " begin" : " begins") + " to tingle pleasantly.");
                if (lotionable.AttemptToLotion(targetTexture))
                {
                    sb.Append(SuccessfullyAppliedLotion(location, isPlural));
                }
                else
                {
                    sb.Append(LotionDidNothing(location, isPlural));
                }
            }

            postItemUseCallback(true, sb.ToString(), null, null);
            CleanupItems();
        }
Пример #2
0
        private StandardDisplay StandardMenu(Creature consumer, UseItemCallback postItemUseCallback)
        {
            if (validMembers.Count == 1)
            {
                return(DoMultiLotionMenu(consumer, (IMultiLotionable)validMembers[0], postItemUseCallback));
            }

            display.ClearOutput();
            listMaker.ClearList();

            display.OutputText("Where do you want to apply the " + targetTexture.AsString() + " body lotion?");

            foreach (IBodyPart part in consumer.bodyParts)
            {
                if (part is ILotionable lotionable)
                {
                    listMaker.AddButtonToList(part.BodyPartName(), lotionable.CanLotion(), () => DoLotion(consumer, lotionable, postItemUseCallback));
                }
                else if (part is IMultiLotionable multiLotionable)
                {
                    listMaker.AddButtonToList(multiLotionable.ButtonText() + "...", multiLotionable.numLotionableMembers > 0, () => DoMultiLotionMenu(consumer, multiLotionable, postItemUseCallback));
                }
            }
            listMaker.CreateButtons(GlobalStrings.CANCEL(), true, () => LotionCancel(consumer, postItemUseCallback));

            return(display);
        }
Пример #3
0
        protected override DisplayBase BuildMenu(Creature consumer, UseItemCallback postItemUseCallback)
        {
            if (!consumer.hasCock)
            {
                string results = "As you look over the needle, you realize that its intended purpose is to thicken a penis which you do not possess. Sighing dejectedly, you put away the needle.";
                postItemUseCallback(false, results, null, this);
            }
            StandardDisplay display = new StandardDisplay();

            display.OutputText("You ponder the needle in your hand knowing it will thicken a c**k it's injected into.");
            if (consumer.cocks.Count == 1)
            {
                display.AddButton(0, "Inject", () => ChooseSingleCock(consumer, postItemUseCallback));
                display.AddButton(1, "Don't", () => GirthPlusCancel(consumer, postItemUseCallback));
            }
            else
            {
                for (int i = 0; i < consumer.cocks.Count; i++)
                {
                    string tip = consumer.cocks[i].LongDescription() + Environment.NewLine + "Length: " + consumer.cocks[i].length + Environment.NewLine
                                 + "Thickness: " + consumer.cocks[i].girth;

                    display.AddButtonWithToolTip((byte)i, "C**k #" + (i + 1), () => ChooseSingleCock(consumer, postItemUseCallback, i), tip);
                }
                display.AddButton(10, GlobalStrings.ALL(), () => ChooseAllCocks(consumer, postItemUseCallback));
                display.AddButton(14, GlobalStrings.NEVERMIND(), () => GirthPlusCancel(consumer, postItemUseCallback));
            }

            return(display);
        }
Пример #4
0
        private void ChooseSingleCock(Creature consumer, UseItemCallback postItemUseCallback, int cockNum = 0)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("You sink the needle into the base of your " + consumer.cocks[cockNum].LongDescription() + ". It hurts like hell, " +
                      "but as you depress the plunger, the pain vanishes, replaced by a tingling pleasure as the chemicals take effect." + GlobalStrings.NewParagraph());
            sb.Append("Your " + consumer.cocks[cockNum].LongDescription() + " twitches and thickens, looking to be ");
            if (consumer.cocks[cockNum].girth < consumer.cocks[cockNum].length / 10)
            {
                consumer.cocks[cockNum].IncreaseThickness(consumer.cocks[cockNum].girth * 0.5);
                sb.Append("fattening significantly!");
            }
            else if (consumer.cocks[cockNum].girth < consumer.cocks[cockNum].length / 6)
            {
                consumer.cocks[cockNum].IncreaseThickness(consumer.cocks[cockNum].girth * 0.3);
                sb.Append("thickening quite noticably.");
            }
            else if (consumer.cocks[cockNum].girth < consumer.cocks[cockNum].length / 4)
            {
                consumer.cocks[cockNum].IncreaseThickness(consumer.cocks[cockNum].girth * 0.2);
                sb.Append("thickening noticably.");
            }
            else if (consumer.cocks[cockNum].girth < consumer.cocks[cockNum].length / 2)
            {
                consumer.cocks[cockNum].IncreaseThickness(consumer.cocks[cockNum].girth * 0.1);
                sb.Append("widening slightly.");
            }
            else
            {
                sb.Append("widening slightly, only to shrink back to how it was before you even injected. Seems like your extremely thick c**k is already fat enough.");
            }
            sb.Append(GlobalStrings.NewParagraph() + "Once the growth has stopped, you discard the now-empty syringe.");

            postItemUseCallback(true, sb.ToString(), null, null);
        }
Пример #5
0
        private void PutBack()
        {
            buttonMaker = null;
            display     = null;
            source      = null;

            itemCallback(false, PutBackItemText(), Author(), this);
            itemCallback = null;
        }
Пример #6
0
        protected override DisplayBase BuildMenu(Creature target, UseItemCallback postItemUseCallback)
        {
            listOfDyeableParts = target.bodyParts.Where(x => x is IDyeable || x is IMultiDyeable);

            display = new StandardDisplay();

            //set the globals.
            buttonMaker  = new ButtonListMaker(display);
            itemCallback = postItemUseCallback;
            source       = target;

            RunMainMenu();
            return(display);
        }
Пример #7
0
 private protected virtual DisplayBase AttemptToUseItem(Creature target, UseItemCallback postItemUseCallback)
 {
     if (!CanUse(target, false, out string whyNot))
     {
         postItemUseCallback(false, whyNot, Author(), this);
         return(null);
     }
     else
     {
         CapacityItem retVal = UseItem(target, out string resultsOfUse);
         postItemUseCallback(true, resultsOfUse, Author(), retVal);
         return(null);
     }
 }
        public virtual void AddMenuOption(string name, InventoryItemBase item, UseItemCallback callback)
        {
            var obj = pool.Get();
            obj.transform.SetParent(container);

            obj.item = item;
            obj.text.text = name;

            obj.button.onClick.AddListener(() =>
            {
                callback(obj.item);
                window.Hide();
            });

            menuOptions.Add(new InventoryContextMenuOption(name, callback, obj));
        }
Пример #9
0
        private void ChooseAllCocks(Creature consumer, UseItemCallback postItemUseCallback)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("You sink the needle into the base of your " + consumer.genitals.AllCocksShortDescription() + ". It hurts like hell, but as you depress the plunger, " +
                      "the pain vanishes, replaced by a tingling pleasure as the chemicals take effect." + GlobalStrings.NewParagraph());
            int cocksAffected = 0;

            //1 - 2/3log(count). when count is 10, it's at 33% efficiency. when at ~3, it's at 66% efficiency. log makes it drop faster early, but
            //drops slower later, making it feel more useful with more than 5 cocks. you could make that 1/2 or something instead of 2/3, as desired.

            double drugEffectiveness = 1 - (2 / 3.0 * Math.Log10(consumer.cocks.Count));

            foreach (C**k c**k in consumer.cocks)
            {
                if (c**k.length > c**k.girth * 2)
                {
                    //offset = 0.5 if > 10, .4 if >8, .3 if > 6, .2 if > 4, .1 otherwise.
                    double growthMultiplier = Math.Floor(c**k.length / c**k.girth) / 20.0;
                    //the amount grown is the offset above, multiplied by the effectiveness of the drug as a percent of the total girth.
                    double delta = growthMultiplier * drugEffectiveness * c**k.girth;

                    cocksAffected++;
                    c**k.IncreaseThickness(delta);
                }
            }
            if (cocksAffected == consumer.cocks.Count)
            {
                sb.Append("Your " + consumer.genitals.AllCocksShortDescription() + " twitch and thicken, each of them looking to be fattening and becoming more consistent in thickness.");
            }
            else if (cocksAffected > 1)
            {
                sb.Append(Utils.NumberAsText(cocksAffected) + " of your " + consumer.genitals.AllCocksShortDescription() + " twitch and thicken, each of the affected cocks looking to be fattening and becoming more consistent in thickness.");
            }
            else if (cocksAffected == 1)
            {
                sb.Append("One of your " + consumer.genitals.AllCocksShortDescription() + " twitches and thickens, looking to be fattening.");
            }
            else
            {
                sb.Append("But alas, nothing happens. Looks like all of them are too thick to begin with and you've already wasted it. How disappointing.");
            }
            sb.Append(GlobalStrings.NewParagraph() + "Once the growth has stopped, you discard the now-empty syringe.");

            postItemUseCallback(true, sb.ToString(), null, null);
        }
        public virtual void AddMenuOption(string name, InventoryItemBase item, UseItemCallback callback)
        {
            var obj = pool.Get();

            obj.transform.SetParent(container);

            obj.item      = item;
            obj.text.text = name;

            obj.button.onClick.AddListener(() =>
            {
                callback(obj.item);
                window.Hide();
            });

            menuOptions.Add(new InventoryContextMenuOption(name, callback, obj));
        }
Пример #11
0
        protected override DisplayBase BuildMenu(Creature consumer, UseItemCallback postItemUseCallback)
        {
            var display = new StandardDisplay();

            display.OutputText("You ponder the needle in your hand knowing it will enlarge the injection site. What part of your body will you use it on? ");

            var listMaker = new ButtonListMaker(display);

            foreach (var bodyPart in consumer.bodyParts)
            {
                if (bodyPart is IGrowable growable)
                {
                    listMaker.AddButtonToList(bodyPart.BodyPartName(), growable.CanGroPlus(), () => ApplyGrowPlus(consumer, growable, postItemUseCallback));
                }
            }

            return(display);
        }
Пример #12
0
        protected override DisplayBase BuildMenu(Creature consumer, UseItemCallback postItemUseCallback)
        {
            validMembers = consumer.bodyParts.Where(x => x is ILotionable || x is IMultiLotionable).ToList();
            display      = new StandardDisplay();
            listMaker    = new ButtonListMaker(display);

            if (validMembers.Count == 0)
            {
                LotionCancel(consumer, postItemUseCallback);
                return(null);
            }
            if (validMembers.Count == 1 && validMembers[0] is ILotionable lotionable)
            {
                DoLotion(consumer, lotionable, postItemUseCallback);
            }

            return(StandardMenu(consumer, postItemUseCallback));
        }
Пример #13
0
        private void CleanupAndReturn(string result)
        {
            if (source.relativeLust > 50)
            {
                result += LessLustyText();
                source.DecreaseLust(15);
            }

            //clear the globals.
            source      = null;
            buttonMaker = null;
            display     = null;

            UseItemCallback temp = itemCallback;

            itemCallback = null;

            //and resume normal execution.
            temp(true, result, Author(), null);
        }
Пример #14
0
        private protected override DisplayBase AttemptToUseItem(Creature target, UseItemCallback postItemUseCallback)
        {
            if (!CanUse(target, false, out string whyNot))
            {
                postItemUseCallback(false, whyNot, Author(), this);
                return(null);
            }
            else
            {
                CapacityItem retVal = ConsumeItem(target, out string resultsOfUse, out bool isBadEnd);

                if (!isBadEnd)
                {
                    postItemUseCallback(true, resultsOfUse, Author(), retVal);
                    return(null);
                }
                else
                {
                    throw new System.NotImplementedException();
                }
            }
        }
 public InventoryContextMenuOption(string actionName, UseItemCallback useItemCallback, InventoryContextMenuItem uiElement)
     : base(actionName, useItemCallback)
 {
     this.uiElement = uiElement;
 }
 public InventoryItemUsability(string actionName, UseItemCallback useItemCallback)
 {
     this.actionName = actionName;
     this.useItemCallback = useItemCallback;
 }
Пример #17
0
 public DisplayBase UseItem(Creature target, UseItemCallback postItemUseCallback)
 {
     return(AttemptToUseItem(target, postItemUseCallback));
 }
Пример #18
0
 private void LotionCancel(Creature consumer, UseItemCallback postItemUseCallback)
 {
     postItemUseCallback(false, "You decided not to use the body lotion", null, this);
     CleanupItems();
 }
 /// <summary>
 /// Build the first menu page that displays after the target tries to use the item. Eventually, post item use callback must be called, but where and how is up to your implementation.
 /// Generally, this will be after a button is pressed, with the function callback the button executing it, though it may occur on a sub menu or something.
 /// </summary>
 /// <param name="consumer"></param>
 /// <returns>The initial menu display and any text required for it.</returns>
 protected abstract DisplayBase BuildMenu(Creature consumer, UseItemCallback postItemUseCallback);
Пример #20
0
 public InventoryItemUsability(string actionName, UseItemCallback useItemCallback)
 {
     this.actionName      = actionName;
     this.useItemCallback = useItemCallback;
 }
 public InventoryContextMenuOption(string actionName, UseItemCallback useItemCallback, InventoryContextMenuItem uiElement)
     : base(actionName, useItemCallback)
 {
     this.uiElement = uiElement;
 }
Пример #22
0
 private protected override DisplayBase AttemptToUseItem(Creature target, UseItemCallback postItemUseCallback)
 {
     return(AttemptToUseSafe(target, (w, x, y, z) => postItemUseCallback(w, x, y, z)));
 }
Пример #23
0
        private void GirthPlusCancel(Creature consumer, UseItemCallback postItemUseCallback)
        {
            string results = "You put the vial away." + GlobalStrings.NewParagraph();

            postItemUseCallback(false, results, null, this);
        }
Пример #24
0
        private void ApplyGrowPlus(Creature consumer, IGrowable growable, UseItemCallback postItemUseCallback)
        {
            consumer.IncreaseLust(10);

            postItemUseCallback(true, growable.UseGroPlus(), null, null);
        }
Пример #25
0
        private StandardDisplay DoMultiLotionMenu(Creature consumer, IMultiLotionable multiLotionable, UseItemCallback postItemUseCallback)
        {
            bool canReturnToMenu = display != null;

            display.ClearOutput();
            listMaker.ClearList();

            display.OutputText(multiLotionable.LocationDesc() + " has several possible locations or combinations of locations. Where on " + multiLotionable.LocationDesc() +
                               " would you like to apply the " + targetTexture.AsString() + " body lotion?" + Environment.NewLine + "You can also go back to the main menu by hitting back.");

            for (byte x = 0; x < multiLotionable.numLotionableMembers; x++)
            {
                listMaker.AddButtonToList(multiLotionable.MemberButtonText(x), multiLotionable.CanLotion(x), () => DoLotion(consumer, multiLotionable, x, postItemUseCallback));
            }


            listMaker.CreateButtons(new ButtonData(GlobalStrings.BACK(), true, () => StandardMenu(consumer, postItemUseCallback)),
                                    new ButtonData(GlobalStrings.CANCEL(), true, () => LotionCancel(consumer, postItemUseCallback)));

            return(display);
        }
        //Note to implementers: OnConsumeAttempt is not used in this class. if you do not need it in your implementation because you did it manually, simply throw a NotSupported or NotImplemented
        //as it will never be called (and if it is somehow, we'd probably want to know).

        private protected override DisplayBase AttemptToUseItem(Creature target, UseItemCallback postItemUseCallback)
        {
            return(BuildMenu(target, postItemUseCallback));
        }