diff --git a/CoreSourceGenerator/FlagsSerializeGenerator.cs b/CoreSourceGenerator/FlagsSerializeGenerator.cs index 2decebcdf..55882e30d 100644 --- a/CoreSourceGenerator/FlagsSerializeGenerator.cs +++ b/CoreSourceGenerator/FlagsSerializeGenerator.cs @@ -277,6 +277,7 @@ private static string GenerateCode(ClassGenerationInfo classInfo) GenerateSerializeMethod(sb, classInfo.SerializedFields, indent); GenerateDeserializeMethod(sb, classInfo.SerializedFields, indent); + GenerateWithMethod(sb, classInfo.ClassName, classInfo.ReactiveFields, indent); // Generate helper methods for enum serialization GenerateSerializerList(sb, classInfo.SerializedFields, indent); @@ -400,6 +401,24 @@ private static void GenerateDeserializeMethod(StringBuilder sb, List fields, string indent) + { + sb.AppendLine(); + sb.AppendLine($"{indent} public {className} With({className} other)"); + sb.AppendLine($"{indent} {{"); + sb.AppendLine($"{indent} {className} result = new();"); + sb.AppendLine(); + + foreach (var field in fields) + { + sb.AppendLine($"{indent} result.{field.PropertyName} = !Equals(other.{field.PropertyName}, this.{field.PropertyName}) ? other.{field.PropertyName} : this.{field.PropertyName};"); + } + + sb.AppendLine(); + sb.AppendLine($"{indent} return result;"); + sb.AppendLine($"{indent} }}"); + } + private static void GenerateSerializerList(StringBuilder sb, List fields, string indent) { sb.AppendLine(); diff --git a/CrossPlatformUI/Presets/BeginnerPreset.cs b/CrossPlatformUI/Presets/BeginnerPreset.cs index e8e33b7c8..dd0c0a293 100644 --- a/CrossPlatformUI/Presets/BeginnerPreset.cs +++ b/CrossPlatformUI/Presets/BeginnerPreset.cs @@ -12,28 +12,14 @@ public static class BeginnerPreset //Start StartWithCandle = true, StartWithLife = true, - ShuffleStartingItems = false, - ShuffleStartingSpells = false, - MaxHeartContainers = MaxHeartsOption.EIGHT, - StartingHeartContainersMin = 4, - StartingHeartContainersMax = 4, StartingTechniques = StartingTechs.DOWNSTAB, StartingLives = StartingLives.Lives5, - IndeterminateOptionRate = IndeterminateOptionRate.HALF, //Overworld - PalacesCanSwapContinents = false, - ShuffleGP = false, - ShuffleEncounters = false, - AllowUnsafePathEncounters = false, - IncludeLavaInEncounterShuffle = false, EncounterRate = EncounterRate.HALF, - RiverDevilBlockerOption = RiverDevilBlockerOption.PATH, EastRocks = true, GenerateBaguWoods = false, LessImportantLocationsOption = LessImportantLocationsOption.REMOVE, - RestrictConnectionCaveShuffle = true, - AllowConnectionCavesToBeBlocked = false, GoodBoots = true, HidePalace = false, HideKasuto = false, @@ -47,39 +33,22 @@ public static class BeginnerPreset MazeBiome = Biome.VANILLALIKE, WestClimate = ClimateEnum.VANILLA_WEIGHTED_WEST, EastClimate = ClimateEnum.VANILLA_WEIGHTED_EAST, - DmClimate = ClimateEnum.CLASSIC, - ContinentConnectionType = ContinentConnectionType.NORMAL, //Palaces NormalPalaceStyle = PalaceStyle.VANILLA_WEIGHTED, GpStyle = PalaceStyle.TOWER, NormalPalaceLength = PalaceLengthOption.MEDIUM, GpLength = PalaceLengthOption.SHORT, - IncludeVanillaRooms = true, Includev4_0Rooms = true, Includev5_0Rooms = true, - IncludeExpertRooms = false, - TBirdRequired = true, - RemoveTBird = false, - PalacesToCompleteMin = 6, - PalacesToCompleteMax = 6, RestartAtPalacesOnGameOver = true, Global5050JarDrop = true, ReduceDripperVariance = true, ChangePalacePallettes = true, - RandomizeBossItemDrop = false, - PalaceDropStyle = PalaceDropStyle.ENTRANCE, - BossRoomsExitType = BossRoomsExitType.OVERWORLD, NoDuplicateRoomsByLayout = true, - BlockingRoomsInAnyPalace = false, - HardBosses = false, - PalaceItemRoomCount = PalaceItemRoomCount.ONE, DarkLinkMinDistance = BossRoomMinDistance.SHORT, //Levels - AttackLevelCap = 8, - MagicLevelCap = 8, - LifeLevelCap = 8, AttackEffectiveness = AttackEffectiveness.HIGH, MagicEffectiveness = MagicEffectiveness.LOW_COST, LifeEffectiveness = LifeEffectiveness.HIGH, @@ -87,16 +56,10 @@ public static class BeginnerPreset //Spells ShuffleSpellLocations = true, DisableMagicContainerRequirements = true, - RandomizeSpellSpellEnemy = false, - SwapUpAndDownStab = false, - FireOption = FireOption.NORMAL, //Enemies ShuffleOverworldEnemies = true, ShufflePalaceEnemies = true, - DripperEnemyOption = DripperEnemyOption.ONLY_BOTS, - MixLargeAndSmallEnemies = false, - GeneratorsAlwaysMatch = true, EnemyXPDrops = XPEffectiveness.RANDOM_HIGH, @@ -105,16 +68,10 @@ public static class BeginnerPreset ShuffleOverworldItems = true, MixOverworldAndPalaceItems = true, IncludePBagCavesInItemShuffle = true, - IncludeSwordTechsInShuffle = false, - IncludeQuestItemsInShuffle = false, - IncludeSpellsInShuffle = false, ShuffleSmallItems = true, - RemoveSpellItems = false, - ShufflePBagAmounts = false, PalacesContainExtraKeys = true, RandomizeNewKasutoJarRequirements = true, - AllowImportantItemDuplicates = false, //Drops ShuffleItemDropFrequency = true, diff --git a/CrossPlatformUI/Presets/FullShufflePreset.cs b/CrossPlatformUI/Presets/FullShufflePreset.cs index cccc929e6..609a63ec2 100644 --- a/CrossPlatformUI/Presets/FullShufflePreset.cs +++ b/CrossPlatformUI/Presets/FullShufflePreset.cs @@ -9,14 +9,6 @@ public static class FullShufflePreset { //Start StartWithCandle = true, - ShuffleStartingItems = false, - ShuffleStartingSpells = false, - MaxHeartContainers = MaxHeartsOption.EIGHT, - StartingHeartContainersMin = 4, - StartingHeartContainersMax = 4, - StartingTechniques = StartingTechs.NONE, - StartingLives = StartingLives.Lives3, - IndeterminateOptionRate = IndeterminateOptionRate.HALF, //Overworld PalacesCanSwapContinents = true, @@ -28,8 +20,6 @@ public static class FullShufflePreset RiverDevilBlockerOption = RiverDevilBlockerOption.RANDOM, EastRocks = true, GenerateBaguWoods = false, - LessImportantLocationsOption = LessImportantLocationsOption.HIDE, - RestrictConnectionCaveShuffle = true, AllowConnectionCavesToBeBlocked = true, GoodBoots = true, HidePalace = null, @@ -41,33 +31,24 @@ public static class FullShufflePreset MazeBiome = Biome.VANILLALIKE, WestClimate = ClimateEnum.VANILLA_WEIGHTED_WEST, EastClimate = ClimateEnum.VANILLA_WEIGHTED_EAST, - DmClimate = ClimateEnum.CLASSIC, ContinentConnectionType = ContinentConnectionType.ANYTHING_GOES, //Palaces NormalPalaceStyle = PalaceStyle.RANDOM_PER_PALACE, GpStyle = PalaceStyle.RANDOM_WALK, - NormalPalaceLength = PalaceLengthOption.FULL, GpLength = PalaceLengthOption.SHORT, - IncludeVanillaRooms = true, Includev4_0Rooms = true, Includev5_0Rooms = true, IncludeExpertRooms = true, - TBirdRequired = true, - RemoveTBird = false, - PalacesToCompleteMin = 6, - PalacesToCompleteMax = 6, RestartAtPalacesOnGameOver = true, Global5050JarDrop = true, ReduceDripperVariance = true, ChangePalacePallettes = true, RandomizeBossItemDrop = true, PalaceDropStyle = PalaceDropStyle.RANDOM, - BossRoomsExitType = BossRoomsExitType.OVERWORLD, NoDuplicateRoomsByLayout = true, BlockingRoomsInAnyPalace = true, HardBosses = true, - PalaceItemRoomCount = PalaceItemRoomCount.ONE, DarkLinkMinDistance = BossRoomMinDistance.SHORT, //Levels @@ -75,9 +56,6 @@ public static class FullShufflePreset ShuffleMagicExperience = true, ShuffleLifeExperience = true, - AttackLevelCap = 8, - MagicLevelCap = 8, - LifeLevelCap = 8, AttackEffectiveness = AttackEffectiveness.AVERAGE, MagicEffectiveness = MagicEffectiveness.AVERAGE, LifeEffectiveness = LifeEffectiveness.AVERAGE, @@ -87,7 +65,6 @@ public static class FullShufflePreset ShuffleSpellLocations = true, DisableMagicContainerRequirements = true, RandomizeSpellSpellEnemy = true, - SwapUpAndDownStab = false, FireOption = FireOption.PAIR_WITH_RANDOM, //Enemies @@ -95,7 +72,6 @@ public static class FullShufflePreset ShufflePalaceEnemies = true, DripperEnemyOption = DripperEnemyOption.ANY_GROUND_ENEMY, MixLargeAndSmallEnemies = true, - GeneratorsAlwaysMatch = true, ShuffleEnemyHP = EnemyLifeOption.MEDIUM, ShuffleBossHP = EnemyLifeOption.MEDIUM, @@ -114,11 +90,7 @@ public static class FullShufflePreset IncludeSpellsInShuffle = true, ShuffleSmallItems = true, - RemoveSpellItems = false, - ShufflePBagAmounts = false, - PalacesContainExtraKeys = false, RandomizeNewKasutoJarRequirements = true, - AllowImportantItemDuplicates = false, //Drops ShuffleItemDropFrequency = true, @@ -130,6 +102,5 @@ public static class FullShufflePreset EnableSpellItemHints = true, EnableTownNameHints = true, - RevealWalkthroughWalls = false, }; } diff --git a/CrossPlatformUI/Presets/MaxRando2025Preset.cs b/CrossPlatformUI/Presets/MaxRando2025Preset.cs index 66f701396..e9aaf7f18 100644 --- a/CrossPlatformUI/Presets/MaxRando2025Preset.cs +++ b/CrossPlatformUI/Presets/MaxRando2025Preset.cs @@ -14,7 +14,6 @@ public static class MaxRando2025Preset StartingHeartContainersMax = 8, StartingTechniques = StartingTechs.RANDOM, StartingLives = StartingLives.LivesRandom, - IndeterminateOptionRate = IndeterminateOptionRate.HALF, //Overworld PalacesCanSwapContinents = true, @@ -23,11 +22,6 @@ public static class MaxRando2025Preset AllowUnsafePathEncounters = true, IncludeLavaInEncounterShuffle = true, EncounterRate = EncounterRate.HALF, - RiverDevilBlockerOption = RiverDevilBlockerOption.PATH, - EastRocks = false, - GenerateBaguWoods = true, - LessImportantLocationsOption = LessImportantLocationsOption.HIDE, - RestrictConnectionCaveShuffle = true, AllowConnectionCavesToBeBlocked = true, GoodBoots = true, HidePalace = null, @@ -45,39 +39,25 @@ public static class MaxRando2025Preset //Palaces NormalPalaceStyle = PalaceStyle.RECONSTRUCTED, GpStyle = PalaceStyle.RECONSTRUCTED, - RandomStylesAllowVanilla = false, - NormalPalaceLength = PalaceLengthOption.FULL, GpLength = PalaceLengthOption.RANDOM, - IncludeVanillaRooms = true, Includev4_0Rooms = true, - Includev5_0Rooms = false, IncludeExpertRooms = true, TBirdRequired = false, - RemoveTBird = false, PalacesToCompleteMin = 0, - PalacesToCompleteMax = 6, RestartAtPalacesOnGameOver = true, - Global5050JarDrop = false, - ReduceDripperVariance = false, ChangePalacePallettes = true, RandomizeBossItemDrop = true, PalaceDropStyle = PalaceDropStyle.ANY_EXIT, BossRoomsExitType = BossRoomsExitType.PALACE, - NoDuplicateRoomsByLayout = false, NoDuplicateRoomsByEnemies = true, BlockingRoomsInAnyPalace = true, HardBosses = true, - PalaceItemRoomCount = PalaceItemRoomCount.ONE, - DarkLinkMinDistance = BossRoomMinDistance.NONE, //Levels ShuffleAttackExperience = true, ShuffleMagicExperience = true, ShuffleLifeExperience = true, - AttackLevelCap = 8, - MagicLevelCap = 8, - LifeLevelCap = 8, AttackEffectiveness = AttackEffectiveness.AVERAGE, MagicEffectiveness = MagicEffectiveness.AVERAGE, LifeEffectiveness = LifeEffectiveness.AVERAGE, @@ -87,7 +67,6 @@ public static class MaxRando2025Preset ShuffleSpellLocations = true, DisableMagicContainerRequirements = true, RandomizeSpellSpellEnemy = true, - SwapUpAndDownStab = false, FireOption = FireOption.RANDOM, //Enemies @@ -95,7 +74,6 @@ public static class MaxRando2025Preset ShufflePalaceEnemies = true, DripperEnemyOption = DripperEnemyOption.ANY_GROUND_ENEMY, MixLargeAndSmallEnemies = true, - GeneratorsAlwaysMatch = true, ShuffleEnemyHP = EnemyLifeOption.MEDIUM, ShuffleBossHP = EnemyLifeOption.MEDIUM, @@ -114,11 +92,8 @@ public static class MaxRando2025Preset IncludeSpellsInShuffle = true, ShuffleSmallItems = true, - RemoveSpellItems = false, ShufflePBagAmounts = true, - PalacesContainExtraKeys = false, RandomizeNewKasutoJarRequirements = true, - AllowImportantItemDuplicates = false, //Drops ShuffleItemDropFrequency = true, @@ -130,6 +105,5 @@ public static class MaxRando2025Preset EnableSpellItemHints = true, EnableTownNameHints = true, - RevealWalkthroughWalls = false, }; } diff --git a/CrossPlatformUI/Presets/MaxRandoPreset.cs b/CrossPlatformUI/Presets/MaxRandoPreset.cs index f0856f39c..fb34e7841 100644 --- a/CrossPlatformUI/Presets/MaxRandoPreset.cs +++ b/CrossPlatformUI/Presets/MaxRandoPreset.cs @@ -16,7 +16,6 @@ public static class MaxRandoPreset StartingMagicContainersMax = 8, StartingTechniques = StartingTechs.RANDOM, StartingLives = StartingLives.LivesRandom, - IndeterminateOptionRate = IndeterminateOptionRate.HALF, //Overworld PalacesCanSwapContinents = true, @@ -29,7 +28,6 @@ public static class MaxRandoPreset EastRocks = null, GenerateBaguWoods = null, LessImportantLocationsOption = LessImportantLocationsOption.RANDOM, - RestrictConnectionCaveShuffle = true, AllowConnectionCavesToBeBlocked = true, GoodBoots = true, HidePalace = null, @@ -47,17 +45,13 @@ public static class MaxRandoPreset //Palaces NormalPalaceStyle = PalaceStyle.RANDOM_PER_PALACE, GpStyle = PalaceStyle.RANDOM, - RandomStylesAllowVanilla = false, NormalPalaceLength = PalaceLengthOption.RANDOM, GpLength = PalaceLengthOption.RANDOM, - IncludeVanillaRooms = true, Includev4_0Rooms = true, Includev5_0Rooms = true, IncludeExpertRooms = true, TBirdRequired = false, - RemoveTBird = false, PalacesToCompleteMin = 0, - PalacesToCompleteMax = 6, RestartAtPalacesOnGameOver = true, Global5050JarDrop = true, ReduceDripperVariance = true, @@ -69,16 +63,12 @@ public static class MaxRandoPreset BlockingRoomsInAnyPalace = true, HardBosses = true, PalaceItemRoomCount = PalaceItemRoomCount.RANDOM_INCLUDE_ZERO, - DarkLinkMinDistance = BossRoomMinDistance.NONE, //Levels ShuffleAttackExperience = true, ShuffleMagicExperience = true, ShuffleLifeExperience = true, - AttackLevelCap = 8, - MagicLevelCap = 8, - LifeLevelCap = 8, AttackEffectiveness = AttackEffectiveness.AVERAGE, MagicEffectiveness = MagicEffectiveness.AVERAGE, LifeEffectiveness = LifeEffectiveness.AVERAGE, @@ -88,7 +78,6 @@ public static class MaxRandoPreset ShuffleSpellLocations = true, DisableMagicContainerRequirements = true, RandomizeSpellSpellEnemy = true, - SwapUpAndDownStab = false, FireOption = FireOption.RANDOM, //Enemies @@ -96,7 +85,6 @@ public static class MaxRandoPreset ShufflePalaceEnemies = true, DripperEnemyOption = DripperEnemyOption.ANY_GROUND_ENEMY, MixLargeAndSmallEnemies = true, - GeneratorsAlwaysMatch = true, ShuffleEnemyHP = EnemyLifeOption.MEDIUM, ShuffleBossHP = EnemyLifeOption.MEDIUM, @@ -115,11 +103,8 @@ public static class MaxRandoPreset IncludeSpellsInShuffle = true, ShuffleSmallItems = true, - RemoveSpellItems = false, ShufflePBagAmounts = true, - PalacesContainExtraKeys = false, RandomizeNewKasutoJarRequirements = true, - AllowImportantItemDuplicates = false, //Drops ShuffleItemDropFrequency = true, @@ -131,6 +116,5 @@ public static class MaxRandoPreset EnableSpellItemHints = true, EnableTownNameHints = true, - RevealWalkthroughWalls = false, }; } diff --git a/CrossPlatformUI/Presets/NormalPreset.cs b/CrossPlatformUI/Presets/NormalPreset.cs index 3beb3d1ba..14a59ece5 100644 --- a/CrossPlatformUI/Presets/NormalPreset.cs +++ b/CrossPlatformUI/Presets/NormalPreset.cs @@ -9,32 +9,19 @@ public static class NormalPreset { //Start StartWithCandle = true, - ShuffleStartingItems = false, - ShuffleStartingSpells = false, - MaxHeartContainers = MaxHeartsOption.EIGHT, - StartingHeartContainersMin = 4, - StartingHeartContainersMax = 4, - StartingTechniques = StartingTechs.NONE, - StartingLives = StartingLives.Lives3, - IndeterminateOptionRate = IndeterminateOptionRate.HALF, //Overworld PalacesCanSwapContinents = true, ShuffleGP = true, - ShuffleEncounters = false, - AllowUnsafePathEncounters = false, - IncludeLavaInEncounterShuffle = false, EncounterRate = EncounterRate.HALF, RiverDevilBlockerOption = RiverDevilBlockerOption.RANDOM, EastRocks = true, GenerateBaguWoods = false, LessImportantLocationsOption = LessImportantLocationsOption.REMOVE, - RestrictConnectionCaveShuffle = true, AllowConnectionCavesToBeBlocked = true, GoodBoots = true, HidePalace = null, HideKasuto = null, - ShuffleWhichLocationIsHidden = false, DmSize = DmSizeOption.MEDIUM, WestBiome = Biome.RANDOM_NO_VANILLA_OR_SHUFFLE, EastBiome = Biome.RANDOM_NO_VANILLA_OR_SHUFFLE, @@ -42,7 +29,6 @@ public static class NormalPreset DmBiome = Biome.RANDOM_NO_VANILLA_OR_SHUFFLE, WestClimate = ClimateEnum.VANILLA_WEIGHTED_WEST, EastClimate = ClimateEnum.VANILLA_WEIGHTED_EAST, - DmClimate = ClimateEnum.CLASSIC, ContinentConnectionType = ContinentConnectionType.TRANSPORTATION_SHUFFLE, //Palaces @@ -50,25 +36,16 @@ public static class NormalPreset GpStyle = PalaceStyle.RANDOM_WALK, NormalPalaceLength = PalaceLengthOption.MEDIUM, GpLength = PalaceLengthOption.SHORT, - IncludeVanillaRooms = true, Includev4_0Rooms = true, Includev5_0Rooms = true, - IncludeExpertRooms = false, - TBirdRequired = true, - RemoveTBird = false, - PalacesToCompleteMin = 6, - PalacesToCompleteMax = 6, RestartAtPalacesOnGameOver = true, Global5050JarDrop = true, ReduceDripperVariance = true, ChangePalacePallettes = true, - RandomizeBossItemDrop = false, PalaceDropStyle = PalaceDropStyle.RANDOM, - BossRoomsExitType = BossRoomsExitType.OVERWORLD, NoDuplicateRoomsByLayout = true, BlockingRoomsInAnyPalace = true, HardBosses = true, - PalaceItemRoomCount = PalaceItemRoomCount.ONE, DarkLinkMinDistance = BossRoomMinDistance.SHORT, //Levels @@ -76,27 +53,18 @@ public static class NormalPreset ShuffleMagicExperience = true, ShuffleLifeExperience = true, - AttackLevelCap = 8, - MagicLevelCap = 8, - LifeLevelCap = 8, AttackEffectiveness = AttackEffectiveness.AVERAGE, MagicEffectiveness = MagicEffectiveness.AVERAGE, LifeEffectiveness = LifeEffectiveness.AVERAGE, //Spells - ShuffleLifeRefillAmount = false, ShuffleSpellLocations = true, DisableMagicContainerRequirements = true, - RandomizeSpellSpellEnemy = false, - SwapUpAndDownStab = false, - FireOption = FireOption.NORMAL, //Enemies ShuffleOverworldEnemies = true, ShufflePalaceEnemies = true, DripperEnemyOption = DripperEnemyOption.EASIER_GROUND_ENEMIES, - MixLargeAndSmallEnemies = false, - GeneratorsAlwaysMatch = true, ShuffleEnemyHP = EnemyLifeOption.MEDIUM, ShuffleBossHP = EnemyLifeOption.MEDIUM, @@ -110,16 +78,10 @@ public static class NormalPreset ShuffleOverworldItems = true, MixOverworldAndPalaceItems = true, IncludePBagCavesInItemShuffle = true, - IncludeSwordTechsInShuffle = false, IncludeQuestItemsInShuffle = true, - IncludeSpellsInShuffle = false, ShuffleSmallItems = true, - RemoveSpellItems = false, - ShufflePBagAmounts = false, - PalacesContainExtraKeys = false, RandomizeNewKasutoJarRequirements = true, - AllowImportantItemDuplicates = false, //Drops ShuffleItemDropFrequency = true, @@ -131,6 +93,5 @@ public static class NormalPreset EnableSpellItemHints = true, EnableTownNameHints = true, - RevealWalkthroughWalls = false, }; } diff --git a/CrossPlatformUI/Presets/RandomPercentPreset.cs b/CrossPlatformUI/Presets/RandomPercentPreset.cs index ddd0f7acd..d8cbb1de6 100644 --- a/CrossPlatformUI/Presets/RandomPercentPreset.cs +++ b/CrossPlatformUI/Presets/RandomPercentPreset.cs @@ -15,14 +15,11 @@ public static class RandomPercentPreset StartingHeartContainersMax = 8, StartingTechniques = StartingTechs.RANDOM, StartingLives = StartingLives.LivesRandom, - IndeterminateOptionRate = IndeterminateOptionRate.HALF, //Overworld PalacesCanSwapContinents = null, ShuffleGP = null, ShuffleEncounters = null, - AllowUnsafePathEncounters = false, - IncludeLavaInEncounterShuffle = false, EncounterRate = EncounterRate.HALF, RiverDevilBlockerOption = RiverDevilBlockerOption.RANDOM, EastRocks = null, @@ -53,30 +50,21 @@ public static class RandomPercentPreset Includev4_0Rooms = null, Includev5_0Rooms = null, TBirdRequired = null, - RemoveTBird = false, PalacesToCompleteMin = 0, - PalacesToCompleteMax = 6, RestartAtPalacesOnGameOver = true, Global5050JarDrop = null, - ReduceDripperVariance = false, ChangePalacePallettes = true, RandomizeBossItemDrop = true, PalaceDropStyle = PalaceDropStyle.ANYTHING_GOES, BossRoomsExitType = BossRoomsExitType.RANDOM_PER_PALACE, NoDuplicateRoomsByLayout = true, BlockingRoomsInAnyPalace = true, - HardBosses = false, - PalaceItemRoomCount = PalaceItemRoomCount.ONE, - DarkLinkMinDistance = BossRoomMinDistance.NONE, //Levels ShuffleAttackExperience = true, ShuffleMagicExperience = true, ShuffleLifeExperience = true, - AttackLevelCap = 8, - MagicLevelCap = 8, - LifeLevelCap = 8, AttackEffectiveness = AttackEffectiveness.AVERAGE, MagicEffectiveness = MagicEffectiveness.AVERAGE, LifeEffectiveness = LifeEffectiveness.AVERAGE, @@ -117,7 +105,6 @@ public static class RandomPercentPreset ShufflePBagAmounts = null, PalacesContainExtraKeys = null, RandomizeNewKasutoJarRequirements = true, - AllowImportantItemDuplicates = false, //Drops ShuffleItemDropFrequency = true, @@ -129,6 +116,5 @@ public static class RandomPercentPreset EnableSpellItemHints = null, EnableTownNameHints = null, - RevealWalkthroughWalls = false, }; } diff --git a/CrossPlatformUI/Presets/Sgl2025Preset.cs b/CrossPlatformUI/Presets/Sgl2025Preset.cs index 9861d4ecf..4767a1c2d 100644 --- a/CrossPlatformUI/Presets/Sgl2025Preset.cs +++ b/CrossPlatformUI/Presets/Sgl2025Preset.cs @@ -9,40 +9,23 @@ public static class Sgl2025Preset //Start StartWithCandle = true, StartWithCross = true, - ShuffleStartingItems = false, StartWithFire = true, - ShuffleStartingSpells = false, MaxHeartContainers = MaxHeartsOption.SIX, StartingHeartContainersMin = 3, StartingHeartContainersMax = 3, - StartingTechniques = StartingTechs.NONE, - StartingLives = StartingLives.Lives3, - IndeterminateOptionRate = IndeterminateOptionRate.HALF, //Overworld PalacesCanSwapContinents = true, ShuffleGP = true, - ShuffleEncounters = false, - AllowUnsafePathEncounters = false, - IncludeLavaInEncounterShuffle = false, EncounterRate = EncounterRate.HALF, - RiverDevilBlockerOption = RiverDevilBlockerOption.PATH, - EastRocks = false, - GenerateBaguWoods = true, - LessImportantLocationsOption = LessImportantLocationsOption.HIDE, - RestrictConnectionCaveShuffle = true, AllowConnectionCavesToBeBlocked = true, GoodBoots = true, HidePalace = null, HideKasuto = null, - ShuffleWhichLocationIsHidden = false, WestBiome = Biome.RANDOM_NO_VANILLA_OR_SHUFFLE, EastBiome = Biome.RANDOM_NO_VANILLA_OR_SHUFFLE, MazeBiome = Biome.VANILLALIKE, DmBiome = Biome.RANDOM_NO_VANILLA_OR_SHUFFLE, - WestClimate = ClimateEnum.CLASSIC, - EastClimate = ClimateEnum.CLASSIC, - DmClimate = ClimateEnum.CLASSIC, ContinentConnectionType = ContinentConnectionType.TRANSPORTATION_SHUFFLE, //Palaces @@ -50,27 +33,15 @@ public static class Sgl2025Preset GpStyle = PalaceStyle.RECONSTRUCTED, NormalPalaceLength = PalaceLengthOption.SHORT, GpLength = PalaceLengthOption.MEDIUM, - IncludeVanillaRooms = true, Includev4_0Rooms = true, - Includev5_0Rooms = false, IncludeExpertRooms = true, - TBirdRequired = true, - PalacesToCompleteMin = 6, - PalacesToCompleteMax = 6, RestartAtPalacesOnGameOver = true, - Global5050JarDrop = false, - ReduceDripperVariance = false, ChangePalacePallettes = true, - RandomizeBossItemDrop = false, PalaceDropStyle = PalaceDropStyle.ANY_EXIT, - BossRoomsExitType = BossRoomsExitType.OVERWORLD, - NoDuplicateRoomsByLayout = false, NoDuplicateRoomsByEnemies = true, BlockingRoomsInAnyPalace = true, HardBosses = true, AggressiveTbird = true, - PalaceItemRoomCount = PalaceItemRoomCount.ONE, - DarkLinkMinDistance = BossRoomMinDistance.NONE, //Levels ShuffleAttackExperience = true, @@ -78,64 +49,40 @@ public static class Sgl2025Preset ShuffleLifeExperience = true, AttackLevelCap = 6, - MagicLevelCap = 8, - LifeLevelCap = 8, AttackEffectiveness = AttackEffectiveness.AVERAGE_LOW, // was AttackValues = [2, 3, 4, 6, 8, 12, 14, 16]; MagicEffectiveness = MagicEffectiveness.AVERAGE, - LifeEffectiveness = LifeEffectiveness.VANILLA, //Spells - ShuffleLifeRefillAmount = false, ShuffleSpellLocations = true, DisableMagicContainerRequirements = true, - RandomizeSpellSpellEnemy = false, SwapUpAndDownStab = true, - FireOption = FireOption.NORMAL, // +"Expensive Thunder" //Enemies ShuffleOverworldEnemies = true, ShufflePalaceEnemies = true, - DripperEnemyOption = DripperEnemyOption.ONLY_BOTS, MixLargeAndSmallEnemies = true, - GeneratorsAlwaysMatch = true, ShuffleEnemyHP = EnemyLifeOption.MEDIUM, // was 100-150% - ShuffleBossHP = EnemyLifeOption.VANILLA, ShuffleXPStealers = true, ShuffleXPStolenAmount = true, - ShuffleSwordImmunity = false, EnemyXPDrops = XPEffectiveness.SLIGHTLY_HIGH, // was +0 to +2 //Items ShufflePalaceItems = true, ShuffleOverworldItems = true, MixOverworldAndPalaceItems = true, - IncludePBagCavesInItemShuffle = false, - IncludeSwordTechsInShuffle = false, - IncludeQuestItemsInShuffle = false, - IncludeSpellsInShuffle = false, - ShuffleSmallItems = false, - RemoveSpellItems = false, - ShufflePBagAmounts = false, - PalacesContainExtraKeys = false, - RandomizeNewKasutoJarRequirements = false, - AllowImportantItemDuplicates = false, //Drops - ShuffleItemDropFrequency = false, - RandomizeDrops = false, StandardizeDrops = true, SmallEnemiesCanDropBlueJar = true, LargeEnemiesCanDropRedJar = true, LargeEnemiesCanDropLargeBag = true, //Hints - EnableHelpfulHints = false, EnableSpellItemHints = true, EnableTownNameHints = true, - RevealWalkthroughWalls = false, }; } diff --git a/CrossPlatformUI/Presets/StandardPreset.cs b/CrossPlatformUI/Presets/StandardPreset.cs index 15e80ceba..173246e82 100644 --- a/CrossPlatformUI/Presets/StandardPreset.cs +++ b/CrossPlatformUI/Presets/StandardPreset.cs @@ -8,15 +8,6 @@ public static class StandardPreset public static readonly RandomizerConfiguration Preset = new() { //Start - StartWithCandle = false, - ShuffleStartingItems = false, - ShuffleStartingSpells = false, - MaxHeartContainers = MaxHeartsOption.EIGHT, - StartingHeartContainersMin = 4, - StartingHeartContainersMax = 4, - StartingTechniques = StartingTechs.NONE, - StartingLives = StartingLives.Lives3, - IndeterminateOptionRate = IndeterminateOptionRate.HALF, //Overworld PalacesCanSwapContinents = true, @@ -28,8 +19,6 @@ public static class StandardPreset RiverDevilBlockerOption = RiverDevilBlockerOption.RANDOM, EastRocks = true, GenerateBaguWoods = false, - LessImportantLocationsOption = LessImportantLocationsOption.HIDE, - RestrictConnectionCaveShuffle = true, AllowConnectionCavesToBeBlocked = true, GoodBoots = true, HidePalace = null, @@ -39,31 +28,21 @@ public static class StandardPreset EastBiome = Biome.RANDOM_NO_VANILLA_OR_SHUFFLE, MazeBiome = Biome.VANILLALIKE, DmBiome = Biome.RANDOM_NO_VANILLA_OR_SHUFFLE, - WestClimate = ClimateEnum.CLASSIC, - EastClimate = ClimateEnum.CLASSIC, - DmClimate = ClimateEnum.CLASSIC, ContinentConnectionType = ContinentConnectionType.ANYTHING_GOES, //Palaces NormalPalaceStyle = PalaceStyle.RANDOM_WALK, GpStyle = PalaceStyle.RANDOM_WALK, - NormalPalaceLength = PalaceLengthOption.FULL, GpLength = PalaceLengthOption.SHORT, - IncludeVanillaRooms = true, Includev4_0Rooms = true, Includev5_0Rooms = true, IncludeExpertRooms = true, - TBirdRequired = true, - RemoveTBird = false, - PalacesToCompleteMin = 6, - PalacesToCompleteMax = 6, RestartAtPalacesOnGameOver = true, Global5050JarDrop = true, ReduceDripperVariance = true, ChangePalacePallettes = true, RandomizeBossItemDrop = true, PalaceDropStyle = PalaceDropStyle.ANY_EXIT, - BossRoomsExitType = BossRoomsExitType.OVERWORLD, NoDuplicateRoomsByLayout = true, BlockingRoomsInAnyPalace = true, HardBosses = true, @@ -75,9 +54,6 @@ public static class StandardPreset ShuffleMagicExperience = true, ShuffleLifeExperience = true, - AttackLevelCap = 8, - MagicLevelCap = 8, - LifeLevelCap = 8, AttackEffectiveness = AttackEffectiveness.AVERAGE, MagicEffectiveness = MagicEffectiveness.AVERAGE, LifeEffectiveness = LifeEffectiveness.AVERAGE, @@ -87,15 +63,12 @@ public static class StandardPreset ShuffleSpellLocations = true, DisableMagicContainerRequirements = true, RandomizeSpellSpellEnemy = true, - SwapUpAndDownStab = false, FireOption = FireOption.PAIR_WITH_RANDOM, //Enemies ShuffleOverworldEnemies = true, ShufflePalaceEnemies = true, - DripperEnemyOption = DripperEnemyOption.ONLY_BOTS, MixLargeAndSmallEnemies = true, - GeneratorsAlwaysMatch = true, ShuffleEnemyHP = EnemyLifeOption.MEDIUM, ShuffleBossHP = EnemyLifeOption.MEDIUM, @@ -109,16 +82,11 @@ public static class StandardPreset ShuffleOverworldItems = true, MixOverworldAndPalaceItems = true, IncludePBagCavesInItemShuffle = true, - IncludeSwordTechsInShuffle = false, IncludeQuestItemsInShuffle = true, IncludeSpellsInShuffle = true, ShuffleSmallItems = true, - RemoveSpellItems = false, - ShufflePBagAmounts = false, - PalacesContainExtraKeys = false, RandomizeNewKasutoJarRequirements = true, - AllowImportantItemDuplicates = false, //Drops ShuffleItemDropFrequency = true, @@ -130,7 +98,5 @@ public static class StandardPreset EnableSpellItemHints = true, EnableTownNameHints = true, - GenerateSpoiler = false, - RevealWalkthroughWalls = false, }; } diff --git a/CrossPlatformUI/Presets/StandardSwissPreset.cs b/CrossPlatformUI/Presets/StandardSwissPreset.cs index eaabb44d6..80ce6f184 100644 --- a/CrossPlatformUI/Presets/StandardSwissPreset.cs +++ b/CrossPlatformUI/Presets/StandardSwissPreset.cs @@ -9,27 +9,16 @@ public static class StandardSwissPreset { //Start StartWithCandle = true, - ShuffleStartingItems = false, - ShuffleStartingSpells = false, - MaxHeartContainers = MaxHeartsOption.EIGHT, - StartingHeartContainersMin = 4, - StartingHeartContainersMax = 4, - StartingTechniques = StartingTechs.NONE, - StartingLives = StartingLives.Lives3, - IndeterminateOptionRate = IndeterminateOptionRate.HALF, //Overworld PalacesCanSwapContinents = true, ShuffleGP = true, ShuffleEncounters = true, AllowUnsafePathEncounters = true, - IncludeLavaInEncounterShuffle = false, EncounterRate = EncounterRate.HALF, RiverDevilBlockerOption = RiverDevilBlockerOption.RANDOM, EastRocks = true, GenerateBaguWoods = false, - LessImportantLocationsOption = LessImportantLocationsOption.HIDE, - RestrictConnectionCaveShuffle = true, AllowConnectionCavesToBeBlocked = true, GoodBoots = true, HidePalace = null, @@ -39,31 +28,20 @@ public static class StandardSwissPreset EastBiome = Biome.RANDOM_NO_VANILLA_OR_SHUFFLE, MazeBiome = Biome.VANILLALIKE, DmBiome = Biome.RANDOM_NO_VANILLA_OR_SHUFFLE, - WestClimate = ClimateEnum.CLASSIC, - EastClimate = ClimateEnum.CLASSIC, - DmClimate = ClimateEnum.CLASSIC, ContinentConnectionType = ContinentConnectionType.ANYTHING_GOES, //Palaces NormalPalaceStyle = PalaceStyle.RANDOM_WALK, GpStyle = PalaceStyle.RANDOM_WALK, - NormalPalaceLength = PalaceLengthOption.FULL, GpLength = PalaceLengthOption.SHORT, - IncludeVanillaRooms = true, Includev4_0Rooms = true, Includev5_0Rooms = true, IncludeExpertRooms = true, - TBirdRequired = true, - RemoveTBird = false, - PalacesToCompleteMin = 6, - PalacesToCompleteMax = 6, RestartAtPalacesOnGameOver = true, Global5050JarDrop = true, ReduceDripperVariance = true, ChangePalacePallettes = true, - RandomizeBossItemDrop = false, PalaceDropStyle = PalaceDropStyle.ANY_EXIT, - BossRoomsExitType = BossRoomsExitType.OVERWORLD, NoDuplicateRoomsByLayout = true, BlockingRoomsInAnyPalace = true, HardBosses = true, @@ -75,19 +53,14 @@ public static class StandardSwissPreset ShuffleMagicExperience = true, ShuffleLifeExperience = true, - AttackLevelCap = 8, - MagicLevelCap = 8, - LifeLevelCap = 8, AttackEffectiveness = AttackEffectiveness.AVERAGE, MagicEffectiveness = MagicEffectiveness.AVERAGE, LifeEffectiveness = LifeEffectiveness.AVERAGE, //Spells - ShuffleLifeRefillAmount = false, ShuffleSpellLocations = true, DisableMagicContainerRequirements = true, RandomizeSpellSpellEnemy = true, - SwapUpAndDownStab = false, FireOption = FireOption.PAIR_WITH_RANDOM, //Enemies @@ -95,7 +68,6 @@ public static class StandardSwissPreset ShufflePalaceEnemies = true, DripperEnemyOption = DripperEnemyOption.ANY_GROUND_ENEMY, MixLargeAndSmallEnemies = true, - GeneratorsAlwaysMatch = true, ShuffleEnemyHP = EnemyLifeOption.MEDIUM, ShuffleBossHP = EnemyLifeOption.MEDIUM, @@ -109,16 +81,11 @@ public static class StandardSwissPreset ShuffleOverworldItems = true, MixOverworldAndPalaceItems = true, IncludePBagCavesInItemShuffle = true, - IncludeSwordTechsInShuffle = false, IncludeQuestItemsInShuffle = true, IncludeSpellsInShuffle = true, ShuffleSmallItems = true, - RemoveSpellItems = false, - ShufflePBagAmounts = false, - PalacesContainExtraKeys = false, RandomizeNewKasutoJarRequirements = true, - AllowImportantItemDuplicates = false, //Drops ShuffleItemDropFrequency = true, @@ -130,7 +97,6 @@ public static class StandardSwissPreset EnableSpellItemHints = true, EnableTownNameHints = true, - GenerateSpoiler = false, RevealWalkthroughWalls = true, }; } diff --git a/CrossPlatformUI/Presets/UpstartsTournamentPreset.cs b/CrossPlatformUI/Presets/UpstartsTournamentPreset.cs index bdce7068f..2b93d0eb1 100644 --- a/CrossPlatformUI/Presets/UpstartsTournamentPreset.cs +++ b/CrossPlatformUI/Presets/UpstartsTournamentPreset.cs @@ -9,14 +9,6 @@ public static class UpstartsTournamentPreset { //Start StartWithCandle = true, - ShuffleStartingItems = false, - ShuffleStartingSpells = false, - MaxHeartContainers = MaxHeartsOption.EIGHT, - StartingHeartContainersMin = 4, - StartingHeartContainersMax = 4, - StartingTechniques = StartingTechs.NONE, - StartingLives = StartingLives.Lives3, - IndeterminateOptionRate = IndeterminateOptionRate.HALF, //Overworld PalacesCanSwapContinents = true, @@ -25,10 +17,6 @@ public static class UpstartsTournamentPreset AllowUnsafePathEncounters = true, IncludeLavaInEncounterShuffle = true, EncounterRate = EncounterRate.HALF, - EastRocks = false, - GenerateBaguWoods = true, - LessImportantLocationsOption = LessImportantLocationsOption.HIDE, - RestrictConnectionCaveShuffle = true, AllowConnectionCavesToBeBlocked = true, GoodBoots = true, HidePalace = null, @@ -39,39 +27,24 @@ public static class UpstartsTournamentPreset EastBiome = Biome.RANDOM_NO_VANILLA_OR_SHUFFLE, MazeBiome = Biome.VANILLALIKE, DmBiome = Biome.RANDOM_NO_VANILLA_OR_SHUFFLE, - WestClimate = ClimateEnum.CLASSIC, - EastClimate = ClimateEnum.CLASSIC, - DmClimate = ClimateEnum.CLASSIC, //Palaces NormalPalaceStyle = PalaceStyle.RECONSTRUCTED, GpStyle = PalaceStyle.RECONSTRUCTED, - NormalPalaceLength = PalaceLengthOption.FULL, GpLength = PalaceLengthOption.SHORT, - IncludeVanillaRooms = true, Includev4_0Rooms = true, - Includev5_0Rooms = false, IncludeExpertRooms = true, - TBirdRequired = true, - PalacesToCompleteMin = 6, - PalacesToCompleteMax = 6, RestartAtPalacesOnGameOver = true, ChangePalacePallettes = true, PalaceDropStyle = PalaceDropStyle.ANY_EXIT, - BossRoomsExitType = BossRoomsExitType.OVERWORLD, - NoDuplicateRoomsByLayout = false, NoDuplicateRoomsByEnemies = true, BlockingRoomsInAnyPalace = true, HardBosses = true, - PalaceItemRoomCount = PalaceItemRoomCount.ONE, //Levels ShuffleAttackExperience = true, ShuffleMagicExperience = true, ShuffleLifeExperience = true, - AttackLevelCap = 8, - MagicLevelCap = 8, - LifeLevelCap = 8, AttackEffectiveness = AttackEffectiveness.AVERAGE, MagicEffectiveness = MagicEffectiveness.AVERAGE, LifeEffectiveness = LifeEffectiveness.AVERAGE, @@ -80,8 +53,6 @@ public static class UpstartsTournamentPreset ShuffleLifeRefillAmount = true, ShuffleSpellLocations = true, DisableMagicContainerRequirements = true, - RandomizeSpellSpellEnemy = false, - SwapUpAndDownStab = false, FireOption = FireOption.PAIR_WITH_RANDOM, //Enemies @@ -89,7 +60,6 @@ public static class UpstartsTournamentPreset ShufflePalaceEnemies = true, DripperEnemyOption = DripperEnemyOption.ANY_GROUND_ENEMY, MixLargeAndSmallEnemies = true, - GeneratorsAlwaysMatch = true, ShuffleEnemyHP = EnemyLifeOption.MEDIUM, ShuffleBossHP = EnemyLifeOption.MEDIUM, @@ -103,16 +73,10 @@ public static class UpstartsTournamentPreset ShuffleOverworldItems = true, MixOverworldAndPalaceItems = true, IncludePBagCavesInItemShuffle = true, - IncludeSwordTechsInShuffle = false, - IncludeQuestItemsInShuffle = false, - IncludeSpellsInShuffle = false, ShuffleSmallItems = true, - RemoveSpellItems = false, ShufflePBagAmounts = true, - PalacesContainExtraKeys = false, RandomizeNewKasutoJarRequirements = true, - AllowImportantItemDuplicates = false, //Drops ShuffleItemDropFrequency = true, @@ -124,6 +88,5 @@ public static class UpstartsTournamentPreset EnableSpellItemHints = true, EnableTownNameHints = true, - RevealWalkthroughWalls = false, }; } diff --git a/CrossPlatformUI/Presets/VanillaPreset.cs b/CrossPlatformUI/Presets/VanillaPreset.cs new file mode 100644 index 000000000..9755612b0 --- /dev/null +++ b/CrossPlatformUI/Presets/VanillaPreset.cs @@ -0,0 +1,11 @@ +using Z2Randomizer.RandomizerCore; + +namespace CrossPlatformUI.Presets; + +/// +/// Uses all the default values, which should always be vanilla. +/// +public static class VanillaPreset +{ + public static readonly RandomizerConfiguration Preset = new(); +} diff --git a/CrossPlatformUI/Views/RandomizerView.axaml b/CrossPlatformUI/Views/RandomizerView.axaml index 43dc2d822..e92492c3b 100644 --- a/CrossPlatformUI/Views/RandomizerView.axaml +++ b/CrossPlatformUI/Views/RandomizerView.axaml @@ -41,6 +41,8 @@ CommandParameter="{Binding Source={x:Static presets:MaxRandoPreset.Preset}}"/> + palacesCanSwapContinents != false; [Reactive] - private EncounterRate encounterRate; + private EncounterRate encounterRate = EncounterRate.NORMAL; [Reactive] [ConditionallyIncludeInFlags] - private bool? shuffleEncounters; + private bool? shuffleEncounters = false; public bool shuffleEncountersIncluded() => encounterRate != EncounterRate.NONE; [Reactive] [ConditionallyIncludeInFlags] - private bool allowUnsafePathEncounters; + private bool allowUnsafePathEncounters = false; public bool allowUnsafePathEncountersIncluded() => shuffleEncountersIncluded() && shuffleEncounters != false; [Reactive] [ConditionallyIncludeInFlags] - private bool includeLavaInEncounterShuffle; + private bool includeLavaInEncounterShuffle = false; public bool includeLavaInEncounterShuffleIncluded() => shuffleEncountersIncluded() && shuffleEncounters != false; [Reactive] - private bool? hidePalace; + private bool? hidePalace = true; [Reactive] - private bool? hideKasuto; + private bool? hideKasuto = true; [Reactive] [ConditionallyIncludeInFlags] - private bool? shuffleWhichLocationIsHidden; + private bool? shuffleWhichLocationIsHidden = false; public bool shuffleWhichLocationIsHiddenIncluded() => hidePalace != false || hideKasuto != false; [Reactive] - private LessImportantLocationsOption lessImportantLocationsOption; + private LessImportantLocationsOption lessImportantLocationsOption = LessImportantLocationsOption.HIDE; [Reactive] - private bool? restrictConnectionCaveShuffle; + private bool? restrictConnectionCaveShuffle = true; [Reactive] - private bool allowConnectionCavesToBeBlocked; + private bool allowConnectionCavesToBeBlocked = false; [Reactive] - private bool? goodBoots; + private bool? goodBoots = false; [Reactive] - private bool? generateBaguWoods; + private bool? generateBaguWoods = true; [Reactive] - private ContinentConnectionType continentConnectionType; + private ContinentConnectionType continentConnectionType = ContinentConnectionType.NORMAL; [Reactive] - private OverworldSizeOption westSize; + private OverworldSizeOption westSize = OverworldSizeOption.LARGE; [Reactive] - private OverworldSizeOption eastSize; + private OverworldSizeOption eastSize = OverworldSizeOption.LARGE; [Reactive] - private DmSizeOption dmSize; + private DmSizeOption dmSize = DmSizeOption.LARGE; [Reactive] - private MazeSizeOption mazeSize; + private MazeSizeOption mazeSize = MazeSizeOption.LARGE; [Reactive] - private Biome westBiome; + private Biome westBiome = Biome.VANILLA; [Reactive] - private Biome eastBiome; + private Biome eastBiome = Biome.VANILLA; [Reactive] - private Biome dmBiome; + private Biome dmBiome = Biome.VANILLA; [Reactive] - private Biome mazeBiome; + private Biome mazeBiome = Biome.VANILLA; [Reactive] - private ClimateEnum westClimate; + private ClimateEnum westClimate = ClimateEnum.CLASSIC; [Reactive] - private ClimateEnum eastClimate; + private ClimateEnum eastClimate = ClimateEnum.CLASSIC; [Reactive] - private ClimateEnum dmClimate; + private ClimateEnum dmClimate = ClimateEnum.CLASSIC; [Reactive] [ConditionallyIncludeInFlags] - private bool legacyVanillaShuffledLocations; + private bool legacyVanillaShuffledLocations = false; public bool legacyVanillaShuffledLocationsIncluded() { foreach (var biome in (List)[westBiome, eastBiome, dmBiome, mazeBiome]) { @@ -299,10 +301,10 @@ public bool legacyVanillaShuffledLocationsIncluded() { //Palaces [Reactive] - private PalaceStyle normalPalaceStyle; + private PalaceStyle normalPalaceStyle = PalaceStyle.VANILLA; [Reactive] - private PalaceStyle gpStyle; + private PalaceStyle gpStyle = PalaceStyle.VANILLA; private bool palaceStylesAreNotAllVanilla() { @@ -349,390 +351,390 @@ private bool palaceStylesAnyMetastyleSelected() [Reactive] [ConditionallyIncludeInFlags] - private bool randomStylesAllowVanilla; + private bool randomStylesAllowVanilla = false; public bool randomStylesAllowVanillaIncluded() => palaceStylesAnyMetastyleSelected(); [Reactive] - private bool? includeVanillaRooms; + private bool? includeVanillaRooms = true; [Reactive] [ConditionallyIncludeInFlags] - private bool? includev4_0Rooms; + private bool? includev4_0Rooms = false; public bool includev4_0RoomsIncluded() => palaceStylesAreNotAllVanillaOrShuffled(); [Reactive] [ConditionallyIncludeInFlags] - private bool? includev5_0Rooms; + private bool? includev5_0Rooms = false; public bool includev5_0RoomsIncluded() => palaceStylesAreNotAllVanillaOrShuffled(); [Reactive] [ConditionallyIncludeInFlags] - private bool blockingRoomsInAnyPalace; + private bool blockingRoomsInAnyPalace = false; public bool blockingRoomsInAnyPalaceIncluded() => palaceStylesAreNotAllVanillaOrShuffled(); [Reactive] - private PalaceDropStyle palaceDropStyle; + private PalaceDropStyle palaceDropStyle = PalaceDropStyle.ENTRANCE; public bool palaceDropStyleIncluded() => palaceStylesAreNotAllVanillaOrShuffled(); [Reactive] [ConditionallyIncludeInFlags] - private bool removeLongDeadEnds; + private bool removeLongDeadEnds = false; public bool removeLongDeadEndsIncluded() => includev5_0RoomsIncluded() && includev5_0Rooms is not false; [Reactive] [ConditionallyIncludeInFlags] - private bool includeExpertRooms; + private bool includeExpertRooms = false; public bool includeExpertRoomsIncluded() => palaceStylesAreNotAllVanilla(); [Reactive] [ConditionallyIncludeInFlags] - private BossRoomsExitType bossRoomsExitType; + private BossRoomsExitType bossRoomsExitType = BossRoomsExitType.OVERWORLD; public bool bossRoomsExitTypeIncluded() => palaceStylesAreNotAllVanillaOrShuffled(); [Reactive] [ConditionallyIncludeInFlags] - private bool? tBirdRequired; + private bool? tBirdRequired = true; public bool tBirdRequiredIncluded() => palaceStylesAreNotAllVanilla(); [Reactive] [ConditionallyIncludeInFlags] - private bool removeTBird; + private bool removeTBird = false; public bool removeTBirdIncluded() => tBirdRequiredIncluded() && tBirdRequired != true; [Reactive] - private bool restartAtPalacesOnGameOver; + private bool restartAtPalacesOnGameOver = false; [Reactive] private bool? global5050JarDrop = false; [Reactive] - private bool reduceDripperVariance; + private bool reduceDripperVariance = false; [Reactive] - private bool changePalacePallettes; + private bool changePalacePallettes = false; [Reactive] - private bool randomizeBossItemDrop; + private bool randomizeBossItemDrop = false; [Reactive] [ConditionallyIncludeInFlags] - private BossRoomMinDistance darkLinkMinDistance; + private BossRoomMinDistance darkLinkMinDistance = BossRoomMinDistance.NONE; public bool darkLinkMinDistanceIncluded() => palaceStylesAreNotAllVanilla(); [Reactive] - private PalaceItemRoomCount palaceItemRoomCount; + private PalaceItemRoomCount palaceItemRoomCount = PalaceItemRoomCount.ONE; [Reactive] [Minimum(0)] [Maximum(6)] - private int palacesToCompleteMin; + private int palacesToCompleteMin = 6; [Reactive] [Minimum(0)] [Maximum(6)] [ConditionallyIncludeInFlags] [DefaultValue(6)] - private int palacesToCompleteMax; + private int palacesToCompleteMax = 6; public bool palacesToCompleteMaxIncluded() => palacesToCompleteMin != 6; [Reactive] [ConditionallyIncludeInFlags] - private bool noDuplicateRoomsByLayout; + private bool noDuplicateRoomsByLayout = false; public bool noDuplicateRoomsByLayoutIncluded() => palaceStylesAreNotAllVanillaOrShuffled(); [Reactive] [ConditionallyIncludeInFlags] - private bool noDuplicateRoomsByEnemies; + private bool noDuplicateRoomsByEnemies = false; public bool noDuplicateRoomsByEnemiesIncluded() => palaceStylesAreNotAllVanillaOrShuffled(); [Reactive] - private bool hardBosses; + private bool hardBosses = false; [Reactive] - private bool aggressiveTbird; + private bool aggressiveTbird = false; //Levels [Reactive] - private bool shuffleAttackExperience; + private bool shuffleAttackExperience = false; [Reactive] - private bool shuffleMagicExperience; + private bool shuffleMagicExperience = false; [Reactive] - private bool shuffleLifeExperience; + private bool shuffleLifeExperience = false; [Reactive] [DifficultyOnly] [Minimum(1)] [Maximum(8)] - private int attackLevelCap; + private int attackLevelCap = 8; [Reactive] [DifficultyOnly] [Minimum(1)] [Maximum(8)] - private int magicLevelCap; + private int magicLevelCap = 8; [Reactive] [DifficultyOnly] [Minimum(1)] [Maximum(8)] - private int lifeLevelCap; + private int lifeLevelCap = 8; [Reactive] [DifficultyOnly] [ConditionallyIncludeInFlags] - private bool scaleLevelRequirementsToCap; + private bool scaleLevelRequirementsToCap = false; public bool scaleLevelRequirementsToCapIncluded() => attackLevelCap < 8 || magicLevelCap < 8 || lifeLevelCap < 8; [Reactive] [DifficultyOnly] - private AttackEffectiveness attackEffectiveness; + private AttackEffectiveness attackEffectiveness = AttackEffectiveness.VANILLA; [Reactive] - private MagicEffectiveness magicEffectiveness; + private MagicEffectiveness magicEffectiveness = MagicEffectiveness.VANILLA; [Reactive] [DifficultyOnly] - private LifeEffectiveness lifeEffectiveness; + private LifeEffectiveness lifeEffectiveness = LifeEffectiveness.VANILLA; //Spells [Reactive] - private bool shuffleLifeRefillAmount; + private bool shuffleLifeRefillAmount = false; [Reactive] - private bool? shuffleSpellLocations; + private bool? shuffleSpellLocations = false; [Reactive] - private bool? disableMagicContainerRequirements; + private bool? disableMagicContainerRequirements = false; [Reactive] - private bool? randomizeSpellSpellEnemy; + private bool? randomizeSpellSpellEnemy = false; [Reactive] - private bool? swapUpAndDownStab; + private bool? swapUpAndDownStab = false; [Reactive] - private FireOption fireOption; + private FireOption fireOption = FireOption.NORMAL; //Enemies [Reactive] - private bool? shuffleOverworldEnemies; + private bool? shuffleOverworldEnemies = false; [Reactive] - private bool? shufflePalaceEnemies; + private bool? shufflePalaceEnemies = false; private bool anyEnemiesAreShuffled() => shuffleOverworldEnemies != false || shufflePalaceEnemies != false; [Reactive] [ConditionallyIncludeInFlags] - private DripperEnemyOption dripperEnemyOption; + private DripperEnemyOption dripperEnemyOption = DripperEnemyOption.ONLY_BOTS; public bool dripperEnemyOptionIncluded() => anyEnemiesAreShuffled(); [Reactive] [ConditionallyIncludeInFlags] - private bool? mixLargeAndSmallEnemies; + private bool? mixLargeAndSmallEnemies = false; public bool mixLargeAndSmallEnemiesIncluded() => anyEnemiesAreShuffled(); [Reactive] [ConditionallyIncludeInFlags] - private bool generatorsAlwaysMatch; + private bool generatorsAlwaysMatch = true; public bool generatorsAlwaysMatchIncluded() => anyEnemiesAreShuffled(); [Reactive] [DifficultyOnly] - private EnemyLifeOption shuffleEnemyHP; + private EnemyLifeOption shuffleEnemyHP = EnemyLifeOption.VANILLA; [Reactive] [DifficultyOnly] - private EnemyLifeOption shuffleBossHP; + private EnemyLifeOption shuffleBossHP = EnemyLifeOption.VANILLA; [Reactive] - private bool shuffleXPStealers; + private bool shuffleXPStealers = false; [Reactive] - private bool shuffleXPStolenAmount; + private bool shuffleXPStolenAmount = false; [Reactive] - private bool shuffleSwordImmunity; + private bool shuffleSwordImmunity = false; [Reactive] [DifficultyOnly] - private XPEffectiveness enemyXPDrops; + private XPEffectiveness enemyXPDrops = XPEffectiveness.VANILLA; //Items [Reactive] - private bool? shufflePalaceItems; + private bool? shufflePalaceItems = false; [Reactive] - private bool? shuffleOverworldItems; + private bool? shuffleOverworldItems = false; [Reactive] [ConditionallyIncludeInFlags] - private bool? mixOverworldAndPalaceItems; + private bool? mixOverworldAndPalaceItems = false; public bool mixOverworldAndPalaceItemsIncluded() => shufflePalaceItems != false && shuffleOverworldItems != false; [Reactive] [ConditionallyIncludeInFlags] - private bool? includePBagCavesInItemShuffle; + private bool? includePBagCavesInItemShuffle = false; public bool includePBagCavesInItemShuffleIncluded() => shuffleOverworldItems != false; [Reactive] - private bool shuffleSmallItems; + private bool shuffleSmallItems = false; [Reactive] - private bool? palacesContainExtraKeys; + private bool? palacesContainExtraKeys = false; [Reactive] - private bool randomizeNewKasutoJarRequirements; + private bool randomizeNewKasutoJarRequirements = false; [Reactive] - private bool allowImportantItemDuplicates; + private bool allowImportantItemDuplicates = false; [Reactive] - private bool? removeSpellItems; + private bool? removeSpellItems = false; [Reactive] - private bool? shufflePBagAmounts; + private bool? shufflePBagAmounts = false; [Reactive] - private bool? includeSpellsInShuffle; + private bool? includeSpellsInShuffle = false; [Reactive] - private bool? includeSwordTechsInShuffle; + private bool? includeSwordTechsInShuffle = false; [Reactive] - private bool? includeQuestItemsInShuffle; + private bool? includeQuestItemsInShuffle = false; //Drops [Reactive] - private bool shuffleItemDropFrequency; + private bool shuffleItemDropFrequency = false; [Reactive] - private bool randomizeDrops; + private bool randomizeDrops = false; [Reactive] - private bool standardizeDrops; + private bool standardizeDrops = false; [Reactive] - private bool smallEnemiesCanDropBlueJar; + private bool smallEnemiesCanDropBlueJar = false; [Reactive] - private bool smallEnemiesCanDropRedJar; + private bool smallEnemiesCanDropRedJar = false; [Reactive] - private bool smallEnemiesCanDropSmallBag; + private bool smallEnemiesCanDropSmallBag = false; [Reactive] - private bool smallEnemiesCanDropMediumBag; + private bool smallEnemiesCanDropMediumBag = false; [Reactive] - private bool smallEnemiesCanDropLargeBag; + private bool smallEnemiesCanDropLargeBag = false; [Reactive] - private bool smallEnemiesCanDropXLBag; + private bool smallEnemiesCanDropXLBag = false; [Reactive] - private bool smallEnemiesCanDrop1up; + private bool smallEnemiesCanDrop1up = false; [Reactive] - private bool smallEnemiesCanDropKey; + private bool smallEnemiesCanDropKey = false; [Reactive] - private bool largeEnemiesCanDropBlueJar; + private bool largeEnemiesCanDropBlueJar = false; [Reactive] - private bool largeEnemiesCanDropRedJar; + private bool largeEnemiesCanDropRedJar = false; [Reactive] - private bool largeEnemiesCanDropSmallBag; + private bool largeEnemiesCanDropSmallBag = false; [Reactive] - private bool largeEnemiesCanDropMediumBag; + private bool largeEnemiesCanDropMediumBag = false; [Reactive] - private bool largeEnemiesCanDropLargeBag; + private bool largeEnemiesCanDropLargeBag = false; [Reactive] - private bool largeEnemiesCanDropXLBag; + private bool largeEnemiesCanDropXLBag = false; [Reactive] - private bool largeEnemiesCanDrop1up; + private bool largeEnemiesCanDrop1up = false; [Reactive] - private bool largeEnemiesCanDropKey; + private bool largeEnemiesCanDropKey = false; //Misc [Reactive] - private bool? enableHelpfulHints; + private bool? enableHelpfulHints = false; [Reactive] - private bool? enableSpellItemHints; + private bool? enableSpellItemHints = false; [Reactive] - private bool? enableTownNameHints; + private bool? enableTownNameHints = false; [Reactive] - private bool jumpAlwaysOn; + private bool jumpAlwaysOn = false; [Reactive] - private bool dashAlwaysOn; + private bool dashAlwaysOn = false; [Reactive] - private bool permanentBeamSword; + private bool permanentBeamSword = false; //Custom [Reactive] [IgnoreInFlags] - private bool useCommunityText; + private bool useCommunityText = false; [Reactive] [IgnoreInFlags] - private BeepFrequency beepFrequency; + private BeepFrequency beepFrequency = BeepFrequency.Normal; [Reactive] [IgnoreInFlags] - private BeepThreshold beepThreshold; + private BeepThreshold beepThreshold = BeepThreshold.Normal; [Reactive] [IgnoreInFlags] - private bool disableMusic; + private bool disableMusic = false; [Reactive] [IgnoreInFlags] - private bool randomizeMusic; + private bool randomizeMusic = false; [Reactive] [IgnoreInFlags] - private bool mixCustomAndOriginalMusic; + private bool mixCustomAndOriginalMusic = false; [Reactive] [IgnoreInFlags] - private bool includeDiverseMusic; + private bool includeDiverseMusic = false; [Reactive] [IgnoreInFlags] - private bool disableUnsafeMusic; + private bool disableUnsafeMusic = false; [Reactive] [IgnoreInFlags] - private bool fastSpellCasting; + private bool fastSpellCasting = false; [Reactive] [IgnoreInFlags] - private bool upAOnController1; + private bool upAOnController1 = false; [Reactive] [IgnoreInFlags] - private bool removeFlashing; + private bool removeFlashing = false; [Reactive] [IgnoreInFlags] - private CharacterSprite sprite; + private CharacterSprite sprite = CharacterSprite.LINK; [Reactive] [IgnoreInFlags] - private string spriteName; + private string spriteName = CharacterSprite.LINK.DisplayName; [Reactive] [IgnoreInFlags] @@ -741,64 +743,64 @@ private bool palaceStylesAnyMetastyleSelected() [Reactive] [IgnoreInFlags] - private bool changeItemSprites; + private bool changeItemSprites = false; [Reactive] [IgnoreInFlags] - private NesColor tunic; + private NesColor tunic = NesColor.Default; [Reactive] [IgnoreInFlags] - private NesColor skinTone; + private NesColor skinTone = NesColor.Default; [Reactive] [IgnoreInFlags] - private NesColor tunicOutline; + private NesColor tunicOutline = NesColor.Default; [Reactive] [IgnoreInFlags] - private NesColor shieldTunic; + private NesColor shieldTunic = NesColor.Default; [Reactive] [IgnoreInFlags] - private bool shuffleSpritePalettes; + private bool shuffleSpritePalettes = false; [Reactive] [IgnoreInFlags] - private BeamSprites beamSprite; + private BeamSprites beamSprite = BeamSprites.DEFAULT; [Reactive] [IgnoreInFlags] - private bool useCustomRooms; + private bool useCustomRooms = false; [Reactive] [IgnoreInFlags] - private bool disableHUDLag; + private bool disableHUDLag = false; [Reactive] - private bool randomizeKnockback; + private bool randomizeKnockback = false; [Reactive] - private PalaceLengthOption gpLength; + private PalaceLengthOption gpLength = PalaceLengthOption.FULL; [Reactive] - private PalaceLengthOption normalPalaceLength; + private PalaceLengthOption normalPalaceLength = PalaceLengthOption.FULL; [Reactive] - private RiverDevilBlockerOption riverDevilBlockerOption; + private RiverDevilBlockerOption riverDevilBlockerOption = RiverDevilBlockerOption.PATH; [Reactive] - private bool? eastRocks; + private bool? eastRocks = false; [Reactive] - private bool generateSpoiler; + private bool generateSpoiler = false; [Reactive] - private bool revealWalkthroughWalls; + private bool revealWalkthroughWalls = false; [Reactive] - private bool shareSeedAcrossDifficulty; + private bool shareSeedAcrossDifficulty = false; //Meta [Reactive] @@ -821,49 +823,6 @@ public string SerializeSharedSeedFlags() return SerializeSharedSeed(); } - public RandomizerConfiguration() - { - startingAttackLevel = 1; - startingMagicLevel = 1; - startingLifeLevel = 1; - - maxHeartContainers = MaxHeartsOption.EIGHT; - startingHeartContainersMin = 4; - startingHeartContainersMax = 4; - startingMagicContainersMin = 4; - startingMagicContainersMax = 4; - - attackLevelCap = 8; - magicLevelCap = 8; - lifeLevelCap = 8; - - disableMusic = false; - randomizeMusic = false; - mixCustomAndOriginalMusic = true; - disableUnsafeMusic = true; - fastSpellCasting = false; - shuffleSpritePalettes = false; - permanentBeamSword = false; - upAOnController1 = false; - removeFlashing = true; - sprite = CharacterSprite.LINK; - spriteName = CharacterSprite.LINK.DisplayName!; - westClimate = ClimateEnum.CLASSIC; - eastClimate = ClimateEnum.CLASSIC; - dmClimate = ClimateEnum.CLASSIC; - if (sprite == null) - { - throw new ImpossibleException(); - } - tunic = NesColor.Default; - skinTone = NesColor.Default; - tunicOutline = NesColor.Default; - shieldTunic = NesColor.Default; - beamSprite = BeamSprites.DEFAULT; - useCustomRooms = false; - disableHUDLag = false; - } - public RandomizerConfiguration(string flagstring) : this() { Deserialize(flagstring);