Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Core/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ public static class Options

new("nerf_chaos", "Nerf Chaos", new() { { 1, "Enable" }, { 0, "Disable" } }, 0, "Halve Chaos' HP and reduce his Intelligence and Attack Power by 25%."),
new("boss_minions", "Boss Minions", new() { { 0, "None" }, { 1, "Weak Minions" }, { 2, "Strong Minions" }, { 3, "Weak-Strong Minions" } }, 0, "Add Minions to Bosses and Extend some Minibosses party.\n\nNone: Original Parties are maintained.\n\nWeak Minions: Add relatively weak minions to Bosses and extend Minibosses by 1-2 members.\n\nStrong Minions: Add relatively strong minions to Bosses and extend Minibosses by 2-3 members.\n\nWeak-Strong Minions: Minions can be weak or strong."),
new("chaos_minion_warmech_chance", "Chaos Minion Warmech Chance", new() { { 0, "Disabled" }, { 1, "Unleashed" }, { 2, "Risky" }, { 3, "Guaranteed" } }, 0, "The chance that Warmech will be Chaos's minion.\n\nDisabled: 0% chance.\n\nUnleashed: 20% chance.\n\nRisky: 50% chance.\n\nGuaranteed: 100% chance."),
new("fiend_minion_warmech_chance", "Fiend Minion Warmech Chance", new() { { 0, "Disabled" }, { 1, "Unleashed" }, { 2, "Risky" }, { 3, "Guaranteed" } }, 0, "The chance that Warmech will be a Fiend's minion in the Chaos Shrine.\n\nDisabled: 0% chance.\n\nUnleashed: 5% chance.\n\nRisky: 20% chance.\n\nGuaranteed: 100% chance."),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is fine for now, but it feels like these options could be combined or simplified in some way, is someone looking at including warmech specifically in their boss fights will find a difference between 5% and 20% meaningful?

new("monster_parties", "Monster Parties", new() { { 0, "Standard" }, { 1, "Random No Variance" }, { 2, "Random Low Variance" }, { 3, "Random High Variance" } }, 0, "Randomize Monster Parties.\n\nStandard: Original Parties are maintained.\n\nNo Variance: Monsters will be replaced by Monsters of roughly the same power.\n\nLow Variance: Monsters can be replaced by slightly weaker or slightly stronger Monsters.\n\nHigh Variance: Monsters can be replaced by much weaker or much stronger Monsters."),
new("monsters_cap", "Variance Cap", new() { { 0, "None" }, { 1, "Upper Bound" }, { 2, "Lower Bound" } }, 0, "If Monster Parties are randomized, bound Power Variance. This option doesn't do anything for Standard and No Variance choices.\n\nNone: Variance is unbounded, Randomized Monster Parties can be weaker or stronger.\n\nUpper Bound: Randomized Monsters cannot be more powerful than the replaced Monsters, but they can be weaker.\n\nLower Bound: Randomized Monsters cannot be weaker than the replaced Monsters, but they can be more powerful."),

Expand Down
99 changes: 96 additions & 3 deletions Randomizer/MonsterParties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,13 @@ public enum MinionsRangeModes
Strong,
WeakStrong
}
public enum WarmechChance
{
None,
Unleashed,
Risky,
Guaranteed
}
public enum MinionGroupSizes
{
Small,
Expand Down Expand Up @@ -467,14 +474,48 @@ public static Dictionary<int, Dictionary<int, MonsterIds>> RandomizeMonsterParti
return newMonsterParties;
}

public static Dictionary<int, Dictionary<int, MonsterIds>> AddBossMinions(bool enable, MinionsRangeModes rangemode, MT19337 rng)
public static Dictionary<int, Dictionary<int, MonsterIds>> AddBossMinions(bool enable, MinionsRangeModes rangemode, WarmechChance chaoswarmech, WarmechChance fiendwarmech, MT19337 rng)
{
if (!enable)
{
return new();
}

Dictionary<int, Dictionary<int, MonsterIds>> newMonsterParties = new();

// Set Chaos and Fiend Warmech Chances
int chaoschance = 0;
switch (chaoswarmech)
{
case WarmechChance.None:
chaoschance = 0;
break;
case WarmechChance.Unleashed:
chaoschance = 20;
break;
case WarmechChance.Risky:
chaoschance = 50;
break;
case WarmechChance.Guaranteed:
chaoschance = 100;
break;
}
int fiendchance = 0;
switch (fiendwarmech)
{
case WarmechChance.None:
fiendchance = 0;
break;
case WarmechChance.Unleashed:
fiendchance = 5;
break;
case WarmechChance.Risky:
fiendchance = 20;
break;
case WarmechChance.Guaranteed:
fiendchance = 100;
break;
}

// Do Bosses Minions first
foreach (var boss in BossMinionConfigs)
Expand Down Expand Up @@ -548,6 +589,31 @@ public static Dictionary<int, Dictionary<int, MonsterIds>> AddBossMinions(bool e
var qty = rng.Between(4, 6);
if (boss.Key == 350) qty /= 2; // garland special condition
var monster = rng.PickFrom(PowerGroupToMonsters[power]);
bool mech = false;

switch (boss.Key)
{
case 346: // chaos
if (rng.Between(0, 99) < chaoschance)
mech = true;
break;
case 338: // lich2
case 339: // marilith2
case 340: // kraken2
case 341: // tiamat2
if (rng.Between(0, 99) < fiendchance)
mech = true;
break;
case 342: // tiamat
Copy link
Owner

@wildham0 wildham0 Oct 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while i like surprising players, the odds are pretty high for something not documented in the the tooltip and this is a pretty big power spike from the normal range, remove

also, || should be used for logical or operations

// 80% chance if fiends2 are 100%, otherwise 1/5 of fiends2 chance
if (rng.Between(0, 499) < fiendchance ^ fiendchance == 100)
mech = true;
break;
default:
break;

}


Dictionary<int, MonsterIds> newmonsters = new();

Expand All @@ -556,6 +622,10 @@ public static Dictionary<int, Dictionary<int, MonsterIds>> AddBossMinions(bool e
var position = rng.TakeFrom(positions);
newmonsters.Add(position, monster);
}
if (mech)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while this work, this should probably be moved before the loop to better align with the current method

if(mech)
{
    var position = rng.TakeFrom(positions);
	newmonsters.Add(position, MonsterIds.Warmech);
    qty--;
}

{
newmonsters[1] = MonsterIds.Warmech;
}
newMonsterParties.Add(boss.Key, newmonsters);
}
else
Expand All @@ -567,9 +637,32 @@ public static Dictionary<int, Dictionary<int, MonsterIds>> AddBossMinions(bool e
var monster1 = rng.PickFrom(PowerGroupToMonsters[power]);
var monster2 = rng.PickFrom(PowerGroupToMonsters[power]);

if (boss.Key == 346)
if (boss.Key == 346) // chaos special condition
{
monster1 = rng.PickFrom(new List<MonsterIds> { MonsterIds.Lich, MonsterIds.Marilith, MonsterIds.Kraken, MonsterIds.Tiamat });
}

switch (boss.Key)
{
monster1 = rng.PickFrom(new List<MonsterIds> { MonsterIds.Lich, MonsterIds.Marilith, MonsterIds.Kraken, MonsterIds.Tiamat, MonsterIds.Warmech });
case 346: // chaos
if (rng.Between(0, 99) < chaoschance)
monster1 = MonsterIds.Warmech;
break;
case 338: // lich2
case 339: // marilith2
case 340: // kraken2
case 341: // tiamat2
if (rng.Between(0, 99) < fiendchance)
monster1 = MonsterIds.Warmech;
break;
case 342: // tiamat
// 80% chance if fiends2 are 100%, otherwise 1/5 of fiends2 chance
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

if (rng.Between(0, 499) < fiendchance ^ fiendchance == 100)
monster1 = MonsterIds.Warmech;
break;
default:
break;

}

Dictionary<int, MonsterIds> newmonsters = new();
Expand Down
2 changes: 1 addition & 1 deletion Randomizer/Randomizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public static void Randomize()
// This is ugly but it'll do for now
randoData.MonsterParties =
RandomizeMonsterParties(SessionManager.Options["monster_parties"] != Options.Disable, (MonsterPartyRangeModes)SessionManager.Options["monster_parties"], (MonsterPartyCapModes)SessionManager.Options["monsters_cap"], rng)
.Concat(AddBossMinions(SessionManager.Options["boss_minions"] != Options.Disable, (MinionsRangeModes)SessionManager.Options["boss_minions"], rng))
.Concat(AddBossMinions(SessionManager.Options["boss_minions"] != Options.Disable, (MinionsRangeModes)SessionManager.Options["boss_minions"], (WarmechChance)SessionManager.Options["chaos_minion_warmech_chance"], (WarmechChance)SessionManager.Options["fiend_minion_warmech_chance"], rng))
.ToDictionary(x => x.Key, x => x.Value);

randoData.SmittThingy = rng.PickFrom(new List<string>() { "thingy", "thingamajigger", "gizmo", "whatchamacallit", "gewgaw", "doohickey", "thingumabob", "widget", "whatsit", "hootenanny", "MacGuffin", "doodad" });
Expand Down
2 changes: 2 additions & 0 deletions UI/SettingsWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,8 @@ private static void AddRandoOptions()
CreateDropdown(Options.Dict["boss_minions"].Display, Options.Dict["boss_minions"]);
CreateDropdown(Options.Dict["monster_parties"].Display, Options.Dict["monster_parties"]);
CreateDropdown(Options.Dict["monsters_cap"].Display, Options.Dict["monsters_cap"]);
CreateDropdown(Options.Dict["monsters_cap"].Display, Options.Dict["chaos_minion_warmech_chance"]);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the specific option name for the display part too

CreateDropdown(Options.Dict["monsters_cap"].Display, Options.Dict["fiend_minion_warmech_chance"]);
apHeight += 20f * guiScale;

GUI.Label(ScaledRect(0, GetApHeight(40f), 300f, 30f), "Scaling");
Expand Down