Пример #1
0
        private void updateMaturationProgress()
        {
            double babyTimeReciproke = maturationTime.TotalSeconds / babyTime.TotalSeconds;
            double maturation        = Math.Round((double)(nudCurrentWeight.Value / nudTotalWeight.Value), 3);

            labelMaturationProgress.Text = Math.Round(100 * maturation, 1).ToString() + " %";
            if (maturationTime.TotalSeconds * maturation < babyTime.TotalSeconds)
            {
                labelTimeLeftBaby.Text      = Utils.durationUntil(babyTime.Subtract(new TimeSpan(0, 0, (int)(babyTime.TotalSeconds * babyTimeReciproke * maturation))));
                labelTimeLeftBaby.ForeColor = SystemColors.ControlText;
            }
            else
            {
                labelTimeLeftBaby.Text      = "not a baby anymore";
                labelTimeLeftBaby.ForeColor = SystemColors.GrayText;
            }
            if (maturation < 1)
            {
                labelTimeLeftGrowing.Text      = Utils.durationUntil(maturationTime.Subtract(new TimeSpan(0, 0, (int)(maturationTime.TotalSeconds * maturation))));
                labelTimeLeftGrowing.ForeColor = SystemColors.ControlText;
            }
            else
            {
                labelTimeLeftGrowing.Text      = "mature";
                labelTimeLeftGrowing.ForeColor = SystemColors.GrayText;
            }

            double foodAmount = 0;
            string foodAmountBabyString = "", foodAmountAdultString = "";

            if (Values.V.species[speciesIndex].taming.eats != null)
            {
                if (Values.V.species[speciesIndex].taming.eats.IndexOf("Raw Meat") >= 0)
                {
                    if (uiControls.Trough.foodAmountFromUntil(speciesIndex, Values.V.babyFoodConsumptionSpeedMultiplier, maturation, 0.1, out foodAmount))
                    {
                        foodAmountBabyString = Math.Ceiling(foodAmount / 50) + " Raw Meat";
                    }
                    if (uiControls.Trough.foodAmountFromUntil(speciesIndex, Values.V.babyFoodConsumptionSpeedMultiplier, maturation, 1, out foodAmount))
                    {
                        foodAmountAdultString = Math.Ceiling(foodAmount / 50) + " Raw Meat";
                    }
                }
                else if (Values.V.species[speciesIndex].taming.eats.IndexOf("Mejoberry") >= 0)
                {
                    if (uiControls.Trough.foodAmountFromUntil(speciesIndex, Values.V.babyFoodConsumptionSpeedMultiplier, maturation, 0.1, out foodAmount))
                    {
                        foodAmountBabyString = Math.Ceiling(foodAmount / 30) + " Mejoberries";
                    }
                    if (uiControls.Trough.foodAmountFromUntil(speciesIndex, Values.V.babyFoodConsumptionSpeedMultiplier, maturation, 1, out foodAmount))
                    {
                        foodAmountAdultString = Math.Ceiling(foodAmount / 30) + " Mejoberries";
                    }
                }
            }
            labelAmountFoodBaby.Text  = foodAmountBabyString;
            labelAmountFoodAdult.Text = foodAmountAdultString;
        }
Пример #2
0
        public static string knockoutInfo(int speciesIndex, int level, double longneck, double crossbow, double bow, double slingshot, double club, double prod, out bool knockoutNeeded, out string koNumbers)
        {
            koNumbers      = "";
            knockoutNeeded = false;
            if (speciesIndex >= 0 && speciesIndex < Values.V.species.Count)
            {
                //total torpor for level
                double totalTorpor = Values.V.species[speciesIndex].stats[7].BaseValue * (1 + Values.V.species[speciesIndex].stats[7].IncPerWildLevel * (level - 1));
                // torpor depletion per second for level
                double torporDeplPS = torporDepletionPS(Values.V.species[speciesIndex].taming.torporDepletionPS0, level);

                knockoutNeeded = Values.V.species[speciesIndex].taming.violent;
                string warning = "";
                if (!knockoutNeeded)
                {
                    warning = "+++ Creature must not be knocked out for taming! +++\n\n";
                }

                // print needed tranq arrows needed to ko creature.
                // wooden club: 10 torpor
                // slingshot: 14 dmg, stone - tranq - mult: 1.75 ==> 24.5 torpor
                // Bow - arrow causes 20 dmg, tranqMultiplier are 2 + 2.5 = 4.5 ==> 90 Torpor / arrow.
                // crossbow 35 dmg * 4.5 ==> 157.5 torpor
                // longneck dart: 26 * 8.5 = 221
                // shocking tranq dart: 26*17 = 442
                // electric prod: 226

                koNumbers = (longneck > 0 ? Math.Ceiling(totalTorpor / (442 * longneck)) + " × Shocking Tranq Darts\n" : "")
                            + (longneck > 0 ? Math.Ceiling(totalTorpor / (221 * longneck)) + " × Tranquilizer Darts\n" : "")
                            + (prod > 0 ? Math.Ceiling(totalTorpor / (226 * prod)) + " × Electric Prod Hits\n" : "")
                            + (crossbow > 0 ? Math.Ceiling(totalTorpor / (157.5 * crossbow)) + " × Tranquilizer Arrows (Crossbow)\n" : "")
                            + (bow > 0 ? Math.Ceiling(totalTorpor / (90 * bow)) + " × Tranquilizer Arrows (Bow)\n" : "")
                            + (slingshot > 0 ? Math.Ceiling(totalTorpor / (24.5 * slingshot)) + " × Slingshot Hits\n" : "")
                            + (club > 0 ? Math.Ceiling(totalTorpor / (10 * club)) + " × Wooden Club Hits\n" : "");

                string boneDmAdjusters = boneDamageAdjustersImmobilisation(speciesIndex);
                if (boneDmAdjusters.Length > 0)
                {
                    koNumbers += "\n" + boneDmAdjusters + "\n";
                }

                // torpor depletion per s
                string torporDepletion = "";
                if (torporDeplPS > 0)
                {
                    torporDepletion = "\nTime until max torpor is depleted: " + Utils.durationUntil(new TimeSpan(0, 0, (int)Math.Round(totalTorpor / torporDeplPS)))
                                      + "\nTorpor-depletion: " + Math.Round(torporDeplPS, 2)
                                      + " / s;\nThat is approx. one Narcoberry every " + Math.Round(7.5 / torporDeplPS + 3, 1)
                                      + " s or one Narcotic every " + Math.Round(40 / torporDeplPS + 8, 1)
                                      + " s or one Bio Toxin every " + Math.Round(80 / torporDeplPS + 16, 1) + " s";
                }

                return(warning + koNumbers + torporDepletion);
            }
            return("");
        }
Пример #3
0
        public void updateTamingData()
        {
            if (updateCalculation && speciesIndex >= 0)
            {
                updateKOCounting();

                TimeSpan duration = new TimeSpan();
                int      narcoBerries = 0, narcotics = 0, bioToxines = 0, bonusLevel = 0;
                double   te = 0, hunger = 0;
                bool     enoughFood     = false;
                var      usedFood       = new List <string>();
                var      foodAmount     = new List <int>();
                var      foodAmountUsed = new List <int>();
                quickTamingInfos = "n/a";
                int level = (int)nudLevel.Value;

                if (Values.V.species[speciesIndex].taming.eats != null)
                {
                    int foodCounter = Values.V.species[speciesIndex].taming.eats.Count;
                    foreach (TamingFoodControl tfc in foodControls)
                    {
                        if (foodCounter == 0)
                        {
                            break;
                        }
                        foodCounter--;

                        usedFood.Add(tfc.FoodName);
                        foodAmount.Add(tfc.amount);
                        tfc.maxFood        = Taming.foodAmountNeeded(speciesIndex, level, tamingSpeedMultiplier, tfc.FoodName, Values.V.species[speciesIndex].taming.nonViolent);
                        tfc.tamingDuration = Taming.tamingDuration(speciesIndex, tfc.maxFood, tfc.FoodName, tamingFoodRateMultiplier, Values.V.species[speciesIndex].taming.nonViolent);
                    }
                    Taming.tamingTimes(speciesIndex, level, tamingSpeedMultiplier, tamingFoodRateMultiplier, usedFood, foodAmount, out foodAmountUsed, out duration, out narcoBerries, out narcotics, out bioToxines, out te, out hunger, out bonusLevel, out enoughFood);

                    for (int f = 0; f < foodAmountUsed.Count; f++)
                    {
                        foodControls[f].foodUsed = foodAmountUsed[f];
                    }
                }

                if (enoughFood)
                {
                    labelResult.Text = "It takes " + Utils.durationUntil(duration)
                                       + " to tame the " + Values.V.speciesNames[speciesIndex] + "."
                                       + "\n\n"
                                       + "Taming Effectiveness: " + Math.Round(100 * te, 1) + " %"
                                       + "\nBonus-Level: +" + bonusLevel + " (total level after Taming: " + (nudLevel.Value + bonusLevel) + ")"
                                       + "\n\n"
                                       + $"Food has to drop by {hunger:F1} units."
                                       + "\n\n"
                                       + $"{narcoBerries} Narcoberries or\n"
                                       + $"{narcotics} Narcotics or\n"
                                       + $"{bioToxines} Bio Toxines are needed"
                                       + firstFeedingWaiting;

                    if (foodAmountUsed.Count > 0)
                    {
                        quickTamingInfos = Taming.quickInfoOneFood(speciesIndex, level, tamingSpeedMultiplier, tamingFoodRateMultiplier, foodControls[0].FoodName, foodControls[0].maxFood, foodControls[0].foodNameDisplay);
                        // show raw meat or mejoberries as alternative (often used)
                        for (int i = 1; i < usedFood.Count; i++)
                        {
                            if (usedFood[i] == "Raw Meat" || usedFood[i] == "Mejoberry")
                            {
                                quickTamingInfos += "\n\n" + Taming.quickInfoOneFood(speciesIndex, level, tamingSpeedMultiplier, tamingFoodRateMultiplier, foodControls[i].FoodName, foodControls[i].maxFood, foodControls[i].foodNameDisplay);
                                break;
                            }
                        }

                        quickTamingInfos += "\n\n" + koNumbers
                                            + "\n\n" + boneDamageAdjustersImmobilization
                                            + firstFeedingWaiting;
                    }

                    if (favoriteKibble != null)
                    {
                        if (Kibbles.K.kibble.ContainsKey(favoriteKibble))
                        {
                            labelResult.Text += "\n\nKibble:" + Kibbles.K.kibble[favoriteKibble].RecipeAsText();
                        }
                    }
                }
                else if (foodAmountUsed.Count == 0)
                {
                    labelResult.Text = "no taming-data available";
                }
                else
                {
                    labelResult.Text = "Not enough food to tame the creature!";
                }

                numericUpDownCurrentTorpor.Value = (decimal)(Values.V.species[speciesIndex].stats[7].BaseValue * (1 + Values.V.species[speciesIndex].stats[7].IncPerWildLevel * (level - 1)));

                // displays the time until the food has decreased enough to tame the creature in one go.
                var durationStarving = new TimeSpan(0, 0, (int)(hunger / foodDepletion));
                lblTimeUntilStarving.Text = "Time until you can feed all needed food in one go: " + Utils.duration(durationStarving);
                if (Values.V.species[speciesIndex].stats[3].BaseValue * (1 + Values.V.species[speciesIndex].stats[3].IncPerWildLevel * (level / 7)) < hunger)
                {
                    lblTimeUntilStarving.Text     += "\nCareful: this creature could have not enough food, so you might have to feed it before this time to prevent it from starving (check its inventory)!";
                    lblTimeUntilStarving.ForeColor = Color.DarkRed;
                }
                else
                {
                    lblTimeUntilStarving.ForeColor = SystemColors.ControlText;
                }

                starvingTime = DateTime.Now.Add(durationStarving);
            }
        }
Пример #4
0
 public static string quickInfoOneFood(Species species, int level, double tamingSpeedMultiplier, double tamingFoodRateMultiplier,
                                       string foodName, int foodAmount, string foodDisplayName)
 {
     tamingTimes(species, level, tamingSpeedMultiplier, tamingFoodRateMultiplier, foodName, foodAmount,
                 out List <int> foodAmountUsed, out TimeSpan duration, out int _, out int narcotics, out int _, out double te,
                 out double hunger, out int bonusLevel, out bool _);
     return($"{string.Format(Loc.s("WithXFoodTamingTakesTime"), foodAmountUsed[0], foodDisplayName, Utils.durationUntil(duration))}\n" +
            $"{Loc.s("Narcotics")}: {narcotics}\n" +
            $"{Loc.s("TamingEffectiveness_Abb")}: {Math.Round(100 * te, 1)} %\n" +
            $"{Loc.s("BonusLevel")}: +{(level + bonusLevel)}\n" +
            $"{string.Format(Loc.s("FoodHasToDropUnits"), Math.Round(hunger, 1))}");
 }
Пример #5
0
        public static string knockoutInfo(Species species, int level, double longneck, double crossbow, double bow, double slingshot,
                                          double club, double prod, double harpoon, double boneDamageAdjuster, out bool knockoutNeeded, out string koNumbers)
        {
            koNumbers      = string.Empty;
            knockoutNeeded = false;
            if (species?.taming != null)
            {
                //total torpor for level
                double totalTorpor = species.stats[(int)StatNames.Torpidity].BaseValue * (1 + species.stats[(int)StatNames.Torpidity].IncPerWildLevel * (level - 1));
                // torpor depletion per second for level
                double torporDeplPS = torporDepletionPS(species.taming.torporDepletionPS0, level);

                knockoutNeeded = species.taming.violent;
                string warning = string.Empty;
                if (!knockoutNeeded)
                {
                    warning = "+++ Creature must not be knocked out for taming! +++\n\n";
                }

                // print needed tranq arrows needed to ko creature.
                // wooden club: 10 torpor
                // slingshot: 14 dmg, stone - tranq - mult: 1.75 ==> 24.5 torpor
                // Bow - arrow causes 20 dmg, tranqMultiplier are 2 + 2.5 = 4.5 ==> 90 Torpor / arrow.
                // crossbow 35 dmg * 4.5 ==> 157.5 torpor
                // longneck dart: 26 * 8.5 = 221
                // shocking tranq dart: 26*17 = 442
                // electric prod: 226

                koNumbers = (harpoon > 0 ? Math.Ceiling(totalTorpor / (306 * boneDamageAdjuster * harpoon)) + " × " + Loc.s("TranqSpearBolts") + "\n" : string.Empty)
                            + (longneck > 0 ? Math.Ceiling(totalTorpor / (442 * boneDamageAdjuster * longneck)) + " × " + Loc.s("ShockingTranqDarts") + "\n" : string.Empty)
                            + (longneck > 0 ? Math.Ceiling(totalTorpor / (221 * boneDamageAdjuster * longneck)) + " × " + Loc.s("TranqDarts") + "\n" : string.Empty)
                            + (prod > 0 ? Math.Ceiling(totalTorpor / (226 * boneDamageAdjuster * prod)) + " × " + Loc.s("ElectricProdHits") + "\n" : string.Empty)
                            + (crossbow > 0 ? Math.Ceiling(totalTorpor / (157.5 * boneDamageAdjuster * crossbow)) + " × " + Loc.s("TranqArrowsCrossBow") + "\n" : string.Empty)
                            + (bow > 0 ? Math.Ceiling(totalTorpor / (90 * boneDamageAdjuster * bow)) + " × " + Loc.s("TranqArrowsBow") + "\n" : string.Empty)
                            + (slingshot > 0 ? Math.Ceiling(totalTorpor / (24.5 * boneDamageAdjuster * slingshot)) + " × " + Loc.s("SlingshotHits") + "\n" : string.Empty)
                            + (club > 0 ? Math.Ceiling(totalTorpor / (10 * boneDamageAdjuster * club)) + " × " + Loc.s("WoodenClubHits") + "\n" : string.Empty);

                // torpor depletion per s
                string torporDepletion = string.Empty;
                if (torporDeplPS > 0)
                {
                    torporDepletion = "\n" + Loc.s("TimeUntilTorporDepleted") + ": " + Utils.durationUntil(new TimeSpan(0, 0, (int)Math.Round(totalTorpor / torporDeplPS)))
                                      + "\n" + Loc.s("TorporDepletion") + ": " + Math.Round(torporDeplPS, 2)
                                      + " / s;\n" + Loc.s("ApproxOneNarcoberryEvery") + " " + Math.Round(7.5 / torporDeplPS + 3, 1)
                                      + " s " + Loc.s("OrOneNarcoticEvery") + " " + Math.Round(40 / torporDeplPS + 8, 1)
                                      + " s " + Loc.s("OrOneBioToxinEvery") + " " + Math.Round(80 / torporDeplPS + 16, 1) + " s";
                }

                return(warning + koNumbers + torporDepletion);
            }
            return(string.Empty);
        }
Пример #6
0
        private void UpdateTamingData()
        {
            if (!updateCalculation || selectedSpecies == null)
            {
                return;
            }
            if (selectedSpecies.taming == null)
            {
                NoTamingData();
                return;
            }

            this.Enabled = true;
            UpdateKOCounting();

            TimeSpan duration = new TimeSpan();
            int      narcoBerries = 0, narcotics = 0, bioToxines = 0, bonusLevel = 0;
            double   te = 0, hunger = 0;
            bool     enoughFood     = false;
            var      usedFood       = new List <string>();
            var      foodAmount     = new List <int>();
            var      foodAmountUsed = new List <int>();

            quickTamingInfos = "n/a";
            int level = (int)nudLevel.Value;

            if (selectedSpecies.taming.eats != null)
            {
                int foodCounter = selectedSpecies.taming.eats.Count;
                foreach (TamingFoodControl tfc in foodControls)
                {
                    if (foodCounter == 0)
                    {
                        break;
                    }
                    foodCounter--;

                    usedFood.Add(tfc.FoodName);
                    foodAmount.Add(tfc.amount);
                    tfc.maxFood        = Taming.foodAmountNeeded(selectedSpecies, level, tamingSpeedMultiplier, tfc.FoodName, selectedSpecies.taming.nonViolent);
                    tfc.tamingDuration = Taming.tamingDuration(selectedSpecies, tfc.maxFood, tfc.FoodName, tamingFoodRateMultiplier, selectedSpecies.taming.nonViolent);
                }
                Taming.tamingTimes(selectedSpecies, level, tamingSpeedMultiplier, tamingFoodRateMultiplier, usedFood, foodAmount, out foodAmountUsed, out duration, out narcoBerries, out narcotics, out bioToxines, out te, out hunger, out bonusLevel, out enoughFood);

                for (int f = 0; f < foodAmountUsed.Count; f++)
                {
                    foodControls[f].foodUsed = foodAmountUsed[f];
                }
            }

            if (enoughFood)
            {
                labelResult.Text = $"It takes {Utils.durationUntil(duration)} to tame the {selectedSpecies.name}.\n\n" +
                                   $"Taming Effectiveness: {Math.Round(100 * te, 1)} %\n" +
                                   $"Bonus-Level: +{bonusLevel} (total level after Taming: {(nudLevel.Value + bonusLevel)})\n\n" +
                                   $"Food has to drop by {hunger:F1} units.\n\n" +
                                   $"{narcoBerries} Narcoberries or\n" +
                                   $"{narcotics} Narcotics or\n" +
                                   $"{bioToxines} Bio Toxines are needed{firstFeedingWaiting}";

                labelResult.Text += kibbleRecipe;
            }
            else if (foodAmountUsed.Count == 0)
            {
                labelResult.Text = Loc.s("noTamingData");
            }
            else
            {
                labelResult.Text = Loc.s("notEnoughFoodToTame");
            }

            numericUpDownCurrentTorpor.ValueSave = (decimal)(selectedSpecies.stats[(int)StatNames.Torpidity].BaseValue * (1 + selectedSpecies.stats[(int)StatNames.Torpidity].IncPerWildLevel * (level - 1)));

            // displays the time until the food has decreased enough to tame the creature in one go.
            var durationStarving = new TimeSpan(0, 0, (int)(hunger / foodDepletion));

            lbTimeUntilStarving.Text = (enoughFood ? $"{Loc.s("TimeUntilFeedingAllFood")}: {Utils.duration(durationStarving)}" : "");
            nudCurrentFood.Value     = (decimal)(selectedSpecies.stats[(int)StatNames.Food].BaseValue * (1 + selectedSpecies.stats[(int)StatNames.Food].IncPerWildLevel * (level / 7))); // approximating the food level
            if ((double)nudCurrentFood.Value < hunger)
            {
                lbTimeUntilStarving.Text     += (lbTimeUntilStarving.Text.Length > 0 ? "\n" : "") + $"{Loc.s("WarningMoreStarvingThanFood")}";
                lbTimeUntilStarving.ForeColor = Color.DarkRed;
            }
            else
            {
                lbTimeUntilStarving.ForeColor = SystemColors.ControlText;
            }

            starvingTime = DateTime.Now.Add(durationStarving);

            //// quicktame infos
            if (foodAmountUsed.Count > 0)
            {
                quickTamingInfos = Taming.quickInfoOneFood(selectedSpecies, level, tamingSpeedMultiplier, tamingFoodRateMultiplier, foodControls[0].FoodName, foodControls[0].maxFood, foodControls[0].foodNameDisplay);
                // show raw meat or mejoberries as alternative (often used)
                for (int i = 1; i < usedFood.Count; i++)
                {
                    if (usedFood[i] == "Raw Meat" || usedFood[i] == "Mejoberry")
                    {
                        quickTamingInfos += "\n\n" + Taming.quickInfoOneFood(selectedSpecies, level, tamingSpeedMultiplier, tamingFoodRateMultiplier, foodControls[i].FoodName, foodControls[i].maxFood, foodControls[i].foodNameDisplay);
                        break;
                    }
                }

                quickTamingInfos += "\n\n" + koNumbers
                                    + "\n\n" + boneDamageAdjustersImmobilization
                                    + firstFeedingWaiting
                                    + kibbleRecipe;
            }
        }
Пример #7
0
        public void updateTamingData()
        {
            if (updateCalculation && speciesIndex >= 0)
            {
                updateKOCounting();

                TimeSpan duration = new TimeSpan();
                int      narcoBerries = 0, narcotics = 0, bioToxines = 0, bonusLevel = 0;
                double   te = 0, hunger = 0;
                bool     enoughFood     = false;
                var      usedFood       = new List <string>();
                var      foodAmount     = new List <int>();
                var      foodAmountUsed = new List <int>();
                quickTamingInfos = "n/a";
                int level = (int)nudLevel.Value;

                if (Values.V.species[speciesIndex].taming.eats != null)
                {
                    int foodCounter = Values.V.species[speciesIndex].taming.eats.Count;
                    foreach (TamingFoodControl tfc in foodControls)
                    {
                        if (foodCounter == 0)
                        {
                            break;
                        }
                        foodCounter--;

                        usedFood.Add(tfc.FoodName);
                        foodAmount.Add(tfc.amount);
                        tfc.maxFood        = Taming.foodAmountNeeded(speciesIndex, level, evolutionEvent, tfc.FoodName, Values.V.species[speciesIndex].taming.nonViolent);
                        tfc.tamingDuration = Taming.tamingDuration(speciesIndex, tfc.maxFood, tfc.FoodName, Values.V.species[speciesIndex].taming.nonViolent);
                    }
                    Taming.tamingTimes(speciesIndex, level, evolutionEvent, usedFood, foodAmount, out foodAmountUsed, out duration, out narcoBerries, out narcotics, out bioToxines, out te, out hunger, out bonusLevel, out enoughFood);

                    for (int f = 0; f < foodAmountUsed.Count; f++)
                    {
                        foodControls[f].foodUsed = foodAmountUsed[f];
                    }
                }

                if (enoughFood)
                {
                    labelResult.Text = "It takes " + Utils.durationUntil(duration)
                                       + " to tame the " + Values.V.speciesNames[speciesIndex] + "."
                                       + "\n\n"
                                       + "Taming Effectiveness: " + Math.Round(100 * te, 1) + " %"
                                       + "\nBonus-Level: +" + bonusLevel + " (total level after Taming: " + (nudLevel.Value + bonusLevel) + ")"
                                       + "\n\n"
                                       + $"Food has to drop by {hunger:F1} units."
                                       + "\n\n"
                                       + $"{narcoBerries} Narcoberries or\n"
                                       + $"{narcotics} Narcotics or\n"
                                       + $"{bioToxines} Bio Toxines are needed"
                                       + firstFeedingWaiting;

                    if (foodAmountUsed.Count > 0)
                    {
                        quickTamingInfos = Taming.quickInfoOneFood(speciesIndex, level, evolutionEvent, foodControls[0].FoodName, foodControls[0].maxFood, foodControls[0].foodNameDisplay);
                        // show raw meat or mejoberries as alternative (often used)
                        for (int i = 1; i < usedFood.Count; i++)
                        {
                            if (usedFood[i] == "Raw Meat" || usedFood[i] == "Mejoberry")
                            {
                                quickTamingInfos += "\n\n" + Taming.quickInfoOneFood(speciesIndex, level, evolutionEvent, foodControls[i].FoodName, foodControls[i].maxFood, foodControls[i].foodNameDisplay);
                                break;
                            }
                        }

                        quickTamingInfos += "\n\n" + koNumbers
                                            + "\n\n" + boneDamageAdjusters
                                            + firstFeedingWaiting;
                    }
                }
                else if (foodAmountUsed.Count == 0)
                {
                    labelResult.Text = "no taming-data available";
                }
                else
                {
                    labelResult.Text = "Not enough food to tame the creature!";
                }

                numericUpDownCurrentTorpor.Value = (decimal)(Values.V.species[speciesIndex].stats[7].BaseValue * (1 + Values.V.species[speciesIndex].stats[7].IncPerWildLevel * (level - 1)));
                nudCurrentFood.Value             = (decimal)(Values.V.species[speciesIndex].stats[3].BaseValue * (1 + Values.V.species[speciesIndex].stats[3].IncPerWildLevel * (level / 7)));
            }
        }
Пример #8
0
        public static string quickInfoOneFood(int speciesIndex, int level, double tamingSpeedMultiplier, double tamingFoodRateMultiplier, string foodName, int foodAmount, string foodDisplayName)
        {
            List <int> foodAmountUsed;
            bool       enoughFood;
            TimeSpan   duration;
            int        narcoBerries, narcotics, bioToxines, bonusLevel;
            double     te, hunger;

            tamingTimes(speciesIndex, level, tamingSpeedMultiplier, tamingFoodRateMultiplier, foodName, foodAmount, out foodAmountUsed, out duration, out narcoBerries, out narcotics, out bioToxines, out te, out hunger, out bonusLevel, out enoughFood);
            return("With " + foodAmountUsed[0] + " × " + foodDisplayName + " taming takes " + Utils.durationUntil(duration)
                   + "\nNarcotics: " + narcotics
                   + "\nTE: " + Math.Round(100 * te, 1) + " %"
                   + $"\nBonus-Level: +{bonusLevel} (⇒ {(level + bonusLevel)})"
                   + $"\nFood has to drop by {hunger:F1} units.");
        }
Пример #9
0
        public static string quickInfoOneFood(int speciesIndex, int level, double tamingSpeedMultiplier, double tamingFoodRateMultiplier, string foodName, int foodAmount, string foodDisplayName)
        {
            List <int> foodAmountUsed;
            bool       enoughFood;
            TimeSpan   duration;
            int        narcoBerries, narcotics, bioToxines, bonusLevel;
            double     te, hunger;

            tamingTimes(speciesIndex, level, tamingSpeedMultiplier, tamingFoodRateMultiplier, foodName, foodAmount, out foodAmountUsed, out duration, out narcoBerries, out narcotics, out bioToxines, out te, out hunger, out bonusLevel, out enoughFood);
            return(String.Format(Loc.s("WithXFoodTamingTakesTime"), foodAmountUsed[0], foodDisplayName, Utils.durationUntil(duration))
                   + "\n" + Loc.s("Narcotics") + ": " + narcotics
                   + "\n" + Loc.s("TamingEffectiveness_Abb") + ": " + Math.Round(100 * te, 1) + " %"
                   + "\n" + Loc.s("BonusLevel") + ": +" + (level + bonusLevel)
                   + "\n" + String.Format(Loc.s("FoodHasToDropUnits"), Math.Round(hunger, 1)));
        }