From 6f5f02c465af9ea5b30903ef438bd21560b4b395 Mon Sep 17 00:00:00 2001 From: Rich Moll Date: Sat, 16 Jul 2022 01:39:19 -0500 Subject: [PATCH] Added a fix for badumdum, but I don't agree with the interpretation. --- PetsOptimizer/Genes/GeneticEffects.cs | 5 +++-- PetsOptimizer/Territory.cs | 12 +++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/PetsOptimizer/Genes/GeneticEffects.cs b/PetsOptimizer/Genes/GeneticEffects.cs index 865a59a..b068df3 100644 --- a/PetsOptimizer/Genes/GeneticEffects.cs +++ b/PetsOptimizer/Genes/GeneticEffects.cs @@ -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; } } diff --git a/PetsOptimizer/Territory.cs b/PetsOptimizer/Territory.cs index 13a3951..a9316b0 100644 --- a/PetsOptimizer/Territory.cs +++ b/PetsOptimizer/Territory.cs @@ -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; } }