Exemplo n.º 1
0
        /// <summary>
        /// Calculates the seed price based on the seed growth info and price
        /// </summary>
        /// <param name="seed">The seed</param>
        /// <returns>
        /// Returns a value based on a random multiplier, regrowth days, and
        /// potential amount per harvest
        /// </returns>
        private static int CalculateCropPrice(SeedItem seed)
        {
            int seedPrice = seed.Price * 2;             // The amount we store here is half of what we want to base this off of
            CropGrowthInformation growthInfo = seed.CropGrowthInfo;

            double multiplier = 1;

            if (seedPrice < 31)
            {
                multiplier = Range.GetRandomValue(15, 40) / (double)10;
            }
            else if (seedPrice < 61)
            {
                multiplier = Range.GetRandomValue(15, 35) / (double)10;
            }
            else if (seedPrice < 91)
            {
                multiplier = Range.GetRandomValue(15, 30) / (double)10;
            }
            else if (seedPrice < 121)
            {
                multiplier = Range.GetRandomValue(15, 25) / (double)10;
            }
            else
            {
                multiplier = Range.GetRandomValue(15, 20) / (double)10;
            }

            double regrowthDaysMultiplier = 1;

            switch (growthInfo.DaysToRegrow)
            {
            case 1: regrowthDaysMultiplier = 0.3; break;

            case 2: regrowthDaysMultiplier = 0.4; break;

            case 3: regrowthDaysMultiplier = 0.5; break;

            case 4: regrowthDaysMultiplier = 0.6; break;

            case 5: regrowthDaysMultiplier = 0.7; break;

            case 6: regrowthDaysMultiplier = 0.8; break;

            case 7: regrowthDaysMultiplier = 0.9; break;

            default: regrowthDaysMultiplier = 1; break;
            }

            double amountPerHarvestMultiplier = 1;

            switch (growthInfo.ExtraCropInfo.MinExtra)
            {
            case 0: break;

            case 1: break;

            case 2: amountPerHarvestMultiplier = 0.6; break;

            case 3: amountPerHarvestMultiplier = 0.45; break;

            case 4: amountPerHarvestMultiplier = 0.3; break;

            default:
                Globals.ConsoleError($"Unexpected seed with more than 4 minimum extra crops: {seed.Id}");
                break;
            }
            if (growthInfo.ExtraCropInfo.CanGetExtraCrops && amountPerHarvestMultiplier == 1)
            {
                amountPerHarvestMultiplier = 0.9;
            }

            return((int)(seedPrice * multiplier * regrowthDaysMultiplier * amountPerHarvestMultiplier));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Randomizes the crops - currently only does prices, and only for seasonal crops
        /// </summary>
        /// <param name="editedObjectInfo">The edited object information</param>
        /// crop format: name/price/-300/Seeds -74/name/tooltip
        private static void RandomizeCrops(EditedObjectInformation editedObjectInfo)
        {
            List <int> regrowableSeedIdsToRandomize = ItemList.GetSeeds().Cast <SeedItem>()
                                                      .Where(x => x.Randomize && x.CropGrowthInfo.RegrowsAfterHarvest)
                                                      .Select(x => x.Id)
                                                      .ToList();
            List <int> regrowableSeedIdsToRandomizeCopy = new List <int>(regrowableSeedIdsToRandomize);

            List <int> nonRegrowableSeedIdsToRandomize = ItemList.GetSeeds().Cast <SeedItem>()
                                                         .Where(x => x.Randomize && !x.CropGrowthInfo.RegrowsAfterHarvest)
                                                         .Select(x => x.Id)
                                                         .ToList();
            List <int> nonRegrowableSeedIdsToRandomizeCopy = new List <int>(nonRegrowableSeedIdsToRandomize);

            // Fill up a dictionary to remap the seed values
            Dictionary <int, int> seedMappings = new Dictionary <int, int>();           // Original value, new value

            foreach (int originalRegrowableSeedId in regrowableSeedIdsToRandomize)
            {
                seedMappings.Add(originalRegrowableSeedId, Globals.RNGGetAndRemoveRandomValueFromList(regrowableSeedIdsToRandomizeCopy));
            }

            foreach (int originalNonRegrowableSeedId in nonRegrowableSeedIdsToRandomize)
            {
                seedMappings.Add(originalNonRegrowableSeedId, Globals.RNGGetAndRemoveRandomValueFromList(nonRegrowableSeedIdsToRandomizeCopy));
            }

            // Loop through the dictionary and reassign the values, keeping the seasons the same as before
            foreach (KeyValuePair <int, int> seedMapping in seedMappings)
            {
                int originalValue = seedMapping.Key;
                int newValue      = seedMapping.Value;

                CropGrowthInformation cropInfoToAdd = CropGrowthInformation.ParseString(CropGrowthInformation.DefaultStringData[newValue]);
                cropInfoToAdd.GrowingSeasons = CropGrowthInformation.ParseString(CropGrowthInformation.DefaultStringData[originalValue]).GrowingSeasons;
                cropInfoToAdd.GrowthStages   = GetRandomGrowthStages(cropInfoToAdd.GrowthStages.Count);
                cropInfoToAdd.CanScythe      = Globals.RNGGetNextBoolean(10);
                cropInfoToAdd.DaysToRegrow   = cropInfoToAdd.RegrowsAfterHarvest ? Range.GetRandomValue(1, 7) : -1;

                if (!Globals.Config.RandomizeCrops)
                {
                    continue;
                }                                                                 // Preserve the original seasons/etc
                CropGrowthInformation.CropIdsToInfo[originalValue] = cropInfoToAdd;
            }

            // Set the object info
            List <CropItem> randomizedCrops = ItemList.GetCrops(true).Cast <CropItem>()
                                              .Where(x => nonRegrowableSeedIdsToRandomize.Union(regrowableSeedIdsToRandomize).Contains(x.MatchingSeedItem.Id))
                                              .ToList();
            List <CropItem> vegetables = randomizedCrops.Where(x => !x.IsFlower).ToList();
            List <CropItem> flowers    = randomizedCrops.Where(x => x.IsFlower).ToList();

            List <string> vegetableNames   = NameAndDescriptionRandomizer.GenerateVegetableNames(vegetables.Count + 1);
            List <string> cropDescriptions = NameAndDescriptionRandomizer.GenerateCropDescriptions(randomizedCrops.Count);

            SetCropAndSeedInformation(
                editedObjectInfo,
                vegetables,
                vegetableNames,
                cropDescriptions);                 // Note: It removes the descriptions it uses from the list after assigning them- may want to edit later

            SetUpCoffee(editedObjectInfo, vegetableNames[vegetableNames.Count - 1]);
            SetUpRice(editedObjectInfo);

            SetCropAndSeedInformation(
                editedObjectInfo,
                flowers,
                NameAndDescriptionRandomizer.GenerateFlowerNames(flowers.Count),
                cropDescriptions);                 // Note: It removes the descriptions it uses from the list after assigning them- may want to edit later

            SetUpCookedFood(editedObjectInfo);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Randomize fruit tree information
        /// </summary>
        /// <param name="editedObjectInfo">The edited object information</param>
        private static void RandomizeFruitTrees(EditedObjectInformation editedObjectInfo)
        {
            int[] fruitTreesIds = new int[]
            {
                (int)ObjectIndexes.CherrySapling,
                (int)ObjectIndexes.ApricotSapling,
                (int)ObjectIndexes.OrangeSapling,
                (int)ObjectIndexes.PeachSapling,
                (int)ObjectIndexes.PomegranateSapling,
                (int)ObjectIndexes.AppleSapling
            };
            List <Item> allPotentialTreesItems = ItemList.Items.Values.Where(x =>
                                                                             fruitTreesIds.Contains(x.Id) || x.DifficultyToObtain < ObtainingDifficulties.Impossible
                                                                             ).ToList();

            List <Item> treeItems = Globals.RNGGetRandomValuesFromList(allPotentialTreesItems, 6);

            string[] seasons = { "spring", "spring", "summer", "summer", "fall", "fall" };
            seasons[Globals.RNG.Next(0, 6)] = "winter";

            int[] prices = treeItems.Select(x => x.GetPriceForObtainingDifficulty(0.2)).ToArray();
            if (!Globals.Config.RandomizeFruitTrees)
            {
                return;
            }

            // Fruit tree asset replacements
            var fruitTreeReplacements = new Dictionary <int, string>();

            // The Trees are incremented starting with cherry
            for (int i = 0; i < treeItems.Count; i++)
            {
                int    price         = prices[i];
                string season        = seasons[i];
                string seasonDisplay = Globals.GetTranslation($"seasons-{season}");
                Item   treeItem      = treeItems[i];
                string treeItemName  = treeItem.DisplayName;
                string fruitTreeName = treeItem.Id == fruitTreesIds[i] ?
                                       Globals.GetTranslation("item-recursion-sapling-name") :
                                       Globals.GetTranslation("sapling-text", new { itemName = treeItemName });
                string fruitTreeEnglishName = treeItem.Id == fruitTreesIds[i] ?
                                              "Recursion Sapling" :
                                              $"{treeItem.Name} Sapling";

                int fruitTreeId = fruitTreesIds[i];

                string fruitTreeValue = $"{i}/{season}/{treeItem.Id}/{price}";
                editedObjectInfo.FruitTreeReplacements[fruitTreeId] = fruitTreeValue;

                ItemList.Items[fruitTreeId].OverrideName = fruitTreeEnglishName;
                string fruitTreeObjectValue = $"{fruitTreeName}/{price / 2}/-300/Basic -74/{fruitTreeName}/{Globals.GetTranslation("sapling-description", new { itemName = treeItemName, season = seasonDisplay })}";
                editedObjectInfo.ObjectInformationReplacements[fruitTreeId] = fruitTreeObjectValue;
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Gets the recipe name and description
 /// </summary>
 /// <param name="id">The ID of the recipe</param>
 /// <param name="itemName">The item that is in this recipe</param>
 /// <returns>The internationalized string</returns>
 private static string GetRecipeNameAndDescription(int id, string itemName)
 {
     return(Globals.GetTranslation($"item-{id}-name-and-description", new { itemName }));
 }
Exemplo n.º 5
0
        /// <summary>
        /// Populates the bundle with the name, required items, minimum required, and color
        /// </summary>
        protected override void Populate()
        {
            BundleType = Globals.RNGGetAndRemoveRandomValueFromList(RoomBundleTypes);
            List <RequiredItem> potentialItems = new List <RequiredItem>();

            switch (BundleType)
            {
            case BundleTypes.BulletinNews:
                Name           = Globals.GetTranslation("bundle-bulletin-news");
                potentialItems = new List <RequiredItem>()
                {
                    new RequiredItem((int)ObjectIndexes.SoggyNewspaper),
                    new RequiredItem((int)ObjectIndexes.SoggyNewspaper),
                    new RequiredItem((int)ObjectIndexes.SoggyNewspaper),
                    new RequiredItem((int)ObjectIndexes.SoggyNewspaper),
                    new RequiredItem((int)ObjectIndexes.SoggyNewspaper),
                    new RequiredItem((int)ObjectIndexes.SoggyNewspaper),
                    new RequiredItem((int)ObjectIndexes.SoggyNewspaper),
                    new RequiredItem((int)ObjectIndexes.SoggyNewspaper),
                };
                RequiredItems = Globals.RNGGetRandomValuesFromList(potentialItems, Range.GetRandomValue(1, 8));
                Color         = BundleColors.Orange;
                break;

            case BundleTypes.BulletinCleanup:
                Name          = Globals.GetTranslation("bundle-bulletin-cleanup");
                RequiredItems = RequiredItem.CreateList(ItemList.GetTrash(), 1, 5);
                Color         = BundleColors.Green;
                break;

            case BundleTypes.BulletinHated:
                Name                 = Globals.GetTranslation("bundle-bulletin-hated"); potentialItems = RequiredItem.CreateList(NPC.UniversalHates);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Range.GetRandomValue(4, 6);
                Color                = BundleColors.Red;
                break;

            case BundleTypes.BulletinLoved:
                Name                 = Globals.GetTranslation("bundle-bulletin-loved");
                RequiredItems        = RequiredItem.CreateList(NPC.UniversalLoves);
                MinimumRequiredItems = 2;
                Color                = BundleColors.Red;
                break;

            case BundleTypes.BulletinAbigail:
                Name                 = Globals.GetTranslation("Abigail-name");
                potentialItems       = RequiredItem.CreateList(Abigail.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Purple;
                break;

            case BundleTypes.BulletinAlex:
                Name                 = Globals.GetTranslation("Alex-name");
                potentialItems       = RequiredItem.CreateList(Alex.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Green;
                break;

            case BundleTypes.BulletinCaroline:
                Name                 = Globals.GetTranslation("Caroline-name");
                potentialItems       = RequiredItem.CreateList(Caroline.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Blue;
                break;

            case BundleTypes.BulletinClint:
                Name                 = Globals.GetTranslation("Clint-name");
                potentialItems       = RequiredItem.CreateList(Clint.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Orange;
                break;

            case BundleTypes.BulletinDwarf:
                Name                 = Globals.GetTranslation("Dwarf-name");
                potentialItems       = RequiredItem.CreateList(Dwarf.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Orange;
                break;

            case BundleTypes.BulletinDemetrius:
                Name                 = Globals.GetTranslation("Demetrius-name");
                potentialItems       = RequiredItem.CreateList(Demetrius.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Blue;
                break;

            case BundleTypes.BulletinElliott:
                Name                 = Globals.GetTranslation("Elliott-name");
                potentialItems       = RequiredItem.CreateList(Elliott.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Red;
                break;

            case BundleTypes.BulletinEmily:
                Name                 = Globals.GetTranslation("Emily-name");
                potentialItems       = RequiredItem.CreateList(Emily.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Red;
                break;

            case BundleTypes.BulletinEvelyn:
                Name                 = Globals.GetTranslation("Evelyn-name");
                potentialItems       = RequiredItem.CreateList(Evelyn.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Red;
                break;

            case BundleTypes.BulletinGeorge:
                Name                 = Globals.GetTranslation("George-name");
                potentialItems       = RequiredItem.CreateList(George.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Green;
                break;

            case BundleTypes.BulletinGus:
                Name                 = Globals.GetTranslation("Gus-name");
                potentialItems       = RequiredItem.CreateList(Gus.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Orange;
                break;

            case BundleTypes.BulletinHaley:
                Name                 = Globals.GetTranslation("Haley-name");
                potentialItems       = RequiredItem.CreateList(Haley.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Blue;
                break;

            case BundleTypes.BulletinHarvey:
                Name                 = Globals.GetTranslation("Harvey-name");
                potentialItems       = RequiredItem.CreateList(Harvey.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Green;
                break;

            case BundleTypes.BulletinJas:
                Name                 = Globals.GetTranslation("Jas-name");
                potentialItems       = RequiredItem.CreateList(Jas.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Purple;
                break;

            case BundleTypes.BulletinJodi:
                Name                 = Globals.GetTranslation("Jodi-name");
                potentialItems       = RequiredItem.CreateList(Jodi.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Purple;
                break;

            case BundleTypes.BulletinKent:
                Name                 = Globals.GetTranslation("Kent-name");
                potentialItems       = RequiredItem.CreateList(Kent.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Green;
                break;

            case BundleTypes.BulletinKrobus:
                Name                 = Globals.GetTranslation("Krobus-name");
                potentialItems       = RequiredItem.CreateList(Krobus.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Blue;
                break;

            case BundleTypes.BulletinLeah:
                Name                 = Globals.GetTranslation("Leah-name");
                potentialItems       = RequiredItem.CreateList(Leah.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Green;
                break;

            case BundleTypes.BulletinLewis:
                Name                 = Globals.GetTranslation("Lewis-name");
                potentialItems       = RequiredItem.CreateList(Lewis.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Green;
                break;

            case BundleTypes.BulletinLinus:
                Name                 = Globals.GetTranslation("Linus-name");
                potentialItems       = RequiredItem.CreateList(Linus.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Orange;
                break;

            case BundleTypes.BulletinMarnie:
                Name                 = Globals.GetTranslation("Marnie-name");
                potentialItems       = RequiredItem.CreateList(Marnie.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Orange;
                break;

            case BundleTypes.BulletinMaru:
                Name                 = Globals.GetTranslation("Maru-name");
                potentialItems       = RequiredItem.CreateList(Maru.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Purple;
                break;

            case BundleTypes.BulletinPam:
                Name                 = Globals.GetTranslation("Pam-name");
                potentialItems       = RequiredItem.CreateList(Pam.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Purple;
                break;

            case BundleTypes.BulletinPenny:
                Name                 = Globals.GetTranslation("Penny-name");
                potentialItems       = RequiredItem.CreateList(Penny.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Yellow;
                break;

            case BundleTypes.BulletinPierre:
                Name                 = Globals.GetTranslation("Pierre-name");
                potentialItems       = RequiredItem.CreateList(Pierre.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Orange;
                break;

            case BundleTypes.BulletinRobin:
                Name                 = Globals.GetTranslation("Robin-name");
                potentialItems       = RequiredItem.CreateList(Robin.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Yellow;
                break;

            case BundleTypes.BulletinSam:
                Name                 = Globals.GetTranslation("Sam-name");
                potentialItems       = RequiredItem.CreateList(Sam.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Blue;
                break;

            case BundleTypes.BulletinSandy:
                Name                 = Globals.GetTranslation("Sandy-name");
                potentialItems       = RequiredItem.CreateList(Sandy.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Blue;
                break;

            case BundleTypes.BulletinSebastian:
                Name                 = Globals.GetTranslation("Sebastian-name");
                potentialItems       = RequiredItem.CreateList(Sebastian.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Purple;
                break;

            case BundleTypes.BulletinShane:
                Name                 = Globals.GetTranslation("Shane-name");
                potentialItems       = RequiredItem.CreateList(Shane.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Blue;
                break;

            case BundleTypes.BulletinVincent:
                Name                 = Globals.GetTranslation("Vincent-name");
                potentialItems       = RequiredItem.CreateList(Vincent.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Red;
                break;

            case BundleTypes.BulletinWilly:
                Name                 = Globals.GetTranslation("Willy-name");
                potentialItems       = RequiredItem.CreateList(Willy.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Red;
                break;

            case BundleTypes.BulletinWizard:
                Name                 = Globals.GetTranslation("Wizard-name");
                potentialItems       = RequiredItem.CreateList(Wizard.Loves);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Math.Min(Math.Max(RequiredItems.Count - 2, 3), RequiredItems.Count);
                Color                = BundleColors.Purple;
                break;

            case BundleTypes.BulletinColorPink:
                Name           = Globals.GetTranslation("bundle-bulletin-pink");
                potentialItems = RequiredItem.CreateList(new List <int>
                {
                    (int)ObjectIndexes.Shrimp,
                    (int)ObjectIndexes.StrangeBun,
                    (int)ObjectIndexes.SalmonDinner,
                    (int)ObjectIndexes.PinkCake,
                    (int)ObjectIndexes.Sashimi,
                    (int)ObjectIndexes.IceCream,
                    (int)ObjectIndexes.Salmonberry,
                    (int)ObjectIndexes.Coral,
                    (int)ObjectIndexes.Dolomite,
                    (int)ObjectIndexes.Nekoite,
                    (int)ObjectIndexes.StarShards,
                    (int)ObjectIndexes.Peach,
                    (int)ObjectIndexes.BugMeat,
                    (int)ObjectIndexes.Bait
                });
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Range.GetRandomValue(3, 6);
                Color = BundleColors.Red;
                break;

            case BundleTypes.BulletinColorWhite:
                Name           = Globals.GetTranslation("bundle-bulletin-white");
                potentialItems = RequiredItem.CreateList(new List <int>
                {
                    (int)ObjectIndexes.Leek,
                    (int)ObjectIndexes.Quartz,
                    (int)ObjectIndexes.OrnamentalFan,
                    (int)ObjectIndexes.DinosaurEgg,
                    (int)ObjectIndexes.ChickenStatue,
                    (int)ObjectIndexes.WhiteAlgae,
                    (int)ObjectIndexes.WhiteEgg,
                    (int)ObjectIndexes.LargeWhiteEgg,
                    (int)ObjectIndexes.Milk,
                    (int)ObjectIndexes.LargeMilk,
                    (int)ObjectIndexes.FriedEgg,
                    (int)ObjectIndexes.RicePudding,
                    (int)ObjectIndexes.IceCream,
                    (int)ObjectIndexes.Mayonnaise,
                    (int)ObjectIndexes.IronBar,
                    (int)ObjectIndexes.RefinedQuartz,
                    (int)ObjectIndexes.IronOre,
                    (int)ObjectIndexes.SpringOnion,
                    (int)ObjectIndexes.SnowYam,
                    (int)ObjectIndexes.Rice,
                    (int)ObjectIndexes.GoatCheese,
                    (int)ObjectIndexes.Cloth,
                    (int)ObjectIndexes.GoatMilk,
                    (int)ObjectIndexes.LargeGoatMilk,
                    (int)ObjectIndexes.Wool,
                    (int)ObjectIndexes.DuckEgg,
                    (int)ObjectIndexes.RabbitsFoot,
                    (int)ObjectIndexes.PaleBroth,
                    (int)ObjectIndexes.Esperite,
                    (int)ObjectIndexes.Lunarite,
                    (int)ObjectIndexes.Marble,
                    (int)ObjectIndexes.PrehistoricScapula,
                    (int)ObjectIndexes.PrehistoricTibia,
                    (int)ObjectIndexes.PrehistoricSkull,
                    (int)ObjectIndexes.SkeletalHand,
                    (int)ObjectIndexes.PrehistoricRib,
                    (int)ObjectIndexes.PrehistoricVertebra,
                    (int)ObjectIndexes.SkeletalTail,
                    (int)ObjectIndexes.NautilusFossil,
                    (int)ObjectIndexes.Trilobite,
                    (int)ObjectIndexes.ArtichokeDip,
                    (int)ObjectIndexes.LeadBobber,
                    (int)ObjectIndexes.Chowder
                });
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Range.GetRandomValue(3, 6);
                Color = BundleColors.Yellow;
                break;
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// Generates a random boot name
        /// </summary>
        /// <returns>The name in the format: [adjective] (noun) (boot string) [of suffix]</returns>
        public string GenerateRandomBootName()
        {
            string bootName = Globals.RNGGetAndRemoveRandomValueFromList(Boots);

            return(GenerateRandomNonSlingshotName(bootName));
        }
        /// <summary>
        /// Sets a weapon's description based on its attributes
        /// </summary>
        /// <param name="weapon">The weapon to set the description for</param>
        private static void SetWeaponDescription(WeaponItem weapon)
        {
            string description = "";

            switch (weapon.Type)
            {
            case WeaponType.Dagger:
            case WeaponType.StabbingSword:
                description = Globals.GetTranslation("weapon-description-stabbing");
                break;

            case WeaponType.SlashingSword:
                description = Globals.GetTranslation("weapon-description-slashing");
                break;

            case WeaponType.ClubOrHammer:
                description = Globals.GetTranslation("weapon-description-crushing");
                break;

            default:
                Globals.ConsoleError($"Assigning description to an invalid weapon type: {weapon.ToString()}");
                break;
            }

            if (weapon.CritMultiplier == 100)
            {
                description += $" {Globals.GetTranslation("weapon-description-crit-high-damage")}";
            }

            else if (weapon.CritChance >= 8)
            {
                description += $" {Globals.GetTranslation("weapon-description-crit-high-frequency")}";
            }

            if (weapon.Knockback >= 15)
            {
                description += $" {Globals.GetTranslation("weapon-description-high-knockback")}";
            }

            if (weapon.Speed > 100)
            {
                description += $" {Globals.GetTranslation("weapon-description-fast")}";
            }

            if (weapon.AddedAOE > 0)
            {
                description += $" {Globals.GetTranslation("weapon-description-aoe")}";
            }

            if (weapon.AddedPrecision > 4)
            {
                description += $" {Globals.GetTranslation("weapon-description-accurate")}";
            }

            if (weapon.AddedDefense > 0)
            {
                description += $" {Globals.GetTranslation("weapon-description-defense")}";
            }

            if (weapon.Id == (int)WeaponIndexes.DarkSword)
            {
                description += $" {Globals.GetTranslation("weapon-description-heals")}";
            }

            weapon.Description = description;
        }
Exemplo n.º 8
0
        public static void Randomize(EditedObjectInformation editedObjectInfo)
        {
            List <FishItem> legendaryFish  = FishItem.GetLegendaries().Cast <FishItem>().ToList();
            List <FishItem> normalFish     = FishItem.Get().Cast <FishItem>().ToList();
            List <FishItem> normalFishCopy = new List <FishItem>();

            foreach (FishItem fish in normalFish)
            {
                FishItem fishInfo = new FishItem(fish.Id, true);
                CopyFishInfo(fish, fishInfo);
                normalFishCopy.Add(fishInfo);
            }

            List <string> fishNames = NameAndDescriptionRandomizer.GenerateFishNames(normalFish.Count + legendaryFish.Count);

            foreach (FishItem fish in normalFish)
            {
                FishItem         fishToReplace   = Globals.RNGGetAndRemoveRandomValueFromList(normalFishCopy);
                int              newDartChance   = GenerateRandomFishDifficulty();
                FishBehaviorType newBehaviorType = Globals.RNGGetRandomValueFromList(
                    Enum.GetValues(typeof(FishBehaviorType)).Cast <FishBehaviorType>().ToList());
                string newName = Globals.RNGGetAndRemoveRandomValueFromList(fishNames);

                if (!Globals.Config.RandomizeFish)
                {
                    continue;
                }

                CopyFishInfo(fishToReplace, fish);
                fish.DartChance   = newDartChance;
                fish.BehaviorType = newBehaviorType;
                fish.OverrideName = newName;

                if (new int[] { 158, 161, 162 }.Contains(fish.Id))                 // The three hard-coded mines fish
                {
                    if (!fish.AvailableLocations.Contains(Locations.UndergroundMine))
                    {
                        fish.AvailableLocations.Add(Locations.UndergroundMine);
                    }
                }

                editedObjectInfo.FishReplacements.Add(fish.Id, fish.ToString());
                editedObjectInfo.ObjectInformationReplacements.Add(fish.Id, GetFishObjectInformation(fish));
            }

            foreach (FishItem fish in legendaryFish)
            {
                FishBehaviorType newBehaviorType = Globals.RNGGetRandomValueFromList(
                    Enum.GetValues(typeof(FishBehaviorType)).Cast <FishBehaviorType>().ToList());

                string newName = Globals.RNGGetAndRemoveRandomValueFromList(fishNames);

                if (!Globals.Config.RandomizeFish)
                {
                    continue;
                }

                fish.BehaviorType = newBehaviorType;
                fish.OverrideName = newName;

                editedObjectInfo.FishReplacements.Add(fish.Id, fish.ToString());
                editedObjectInfo.ObjectInformationReplacements.Add(fish.Id, GetFishObjectInformation(fish));
            }

            WriteToSpoilerLog();
        }
Exemplo n.º 9
0
 /// <summary>
 /// Force generate a random bundle
 /// Failsafe in case we run out of bundles
 /// </summary>
 protected void GenerateRandomBundleFailsafe()
 {
     Globals.ConsoleWarn($"Had to generate random bundle for {Room} as a fallback for this bundle: {BundleType.ToString()}");
     PopulateRandomBundle();
     GenerateRandomReward();
 }
Exemplo n.º 10
0
        /// <summary>
        /// Populates the given fish with the default info
        /// </summary>
        /// <param name="fish">The fish</param>
        public static void FillDefaultFishInfo(FishItem fish)
        {
            string input = DefaultStringData[fish.Id];

            string[] fields = input.Split('/');
            if (fields.Length != 13)
            {
                Globals.ConsoleError($"Incorrect number of fields when parsing fish with input: {input}");
                return;
            }

            // Name
            // Skipped because it's computed from the id

            // Dart Chance
            if (!int.TryParse(fields[(int)FishFields.DartChance], out int dartChance))
            {
                Globals.ConsoleError($"Could not parse the dart chance when parsing fish with input: {input}");
                return;
            }
            fish.DartChance = dartChance;

            // Behavior type
            string behaviorTypeString = fields[(int)FishFields.BehaviorType];

            switch (behaviorTypeString)
            {
            case "mixed":
                fish.BehaviorType = FishBehaviorType.Mixed;
                break;

            case "dart":
                fish.BehaviorType = FishBehaviorType.Dart;
                break;

            case "smooth":
                fish.BehaviorType = FishBehaviorType.Smooth;
                break;

            case "floater":
                fish.BehaviorType = FishBehaviorType.Floater;
                break;

            case "sinker":
                fish.BehaviorType = FishBehaviorType.Sinker;
                break;

            default:
                Globals.ConsoleError($"Fish behavior type {behaviorTypeString} not found when parsing fish with input: {input}");
                return;
            }

            // Min Size
            if (!int.TryParse(fields[(int)FishFields.MinSize], out int minSize))
            {
                Globals.ConsoleError($"Could not parse the min size when parsing fish with input: {input}");
                return;
            }
            fish.MinSize = minSize;

            // Max Size
            if (!int.TryParse(fields[(int)FishFields.MaxSize], out int maxSize))
            {
                Globals.ConsoleError($"Could not parse the max size when parsing fish with input: {input}");
                return;
            }
            fish.MaxSize = maxSize;

            // Times
            List <int> times = ParseTimes(fields[(int)FishFields.Times]);

            if (times.Count == 2)
            {
                fish.Times = new Range(times[0], times[1]);
            }
            else if (times.Count == 4)
            {
                if (times[0] < times[1] && times[1] < times[2] && times[2] < times[3])
                {
                    fish.Times         = new Range(times[0], times[3]);
                    fish.ExcludedTimes = new Range(times[1], times[2]);
                }
                else
                {
                    Globals.ConsoleError($"Times are not in chronological order when parsing fish with input: {input}");
                }
            }

            // Seasons
            string[] seasonStrings = fields[(int)FishFields.Seasons].Split(' ');
            foreach (string seasonString in seasonStrings)
            {
                switch (seasonString.ToLower())
                {
                case "spring":
                    fish.AvailableSeasons.Add(Seasons.Spring);
                    break;

                case "summer":
                    fish.AvailableSeasons.Add(Seasons.Summer);
                    break;

                case "fall":
                    fish.AvailableSeasons.Add(Seasons.Fall);
                    break;

                case "winter":
                    fish.AvailableSeasons.Add(Seasons.Winter);
                    break;

                default:
                    Globals.ConsoleError($"Tries to parse {seasonString} into a season when parsing fish with input: {input}");
                    return;
                }
            }

            // Weather
            string weather = fields[(int)FishFields.Weather];

            switch (weather)
            {
            case "sunny":
                fish.Weathers.Add(Weather.Sunny);
                break;

            case "rainy":
                fish.Weathers.Add(Weather.Rainy);
                break;

            case "both":
                fish.Weathers.Add(Weather.Sunny);
                fish.Weathers.Add(Weather.Rainy);
                break;

            default:
                Globals.ConsoleError($"Unexpected weather string when parsing fish with input: {input}");
                break;
            }

            // Unused
            fish.UnusedData = fields[(int)FishFields.Unused];

            // Min Water Depth,
            if (!int.TryParse(fields[(int)FishFields.MinWaterDepth], out int minWaterDepth))
            {
                Globals.ConsoleError($"Could not parse the min water depth when parsing fish with input: {input}");
                return;
            }
            fish.MinWaterDepth = minWaterDepth;

            // Spawn Multiplier,
            if (!double.TryParse(fields[(int)FishFields.SpawnMultiplier], out double spawnMultiplier))
            {
                Globals.ConsoleError($"Could not parse the spawn multiplier when parsing fish with input: {input}");
                return;
            }
            fish.SpawnMultiplier = spawnMultiplier;

            // Depth Multiplier,
            if (!double.TryParse(fields[(int)FishFields.DepthMultiplier], out double depthMultiplier))
            {
                Globals.ConsoleError($"Could not parse the depth multiplier when parsing fish with input: {input}");
                return;
            }
            fish.DepthMultiplier = depthMultiplier;

            // Min Fishing Level
            if (!int.TryParse(fields[(int)FishFields.MinFishingLevel], out int minFishingLevel))
            {
                Globals.ConsoleError($"Could not parse the min fishing level when parsing fish with input: {input}");
                return;
            }
            fish.MinFishingLevel = minFishingLevel;
        }
Exemplo n.º 11
0
        /// <summary>
        /// Attempt to generate a random bundle - 10% chance
        /// </summary>
        /// <returns>True if successful, false otherwise</returns>
        protected bool TryGenerateRandomBundle()
        {
            if (Room != CommunityCenterRooms.Vault && Room != CommunityCenterRooms.Joja && Globals.RNGGetNextBoolean(10))
            {
                PopulateRandomBundle();
                return(true);
            }

            return(false);
        }
Exemplo n.º 12
0
 /// <summary>
 /// Gets a random file name from the files to pull from and removes the found entry from the list
 /// </summary>
 /// <param name="position">The position of the instrument - unused in this version of the function</param>
 /// <returns></returns>
 protected virtual string GetRandomFileName(Point position)
 {
     return(Globals.RNGGetAndRemoveRandomValueFromList(_filesToPullFrom));
 }
Exemplo n.º 13
0
        /// <summary>
        /// Not used normally - but when it is, used for the ObjectInformation string
        /// </summary>
        /// <returns />
        public override string ToString()
        {
            if (Id == (int)ObjectIndexes.Coffee)
            {
                return($"{Name}/150/1/Crafting/{Globals.GetTranslation("item-coffee-name", new { itemName = CoffeeIngredient })}/{Globals.GetTranslation("item-coffee-description")}/drink/0 0 0 0 0 0 0 0 0 1 0/120");
            }

            Globals.ConsoleError($"Called the ToString of unexpected item {Id}: {Name}");
            return("");
        }
Exemplo n.º 14
0
        /// <summary>
        /// Generates the reward for the bundle
        /// </summary>
        protected override void GenerateReward()
        {
            RequiredItem randomOre = Globals.RNGGetRandomValueFromList(new List <RequiredItem>()
            {
                new RequiredItem((int)ObjectIndexes.CopperOre, 100),
                new RequiredItem((int)ObjectIndexes.IronOre, 100),
                new RequiredItem((int)ObjectIndexes.GoldOre, 100),
                new RequiredItem((int)ObjectIndexes.IridiumOre, 10),
            });

            RequiredItem randomBar = Globals.RNGGetRandomValueFromList(new List <RequiredItem>()
            {
                new RequiredItem((int)ObjectIndexes.CopperBar, 15),
                new RequiredItem((int)ObjectIndexes.IronBar, 15),
                new RequiredItem((int)ObjectIndexes.GoldBar, 15),
                new RequiredItem((int)ObjectIndexes.IridiumBar)
            });

            RequiredItem randomGeode = Globals.RNGGetRandomValueFromList(new List <RequiredItem>()
            {
                new RequiredItem((int)ObjectIndexes.Geode, 25),
                new RequiredItem((int)ObjectIndexes.FrozenGeode, 25),
                new RequiredItem((int)ObjectIndexes.MagmaGeode, 25),
                new RequiredItem((int)ObjectIndexes.OmniGeode, 25)
            });

            RequiredItem randomMonsterDrop = Globals.RNGGetRandomValueFromList(new List <RequiredItem>()
            {
                new RequiredItem((int)ObjectIndexes.BugMeat, 200),
                new RequiredItem((int)ObjectIndexes.Slime, 150),
                new RequiredItem((int)ObjectIndexes.BatWing, 100),
                new RequiredItem((int)ObjectIndexes.SolarEssence, 50),
                new RequiredItem((int)ObjectIndexes.VoidEssence, 50)
            });

            RequiredItem randomExplosive = Globals.RNGGetRandomValueFromList(new List <RequiredItem>()
            {
                new RequiredItem((int)ObjectIndexes.CherryBomb, 25, 50),
                new RequiredItem((int)ObjectIndexes.Bomb, 25, 50),
                new RequiredItem((int)ObjectIndexes.MegaBomb, 25, 50)
            });

            RequiredItem randomGemstone = Globals.RNGGetRandomValueFromList(new List <RequiredItem>()
            {
                new RequiredItem((int)ObjectIndexes.Quartz, 25, 50),
                new RequiredItem((int)ObjectIndexes.FireQuartz, 25, 50),
                new RequiredItem((int)ObjectIndexes.EarthCrystal, 25, 50),
                new RequiredItem((int)ObjectIndexes.FrozenTear, 25, 50),
                new RequiredItem((int)ObjectIndexes.Aquamarine, 25, 50),
                new RequiredItem((int)ObjectIndexes.Amethyst, 25, 50),
                new RequiredItem((int)ObjectIndexes.Emerald, 25, 50),
                new RequiredItem((int)ObjectIndexes.Ruby, 25, 50),
                new RequiredItem((int)ObjectIndexes.Topaz, 25, 50),
                new RequiredItem((int)ObjectIndexes.Jade, 25, 50),
                new RequiredItem((int)ObjectIndexes.Diamond, 10, 30),
            });

            var potentialRewards = new List <RequiredItem>
            {
                randomOre,
                randomBar,
                randomGeode,
                randomMonsterDrop,
                randomExplosive,
                randomGemstone,
                new RequiredItem(Globals.RNGGetRandomValueFromList(ItemList.GetGeodeMinerals()), 25),
                new RequiredItem(Globals.RNGGetRandomValueFromList(ItemList.GetArtifacts())),
                new RequiredItem(Globals.RNGGetRandomValueFromList(ItemList.GetRings())),
                new RequiredItem((int)ObjectIndexes.Crystalarium),
                new RequiredItem((int)ObjectIndexes.MayonnaiseMachine),
                new RequiredItem((int)ObjectIndexes.Coal, 100)
            };

            if (Globals.RNGGetNextBoolean(1))             // 1% chance of a prismatic shard reward
            {
                Reward = new RequiredItem((int)ObjectIndexes.PrismaticShard);
            }

            else
            {
                Reward = Globals.RNGGetRandomValueFromList(potentialRewards);
            }
        }
Exemplo n.º 15
0
        /// <summary>
        /// Populates the bundle with the name, required items, minimum required, and color
        /// </summary>
        protected override void Populate()
        {
            BundleType = Globals.RNGGetAndRemoveRandomValueFromList(RoomBundleTypes);
            List <RequiredItem> potentialItems = new List <RequiredItem>();

            switch (BundleType)
            {
            case BundleTypes.BoilerArtifacts:
                Name           = Globals.GetTranslation("bundle-boiler-artifacts");
                potentialItems = RequiredItem.CreateList(
                    ItemList.GetArtifacts().Where(x => x.DifficultyToObtain < ObtainingDifficulties.RareItem).ToList()
                    );
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = 3;
                Color = BundleColors.Orange;
                break;

            case BundleTypes.BoilerMinerals:
                Name                 = Globals.GetTranslation("bundle-boiler-minerals");
                potentialItems       = RequiredItem.CreateList(ItemList.GetGeodeMinerals());
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Range.GetRandomValue(4, 6);
                Color                = BundleColors.Purple;
                break;

            case BundleTypes.BoilerGeode:
                Name          = Globals.GetTranslation("bundle-boiler-geode");
                RequiredItems = new List <RequiredItem>
                {
                    new RequiredItem((int)ObjectIndexes.Geode, 1, 10),
                    new RequiredItem((int)ObjectIndexes.FrozenGeode, 1, 10),
                    new RequiredItem((int)ObjectIndexes.MagmaGeode, 1, 10),
                    new RequiredItem((int)ObjectIndexes.OmniGeode, 1, 10),
                };
                Color = BundleColors.Red;
                break;

            case BundleTypes.BoilerGemstone:
                Name           = Globals.GetTranslation("bundle-boiler-gemstone");
                potentialItems = RequiredItem.CreateList(new List <int>
                {
                    (int)ObjectIndexes.Quartz,
                    (int)ObjectIndexes.FireQuartz,
                    (int)ObjectIndexes.EarthCrystal,
                    (int)ObjectIndexes.FrozenTear,
                    (int)ObjectIndexes.Aquamarine,
                    (int)ObjectIndexes.Amethyst,
                    (int)ObjectIndexes.Emerald,
                    (int)ObjectIndexes.Ruby,
                    (int)ObjectIndexes.Topaz,
                    (int)ObjectIndexes.Jade,
                    (int)ObjectIndexes.Diamond
                }, 1, 5);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, Range.GetRandomValue(6, 8));
                MinimumRequiredItems = Range.GetRandomValue(RequiredItems.Count - 2, RequiredItems.Count);
                Color = BundleColors.Blue;
                break;

            case BundleTypes.BoilerMetal:
                Name           = Globals.GetTranslation("bundle-boiler-metal");
                potentialItems = new List <RequiredItem>
                {
                    new RequiredItem((int)ObjectIndexes.CopperOre, 5, 10),
                    new RequiredItem((int)ObjectIndexes.IronOre, 5, 10),
                    new RequiredItem((int)ObjectIndexes.GoldOre, 5, 10),
                    new RequiredItem((int)ObjectIndexes.IridiumOre, 5, 10),
                    new RequiredItem((int)ObjectIndexes.CopperBar, 1, 5),
                    new RequiredItem((int)ObjectIndexes.IronBar, 1, 5),
                    new RequiredItem((int)ObjectIndexes.GoldBar, 1, 5),
                    new RequiredItem((int)ObjectIndexes.IridiumBar, 1, 5),
                };
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, Range.GetRandomValue(6, 8));
                MinimumRequiredItems = Range.GetRandomValue(RequiredItems.Count - 2, RequiredItems.Count);
                Color = BundleColors.Red;
                break;

            case BundleTypes.BoilerExplosive:
                Name          = Globals.GetTranslation("bundle-boiler-explosive");
                RequiredItems = new List <RequiredItem>
                {
                    new RequiredItem((int)ObjectIndexes.CherryBomb, 1, 5),
                    new RequiredItem((int)ObjectIndexes.Bomb, 1, 5),
                    new RequiredItem((int)ObjectIndexes.MegaBomb, 1, 5),
                };
                Color = BundleColors.Red;
                break;

            case BundleTypes.BoilerRing:
                Name          = Globals.GetTranslation("bundle-boiler-ring");
                RequiredItems = RequiredItem.CreateList(
                    Globals.RNGGetRandomValuesFromList(ItemList.GetRings(), 8)
                    );
                MinimumRequiredItems = Range.GetRandomValue(4, 6);
                Color = BundleColors.Yellow;
                break;

            case BundleTypes.BoilerSpoopy:
                Name           = Globals.GetTranslation("bundle-boiler-spoopy");
                potentialItems = new List <RequiredItem>
                {
                    new RequiredItem((int)ObjectIndexes.Pumpkin, 6),
                    new RequiredItem((int)ObjectIndexes.JackOLantern, 6),
                    new RequiredItem((int)ObjectIndexes.Ghostfish, 6),
                    new RequiredItem((int)ObjectIndexes.BatWing, 6),
                    new RequiredItem((int)ObjectIndexes.VoidEssence, 6),
                    new RequiredItem((int)ObjectIndexes.VoidEgg, 6),
                    new RequiredItem((int)ObjectIndexes.PurpleMushroom, 6),
                    new RequiredItem((int)ObjectIndexes.GhostCrystal, 6),
                    new RequiredItem((int)ObjectIndexes.SpookFish, 6)
                };
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 6);
                MinimumRequiredItems = 3;
                Color = BundleColors.Purple;
                break;

            case BundleTypes.BoilerMonster:
                Name          = Globals.GetTranslation("bundle-boiler-monster");
                RequiredItems = new List <RequiredItem>()
                {
                    new RequiredItem((int)ObjectIndexes.BugMeat, 10, 50),
                    new RequiredItem((int)ObjectIndexes.Slime, 10, 50),
                    new RequiredItem((int)ObjectIndexes.BatWing, 10, 50),
                    new RequiredItem((int)ObjectIndexes.SolarEssence, 10, 50),
                    new RequiredItem((int)ObjectIndexes.VoidEssence, 10, 50)
                };
                Color = BundleColors.Red;
                break;

            case BundleTypes.BoilerColorBlack:
                Name           = Globals.GetTranslation("bundle-boiler-black");
                potentialItems = RequiredItem.CreateList(new List <int>
                {
                    (int)ObjectIndexes.RareDisc,
                    (int)ObjectIndexes.Catfish,
                    (int)ObjectIndexes.ScorpionCarp,
                    (int)ObjectIndexes.TigerTrout,
                    (int)ObjectIndexes.Halibut,
                    (int)ObjectIndexes.MakiRoll,
                    (int)ObjectIndexes.Bomb,
                    (int)ObjectIndexes.VoidEgg,
                    (int)ObjectIndexes.VoidMayonnaise,
                    (int)ObjectIndexes.Coal,
                    (int)ObjectIndexes.Blackberry,
                    (int)ObjectIndexes.VampireRing,
                    (int)ObjectIndexes.Neptunite,
                    (int)ObjectIndexes.ThunderEgg,
                    (int)ObjectIndexes.BatWing,
                    (int)ObjectIndexes.VoidEssence,
                });
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Range.GetRandomValue(3, 6);
                Color = BundleColors.Purple;
                break;

            case BundleTypes.BoilerColorRed:
                Name           = Globals.GetTranslation("bundle-boiler-red");
                potentialItems = RequiredItem.CreateList(new List <int>
                {
                    (int)ObjectIndexes.Ruby,
                    (int)ObjectIndexes.FireQuartz,
                    (int)ObjectIndexes.DwarfScrollI,
                    (int)ObjectIndexes.RedMullet,
                    (int)ObjectIndexes.RedSnapper,
                    (int)ObjectIndexes.LavaEel,
                    (int)ObjectIndexes.Bullhead,
                    (int)ObjectIndexes.Woodskip,
                    (int)ObjectIndexes.Crimsonfish,
                    (int)ObjectIndexes.PepperPoppers,
                    (int)ObjectIndexes.RhubarbPie,
                    (int)ObjectIndexes.RedPlate,
                    (int)ObjectIndexes.CranberrySauce,
                    (int)ObjectIndexes.Holly,
                    (int)ObjectIndexes.CherryBomb,
                    (int)ObjectIndexes.MegaBomb,
                    (int)ObjectIndexes.Jelly,
                    (int)ObjectIndexes.EnergyTonic,
                    (int)ObjectIndexes.RedMushroom,
                    (int)ObjectIndexes.RedSlimeEgg,
                    (int)ObjectIndexes.ExplosiveAmmo,
                    (int)ObjectIndexes.RubyRing,
                    (int)ObjectIndexes.MagmaGeode,
                    (int)ObjectIndexes.Helvite,
                    (int)ObjectIndexes.Jasper,
                    (int)ObjectIndexes.RadishSalad,
                    (int)ObjectIndexes.FruitSalad,
                    (int)ObjectIndexes.CranberryCandy,
                    (int)ObjectIndexes.Apple,
                    (int)ObjectIndexes.Pomegranate,
                    (int)ObjectIndexes.Cherry,
                    (int)ObjectIndexes.TreasureHunter,
                    (int)ObjectIndexes.CrabPot,
                    (int)ObjectIndexes.LifeElixir
                });
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Range.GetRandomValue(3, 6);
                Color = BundleColors.Red;
                break;

            case BundleTypes.BoilerColorGray:
                Name           = Globals.GetTranslation("bundle-boiler-gray");
                potentialItems = RequiredItem.CreateList(new List <int>
                {
                    (int)ObjectIndexes.Stone,
                    (int)ObjectIndexes.Arrowhead,
                    (int)ObjectIndexes.AncientSword,
                    (int)ObjectIndexes.RustySpoon,
                    (int)ObjectIndexes.PrehistoricTool,
                    (int)ObjectIndexes.Anchor,
                    (int)ObjectIndexes.PrehistoricHandaxe,
                    (int)ObjectIndexes.DwarfGadget,
                    (int)ObjectIndexes.Tilapia,
                    (int)ObjectIndexes.Chub,
                    (int)ObjectIndexes.Lingcod,
                    (int)ObjectIndexes.Crayfish,
                    (int)ObjectIndexes.Cockle,
                    (int)ObjectIndexes.Mussel,
                    (int)ObjectIndexes.Oyster,
                    (int)ObjectIndexes.Trash,
                    (int)ObjectIndexes.SoggyNewspaper,
                    (int)ObjectIndexes.StoneFence,
                    (int)ObjectIndexes.IronFence,
                    (int)ObjectIndexes.StoneFloor,
                    (int)ObjectIndexes.CrystalFloor,
                    (int)ObjectIndexes.TeaSet,
                    (int)ObjectIndexes.GravelPath,
                    (int)ObjectIndexes.MagnetRing,
                    (int)ObjectIndexes.SmallMagnetRing,
                    (int)ObjectIndexes.WarriorRing,
                    (int)ObjectIndexes.SavageRing,
                    (int)ObjectIndexes.Bixite,
                    (int)ObjectIndexes.Granite,
                    (int)ObjectIndexes.Basalt,
                    (int)ObjectIndexes.Limestone,
                    (int)ObjectIndexes.Sprinkler,
                    (int)ObjectIndexes.BarbedHook,
                    (int)ObjectIndexes.TrapBobber,
                    (int)ObjectIndexes.OmniGeode,
                });
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Range.GetRandomValue(3, 6);
                Color = BundleColors.Blue;
                break;
            }
        }