Commit Graph

335 Commits

Author SHA1 Message Date
Xander Lenstra
82e72ddcfa
Added in [tileFilter] tiles conditional to combat uniques (#5393)
* Some code cleaning

* Added `in [tileFilter] tiles` conditional

* Limited Visibility -> [-1] Sight

* Fix tests and rename conditional

* Actually made the conditional functional

* Renamed conditional once again
2021-10-04 22:30:09 +03:00
Xander Lenstra
07822de375
Simplified combat uniques further (#5361)
* Simplified combat uniques further

* Reviews & translations

* UniqueType > placeHolderText

* I can't math
2021-10-04 00:29:46 +03:00
SimonCeder
9016385f30
Barbarian spawning and camp placements (#5354)
* barbarian camp placement, spawn countdowns

* separate file

* raging barbarians

* faster spawn when attacked

* Barbarian AI

* works on old saves

* template.properties

* fix percent

* no improvements unique

* fix test fail

* reviews

* reviews pt 2
2021-10-03 11:45:02 +03:00
SomeTroglodyte
03f374b058
Currently playing music track displayed under Options-Sound (#5357) 2021-09-30 06:35:20 +03:00
Xander Lenstra
d07eed31b8
Added the Byzantine empire (#5299)
* Added Byzantine Empire as a nation

* Added unique units

* Implemented unique ability

* Refactored out the beliefContainer

* Implemented reviews

* Credits

* Enumified the uniques & added missing translatable strings
2021-09-26 16:58:24 +03:00
SimonCeder
fa813f8f5e
Quests fixes and additions (#5301)
* enable all quests

* implement more quests

* weighting for quests

* global quests

* fixes

* fixes

* Update template.properties

* general string

* reviews
2021-09-24 10:05:30 +03:00
SomeTroglodyte
e9e0f2c55f
World and Natural Wonders Overview (#5297)
* 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
2021-09-24 10:04:30 +03:00
MartinP
c7d5caf08c
Correct one line in template.properties (#5302) 2021-09-23 11:20:17 +03:00
Yair Morgenstern
e3f9f849a8
Update template.properties
Added space that ruined tests
2021-09-22 20:26:54 +03:00
SimonCeder
0bb565fdc6
Can't trade resources from other trades or city-states (#5252)
* can't trade resources from city-states

* display untradeable sources in trade screen

* Update template.properties

template string

* Update Swedish.properties

* Spelling, better buttons
2021-09-22 20:21:41 +03:00
yairm210
98f14523ed Add all cityFilter strings from the 'source of truth', since many were missing from translation file 2021-09-22 19:47:31 +03:00
SomeTroglodyte
5e4aff90e9
Music controller with fade-over and mod capabilities. (#5273)
* 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
2021-09-22 09:35:33 +03:00
Xander Lenstra
b7467d3467
Added support for conditionals to some more uniques (#5280)
* 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
2021-09-22 09:24:16 +03:00
Xander Lenstra
ce5a82c763
Fix translation tests and wrongly translated conditionals (#5272) 2021-09-20 16:04:51 +03:00
Xander Lenstra
f47f427b05
Adds conditionals to most of the uniques currently in the enum (#5270)
* 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
2021-09-19 18:43:32 +03:00
SimonCeder
027057874d
Update and generalize Siam UP (#5237)
* refactor and generalize Siam UP, display correct values in diplo screen

* enable preferred diplomatic victory

* allow compatibility mode

* revisions, restore timesInPlace

* don't change game.png

* don't change game.png

* objectify and enum city state bonuses

* objectify and enum city state bonuses

* template.properties

* refactored city state bonuses into Unique

* further enumization, fix toStringWithDecimals

* reviews
2021-09-19 06:28:10 +03:00
Xander Lenstra
01bfd17594
Implementation of conditionals, but better than before (#5187)
* 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?
2021-09-18 23:07:53 +03:00
SomeTroglodyte
340bedc7ea
Implemented Unit Supply by r3versi, not by me (#5234)
* 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>
2021-09-16 22:50:49 +03:00
SomeTroglodyte
a61efa65c9
Ask before resetting game setup to defaults (#5231) 2021-09-16 20:56:54 +03:00
SomeTroglodyte
5fd04f6e32
Modmanager sort and filter (#5186)
* 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
2021-09-16 20:54:47 +03:00
SomeTroglodyte
86bbf54cc0
Civilopedia quickie: Units show other direction of upgrade path (#5209)
* Civilopedia quickie: Units show other direction of upgrade path

* Civilopedia quickie: Units show other direction of upgrade path - spacing
2021-09-15 00:34:20 +03:00
SimonCeder
7bd555ac95
City-States Influence rates; Wary status; Proximity calculations (#5198)
* 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
2021-09-14 11:01:43 +03:00
Interdice
297618706c
Adding religous city states to unciv! (#5136)
* 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!
2021-09-14 10:49:38 +03:00
SomeTroglodyte
af20124e5d
Handle maps with invalid mapSize more gracefully (#5190)
* 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
2021-09-12 19:15:21 +03:00
SimonCeder
d59fe45f51
Proper implementation of pledge to protect (#5165)
* 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
2021-09-11 21:10:45 +03:00
SimonCeder
83050c2b11
Militaristic city states can give unique unit; refactor city state initialization (#5147)
* 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.
2021-09-09 21:30:12 +03:00
SomeTroglodyte
bebfe92fb1
Mod manager portrait and auto scroll (#5138)
* 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
2021-09-09 07:24:00 +03:00
SomeTroglodyte
e0fe788e28
Add a "Reset to defaults" button to the Newgame screen (#5141)
* Add a reset to defaults button to the new game screen

* Add a reset to defaults button to the new game screen - template
2021-09-08 20:46:18 +03:00
SimonCeder
2ca42a705f
Force ranking, bullying improvements (#5102)
* 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
2021-09-06 15:50:39 +03:00
Yair Morgenstern
3693311572
Fixed "space at end of translation" error 2021-09-05 17:51:31 +03:00
yairm210
5170a27e07 Fixed crash where deleting mods meant you could never start a game again
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
2021-09-05 14:57:21 +03:00
Xander Lenstra
a20baca7c2
You can now input distinct numbers when trading gold (#5072)
* Type amount of gold in trade requests

* Remove extraneous spaces in template.properties

* Implemented proposed changes

* Fixed tests
2021-09-05 12:10:57 +03:00
SomeTroglodyte
6bc58ab5a3
Tabbed options (#5081)
* Tabbed Options Screen

* Tabbed Options Screen - atlas
2021-09-04 21:30:39 +03:00
SomeTroglodyte
2069f227c4
Newgame Mod incompatibility toast (#5076) 2021-09-03 12:26:38 +03:00
SomeTroglodyte
5e8ecff397
Remove nonsignificant whitespace from templates (#5073) 2021-09-03 09:35:03 +03:00
Xander Lenstra
9575b5bf66
Implemented renaming of religions (#5057)
* Implemented renaming of religions

* Made AskForText display error on invalid input, implemented recommended changes

* Almost forgot the translatable strings in the new popup
2021-09-02 17:40:10 +03:00
Xander Lenstra
9450fac423
Added UI to show what cities are holy cities to the player (#5039) 2021-08-31 16:55:29 +03:00
SimonCeder
a7c4895985
Add Austrian civ (#5026)
* 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
2021-08-30 23:21:02 +03:00
SimonCeder
a01a6270fc
Demanding tribute from city states (#4976)
* tribute willingness calculations

* implement demanding gold and workers

* Revisions

* unit power calculation

* show modifiers in the diplo screen

* template.properties

* G&K modifiers

* promotions start at 0

* notiifications, AI

* conflict

* conflict?

* template and translation, failing test?

* another missing string

* missing space

* afraid relationship status

* missing space 2

* Slight optimization

* optimization pt 2

* reviews
2021-08-30 14:17:20 +03:00
Xander Lenstra
1cc90a3953
Implemented the enhancing of religions (#4965)
* 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>
2021-08-28 22:36:11 +03:00
Xander Lenstra
85e4a68ea1
Submarines are now visible to adjacent units, and once turned visible, can be attacked by all enemy units (#5001)
* Submarines are now visible to adjacent units, and once turned visible, can attack be all enemy units

* Deprecation & translation of unique saving
2021-08-27 17:00:12 +03:00
SomeTroglodyte
bf2ee91b67
Civilopedia Phase X (#5003)
* 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
2021-08-27 16:24:23 +03:00
Xander Lenstra
86d1f143d9
Conquering a city destroys buildings inside the city (#4995)
* When conquering a city, some buildings are now destroyed

* Added missing translation for uniques
2021-08-26 17:09:55 +03:00
Xander Lenstra
89ea30af95
Implemented Inquisitors (#4909)
* Added inquisitor unit including image

* Inquisitor now blocks spreading of religions

* Added 'remove heresy' action

* Fixed tests

* Reworded remove heresy unique, updated sprites

* Fix Crash

* Implemented requested changes & fixed a few minor bugs

* Implemented requested changes
2021-08-23 20:26:37 +03:00
Xander Lenstra
15c4b67781
Implemented a cap for the production boost of great engineers (#4966)
* Implemented a cap for the production boost of great engineers

* Added a hybrid solution

* Adding production now shows the amount of production added
2021-08-23 20:21:28 +03:00
Xander Lenstra
b2e6612c0e
Added a UI for viewing the religions inside a city (#4904)
* Added a UI for viewing the religions inside a city

* Rewrote large parts of the UI, implementing @SomeTroglodyte's great advice
2021-08-20 08:59:13 +03:00
SomeTroglodyte
03981c6242
CityScreen Buy button rework (#4843)
* 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
2021-08-18 12:17:40 +03:00
Xander Lenstra
5d249ee673
Implemented religious pressure (#4863)
* 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)
2021-08-15 18:53:01 +03:00
SomeTroglodyte
0d041ab1ef
Civilopedia - Difficulty (#4789)
* Civilopedia - Difficulty

* Civilopedia - Difficulty - patch2

* Civilopedia - Difficulty - patch3
2021-08-11 21:03:43 +03:00
Xander Lenstra
4aed0f0f80
Added founder beliefs, updates to pantheon spreading (#4827)
* Added founder beliefs, minor changes to pantheons

* Fixed the tests

* Implemented recommended chances

* Implemented requested changes
2021-08-11 09:56:36 +03:00
SomeTroglodyte
3c4bb1a558
City screen stats double separators (#4821) 2021-08-09 15:32:30 +03:00
Xander Lenstra
92728e9007
Added an overview screen for religions (#4808)
* Added an overview screen for religions

* Missed a thing

* Implemented requested changes
2021-08-08 23:46:39 +03:00
Xander Lenstra
92d3fa65e3
Ruins now have their own file (#4771)
* 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
2021-08-08 17:31:08 +03:00
SomeTroglodyte
b8fe46d057
Regression in template.properties (#4785)
"Advanced Settings" has been a while ago. I'm not fixing all comment/empty lines having added spaces here, later.
2021-08-07 23:47:58 +03:00
SomeTroglodyte
ad82f63794
Mod description translation (#4801) 2021-08-07 23:42:12 +03:00
Interdice
2a3395882f
City state resources (#4755)
* 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
2021-08-06 16:07:38 +03:00
Xander Lenstra
547f5a57e5
Added missionairy units, which can spread religion and bought with faith (#4568)
* 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>
2021-08-06 14:40:48 +03:00
SomeTroglodyte
9499471986
Change defeat conditions (#4761)
* Change defeat conditions

* Change defeat conditions - unit tests setup

* Change defeat conditions - patch1
2021-08-05 18:12:30 +03:00
Xander Lenstra
72eee5adf3
Removed $ signs from translatable strings (#4762) 2021-08-05 07:40:13 +03:00
SomeTroglodyte
c1382477e0
Mod manager concurrency (#4750)
* Mod manager concurrency

* Mod manager concurrency - tr
2021-08-04 13:53:42 +03:00
Xander Lenstra
4d3195ec5a
Added Diplomatic victory, United Nations, Globalization (#4619)
* 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
2021-08-03 21:48:51 +03:00
SomeTroglodyte
c33e7ae6d2
Civilopedia phase 9 - Technologies (#4737) 2021-08-03 09:36:58 +03:00
SomeTroglodyte
a248a1178c
Deprecate Building.cannotBeBuiltWith (Solar/Nuclear Plant exclusion now as unique, auto-displays in Civilopedia) (#4732) 2021-08-02 20:50:56 +03:00
SomeTroglodyte
7d52cfbcab
Harden map editor map loader against most bad maps (#4711)
* Harden map editor map loader against most bad maps

* Harden map editor map loader against most bad maps - patch1
2021-08-02 19:03:16 +03:00
SomeTroglodyte
130c318ae0
Civilopedia phase 8 - Nations and Promotions (#4657)
* Civilopedia phase 8 - Nations and Promotions

* Civilopedia phase 8 - Nations and Promotions - AS insubordination

* Civilopedia phase 8 - Nations and Promotions - OR template

* Civilopedia phase 8 - Nations and Promotions - proofread

* Civilopedia phase 8 - Nations and Promotions - revert OR
2021-07-30 15:55:17 +03:00
Giuseppe D'Addio
c3ed85c542
Update template.properties (#4670)
Added new line
2021-07-29 15:18:00 +03:00
SomeTroglodyte
34717008b8
Civilopedia phase7 (#4628)
* Civilopedia phase 7 - Terrain

* Civilopedia phase 7 - Terrain - tuning

* Civilopedia phase 7 - Terrain - patch1 "for"

* Civilopedia phase 7 - Terrain - patch2 for #4641
2021-07-27 10:41:25 +03:00
SomeTroglodyte
d0155a6ddd
Minimap Slider UI (#4634) 2021-07-25 19:08:50 +03:00
SomeTroglodyte
f9bef4a917
Newgame screen overhaul for portrait mode (#4522)
* Newgame screen scrolls nicer, mods sorted, base/ext mod clearer, unified separators

* Newgame-Mods-UI - sort Nations
2021-07-24 21:43:12 +03:00
SomeTroglodyte
e41ba0da91
A Civilopedia category for Religion (#4609)
* A Civilopedia category for Religion

* Civilopedia for Religion - rename cat, template and EOF linting

* Civilopedia for Religion - oversight
2021-07-23 00:10:47 +03:00
Xander Lenstra
85f4840e35
Hide lesser used action buttons to free up space (#4580)
* 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
2021-07-21 10:43:55 +03:00
Xander Lenstra
3d13680602
Update translationFileWriter to include missing strings (#4578)
* 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)
2021-07-20 17:07:15 +03:00
SimonCeder
239a406bc4
Added Sweden Civ (#4566)
* 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
2021-07-20 17:06:15 +03:00
Yair Morgenstern
05adc04a71 Added translations 2021-07-20 00:48:35 +03:00
Xander Lenstra
c81c1b6a1b
Implemented Follower beliefs for religions (#4530)
* 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
2021-07-19 21:51:34 +03:00
SomeTroglodyte
50cec97354
Spruced up Civilopedia - phase 5 - buildings (#4391)
* Spruced up Civilopedia - phase 5 - buildings

* Finish merging master into Civilopedia-Buildings

* Spruced up Civilopedia - phase 5 - buildings - patch

* Spruced up Civilopedia - phase 5 - buildings - patch2

* Spruced up Civilopedia - phase 5 - buildings - patch3

* Spruced up Civilopedia - phase 5 - buildings - patch4

* Spruced up Civilopedia - phase 5 - buildings - patch5
2021-07-19 21:48:51 +03:00
SimonCeder
118c1fc888
Unit gifting (#4557)
* 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
2021-07-19 00:30:10 +03:00
Yair Morgenstern
357b22cec5
Translations update (#4533)
* Update Swedish.properties (#4529)

* Refactor German translation of Trades (#4527)

* Refactor Trades

* Refactor Trades

* Update German translation (#4526)

* Update Russian.properties (#4525)

* Update Russian.properties

* Update Russian.properties

* Update Korean.properties (#4524)

* Update Indonesian.properties (#4523)

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Missing translation templates from BattleDamage modifiers (#4521)

* Update Italian.properties (#4517)

* Update Spanish.properties (#4516)

Soory for being late

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>

* Refactor German translation of City-States (#4512)

* Refactor City-States

* Refactor City-States

* Refactor City-States

Co-authored-by: SimonCeder <63475501+SimonCeder@users.noreply.github.com>
Co-authored-by: MartinP <77325495+Mape6@users.noreply.github.com>
Co-authored-by: sockybob <44141246+sockybob@users.noreply.github.com>
Co-authored-by: Samsaek the Calico <saud2410@naver.com>
Co-authored-by: kensvin <63847755+Kensvin28@users.noreply.github.com>
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: ArchDuque-Pancake <78449553+ArchDuque-Pancake@users.noreply.github.com>
2021-07-16 09:05:31 +03:00
Xander Lenstra
2752c713b9
Founding Religions (#4505)
* 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
2021-07-14 22:09:51 +03:00
Xander Lenstra
253e62de72
City states give gold when met; updates to city state gold gifts (#4435)
* 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
2021-07-10 21:51:11 +03:00
Xander Lenstra
5376e488a0
Added a simplified version of great prophets, implemented a basic city religion UI (#4356)
* 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
2021-07-09 10:48:33 +03:00
Yair Morgenstern
abd877dd1b Resolved #4427 2021-07-09 10:19:21 +03:00
SomeTroglodyte
7875ec4896
Better mod download and error display (#4396)
* Better mod download and error display

* Fix Android Studio Insubordinations
2021-07-06 19:33:05 +03:00
Xander Lenstra
624fe33be1
Updated template.properties (#4377)
* Updated translation file

* Made tests happy

* Removed unused, athematic unit filter

* Added submarine unit translation
2021-07-05 11:20:12 +03:00
Xander Lenstra
70882b4e8b
Added Privateer unit; updated Coastal Raider promotion (#4301)
* 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
2021-07-02 10:38:45 +03:00
Xander Lenstra
c350a3c923
Fix a few bugs related to nukes (#4324)
* 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
2021-07-01 22:18:37 +03:00
SomeTroglodyte
4d16b3fcf8
Respect visualMods for Sound - CheckBox, formats, modchange detect (#4295)
* Respect visualMods for Sound - CheckBox, formats, modchange detect

* Respect visualMods for Sound - german patch
2021-06-29 21:31:57 +03:00
SomeTroglodyte
ca58cf1694
Translation template fixes (#4287)
* Translation template fixes

* Translation template fixes - patch

* Translation template fixes - another
2021-06-27 21:22:47 +03:00
Xander Lenstra
111d11b9b2
Added Advanced Ballistics Tech, Atomic Bomb Unit, Updated how nukes work (#4211)
* 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.
2021-06-24 16:03:59 +03:00
Xander Lenstra
7f88844d82
Created Patronage policy branch (#4186)
* 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
2021-06-22 17:25:29 +03:00
SomeTroglodyte
e1c6cef111
Show promises not to settle, ask on found city action (#4148) 2021-06-15 09:49:08 +03:00
Xander Lenstra
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
SomeTroglodyte
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
Federico Luongo
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
Federico Luongo
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
Aron de Jong
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
SomeTroglodyte
7a5b88923d
Cosmetic: Convenience shortcuts, some linting (#4067) 2021-06-07 07:26:01 +03:00
Arthur van der Staaij
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
SomeTroglodyte
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
SomeTroglodyte
52b7999c48
Map editor fix translations, a few keys (#4055) 2021-06-06 09:18:22 +03:00
Xander Lenstra
aa9dda2eea
Added the paratrooper unit (#4025)
* 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
2021-06-03 07:33:38 +03:00
Arthur van der Staaij
a765caa97c
Add global alerts for certain constructions (#4039)
* 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.
2021-06-03 07:31:39 +03:00
SomeTroglodyte
9ed73d0d3f
Spruced up ModManagementScreen - phase 1 (#3983)
* Spruced up ModManagementScreen - phase 1

* Spruced up ModManagementScreen - phase 1 - patch1
2021-06-01 15:21:31 +03:00
Duan Tao
205f479ffe
Declare & Revoke protection for city-state. (#3994)
* Declare protection for city-state.

* Text templates.

* Better protector text for city-states.
2021-06-01 15:02:23 +03:00
SomeTroglodyte
cf2be25c73
Popup gets a KeyPressDispatcher (#3973)
* Popup gets a KeyPressDispatcher

* Popup gets a KeyPressDispatcher - patch1
2021-05-27 21:49:40 +03:00
SomeTroglodyte
5f523cb548
Improved location notifications (#3992)
* Improved location notifications

* Improved location notifications - patch

* Improved location notifications - patch2

* Improved location notifications - patch3
2021-05-26 23:31:00 +03:00
SomeTroglodyte
8d4d05e235
Two missing translation templates (#3988) 2021-05-24 08:58:27 +03:00
SomeTroglodyte
7c7d4181cc
Fix custom map sizes - saves match, size obeyed, limit UI (#3965)
* Fix custom map sizes - Revive Enum MapSize and fix tech modifier for custom maps

* Fix custom map sizes - Fix saved size not matching tileset, obey custom size

* Fix custom map sizes - limiting custom size and UI

* Fix custom map sizes - linting and reduce warnings

* Fix custom map sizes - less verbose

* Popup gets a KeyPressDispatcher - templates
2021-05-20 22:17:07 +03:00
Yair Morgenstern
d546b2b00e Caught exception when map fails to load 2021-05-13 21:43:42 +03:00
Yair Morgenstern
fca5b5075e Spaces 2021-05-07 12:39:44 +03:00
Yair Morgenstern
6fbb223aa5 Resolved #3888 - added template lines for mod management screen 2021-05-07 12:20:10 +03:00
Alexander Korolyov
453f5588ac
Custom map size (#2876)
* Adding custom map sizes. Initial commit

* Custom map sizes UI update

* Custom map size with rectangular shape

* Added compatibility with older Maps and Game saves

* Fixed build errors and added warning messages

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2021-05-06 18:39:28 +03:00
Yair Morgenstern
9900795e02 Specify original owner when showing option to liberate city 2021-04-30 12:44:51 +03:00
Yair Morgenstern
55ef131fb2 3.14.3 2021-04-21 22:12:46 +03:00
Yair Morgenstern
f518c1944f 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 2021-04-17 23:27:29 +03:00
Yair Morgenstern
881a885c14 Differentiated between 'Land' as in 'Land unit' and 'Territory' for rankings 2021-04-13 00:13:17 +03:00
Yair Morgenstern
6e9f868cb3 'military' -> 'Military' for e.g. [Military] units, same as other unit types which are capitalized 2021-04-13 00:08:35 +03:00
Yair Morgenstern
5a5d0a980f Removed ALL color-based notifications! 2021-03-21 00:28:58 +02:00
Yair Morgenstern
a37ac74fa9 'in all coastal cities' now translated 2021-03-13 22:38:53 +02:00
Yair Morgenstern
972bf2ba1c Resolved #3681 - translation fix, "in every city" -> "in all cities" 2021-03-11 21:08:48 +02:00
Yair Morgenstern
011c1de102 Resolved #3635 - can remove natural wonders and roads/railroads in map editor 2021-03-07 11:41:09 +02:00
lishaoxia1985
d290ca3d33
Update translation and Android studio to 4.1.2 (#3642) 2021-03-04 18:56:05 +02:00
david.howard
12e3005294
[663] Allow unit rename on promote (#3620)
* 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
2021-03-01 20:52:46 +02:00
Jack Rainy
ff05fa601d
Translations update (#3618)
* Translations update

* Minor changes to the translation
2021-02-25 19:01:58 +02:00
Yair Morgenstern
c9a96358da Changed "Gold" resource to be called "Gold Ore" to not conflict with the yield type for translations - #2458 2021-02-23 20:05:00 +02:00
Yair Morgenstern
b7c25f30e5 3.13.2 2021-02-20 23:26:52 +02:00
Yair Morgenstern
36949410a7 Resolved #3586 - Added 'Destroy' translation for capturing cities in one-city challenge 2021-02-18 13:20:49 +02:00
Yair Morgenstern
e92a1dd088 Better tech descriptions for increased improvement stats 2021-02-12 14:13:11 +02:00
Yair Morgenstern
8b1778eea3 Removed Scenario Maps entirely - was not a well thought-out concept and caused more confusion than actual fun.
Case in point - 0 mods are Scenario mods.
2021-02-11 22:33:52 +02:00
Yair Morgenstern
3d683c767a Added "Consumes [amount] [resourceName]" unique for buildings 2021-02-06 21:12:44 +02:00
Yair Morgenstern
b0bf18afa0 Added custom victory conditions 2021-02-05 16:06:58 +02:00
GGGuenni
679ca2ba6c
changed case sensitivity (#3577)
somehow I forgot to change most of the texts
2021-02-04 21:50:44 +02:00
GGGuenni
a07e3947d2
Refactoring of MultiplayerScreen (#3572)
* Refactoring

- Removed unnecessary .tr()
- changed text case sensitivity
- changed popup to YesNoPopup
- combined multiplayerGames.remove and deleteSave into removeMultiplayerGame to reduce unnecessary try catch blocks

* Update case sensitivity translations

* adding "Game settings" entry
2021-02-04 19:13:01 +02:00
Yair Morgenstern
9d647447bc Added improvement-constructing buildings 2021-02-03 21:09:29 +02:00
GGGuenni
aa1bd3cd7e
Adding resign function for multiplayer (#3567)
* 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
2021-02-02 16:43:51 +02:00
Yair Morgenstern
0800dbba51 Resolved #3533 - Added confirmation popup when saving over existing save 2021-01-15 13:28:29 +02:00
Huichan Lee
76e9f973c5
updated translation (#3453) 2020-12-25 12:54:45 +02:00
Yair Morgenstern
9b6dd71d22 Resolved #3422 - added fast switch between adjacent cities in city screen 2020-12-19 21:39:30 +02:00
Yair Morgenstern
d0df571ca5 Fixed broken translation 2020-12-13 11:30:02 +02:00
Yair Morgenstern
8a5247324c 3.11.18 2020-12-06 22:16:03 +02:00
Yair Morgenstern
c12afb4131 "have signed the peace treaty" -> "have signed a peace treaty" 2020-12-03 23:29:36 +02:00
Yair Morgenstern
0952a6a5a6 Test-breaking text error, good thing we have tests :) 2020-11-23 19:08:01 +02:00
Yair Morgenstern
eb7a064019 Resolved #3335 - Removed all unecessary spaces and colons 2020-11-22 22:48:38 +02:00
Yair Morgenstern
3d1e1d7936 Removed some confusing and pointless ": " at the end of translations - #3335 2020-11-22 22:41:12 +02:00
givehub99
072226ff9a
Added "All [] Cities get a free []" unique. (#3352)
* 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 [] []"
2020-11-22 11:55:34 +02:00
givehub99
64fc57e6d2
Helicopter Gunship uniques (#3294)
* 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.
2020-10-26 20:28:44 +02:00
Yair Morgenstern
895ed528af Resolved #3285 - added a notification when cities are no longer in resistance 2020-10-24 22:43:04 +03:00
givehub99
d75541e5b4
Consolidated unit kill bonus uniques (#3267)
* -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
2020-10-18 18:10:26 +03:00
givehub99
8c51833a5a
New parameterized uniques (#3250)
* -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
2020-10-14 10:22:49 +03:00
Federico Luongo
b5a32e64ae
City-states personalities (#3259)
* 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
2020-10-14 09:51:31 +03:00