Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
Fixed comp inclusion bug where it would label a comp as invalid when it was specified in the included list
  • Loading branch information
dragitz committed Feb 16, 2024
1 parent ebe2875 commit b9af9c1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions TFT Comp Creator 2/Scoring.cs
Original file line number Diff line number Diff line change
Expand Up @@ -604,11 +604,6 @@ public static bool CheckCompValidity(List<string> comp)
//}
}

for (int i = 0; i < include_trait.Items.Count; i++)
{
if (Trait == include_trait.Items[i].ToString() && !IncludedTraitFoundLIst.Contains(Trait))
IncludedTraitFoundLIst.Add(Trait);
}

int minBreakPoint = (int)Master["TraitList"][Trait]["Breakpoints"][0];
int totalBreakPoints = Master["TraitList"][Trait]["Breakpoints"].Count;
Expand All @@ -622,6 +617,12 @@ public static bool CheckCompValidity(List<string> comp)
// Trait must not be unique per champion (eg. a 5 cost that has its own trait does not count as having more active traits), aka more than 1 BP
if ((int)JTraits[Trait] >= minBreakPoint && totalBreakPoints > 1)
{
for (int i = 0; i < include_trait.Items.Count; i++)
{
if (Trait == include_trait.Items[i].ToString() && !IncludedTraitFoundLIst.Contains(Trait))
IncludedTraitFoundLIst.Add(Trait);
}

int maxBreakpoint = (int)Master["TraitList"][Trait]["Breakpoints"][Master["TraitList"][Trait]["Breakpoints"].Count - 1]; // This is a test, might leave it here

ActiveTraits++;
Expand Down Expand Up @@ -668,7 +669,7 @@ public static bool CheckCompValidity(List<string> comp)
}
if (!has_contributed) { return false; }


int NumberOfTraits = Master["Champions"][champion]["Traits"].Count;

if (NumberOfTraits >= 3)
Expand Down

0 comments on commit b9af9c1

Please sign in to comment.