Skip to content

Commit

Permalink
Added a fix for badumdum, but I don't agree with the interpretation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Drise13 committed Jul 16, 2022
1 parent 5c32d2b commit 6f5f02c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
5 changes: 3 additions & 2 deletions PetsOptimizer/Genes/GeneticEffects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,12 @@ public bool DoesMultiplierApplyToForaging(Territory territory)
public class BadumdumEffect : IForagerGeneEffect
{
public IGeneEffect.GeneApplication Application => Regional;
public double StrengthMultiplier => 1.5;
public double StrengthMultiplier => 1.2;

public bool DoesMultiplierApplyToForaging(Territory territory)
{
return false;
// I don't think this is the right interpretation of "all pets above and below", but Lava's math says it does.
return true;
}
}

Expand Down
12 changes: 5 additions & 7 deletions PetsOptimizer/Territory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,13 @@ public double GetTotalForagePower()

break;

case IGeneEffect.GeneApplication.All:
case IGeneEffect.GeneApplication.All or IGeneEffect.GeneApplication.Regional:
foreach (var pet in petForagingPower.Keys)
{
foreach (var pet in petForagingPower.Keys)
{
petForagingPower[pet] *= foragingMultiplierPet.GeneEffect.StrengthMultiplier;
}

break;
petForagingPower[pet] *= foragingMultiplierPet.GeneEffect.StrengthMultiplier;
}

break;
}
}

Expand Down

0 comments on commit 6f5f02c

Please sign in to comment.