Skip to content

Commit

Permalink
Fix starting class randomization reading the wrong setting for matchi…
Browse files Browse the repository at this point in the history
…ng proficiencies
  • Loading branch information
Nifyr committed Oct 19, 2024
1 parent 94a9f20 commit afb99ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ALittleSecretIngredient/Randomizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2884,7 +2884,7 @@ private void RandomizeStartingClasses(RandomizerSettings.IndividualSettings sett
{
List<int> totalLevels = individuals.Select(i => i.Level + (i.GetTOS(toss).Rank == 1 ? 20 : 0)).ToList();
individuals.Randomize(i => i.Jid, (i, s) => i.Jid = s, settings.JidAlly.Distribution, PlayableClasses.GetIDs());
if (settings.JidEnemy.GetArg<bool>(0))
if (settings.JidAlly.GetArg<bool>(0))
foreach (Individual i in individuals)
{
int maxScore = toss.Select(tos => CalcCompatibility(i, tos)).Max();
Expand All @@ -2906,7 +2906,7 @@ private void RandomizeStartingClasses(RandomizerSettings.IndividualSettings sett
(totalLevels[iIdx] > 20 ? tos.Rank == 1 : tos.Rank == 0)).Select(tos => tos.Jid).ToList();
EnsureLegalClass(toss, totalLevels[iIdx], i, tos, legalClassIDs);
tos = i.GetTOS(toss);
if (retryCounter < 32 && settings.JidEnemy.GetArg<bool>(0) && CalcCompatibility(i, tos) < ushort.MaxValue / 2)
if (retryCounter < 32 && settings.JidAlly.GetArg<bool>(0) && CalcCompatibility(i, tos) < ushort.MaxValue / 2)
{
i.Jid = legalClassIDs.GetRandom();
iIdx--;
Expand Down

0 comments on commit afb99ce

Please sign in to comment.