public override bool HandleEvent(GetShortDescriptionEvent E)
        {
            string chitinPreviewLookDescriptNew      = "{{green|You note your new skin feels unencumbering and wellworn.}}";
            string chitinPreviewLookDescriptWorn     = "{{yellow|Your chitin armor feels heavy and aged.}}";
            string chitinPreviewLookDescriptStandard = "{{orange|You note your skin's segmented clusters clamber a little as you move about.}}";
            string chitinPreviewLookDescriptOld      = "{{red|Your chitin skin is beginning to impede your movements, it'll be ready to molt soon.}}";

            if (E.Postfix.Length > 0 && E.Postfix[E.Postfix.Length - 1] != '\n')
            {
                E.Postfix.Append('\n');
            }
            if (turnsTilMolt >= totalTurnsTilMolt * 0.7 && IsPlayer())
            {
                E.Postfix.Append('\n').Append(chitinPreviewLookDescriptNew);
            }
            else if (turnsTilMolt >= totalTurnsTilMolt * 0.3 && IsPlayer())
            {
                E.Postfix.Append('\n').Append(chitinPreviewLookDescriptStandard);
            }
            else if (turnsTilMolt >= totalTurnsTilMolt * 0.1 && IsPlayer())
            {
                E.Postfix.Append('\n').Append(chitinPreviewLookDescriptWorn);
            }
            else if (turnsTilMolt >= totalTurnsTilMolt * 0.05 && IsPlayer())
            {
                E.Postfix.Append('\n').Append(chitinPreviewLookDescriptOld);
            }
            return(true);
        }
示例#2
0
        public override bool HandleEvent(GetShortDescriptionEvent E)
        {
            // AddPlayerMessage("Adding Intuit Part to creatures and Starting ShortDescript");

            E.Postfix.Append("\n").Append(EntityData());

            return true;
        }
示例#3
0
        public override bool HandleEvent(GetShortDescriptionEvent E)
        {
            string Glyph = "{{dark gray|Atomized dust wafts from disir lesions riddling " + ParentObject.its + " withering form, this husk won't last ...}}";

            if (E.Postfix.Length > 0 && E.Postfix[E.Postfix.Length - 1] != '\n')
            {
                E.Postfix.Append('\n');
            }
            E.Postfix.Append('\n').Append(Glyph);
            return(true);
        }
        public override bool HandleEvent(GetShortDescriptionEvent E)
        {
            string Glyph = (ParentObject.IsPlayer() ? "You" : ParentObject.The + ParentObject.ShortDisplayName) + ParentObject.GetVerb("bear", true, true) + "bear a psionic glyph on " + ParentObject.Poss("forehead");

            if (E.Postfix.Length > 0 && E.Postfix[E.Postfix.Length - 1] != '\n')
            {
                E.Postfix.Append('\n');
            }
            E.Postfix.Append('\n').Append(Glyph);
            return(true);
        }
示例#5
0
 public override bool HandleEvent(GetShortDescriptionEvent E)
 {
     if (this.stage > 0)
     {
         string debug = "";
         if (Scanning.HasScanningFor(XRLCore.Core.Game.Player.Body, Scanning.Scan.Bio))
         {
             int drams = 0;
             if (GetPuddle() != null)
             {
                 if (debugstring() == "thriving" || debugstring() == "dry")
                 {
                     drams = GetPuddle().Volume;
                 }
             }
             int count = drams * stageLength;
             int days  = (int)Math.Floor((double)count / 1200);
             int hours = (int)Math.Floor((double)(count % 1200) / (1200 / 24));
             E.Postfix.Append("&gBIOSCAN: Suitable water for " + days.ToString() + "d " + hours.ToString() + "h.");
         }
     }
     return(true);
 }
        public override bool HandleEvent(GetShortDescriptionEvent E)
        {
            GameObject Tail  = ParentObject;
            GameObject Owner = Tail.Equipped;
            Mutations  HasSynergyMutation = Owner.GetPart <Mutations>();
            string     DescriptTest       = "TESTING THIS ABOMINATION!";
            string     DescriptQuills     = "{{light blue|This thick muscular tail is lined with large barbs, angled for striking potential predators. [Bonus Damage on Tail Whip]}}\n"
                                            + "{{green|" + Tail.Armor.AV + "+ Bonus AV\n"
                                            + Tail.Armor.DV + "+ Bonus DV}}\n";
            string DescriptFurred = "{{light blue|A large, thick fuzzy tail. You feel the urge to curl up in it.}}\n"
                                    + "{{green|" + Tail.Armor.AV + "+ Bonus AV\n"
                                    + Tail.Armor.DV + "+ Bonus DV}}\n";
            string DescriptChimera = "{{red|The beginnings of a primordial shah.}}\n"
                                     + "{{green|" + Tail.Armor.AV + "+ Bonus AV\n"
                                     + Tail.Armor.DV + "+ Bonus DV}}\n";
            string DescriptPlated = "{{light blue|Its armed with plated scales, their strength allows this appendage to deflect blows.\n"
                                    + "{{green|" + Tail.Armor.AV + "+ Bonus AV\n"
                                    + Tail.Armor.DV + "+ Bonus DV}}\n"
                                    + "Your tail can deflect blows on successful blocks: Strength Modifier -> AC.";
            string PlatedAccesser = "[Your tail can deflect blows on successful blocks: Strength Modifier -> AC.]";
            string DescriptLum    = "{{grey|The fleshy end of this tail glows luminously as chemical reactions perform a mesmerizing dance in a membrane at its tip.}}\n"
                                    + "{{green|" + Tail.Armor.AV + "+ Bonus AV\n"
                                    + Tail.Armor.DV + "+ Bonus DV}}\n";
            string DescriptFin = "{{grey|This tail has a large dorsal fin, its strength aids in swimming strides, a rare skill.}}\n"
                                 + "{{green|" + Tail.Armor.AV + "+ Bonus AV\n"
                                 + Tail.Armor.DV + "+ Bonus DV}}\n";
            string DescriptTwo = "This one is a somewhat mutated tail with several grotesque appendages granting it odd qualities.\n"
                                 + "{{green|" + Tail.Armor.AV + "+ Bonus AV\n"
                                 + Tail.Armor.DV + "+ Bonus DV}}\n";
            string DescriptThree = "This strange tail echoes nature's mockeries of order and anarchy; it offers its bearer a variety of perks at their disposal.\n"
                                   + "{{green|" + Tail.Armor.AV + "+ Bonus AV\n"
                                   + Tail.Armor.DV + "+ Bonus DV}}\n";
            string DescriptFour = "This tail is worthy of the name zenith, a deadly composition sculpted through nature's will to evolve.\n"
                                  + "{{green|" + Tail.Armor.AV + "+ Bonus AV\n"
                                  + Tail.Armor.DV + "+ Bonus DV}}\n";
            string DescriptFive = "To look upon this twisted limb is to be reminded of the meaning chimera. It awakens primitive fears, maybe even a sudden thrill.\n"
                                  + "{{green|" + Tail.Armor.AV + "+ Bonus AV\n"
                                  + Tail.Armor.DV + "+ Bonus DV}}\n";

            string[] outputs   = SynergyMutations.GetRange(0, 4).ToArray();
            int      Synergies = SynergyMutations.Count(HasSynergyMutation.HasMutation);

            try
            {
                if (Synergies == 1 && HasSynergyMutation.HasMutation("Quills"))
                {
                    Debug.Log("MY Log: Initiate quills");
                    E.Infix.Append('\n').Append(DescriptQuills);
                }
                else if (Synergies == 1 && HasSynergyMutation.HasMutation("ThickFur"))
                {
                    Debug.Log("MY Log: Initiate fur");
                    E.Infix.Append('\n').Append(DescriptFurred);
                }
                else if (Synergies == 1 && HasSynergyMutation.HasMutation("RoughScales"))
                {
                    Debug.Log("MY Log: Initiate scale");
                    E.Infix.Append('\n').Append(DescriptPlated);
                }
                else if (Synergies == 1 && HasSynergyMutation.HasMutation("LightManipulation"))
                {
                    Debug.Log("MY Log: Initiate lum");
                    E.Infix.Append('\n').Append(DescriptLum);
                }
                else if (Synergies == 1 && HasSynergyMutation.HasMutation("Amphibious"))
                {
                    E.Infix.Append('\n').Append(DescriptFin);
                }
                else if (Synergies == 1 && HasSynergyMutation.HasMutation("Chimera"))
                {
                    E.Infix.Append('\n').Append(DescriptChimera);
                }
                else if (Synergies == 2)
                {
                    E.Infix.Append('\n').Append(DescriptTwo);
                }
                else if (Synergies == 3)
                {
                    E.Infix.Append('\n').Append(DescriptThree);
                }
                else if (Synergies == 4)
                {
                    E.Infix.Append('\n').Append(DescriptFour);
                }
                else if (Synergies >= 5)
                {
                    E.Infix.Append('\n').Append(DescriptFive);
                }
                if (HasSynergyMutation.HasMutation("RoughScales") && Synergies > 1)
                {
                    E.Postfix.Append('\n').Append(PlatedAccesser);
                }
            }
            catch
            { E.Infix.Append('\n').Append(DescriptTest); }
            return(base.HandleEvent(E));
        }
示例#7
0
 public override bool HandleEvent(GetShortDescriptionEvent E)
 {
     E.Postfix.Append("Gills swell and shutter at " + ParentObject.its + " sides, glistening with " + ParentObject.its + " glandular skin.");
     return(true);
 }
示例#8
0
 public override bool HandleEvent(GetShortDescriptionEvent E)
 {
     E.Postfix.Append("Glistening blades of cartilage line " + ParentObject.its + " extremities and back.");
     return(true);
 }
示例#9
0
        /// <summary>
        /// Processes the list of ingredient game objects / boolean selections and creates a new
        /// array of IngredientScreenInfo data that is used for displaying those ingredients in our
        /// custom menu.
        /// </summary>
        public static List <IngredientScreenInfo> GetIngredientScreenInfo(List <GameObject> ingredients, List <bool> selections)
        {
            Dictionary <string, int>    liquidAmountsOnHand = null;
            List <IngredientScreenInfo> ingredientInfo      = new List <IngredientScreenInfo>();
            GetShortDescriptionEvent    descriptionEvent    = new GetShortDescriptionEvent();
            int index = 0;

            foreach (GameObject ing in ingredients)
            {
                IngredientScreenInfo      info    = new IngredientScreenInfo(selections, index);
                PreparedCookingIngredient ingPart = ing?.GetPart <PreparedCookingIngredient>();
                LiquidVolume liquid            = ing?.LiquidVolume;
                string       liquidDescription = string.Empty;

                //simple ingredient name
                if (ingPart != null)
                {
                    info.OptionName = ing.ShortDisplayName;
                }
                else if (liquid != null)
                {
                    liquidDescription = liquid.GetLiquidDescription(false);
                    info.OptionName   = ing.ShortDisplayName + " " + liquidDescription;
                }
                else
                {
                    LogUnique("(Error) Unable to process ingredient description for ingredient "
                              + $"'{ing?.DisplayNameStripped} for display on IngredientSelectionScreen.");
                }

                //cook effect description
                string cookEffect = string.Empty;
                descriptionEvent.Postfix.Clear();
                if (ingPart != null)
                {
                    ingPart.HandleEvent(descriptionEvent);
                    cookEffect = descriptionEvent.Postfix.ToString();
                }
                else if (liquid != null)
                {
                    liquid.HandleEvent(descriptionEvent);
                    cookEffect = descriptionEvent.Postfix.ToString();
                }
                info.CookEffect = SimplifyCookEffectDescription(cookEffect, ing);

                //number of ingredient uses remaining
                int    amount = 0;
                string unit   = string.Empty;
                info.UseCount = string.Empty;
                if (ingPart != null)
                {
                    Stacker stackInfo = ing.GetPart <Stacker>();
                    amount = stackInfo != null ? stackInfo.Number : ingPart.charges;
                    unit   = "serving";
                }
                else if (liquid != null)
                {
                    //Get the player's total volume of this type of liquid in all containers.
                    //In the base game, the ingredient selector only shows the volume of the first
                    //container found - it ignores additional drams in extra containers.
                    if (liquidAmountsOnHand == null)
                    {
                        liquidAmountsOnHand = GetLiquidAmountsOnHand();
                    }
                    if (liquidAmountsOnHand.ContainsKey(liquidDescription))
                    {
                        amount = liquidAmountsOnHand[liquidDescription];
                    }
                    else
                    {
                        amount = liquid.Volume;
                    }
                    unit = "dram";
                }
                if (amount == 1)
                {
                    info.UseCount = "{{y|  }}{{C|1}}{{y| " + unit + "}}";
                }
                else if (amount > 1 && amount <= 9)
                {
                    info.UseCount = "{{y|  }}{{C|" + amount.ToString() + "}}{{y| " + unit + "s}}";
                }
                else if (amount > 1 && amount <= 99)
                {
                    info.UseCount = "{{y| }}{{C|" + amount.ToString() + "}}{{y| " + unit + "s}}";
                }
                else if (amount >= 100)
                {
                    info.UseCount = "{{C|" + amount.ToString() + "}}{{y| " + unit + "s}}";
                }

                ingredientInfo.Add(info);
                index++;
            }
            return(ingredientInfo);
        }
 public override bool HandleEvent(GetShortDescriptionEvent E)
 {
     E.Postfix.AppendRules(GetDescription(Tier));
     return(true);
 }