Compare commits
7
Commits
e7f101ddee
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6adc007313 | ||
|
|
54f160e8d0 | ||
|
|
5965fd51c7 | ||
|
|
2eb946a042 | ||
|
|
81110a2852 | ||
|
|
3b0f2de5b2 | ||
|
|
e173ae8056 |
@@ -48,7 +48,7 @@
|
||||
|
||||
public RandomizableWeights<DungeonItemLocations> Compasses { get; set; } = new();
|
||||
|
||||
public RandomizableWeights<ShowLoot> ShowLoot { get; set; } = new();
|
||||
public RandomizableWeights<ShowLootMap> ShowLootMap { get; set; } = new();
|
||||
|
||||
public RandomizableWeights<ShowLootHud> ShowLootHud { get; set; } = new();
|
||||
|
||||
|
||||
@@ -7,9 +7,12 @@
|
||||
[NoSettingName]
|
||||
public RandomizerInstance Randomizer { get; set; } = RandomizerInstance.Base;
|
||||
|
||||
[NoSettingName]
|
||||
[IgnoreSetting]
|
||||
public string PlayerName { get; set; } = string.Empty;
|
||||
|
||||
[IgnoreSetting]
|
||||
public int PlayerSlot { get; set; } = 1;
|
||||
|
||||
[NoSettingName]
|
||||
public RaceMode Race { get; set; } = RaceMode.Normal;
|
||||
|
||||
@@ -48,6 +51,10 @@
|
||||
[IgnoreSetting(Apr2025)]
|
||||
public GanonItem GanonItem { get; set; } = GanonItem.Silver;
|
||||
|
||||
[NoSettingName]
|
||||
[IgnoreSetting(Apr2025)]
|
||||
public RequireGanonItem RequireGanonItem { get; set; } = RequireGanonItem.SilverlessAllowed;
|
||||
|
||||
[SettingName("shuffle")]
|
||||
[ForbiddenSetting([Apr2025], EntranceShuffle.Swapped)]
|
||||
public EntranceShuffle EntranceShuffle { get; set; } = EntranceShuffle.Vanilla;
|
||||
@@ -99,10 +106,10 @@
|
||||
|
||||
[SettingName("showloot")]
|
||||
[IgnoreSetting(Apr2025)]
|
||||
public ShowLoot ShowLoot { get; set; } = ShowLoot.Never;
|
||||
public ShowLootMap ShowLootMap { get; set; } = ShowLootMap.Never;
|
||||
|
||||
[SettingName("loothud")]
|
||||
[IgnoreSetting(Apr2025, Base)]
|
||||
[IgnoreSetting(Apr2025)]
|
||||
public ShowLootHud ShowLootHud { get; set; } = ShowLootHud.Never;
|
||||
|
||||
[SettingName("showmap")]
|
||||
@@ -165,7 +172,7 @@
|
||||
public TrapDoorMode TrapDoorMode { get; set; } = TrapDoorMode.Some;
|
||||
|
||||
[SettingName("extra_keys")]
|
||||
[IgnoreSetting(Apr2025, Base)]
|
||||
[IgnoreSetting(Apr2025)]
|
||||
public ExtraKeysMode ExtraKeys { get; set; } = ExtraKeysMode.None;
|
||||
|
||||
[NoSettingName]
|
||||
@@ -324,6 +331,11 @@
|
||||
None,
|
||||
}
|
||||
|
||||
public enum RequireGanonItem {
|
||||
SilverlessAllowed,
|
||||
[AdditionalSetting("--require_ganon_item")] SpecialItemRequired,
|
||||
}
|
||||
|
||||
public enum EntranceShuffle {
|
||||
Vanilla,
|
||||
Full,
|
||||
@@ -418,7 +430,7 @@
|
||||
Wild,
|
||||
}
|
||||
|
||||
public enum ShowLoot {
|
||||
public enum ShowLootMap {
|
||||
Never,
|
||||
Presence,
|
||||
Compass,
|
||||
@@ -430,6 +442,7 @@
|
||||
Presence,
|
||||
Value,
|
||||
[SettingName("dungeon_value")] DungeonValue,
|
||||
[SettingName("cave_value")] CaveValue,
|
||||
}
|
||||
|
||||
public enum ShowMap {
|
||||
@@ -468,6 +481,7 @@
|
||||
public enum BombSettings {
|
||||
Normal,
|
||||
[AdditionalSetting("--bombbag")] BombBagRequired,
|
||||
[AddStartingItems("Bombs_(10)")] Starting,
|
||||
}
|
||||
|
||||
public enum BookSettings {
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
public const int MULTI_TRIES = 100;
|
||||
public const int SINGLE_TRIES = 5;
|
||||
|
||||
private static readonly Random random = new();
|
||||
|
||||
public BaseRandomizer(
|
||||
AzureStorage azureStorage,
|
||||
CommonSettingsProcessor settingsProcessor,
|
||||
@@ -64,10 +66,20 @@
|
||||
args.Add("--shuffletavern");
|
||||
}
|
||||
|
||||
if (settings.Randomizer == RandomizerInstance.Beta) {
|
||||
if (random.NextDouble() < 0.25) {
|
||||
args.Add("--orange_potion");
|
||||
}
|
||||
}
|
||||
|
||||
if (settings.DoorShuffle == DoorShuffle.Vanilla) {
|
||||
settings.DoorTypeMode = DoorTypeMode.Original;
|
||||
}
|
||||
|
||||
if (settings.GanonItem == GanonItem.None) {
|
||||
settings.RequireGanonItem = RequireGanonItem.SilverlessAllowed;
|
||||
}
|
||||
|
||||
foreach (var arg in SettingsProcessor.GetSettings(settings.Randomizer, settings)) {
|
||||
args.Add(arg);
|
||||
}
|
||||
@@ -149,6 +161,10 @@
|
||||
public async Task RandomizeMultiworld(string id, IList<SeedSettings> settings, bool uploadSettings = true) {
|
||||
var generatorSettings = this.SettingsProcessor.GetGeneratorSettings(settings[0].Randomizer);
|
||||
|
||||
for (var i = 0; i < settings.Count; i++) {
|
||||
settings[i].PlayerSlot = i + 1;
|
||||
}
|
||||
|
||||
Logger.LogDebug("Recieved request for id {id} to randomize multiworld settings {@settings}", id, settings);
|
||||
|
||||
var names = settings.Select(s => s.PlayerName.Replace(' ', '_')).ToList();
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
}
|
||||
|
||||
internal class IgnoreSettingAttribute : RandomizerSpecificAttribute {
|
||||
public IgnoreSettingAttribute() : base(null) { }
|
||||
public IgnoreSettingAttribute(params RandomizerInstance[] randomizers) : base(randomizers) { }
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var props = typeof(SeedSettings).GetProperties(BindingFlags.Instance | BindingFlags.Public);
|
||||
var starting = new List<string>();
|
||||
foreach (var prop in props) {
|
||||
if (prop.Name == nameof(SeedSettings.PlayerName)) {
|
||||
if (prop.GetCustomAttributes<IgnoreSettingAttribute>().Any(att => att.HasRandomizer(randomizer))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -19,10 +19,6 @@
|
||||
var fi = prop.PropertyType.GetField(valueFieldName, BindingFlags.Static | BindingFlags.Public)
|
||||
?? throw new SettingsLookupException("Could not get field info for value {0}.{1}", prop.PropertyType, valueFieldName);
|
||||
|
||||
if (prop.GetCustomAttributes<IgnoreSettingAttribute>().Any(att => att.HasRandomizer(randomizer))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!prop.GetCustomAttributes<NoSettingNameAttribute>().Any(att => att.HasRandomizer(randomizer))) {
|
||||
var settingName =
|
||||
prop.GetCustomAttributes<SettingNameAttribute>()
|
||||
|
||||
+1
-1
Submodule BaseRandomizer updated: 7bab5b0434...c0c177dfed
+1
-1
Submodule BetaRandomizer updated: 5278f9f2c6...e77bb2980b
+1
-1
Submodule PikitRandomizer updated: be35ed4451...1d4a77b8e7
Reference in New Issue
Block a user