Example #1
0
        /// <summary>
        /// Creates a bundle for the Joja mart
        /// </summary>
        protected override void Populate()
        {
            BundleType = Globals.RNGGetAndRemoveRandomValueFromList(RoomBundleTypes);
            List <RequiredItem> potentialItems = new List <RequiredItem>();

            switch (BundleType)
            {
            case BundleTypes.JojaMissing:
                Name = Globals.GetTranslation("bundle-joja-missing");

                RequiredItems = new List <RequiredItem>
                {
                    new RequiredItem(ItemList.GetRandomItemAtDifficulty(ObtainingDifficulties.EndgameItem)),
                    new RequiredItem(ItemList.GetRandomItemAtDifficulty(ObtainingDifficulties.RareItem)),
                    new RequiredItem(ItemList.GetRandomItemAtDifficulty(ObtainingDifficulties.LargeTimeRequirements)),
                    new RequiredItem(ItemList.GetRandomItemAtDifficulty(ObtainingDifficulties.MediumTimeRequirements)),
                    new RequiredItem(
                        Globals.RNGGetRandomValueFromList(ItemList.GetItemsBelowDifficulty(ObtainingDifficulties.Impossible, new List <int> {
                        (int)ObjectIndexes.AnyFish
                    }))
                        )
                };
                MinimumRequiredItems = 5;
                Color = BundleColors.Blue;
                break;
            }
        }
        /// <summary>
        /// Gets a random Stardew Valley date - excludes the holidays and birthdays already in use
        /// </summary>
        /// <param name="birthdaysInUse">The birthdays in use - this function adds the date to it</param>
        /// <returns>The date added</returns>
        private static SDate AddRandomBirthdayToNPC(Dictionary <SDate, string> birthdaysInUse, string npcName)
        {
            if (npcName == "Wizard")
            {
                return(GetWizardBirthday(birthdaysInUse));
            }

            List <string> seasonStrings = new List <string> {
                "spring", "summer", "fall", "winter"
            };
            string season        = Globals.RNGGetRandomValueFromList(seasonStrings);
            bool   dateRetrieved = false;
            SDate  date          = null;

            do
            {
                date = new SDate(Range.GetRandomValue(1, 28), season, 1);
                if (!birthdaysInUse.ContainsKey(date))
                {
                    birthdaysInUse.Add(date, npcName);
                    dateRetrieved = true;
                }
            } while (!dateRetrieved);

            return(date);
        }
        /// <summary>
        /// Generates the reward for completing a crafting room bundle
        /// </summary>
        /// <returns />
        protected override void GenerateReward()
        {
            var potentialRewards = new List <RequiredItem>
            {
                new RequiredItem(Globals.RNGGetRandomValueFromList(ItemList.GetResources()), 999),
                new RequiredItem((int)ObjectIndexes.Sprinkler, 2, 5),
                new RequiredItem((int)ObjectIndexes.QualitySprinkler, 1, 4),
                new RequiredItem((int)ObjectIndexes.IridiumSprinkler, 1, 3),
                new RequiredItem((int)ObjectIndexes.BasicFertilizer, 100),
                new RequiredItem((int)ObjectIndexes.QualityFertilizer, 100),
                new RequiredItem((int)ObjectIndexes.BasicRetainingSoil, 100),
                new RequiredItem((int)ObjectIndexes.QualityRetainingSoil, 100),
                new RequiredItem((int)ObjectIndexes.OakResin, 25, 50),
                new RequiredItem((int)ObjectIndexes.MapleSyrup, 25, 50),
                new RequiredItem((int)ObjectIndexes.PineTar, 25, 50),
                new RequiredItem((int)ObjectIndexes.Acorn, 25, 50),
                new RequiredItem((int)ObjectIndexes.MapleSeed, 25, 50),
                new RequiredItem((int)ObjectIndexes.PineCone, 25, 50),
                new RequiredItem((int)ObjectIndexes.SpringSeeds, 25, 50),
                new RequiredItem((int)ObjectIndexes.SummerSeeds, 25, 50),
                new RequiredItem((int)ObjectIndexes.FallSeeds, 25, 50),
                new RequiredItem((int)ObjectIndexes.WinterSeeds, 25, 50),
                new RequiredItem(Globals.RNGGetRandomValueFromList(ItemList.GetForagables()), 10, 20),
                new RequiredItem((int)ObjectIndexes.SeedMaker)
            };

            Reward = Globals.RNGGetRandomValueFromList(potentialRewards);
        }
        /// <summary>
        /// Generates the reward for the bundle
        /// </summary>
        protected override void GenerateReward()
        {
            if (Globals.RNGGetNextBoolean(1))
            {
                Reward = new RequiredItem((int)ObjectIndexes.PrismaticShard);
            }

            else if (Globals.RNGGetNextBoolean(5))
            {
                List <Item> universalLoves = NPC.UniversalLoves.Where(x =>
                                                                      x.Id != (int)ObjectIndexes.PrismaticShard).ToList();

                Reward = Globals.RNGGetRandomValueFromList(RequiredItem.CreateList(universalLoves, 5, 10));
            }

            List <RequiredItem> potentialRewards = new List <RequiredItem>
            {
                new RequiredItem((int)ObjectIndexes.JunimoKartArcadeSystem),
                new RequiredItem((int)ObjectIndexes.PrairieKingArcadeSystem),
                new RequiredItem((int)ObjectIndexes.SodaMachine),
                new RequiredItem((int)ObjectIndexes.Beer, 43),
                new RequiredItem((int)ObjectIndexes.Salad, Range.GetRandomValue(5, 25)),
                new RequiredItem((int)ObjectIndexes.Bread, Range.GetRandomValue(5, 25)),
                new RequiredItem((int)ObjectIndexes.Spaghetti, Range.GetRandomValue(5, 25)),
                new RequiredItem((int)ObjectIndexes.Pizza, Range.GetRandomValue(5, 25)),
                new RequiredItem((int)ObjectIndexes.Coffee, Range.GetRandomValue(5, 25))
            };

            Reward = Globals.RNGGetRandomValueFromList(potentialRewards);
        }
Example #5
0
        /// <summary>
        /// This is the method to repalce the existing Crop.getRandomWildCropForSeason
        /// This will make the seed grow a crop of an actual appropriate type
        /// </summary>
        /// <param name="season">The season string: "spring", "summer", "fall", or "winter"</param>
        /// <returns>The ID of the random wild crop</returns>
        public int GetRandomWildCropForSeason(string season)
        {
            List <int> wildCropIDs;

            switch (season)
            {
            case "spring":
                wildCropIDs = ItemList.GetForagables(Seasons.Spring)
                              .Where(x => x.ShouldBeForagable).Select(x => x.Id).ToList();
                break;

            case "summer":
                wildCropIDs = ItemList.GetForagables(Seasons.Summer)
                              .Where(x => x.ShouldBeForagable).Select(x => x.Id).ToList();
                break;

            case "fall":
                wildCropIDs = ItemList.GetForagables(Seasons.Fall)
                              .Where(x => x.ShouldBeForagable).Select(x => x.Id).ToList();
                break;

            case "winter":
                wildCropIDs = ItemList.GetForagables(Seasons.Winter)
                              .Where(x => x.ShouldBeForagable).Select(x => x.Id).ToList();
                break;

            default:
                Globals.ConsoleWarn($"GetRandomWildCropForSeason was passed an unexpected season value: {season}. Returning the ID for horseradish.");
                return((int)ObjectIndexes.WildHorseradish);
            }

            return(Globals.RNGGetRandomValueFromList(wildCropIDs, true));
        }
 public ReplacementObject()
 {
     Person      = Globals.RNGGetRandomValueFromList(People);
     OtherPerson = Globals.RNGGetRandomValueFromList(People.Where(x => x != Person).ToList());
     Crop        = Globals.RNGGetRandomValueFromList(Crops);
     Dish        = Globals.RNGGetRandomValueFromList(Dishes);
     Fish        = Globals.RNGGetRandomValueFromList(FishList);
     Item        = Globals.RNGGetRandomValueFromList(Items);
     Number      = Globals.RNG.Next(2, 10);
     Reward      = Globals.RNG.Next(300, 3000);
 }
Example #7
0
        /// <summary>
        /// Generates a random reward out of all of the items
        /// </summary>
        protected void GenerateRandomReward()
        {
            Item reward = Globals.RNGGetRandomValueFromList(ItemList.Items.Values.Where(x =>
                                                                                        x.Id != (int)ObjectIndexes.TransmuteAu && x.Id != (int)ObjectIndexes.TransmuteFe).ToList());
            int numberToGive = Range.GetRandomValue(1, 25);

            if (!reward.CanStack)
            {
                numberToGive = 1;
            }

            Reward = new RequiredItem(reward.Id, numberToGive);
        }
Example #8
0
        /// <summary>
        /// Gets the string for the Foragable type
        /// This will be 4 of any of the foragables of the appropriate season
        /// </summary>
        /// <returns />
        private string GetStringForForagables()
        {
            Seasons season = Seasons.Spring;

            switch (Id)
            {
            case (int)ObjectIndexes.SpringSeeds:
                season = Seasons.Spring;
                break;

            case (int)ObjectIndexes.SummerSeeds:
                season = Seasons.Summer;
                break;

            case (int)ObjectIndexes.FallSeeds:
                season = Seasons.Fall;
                break;

            case (int)ObjectIndexes.WinterSeeds:
                season = Seasons.Winter;
                break;

            default:
                Globals.ConsoleError("Generated string for Foragable type for a non-wild seed! Using 1 wood instead...");
                return($"{(int)ObjectIndexes.Wood} 1");
            }

            Dictionary <int, int> foragablesToUse = new Dictionary <int, int>();

            for (int i = 0; i < 4; i++)
            {
                int foragableId = Globals.RNGGetRandomValueFromList(ItemList.GetForagables(season)).Id;
                if (foragablesToUse.ContainsKey(foragableId))
                {
                    foragablesToUse[foragableId]++;
                }
                else
                {
                    foragablesToUse.Add(foragableId, 1);
                }
            }

            string craftingString = "";

            foreach (int id in foragablesToUse.Keys)
            {
                craftingString += $"{id} {foragablesToUse[id]} ";
            }

            return(craftingString.Trim());
        }
Example #9
0
        /// <summary>
        /// Populates the bundle with the name, required items, minimum required, and color
        /// </summary>
        protected override void Populate()
        {
            int moneyAmount = 0;

            BundleType = Globals.RNGGetAndRemoveRandomValueFromList(RoomBundleTypes);
            int bundleNameFlavorID = 1;

            switch (BundleType)
            {
            case BundleTypes.Vault2500:
                bundleNameFlavorID = Range.GetRandomValue(1, 7);
                moneyAmount        = Range.GetRandomValue(500, 3500);
                break;

            case BundleTypes.Vault5000:
                bundleNameFlavorID = Range.GetRandomValue(1, 6);
                moneyAmount        = Range.GetRandomValue(4000, 7000);
                break;

            case BundleTypes.Vault10000:
                bundleNameFlavorID = Range.GetRandomValue(1, 6);
                moneyAmount        = Range.GetRandomValue(7500, 12500);
                break;

            case BundleTypes.Vault25000:
                bundleNameFlavorID = Range.GetRandomValue(1, 7);
                moneyAmount        = Range.GetRandomValue(20000, 30000);
                break;

            default:
                return;
            }

            RequiredItems = new List <RequiredItem> {
                new RequiredItem()
                {
                    MoneyAmount = moneyAmount
                }
            };

            string moneyString      = moneyAmount.ToString("N0", new CultureInfo(Globals.ModRef.Helper.Translation.Locale));
            string bundleNameFlavor = Globals.GetTranslation($"{BundleType.ToString()}-{bundleNameFlavorID}");

            Name            = $"{Globals.GetTranslation("vault-money-format", new { moneyString })}: {bundleNameFlavor}";
            ImageNameSuffix = $"-{bundleNameFlavorID}";

            Color = Globals.RNGGetRandomValueFromList(
                Enum.GetValues(typeof(BundleColors)).Cast <BundleColors>().ToList());
        }
Example #10
0
        /// <summary>
        /// Replaces the rain - intended to be called once per day start
        /// <param name="sender">The event sender.</param>
        /// <param name="e">The event arguments.</param>
        /// </summary>
        public void ReplaceRain(object sender = null, DayEndingEventArgs e = null)
        {
            if (!Globals.Config.RandomizeRain)
            {
                return;
            }
            if (Globals.RNG == null)
            {
                return;
            }

            RainTypes rainType = Globals.RNGGetRandomValueFromList(
                Enum.GetValues(typeof(RainTypes)).Cast <RainTypes>().ToList());

            AddReplacement("TileSheets/rain", $"Assets/TileSheets/{rainType.ToString()}Rain");
            _mod.Helper.Content.InvalidateCache("TileSheets/rain");
        }
        /// <summary>
        /// Generates the reward for completing a crafting room bundle
        /// </summary>
        protected override void GenerateReward()
        {
            var potentialRewards = new List <RequiredItem>
            {
                new RequiredItem(Globals.RNGGetRandomValueFromList(ItemList.GetResources()), 999),
                new RequiredItem((int)ObjectIndexes.Loom),
                new RequiredItem((int)ObjectIndexes.MayonnaiseMachine),
                new RequiredItem((int)ObjectIndexes.Heater),
                new RequiredItem((int)ObjectIndexes.AutoGrabber),
                new RequiredItem((int)ObjectIndexes.SeedMaker),
                new RequiredItem(Globals.RNGGetRandomValueFromList(ItemList.GetCrops(true)), 25, 50),
                new RequiredItem(Globals.RNGGetRandomValueFromList(ItemList.GetCookeditems())),
                new RequiredItem(Globals.RNGGetRandomValueFromList(ItemList.GetSeeds()), 50, 100),
                new RequiredItem(Globals.RNGGetRandomValueFromList(ItemList.GetAnimalProducts()), 25, 50),
            };

            Reward = Globals.RNGGetRandomValueFromList(potentialRewards);
        }
        /// <summary>
        /// Creates a bundle with random items
        /// </summary>
        protected void PopulateRandomBundle()
        {
            BundleType = Globals.RNGGetRandomValueFromList(_randomBundleTypes);
            List <RequiredItem> potentialItems = new List <RequiredItem>();

            switch (BundleType)
            {
            case BundleTypes.AllRandom:
                Name           = Globals.GetTranslation("bundle-random-all");
                potentialItems = RequiredItem.CreateList(ItemList.Items.Values.Where(x =>
                                                                                     x.DifficultyToObtain <ObtainingDifficulties.Impossible &&
                                                                                                           x.Id> -4)
                                                         .ToList());
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = 4;
                break;

            case BundleTypes.AllLetter:
                string letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
                string randomLetter;
                do
                {
                    randomLetter = letters[Range.GetRandomValue(0, letters.Length - 1)].ToString();
                    letters.Replace(randomLetter, "");
                    potentialItems = RequiredItem.CreateList(
                        ItemList.Items.Values.Where(x =>
                                                    (
                                                        (x.OverrideDisplayName == null && x.Name.StartsWith(randomLetter, StringComparison.InvariantCultureIgnoreCase)) ||
                                                        (x.OverrideDisplayName != null && x.OverrideDisplayName.StartsWith(randomLetter, StringComparison.InvariantCultureIgnoreCase))
                                                    ) &&
                                                    x.Id > -4
                                                    ).ToList()
                        );
                } while (potentialItems.Count < 4);
                Name                 = Globals.GetTranslation("bundle-random-letter", new { letter = randomLetter });
                ImageNameSuffix      = randomLetter;
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = 3;
                break;
            }

            Color = Globals.RNGGetRandomValueFromList(
                Enum.GetValues(typeof(BundleColors)).Cast <BundleColors>().ToList());
        }
        /// <summary>
        /// Gets the required items for a cabin - applies to any cabin
        /// </summary>
        /// <returns />
        private static List <ItemAndMultiplier> GetRequiredItemsForCabin()
        {
            Item resource = ItemList.GetRandomResourceItem();
            Item easyItem = Globals.RNGGetRandomValueFromList(
                ItemList.GetItemsBelowDifficulty(ObtainingDifficulties.MediumTimeRequirements, new List <int> {
                resource.Id
            })
                );

            return(Globals.RNGGetRandomValueFromList(new List <List <ItemAndMultiplier> > {
                new List <ItemAndMultiplier> {
                    new ItemAndMultiplier(resource, 2)
                },
                new List <ItemAndMultiplier>
                {
                    new ItemAndMultiplier(resource),
                    new ItemAndMultiplier(easyItem)
                }
            }));
        }
Example #14
0
        /// <summary>
        /// Generates the reward for the bundle
        /// </summary>
        protected override void GenerateReward()
        {
            List <RequiredItem> potentialRewards = new List <RequiredItem>
            {
                new RequiredItem((int)ObjectIndexes.GoldBar, Range.GetRandomValue(5, 25)),
                new RequiredItem((int)ObjectIndexes.IridiumBar, Range.GetRandomValue(1, 5)),
                new RequiredItem((int)ObjectIndexes.SolidGoldLewis),
                new RequiredItem((int)ObjectIndexes.HMTGF),
                new RequiredItem((int)ObjectIndexes.PinkyLemon),
                new RequiredItem((int)ObjectIndexes.Foroguemon),
                new RequiredItem((int)ObjectIndexes.GoldenPumpkin),
                new RequiredItem((int)ObjectIndexes.GoldenMask),
                new RequiredItem((int)ObjectIndexes.GoldenRelic),
                new RequiredItem((int)ObjectIndexes.GoldBrazier),
                new RequiredItem((int)ObjectIndexes.TreasureChest),
                new RequiredItem((int)ObjectIndexes.Lobster, Range.GetRandomValue(5, 25)),
                new RequiredItem((int)ObjectIndexes.LobsterBisque, Range.GetRandomValue(5, 25))
            };

            Reward = Globals.RNGGetRandomValueFromList(potentialRewards);
        }
Example #15
0
        /// <summary>
        /// Fixes the foragables on day 1 - the save file is created too quickly for it to be
        /// randomized right away, so we'll change them on the spot on the first day
        /// </summary>
        public void ChangeDayOneForagables()
        {
            // Replace all the foragables on day 1
            SDate currentDate = SDate.Now();

            if (currentDate.DaysSinceStart < 2)
            {
                List <GameLocation> locations = Game1.locations
                                                .Concat(
                    from location in Game1.locations.OfType <BuildableGameLocation>()
                    from building in location.buildings
                    where building.indoors.Value != null
                    select building.indoors.Value
                    ).ToList();

                List <Item> newForagables =
                    ItemList.GetForagables(Seasons.Spring)
                    .Where(x => x.ShouldBeForagable)                     // Removes the 1/1000 items
                    .Cast <Item>().ToList();

                foreach (GameLocation location in locations)
                {
                    List <int>     foragableIds = ItemList.GetForagables().Select(x => x.Id).ToList();
                    List <Vector2> tiles        = location.Objects.Pairs
                                                  .Where(x => foragableIds.Contains(x.Value.ParentSheetIndex))
                                                  .Select(x => x.Key)
                                                  .ToList();

                    foreach (Vector2 oldForagableKey in tiles)
                    {
                        Item newForagable = Globals.RNGGetRandomValueFromList(newForagables);
                        location.Objects[oldForagableKey].ParentSheetIndex = newForagable.Id;
                        location.Objects[oldForagableKey].Name             = newForagable.Name;
                    }
                }
            }
        }
Example #16
0
        /// <summary>
        /// Generates the reward for the bundle
        /// </summary>
        protected override void GenerateReward()
        {
            var tackles = new List <RequiredItem>
            {
                new RequiredItem((int)ObjectIndexes.Spinner, 1),
                new RequiredItem((int)ObjectIndexes.DressedSpinner),
                new RequiredItem((int)ObjectIndexes.TrapBobber),
                new RequiredItem((int)ObjectIndexes.CorkBobber),
                new RequiredItem((int)ObjectIndexes.LeadBobber),
                new RequiredItem((int)ObjectIndexes.TreasureHunter)
            };

            var potentialRewards = new List <RequiredItem>
            {
                new RequiredItem((int)ObjectIndexes.RecyclingMachine),
                new RequiredItem((int)ObjectIndexes.Bait, 500),
                new RequiredItem((int)ObjectIndexes.WildBait, 500),
                Globals.RNGGetRandomValueFromList(tackles),
                Globals.RNGGetRandomValueFromList(RequiredItem.CreateList(FishItem.Get(), 25, 50)),
                Globals.RNGGetRandomValueFromList(RequiredItem.CreateList(ItemList.GetUniqueBeachForagables(), 25, 50)),
            };

            Reward = Globals.RNGGetRandomValueFromList(potentialRewards);
        }
Example #17
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);
            }
        }
Example #18
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.Fish.Randomize)
                {
                    continue;
                }

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

                if (fish.IsMinesFish)
                {
                    if (!fish.AvailableLocations.Contains(Locations.UndergroundMine))
                    {
                        fish.AvailableLocations.Add(Locations.UndergroundMine);
                    }
                }

                if (Globals.Config.Fish.Randomize)
                {
                    if (fish.IsSubmarineOnlyFish)
                    {
                        fish.DifficultyToObtain = ObtainingDifficulties.RareItem;
                    }
                    else
                    {
                        fish.DifficultyToObtain = ObtainingDifficulties.LargeTimeRequirements;
                    }
                }

                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.Fish.Randomize)
                {
                    continue;
                }

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

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

            WriteToSpoilerLog();
        }
Example #19
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.FishTankSpringFish:
                GenerateSeasonBundle(Seasons.Spring, BundleColors.Green);
                break;

            case BundleTypes.FishTankSummerFish:
                GenerateSeasonBundle(Seasons.Summer, BundleColors.Red);
                break;

            case BundleTypes.FishTankFallFish:
                GenerateSeasonBundle(Seasons.Fall, BundleColors.Orange);
                break;

            case BundleTypes.FishTankWinterFish:
                GenerateSeasonBundle(Seasons.Winter, BundleColors.Cyan);
                break;

            case BundleTypes.FishTankOceanFood:
                Name           = Globals.GetTranslation("bundle-fishtank-ocean-food");
                potentialItems = RequiredItem.CreateList(new List <int>
                {
                    (int)ObjectIndexes.CrispyBass,
                    (int)ObjectIndexes.FriedEel,
                    (int)ObjectIndexes.AlgaeSoup,
                    (int)ObjectIndexes.CrabCakes,
                    (int)ObjectIndexes.SpicyEel,
                    (int)ObjectIndexes.PaleBroth,
                    (int)ObjectIndexes.Sashimi,
                    (int)ObjectIndexes.MakiRoll,
                    (int)ObjectIndexes.TomKhaSoup,
                    (int)ObjectIndexes.BakedFish,
                    (int)ObjectIndexes.TroutSoup,
                    (int)ObjectIndexes.Chowder,
                    (int)ObjectIndexes.LobsterBisque,
                    (int)ObjectIndexes.DishOTheSea,
                    (int)ObjectIndexes.FishStew,
                    (int)ObjectIndexes.FriedCalamari,
                    (int)ObjectIndexes.SalmonDinner,
                    (int)ObjectIndexes.FishTaco
                });
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = 4;
                Color = BundleColors.Yellow;
                break;

            case BundleTypes.FishTankLegendary:
                Name                 = Globals.GetTranslation("bundle-fishtank-legendary");
                RequiredItems        = RequiredItem.CreateList(FishItem.GetLegendaries().Cast <Item>().ToList());
                MinimumRequiredItems = Range.GetRandomValue(3, 4);
                Color                = BundleColors.Red;
                break;

            case BundleTypes.FishTankLocation:
                List <Locations> locations = new List <Locations>
                {
                    Locations.Town,
                    Locations.Mountain,
                    Locations.Desert,
                    Locations.Woods,
                    Locations.Forest,
                    Locations.NightMarket,
                    Locations.Beach
                };
                Locations location       = Globals.RNGGetRandomValueFromList(locations);
                string    locationString = Globals.GetTranslation($"fish-{location.ToString().ToLower()}-location");

                Name                 = Globals.GetTranslation("bundle-fishtank-location", new { location = locationString });
                RequiredItems        = RequiredItem.CreateList(Globals.RNGGetRandomValuesFromList(FishItem.Get(location), 8));
                MinimumRequiredItems = Math.Min(RequiredItems.Count, Range.GetRandomValue(2, 4));
                Color                = BundleColors.Blue;
                break;

            case BundleTypes.FishTankRainFish:
                Name          = Globals.GetTranslation("bundle-fishtank-rain-fish");
                RequiredItems = RequiredItem.CreateList(
                    Globals.RNGGetRandomValuesFromList(FishItem.Get(Weather.Rainy), 8)
                    );
                MinimumRequiredItems = Math.Min(RequiredItems.Count, 4);
                Color = BundleColors.Blue;
                break;

            case BundleTypes.FishTankNightFish:
                Name          = Globals.GetTranslation("bundle-fishtank-night-fish");
                RequiredItems = RequiredItem.CreateList(
                    Globals.RNGGetRandomValuesFromList(FishItem.GetNightFish(), 8)
                    );
                MinimumRequiredItems = Math.Min(RequiredItems.Count, 4);
                Color = BundleColors.Purple;
                break;

            case BundleTypes.FishTankQualityFish:
                Name           = Globals.GetTranslation("bundle-fishtank-quality-fish");
                potentialItems = RequiredItem.CreateList(
                    Globals.RNGGetRandomValuesFromList(FishItem.Get(), 8)
                    );
                potentialItems.ForEach(x => x.MinimumQuality = ItemQualities.Gold);
                RequiredItems        = potentialItems;
                MinimumRequiredItems = 4;
                Color = BundleColors.Yellow;
                break;

            case BundleTypes.FishTankBeachForagables:
                Name          = Globals.GetTranslation("bundle-fishtank-beach-foragables");
                RequiredItems = RequiredItem.CreateList(
                    Globals.RNGGetRandomValuesFromList(ItemList.GetUniqueBeachForagables(), 6)
                    );
                Color = BundleColors.Yellow;
                break;

            case BundleTypes.FishTankFishingTools:
                Name           = Globals.GetTranslation("bundle-fishtank-fishing-tools");
                potentialItems = new List <RequiredItem>
                {
                    new RequiredItem((int)ObjectIndexes.Spinner, 1),
                    new RequiredItem((int)ObjectIndexes.DressedSpinner, 1),
                    new RequiredItem((int)ObjectIndexes.TrapBobber, 1),
                    new RequiredItem((int)ObjectIndexes.CorkBobber, 1),
                    new RequiredItem((int)ObjectIndexes.LeadBobber, 1),
                    new RequiredItem((int)ObjectIndexes.TreasureHunter, 1),
                    new RequiredItem((int)ObjectIndexes.Bait, 25, 50),
                    new RequiredItem((int)ObjectIndexes.WildBait, 10, 20)
                };
                RequiredItems = Globals.RNGGetRandomValuesFromList(potentialItems, 4);
                Color         = BundleColors.Blue;
                break;

            case BundleTypes.FishTankUnique:
                Name = Globals.GetTranslation("bundle-fishtank-unique");

                List <Item> nightFish  = FishItem.Get(Locations.NightMarket);
                List <Item> minesFish  = FishItem.Get(Locations.UndergroundMine);
                List <Item> desertFish = FishItem.Get(Locations.Desert);
                List <Item> woodsFish  = FishItem.Get(Locations.Woods);

                RequiredItems = new List <RequiredItem>
                {
                    new RequiredItem(Globals.RNGGetRandomValueFromList(nightFish)),
                    new RequiredItem(Globals.RNGGetRandomValueFromList(minesFish)),
                    new RequiredItem(Globals.RNGGetRandomValueFromList(desertFish)),
                    new RequiredItem(Globals.RNGGetRandomValueFromList(woodsFish))
                };
                MinimumRequiredItems = Range.GetRandomValue(RequiredItems.Count - 1, RequiredItems.Count);
                Color = BundleColors.Cyan;
                break;

            case BundleTypes.FishTankColorBlue:
                Name = Globals.GetTranslation("bundle-fishtank-blue");

                potentialItems = RequiredItem.CreateList(new List <int>
                {
                    (int)ObjectIndexes.Aquamarine,
                    (int)ObjectIndexes.Diamond,
                    (int)ObjectIndexes.FrozenTear,
                    (int)ObjectIndexes.DwarfScrollIII,
                    (int)ObjectIndexes.ElvishJewelry,
                    (int)ObjectIndexes.GlassShards,
                    (int)ObjectIndexes.Anchovy,
                    (int)ObjectIndexes.Tuna,
                    (int)ObjectIndexes.Sardine,
                    (int)ObjectIndexes.Bream,
                    (int)ObjectIndexes.Salmon,
                    (int)ObjectIndexes.Herring,
                    (int)ObjectIndexes.Squid,
                    (int)ObjectIndexes.IcePip,
                    (int)ObjectIndexes.Sturgeon,
                    (int)ObjectIndexes.Albacore,
                    (int)ObjectIndexes.MidnightSquid,
                    (int)ObjectIndexes.SpookFish,
                    (int)ObjectIndexes.Glacierfish,
                    (int)ObjectIndexes.Clam,
                    (int)ObjectIndexes.Periwinkle,
                    (int)ObjectIndexes.JojaCola,
                    (int)ObjectIndexes.BrokenGlasses,
                    (int)ObjectIndexes.BrokenCD,
                    (int)ObjectIndexes.BlueberryTart,
                    (int)ObjectIndexes.Sugar,
                    (int)ObjectIndexes.BasicRetainingSoil,
                    (int)ObjectIndexes.QualityRetainingSoil,
                    (int)ObjectIndexes.RainbowShell,
                    (int)ObjectIndexes.BlueSlimeEgg,
                    (int)ObjectIndexes.CrystalFruit,
                    (int)ObjectIndexes.SturdyRing,
                    (int)ObjectIndexes.AquamarineRing,
                    (int)ObjectIndexes.FrozenGeode,
                    (int)ObjectIndexes.Opal,
                    (int)ObjectIndexes.Aerinite,
                    (int)ObjectIndexes.Kyanite,
                    (int)ObjectIndexes.GhostCrystal,
                    (int)ObjectIndexes.Celestine,
                    (int)ObjectIndexes.Soapstone,
                    (int)ObjectIndexes.Slate,
                    (int)ObjectIndexes.Spinner,
                    (int)ObjectIndexes.WarpTotemBeach,
                    (int)ObjectIndexes.Battery
                });
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Range.GetRandomValue(3, 6);
                Color = BundleColors.Blue;
                break;

            case BundleTypes.FishTankColorPurple:
                Name           = Globals.GetTranslation("bundle-fishtank-purple");
                potentialItems = RequiredItem.CreateList(new List <int>
                {
                    (int)ObjectIndexes.Amethyst,
                    (int)ObjectIndexes.AncientDrum,
                    (int)ObjectIndexes.SuperCucumber,
                    (int)ObjectIndexes.PumpkinSoup,
                    (int)ObjectIndexes.RootsPlatter,
                    (int)ObjectIndexes.IridiumBar,
                    (int)ObjectIndexes.Wine,
                    (int)ObjectIndexes.IridiumOre,
                    (int)ObjectIndexes.SeaUrchin,
                    (int)ObjectIndexes.SweetPea,
                    (int)ObjectIndexes.WildPlum,
                    (int)ObjectIndexes.Blackberry,
                    (int)ObjectIndexes.Crocus,
                    (int)ObjectIndexes.Vinegar,
                    (int)ObjectIndexes.PurpleMushroom,
                    (int)ObjectIndexes.SpeedGro,
                    (int)ObjectIndexes.DeluxeSpeedGro,
                    (int)ObjectIndexes.IridiumBand,
                    (int)ObjectIndexes.AmethystRing,
                    (int)ObjectIndexes.FireOpal,
                    (int)ObjectIndexes.Fluorapatite,
                    (int)ObjectIndexes.Obsidian,
                    (int)ObjectIndexes.FairyStone,
                    (int)ObjectIndexes.BlackberryCobbler,
                    (int)ObjectIndexes.IridiumSprinkler,
                    (int)ObjectIndexes.DressedSpinner
                });
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Range.GetRandomValue(3, 6);
                Color = BundleColors.Purple;
                break;
            }
        }
Example #20
0
        /// <summary>
        /// Populate the location data's season arrays
        /// </summary>
        /// <param name="foragableLocationData">The location data</param>
        /// <param name="season">The season</param>
        private static void PopulateLocationBySeason(LocationData foragableLocationData, Seasons season)
        {
            List <ForagableData> foragableDataList = null;
            List <Item>          foragableItemList = null;

            switch (season)
            {
            case Seasons.Spring:
                foragableDataList = foragableLocationData.SpringForagables;
                foragableItemList = SpringForagables;
                break;

            case Seasons.Summer:
                foragableDataList = foragableLocationData.SummerForagables;
                foragableItemList = SummerForagables;
                break;

            case Seasons.Fall:
                foragableDataList = foragableLocationData.FallForagables;
                foragableItemList = FallForagables;
                break;

            case Seasons.Winter:
                foragableDataList = foragableLocationData.WinterForagables;
                foragableItemList = WinterForagables;
                break;
            }

            if (foragableDataList == null || foragableItemList == null)
            {
                Globals.ConsoleError($"Could not get foragable list for season: {season}");
            }

            if (foragableLocationData.Location == Locations.Desert)
            {
                foragableItemList = DesertForagables;
            }

            // Give the beach a random item from the season, then only assign the beach items after that
            if (foragableLocationData.Location == Locations.Beach)
            {
                Item randomSeasonItem = foragableItemList[Globals.RNG.Next(0, foragableItemList.Count)];
                foragableDataList.Add(new ForagableData(randomSeasonItem.Id));
                foragableItemList = BeachForagables;
            }

            // Give the woods a random item from ANY season, then only assign the woods items after that
            if (foragableLocationData.LocationName == "Woods")
            {
                AddUniqueNewForagable(WoodsForagables);
                foragableItemList = WoodsForagables;
            }

            foreach (Item item in foragableItemList)
            {
                foragableDataList.Add(new ForagableData(item.Id));
            }

            // Remove the item that was added to the woods
            if (foragableLocationData.LocationName == "Woods" && WoodsForagables.Count > 1)
            {
                WoodsForagables.RemoveAt(WoodsForagables.Count - 1);
            }

            // Add a random item that's really rare to see
            Item randomItem = Globals.RNGGetRandomValueFromList(
                ItemList.Items.Values.Where(x =>
                                            x.DifficultyToObtain >= ObtainingDifficulties.MediumTimeRequirements &&
                                            x.DifficultyToObtain < ObtainingDifficulties.Impossible).ToList()
                );

            foragableDataList.Add(new ForagableData(randomItem.Id)
            {
                ItemRarity = 0.001
            });
        }
        /// <summary>
        /// Randomize the blueprints
        /// </summary>
        /// <returns>The dictionary to use to replace the assets</returns>
        public static Dictionary <string, string> Randomize()
        {
            Dictionary <string, string> blueprintChanges = new Dictionary <string, string>();

            List <Buildings> buildings       = Enum.GetValues(typeof(Buildings)).Cast <Buildings>().ToList();
            Building         currentBuilding = null;
            List <Building>  buildingsToAdd  = new List <Building>();

            List <int> idsToDisallowForAnimalBuildings = ItemList.GetAnimalProducts().Select(x => x.Id).ToList();

            idsToDisallowForAnimalBuildings.AddRange(new List <int>
            {
                (int)ObjectIndexes.GreenSlimeEgg,
                (int)ObjectIndexes.BlueSlimeEgg,
                (int)ObjectIndexes.RedSlimeEgg,
                (int)ObjectIndexes.PurpleSlimeEgg
            });

            Item resource1, resource2;
            ItemAndMultiplier        itemChoice;
            List <ItemAndMultiplier> listChoice;

            foreach (Buildings buildingType in buildings)
            {
                resource1 = ItemList.GetRandomResourceItem();
                resource2 = ItemList.GetRandomResourceItem(new int[] { resource1.Id });

                switch (buildingType)
                {
                case Buildings.Silo:
                    currentBuilding = new Building(
                        "Silo",
                        new List <ItemAndMultiplier>
                    {
                        new ItemAndMultiplier(resource1, Range.GetRandomValue(2, 3)),
                        new ItemAndMultiplier(resource2),
                        new ItemAndMultiplier(ItemList.GetRandomItemAtDifficulty(ObtainingDifficulties.MediumTimeRequirements))
                    },
                        100,
                        $"3/3/-1/-1/-2/-1/null/{Globals.GetTranslation("Silo-name-and-description")}/Buildings/none/48/128/-1/null/Farm"
                        );
                    break;

                case Buildings.Mill:
                    currentBuilding = new Building(
                        "Mill",
                        new List <ItemAndMultiplier>
                    {
                        new ItemAndMultiplier(resource1, 3),
                        new ItemAndMultiplier(resource2, 2),
                        new ItemAndMultiplier(ItemList.GetRandomItemAtDifficulty(ObtainingDifficulties.MediumTimeRequirements))
                    },
                        2500,
                        $"4/2/-1/-1/-2/-1/null/{Globals.GetTranslation("Mill-name-and-description")}/Buildings/none/64/128/-1/null/Farm"
                        );
                    break;

                case Buildings.ShippingBin:
                    itemChoice = Globals.RNGGetRandomValueFromList(new List <ItemAndMultiplier>
                    {
                        new ItemAndMultiplier(resource1, 3),
                        new ItemAndMultiplier(ItemList.GetRandomItemAtDifficulty(ObtainingDifficulties.MediumTimeRequirements))
                    });

                    currentBuilding = new Building(
                        "Shipping Bin",
                        new List <ItemAndMultiplier>
                    {
                        itemChoice
                    },
                        250,
                        $"2/1/-1/-1/-1/-1/null/{Globals.GetTranslation("Shipping-Bin-name-and-description")}/Buildings/none/48/80/-1/null/Farm",
                        "false/0"
                        );
                    break;

                case Buildings.Coop:
                    itemChoice = Globals.RNGGetRandomValueFromList(new List <ItemAndMultiplier>
                    {
                        new ItemAndMultiplier(resource1, 5),
                        new ItemAndMultiplier(ItemList.GetRandomItemAtDifficulty(ObtainingDifficulties.MediumTimeRequirements, idsToDisallowForAnimalBuildings.ToArray()))
                    });

                    currentBuilding = new Building(
                        "Coop",
                        new List <ItemAndMultiplier>
                    {
                        itemChoice,
                        new ItemAndMultiplier(resource2, Range.GetRandomValue(2, 3))
                    },
                        4000,
                        $"6/3/1/2/2/2/Coop/{Globals.GetTranslation("Coop-name-and-description")}/Buildings/none/64/96/4/null/Farm"
                        );
                    break;

                case Buildings.BigCoop:
                    itemChoice = Globals.RNGGetRandomValueFromList(new List <ItemAndMultiplier>
                    {
                        new ItemAndMultiplier(resource1, 3),
                        new ItemAndMultiplier(ItemList.GetRandomItemAtDifficulty(ObtainingDifficulties.MediumTimeRequirements, idsToDisallowForAnimalBuildings.ToArray()))
                    });

                    currentBuilding = new Building(
                        "Big Coop",
                        new List <ItemAndMultiplier>
                    {
                        itemChoice,
                        new ItemAndMultiplier(resource2, 7)
                    },
                        10000,
                        $"6/3/1/2/2/2/Coop2/{Globals.GetTranslation("Big-Coop-name-and-description")}/Upgrades/Coop/64/96/8/null/Farm"
                        );
                    break;

                case Buildings.DeluxeCoop:
                    itemChoice = Globals.RNGGetRandomValueFromList(new List <ItemAndMultiplier>
                    {
                        new ItemAndMultiplier(resource1, 9),
                        new ItemAndMultiplier(ItemList.GetRandomItemAtDifficulty(ObtainingDifficulties.LargeTimeRequirements, idsToDisallowForAnimalBuildings.ToArray()))
                    });

                    currentBuilding = new Building(
                        "Deluxe Coop",
                        new List <ItemAndMultiplier>
                    {
                        itemChoice,
                        new ItemAndMultiplier(resource2, 4)
                    },
                        20000,
                        $"6/3/1/2/2/2/Coop3/{Globals.GetTranslation("Deluxe-Coop-name-and-description")}/Upgrades/Big Coop/64/96/12/null/Farm"
                        );
                    break;

                case Buildings.Barn:
                    itemChoice = Globals.RNGGetRandomValueFromList(new List <ItemAndMultiplier>
                    {
                        new ItemAndMultiplier(resource1, 5),
                        new ItemAndMultiplier(ItemList.GetRandomItemAtDifficulty(ObtainingDifficulties.MediumTimeRequirements, idsToDisallowForAnimalBuildings.ToArray()))
                    });

                    currentBuilding = new Building(
                        "Barn",
                        new List <ItemAndMultiplier>
                    {
                        itemChoice,
                        new ItemAndMultiplier(resource2, Range.GetRandomValue(2, 3))
                    },
                        6000,
                        $"7/4/1/3/3/3/Barn/{Globals.GetTranslation("Barn-name-and-description")}/Buildings/none/96/96/4/null/Farm"
                        );
                    break;

                case Buildings.BigBarn:
                    itemChoice = Globals.RNGGetRandomValueFromList(new List <ItemAndMultiplier>
                    {
                        new ItemAndMultiplier(resource1, 3),
                        new ItemAndMultiplier(ItemList.GetRandomItemAtDifficulty(ObtainingDifficulties.MediumTimeRequirements, idsToDisallowForAnimalBuildings.ToArray()))
                    });

                    currentBuilding = new Building(
                        "Big Barn",
                        new List <ItemAndMultiplier>
                    {
                        itemChoice,
                        new ItemAndMultiplier(resource2, 7)
                    },
                        12000,
                        $"7/4/1/3/4/3/Barn2/{Globals.GetTranslation("Big-Barn-name-and-description")}/Upgrades/Barn/96/96/8/null/Farm"
                        );
                    break;

                case Buildings.DeluxeBarn:
                    itemChoice = Globals.RNGGetRandomValueFromList(new List <ItemAndMultiplier>
                    {
                        new ItemAndMultiplier(resource1, 9),
                        new ItemAndMultiplier(ItemList.GetRandomItemAtDifficulty(ObtainingDifficulties.LargeTimeRequirements, idsToDisallowForAnimalBuildings.ToArray()))
                    });

                    currentBuilding = new Building(
                        "Deluxe Barn",
                        new List <ItemAndMultiplier>
                    {
                        itemChoice,
                        new ItemAndMultiplier(resource2, 4)
                    },
                        25000,
                        $"7/4/1/3/4/3/Barn3/{Globals.GetTranslation("Deluxe-Barn-name-and-description")}/Upgrades/Big Barn/96/96/12/null/Farm"
                        );
                    break;

                case Buildings.SlimeHutch:
                    currentBuilding = new Building(
                        "Slime Hutch",
                        new List <ItemAndMultiplier>
                    {
                        new ItemAndMultiplier(resource1, 9),
                        new ItemAndMultiplier(ItemList.GetRandomItemAtDifficulty(ObtainingDifficulties.MediumTimeRequirements), 2),
                        new ItemAndMultiplier(ItemList.GetRandomItemAtDifficulty(ObtainingDifficulties.LargeTimeRequirements))
                    },
                        10000,
                        $"11/6/5/5/-1/-1/SlimeHutch/{Globals.GetTranslation("Slime-Hutch-name-and-description")}/Buildings/none/96/96/20/null/Farm"
                        );
                    break;

                case Buildings.Shed:
                    listChoice = Globals.RNGGetRandomValueFromList(new List <List <ItemAndMultiplier> > {
                        new List <ItemAndMultiplier> {
                            new ItemAndMultiplier(resource1, 5)
                        },
                        new List <ItemAndMultiplier>
                        {
                            new ItemAndMultiplier(resource1, 3),
                            new ItemAndMultiplier(ItemList.GetRandomItemAtDifficulty(ObtainingDifficulties.MediumTimeRequirements))
                        }
                    });

                    currentBuilding = new Building(
                        "Shed",
                        listChoice,
                        15000,
                        $"7/3/3/2/-1/-1/Shed/{Globals.GetTranslation("Shed-name-and-description")}/Buildings/none/96/96/20/null/Farm"
                        );
                    break;

                case Buildings.StoneCabin:
                    currentBuilding = new Building(
                        "Stone Cabin",
                        GetRequiredItemsForCabin(),
                        100,
                        $"5/3/2/2/-1/-1/Cabin/{Globals.GetTranslation("Stone-Cabin-name-and-description")}/Buildings/none/96/96/20/null/Farm",
                        "false/0"
                        );
                    break;

                case Buildings.PlankCabin:
                    currentBuilding = new Building(
                        "Plank Cabin",
                        GetRequiredItemsForCabin(),
                        100,
                        $"5/3/2/2/-1/-1/Cabin/{Globals.GetTranslation("Plank-Cabin-name-and-description")}/Buildings/none/96/96/20/null/Farm",
                        "false/0"
                        );
                    break;

                case Buildings.LogCabin:
                    currentBuilding = new Building(
                        "Log Cabin",
                        GetRequiredItemsForCabin(),
                        100,
                        $"5/3/2/2/-1/-1/Cabin/{Globals.GetTranslation("Log-Cabin-name-and-description")}/Buildings/none/96/96/20/null/Farm",
                        "false/0"
                        );
                    break;

                case Buildings.Well:
                    itemChoice = Globals.RNGGetRandomValueFromList(new List <ItemAndMultiplier>
                    {
                        new ItemAndMultiplier(resource1, 3),
                        new ItemAndMultiplier(ItemList.GetRandomItemAtDifficulty(ObtainingDifficulties.MediumTimeRequirements))
                    });

                    currentBuilding = new Building(
                        "Well",
                        new List <ItemAndMultiplier>
                    {
                        itemChoice
                    },
                        1000,
                        $"3/3/-1/-1/-1/-1/null/{Globals.GetTranslation("Well-name-and-description")}/Buildings/none/32/32/-1/null/Farm"
                        );
                    break;

                case Buildings.FishPond:
                    currentBuilding = new Building(
                        "Fish Pond",
                        new List <ItemAndMultiplier>
                    {
                        new ItemAndMultiplier(resource1, 2),
                        new ItemAndMultiplier(ItemList.GetRandomItemAtDifficulty(ObtainingDifficulties.SmallTimeRequirements), 2),
                        new ItemAndMultiplier(ItemList.GetRandomItemAtDifficulty(ObtainingDifficulties.SmallTimeRequirements), 2)
                    },
                        5000,
                        $"5/5/-1/-1/-2/-1/null/{Globals.GetTranslation("Fish-Pond-name-and-description")}/Buildings/none/76/78/10/null/Farm",
                        "false/2"
                        );
                    break;

                default:
                    Globals.ConsoleError($"Unhandled building: {buildingType.ToString()}");
                    continue;
                }
                buildingsToAdd.Add(currentBuilding);
            }

            foreach (Building building in buildingsToAdd)
            {
                blueprintChanges.Add(building.Name, building.ToString());
            }

            WriteToSpoilerLog(buildingsToAdd);
            return(blueprintChanges);
        }
Example #22
0
 /// <summary>
 /// Gets a random song
 /// </summary>
 /// <returns />
 private static string GetRandomSong()
 {
     //TODO: remove the Volcano_Ambient check in the next major release
     return(Globals.RNGGetRandomValueFromList(
                MusicList.Where(song => song != "Volcano_Ambient" && song != "Lava_Ambient").ToList(), true));
 }
        /// <summary>
        /// Creates a bundle for the crafts room
        /// </summary>
        protected override void Populate()
        {
            // Force one resource bundle so that there's one possible bundle to complete
            if (!RoomBundleTypes.Contains(BundleTypes.CraftingResource))
            {
                BundleType = Globals.RNGGetAndRemoveRandomValueFromList(RoomBundleTypes);
            }
            else
            {
                RoomBundleTypes.Remove(BundleTypes.CraftingResource);
                BundleType = BundleTypes.CraftingResource;
            }

            List <RequiredItem> potentialItems;
            int numberOfChoices;

            switch (BundleType)
            {
            case BundleTypes.CraftingResource:
                Name          = Globals.GetTranslation("bundle-crafting-resource");
                RequiredItems = new List <RequiredItem>
                {
                    new RequiredItem((int)ObjectIndexes.Wood, 100, 250),
                    new RequiredItem((int)ObjectIndexes.Stone, 100, 250),
                    new RequiredItem((int)ObjectIndexes.Fiber, 10, 50),
                    new RequiredItem((int)ObjectIndexes.Clay, 10, 50),
                    new RequiredItem((int)ObjectIndexes.Hardwood, 1, 10)
                };
                Color = BundleColors.Orange;
                break;

            case BundleTypes.CraftingHappyCrops:
                Name = Globals.GetTranslation("bundle-crafting-happy-crops");
                RequiredItem qualityCrop = new RequiredItem(Globals.RNGGetRandomValueFromList(ItemList.GetCrops()));
                qualityCrop.MinimumQuality = ItemQualities.Gold;
                potentialItems             = new List <RequiredItem>
                {
                    new RequiredItem((int)ObjectIndexes.Sprinkler, 1, 5),
                    new RequiredItem((int)ObjectIndexes.QualitySprinkler, 1, 5),
                    new RequiredItem((int)ObjectIndexes.IridiumSprinkler, 1),
                    new RequiredItem((int)ObjectIndexes.BasicFertilizer, 10, 20),
                    new RequiredItem((int)ObjectIndexes.QualityFertilizer, 10, 20),
                    new RequiredItem((int)ObjectIndexes.BasicRetainingSoil, 10, 20),
                    new RequiredItem((int)ObjectIndexes.QualityRetainingSoil, 10, 20),
                    qualityCrop
                };
                numberOfChoices      = Range.GetRandomValue(6, 8);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, numberOfChoices);
                MinimumRequiredItems = Range.GetRandomValue(numberOfChoices - 2, numberOfChoices);
                Color = BundleColors.Green;
                break;

            case BundleTypes.CraftingTree:
                Name           = Globals.GetTranslation("bundle-crafting-tree");
                potentialItems = new List <RequiredItem>
                {
                    new RequiredItem((int)ObjectIndexes.MapleSeed, 1, 5),
                    new RequiredItem((int)ObjectIndexes.Acorn, 1, 5),
                    new RequiredItem((int)ObjectIndexes.PineCone, 1),
                    new RequiredItem((int)ObjectIndexes.OakResin, 1),
                    new RequiredItem((int)ObjectIndexes.MapleSyrup, 1),
                    new RequiredItem((int)ObjectIndexes.PineTar, 1),
                    new RequiredItem(Globals.RNGGetRandomValueFromList(ItemList.GetFruit()), 1),
                    new RequiredItem((int)ObjectIndexes.Wood, 100, 200),
                    new RequiredItem((int)ObjectIndexes.Hardwood, 25, 50),
                    new RequiredItem((int)ObjectIndexes.Driftwood, 5, 10),
                };
                numberOfChoices      = Range.GetRandomValue(6, 8);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, numberOfChoices);
                MinimumRequiredItems = Range.GetRandomValue(numberOfChoices - 2, numberOfChoices);
                Color = BundleColors.Green;
                break;

            case BundleTypes.CraftingTotems:
                Name          = Globals.GetTranslation("bundle-crafting-totems");
                RequiredItems = new List <RequiredItem>
                {
                    new RequiredItem((int)ObjectIndexes.WarpTotemFarm),
                    new RequiredItem((int)ObjectIndexes.WarpTotemBeach),
                    new RequiredItem((int)ObjectIndexes.WarpTotemMountains),
                    new RequiredItem((int)ObjectIndexes.WarpTotemDesert),
                    new RequiredItem((int)ObjectIndexes.RainTotem),
                };
                MinimumRequiredItems = Range.GetRandomValue(3, 4);
                Color = BundleColors.Red;
                break;

            case BundleTypes.CraftingBindle:
                Name           = Globals.GetTranslation("bundle-crafting-bindle");
                potentialItems = new List <RequiredItem>
                {
                    new RequiredItem(Globals.RNGGetRandomValueFromList(ItemList.GetCookeditems())),
                    new RequiredItem(Globals.RNGGetRandomValueFromList(ItemList.GetForagables())),
                    new RequiredItem(Globals.RNGGetRandomValueFromList(FishItem.Get())),
                    new RequiredItem(Globals.RNGGetRandomValueFromList(
                                         ItemList.Items.Values.Where(x => x.Id > 0 && x.DifficultyToObtain <= ObtainingDifficulties.LargeTimeRequirements).ToList()).Id
                                     ),
                };
                RequiredItems = new List <RequiredItem>
                {
                    new RequiredItem((int)ObjectIndexes.ChewingStick),
                    new RequiredItem((int)ObjectIndexes.Cloth),
                };
                RequiredItems.AddRange(Globals.RNGGetRandomValuesFromList(potentialItems, Range.GetRandomValue(2, 3)));
                MinimumRequiredItems = RequiredItems.Count - 1;
                Color = BundleColors.Yellow;
                break;

            case BundleTypes.CraftingSpringForaging:
                GenerateForagingBundle(Seasons.Spring, BundleColors.Green);
                break;

            case BundleTypes.CraftingSummerForaging:
                GenerateForagingBundle(Seasons.Summer, BundleColors.Red);
                break;

            case BundleTypes.CraftingFallForaging:
                GenerateForagingBundle(Seasons.Fall, BundleColors.Orange);
                break;

            case BundleTypes.CraftingWinterForaging:
                GenerateForagingBundle(Seasons.Winter, BundleColors.Cyan);
                break;

            case BundleTypes.CraftingColorOrange:
                Name           = Globals.GetTranslation("bundle-crafting-orange");
                potentialItems = RequiredItem.CreateList(new List <int>
                {
                    (int)ObjectIndexes.RustySpur,
                    (int)ObjectIndexes.RustyCog,
                    (int)ObjectIndexes.Lobster,
                    (int)ObjectIndexes.Crab,
                    (int)ObjectIndexes.GlazedYams,
                    (int)ObjectIndexes.FriedEel,
                    (int)ObjectIndexes.SpicyEel,
                    (int)ObjectIndexes.PaleAle,
                    (int)ObjectIndexes.Chanterelle,
                    (int)ObjectIndexes.CopperBar,
                    (int)ObjectIndexes.QualityFertilizer,
                    (int)ObjectIndexes.CopperOre,
                    (int)ObjectIndexes.NautilusShell,
                    (int)ObjectIndexes.SpiceBerry,
                    (int)ObjectIndexes.WinterRoot,
                    (int)ObjectIndexes.Tigerseye,
                    (int)ObjectIndexes.Baryte,
                    (int)ObjectIndexes.LemonStone,
                    (int)ObjectIndexes.Orpiment,
                    (int)ObjectIndexes.PumpkinPie,
                    (int)ObjectIndexes.Apricot,
                    (int)ObjectIndexes.Orange,
                    (int)ObjectIndexes.LobsterBisque,
                    (int)ObjectIndexes.CrabCakes,
                    (int)ObjectIndexes.JackOLantern
                });
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Range.GetRandomValue(3, 6);
                Color = BundleColors.Orange;
                break;

            case BundleTypes.CraftingColorYellow:
                Name           = Globals.GetTranslation("bundle-crafting-yellow");
                potentialItems = RequiredItem.CreateList(new List <int>
                {
                    (int)ObjectIndexes.Daffodil,
                    (int)ObjectIndexes.Dandelion,
                    (int)ObjectIndexes.Topaz,
                    (int)ObjectIndexes.Sap,
                    (int)ObjectIndexes.DwarfScrollIV,
                    (int)ObjectIndexes.DriedStarfish,
                    (int)ObjectIndexes.BoneFlute,
                    (int)ObjectIndexes.GoldenMask,
                    (int)ObjectIndexes.GoldenRelic,
                    (int)ObjectIndexes.StrangeDoll1,
                    (int)ObjectIndexes.Hay,
                    (int)ObjectIndexes.Omelet,
                    (int)ObjectIndexes.CheeseCauliflower,
                    (int)ObjectIndexes.FriedCalamari,
                    (int)ObjectIndexes.LuckyLunch,
                    (int)ObjectIndexes.Pizza,
                    (int)ObjectIndexes.FishTaco,
                    (int)ObjectIndexes.Spaghetti,
                    (int)ObjectIndexes.Tortilla,
                    (int)ObjectIndexes.FarmersLunch,
                    (int)ObjectIndexes.Oil,
                    (int)ObjectIndexes.Morel,
                    (int)ObjectIndexes.DuckMayonnaise,
                    (int)ObjectIndexes.MapleSeed,
                    (int)ObjectIndexes.GoldBar,
                    (int)ObjectIndexes.Honey,
                    (int)ObjectIndexes.Beer,
                    (int)ObjectIndexes.MuscleRemedy,
                    (int)ObjectIndexes.BasicFertilizer,
                    (int)ObjectIndexes.GoldenPumpkin,
                    (int)ObjectIndexes.GoldOre,
                    (int)ObjectIndexes.StrawFloor,
                    (int)ObjectIndexes.Cheese,
                    (int)ObjectIndexes.TruffleOil,
                    (int)ObjectIndexes.CoffeeBean,
                    (int)ObjectIndexes.TreasureChest,
                    (int)ObjectIndexes.Mead,
                    (int)ObjectIndexes.GlowRing,
                    (int)ObjectIndexes.SmallGlowRing,
                    (int)ObjectIndexes.RingOfYoba,
                    (int)ObjectIndexes.TopazRing,
                    (int)ObjectIndexes.Calcite,
                    (int)ObjectIndexes.Jagoite,
                    (int)ObjectIndexes.Pyrite,
                    (int)ObjectIndexes.Sandstone,
                    (int)ObjectIndexes.Hematite,
                    (int)ObjectIndexes.MapleSyrup,
                    (int)ObjectIndexes.SolarEssence
                });
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Range.GetRandomValue(3, 6);
                Color = BundleColors.Yellow;
                break;
            }
        }
        /// <summary>
        /// Creates a bundle for the pantry
        /// </summary>
        protected override void Populate()
        {
            BundleType = Globals.RNGGetAndRemoveRandomValueFromList(RoomBundleTypes);
            List <RequiredItem> potentialItems = new List <RequiredItem>();

            switch (BundleType)
            {
            case BundleTypes.PantryAnimal:
                Name           = Globals.GetTranslation("bundle-pantry-animal");
                potentialItems = RequiredItem.CreateList(ItemList.GetAnimalProducts());
                potentialItems.Add(new RequiredItem((int)ObjectIndexes.Hay, 25, 50));
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, Range.GetRandomValue(6, 8));
                MinimumRequiredItems = Range.GetRandomValue(RequiredItems.Count - 2, RequiredItems.Count);
                Color = BundleColors.Orange;
                break;

            case BundleTypes.PantryQualityCrops:
                Name           = Globals.GetTranslation("bundle-pantry-quality-crops");
                potentialItems = RequiredItem.CreateList(ItemList.GetCrops());
                potentialItems.ForEach(x => x.MinimumQuality = ItemQualities.Gold);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Range.GetRandomValue(4, 6);
                Color = BundleColors.Green;
                break;

            case BundleTypes.PantryQualityForagables:
                Name           = Globals.GetTranslation("bundle-pantry-quality-foragables");
                potentialItems = RequiredItem.CreateList(ItemList.GetForagables());
                potentialItems.ForEach(x => x.MinimumQuality = ItemQualities.Gold);
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Range.GetRandomValue(4, 6);
                Color = BundleColors.Green;
                break;

            case BundleTypes.PantryCooked:
                Name                 = Globals.GetTranslation("bundle-pantry-cooked");
                potentialItems       = RequiredItem.CreateList(ItemList.GetCookeditems());
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, Range.GetRandomValue(6, 8));
                MinimumRequiredItems = Range.GetRandomValue(3, 4);
                Color                = BundleColors.Green;
                break;

            case BundleTypes.PantryFlower:
                Name                 = Globals.GetTranslation("bundle-pantry-flower");
                potentialItems       = RequiredItem.CreateList(ItemList.GetFlowers());
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, Range.GetRandomValue(6, 8));
                MinimumRequiredItems = RequiredItems.Count - 2;
                Color                = BundleColors.Green;
                break;

            case BundleTypes.PantrySpringCrops:
                GenerateBundleForSeasonCrops(Seasons.Spring, BundleColors.Green);
                break;

            case BundleTypes.PantrySummerCrops:
                GenerateBundleForSeasonCrops(Seasons.Summer, BundleColors.Red);
                break;

            case BundleTypes.PantryFallCrops:
                GenerateBundleForSeasonCrops(Seasons.Fall, BundleColors.Orange);
                break;

            case BundleTypes.PantryEgg:
                Name           = Globals.GetTranslation("bundle-pantry-egg");
                potentialItems = RequiredItem.CreateList(
                    ItemList.Items.Values.Where(x => x.Name.Contains("Egg") && x.Id > -4).ToList());
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Range.GetRandomValue(RequiredItems.Count - 3, RequiredItems.Count - 2);
                Color = BundleColors.Yellow;
                break;

            case BundleTypes.PantryRareFoods:
                Name = Globals.GetTranslation("bundle-pantry-rare-foods");

                SeedItem starFruitSeed = (SeedItem)ItemList.Items[(int)ObjectIndexes.StarfruitSeeds];
                SeedItem gemBerrySeed  = (SeedItem)ItemList.Items[(int)ObjectIndexes.RareSeed];
                RequiredItems = new List <RequiredItem>
                {
                    new RequiredItem((int)ObjectIndexes.AncientFruit),
                    new RequiredItem(starFruitSeed.CropGrowthInfo.CropId),
                    new RequiredItem(gemBerrySeed.CropGrowthInfo.CropId),
                };
                MinimumRequiredItems = 2;
                Color = BundleColors.Blue;
                break;

            case BundleTypes.PantryDesert:
                Name          = Globals.GetTranslation("bundle-pantry-desert");
                RequiredItems = new List <RequiredItem>
                {
                    new RequiredItem((int)ObjectIndexes.IridiumOre, 5),
                    Globals.RNGGetRandomValueFromList(new List <RequiredItem>
                    {
                        new RequiredItem((int)ObjectIndexes.GoldenMask),
                        new RequiredItem((int)ObjectIndexes.GoldenRelic),
                    }),
                    Globals.RNGGetRandomValueFromList(RequiredItem.CreateList(FishItem.Get(Locations.Desert))),
                    Globals.RNGGetRandomValueFromList(RequiredItem.CreateList(ItemList.GetUniqueDesertForagables(), 1, 3)),
                    new RequiredItem((int)ObjectIndexes.StarfruitSeeds, 5)
                };
                MinimumRequiredItems = 4;
                Color = BundleColors.Yellow;
                break;

            case BundleTypes.PantryDessert:
                Name           = Globals.GetTranslation("bundle-pantry-dessert");
                potentialItems = new List <RequiredItem>
                {
                    new RequiredItem((int)ObjectIndexes.CranberryCandy),
                    new RequiredItem((int)ObjectIndexes.PlumPudding),
                    new RequiredItem((int)ObjectIndexes.PinkCake),
                    new RequiredItem((int)ObjectIndexes.PumpkinPie),
                    new RequiredItem((int)ObjectIndexes.RhubarbPie),
                    new RequiredItem((int)ObjectIndexes.Cookie),
                    new RequiredItem((int)ObjectIndexes.IceCream),
                    new RequiredItem((int)ObjectIndexes.MinersTreat),
                    new RequiredItem((int)ObjectIndexes.BlueberryTart),
                    new RequiredItem((int)ObjectIndexes.BlackberryCobbler),
                    new RequiredItem((int)ObjectIndexes.MapleBar),
                };
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = 4;
                Color = BundleColors.Cyan;
                break;

            case BundleTypes.PantryMexicanFood:
                Name          = Globals.GetTranslation("bundle-pantry-mexican-food");
                RequiredItems = new List <RequiredItem>
                {
                    new RequiredItem((int)ObjectIndexes.Tortilla),
                    new RequiredItem((int)ObjectIndexes.Corn, 1, 5),
                    new RequiredItem((int)ObjectIndexes.Tomato, 1, 5),
                    new RequiredItem((int)ObjectIndexes.HotPepper, 1, 5),
                    new RequiredItem((int)ObjectIndexes.FishTaco),
                    new RequiredItem((int)ObjectIndexes.Rice),
                    new RequiredItem((int)ObjectIndexes.Cheese),
                };
                MinimumRequiredItems = Range.GetRandomValue(4, 5);
                Color = BundleColors.Red;
                break;

            case BundleTypes.PantryColorBrown:
                Name           = Globals.GetTranslation("bundle-pantry-brown");
                potentialItems = RequiredItem.CreateList(new List <int>
                {
                    (int)ObjectIndexes.WildHorseradish,
                    (int)ObjectIndexes.CaveCarrot,
                    (int)ObjectIndexes.EarthCrystal,
                    (int)ObjectIndexes.Coconut,
                    (int)ObjectIndexes.Torch,
                    (int)ObjectIndexes.ChippedAmphora,
                    (int)ObjectIndexes.ChewingStick,
                    (int)ObjectIndexes.AncientSeed,
                    (int)ObjectIndexes.DwarvishHelm,
                    (int)ObjectIndexes.Driftwood,
                    (int)ObjectIndexes.BrownEgg,
                    (int)ObjectIndexes.LargeBrownEgg,
                    (int)ObjectIndexes.BakedFish,
                    (int)ObjectIndexes.ParsnipSoup,
                    (int)ObjectIndexes.CompleteBreakfast,
                    (int)ObjectIndexes.FriedMushroom,
                    (int)ObjectIndexes.CarpSurprise,
                    (int)ObjectIndexes.Hashbrowns,
                    (int)ObjectIndexes.Pancakes,
                    (int)ObjectIndexes.CrispyBass,
                    (int)ObjectIndexes.Bread,
                    (int)ObjectIndexes.TomKhaSoup,
                    (int)ObjectIndexes.ChocolateCake,
                    (int)ObjectIndexes.Cookie,
                    (int)ObjectIndexes.EggplantParmesan,
                    (int)ObjectIndexes.SurvivalBurger,
                    (int)ObjectIndexes.WheatFlour,
                    (int)ObjectIndexes.HardwoodFence,
                    (int)ObjectIndexes.Acorn,
                    (int)ObjectIndexes.PineCone,
                    (int)ObjectIndexes.WoodFence,
                    (int)ObjectIndexes.Gate,
                    (int)ObjectIndexes.WoodFloor,
                    (int)ObjectIndexes.Clay,
                    (int)ObjectIndexes.WeatheredFloor,
                    (int)ObjectIndexes.Wood,
                    (int)ObjectIndexes.Coffee,
                    (int)ObjectIndexes.CommonMushroom,
                    (int)ObjectIndexes.WoodPath,
                    (int)ObjectIndexes.Hazelnut,
                    (int)ObjectIndexes.Truffle,
                    (int)ObjectIndexes.Geode,
                    (int)ObjectIndexes.Mudstone,
                    (int)ObjectIndexes.AmphibianFossil,
                    (int)ObjectIndexes.PalmFossil,
                    (int)ObjectIndexes.PlumPudding,
                    (int)ObjectIndexes.RoastedHazelnuts,
                    (int)ObjectIndexes.Bruschetta,
                    (int)ObjectIndexes.QualitySprinkler,
                    (int)ObjectIndexes.PoppyseedMuffin,
                    (int)ObjectIndexes.RainTotem,
                    (int)ObjectIndexes.WarpTotemMountains,
                    (int)ObjectIndexes.CorkBobber,
                    (int)ObjectIndexes.PineTar,
                    (int)ObjectIndexes.MapleBar
                });
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Range.GetRandomValue(3, 6);
                Color = BundleColors.Orange;
                break;

            case BundleTypes.PantryColorGreen:
                Name           = Globals.GetTranslation("bundle-pantry-green");
                potentialItems = RequiredItem.CreateList(new List <int>
                {
                    (int)ObjectIndexes.Emerald,
                    (int)ObjectIndexes.Jade,
                    (int)ObjectIndexes.CactusFruit,
                    (int)ObjectIndexes.DwarfScrollII,
                    (int)ObjectIndexes.StrangeDoll2,
                    (int)ObjectIndexes.Snail,
                    (int)ObjectIndexes.Seaweed,
                    (int)ObjectIndexes.GreenAlgae,
                    (int)ObjectIndexes.Salad,
                    (int)ObjectIndexes.BeanHotpot,
                    (int)ObjectIndexes.TroutSoup,
                    (int)ObjectIndexes.IceCream,
                    (int)ObjectIndexes.Stuffing,
                    (int)ObjectIndexes.FiddleheadFern,
                    (int)ObjectIndexes.GrassStarter,
                    (int)ObjectIndexes.Pickles,
                    (int)ObjectIndexes.Juice,
                    (int)ObjectIndexes.FieldSnack,
                    (int)ObjectIndexes.DuckFeather,
                    (int)ObjectIndexes.AlgaeSoup,
                    (int)ObjectIndexes.SlimeCharmerRing,
                    (int)ObjectIndexes.BurglarsRing,
                    (int)ObjectIndexes.JadeRing,
                    (int)ObjectIndexes.EmeraldRing,
                    (int)ObjectIndexes.Alamite,
                    (int)ObjectIndexes.Geminite,
                    (int)ObjectIndexes.Jamborite,
                    (int)ObjectIndexes.Malachite,
                    (int)ObjectIndexes.PetrifiedSlime,
                    (int)ObjectIndexes.OceanStone,
                    (int)ObjectIndexes.Coleslaw,
                    (int)ObjectIndexes.FiddleheadRisotto,
                    (int)ObjectIndexes.GreenSlimeEgg,
                    (int)ObjectIndexes.WarpTotemFarm,
                    (int)ObjectIndexes.OakResin,
                    (int)ObjectIndexes.FishStew,
                    (int)ObjectIndexes.Escargot,
                    (int)ObjectIndexes.Slime,
                    (int)ObjectIndexes.Fiber,
                    (int)ObjectIndexes.OilOfGarlic,
                    (int)ObjectIndexes.WildBait
                });
                RequiredItems        = Globals.RNGGetRandomValuesFromList(potentialItems, 8);
                MinimumRequiredItems = Range.GetRandomValue(3, 6);
                Color = BundleColors.Green;
                break;
            }
        }