From 6e3d4d99e0e69fdcce023523e10f958b1dbf6d4d Mon Sep 17 00:00:00 2001 From: SeventhM <127357473+SeventhM@users.noreply.github.com> Date: Wed, 16 Aug 2023 07:59:54 -0700 Subject: [PATCH] Add "Improvement" as an improvement filter (#9906) * Add "Improvement" as an improvement filter * Update docs, change from non road improvement to all improvement --- core/src/com/unciv/models/ruleset/tile/TileImprovement.kt | 3 ++- docs/Modders/Unique-parameters.md | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/src/com/unciv/models/ruleset/tile/TileImprovement.kt b/core/src/com/unciv/models/ruleset/tile/TileImprovement.kt index b26ed5cff2..f05df32bda 100644 --- a/core/src/com/unciv/models/ruleset/tile/TileImprovement.kt +++ b/core/src/com/unciv/models/ruleset/tile/TileImprovement.kt @@ -26,7 +26,7 @@ class TileImprovement : RulesetStatsObject() { override fun getUniqueTarget() = UniqueTarget.Improvement val shortcutKey: Char? = null // This is the base cost. A cost of 0 means created instead of buildable. - val turnsToBuild: Int = -1 + var turnsToBuild: Int = -1 fun getTurnsToBuild(civInfo: Civilization, unit: MapUnit): Int { @@ -89,6 +89,7 @@ class TileImprovement : RulesetStatsObject() { return when (filter) { name -> true "All" -> true + "Improvement" -> true // For situations involing tileFilter "All Road" -> isRoad() "Great Improvement", "Great" -> isGreatImprovement() in uniqueMap -> true diff --git a/docs/Modders/Unique-parameters.md b/docs/Modders/Unique-parameters.md index f3cdf4eeab..493cba77a9 100644 --- a/docs/Modders/Unique-parameters.md +++ b/docs/Modders/Unique-parameters.md @@ -93,6 +93,7 @@ cityFilters allow us to choose the range of cities affected by this unique: - `in non-enemy foreign cities` - In all cities owned by civs other than you that you are not at war with - `in foreign cities` - `in annexed cities` +- `in puppeted cities` - `in holy cities` - `in City-State cities` - `in cities following this religion` - Should only be used in pantheon/follower uniques for religions @@ -192,9 +193,10 @@ So for instance, the unique "[stats] from [tileFilter] tiles [cityFilter]" can m ## tileFilter Any of: -- [terrainFilter](#terrainfilter) for this tile -- [improvementFilter](#improvementfilter) for this tile -- `unimproved' if no improvement exists +- [terrainFilter](#terrainfilter) for this tile +- [improvementFilter](#improvementfilter) for this tile +- `Improvement` for all improvements +- `unimproved` if no improvement exists ## terrainQuality