示例#1
0
        private static string StatChangeText(Creature target, CanineModifiers modifiers, double strengthIncrease, double speedIncrease, double intelligenceDecrease)
        {
            StringBuilder sb = new StringBuilder();

            if (modifiers.HasFlag(CanineModifiers.BLACK))
            {
                sb.Append(GlobalStrings.NewParagraph() + "You feel yourself relaxing as gentle warmth spreads through your body. Honestly you don't think you'd mind running into a demon or monster right now, they'd make for good entertainment.");
                if (target.relativeCorruption < 50)
                {
                    sb.Append(" You shake your head, blushing hotly. Where did that thought come from?");
                }
            }

            if (strengthIncrease > 0)
            {
                sb.Append(GlobalStrings.NewParagraph());
                if (strengthIncrease > 1)
                {
                    sb.Append("Your muscles ripple and grow, bulging outwards.");
                }
                else
                {
                    sb.Append("Your muscles feel more toned.");
                }
            }

            if (speedIncrease > 0)
            {
                sb.Append(GlobalStrings.NewParagraph());
                if (speedIncrease > 1)
                {
                    sb.Append("You find your muscles responding quicker, faster, and you feel an odd desire to go for a walk.");
                }
                else
                {
                    sb.Append("You feel quicker.");
                }
            }
            if (intelligenceDecrease > 0)
            {
                string howDumb = intelligenceDecrease > 1 ? "MUCH " : "";
                sb.Append(GlobalStrings.NewParagraph() + "You feel " + howDumb + "dumber.");
            }
            return(sb.ToString());
        }
示例#2
0
        private static string InitialTransformationText(CanineModifiers modifiers, bool crit)
        {
            //standard. simple, to the point.
            if (modifiers == CanineModifiers.STANDARD)
            {
                if (crit)
                {
                    return("The pepper tastes particularly potent, searingly hot and spicy.");
                }
                else
                {
                    return("The pepper is strangely spicy but very tasty.");
                }
            }

            //compound or non-standard type. start with appearance.
            StringBuilder sb = new StringBuilder();

            //by default, we're not expecting compound types, but we do support them
            //so, we check to see if each modifier flags is set, but we exit early whenever
            //we only have that modifier flag.
            //I'm fully expecting the compound nonsense to never be used, but whatever, it wasn't that hard to write.
            bool plural = modifiers.HasFlag(CanineModifiers.DOUBLE);

            if (modifiers.HasFlag(CanineModifiers.DOUBLE))
            {
                if (modifiers == CanineModifiers.DOUBLE)
                {
                    return("The double-pepper is strange, looking like it was formed when two peppers grew together near their bases. Not surprisingly, it takes twice as long to finish, and you could swear it was twice as delicious as well.");
                }
                else
                {
                    sb.Append("The double-pepper is strange, looking like it was formed when two peppers grew together near their bases. ");
                }
            }
            if (modifiers.HasFlag(CanineModifiers.LARGE))
            {
                if (modifiers == CanineModifiers.LARGE)
                {
                    return("The pepper is so large and thick that you have to eat it in several large bites. It is not as spicy as the normal ones, but is delicious and flavorful.");
                }
                else
                {
                    sb.Append((plural ? "Each section " : "This pepper ") + "is so large and thick, you have no doubt it'll take several bites to eat. ");
                    if (plural)
                    {
                        sb.Append(" them");
                    }
                    sb.Append(". ");
                }
            }
            if (modifiers.HasFlag(CanineModifiers.BLACK))
            {
                if (modifiers == CanineModifiers.BLACK)
                {
                    return("This pepper appears like a standard one, but with a distinct black color. It tastes sweet, but has a bit of a tangy aftertaste.");
                }
                else
                {
                    sb.Append("Its color, a distinct shade of black, " + (sb.Length != 0 ? "also " : "") + "sets it apart from other peppers, and you have little doubt that affects the flavor. ");
                }
            }
            if (modifiers.HasFlag(CanineModifiers.BULBY) || modifiers.HasFlag(CanineModifiers.KNOTTY))
            {
                if (modifiers == CanineModifiers.BULBY)
                {
                    return("You eat the pepper, even the two orb-like growths that have grown out from the base. It's delicious!");
                }
                else if (modifiers == CanineModifiers.KNOTTY)
                {
                    return("The pepper is a bit tough to eat due to the swollen bulge near the base, but you manage to cram it down and munch on it. It's extra spicy!");
                }
                else
                {
                    sb.Append("Its base has a distinct shape, bulging in a manner unlike what you're used to. It'll probably further complicate eating the thing, but you're sure you'll manage. ");
                }
            }

            //compound shape generic text.
            sb.Append("Despite the strage shape, you eventually manage to eat the entire thing. ");

            //now for the flavor. We only use one modifier for this, whichever procs first. Any modifiers with distinct
            //flavors are given first priority.
            if (modifiers.HasFlag(CanineModifiers.BLACK))
            {
                sb.Append("It initially tasted sweet, but your definitely getting a tangy after-taste. ");
            }
            else if (modifiers.HasFlag(CanineModifiers.KNOTTY))
            {
                sb.Append("It is definitely spicier than most other peppers, causing you to blink a few times. ");
            }
            else if (modifiers.HasFlag(CanineModifiers.LARGE))
            {
                sb.Append("It's far more mellow than your standard pepper, but it makes up for that in flavor");
            }
            else
            {
                sb.Append("It's quite delicious! ");
            }
            return(sb.ToString());
        }