/// <summary>
        /// Writes relevant crop changes to the spoiler log
        /// </summary>
        private static void WriteToSpoilerLog()
        {
            if (Globals.Config.RandomizeCrops)
            {
                Globals.SpoilerWrite("==== CROPS AND SEEDS ====");
                foreach (SeedItem seedItem in ItemList.GetSeeds())
                {
                    if (seedItem.Id == (int)ObjectIndexes.CoffeeBean || seedItem.Id == (int)ObjectIndexes.AncientSeeds)
                    {
                        continue;
                    }
                    CropItem cropItem = (CropItem)ItemList.Items[seedItem.CropGrowthInfo.CropId];
                    Globals.SpoilerWrite($"{cropItem.Id}: {cropItem.Name} - Seed Buy Price: {seedItem.Price * 2}G - Crop Sell Price: {cropItem.Price}G");
                    Globals.SpoilerWrite($"{seedItem.Id}: {seedItem.Description}");
                    Globals.SpoilerWrite("---");
                }
                Globals.SpoilerWrite("");
            }

            if (Globals.Config.RandomizeFruitTrees)
            {
                Globals.SpoilerWrite("==== FRUIT TREES ====");
                Globals.SpoilerWrite($"{ItemList.GetItemName((int)ObjectIndexes.CherrySapling)}");
                Globals.SpoilerWrite($"{ItemList.GetItemName((int)ObjectIndexes.AppleSapling)}");
                Globals.SpoilerWrite($"{ItemList.GetItemName((int)ObjectIndexes.OrangeSapling)}");
                Globals.SpoilerWrite($"{ItemList.GetItemName((int)ObjectIndexes.PeachSapling)}");
                Globals.SpoilerWrite($"{ItemList.GetItemName((int)ObjectIndexes.PomegranateSapling)}");
                Globals.SpoilerWrite($"{ItemList.GetItemName((int)ObjectIndexes.ApricotSapling)}");
                Globals.SpoilerWrite("");
            }
        }
Example #2
0
        /// <summary>
        /// Writes the given bundle to the spoiler log
        /// </summary>
        /// <param name="bundle">The bundle</param>
        /// <param name="index">The bundle index</param>
        private static void WriteToSpoilerLog(Bundle bundle, int index)
        {
            if (!Globals.Config.Bundles.Randomize)
            {
                return;
            }

            Globals.SpoilerWrite($"Bundle index: {index} - {bundle.Name} Bundle");

            if (bundle.Room != CommunityCenterRooms.Vault)
            {
                Globals.SpoilerWrite($"Possible items: " +
                                     $"{string.Join(", ", bundle.RequiredItems.Select(x => $"{x.Item.Name}: {x.NumberOfItems}").ToList())}"
                                     );
                int minimumRequiredItems = bundle.MinimumRequiredItems == null ?
                                           bundle.RequiredItems.Count : bundle.MinimumRequiredItems.Value;
                Globals.SpoilerWrite($"Required: {minimumRequiredItems}/{bundle.RequiredItems.Count}");
            }

            if (bundle.Room != CommunityCenterRooms.Joja)
            {
                Globals.SpoilerWrite($"Reward: {bundle.Reward.Item.Name}: {bundle.Reward.NumberOfItems}");
            }
            Globals.SpoilerWrite($"---");
        }
Example #3
0
        /// <summary>
        /// Writes the results to the spoiler log
        /// </summary>
        /// <param name="foragableLocationDataList">The list of location data that was randomized</param>
        public static void WriteToSpoilerLog(List <LocationData> foragableLocationDataList)
        {
            if (!Globals.Config.RandomizeForagables && !Globals.Config.AddRandomArtifactItem)
            {
                return;
            }

            Globals.SpoilerWrite("==== Foragables and Artifact Spots ====");
            foreach (LocationData foragableLocationData in foragableLocationDataList)
            {
                Globals.SpoilerWrite("");
                Globals.SpoilerWrite($">> {foragableLocationData.LocationName} <<");

                if (Globals.Config.RandomizeForagables)
                {
                    WriteResultsForSeason(Seasons.Spring, foragableLocationData);
                    WriteResultsForSeason(Seasons.Summer, foragableLocationData);
                    WriteResultsForSeason(Seasons.Fall, foragableLocationData);
                    WriteResultsForSeason(Seasons.Winter, foragableLocationData);
                }

                if (Globals.Config.AddRandomArtifactItem)
                {
                    Globals.SpoilerWrite("");
                    Globals.SpoilerWrite($"Extra digging item and rarity: {foragableLocationData.ExtraDiggingItem.Name} | {foragableLocationData.ExtraDiggingItemRarity}");
                }
            }
            Globals.SpoilerWrite("");
        }
        /// <summary>
        /// Writes the monster info to the spoiler log
        /// </summary>
        /// <param name="allMonsters">The monster</param>
        /// <param name="extraItemDrops">The map of monsters to their extra item drop</param>
        private static void WriteMonsterInfoToSpoilerLog(List <Monster> allMonsters, Dictionary <string, ItemDrop> extraItemDrops)
        {
            if (!Globals.Config.Monsters.Randomize)
            {
                return;
            }

            Globals.SpoilerWrite("");
            Globals.SpoilerWrite("> Monster stats");

            foreach (Monster monster in allMonsters)
            {
                ItemDrop extraDrop = extraItemDrops[monster.Name];

                Globals.SpoilerWrite("---");
                Globals.SpoilerWrite(monster.Name);
                Globals.SpoilerWrite($"{monster.HP} HP; {monster.Damage} Damage; {monster.Resilience} Resilience; {monster.Speed} Speed");
                Globals.SpoilerWrite($"Miss chance: {monster.MissChance * 100}%");
                Globals.SpoilerWrite($"Experience: {monster.Experience}");
                Globals.SpoilerWrite($"Moves randomly for {monster.RandomMovementDuration / 1000d} seconds");
                Globals.SpoilerWrite($"Jitteriness value: {monster.Jitteriness}");
                Globals.SpoilerWrite($"Threshold until the monster moves towards players: {monster.MovesTowardPlayerThreshold}");
                Globals.SpoilerWrite($"Extra drop: {extraDrop.ItemToDrop.Name} at {extraDrop.Probability * 100}%");
            }

            Globals.SpoilerWrite("");
        }
Example #5
0
        /// <summary>
        /// Gets the string to be used for the crafting recipe
        /// </summary>
        /// <returns></returns>
        public string GetCraftingString()
        {
            string itemsRequiredString = GetItemsRequired();
            string stringSuffix        = IsLearnedOnLevelup ? $"{SkillString} {GetLevelLearnedAt()}" : "";
            string craftingString      = $"{itemsRequiredString}{Path}{stringSuffix}";

            string requiredItemsSpoilerString = "";

            string[] requiredItemsTokens = itemsRequiredString.Split(' ');
            for (int i = 0; i < requiredItemsTokens.Length; i += 2)
            {
                string itemName = ItemList.GetItemName(int.Parse(requiredItemsTokens[i]));
                string amount   = requiredItemsTokens[i + 1];
                requiredItemsSpoilerString += $" - {itemName}: {amount}";
            }

            if (Globals.Config.RandomizeCraftingRecipes)
            {
                Globals.SpoilerWrite($"{Name} - {stringSuffix}");
                Globals.SpoilerWrite(requiredItemsSpoilerString);
                Globals.SpoilerWrite("---");
            }

            return(craftingString);
        }
Example #6
0
 public static Dictionary<string, string> Randomize()
 {
     if (Globals.Config.CraftingRecipies.Randomize) { Globals.SpoilerWrite($"==== CRAFTING RECIPES ===="); }
     Dictionary<string, string> replacements = new Dictionary<string, string>();
     foreach (CraftableItem item in ItemList.Items.Values.Where(x => x.IsCraftable))
     {
         replacements[item.Name] = item.GetCraftingString();
     }
     if (Globals.Config.CraftingRecipies.Randomize) { Globals.SpoilerWrite(""); }
     return replacements;
 }
        /// <summary>
        /// Writes the dictionary info to the spoiler log
        /// </summary>
        /// <param name="questList">The info to write out</param>
        private static void WriteToSpoilerLog(Dictionary <int, string> questList)
        {
            if (!Globals.Config.RandomizeQuests)
            {
                return;
            }

            Globals.SpoilerWrite("==== QUESTS ====");
            foreach (KeyValuePair <int, string> pair in questList)
            {
                Globals.SpoilerWrite($"{pair.Key}: \"{pair.Value}\"");
            }
            Globals.SpoilerWrite("");
        }
Example #8
0
        /// <summary>
        /// Writes the boots to the spoiler log
        /// </summary>
        /// <param name="bootsToUse">The boot data that was used</param>
        public static void WriteToSpoilerLog(List <BootItem> bootsToUse)
        {
            if (!Globals.Config.Boots.Randomize)
            {
                return;
            }

            Globals.SpoilerWrite("==== BOOTS ====");
            foreach (BootItem bootToAdd in bootsToUse)
            {
                Globals.SpoilerWrite($"{bootToAdd.Name}: +{bootToAdd.Defense} defense; +{bootToAdd.Immunity} immunity");
            }
            Globals.SpoilerWrite("");
        }
        /// <summary>
        /// Writes the music info to the spoiler log
        /// </summary>
        /// <param name="musicList">The music replacement list</param>
        private static void WriteToSpoilerLog(Dictionary <string, string> replacementList)
        {
            if (!Globals.Config.RandomizeMusic)
            {
                return;
            }

            Globals.SpoilerWrite("==== MUSIC ====");
            foreach (string song in replacementList.Keys)
            {
                Globals.SpoilerWrite($"{song} is now {replacementList[song]}");
            }

            Globals.SpoilerWrite("---");
            Globals.SpoilerWrite("");
        }
Example #10
0
        /// <summary>
        /// Writes the music info to the spoiler log
        /// </summary>
        /// <param name="musicList">The music replacement list</param>
        private static void WriteToSpoilerLog()
        {
            if (!Globals.Config.Music.Randomize || Globals.Config.Music.RandomSongEachTransition)
            {
                return;
            }

            Globals.SpoilerWrite("==== MUSIC ====");
            foreach (string song in MusicReplacements.Keys)
            {
                Globals.SpoilerWrite($"{song} is now {MusicReplacements[song]}");
            }

            Globals.SpoilerWrite("---");
            Globals.SpoilerWrite("");
        }
        /// <summary>
        /// Writes the monster info to the spoiler log
        /// </summary>
        /// <param name="monsterItemSwaps">The item swaps performed</param>
        private static void WriteSwapInfoToSpoilerLog(Dictionary <int, int> monsterItemSwaps)
        {
            if (!Globals.Config.Monsters.Randomize)
            {
                return;
            }

            Globals.SpoilerWrite("===== MONSTERS =====");
            Globals.SpoilerWrite("");
            Globals.SpoilerWrite("> Major monster drop swaps");

            foreach (int originalId in monsterItemSwaps.Keys)
            {
                Globals.SpoilerWrite($"{ItemList.Items[originalId].Name} -> {ItemList.Items[monsterItemSwaps[originalId]].Name}");
            }
        }
        /// <summary>
        /// Writes the buildings to the spoiler log
        /// </summary>
        /// <param name="buildingsToAdd">Info about the changes buildings</param>
        private static void WriteToSpoilerLog(List <Building> buildingsToAdd)
        {
            if (!Globals.Config.RandomizeBuildingCosts)
            {
                return;
            }

            Globals.SpoilerWrite("==== BUILDINGS ====");
            foreach (Building building in buildingsToAdd)
            {
                Globals.SpoilerWrite($"{building.Name} - {building.Price}G");
                Globals.SpoilerWrite(GetRequiredItemsSpoilerString(building));
                Globals.SpoilerWrite("===");
            }
            Globals.SpoilerWrite("");
        }
Example #13
0
        /// <summary>
        /// Writes the relevant changes to the spoiler log
        /// </summary>
        public static void WriteToSpoilerLog()
        {
            if (!Globals.Config.Fish.Randomize)
            {
                return;
            }

            List <FishItem> allRandomizedFish = FishItem.GetListAsFishItem(true);

            Globals.SpoilerWrite("==== FISH ====");
            foreach (FishItem fish in allRandomizedFish)
            {
                Globals.SpoilerWrite($"{fish.Id}: {fish.Name}");
                Globals.SpoilerWrite($"Difficulty: {fish.DartChance} - Level Req: {fish.MinFishingLevel} - Water depth: {fish.MinWaterDepth}");
                Globals.SpoilerWrite(fish.Description);
                Globals.SpoilerWrite("---");
            }
            Globals.SpoilerWrite("");
        }
        /// <summary>
        /// Write to the spoiler log
        /// </summary>
        /// <param name="replacements">The replacements made - need to filter out the "HOLIDAY" entries</param>
        private static void WriteToSpoilerLog(Dictionary <SDate, string> replacements)
        {
            if (!Globals.Config.RandomizeNPCBirthdays)
            {
                return;
            }

            Globals.SpoilerWrite("===== NPC BIRTHDAYS =====");
            foreach (SDate date in replacements.Keys)
            {
                string npcName = replacements[date];
                if (npcName == HolidayString)
                {
                    continue;
                }

                Globals.SpoilerWrite($"{npcName}: {date.Season} {date.Day}");
            }
            Globals.SpoilerWrite("");
        }
        /// <summary>
        /// The randomizing function
        /// </summary>
        /// <returns>A dictionary of bundles to their output string</returns>
        public static Dictionary <string, string> Randomize()
        {
            _randomizedBundles.Clear();
            Bundle.InitializeAllBundleTypes();             // Must be done so that reloading the game is consistent

            if (Globals.Config.RandomizeBundles)
            {
                Globals.SpoilerWrite("==== BUNDLES ====");
            }
            foreach (RoomInformation room in Rooms)
            {
                if (Globals.Config.RandomizeBundles)
                {
                    Globals.SpoilerWrite(room.Room.ToString());
                }
                CreateBundlesForRoom(room);
            }

            return(_randomizedBundles);
        }
        /// <summary>
        /// Writes the changed weapon info to the spoiler log
        /// </summary>
        /// <param name="modifiedWeaponDictionary">The dictionary with changed info</param>
        private static void WriteToSpoilerLog(Dictionary <int, WeaponItem> modifiedWeaponDictionary)
        {
            if (!Globals.Config.Weapons.Randomize)
            {
                return;
            }

            Globals.SpoilerWrite("==== WEAPONS ====");
            foreach (int id in modifiedWeaponDictionary.Keys)
            {
                WeaponItem weapon = modifiedWeaponDictionary[id];

                Globals.SpoilerWrite($"{id}: {weapon.OverrideName}");
                Globals.SpoilerWrite($"Type: {Enum.GetName(typeof(WeaponType), weapon.Type)}");
                Globals.SpoilerWrite($"Damage: {weapon.Damage.MinValue} - {weapon.Damage.MaxValue}");
                Globals.SpoilerWrite($"Crit Chance / Multiplier: {weapon.CritChance} / {weapon.CritMultiplier}");
                Globals.SpoilerWrite($"Knockback / Speed / AOE: {weapon.Knockback} / {weapon.Speed} / {weapon.AddedAOE}");
                Globals.SpoilerWrite($"Added Precision / Defense: {weapon.AddedPrecision} / {weapon.AddedDefense}");
                Globals.SpoilerWrite($"Base / Min Mine Level Drop: {weapon.BaseMineLevelDrop} / {weapon.MinMineLevelDrop}");
                Globals.SpoilerWrite("---");
            }
            Globals.SpoilerWrite("");
        }
Example #17
0
        /// <summary>
        /// Writes out the results for the given season and foragable location data
        /// </summary>
        /// <param name="season">The season to write the results for</param>
        /// <param name="locationData">The data to write the results for</param>
        private static void WriteResultsForSeason(Seasons season, LocationData locationData)
        {
            List <ForagableData> dataToWrite = null;

            switch (season)
            {
            case Seasons.Spring:
                dataToWrite = locationData.SpringForagables;
                break;

            case Seasons.Summer:
                dataToWrite = locationData.SummerForagables;
                break;

            case Seasons.Fall:
                dataToWrite = locationData.FallForagables;
                break;

            case Seasons.Winter:
                dataToWrite = locationData.WinterForagables;
                break;
            }

            if (dataToWrite == null)
            {
                Globals.ConsoleError($"Could not find the foragable list for {season.ToString()}");
                return;
            }

            Globals.SpoilerWrite("");
            Globals.SpoilerWrite(season.ToString());
            foreach (ForagableData foragableData in dataToWrite)
            {
                Globals.SpoilerWrite($"{foragableData.ItemId}: {ItemList.Items[foragableData.ItemId].Name} | {foragableData.ItemRarity}");
            }
        }