* 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.
* Technology and construction bars no longer extend past their maximum
* Fixed compile errors
* actually fixed the issue
* Added the marine unit
* Moved amphibious promotion effect to unique
* Added icons for Amphibious promotion and Marine unit
* aaah
* Update Turkish.properties (#3964)
* Update Spanish.properties (#3963)
* Update Indonesian.properties (#3960)
* Update Indonesian.properties
* Update Indonesian.properties
* Update Italian.properties (#3956)
* Update Spanish.properties (#3970)
* Fix spaceship part production boosts (#3953)
Previously, the buildings and wonders that should boost spaceship part
production (Forge, Spaceship Factory and Hubble Space Telescope) would
not provide this boost (#3952). This commit fixes the issue.
The problem was caused by the fact that the spaceship part-boosting
uniques would only boost spaceship part UNITS while spaceship parts are
currently buildings.
The added comments serve as a reminder to change the uniques if
spaceship parts are ever changed into units.
* Update Spanish.properties
I had to reopen a new pull request due to conflicts the other had.
Co-authored-by: Arthur van der Staaij <32672293+avdstaaij@users.noreply.github.com>
Co-authored-by: Nazım Gediz Aydındoğmuş <nga@hotmail.com.tr>
Co-authored-by: ArchDuque-Pancake <78449553+ArchDuque-Pancake@users.noreply.github.com>
Co-authored-by: kensvin <63847755+Kensvin28@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: chriscr2 <70113017+chriscr2@users.noreply.github.com>
Co-authored-by: Arthur van der Staaij <32672293+avdstaaij@users.noreply.github.com>
Previously, the buildings and wonders that should boost spaceship part
production (Forge, Spaceship Factory and Hubble Space Telescope) would
not provide this boost (#3952). This commit fixes the issue.
The problem was caused by the fact that the spaceship part-boosting
uniques would only boost spaceship part UNITS while spaceship parts are
currently buildings.
The added comments serve as a reminder to change the uniques if
spaceship parts are ever changed into units.
* Removed Duplicates and HillForest
since the Image HillForest got renamed to Forest to reduce ruleVariants
* reorganized legacy variants
* Added "Offshore Platform" for oil well on water
* changed hill to terrain Feature
* Update Terrains.json
* Update Terrains.json
* Snow with capital S
* Fixed tests failing
* Added check for ruleset supports hill as terrain feature
* Chinese translation update (#3825)
* Update Czech.properties (#3815)
* Update Czech.properties
Note for czech translators:
Zakulacený svět zní divně, ale nevím, jak jinak to přeložit. Budu rád za nápady.
* Update Czech.properties
* Update Italian.properties (#3812)
Co-authored-by: lishaoxia1985 <49801619+lishaoxia1985@users.noreply.github.com>
Co-authored-by: jahodovykolac <79529669+jahodovykolac@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
* Update German.properties (#3808)
* Fixed unitType parameters in changed unique
* Spanish changes by @ArchDuque-Pancake in #3787
* "[] from every []" can accomodate specialist names
* Fixed - 'Water units' now can be capitalized, as they should be.
* Added warning for world wrap for Android - I'm seeing a lot of ANRs for this, but it's not something I think I can solve
* Update German.properties
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Update Polish.properties (#3803)
* Fixed unitType parameters in changed unique
* Spanish changes by @ArchDuque-Pancake in #3787
* Update Polish.properties
* Update Polish.properties
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Update Italian.properties (#3797)
* Fixed unitType parameters in changed unique
* Spanish changes by @ArchDuque-Pancake in #3787
* Update Italian.properties
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Spanish - Added Required Translations (#3796)
* Fixed unitType parameters in changed unique
* Spanish changes by @ArchDuque-Pancake in #3787
* Required Translations Added
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
Co-authored-by: Martin Pechstein <77325495+Mape6@users.noreply.github.com>
Co-authored-by: GEEZET1 <67857834+GEEZET1@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: another-sapiens <80379945+another-sapiens@users.noreply.github.com>
* Update Italian.properties (#3779)
* Update Spanish.properties (#3778)
* Update Spanish.properties
* Update Spanish.properties
Co-authored-by: jorgman1 <jorgman1@protonmail.com>
* Update German.properties (#3777)
* Update German.properties
* Update German.properties
* Update German.properties
* Update Japanese.properties (#3776)
* Update Spanish.properties (#3782)
I have made a research, and, despite of an "arcabuz" being somewhat diferent from a musket, it´s basically the same.
* Update Russian.properties (#3792)
* Natural wonders are standalone tiles in new layering
* Can handle unique capital indicators in mods
* 'military' -> 'Military' for e.g. [Military] units, same as other unit types which are capitalized
* Differentiated between 'Land' as in 'Land unit' and 'Territory' for rankings
* Added TileSetConfigs (#3766)
* First iteration of TileSet json
* Adding json support for mods
* Renamed TilesetConfig to TileSetConfig
+ changed the config for FHex to fix the mountain natural wonder problem
* Resolved#3353 - Changed "Earn [amount]% of [param] opponent's [param2] as [stat] for kills" to "Earn [amount]% of killed [param] unit's [param2] as [stat]"
* Preparation for hill as terrain feature (#3784)
* ensure backwards compatibility
* Added new Hill.png
* Added temp TileSetConfig to support new hill sprite
* Added missing Ancient ruins tiles
* Fixed Multiplayer bugs (#3781)
* Removed save feature from TurnChecker
* Hopefully fixed not correctly updating multiplayer games?
* Fixed "refresh list" not updating the savegame correctly
* Fixed game update when upload fails
* Revert "Fixed game update when upload fails"
This reverts commit cc9f1cf589.
* Fix Citadel not quite buildable where it should be (#3788)
* updated the Russian translation file
* Fixed typos in the Russian translation file
* Fixed [tileFilter] in Rus lang file
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
Co-authored-by: GGGuenni <leonard@eynck.de>
Co-authored-by: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: jorgman1 <48908520+jorgman1@users.noreply.github.com>
Co-authored-by: jorgman1 <jorgman1@protonmail.com>
Co-authored-by: Martin Pechstein <77325495+Mape6@users.noreply.github.com>
Co-authored-by: paontv <57051667+paontv@users.noreply.github.com>
Co-authored-by: ArchDuque-Pancake <78449553+ArchDuque-Pancake@users.noreply.github.com>
Co-authored-by: Maxim Logaev <51446645+turbocat2001@users.noreply.github.com>
Co-authored-by: GGGuenni <leonard@eynck.de>
Co-authored-by: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com>
* Removed save feature from TurnChecker
* Hopefully fixed not correctly updating multiplayer games?
* Fixed "refresh list" not updating the savegame correctly
* Fixed game update when upload fails
* Revert "Fixed game update when upload fails"
This reverts commit cc9f1cf589.
* First iteration of TileSet json
* Adding json support for mods
* Renamed TilesetConfig to TileSetConfig
+ changed the config for FHex to fix the mountain natural wonder problem
* Update French.properties (#3767)
* Create French.properties
* Update French.properties
* Update French.properties
* Update German.properties (#3764)
* Update Czech.properties (#3763)
Translated some new lines and city-states' diplomacy
* Hungarian.properties (#3761)
* Update Spanish.properties (#3774)
There were a few 'translation!' messages, I didn't check the already completed text. If any help is needed please let me know. My discord name is john2342#8925
* Deleted unnecessary space before colon, update czech.properties (#3773)
* Deleted space before colon
In VictoryScreen.kt was one extra space, looking like "Spain : 35" instead of "Spain: 35"
* Update Czech.properties
Co-authored-by: Loubard Kevin <70336598+subversive-eu@users.noreply.github.com>
Co-authored-by: Martin Pechstein <77325495+Mape6@users.noreply.github.com>
Co-authored-by: jahodovykolac <79529669+jahodovykolac@users.noreply.github.com>
Co-authored-by: JurDan775 <80947706+JurDan775@users.noreply.github.com>
Co-authored-by: juan234248 <77988217+juan234248@users.noreply.github.com>
* Create Bulgarian.properties
This is WIP on the Bulgarian translation
* Update Bulgarian.properties
Edited with the '='
* Update Bulgarian.properties
* Update
Updated some move values. Sorry for the long delay.
* Update Bulgarian.properties
With the help of PresleyBG
* Renamed several variables
* Update German.properties (#3680)
* Update German.properties
* Update German.properties
* Update German.properties
* Updated Spanish translations (#3677)
* Completed Spanish translations
* UnitTable.kt modifications to place cancel, previous idle unit and next idle unit below unit information
This was made in order to prevent previous idle unit and next idle unit keys' positions to change depending on how big the unit info box is.
* NotificationsScroll: Made notifications dark blue with white text.
* Improved Spanish translations
* Revert "NotificationsScroll: Made notifications dark blue with white text."
This reverts commit 63b8ba2e
* Completed Spanish translations
* UnitTable.kt modifications to place cancel, previous idle unit and next idle unit below unit information
This was made in order to prevent previous idle unit and next idle unit keys' positions to change depending on how big the unit info box is.
* NotificationsScroll: Made notifications dark blue with white text.
* Improved Spanish translations
* Revert "NotificationsScroll: Made notifications dark blue with white text."
This reverts commit 63b8ba2e
* Revert "UnitTable.kt modifications to place cancel, previous idle unit and next idle unit below unit information"
This reverts commit d970632b
* Improved Spanish translations
* Update German.properties (#3676)
* Replaced ß with ss in some words.
* Update German.properties
* Update TileImprovements.json
Fixed typo
* Update German.properties
* Update German.properties
* Update German.properties (#3673)
* Update German.properties (#3672)
* Update Czech.properties (#3670)
new strings, few typos
translated ottoman, kroean, iroquois and persian diplomacy and cities
Co-authored-by: Martin Pechstein <77325495+Mape6@users.noreply.github.com>
Co-authored-by: 71walceli <antonini2903@hotmail.com>
Co-authored-by: stoupa007 <60326342+stoupa007@users.noreply.github.com>
* 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
* Update Czech.properties (#3597)
* Update Czech.properties
new strings, american and japan diplomacy
* Update Czech.properties
fixed param typo
* Update Malay.properties (#3596)
Translate some of the tutorial phase, dialogues and other in-game selection buttons.
* Update Italian.properties (#3594)
Co-authored-by: stoupa007 <60326342+stoupa007@users.noreply.github.com>
Co-authored-by: SNN95 <41881544+SNN95@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
* no message
* Revert "no message"
This reverts commit 9ece60bd58.
* Renamed Haka War Dance effect to Intimidation, to make it more applicable to non-Maori Warrior units.
* no message
* Parameterized civUnique for extra experience from combat
* Update build.gradle.kts
* Update BattleDamage.kt
* Update Policies.json
* Update Battle.kt
* Fully parameterized nationwide XP gain
* New parameterized uniques for border expansion - "-[]% Gold cost of acquiring tiles []" and "-[]% Culture cost of acquiring tiles []"
* Parameterized uniques for acquiring new tiles via either culture or gold
* Parameterizing expansion unique - improved calculation method
* Improved parameterization for border expansion uniques
* 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
* no message
* Revert "no message"
This reverts commit 9ece60bd58.
* Renamed Haka War Dance effect to Intimidation, to make it more applicable to non-Maori Warrior units.
* no message
* Parameterized civUnique for extra experience from combat
* Update build.gradle.kts
* Update BattleDamage.kt
* Update Policies.json
* Update Battle.kt
* Fully parameterized nationwide XP gain
* TurnChecker now checks every multiplayer game
Not just the currently open game
* Adding game saving to turn checker
so multiplayerScreen stays up to date
* remove unused imports
* removing unused functions
* 1 new line
* show tile yields
* 1 new line
* Move to city
* 3 new lines
* The resistance in [cityName] has ended!
* +[amount]% Production when constructing [unitType] units
* Doubles Gold given to enemy if city is captured
* 4 new lines
* Receive a tech boost when scientific buildings/wonders are built in capital
* -[amount]% [param] unit maintenance costs
* Excess Food converted to Production when under construction
* Requires at least [amount] population
* 3 new lines
* New [param] units start with [amount] Experience
* All tiles cost 1 movement
* Can pass through impassable tiles
* Update Italian.properties (#3509)
* Update Russian.properties (#3512)
Just a small addition to the previous request as I missed one line.
* Added Aztecs quotes translations (#3513)
Additionaly, added a few Aztec's cities names and other minor changes. Also changed some miscellaneous phrases to match context.
* Update Japanese.properties (#3515)
Improvement of Japanese translation
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: BodyaBilder <77171011+BodyaBilder@users.noreply.github.com>
Co-authored-by: Gualter Machado <35864822+GualterMM@users.noreply.github.com>
Co-authored-by: hirmonik <76709219+hirmonik@users.noreply.github.com>
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Update Czech.properties
new translations, some typo fixes, rome diplomacy and cities
* Update Czech.properties
arabian diplomacy and cities
* Update Czech.properties
typos fixed
* Update Italian.properties (#3447)
* Strings translations (#3454)
* Update Indonesian.properties (#3458)
* Update Indonesian.properties
* Update Indonesian.properties
* Brazilian Portuguese language updates (#3459)
Hi, I translated everything that was missing from the list, but I didn't translate the names of the cities, it would take a long time, but the rest did everything and I hope I'm helping!
* Update Brazilian_Portuguese.properties
@Aguibizanno1 - you uncommented some comment lines, which made the tests fail. Lines starting with # are comment lines, so don't touch those :)
* Update Brazilian_Portuguese.properties
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Jack Rainy <JackRainy@users.noreply.github.com>
Co-authored-by: Kensvin <63847755+Kensvin28@users.noreply.github.com>
Co-authored-by: Aguibizanno <75736611+Aguibizanno1@users.noreply.github.com>
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* try to implement korean ability
* Corrected typo error
Coreect camel typo errror
* updated new korean feautre translation.
* edited korean unique text to get right sentence.
* merge duplicated code into addScience(Int)