* Added basic functionality for uniques enum
* Added unique type to Unique class for faster enum comparisons
* And Elvis operator for unknown parameter type
* Resolved#5162 - AI much less motivated to attack city-states
* Whoops, wrong branch
* New unique checks, with enum.
* Fixed Trog's comments
* Implemented Unit Supply
Unit Supply is a soft cap to number of units. If the number of units of a civilization exceeds the total supply, a production malus (capped at 70%) is applied.
* Warning icon & message for supply deficit
* Implemented Unit Supply - atlas merge
* Unit Supply: Malus->Penalty, lint, sumOf
* Unit Supply: Fresh atlas
Co-authored-by: r3versi <fluo392@gmail.com>
* Mod TranslationFileWriter re-work
* Mod TranslationFileWriter re-work - style and existing in base treatment
* Mod TranslationFileWriter re-work - style and existing in base treatment
* Mod manager portrait mode
* Mod manager portrait and auto scroll
- MM switches to stacked expanders in portrait.
- Use AutoScrollPanes.
- Disable the enter/leave listener of AutoScrollPane in Pickers which disable the default ScrollPane to roll their own - helps all such pickers.
- No expander open/close persistence on purpose.
- PickerScreen a bit cleaned 'cuz I needed to understand something.
- Marked mods from the kill-list that are already installed.
- Button sync now OK when counterpart missing (deselects other column).
* Mod Manager sorts and filters - WIP 1
* Mod Manager sorts and filters - WIP 2
* Mod Manager sorts and filters - WIP 2a
* Mod Manager sorts and filters - WIP 3
* Mod Manager sorts and filters - atlas
* Mod Manager sorts and filters - tip
* Added basic functionality for uniques enum
* Added unique type to Unique class for faster enum comparisons
* And Elvis operator for unknown parameter type
* Resolved#5162 - AI much less motivated to attack city-states
* Whoops, wrong branch
* Rates for natural influence change
* Minor civ wariness, proximity calculation
* CS can declare permanent war
* CS can in fact not declare permanent war
* adjustments, template.properties
* neater code
* fix failing test? .
* move proximity code, for reals fix failing check
* now?
* revisions
* BFS only once, better check for water map
* assign continents on pre-made maps as well
* now works on all pre-made maps
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Adding religous city states to unciv!
* Refactored free buildings from civ.policies to civ.constructions
* Made CN tower function like in the base game
* Fixed random buildings being marked culture buildings
* Added "Consumes [amount] [resource]" for improvements
* It now also works for placeable improvements
* Made construction grayed out instead of disappear when no resources available
* Handle maps with invalid mapSize more gracefully
* Handle maps with invalid mapSize more gracefully - new game exception handling
* Handle maps with invalid mapSize more gracefully - moved version save init
* Fixed bug where moving a unit stopped automation
* Fixed bug where chosing an icon last in the religion screen would not enable the 'found religion' button
* Fixed bug where buying units with an increasing cost would deduct the wrong amount
* Fixed bug making it impossible to pick free techs
* penalties for attacking
* proper timers on penalties
* template.properties
* space
* Player can pick sides when protected civs attacked/bullied
Protect gives resting point 10 for influence
* correct string
* Pick unique unit for militaristic CS
* Provide unique unit when able
* refactor some code
* remove debug
* template.properties
* fix failing build
* Add variance to spawning rate, add ≈ to string, better formatting.
* Mod manager portrait mode
* Mod manager portrait and auto scroll
- MM switches to stacked expanders in portrait.
- Use AutoScrollPanes.
- Disable the enter/leave listener of AutoScrollPane in Pickers which disable the default ScrollPane to roll their own - helps all such pickers.
- No expander open/close persistence on purpose.
- PickerScreen a bit cleaned 'cuz I needed to understand something.
- Marked mods from the kill-list that are already installed.
- Button sync now OK when counterpart missing (deselects other column).
* Mod manager portrait - template
* Wrote an extensive tutorial documenting most of religion
* Fixed spelling and improved clarity
* Fixed typo (Thanks for noticing!)
* Reworded and split up tutorials, fixed grammer/spelling mistakes
* Added missing quote mark
* Improved redability
* From the industrial era onwards, religion goes into 'second phase'
* Fixed tests
* Fixed formula for buying great prophets starting from the industrial era
* Added `getMatchingUniques`, `hasUnique` to `IHasUniques`, cleaned up some code
* Fix compilation errors
* Fixed all renamed units being called 'instanceName'
* Removed extreneous square brackets resulting in incorrect translations
* Fixed translation problems
* Proper demand tribute thresholds
* Proper calculation for Force rankings
* debug strings
* use new force ranking for AI threatAssessment
* use new force ranking for AI threatAssessment, pt 2
* Enforce the existence of an eras.json file for mods
* Merged `getEra()` and `getEraObject()`
* Hide mods we have deemed outdated
* Fixed compile errors that I didn't notice before
* Fixed unit tests
* Fixed a bug where moving a unit through ancient ruins spawning another unit would duplicate units
* Fixed a bug where automatically exploring units upgrading from ancient ruins would not upgrade
* Fixed a bug where city state influence could go lower than the minimum
If the last game you created used a mod that you later removed from the the device it could never be removed from the new game parameters
Caught exceptions from quickstart failing
* Implemented renaming of religions
* Made AskForText display error on invalid input, implemented recommended changes
* Almost forgot the translatable strings in the new popup
* Fixed great person gift formula, confusing boolean, "great person" filter
* Refactored getRejectionReason to return a hashSet of reasons instead of a random one
* Added Grand Temple and Great Mosque of Djenne buildings
* Added uniques for Grand Temple
* Added uniques for Mosque of Djenne, refactored ability uses system to count down isntead of up
* Json definition for nation, images
* Jsons, Hussar and Coffee House
* Diplomatic Marriage Button
* Implement Marriage
* AI Marriage
* template.properties
* Popups etc
* Strings
* reviews
* reviews pt 2
* Generalize the concept of founding religions in preparation of enhancing
* Implemented enhancing religions
* Added all enhancer beliefs (mostly correctly, mostly tested)
* You can now found a religion without a pantheon, requiring you to choose a pantheon as well
* Parameterized 'enhance religion' action, fixed tests
* Implemented requested changes & simplified beliefContainer a lot
* Fixed rename
* Updated code to include features added in the meantime
* Merge branch 'master' into enhanceReligions
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Civilopedia Phase X - Show Policies
* Civilopedia Phase X - Show City States
* Civilopedia - Loop-driven init and Cleanup
* Civilopedia - City States
* Civilopedia Phase X - Remove spurious comments
* can now raze non-original capitals at capture
* clearer code, equal for AI, get gold and reduce pop when liberating
* fix conflict??
* fix conflict????
* restore whitespace
* restore whitespace
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Ancient Ruins, Civilopedia and Translations
- TranslationFileWriter can process Ruins.json
- Hide Religion / Civilopedia uniques hardcoded String moved to Constants
- Civilopedia display of Ruins pulls actual json rewards in code
- Manually curated rewards description removed
* Ancient Ruins, Civilopedia and Translations
- Old rewards descriptions moved to names, color
- Code now recreates old output closely
- civilopediaText allowed additionally
- TranslationFileWriter tweaked accordingly
* Ancient Ruins, Civilopedia and Translations - fix stargazers
Instead of forcing reflection to depend on latest kotlin version, I have a feeling the dependency is due to older mockito depending on older reflection.
* Removed the civ introduction trade option
Left in the minimum amount of code to ensure that saves with a pending
introduction trade do not break (any such pending trades are cancelled).
The left-in introduction trade code can be fully removed in a later
version.
* Added back civ introduction trades as a mod option
Also made the gold value of introducation trades moddable.
* Made civ introduction trade invalid if receiver already knows the civ
This prevents players from sending two AI civs introduction trades for
each other in the same turn and profiting from both. This therefore
fixes#4272.
* Applied requested changes
* Removed a spurious space
* Made water oil wells require the Refrigeration tech
Oil wells can now only be created on water with the refrigeration
technology.
This is not the ideal solution: it would be preferable to support
multiple improvements for a single resource, to add offshore platforms
as a separate improvement for coastal oil that requires refrigeration
and to disable building oil wells on coast. Allowing multiple
improvements for a resource would however be a much more significant
refactor.
* Added back "terrainsCanBeBuiltOn": ["Coast"]
* Unit action constants and worker unique cleanup
* Replace unit action constants with enum properties - patch1
* Replace unit action constants with enum properties - patch2
* CityScreen Buy button rework
- e.g. "Buy" for Missionary
- Info pane staying even when building no longer offered
- Purchase Prompt a little prettier
* Urgent Fix - noMods switch default
* CityScreen Buy button rework - patch1
* city-state bonuses graded depending on friend or ally
* siam militaristic UP, cleaned up presentation
* fix strings
* move city state modifiers to json
* city-state bonuses graded depending on friend or ally
* siam militaristic UP, cleaned up presentation
* fix strings
* move city state modifiers to json
* Restructure eras.json
* reduce indentation in DiplomacyManager.kt
* Add fallback values in cas of missing json definitions
* review edits
* fix conflicts???
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Implemented Zone of Control
* Implemented "move after attacking" ZoC exception
Units that can move after attacking are not affected by zone of control
if they move because of defeating a unit.
* Implemented all missing special ZoC cases
As described in:
https://forums.civfanatics.com/resources/understanding-the-zone-of-control-vanilla.25582/
* Slightly optimized ZoC logic
* Modified the "possible optimization" comment
Added the knowledge gained from SomeTroglodyte's tests.
* Added "Ignores Zone of Control" unique
Implemented the unique and gave it to the Helicopter Gunship.
* BFS cleanup
- Kotlin ArrayDeque is no longer experimental
- Client code sidestepped class API even where API existed -> closed it down
- nextStep when already ended now no-op instead of crash, suits usecases
- predicate test very likely to be more expensive than tilesReached lookup
- getPathTo only used asSequence() - why not a Sequence in the first place
- Compleat documentation. This is very low level, so better help future coders to understand.
- Lint: One annoying hardcoded conditional breakpoint, one unhelpful exception
* BFS cleanup - patch1
* Implemented religious pressure: cities now can have more than one religion in them and religions spread between nearby cities over time.
* Implemented proposed changes
* Implemented requested changes & minor changes I forgot to include last time
* All pantheons not founded by you are now removed when you gain a new city (found this somewhere in the source code of the original, don't know if it's documented anywhere online)
* Renamed and added doc comments for some some can-pass-through functions
* Moved a city-state pass-through exception to a lower-level function
Moved the exception that players (but not AI) can always pass through
city-states from TileInfo.canCivPassThrough to
CivilizationInfo.canPassThroughTiles (which is called by the former).
This makes the behavior of the latter function accurate to its name, and
makes the code more understandable overall.
A side-effect of this change is that functions that used the lower-level
CivilizationInfo.canPassThroughTiles function directly now consider the
aforementioned exception. For example, if a city-state expands its
border, it should now no longer push out units of a player civilization.
It may make even more sense to move the exception to the "canMoveTo"
logic, since AI should probably be able to pass through city-state tiles
even when they don't want to end on them. That might however affect the
AI more significantly.
* Fixed bug where units would not enter a city upon capture
As listed in #4697.
* Fixed a bug where captured units were pushed out of captured cities
Before, capturing a city with a civilian unit in it would cause the
capturing military unit to enter the city but also cause the civilian
unit to leave the city. Now, the civilian unit stays in the city as
well.
* Ruins now have their own file
* Added religious rewards
* Added an option for only enabling rewards after a certain amount of turns
* You can now weigh rewards making some more likely than others
* Cleaned up some code
* Make new changes compatible with old mods
* Implemented proposed changes
* Implemented requested changes
* Implemented requested changes
* Ai now cares about distance from it's cities
* Ai now cares about distance from it's cities
* Ai now cares about distance from it's cities
* Ai will pay extra pay extra for bordering cities or surrounding cities
* Ai will pay extra pay extra for bordering cities or surrounding cities
* Ai will pay extra for cities that are closer to their territory
* The code is cleaner
* The code is cleaner
* The code is cleaner
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* Ai now cares about distance from it's cities
* Ai now cares about distance from it's cities
* Ai will pay extra pay extra for bordering cities or surrounding cities
* Ai will pay extra pay extra for bordering cities or surrounding cities
* Ai will pay extra for cities that are closer to their territory
* The code is cleaner
* The code is cleaner
* The code is cleaner
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* Ai now cares about distance from it's cities
* Ai now cares about distance from it's cities
* Ai now cares about distance from it's cities
* Ai will pay extra pay extra for bordering cities or surrounding cities
* Ai will pay extra pay extra for bordering cities or surrounding cities
* Ai will pay extra for cities that are closer to their territory
* The code is cleaner
* The code is cleaner
* The code is cleaner
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* You can now gift improvements to the ai
* Update template.properties
* Added missionairy units, which can spread religion and bought with faith
* Forgot an include, minor additions
* Forgot credit for the missionary image
* Large refactor, enabling buying with almost all stats, split IConstruction into IConstruction & INonPerpetualConstruction
* Does this fix the tests
* Fixed accidentally removing all trailing spaces in template.properties
* Thanks to someTroglodyte for paying more attention than I do :)
* Implemented requested changes
* Fixed large amount of question marks
* Missing space, of course
* Fixed function name change
* Fixed merge problems
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Added globalization tech
* Added united nations and backbone for diplomatic victory
* You can now vote with the united nations every 20 * gameSpeed turns, and the results will be displayed the turn after
* You can now win with diplomacy
* AI will now vote in the united nations
* Added the amount of turns till the next diplomatic vote in the diplomacy overview
* Added translatable strings
* Implemented most of the requested changes (rest coming soon)
* Implemented further requested changes
* Ai now cares about distance from it's cities
* Ai now cares about distance from it's cities
* Ai now cares about distance from it's cities
* Ai will pay extra pay extra for bordering cities or surrounding cities
* Ai will pay extra pay extra for bordering cities or surrounding cities
* Ai will pay extra for cities that are closer to their territory
* The code is cleaner
* The code is cleaner
* The code is cleaner
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Ai now values distance
* Split off unitTypes to its own json, only containing the domain it can travel in for now
* Updated translationFileWriter to handle this file correctly
* Updated promotions file
* Implemented requested changes
* Units without a sprite use the sprite of a first unit with the same type
* Implemented proposed changes
In particular, this fixes the bug where embarked units captured by a
civilization without optics would stay embarked. This therefore fixes
case 4 of #4237.
In principle, it should not even be possible that captured units can no
longer stand on the tile they were on, since the capturing unit has to
be able to move to it. However, in Unciv, it is possible to capture
units without moving to their tile. This is a different problem that
needs to be addressed some time in the future.
* Removed Char-only restriction in keyboard support for unit actions, remap a few keys, key tooltips for non-ascii keys
* UnitActionType now knows keys, sounds and most icons
* UnitActionType empower - fix Prophets spreading Pantheons