don't give an on-fire penalty if you're the defender and fleeing (#2988)

This commit is contained in:
2023-10-18 20:12:44 -07:00
committed by GitHub
parent 5ab671b575
commit be6389fecc
@@ -351,7 +351,9 @@ auto UnitValue(
kCastleMultiplierBonus * (terrain->modifier().castle().integrity() + 25) / 100.0;
}
double onFireMultiplier = 1.0;
if (terrain->modifier().fire().present()) { onFireMultiplier *= kOnFireMultiplier; }
if (terrain->modifier().fire().present() && (isAttacker || attackerWantsCastles)) {
onFireMultiplier *= kOnFireMultiplier;
}
{
auto adjacentCoords = HexMapUtils::GetAdjacentCoords(map, location);
for (const auto &c : adjacentCoords) {