コード例 #1
0
ファイル: Body.cs プロジェクト: SabrinM/Regression
        public void HandlePoopOverflow(Underwear underwear)
        {
            Animations.Write(RegressionMod.data.Poop_Overflow, this);

            float overflow = underwear.Messiness / underwear.containment;
            //100% -> -3, 50% -> -2, 0% -> -1
            int speed = overflow >= 0.5 ? (overflow > 1.0 ? -3 : -2) : -1;

            Buff buff = new Buff(0, 0, 0, 0, 0, 0, 0, 0, 0, speed, 0, 0, 15, "", "")
            {
                description          = string.Format("{0} {1} Speed.", (object)Strings.RandString(RegressionMod.data.Debuff_Messy_Pants), (object)speed),
                millisecondsDuration = 1080000, // 18 minutes
                glow       = Color.Brown,
                sheetIndex = -1,
                which      = 222
            };

            //If player already has wet overflow debuff remove and re-apply it
            if (Game1.buffsDisplay.hasBuff(buff.which))
            {
                RemoveBuff(buff.which);
            }

            Game1.buffsDisplay.addOtherBuff(buff);
        }
コード例 #2
0
ファイル: Body.cs プロジェクト: SabrinM/Regression
        //Gives debuff based on overflow amount
        public void HandlePeeOverflow(Underwear bottoms)
        {
            Animations.Write(RegressionMod.data.Pee_Overflow, this);

            //Scale the defense debuff based on amount of overflow (1->10)
            float overflow = (bottoms.Wetness / bottoms.absorbency) * 10f;
            int   defense  = -Math.Max(
                Math.Min((int)overflow, 10) //Percentage of overflow times 10 (wetness at double absorbancy is 10)
                , 1);

            Buff buff = new Buff(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, defense, 0, 15, "", "")
            {
                description          = string.Format("{0} {1} Defense.", (object)Strings.RandString(RegressionMod.data.Debuff_Wet_Pants), (object)defense),
                millisecondsDuration = 1080000, // 18 minutes
                glow       = bottoms.Messiness > 0.0 ? Color.Brown : Color.Yellow,
                sheetIndex = -1,
                which      = 111
            };

            //If player already has wet overflow debuff remove and re-apply it
            if (Game1.buffsDisplay.hasBuff(buff.which))
            {
                RemoveBuff(buff.which);
            }

            Game1.buffsDisplay.addOtherBuff(buff);
        }
コード例 #3
0
ファイル: Animations.cs プロジェクト: SabrinM/Regression
        public static void AnimateNight(Body b)
        {
            bool first  = b.peedToiletLastNight > 0;
            bool second = b.poopedToiletLastNight > 0;

            if (!(first | second) || !RegressionMod.config.Wetting && !RegressionMod.config.Messing)
            {
                return;
            }
            Animations.Write(Strings.ReplaceAndOr(Strings.RandString(Animations.t.Toilet_Night), first, second, "&"), b);
        }
コード例 #4
0
ファイル: Body.cs プロジェクト: SabrinM/Regression
        //Warns the player when the new percentage goes below a threshold (if not sleeping)
        public void Warn(float oldPercent, float newPercent, float[] thresholds, string[][] msgs, bool write = false)
        {
            //Don't warn when sleeping
            if (sleeping)
            {
                return;
            }

            for (int i = 0; i < thresholds.Length; ++i)
            {
                //If the new percent brings the player below a threshold then warn them
                if (oldPercent > thresholds[i] && newPercent <= thresholds[i])
                {
                    if (write)
                    {
                        Animations.Write(msgs[i], this);
                        break;
                    }
                    Animations.Warn(msgs[i], this);
                    break;
                }
            }
        }
コード例 #5
0
ファイル: Animations.cs プロジェクト: SabrinM/Regression
        public static void AnimateMorning(Body b)
        {
            bool   flag   = (double)b.bottoms.Wetness > 0.0;
            bool   second = (double)b.bottoms.Messiness > 0.0;
            string msg    = "" + Strings.RandString(Animations.t.Wake_Up_Underwear_State);

            if (second)
            {
                msg = msg + " " + Strings.ReplaceOptional(Strings.RandString(Animations.t.Messed_Bed), flag);
                if (!RegressionMod.config.Easymode)
                {
                    msg = msg + " " + Strings.ReplaceAndOr(Strings.RandString(Animations.t.Washing_Bedding), flag, second, "&");
                }
            }
            else if (flag)
            {
                msg = msg + " " + Strings.RandString(Animations.t.Wet_Bed);
                if (!RegressionMod.config.Easymode)
                {
                    msg = msg + " " + Strings.ReplaceAndOr(Strings.RandString(Animations.t.Spot_Washing_Bedding), flag, second, "&");
                }
            }
            Animations.Write(msg, b);
        }
コード例 #6
0
ファイル: Animations.cs プロジェクト: SabrinM/Regression
 public static void Write(string[] msgs, Body b = null)
 {
     Animations.Write(Strings.RandString(msgs), b);
 }
コード例 #7
0
ファイル: Animations.cs プロジェクト: SabrinM/Regression
 public static void AnimateWashingUnderwear(Underwear underwear)
 {
     Animations.Write(Strings.InsertVariables(Strings.RandString(Animations.t.Washing_Underwear), (Body)null, underwear), (Body)null);
 }
コード例 #8
0
ファイル: Animations.cs プロジェクト: SabrinM/Regression
 public static void AnimateDryingBedding(Body b)
 {
     Animations.Write(Animations.t.Bedding_Still_Wet, b);
 }