From 32191bd57d77ad454c82b30d886ea28f38f8664f Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Wed, 19 Apr 2023 11:52:57 +0300 Subject: [PATCH] 4.6.4 --- changelog.md | 26 ++++++------------- .../com/unciv/logic/map/mapunit/MapUnit.kt | 4 ++- docs/Modders/Unique-parameters.md | 23 ++++++++-------- 3 files changed, 22 insertions(+), 31 deletions(-) diff --git a/changelog.md b/changelog.md index 830beadf0f..85dec1cab5 100644 --- a/changelog.md +++ b/changelog.md @@ -1,31 +1,21 @@ ## 4.6.4 -Removed more double icons - Avoid font-related crash -Replaced hardcoded embarked sight with configurable +Modding: Configurable embarked sight -UnitFilter accepts NationFilter of the civ (e.g. "vs [England] units") +UnitFilter accepts NationFilter (e.g. "vs [England] units") -Resolved - Clear frameBuffer before we use it to draw images - -Resolved - removed icons from selectboxes - -4.6.3-patch1 - -Patch fix for crash, from Discord - @WhoIsJohannes - -Whoops a movement change got in when it shouldn't have +Resolved image gliches in font icons, hopefully By SomeTroglodyte: -- Reassign workers when resistance ends or improvement created -- Fix "religions to be founded" expanders accumulating -- I'm pretty sure annexed cities in resistance shouldn't be allowed to buy tiles +- Reassign workers when resistance ends or improvement created +- Fix "religions to be founded" expanders accumulating +- Annexed cities in resistance cannot buy tiles By WhoIsJohannes: -- Show replay after 5 rounds and don't reveal where player is on the map. -- LineChart improvements (Highlight & DP) +- Show replay after 5 rounds and don't reveal where player is on the map. +- Chart improvements (Highlight & performance) ## 4.6.3 diff --git a/core/src/com/unciv/logic/map/mapunit/MapUnit.kt b/core/src/com/unciv/logic/map/mapunit/MapUnit.kt index 2af4bc3961..c6699b99aa 100644 --- a/core/src/com/unciv/logic/map/mapunit/MapUnit.kt +++ b/core/src/com/unciv/logic/map/mapunit/MapUnit.kt @@ -282,7 +282,9 @@ class MapUnit : IsPartOfGameInfoSerialization { getTile().getMatchingUniques(UniqueType.Sight, conditionalState) if (isEmbarked() && !hasUnique(UniqueType.NormalVisionWhenEmbarked, conditionalState, checkCivInfoUniques = true)) { visibilityRange += relevantUniques - .filter { it.conditionals.any { it.type == UniqueType.ConditionalOurUnit && it.params[0] == Constants.embarked } } + .filter { it.conditionals.any { + (it.type == UniqueType.ConditionalOurUnit || it.type == UniqueType.ConditionalOurUnitOnUnit) + && it.params[0] == Constants.embarked } } .sumOf { it.params[0].toInt() } } else visibilityRange += relevantUniques.sumOf { it.params[0].toInt() } diff --git a/docs/Modders/Unique-parameters.md b/docs/Modders/Unique-parameters.md index 5de64bbcda..89a04b52cc 100644 --- a/docs/Modders/Unique-parameters.md +++ b/docs/Modders/Unique-parameters.md @@ -96,20 +96,8 @@ Allowed values are: - `Great Improvements`, `Great` - `All Road` - for Roads & Railroads -## mapUnitFilter - -This indicates a unit as placed on the map. Compare with `baseUnitFilter`. -It can be any value noted in `baseUnitFilter` or one of the following: - -- `Wounded`, `wounded units` -- `City-State` -- `Barbarians`, `Barbarian` -- Again, any combination of the above is also allowed, e.g. `[{Wounded} {Water}]` units. - ## nationFilter -At the moment only implemented for [ModOptions.nationsToRemove](../Other/Miscellaneous-JSON-files.md#modoptionsjson). - Allowed values are: - `All` @@ -118,6 +106,17 @@ Allowed values are: - The name of a Nation - A unique a Nation has (verbatim, no placeholders) +## mapUnitFilter + +This indicates a unit as placed on the map. Compare with `baseUnitFilter`. + +- Any value noted in `baseUnitFilter` +- `Wounded` +- `Embarked` +- `City-State` +- `Barbarians`, `Barbarian` +- Again, any combination of the above is also allowed, e.g. `[{Wounded} {Water}]` units. + ## populationFilter A filter determining a part of the population of a city. It can be any of the following values: