* Renamed tile.hasUnique, deprecated `Indestructable`, unique for citadels
Also refactored the consumption of (great) people out of UnitActions.
* Reworked when improvements can be build somewhere for more clarity
* Made resources improvable by multiple improvements; Offshore Platform
* Fix compatability
* WIP
* Fixed the tests, but better
* I suppose I might as well update this now that we're a version later
* Implemented most easy things from comments on moddable victory PR
Also added religious victory condition
* Fixed tests
* Fixed compile problems & missing string
* Fixed typo
* Changed milestone build globally text to make it more understandable
* Actually this is probably just as clear, gramatically more correct and
more imperative like the other milestones
* Fixed tests
* Reworded again
* Added a moddable (but not yet functional) file for victories
* Spaceship parts are units now
* Fixed tests
* Added milestone objects
* Made 'our status' table in VictoryScreen dependend on file
* Updated VictoryManager to use the new Milestone system
* Fixed bug where in vanilla too many spaceship parts could beb uild
* Whoops
* Updated global victory table to use the jsons
* Updated the new game screen to show the new victory types
Also started with the deprecation of VictorType
* Did some translation stuff, also finally fixed the tests
* Removed VictoryType and reworked AI to use Milestones instead
* Add some checks for the victory file; tested that custom victories work
Also moves some code to a better spot and fixes compilation errors
* Fixed some things I thought about while falling asleep
Most notably: built -> build; fixed spaceship part construction
priority; removed more code for the old system
* Fixed translation issues on the victory screen
* Fixed G&K policy eras
Patronage should be Medieval and Freedom should be Industrial in G&K
* Added 'priorities' object to policy branch entries
* Fixed Vanilla policy eras
Also set testing priorities in advance
* Partial code formatting
* Reworked how the AI chooses a policy to newly adopt
* Removed debugging codes
* Update Civilization-related-JSON-files.md
Added Branch priorities
* Assigned actual priorities to each branch
Also fixed a debugging value in Ruleset.kt (-1 -> 0)
* Generalized trade route percent bonuses
* Unified two uniques using populationFilter; deprecated a deprecated uniq
* Made some renamings to improve clarity & fixed tests
* Fixed tests again
* Fixed typo
* Unique units abilities that should be inherited by upgrades
* Unique units abilities that should be inherited by upgrades - xlt
* Unique units abilities that should be inherited by upgrades - wiki
* Destroy Arsenal when city is captured
* Update vanilla Songhai
* Add Amphibious promotion to all Songhai units
In Gods and Kings, all Songhai Land units have the Amphibious promotion. This brings our Gods and Kings up to speed with the original.
* Destroy Arsenal when city is captured
* Fix Petra culture wiht city filter
Change Petra's culture bonus to city-specific bonus instead of empire-wide bonus
* Change Embarked Defending Strength per era. Update Tutorial a little
* Use JSON implementation of EmbarkDefense
Co-authored-by: itanasi <spellman23@gmail.com>
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>
* 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
* Arbitrary conditionals can become timed conditionals!
triggerCivwideUniques is activated in 3 situations:
- Tech complete
- Policy adopted
- Building complete
So for each of the unique containers for these I added a catch saying 'if this unique is a temporary unique then don't save it yourself
This has been lying around in todos for a while and generalizes one of the nasty hardcoded messes that I hate about Civ V. Why would you introduce ONE timed effect in the whole game?! You can use them all the time like Humankind or never use them like Civ IV, but why have just one whyyy
One more thing in this PR, that needed to be solved by the by, is allowing parameters to have a '2' on the end so we can autoreplace multiple parameters of the same type.
Using a regex is slightly more inefficient, but since this is A. only used once per UniqueType.kt, and B. allows us to have as many 'amount's as we want which is important if we have a lot of conditionals, I feel this is justified.
* Fixed comments from PR
* Added unique to convert terrain to other terrain if adjacent to something
Terrain converting to other terrain when adjacent to rivers was using hardcoded stuff, so I un-hardcoded it
I thought I could use this to replace the 'coast' hardcoding, and if it wasn't for the maxCoastExtension then I could.
Modders CAN therefore add their own coast (Lava tiles and Ash tiles I dunno) but it will only be for directly close terrains.
This enables Deciv Redux to spawn huge maps.
* Also for Vanilla, which apparently had a different number of tabs than G&K for no apparent reason.
* Apparently terrain name wasn't a uniquetype yet
(cherry picked from commit 593fc257b5)
* Added a json file for unhappiness effects
* Change existing code to handle these effects
* Made a weird and unexpendable way to add unhappiness effects to the civilopedia
* Add the default unhappinesseffects to mods without the json
* Added revolts when at very low happiness
* Renamed a few often-used functions
* Added a file for uniques that are always active
* Fixed tests
* Nullifies [Food] -> Nullifies Growth
* Typed some uniques, etc.
* Missed a few square braces
* Missed a parameter
* Missed another parameter
* Made a conditional, spelling, added check to `isStatRelated`
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Typified some building uniques
I noticed that the code allows "[stats] from every [buildingFilter]" but the UniqueType was limited to "[stats] from every [buildingName]", so now that that's available we don't actually need the "[stats] from every Wonder" unique :)
* buildings-only unique moved to buildings section