* World and Natural Wonders Overview
* World and Natural Wonders Overview - icon
* World and Natural Wonders Overview - groups and tuning
* World and Natural Wonders Overview - atlas
* World and Natural Wonders Overview - lint
* Music controller with fade-over and mod capabilities.
- Preparation for music following game situations
- Minimal in-game hooks for now
- Already allows mods providing music, will play randomly
* Music controller - template
* Added support for conditionals to some more uniques
* Implemented a new conditional
* Added the new conditional to the translations file
* Fixed tests
* Implemented requested changes
* Moved uniques to their own folder
* Added support for conditionals to most of the uniques in the current enum
* Deprecation > removal, of course
* Fixed tests & added `.removeConditionals` before checking for placeholders
* Implementation of conditionals, but better than before
* Updated the unique while I was at it
* Fixed bug where conditionals would never apply
* Capitalization
* Minor code cleaning
* Better documentation & variable names
* Changed translation strategy
* Added missing import?
* 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 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
* 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!
* 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
* 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
* 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
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
* 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
* 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
* 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)
* 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
* You can now use 'h' to fortify/sleep until healed
* Hide lesser used unit actions by default
* Refactored worker actions into automate & build improvements
* Added missing translation lines
* Fixed translations
* Update translationFileWriter to include strings from new json files
* Fix promotions with multiple uniques not getting translated
* Add missing translatable strings (thanks to DuffLagerleff for finding these)
* wonder splash screens
* wonder splash screens atlas
* reset to master
* Add Sweden
* add translations
* translations
* implement first part of UP
* add icons to atlas
* implement second part of swedens up
* implement first hakkapeliitta unique
* implement second hakkapeliitta unique
* gifted GPs are removed
* update sweden symbol
* translations
* review Hakkapeliitta unique
* removed unneccesary parameters
* hakka UP review
* Hakka UP part 2
* yairm's reviews
* translations for fixes
* removed [great person generation] parameter as it's hardcoded anyway
* Moved check for stacking unit bonus outside great general logic
* Minor things
* Added a few follower beliefs
* Implemented follower beliefs when founding a religion
* Added missing follower beliefs as much as possible
* Religion screen now scrolls correctly
* Buttons for chosen religions are now disabled instead of removed, idea couresty to someTroglodyte
* Implemented requested changes
* wonder splash screens
* wonder splash screens atlas
* reset to master
* add basic gifting to city states and major civs
* actual gifting of the unit
* add gift icon to atlas
* adjust relationship decay
* add strings to jsons
* AI and player return same object
* Fixed crashes on loading save games with religion
* Added missing credit
* Religious cities now show religion icons in the city button
* Add icons for religions
* You can now found beliefs, with snazzy icons!
* Fixed bug which made prophets impossible to generate
* Added missing translatable strings
* Fixed translation tests properly
* Implemented requested changes
* Implemented part of the requested changes
* Removed SplitPane in favor of Table
* Removed unused code
* Capped the amount of foundable religions to the amount of religions
* City States now give gold when met
* City States can now receive different amounts of gold, and the amount of influence gained from gifts follows the base game
* Implemented requested changes
* Fixed tests
* Add a very simple display for the religion in a city
* Added missing credits for shrine
* Added Great Prophet unit
* Great prophets can now be generated using faith
* Great Prophets can now construct holy sites
* Great Prophets can now spread their religion to friendly cities
* Holy site can only be constructed if the great prophet hasn't spread religion yet
* Added missing translation string
* Fixed more translation problems
* Implemented requested changes
* Added privateer unit
* Privateers can now capture other naval units
* Updated Coastal Raider promotion to include the gold gained from damaging cities
* Added missing translatable notification
* Implemented requested changes
* Implemented requested changes _but better_
* Forgot to update a variable name
* Fixed bugs where nukes don't work due to capitilzation issues
* Renamed existing translations
* Fixed crash happening when nuking tiles without an owner
* Added notifications to attacker for civs that have declared war as a result of the nuke dropping
* Improved nukes
* Fixed build error (probably)
* Implemented reocmmended changes, fixed some other stuff, the usual
* Implemented requested changes
* Fixed Tech connections
* Fixed nuclear missiles and guided missiles being interceptable
* Missiles are no longer air units. This is, as they cannot be stationed on carriers and cannot be intercepted.
* Created Patronage policy branch -- draft
* Patronage branch is now functional
* Added images for the policies
* Temporarily bandaged backwards compatability, added incompatabilities
* Implemented recommended changes
* Fixed acquirement of 'patronage complete' not being saved
* Reverted change I was unhappy with
* Implemented requested changes
* Fixed build errors
* Implemented recommended changes
* City States can now give any great person, including unique ones, conform Ravignirs tests
* Added the Utopia Project for the culture victory; AI will now build it
* Forgot to credit the icon
* Fixed a few minor issues
* Improved code quality; added translatable notifications
* Fixed mistakes; improved quality
* Changed a label
* Revert a small change which is no longer necessary
* Reverted the revert of a small change which is no longer necessary
* Made requsted changes
* Map Generation Seedable
* Added Seed editable field in MapParametersTable
Previously, using the same set of parameters, one could not get the same map twice (i.e. negligible probability for it to happen). With this commit players can specify, alongside the usual map parameters, a long integer used to seed the RNG and get replicable results.
* Fixed Natural Wonder Spawn was not using MapGenerationRandomness hence giving not reproducible maps
* Translation strings
* * Renamed Continents to Two Continents
* Created Four Continents map size
It spawns a vertical and a horizontal ocean to split the map in 4 major continents. Works properly on all sizes and with world wrap
* Fixed Pangea extending to boundaries in rectangular maps
* Unified Pangea for rectangular and hexagonal maps
* Fixed Default map type bias on Rectangular maps. Also removed "pangea effect" on Default: land can spawn with the same probability in the whole map.
* New map type: 4 Corners
* Reverted name change Two Continents to Continents
* Renamed Four Continents to Four Corners (to reflect original name in Civ5)
* Added translation strings
* New map type: 4 Corners
* Reverted name change Two Continents to Continents
* Renamed Four Continents to Four Corners (to reflect original name in Civ5)
* Added translation strings
* Refund wasted production as gold
Any wasted production, from for instance a partially completed wonder or
obsolete units, will now be refunded as gold (in a 1:1 ratio).
We update both at the start and end of the user turn. Updating at the
start to account for wonders completed after our previous turn and
updating at the end to account for obsolete buildings/units as a
consequence of our own turn.
When obsolete units get replaced by their upgraded version (as in civ 5)
this code should probably be updated.
* Implement wonder refund and obsolete unit upgrade
If a wonder is built somewhere else but the user has production in this
wonder, the production will be refunded as gold in a 1:1 ratio. A
notification will be shown to indicate this. This reflects the behaviour
in Civ 5.
If a unit becomes obsolete and an upgrade is available, the production
put into this unit will now be transferred to the upgraded version. If
the unit is queued, the queued unit will also be changed to the new
version and the user will be notified via notification.
* Shorten notification messages
* Update alerts: been obsolete -> become obsolete
* Added an icon for unit swapping
* Implemented unit swapping
In the original Civ V, unit swapping is a supported mechanic.
If you try to move a unit to a tile with another of your units, and both
units have enough movement points left to reach the other's tile, they
will swap places. They will consume only the movement points needed to
reach the other's tile in this way.
This change implements unit swapping for Unciv.
To prevent all kinds of problems from arising with automatic unit
movement, unit swapping can only be done explicitly. This also means
that it can only be done if the unit-swap movement is possible in a
single turn. It is however not limited to adjacent units.
Because Unciv supports mobile devices, there is in general no separation
between a unit-selection click and a movement click. Clicking on another
unit while a unit is selected simply selects that other unit. Because we
do not want to make it more difficult to select other units in this way,
unit swapping is implemented as a separate "movement mode": to toggle
this mode on or off, the new unit action "Swap units" must be used.
Newly selected units still always start in the normal movement mode.
In the unit-swap movement mode, the possible swap tiles are highlighted
instead of the possible movement and attack tiles. Clicking on a
highlighted tile will display a swap button, similar to the movement
button, or instantly perform the swap if single-click-movement is
enabled. This new behavior overrides the selection of the unit on the
target tile: if the user wants to select the unit instead, they have to
exit the unit-swapping mode first.
The swapping code is robust, it can even handle swaps that involve a
paradrop!
An option to always swap-move when an eligible tile is clicked instead
of requiring the unit-swapping mode, similar to the existing
single-click-movement option, could perhaps be added in later.
* Added some comments to existing movement functions
* Fixed a silly mistake
Fixed a silly mistake which caused the unit-swapping eligibility
detection to sometimes remove units from the world.
* Removed some unneeded code
* Fixed movement buttons not showing with world wrap
Fixed a bug where the "move here" and "swap with" buttons would only
show on the leftmost copy of the world when world wrap was enabled.
* Made the swap action only display if usable
Made the unit swapping button only display if there is at least one
possible swap movement.
* Added the paratrooper unit
* Reverted accidental reordering of action table
* Fixed Github build errors
* Hopefully actually fixed the build errors
* Added a Dutch translation, finally fixing the error
* Paratroopers can no longer actually paradrop on a tile they shouldn't be able to paradrop onto
* Removed double update action
* Add global alerts for certain constructions
In the original game, certain constructions alert all players upon
their completion. This commit introduces a new unique for this behavior
and adds this unique to the relevant constructions.
The code that implements the new unique is placed in
Building.postBuildEvent, so it can only be activated by buildings. If
other kinds of constructions require a global alert as well, the code
could be moved to CityConstructions.constructionComplete.
* Removed redundant line in template.properties
* Moved global alert logic to CityConstructions
Moved the implementation of "Triggers a global alert upon completion"
from Building.postBuildEvent to CityConstructions.constructionComplete,
close to the similar Wonder notification logic.
* Add nullable "instanceName" field to MapUnit to capture name for individual units
* Add "displayName" property to MapUnit which takes instanceName if set, name
otherwise
* Add dialog to PromotionPicker to allow setting instanceName of unit, if not
already set
* Adding give up function for multiplayer
* Update template.properties
* Reviewed changes
- Changed "give up" to "resign"
- Removed unnecessary and harmful translations
- Using YesNoPopup now
* Add missing space
* fixed first AI turn getting skipped
* Added "All [] Cities get a free []" unique.
The first parameter is for city type. Currently "new" and "coastal" are supported.
"new" matches every city and "coastal" matches cities on a coastal tile.
"new" and "coastal" were added to template.properties for translation.
Upon city founding, the second parameter building is added to the city.
In civ 5 G&K, Carthage gets a free harbor for every coastal city.
* -Syntax changed to "Get a free [] []"
First paramater is the building and second is the city filter.
Supports "in every city" and "in every coastal city"
-new and coastal was removed from template.properties
-in every coastal city was added to template.properties
* Changed syntax to "Gain a free [] []"
* Preparation for Helicopter unit
-"All tiles costs 1" unique makes every tile cost 1. Used by Helicopter in CIV 5.
-"Can pass through impassable tiles" unique allows unit to pass through any tile. Used by Helicopter in CIV 5. Does not let units cross ocean if they couldn't already, just terrain that is considered "impassable"
-Mountains now do 50 damage to units that end turn on it. In civ 5 and its expansion this is what happens to any unit that is able to pass mountains.
This is "hard coded" for now. Also added the notification text to template.properties
* mountains do not give sight bonus when on them
* Revert "mountains do not give sight bonus when on them"
This reverts commit 83ad3df5d4.
* -Consolidated unit kill bonus uniques.
Syntax is "Earn []% of [] opponent's [] as [] for kills" for both units and nations.
Ex.
"Earn [10]% of [military] opponent's [Cost] as [Gold] for kills"
or
"Earn [100]% of [Barbarians] opponent's [Strength] as [Culture] for kills"
Only Culture and Gold are supported as rewards now, but it can be expanded later. The pictish warrior unit in G&K gets 50% of opponent's strength as faith, so we can have the function edited to allow for faith when we get to that point.
Only Strength or Cost is supported as what the reward amount is based on.
-Policies.json and Nations.json were changed to fit the new syntax. The old syntax still works for mods for now.
-matchesCategory MapUnit function can now check if the unit is a barbarian
* -Compatibility for depecrated unit kill bonus uniques done more efficiently and counted only once (since prior to this PR, it was also counted only once)
* -Changed it to "Barbarian" instead of "Barbarians", added "Barbarian" to template.properties
* space after translation template
* -New unit unique "Bonus as Defender []%". "+25% Combat Bonus when defending" now deprecated, but kept for now for mods. Json promotion changed to fit new syntax.
Defender Bonus modifier "Defender Bonus" added to template.properties for translation.
-"All newly-trained [] units in this city receive the [] promotion" now uses unit category checking.
-New building unique "New [] units start with [] Experience in this city"
This can used by Poland's stable unique replacement in BNW, as it gives extra xp for mounted units.
"New [] units start with [] Experience" is the new nation wide version of this.
"New military units start with [] Experience" is now deprecated, but kept for now for mods. Json policy changed to fit new syntax.
-Unit category checking can now check for "non-air", "military", "military units" and uniques.
Added "military" to template.properties for translation.
-New unit unique "No defensive terrain penalty". Admittedly this is for a mod I'm making.
* translations must have spaces after!
* -Attacker Bonus unique changed to "+[]% Strength when attacking"
Changed Units.json and and Wolf Pack from UnitPromotions.json to this syntax
-Defender Bonus unique changed to "+[]% Strength when defending"
Armor Plating promotions were changed to this syntax
* City State Personality
* Introduced 4 personalities for city states: Friendly, Neutral, Hostile and Irrational.
* Influence recovery and degrade depends on city state personality.
* Quests assignement dependant on Personality and Trait
* Personality localization strings