Commit Graph

3583 Commits

Author SHA1 Message Date
35c08b4c18 Fix question on found city action breaking promise - no AI (#4156) 2021-06-15 22:44:50 +03:00
d6ec203873 Tooltips - all key indicators (#4128) 2021-06-15 19:43:43 +03:00
434136e6cc Updated Commerce branch to G&K (#4129)
* Updated Commerce branch to G&K

* Implemented requested changes
2021-06-15 09:52:59 +03:00
09f1deaee0 Fixed RNG: Maps reproducibility (#4112)
* The RNG for picking resources locations and rivers starting points was not seeded properly. Maps are now fully reproducible by passing the same set of MapParameters

RNG Seed in Map Editor
* Creating a new map from MapEditorMenuPopup reseeds automatically the RNG
* Added Seed on top of MapEditorMenuPopup
* Added Copy to clipboard button on top of MapEditorMenuPopup to copy the currently used RNG Seed
* UI FIX: Buttons in MapEditorMenuPopup have all the same width

Fixed RNG Seed in NewGameScreen
* When clicking on "Start new game" from VictoryScreen, a new seed is generated
* When clicking on "Start new game" from WorldScreenMenuPopup, a new seed is generated
2021-06-15 09:50:03 +03:00
e1c6cef111 Show promises not to settle, ask on found city action (#4148) 2021-06-15 09:49:08 +03:00
5e1803c40a FIX: unintended code slipped through (#4143) 2021-06-14 22:44:09 +03:00
fbebcdcd21 Updated Rationalism branch to G&K (#4136) 2021-06-14 15:10:49 +03:00
1c21573a42 Updated the culture victory so it now requires the Utopia Project to be built (#4060)
* 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
2021-06-14 14:48:22 +03:00
07a43f3f1a Fix crash caused by cascaded ruins unit gifts (#4133)
* Fix d1f6c5ac breaking builds

* Fix d1f6c5ac breaking builds - patch1

* Fix silent crash when ancient ruins cascade gifted units
2021-06-14 14:44:43 +03:00
d1f6c5ac0a Deprecated "Bonus vs <unitType> <amount>%" in favor of "+[amount]% Strength vs [unittype]" 2021-06-13 22:47:41 +03:00
60d8adce38 3.15.0 2021-06-13 22:40:12 +03:00
85158ab29d TradeType Enum marginal cleanup and Gold Font symbol (#4127) 2021-06-13 22:22:44 +03:00
5f66c57de5 Proposal for New borders (#4124)
* new-borders

* New Borders
2021-06-13 21:56:47 +03:00
ea852f9fa0 Unified Menu Popups (#4113) 2021-06-13 21:56:32 +03:00
0d79326869 Updated Tradition branch to G&K (#4106)
* Updated Tradition branch to G&K

* Small performance boost for calcualting maintenance; fix crash on next turn

* Fixed a bug where maintenance-free buildings would still cost maintenance

* Simplified some code

* I am unable to read

* Fixed a few broken uniques, including #4109

* Implemented requested changes
2021-06-13 08:14:31 +03:00
da991b5f66 Updated Honor branch to G&K (#4118)
* Updated Honor policies to G&K

* Simplified another unique

* Implemented requested changes
2021-06-13 08:11:14 +03:00
60809db065 Updated Liberty branch to G&K (#4115)
* Updated Liberty branch to G&K, improved modularity of uniques

* Updated meritocracy to only affect non-occupied cities

* Implemented requsted changes
2021-06-13 08:06:35 +03:00
a99cca5b28 Display Movement Paths (#4114) 2021-06-12 23:48:22 +03:00
7a9f111125 Main menu key bindings (#4082) 2021-06-12 23:45:40 +03:00
1bf6253d87 CityScreen resize (#4117) 2021-06-12 23:20:34 +03:00
eda6dece9c Implement dormant Nation.startIntroPart1+2 (#4091)
* Implement dormant Nation.startIntroPart1+2

* Implement dormant Nation.startIntroPart1+2 - translation
2021-06-10 23:16:35 +03:00
7e284f998b Redraw skin Images, edit skin load method (#4080) 2021-06-10 23:10:13 +03:00
f71ac0deab Revert "Revert "Revert "Redraw TechPickerScreen and PickerScreen, Make map symmetrical if it's not wrapped (#3757)"" (#3991)"
This reverts commit 298693ab03.
2021-06-09 22:34:29 +03:00
298693ab03 Revert "Revert "Redraw TechPickerScreen and PickerScreen, Make map symmetrical if it's not wrapped (#3757)"" (#3991)
This reverts commit 6d5cb00271.
2021-06-09 21:38:20 +03:00
e0a8de9eb5 Trade UI - Leader portraits, keys, layout (#4073)
* Trade UI - Leader portraits, keys, layout

* Trade UI - Leader portraits, keys, layout - fix1

* Trade UI - Leader portraits, keys, layout - fix2
2021-06-09 20:56:26 +03:00
db1604b0bc Fix turnsLeft return 0 if 0 < workLeft <= overflow (#4086) 2021-06-09 20:53:19 +03:00
68a3e09a19 Resolved #4083 - Reconquering cities you've founded leads to no resistance 2021-06-08 23:00:35 +03:00
8441ab9e56 Cities in resistance cannot bombard, as per Civ V - #663 2021-06-08 21:59:23 +03:00
7cad6dcfe5 Implement production overflow (#4081)
As discussed on yairm210#4058, production (or hammer) overflow in Civ 5
is a thing and goes according to rules described on
https://forums.civfanatics.com/threads/hammer-overflow.419352/
This has been added to the game. There are no visual indicators for the
user yet. This will probably be added later.
2021-06-08 21:16:06 +03:00
b2691eed70 Deprecated notification color 2021-06-08 20:04:32 +03:00
e8bbd4bc70 Resource.building, Building.resourceBonusStats deprecated in favor of '[stats] from [resource] tiles in this city' unique 2021-06-08 20:01:49 +03:00
21aa371cc3 Re-show redundant tech prereq mod errors without impeding playability (#4046)
* Re-show redundant tech prereq mod errors without impeding playability

* Re-enable playability of mods with less severe errors - fun version
2021-06-08 06:44:25 +03:00
0b696451ce Map Generation Seedable (#4072)
* 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
2021-06-08 06:42:27 +03:00
7c9b0e04b4 Map Generation Fixes and Tweaks (#4069)
* * 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
2021-06-08 06:41:02 +03:00
fadd1684ac Make CivilizationInfo.gold read-only (#4074)
* Make CivilizationInfo.gold read-only

* Make CivilizationInfo.gold read-only
2021-06-08 06:40:17 +03:00
cd58f6ace8 Refund wasted production as gold (#4058)
* 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
2021-06-07 22:04:33 +03:00
7a5b88923d Cosmetic: Convenience shortcuts, some linting (#4067) 2021-06-07 07:26:01 +03:00
a7afc0718c Unit swapping (#4049)
* 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.
2021-06-06 22:56:25 +03:00
cc3eeb3c7c Fix gold able to over- and underflow (#4065) 2021-06-06 19:29:23 +03:00
298dbcb3ee More power to improvement uniques (resourceTerrainAllow-be-gone) (#4024)
* More flexibility for modding improvements (tileFilter), deprecate resourceTerrainAllow

* More tileFilter and improvement uniques - Translations

* Update template.properties

* More tileFilter and improvement uniques - Revert and/or inside unique parameter
2021-06-06 12:40:02 +03:00
dc8657dc02 Map editor save / load / download keys (#4056) 2021-06-06 12:36:12 +03:00
11cbe1c84a TileInfoTable translation and padding (#4061) 2021-06-06 12:26:55 +03:00
52b7999c48 Map editor fix translations, a few keys (#4055) 2021-06-06 09:18:22 +03:00
d7b2436bcf Fixed a few bugs noted in #4057 (#4062) 2021-06-06 09:15:22 +03:00
6c203d68f7 Unified exit game popups, removed obsolete closing handler (#4048) 2021-06-06 09:09:02 +03:00
a1b0a90506 3.14.14 2021-06-04 14:33:22 +03:00
c5d81569f7 Removed some by-name references in construction automation 2021-06-03 22:44:13 +03:00
e22c53ca96 Key dispatcher precedence with several Popups open (#4040)
* Key dispatcher precedence with several Popups open

* Key dispatcher precedence with several Popups open - remove instrumentation
2021-06-03 22:30:42 +03:00
4b06a55bb5 Resolved #3967 - City-states can no longer 'gift' you your unique units 2021-06-03 22:25:27 +03:00
7cc440a577 Merge branch 'master' of https://github.com/yairm210/Unciv 2021-06-03 19:08:39 +03:00