* Triggered uniques currently come from researching techs, adopting policies, and building buildings.
This adds a third way of triggering uniques, by attaching them to units with a "by consuming this unit" conditional, which will be added as a possible unit action.
So for example, "[amount] Free Technologies <by consuming this unit>", "Reveals the entire map <by consuming this unit>" etc.
* Added a new uniquetype for triggerable uniques, to make them separate from regular global uniques, so that triggerable uniques can become unit uniques when necessary
* And added translations so the tests will pass
* Step 1 of saving terrain features as a transient - move all terrainFeature changes to new 'addTerrainFeature' and 'removeTerrainFeature' functions
This also included slight rewriting of functions for clarity, but NO functional changes.
Even though there's some logic that I would definitely change, this PR isn't the place for that.
* Fixed tests
* Initial attempt
* Allow Ranged to move into unguarded Civilian Unit
* Comment for clarity
* Fix unit test so that it doesn't segfault and checks you can't move into military units
* Unify that all units can move on to (and through) unguarded civilians that you are at war with
Add TileInfo.getUnguardedCivilian() to quickly respond if there is an unguarded Civilian on the tile
Something is bugged in movement code
* Fix MapUnit.moveThroughTile() so that it doesn't segfault by fixing getUnguardedCivilian()
* captureCivilianUnit() call is now redundant in postBattleMoveToAttackedTile() since canMoveTo() will now return true and capture will happen during the moveToTile() call
* Add check so Civilian Units don't capture other Civilians
* Change logic to isMilitary()
Co-authored-by: temurakami <spellman23@gmail.com>
* Fox naval unit Landind penalty is for attacking on to land
* Only Land unit should have Boarding penalty
* Unbreak logic
Co-authored-by: itanasi <spellman23@gmail.com>
Fixed icon and text for resource stats improvements in Improvement Civilopedia pages
Fixed 'null' for improvement picker for some resource-only improvements
Instead of expanding the existing 'requires building' unique to units and adding limiters, it's both easier and more generalizable to add conditionals for cities with and without certain buildings to replace the uniques entirely
* Add Amphibious penalty to Land attacking into Water and vice versa
* Replace Landing with Amphibious in all translation files
* Fix trailing whitespace
* Revert translation files
* Change working of Amphibious
Set penalty to Landing and Boarding
* Type-ify Unique and add Depreciated
Add Promotion to Melee Naval
Add exception that Landing penalty is NOT against cities
* Fix Vanilla
* Rename to Landing Party
Icon doesn't work
* Properly regenerated game.atlas/game.png
Co-authored-by: itanasi <spellman23@gmail.com>
- "Resources" in city-state diplomacy screen
- "When Friends"/"When Allies" in same
- "Enhance religion"
- "Choose a Religion" in religion screen
- Religion name in religion screen
- Translated drilldown items in city screen
- "null for wheat" in improvement Civilopedia entry
- "Type" and others in city-state civilopedia entry
- Requires more population
- Religious
- "Requires" in Policy civilopedia text
- "for" in improvement civilopedia text
- Untranslated conditionals in battle table (listed as "when fighting in [tileFilter] tiles")
This is guaranteed to not cycle endlessly thanks to the added test
Checked by having 2 uniques' deprecation text reference each other and it failed as expected
* Unified "X is only available under Y conditions" into a single unique
There were a few problems with existing uniques - they weren't really composable, the offered things they didn't keep, etc
For example, "Incompatible with [policy/tech/promotion]", UniqueTarget.Policy, UniqueTarget.Tech, UniqueTarget.Promotion. In fact, promotions only checked promotion incompatibility, promotions - promotion incompat, etc
Additionally, with a few more changes, this could cover several other uniques - "Hidden until [amount] social policy branches have been completed", "Requires at least [amount] population", perhaps others
I have to say I think conditionals are the best thing ever and they make amazing composability possible :)
* Autoupdate correctly recognizes parameters
Updated ruleset jsons
* Deprecation texts should be allowed to forward to other deprecated uniques so we only need to change the leaves when introducing new uniques, not go through the whole tree