Commit Graph

4291 Commits

Author SHA1 Message Date
Yair Morgenstern
43f5799578 Specialist information is now hybrid 2020-09-30 18:03:26 +03:00
Federico Luongo
9f9d89af9d
resourceIsVisible to be checked before getting tile resource (#3201) 2020-09-30 17:28:05 +03:00
Yair Morgenstern
e983be0325 Started converting specialists to by-json and by-name 2020-09-30 13:10:02 +03:00
Yair Morgenstern
f411089b8d Better improvement on tile checks 2020-09-30 11:06:51 +03:00
Yair Morgenstern
f50a757069 Unified "improvement on tile" checks 2020-09-30 10:51:22 +03:00
Federico Luongo
adaee7e7ab
City State quests (#3183)
* City State quests

* Flag to log two civ ever been friends
* Utility functions in GameInfo
* Created Diplomacy Action for notifications
* Utility functions for map
* Can be specified a custom color for surroundWithCircle
* Translation placeholder utility
* Added Quest model
* Utility function: number of researched technologies

* Image atlas rebuilt

* Localization

* Updated DiplomaticFlags and added EverBeenFriends

Slightly reworked nextTurnFlags() for code clarity and introduced the new flag EverBeenFriends that is set as soon as two civilizations are at least friends. It never expires.

* Removed quests not implemented yet from json
2020-09-29 23:26:50 +03:00
Yair Morgenstern
847abf31d1 3.10.13 2020-09-29 15:52:39 +03:00
uncivbot[bot]
81a1bcb6ed
Translations update (#3198)
* Update Italian.properties (#3188)

* Update Italian.properties

* Update Italian.properties

* Update Italian.properties

* Update Italian.properties

* Update Czech.properties (#3193)

new parametrised strings
Babylonian, Egyptian, English cities finished
French diplomacy and cities
Russian diplomacy and cities

* Update Spanish.properties (#3195)

* Update Indonesian.properties (#3196)

* So many hungarian translations (#3197)

* So many hungarian translations

* Fixing placeholders

Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: stoupa007 <60326342+stoupa007@users.noreply.github.com>
Co-authored-by: chriscr2 <70113017+chriscr2@users.noreply.github.com>
Co-authored-by: Kensvin <63847755+Kensvin28@users.noreply.github.com>
Co-authored-by: Krisztian Papp <30371056+pehsa@users.noreply.github.com>
2020-09-29 15:45:32 +03:00
Yair Morgenstern
9b3dd5058f Better checking for unloadable scenarios 2020-09-29 14:15:00 +03:00
Yair Morgenstern
6662944f32 Resolved #3085 - reconquering our cities while they were still in resistance leads to them not having resistance against us 2020-09-29 11:48:21 +03:00
givehub99
56dbd5459e
"No Maintenance costs for improvements in []" generic unique. Compatibility for Incan unique without having to edit the nations.json file. (#3194) 2020-09-28 23:34:36 +03:00
Yair Morgenstern
30396239c1 Cannot open multiple gold selection popups in trade table 2020-09-28 23:06:46 +03:00
Yair Morgenstern
fa5d2b6f49 3.10.12 2020-09-26 21:25:58 +03:00
Yair Morgenstern
e1819eb748 Scenarios that can't be loaded not displayed to users 2020-09-26 21:24:54 +03:00
uncivbot[bot]
bfadf2943b
Translations update (#3187)
* Update Italian.properties (#3174)

* Update Italian.properties

* Update Italian.properties

* Update Italian.properties

* Update Indonesian.properties (#3176)

* Update Dutch.properties (#3182)

Added extra translations for city states, starting new game, start screen and multiplayer

* Update Czech.properties (#3185)

new strings
diplomacy and cities - Akkad, England

Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Yunichi <65927826+Yunichie@users.noreply.github.com>
Co-authored-by: knoeier0 <71691687+knoeier0@users.noreply.github.com>
Co-authored-by: stoupa007 <60326342+stoupa007@users.noreply.github.com>
2020-09-26 21:16:54 +03:00
HadeanLake
0f97c5eb59
parameterized few uniques, fixed "Mass Media" tech in mods (#3184)
* parameterized "Culture cost of adopting new Policies reduced by [10]%" and "Each city founded increases culture cost of policies [33]% less than normal"

* removed old fix for abcense of "Mass Media" tech so mods can have this tech
2020-09-26 20:59:22 +03:00
Yair Morgenstern
33270baea2 Resolved #3186 - Diplomacy overview displays war/peace status and not relationship level. 2020-09-26 20:40:51 +03:00
Yair Morgenstern
43bef4d88d Better trade cancellation when all cities are offered (also includes player-to-player cases, not only AI) 2020-09-25 15:33:12 +03:00
Yair Morgenstern
009c59b77c Fixed modded images not loading properly 2020-09-25 13:50:02 +03:00
Yair Morgenstern
98a79f8fb4 Removed edge case option where the AI can trade you all of their cities 2020-09-25 13:42:13 +03:00
givehub99
1f52a8ad88
Hide Unit or Building as Unique (#3181)
* This allows for unique unit or building not to be displayed as a unique on the nation select screen and nation civilopedia entry.

The primary usage of this to allow modders to avoid having their dummy unit/building that is used to disallow a nation from making the unit/building it replaces, from
appearing as a unique to the player. In other words, it won't show the comparison stats/etc.

In conjunction with this PR https://github.com/yairm210/Unciv/pull/3180 it allows modders to cleanly disallow nations from making certain units/buildings.

This would also be useful for Venice from the Brave New World expansion as it cannot build Settlers. https://civilization.fandom.com/wiki/Venetian_(Civ5)

Here is a mod to test this PR:
https://cdn.discordapp.com/attachments/670547794951405584/758550228126793759/Test_Hide_As_Unique.zip

This mod disallows Babylon from making Scout and Horseman and also doesn't show the dummy replacement unit/building on Babylon's nation info.
It also makes Babylon have a unique Monument replacement that it can build, but is still not shown as a unique on Babylon's nation info.
It also adds an example Venice nation that can't build Settlers.

* "Will not be displayed in Civilopedia" unique prevents a unit or building from being shown in Civilopedia or shown as a unique
2020-09-25 12:37:23 +03:00
Yair Morgenstern
24b4997e85 3.10.11 2020-09-22 20:03:36 +03:00
uncivbot[bot]
e2ea87499e
Translations update (#3173)
* Update Indonesian.properties (#3168)

* Update German.properties #2 (#3169)

* Update German.properties

Minor tweaks and corrections, remove lots on unneccesary "\n", it just caused some weird formatting on computer as unciv sets breaks on in own already. Changed wording of tutorial quite a bit.

* Update German.properties

Changed and corrected the whole introduction / tutorial translations, deleted lots of unneccesary "\n" as UnCiv adds breaks on his own. Let some breaks in for a new sentence for better readability.

* More hungarian translations (#3171)

* More hungarian translations

* Fix some character

* Update Dutch.properties (#3170)

Added translations for diplomacy

Co-authored-by: Kensvin <63847755+Kensvin28@users.noreply.github.com>
Co-authored-by: Stefan <natrius@users.noreply.github.com>
Co-authored-by: Krisztian Papp <30371056+pehsa@users.noreply.github.com>
Co-authored-by: knoeier0 <71691687+knoeier0@users.noreply.github.com>
2020-09-22 19:46:32 +03:00
HadeanLake
4ee3dae134
* tweaked some buildings (#3172)
Windmill provides "+[10]% Production when constructing [Buildings]" (only regular buildings) instead of 10% to everything
Oxford University does not provide 50% science boost - it was a copying error from National College
* tweaked techs
Implemented "Reveals the entire map" unique ("Satellites" tech)
discovering a tech can trigger unique
"Remove Marsh" unlocked with "Masonry"
2020-09-22 15:17:04 +03:00
givehub99
53a836201d
This allows mods to override unique text for nations. This is useful for using uniques but phrasing them differently when shown to the player. (#3166)
The attribute in the nation json to change this is "uniqueText"

A mod to test this is here, it changes Babylon's unique text to "Test Babylon Unique Text"
https://cdn.discordapp.com/attachments/670547794951405584/757393404924526672/Test_Custom_Nation_Unique_Text.zip
2020-09-21 21:45:49 +03:00
HadeanLake
f721f59734
Added national wonders, fixed some minor issues (#3163)
* fixed translation of "Owned: [amountOwned] = " line

* Tweaked culture from killing
Aztecs get melee strength of the unit killed in culture and honor opener does the same thing.
They stack. So you get culture equal to 200% of the dead unit's strength (not ranged strength).

* removed hurryCostModifier from units that should not have it

Default value of HurryCostModifier is 0
List of units with non-default HurryCostModifier:

Settler (20)
SS parts (-1) (cannot be hurried)

Frigate (20)
Ship of the Line (20)
Caravel (30)
Turtle Ship (30)

Catapult (20)
Ballista (20)

Horseman (20)
Companion Cavalry (20)

Swordsman (20)
Mohawk Warrior (20)
Legion (20)
Berserker (20)

* added missing definitions from vanilla (commented out)
added missing obsolete tech tags, etc

* tweaked hurryCostModifier, added missing vanilla buildings (commented out)

* added promotions and parametrized uniques
Morale (+[15]% Combat Strength)
Great Generals I ([Great General] is earned [50]% faster)
Great Generals II ([Great General] is earned [100]% faster)
Quick Study ([50]% Bonus XP gain)
Unretired Mass Media icon

Added Heroic Epic, National Epic and National Treasury national wonders
Heroic Epic has unique "All newly-trained [non-air] units in this city receive the [Morale] promotion" - "non-air" is valid param now

[Raising The Flag on Iwo Jima silhouette, Marine Corps War Memorial Raising the Flag on Iwo Jima Battle of Iwo Jima Washington, D.C., memorial free png](https://www.pngfuel.com/free-png/opgid) for Heroic Epic and Morale promotion
[Arc de Triomphe](https://thenounproject.com/search/?q=Arc%20de%20Triomphe&i=2936011) by iconfield for National Epic
[Bank](https://thenounproject.com/term/bank/213472/) by By P Thanga Vignesh for National Treasury
reused general icon for Great Generals and Quick Study promotions

* implemented "Cost increases by [30] per owned city of cities" unique
All vanilla national wonders that require something in all cities have it

* added uniques
"Nuclear weapon" - Game option "nuclearWeaponsEnabled" enables units with this unique
"Requires [building]" - Apollo Program, Manhattan Project etc
"Requires adopted [policy]" - in expansions Statue of Zeus will require "Honor", Prora - "Autocracy", Landsknecht - "Mercenary Army".

* merged "Requires adopted [policy]" with "Requires [Wonder]"

* Separated unique.params[0] to val filter

* Changed National Epic image
2020-09-21 21:44:52 +03:00
Billy Brawner
205b5ccfea
Implement custom save locations for Android and Desktop (#3160)
* Implement custom save locations for Android and Desktop

* Request write permission to save to external storage

* Fix race condition for custom saves/loads caused by autosaves

* Remove unnecessary WRITE_EXTERNAL_STORAGE permission for saving files

* Fix padding for custom save/load location buttons

* Use nullability checks as defined in coding style guide

* Use nullability checks as defined in coding style guide

* Use early return for readability

* Rename save/load completion callbacks for custom locations and implement error handling
2020-09-20 23:22:07 +03:00
Yair Morgenstern
fded66b523 Trade table options are now mousewheel-scrollable - the problem was there was a scrollpane within a scrollpane - #2824 2020-09-20 22:20:33 +03:00
givehub99
ef181a4f4c
Adds "Start with [] technology" unique (#3150)
* Adds "Start with [] technology" unique, useful for mods and Hunnic civilization from official CIV 5 DLC Gods and Kings. This unique can be tested with this mod https://cdn.discordapp.com/attachments/670547794951405584/756223352930304140/Test_Start_Technology_Nation_Unique.zip which lets Babylon start with Pottery.

* assigning the start technology unique parameter value to variable, changing the unique syntax to 'Starts with []'
2020-09-20 20:29:04 +03:00
Yair Morgenstern
d0d0481f00 3.10.10 2020-09-20 20:21:40 +03:00
uncivbot[bot]
1dbafece02
Translations update (#3162)
* Update Italian.properties (#3156)

* Update Simplified_Chinese.properties (#3157)

* Update Simplified_Chinese.properties

* Update Simplified_Chinese.properties

* Update Simplified_Chinese.properties

* Update German.properties (#3159)

Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: CrispyXYZ <64761703+CrispyXYZ@users.noreply.github.com>
Co-authored-by: scaphander <67830047+scaphander@users.noreply.github.com>
2020-09-20 20:13:12 +03:00
Yair Morgenstern
eb7aac0959 Added 'back button' functionality to victory screen (#2824) 2020-09-18 13:58:17 +03:00
Yair Morgenstern
8db955b851 3.10.10 2020-09-18 11:27:11 +03:00
Stefan
dcb1b3f1e8
Major update german.properties (#3147)
* Major update german.properties

Straightened out the form of adress, its now the royal version ( i hope i did not miss anything), added missing translations, corrected lot of translations (i did not(!) look at #################### Lines from Tutorials #################### )

* Major update German.properties

Corrected the mistake and changed all "Felder" to "Kacheln"
2020-09-18 11:18:52 +03:00
uncivbot[bot]
177bb6a973
Translations update (#3155)
* Update Indonesian.properties (#3133)

Updating some translations

* Solve Conflicts and Update Brazilian_Portuguese.properties (#3141)

* Update Brazilian_Portuguese.properties

I modified some translations of the menus and some constructions, and translate the Babylon

* Translate all Egyptian cities and remove unnecessaries "Requires translation!"

* Translate more cities and remove unnecessaries "Requires translation!"

* more updates

* a review on prepositions and update

Co-authored-by: AlexLuis <68296033+AlexLuis@users.noreply.github.com>

* more hungarian translation (#3146)

* Update Italian.properties (#3151)

* Update Italian.properties

* Update Italian.properties

* Update Japanese.properties (#3154)

Co-authored-by: Yunichi <65927826+Yunichie@users.noreply.github.com>
Co-authored-by: Lincoln V Schreiber <lincolnschreiber@gmail.com>
Co-authored-by: AlexLuis <68296033+AlexLuis@users.noreply.github.com>
Co-authored-by: Krisztian Papp <30371056+pehsa@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: paontv <57051667+paontv@users.noreply.github.com>
2020-09-18 11:06:42 +03:00
lishaoxia1985
9f4607635b
UI Upgrade (#3149)
* UI Update

* Replace ScrollPane with Table in Minimap
2020-09-18 10:59:18 +03:00
Yair Morgenstern
a0d18889e0 Generified "[X] free [] units"
Barbarians don't try to attack with civilian units (classic Mod)
2020-09-16 20:46:34 +03:00
Yair Morgenstern
1ceb3548dd Resolved #3130 - "All policies adopted" shown in policy picker screen when relevant 2020-09-16 19:17:25 +03:00
Yair Morgenstern
1f4d5f5573 Multiselect applies to civilian units and from city overlays 2020-09-14 21:48:46 +03:00
Yair Morgenstern
76741b446b 3.10.9 2020-09-12 23:06:42 +03:00
uncivbot[bot]
02def47f1b
Translations update (#3132)
* Update Indonesian.properties (#3125)

* Update Italian.properties (#3126)

* Update Italian.properties

New translations

* Update Italian.properties

* Update Spanish.properties (#3129)

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>
2020-09-12 22:43:58 +03:00
HadeanLake
044d04ab28
implement fun isHill() = baseTerrain == Constants.hill (#3128)
fixed isAdjacentToFreshwater - should also check for river on tile
use fitsUniqueFilter instead of checking baseTerrain, terrainFeature and some other filters separately
changes nothing but makes hill PR a lot more readable
2020-09-12 21:34:23 +03:00
Yair Morgenstern
7a7028e3a5 Can now move multiple units to nearby tiles at the same turn 2020-09-11 17:56:23 +03:00
Yair Morgenstern
5a44d7e098 Multiple selected units are more obvious on-map 2020-09-11 17:09:50 +03:00
Yair Morgenstern
f63005ad3c Multiselect & move works! Currently very restricted and not all selected units are visible to user 2020-09-11 16:55:35 +03:00
Yair Morgenstern
c659af8762 Movement popup can handle multiple selected units, but only considers one of them 'moveable' - so far no functional change, only bricklaying 2020-09-11 16:16:25 +03:00
Yair Morgenstern
b9938eb116 Unreachable tiles for air units merged with the rest of the 'can move tile to' logic 2020-09-11 15:57:23 +03:00
Yair Morgenstern
7e36b51db5 Changes to MoveButtonDto in preparation for multiple unit movement 2020-09-11 15:40:43 +03:00
Yair Morgenstern
395292e2f3 Added backing field selectedUnits:ArrayList<MapUnit> for selectedUnit in UnitTable - will allow multi-select in the future, no functional change for now 2020-09-11 12:04:43 +03:00
Yair Morgenstern
7d32412646 Translation updates, with minor changes to ensure consistency 2020-09-11 11:16:31 +03:00