-
Notifications
You must be signed in to change notification settings - Fork 1
Warmech Minion Chance #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -162,6 +162,13 @@ public enum MinionsRangeModes | |
| Strong, | ||
| WeakStrong | ||
| } | ||
| public enum WarmechChance | ||
| { | ||
| None, | ||
| Unleashed, | ||
| Risky, | ||
| Guaranteed | ||
| } | ||
| public enum MinionGroupSizes | ||
| { | ||
| Small, | ||
|
|
@@ -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) | ||
|
|
@@ -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 | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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, |
||
| // 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(); | ||
|
|
||
|
|
@@ -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) | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| { | ||
| newmonsters[1] = MonsterIds.Warmech; | ||
| } | ||
| newMonsterParties.Add(boss.Key, newmonsters); | ||
| } | ||
| else | ||
|
|
@@ -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 | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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"]); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"); | ||
|
|
||
There was a problem hiding this comment.
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?