From 8d4aa955b3408875394f5f0397e5383528993832 Mon Sep 17 00:00:00 2001 From: SpacedOutChicken <58439827+SpacedOutChicken@users.noreply.github.com> Date: Sun, 18 Apr 2021 12:12:47 -0700 Subject: [PATCH] Parameterize civ-wide sight bonus (#3809) * Make science a possible reward for killing units * no message * Revert "Make science a possible reward for killing units" This reverts commit 296b8fab544abb99204cdea95bc028f44a4c0988. --- core/src/com/unciv/logic/map/MapUnit.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/com/unciv/logic/map/MapUnit.kt b/core/src/com/unciv/logic/map/MapUnit.kt index 8f4c9781bb..a2c3ef173d 100644 --- a/core/src/com/unciv/logic/map/MapUnit.kt +++ b/core/src/com/unciv/logic/map/MapUnit.kt @@ -195,6 +195,9 @@ class MapUnit { } else { var visibilityRange = 2 visibilityRange += getUniques().count { it.text == "+1 Visibility Range" } + for (unique in civInfo.getMatchingUniques("+[] Sight for all [] units")) + if (matchesFilter(unique.params[1])) + visibilityRange += unique.params[0].toInt() if (hasUnique("+2 Visibility Range")) visibilityRange += 2 // This shouldn't be stackable if (hasUnique("Limited Visibility")) visibilityRange -= 1 if (civInfo.hasUnique("+1 Sight for all land military units") && type.isMilitary() && type.isLandUnit())