Commit Graph

4006 Commits

Author SHA1 Message Date
Alex25820
022b55e937
Adds support for opening debug menu on MacOS (#5142) 2021-09-08 21:50:20 +03:00
Xander Lenstra
d247cacbca
Added "in other cities" as a cityFilter (#5131) 2021-09-08 21:41:57 +03:00
Xander Lenstra
3722fab38d
From the indstrial era onwards, things change in religion (#5095)
* Improved redability

* From the industrial era onwards, religion goes into 'second phase'

* Fixed tests

* Fixed formula for buying great prophets starting from the industrial era

* Added `getMatchingUniques`, `hasUnique` to `IHasUniques`, cleaned up some code

* Fix compilation errors
2021-09-08 21:24:26 +03:00
SomeTroglodyte
366ce4b89b
Kotlin 1.5 new warnings - partial (#5121) 2021-09-08 21:15:32 +03:00
SomeTroglodyte
1785c1f78e
No right-click on Android (#5125) 2021-09-08 21:13:43 +03:00
Xander Lenstra
4cfdfee301
Added "Incompatible with [promotionName]" unique (#5128) 2021-09-08 21:12:57 +03:00
Xander Lenstra
e2a1e44282
Fixed bugs with unit movement (#5126)
* Fixed bugs with unit movement

* Optimized function call

* Cleaning up some code

* Removed comments that are no longer applicable
2021-09-08 21:11:59 +03:00
SimonCeder
7297139594
CS vulnerable to ally unhappiness (#5134) 2021-09-08 21:02:34 +03:00
SomeTroglodyte
ab5083173d
Kotlin 1.5 new warnings - partial (#5120) 2021-09-08 20:48:24 +03:00
SimonCeder
8b6881c76b
checks for protection, delays (#5133) 2021-09-08 20:47:23 +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
Xander Lenstra
d1135f3d20
Fixes incorrect default paramter for starting era (#5119) 2021-09-08 20:44:50 +03:00
Xander Lenstra
a1f7721878
Fixes #5113 (#5122)
* Fixed #5113

* Better check
2021-09-08 20:42:58 +03:00
Xander Lenstra
9a29ce8422
Fixed all renamed units being called 'instanceName' (#5140)
* Fixed all renamed units being called 'instanceName'

* Removed extreneous square brackets resulting in incorrect translations

* Fixed translation problems
2021-09-08 20:42:27 +03:00
SomeTroglodyte
7118e9779c
GameStarter wrap and shape aware (#5107)
- Starting locations code aware of wrap and map shape
- RiverGenerator wrap aware
- RiverGenerator guard against endless loop
2021-09-06 18:32:12 +03:00
SomeTroglodyte
7f386da2bc
Kotlin 1.5 new warnings - partial (#5108)
* Kotlin 1.5 new warnings - partial

* Kotlin 1.5 new warnings - partial
2021-09-06 18:28:20 +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
Xander Lenstra
486e2a7a8a
Deprecate all mods without an eras.json file (#4809)
* Enforce the existence of an eras.json file for mods

* Merged `getEra()` and `getEraObject()`

* Hide mods we have deemed outdated

* Fixed compile errors that I didn't notice before

* Fixed unit tests
2021-09-06 14:50:38 +03:00
Xander Lenstra
8079a8dc7b
Fix bugs (#5103)
* Fixed a bug where moving a unit through ancient ruins spawning another unit would duplicate units

* Fixed a bug where automatically exploring units upgrading from ancient ruins would not upgrade

* Fixed a bug where city state influence could go lower than the minimum
2021-09-06 14:35:31 +03:00
SimonCeder
c7264556ea
City state intrusion anger (#5090)
* move functions, greece UP

* CS influence from killing barbs

* Greece healing in CS territory

* move diplomacy bonuses into CityStateFunctions.kt

* Split filter in Battle.kt, nicer code
2021-09-05 21:22:02 +03:00
Xander Lenstra
f016012e39
Fixed a bug where no icon would display in city religion UI for pantheons (#5094) 2021-09-05 14:58:02 +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
yairm210
5f0afffe5a Resolved #4344 - can no longer enter city-screen that is not yours 2021-09-05 14:04:49 +03:00
yairm210
194c69a633 Deprecation 2021-09-05 13:18:51 +03:00
yairm210
194eb5299e Readability improvements 2021-09-05 12:53:12 +03:00
SimonCeder
ad50e9d2fc
implement locale for proper sorting on certain screens (#5082)
* implement locale for sorting

* persian, centralize Collator.getInstance

* fall back to default instead of english

* fix failing build
2021-09-05 12:12:18 +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
Xander Lenstra
980f0f4611
Fixed crash when viewing the name of a religion (#5092) 2021-09-05 12:05:54 +03:00
Yair Morgenstern
f3a8188cb1
Kotlin 1.5.30 test (#5089)
* Kotlin bump to 1.5.30

* Needed change due to (correct!) new compile error
2021-09-05 00:28:21 +03:00
yairm210
a1fdb612a9 Merge remote-tracking branch 'origin/master' 2021-09-04 21:40:41 +03:00
yairm210
48092b09b1 Resolved #4478 - spectator cannot take over player diplomacy options 2021-09-04 21:40:30 +03:00
SomeTroglodyte
6bc58ab5a3
Tabbed options (#5081)
* Tabbed Options Screen

* Tabbed Options Screen - atlas
2021-09-04 21:30:39 +03:00
SomeTroglodyte
84f7d4f56b
Fix map setTransients throwing exception from map generator on some map sizes (#5084) 2021-09-04 21:27:13 +03:00
yairm210
60abae5d1a Better check for units with no unitType defined 2021-09-04 21:13:01 +03:00
SomeTroglodyte
2069f227c4
Newgame Mod incompatibility toast (#5076) 2021-09-03 12:26:38 +03:00
SimonCeder
8cb464c9f7
Correct year shown when starting in later eras (#5070)
* json, getEquivalentTurn

* WorldScreenTopBar.kt

* affects shown year only
2021-09-03 00:13:58 +03:00
Xander Lenstra
df853504ae
Great Prophets now always have your religion as their religion (#5052)
* Great Prophets now always have your religion as their religion

* Reworded unique for clarity
2021-09-02 20:52:24 +03:00
SimonCeder
34eb4758ff
Rework City State functions into separate file (#5043)
* cut+paste new file

* rewrite functions

* wrapper functions

* rewrite function calls

* influenceGainedByGift

* keep instantiated CityStateFunctions as Transient

* use setter functions for influence
2021-09-02 20:50:18 +03:00
yairm210
c116b9ba94 Linting 2021-09-02 20:48:29 +03:00
yairm210
e418f1b8ca Merge remote-tracking branch 'origin/master' 2021-09-02 20:38:16 +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
yairm210
15335f3f7c Made city-state bonuses immutable to avoid future problems a la #5050 2021-09-02 17:37:52 +03:00
yairm210
d0dbb27e00 Resolved crash due to evaluating distance to city state when we have no cities 2021-09-02 17:21:46 +03:00
Xander Lenstra
fcc335b78a
Refactor more code, hopefully increasing maintainability (#5062)
* Fixed great person gift formula, confusing boolean, "great person" filter

* Refactored getRejectionReason to return a hashSet of reasons instead of a random one
2021-09-02 16:37:40 +03:00
Xander Lenstra
2e43637144
Fixed a bug where cities founding after creating a pantheon would not have that pantheon (#5053) 2021-09-01 19:21:41 +03:00
Xander Lenstra
186d06faf0
When spreading a religion with a great prophet, other religions are now removed (#5055) 2021-09-01 19:21:09 +03:00
Xander Lenstra
b347366d50
Refactored some code and uniques (#5051)
* Refactored some code and uniques

* Fixed compilation errors, tests and crashes

* Moved influence bounds check from add to set
2021-09-01 19:20:04 +03:00
Xander Lenstra
cffe8e441e
Finishing the later five policy trees now allows you to buy great people with faith (#5038) 2021-09-01 09:46:27 +03:00
Xander Lenstra
634f4a3533
Added Religious wonders (#5041)
* Added Grand Temple and Great Mosque of Djenne buildings

* Added uniques for Grand Temple

* Added uniques for Mosque of Djenne, refactored ability uses system to count down isntead of up
2021-08-31 22:23:02 +03:00
SimonCeder
cd7bd8fcfd
fix duplicated city-state bonus bug (#5042)
* fix city-state bug

* pt 2
2021-08-31 22:18:58 +03:00
Xander Lenstra
248145cf8f
Fixed bug making enhancing religions impossible (#5040) 2021-08-31 18:22:39 +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
Xander Lenstra
1771604a4a
AI will now found & enhance religions -- minor improvement to civilian AI (#5031)
* AI will now found & enhance religions -- improvements to civilian AI

* This is a better order imo

* Implemented requested changes
2021-08-30 21:41:18 +03:00
SomeTroglodyte
06c7f049b7
Diplomacy Screen Nation relation indicator (#5032) 2021-08-30 20:25:13 +03:00
yairm210
b0e3aa326b Mass deprecation 2021-08-30 19:52:57 +03:00
yairm210
b554a6db93 Deprecated Stats as viable values for Great Person points 2021-08-30 19:35:50 +03:00
SimonCeder
7e0b7f0007
units get promotions and xp bonuses from CS buildings (#5012)
* units get promotions and xp bonuses from CS buildings

* fix siam
2021-08-30 14:17:59 +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
SomeTroglodyte
9c3e621b15
Atlas reorg - packer to loader via json (#5014) 2021-08-29 23:29:24 +03:00
SomeTroglodyte
3b5489a3b4
Persistent new game setup (#5016)
* Persistent new game setup

* Persistent new game setup - comments
2021-08-29 20:40:13 +03:00
SomeTroglodyte
5a6a9c9759
Anti-Armor, negative tile yield, LoadScreen (#5018)
* Harden against negative yields, Anti-Armor

* Anti-Armor bad unitType, LoadScreen
2021-08-29 11:33: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
SomeTroglodyte
3e22a36bbf
Fix Civilopedia resource to Wonder links (#5011) 2021-08-28 22:27:25 +03:00
SomeTroglodyte
ef7fc36c80
Harden automateImprovementPlacer and detect Mod problems with these (#5010) 2021-08-28 22:26:00 +03:00
yairm210
8779ca7147 Mass deprecation 2021-08-28 22:21:35 +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
Xander Lenstra
7dd7e0b278
Fixed a unique & better credits (#4998) 2021-08-27 16:27:17 +03:00
SomeTroglodyte
7085ea95cc
Fix: Legacy maps with starting locations not playable (#5000)
* Fix: legacy maps with starting locations not playable

* Fix: legacy maps with starting locations not playable - ruleset
2021-08-27 16:26:45 +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
SomeTroglodyte
448b04fab8
Civilopedia - Tweaks (#4990)
- Icon for BeliefType.Founder
- Religion icons inverted in Civilopedia
- Terrain icons in links and entry header centered
2021-08-26 17:29:55 +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
yairm210
59f8a0eebf Hardcoded image atlases for it to work from within a .jar - #4993 2021-08-26 16:51:38 +03:00
SomeTroglodyte
9df58ed240
Stats rework part 2 (#4983)
- Nicer iterators
- Callers adapted to simpler syntax
- CityStats changed to non-serializable
2021-08-25 19:02:42 +03:00
SomeTroglodyte
5d95dd1c7b
Multiple Start Locations per tile nicer display (#4982) 2021-08-24 22:56:05 +03:00
SomeTroglodyte
cdc63f71e8
Multi-Atlas / Image packer redo (#4959)
* Atlas reorg

* Atlas reorg - resulting atlases 1

* Atlas reorg - resulting atlases 2

* Atlas reorg - merge
2021-08-24 07:31:21 +03:00
SomeTroglodyte
a53cb82034
StartingLocation-Improvements-be-gone phase 2 (#4975) 2021-08-23 23:15:04 +03:00
yairm210
b157313bb9 Update city stats when finishing city-state quests - #4963 2021-08-23 22:31:41 +03:00
yairm210
6db92da52a Resolved #4960 - can now play as 2 separate civs with the same userId 2021-08-23 22:26:51 +03:00
yairm210
23cb4394a7 Converted all "1 + (value/100f)" to .toPercent() 2021-08-23 21:52:21 +03:00
yairm210
15a42dd8ea Resolved #4956 - fixed Krepost unique 2021-08-23 21:41:17 +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
SomeTroglodyte
df1695f782
City keyboard buy construction and tile (#4958)
* City keyboard buy construction and tile

* City keyboard buy - a comment
2021-08-23 20:22:14 +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
SomeTroglodyte
7afffe3a89
getLastTerrain simple patch (#4971) 2021-08-23 20:18:54 +03:00
SomeTroglodyte
b4ad34988c
StartingLocation-Improvements-be-gone phase 1 (#4951) 2021-08-23 11:58:42 +03:00
Xander Lenstra
22be1c92e6
Fixes bug where upgrading units would no longer provide their default upgrades (#4948) 2021-08-22 14:07:50 +03:00
SimonCeder
33cba2eea9
can now raze non-original capitals at capture (#4903)
* can now raze non-original capitals at capture

* clearer code, equal for AI, get gold and reduce pop when liberating

* fix conflict??

* fix conflict????

* restore whitespace

* restore whitespace

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2021-08-22 09:12:29 +03:00
SomeTroglodyte
5c51e3d38e
Fix crash at conquest, empty religion icon (#4927) 2021-08-21 21:00:59 +03:00
SomeTroglodyte
13365e5ad6
Ancient Ruins, Civilopedia and Translations (#4907)
* Ancient Ruins, Civilopedia and Translations
- TranslationFileWriter can process Ruins.json
- Hide Religion / Civilopedia uniques hardcoded String moved to Constants
- Civilopedia display of Ruins pulls actual json rewards in code
- Manually curated rewards description removed

* Ancient Ruins, Civilopedia and Translations
- Old rewards descriptions moved to names, color
- Code now recreates old output closely
- civilopediaText allowed additionally
- TranslationFileWriter tweaked accordingly

* Ancient Ruins, Civilopedia and Translations - fix stargazers
2021-08-21 20:57:39 +03:00
SomeTroglodyte
1aea1d53b9
Fix-Workers-Second-Turn (#4929)
* Fix-Workers-Second-Turn

* Fix-Workers-Second-Turn
2021-08-21 20:56:54 +03:00
SomeTroglodyte
0c2cdcfcff
Fix crash after upgrading a unit (uninitialized lateinit) (#4928) 2021-08-21 20:56:08 +03:00
yairm210
5779bdaa4f Upgraded mockito versions.
Instead of forcing reflection to depend on latest kotlin version, I have a feeling the dependency is due to older mockito depending on older reflection.
2021-08-20 15:45:46 +03:00
yairm210
85ed8a27d3 Bumped sourceCompatibility to Java 7
Released in 2011 and by now technically out of support for 2 years.
Gotta roll with the times, but roll slowly.
2021-08-20 15:24:02 +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
970259a0ea
WorkerAutomation cached per Civ - BFS cached (#4868)
* WorkerAutomation cached per Civ - BFS cached

* WorkerAutomation cached per Civ - more linting
2021-08-20 01:25:41 +03:00
Xander Lenstra
d856efac06
Implemented almost all missing founder & follower beliefs (#4890)
* Implemented almost all missing founder & follower beliefs

* Added missing negator

* Implemented requested changes
2021-08-20 01:24:28 +03:00
yairm210
cb1c70f73b Resolved #4769 - City-states grant copies of their resources, even if they're in use 2021-08-19 23:43:32 +03:00
Xander Lenstra
a4e61d65c2
Fixes crashes from loading mods without an eras.json file (#4910) 2021-08-19 20:44:11 +03:00
yairm210
c7265c79b6 Reverted 6a32d6 2021-08-19 20:43:47 +03:00
yairm210
5223caf390 Resolved crash for mods with no eras defined 2021-08-19 20:41:26 +03:00
SomeTroglodyte
af92fdc1d2
Expander tab persist (#4905)
* ExpanderTabs remember state

* ExpanderTabs remember state - city constructions dynamic

* ExpanderTabs remember state - city screen portrait
2021-08-19 10:06:52 +03:00
SomeTroglodyte
0f5f3366ed
Small changes to city screen (#4902) 2021-08-19 09:51:26 +03:00
Arthur van der Staaij
ef5483e9d5
Removed the civ introduction trade option (#4888)
* Removed the civ introduction trade option

Left in the minimum amount of code to ensure that saves with a pending
introduction trade do not break (any such pending trades are cancelled).
The left-in introduction trade code can be fully removed in a later
version.

* Added back civ introduction trades as a mod option

Also made the gold value of introducation trades moddable.

* Made civ introduction trade invalid if receiver already knows the civ

This prevents players from sending two AI civs introduction trades for
each other in the same turn and profiting from both. This therefore
fixes #4272.

* Applied requested changes

* Removed a spurious space
2021-08-19 09:45:03 +03:00
Arthur van der Staaij
4114296cbe
Made water oil wells require the Refrigeration tech (#4889)
* Made water oil wells require the Refrigeration tech

Oil wells can now only be created on water with the refrigeration
technology.

This is not the ideal solution: it would be preferable to support
multiple improvements for a single resource, to add offshore platforms
as a separate improvement for coastal oil that requires refrigeration
and to disable building oil wells on coast. Allowing multiple
improvements for a resource would however be a much more significant
refactor.

* Added back "terrainsCanBeBuiltOn": ["Coast"]
2021-08-18 12:19:08 +03:00
SomeTroglodyte
b60c2c71dd
Unit action constants and worker unique cleanup (#4815)
* Unit action constants and worker unique cleanup

* Replace unit action constants with enum properties - patch1

* Replace unit action constants with enum properties - patch2
2021-08-18 12:18:02 +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
SomeTroglodyte
dcc6ad8562
updateNumberOfFollowers _is_ called one last time after a city has been raZed to the grOund (#4892) 2021-08-17 23:24:24 +03:00
SomeTroglodyte
8cc25a74a7
Urgent Fix - noMods switch default (#4893) 2021-08-17 23:23:31 +03:00
SomeTroglodyte
ecd6cd92a4
City screen purchasable constructions prettier (#4822)
* City screen purchasable constructions prettier

* City screen purchasable constructions prettier - patch1

* City screen purchasable constructions prettier - mad modder edition
2021-08-17 14:00:01 +03:00
Xander Lenstra
607e40a712
Fixed some bugs with spreading of religion (#4851)
* Fixed some bugs with spreading of religion

* Implemented requested changes
2021-08-17 13:58:19 +03:00
SimonCeder
74a1da8e17
CS bonuses graded according to relationship level (#4664)
* city-state bonuses graded depending on friend or ally

* siam militaristic UP, cleaned up presentation

* fix strings

* move city state modifiers to json

* city-state bonuses graded depending on friend or ally

* siam militaristic UP, cleaned up presentation

* fix strings

* move city state modifiers to json

* Restructure eras.json

* reduce indentation in DiplomacyManager.kt

* Add fallback values in cas of missing json definitions

* review edits

* fix conflicts???

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2021-08-17 13:55:02 +03:00
SomeTroglodyte
076128a37e
Unit test catching un-annotated lazies (#4886) 2021-08-17 13:52:41 +03:00
Arthur van der Staaij
0ce033b3a9
Disabled pillaging your own tiles (#4882) 2021-08-17 09:10:21 +03:00
Xander Lenstra
8d49a84f78
Fixed crash from conquering cities (#4877) 2021-08-16 16:58:53 +03:00
SomeTroglodyte
df31fb2f05
Fix DOS attack perpetrated by CityInfoReligionManager on Json Serializer (#4870)
Fixes #4867
2021-08-16 11:26:06 +03:00
Arthur van der Staaij
201648a680
Zone of Control (#4085)
* Implemented Zone of Control

* Implemented "move after attacking" ZoC exception

Units that can move after attacking are not affected by zone of control
if they move because of defeating a unit.

* Implemented all missing special ZoC cases

As described in:
https://forums.civfanatics.com/resources/understanding-the-zone-of-control-vanilla.25582/

* Slightly optimized ZoC logic

* Modified the "possible optimization" comment

Added the knowledge gained from SomeTroglodyte's tests.

* Added "Ignores Zone of Control" unique

Implemented the unique and gave it to the Helicopter Gunship.
2021-08-15 21:42:47 +03:00
SomeTroglodyte
8fdff9a940
Stats optimization (#4830)
* Stats rework part 1

* Stats rework part 1 -patch1

* Stats rework part 1 - documentation
2021-08-15 20:52:55 +03:00
SomeTroglodyte
4daa22ddea
BFS cleanup (#4859)
* BFS cleanup
- Kotlin ArrayDeque is no longer experimental
- Client code sidestepped class API even where API existed -> closed it down
- nextStep when already ended now no-op instead of crash, suits usecases
- predicate test very likely to be more expensive than tilesReached lookup
- getPathTo only used asSequence() - why not a Sequence in the first place
- Compleat documentation. This is very low level, so better help future coders to understand.
- Lint: One annoying hardcoded conditional breakpoint, one unhelpful exception

* BFS cleanup - patch1
2021-08-15 19:44:31 +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
Arthur van der Staaij
6a18a33674
Fix units not entering cities upon capture (#4839)
* Renamed and added doc comments for some some can-pass-through functions

* Moved a city-state pass-through exception to a lower-level function

Moved the exception that players (but not AI) can always pass through
city-states from TileInfo.canCivPassThrough to
CivilizationInfo.canPassThroughTiles (which is called by the former).
This makes the behavior of the latter function accurate to its name, and
makes the code more understandable overall.

A side-effect of this change is that functions that used the lower-level
CivilizationInfo.canPassThroughTiles function directly now consider the
aforementioned exception. For example, if a city-state expands its
border, it should now no longer push out units of a player civilization.

It may make even more sense to move the exception to the "canMoveTo"
logic, since AI should probably be able to pass through city-state tiles
even when they don't want to end on them. That might however affect the
AI more significantly.

* Fixed bug where units would not enter a city upon capture

As listed in #4697.

* Fixed a bug where captured units were pushed out of captured cities

Before, capturing a city with a civilian unit in it would cause the
capturing military unit to enter the city but also cause the civilian
unit to leave the city. Now, the civilian unit stays in the city as
well.
2021-08-13 11:30:45 +03:00
yairm210
2ee4598e70 Ruleset checks allow for unit types to be defined in default ruleset, since it's copied to all complex rulesets if no unit types are there 2021-08-12 20:45:15 +03:00
yairm210
fb266b07b2 Fixed compile error from branch merging 2021-08-11 21:15:04 +03:00
SomeTroglodyte
0d041ab1ef
Civilopedia - Difficulty (#4789)
* Civilopedia - Difficulty

* Civilopedia - Difficulty - patch2

* Civilopedia - Difficulty - patch3
2021-08-11 21:03:43 +03:00
yairm210
6146cc834a Merge branch 'temp'
# Conflicts:
#	core/src/com/unciv/logic/civilization/CivilizationInfo.kt
2021-08-11 20:55:21 +03:00
yairm210
a08a0e1489 Added ruleset check for units whose type is not defined in the unitTypes 2021-08-11 20:40:44 +03:00
yairm210
85ecddad2f Fixed crash with diplomacy screen and city-states with no cities
(cherry picked from commit 7c1c585801)
2021-08-11 20:30:00 +03:00
Xander Lenstra
421cce0a43 Fixed crash when selecting certain buildings in the civilopedia (#4819)
(cherry picked from commit 6d04bf424b)
2021-08-11 20:29:25 +03:00
yairm210
7c1c585801 Fixed crash with diplomacy screen and city-states with no cities 2021-08-11 19:53:21 +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
SomeTroglodyte
e59db3ada3
Unit rename UI (#4804)
* Rework Yes/No and OK/Close

* Apply Yes/No and OK/Close constants

* Clean up and decorate RenameUnitPopup
2021-08-09 13:59:30 +03:00
Xander Lenstra
6d04bf424b
Fixed crash when selecting certain buildings in the civilopedia (#4819) 2021-08-09 13:57:13 +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
Yair Morgenstern
1aa9eecf85 Fixed crashing Diplomatic victory bug 2021-08-08 23:08:07 +03:00
Xander Lenstra
55d32e1bcb
Added follower beliefs for buying religious buildings (#4793)
* Added follower beliefs for buying religious buildings

* Implemented recommended changes
2021-08-08 22:23:22 +03:00
SomeTroglodyte
eab42c0a93
MapGenerator optimization (#4805)
* MapGenerator cleanup

* MapGenerator cleanup - lint

* MapGenerator cleanup - tuning

* MapGenerator cleanup - patch1
2021-08-08 22:20:53 +03:00
Xander Lenstra
b649427415
Hides 'automate' unit action and unhides 'stop exploring' unit action (#4810) 2021-08-08 22:06:57 +03:00
SomeTroglodyte
b6ee4c0b1c
Common interface for Unique-collections in ruleset objects (#4788) 2021-08-08 18:21:04 +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
58a3dfdda3
Diplomacy: City State resource UI, improvement gift effect (#4782)
* CS Resources shown in Diplomacy linked

* CS Improvement gift updates resources immediately

* CS Improvement gift updates resources immediately - patch1
2021-08-08 15:21:44 +03:00
Xander Lenstra
6d5fe2ff7a
Fixed bug where units could still be purchased if they used a depleted resource (#4798) 2021-08-07 23:44:53 +03:00
Xander Lenstra
0c1a21f6ae
Fixed crash when borrowing names (#4800)
* Fixed crash when borrowing names

* Fix potential mod error allowed by the previous fix
2021-08-07 23:44:16 +03:00
Xander Lenstra
386095a9d0
One with nature yield for spain is now doubled (#4794) 2021-08-07 23:43:04 +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
ee32392ecd
Bring allUnitActionsHaveTranslation test up to date (#4688)
* Bring `allUnitActionsHaveTranslation` test up to date

* Bring allUnitActionsHaveTranslation test up to date - revert enum prop
2021-08-06 14:38:10 +03:00
ravignir
776be5a48a
Minor fix to Great Prophets cost not increasing (#4772) 2021-08-06 00:40:45 +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
SomeTroglodyte
bed38f75e7
Allow civ-unique buildings to be created by startingEra (#4756) 2021-08-04 18:10:34 +03:00
Xander Lenstra
2c428f8269
Bugfixes from unitTypes so promotions work again (#4744) 2021-08-04 13:55:12 +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
Interdice
bb5392db4a
Ai now cares about city distances (#4680)
* 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
2021-08-03 19:53:46 +03:00
Xander Lenstra
3b4b9a27bf
Split up unit types to its own JSON file (#4717)
* Split off unitTypes to its own json, only containing the domain it can travel in for now

* Updated translationFileWriter to handle this file correctly

* Updated promotions file

* Implemented requested changes

* Units without a sprite use the sprite of a first unit with the same type

* Implemented proposed changes
2021-08-03 19:06:59 +03:00
SomeTroglodyte
c33e7ae6d2
Civilopedia phase 9 - Technologies (#4737) 2021-08-03 09:36:58 +03:00
SomeTroglodyte
731aec0e65
Use stat characters in Civilopedia Unit/Building costs (#4736) 2021-08-03 09:24:31 +03:00
SomeTroglodyte
e8876e90bf
All stats available as text characters (#4734) 2021-08-02 23:35:58 +03:00
Yair Morgenstern
6370f0ac02 Solved super rare edge-case where units try to attack over hidden tiles that they can't actually move through 2021-08-02 23:26:14 +03:00
Yair Morgenstern
f773a547b3 Solved another teleportation concurrent modification exception 2021-08-02 23:17:28 +03:00
Yair Morgenstern
9ef02cb1b2 Civ no longer attempts to intercept his own nukes - #4629 2021-08-02 21:11:29 +03:00
Yair Morgenstern
775f42aa0d Resolved #4629 - atomic bomb interception works as intended 2021-08-02 21:07:08 +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
lishaoxia1985
e993f507aa
Map size will modify policy cost, techUniques is initialized by UniqueMap(), Replace "effect" with "uniques" in UnitPromotions.json (#4507)
* Map size will modify policy cost, techUniques is initialized by UniqueMap()

* Replace "effect" with "uniques" in UnitPromotions.json
2021-08-02 19:17:26 +03:00
SomeTroglodyte
c9fa68f8ea
Privateer capture, plunder, and raze Notifications (#4698)
* Privateer capture, plunder, and raze Notifications

* Privateer capture, plunder, and raze Notifications - patch1

* Privateer capture, plunder, and raze Notifications - patch2
2021-08-02 19:14:31 +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
e7bf1fad7c
Tweak UncivSlider and make the one on NewGameScreen permanently show the value tip (#4728) 2021-08-02 19:01:08 +03:00
SomeTroglodyte
6c32d10924
TranslationFileWriter support for CivilopediaText (#4631)
* TranslationFileWriter support for CivilopediaText

* Merge branch 'master' into TranslationWriter-Civtext - patch
2021-08-01 20:23:13 +03:00
Xander Lenstra
78dddac962
Added modoptions unique for disabling city-state spawning with only a settler (#4691) 2021-08-01 19:21:04 +03:00
SomeTroglodyte
3cf9191d6a
Actually load and display the road texture found in FantasyHex (#4699)
* Actually load and display the road texture found in FantasyHex

* Actually load and display the road texture found in FantasyHex - patch1
2021-08-01 15:36:45 +03:00
Arthur van der Staaij
0c7dd9ada9
Fixed captured units not tp-ing out of illegal tiles (#4701)
In particular, this fixes the bug where embarked units captured by a
civilization without optics would stay embarked. This therefore fixes
case 4 of #4237.

In principle, it should not even be possible that captured units can no
longer stand on the tile they were on, since the capturing unit has to
be able to move to it. However, in Unciv, it is possible to capture
units without moving to their tile. This is a different problem that
needs to be addressed some time in the future.
2021-08-01 11:31:53 +03:00
SomeTroglodyte
a427e645b9
Fix Civilopedia Unique auto-linking when Ruleset changes (#4700) 2021-08-01 11:29:02 +03:00
SomeTroglodyte
bb25f1fdb2
Better crude maps - zero uncovered tiles impossible (#4685) 2021-07-31 23:50:20 +03:00
Xander Lenstra
5324eb96b5
Fixed bug where production from cutting down forests could apply to perpetual constructions (#4694) 2021-07-31 23:46:18 +03:00
Yair Morgenstern
3afe7af431 Solved crash where city states would try to gift great people without cities 2021-07-31 23:17:57 +03:00
Yair Morgenstern
692cbaa84a 3.15.17 2021-07-30 16:28:17 +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
Yair Morgenstern
4bcf821879 Resolved #4647 - influence-by-game-progress works as intended 2021-07-30 15:41:54 +03:00
Yair Morgenstern
3388c540d5 Resolved #4676 - one-city-challengers no longer get multiple settlers for later eras 2021-07-30 15:15:16 +03:00
Yair Morgenstern
864fd2ce64 Maori Warrior debuff only applies to enemy units 2021-07-30 15:07:21 +03:00
Yair Morgenstern
8ae4ae1cb1 AI accepts research agreement offers 2021-07-29 19:00:55 +03:00
Yair Morgenstern
5184743cbb Merge branch 'master' of https://github.com/yairm210/Unciv 2021-07-29 18:20:38 +03:00
SomeTroglodyte
4e249a0a1c
UnitActionType now knows keys, sounds and most icons (#4607)
* Removed Char-only restriction in keyboard support for unit actions, remap a few keys, key tooltips for non-ascii keys

* UnitActionType now knows keys, sounds and most icons

* UnitActionType empower - fix Prophets spreading Pantheons
2021-07-29 18:16:49 +03:00
Yair Morgenstern
98eba6a995 Resolved #4671 - Buildings from era are applied before buildings from policies 2021-07-29 17:44:18 +03:00
Yair Morgenstern
221f45b966 3.15.16 2021-07-27 23:27:41 +03:00
Yair Morgenstern
eb7cf85482 Solved rare teleport bug 2021-07-27 22:50:55 +03:00
SimonCeder
1f6f49efd7
Mercantile CS resources (#4641)
* Added Porcelain and Jewelry, assigned to Mercantile CS

* resized Jewelry.png

* moved citystateresource, added resource overview to diplo screen

* citystateresource saved as string

* Update template.properties

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2021-07-27 22:28:36 +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
Yair Morgenstern
a6f2b0e720 Whoops 2021-07-27 06:44:58 +03:00
Yair Morgenstern
a74e7c0a6a Resolved #4648 - city states no longer great Great Prophets when religion is not enabled 2021-07-27 06:43:11 +03:00
Yair Morgenstern
e94033fc36 Deprecated "can only attack water" unique 2021-07-27 05:39:36 +03:00
Yair Morgenstern
52867ec265 Deprecated PolicyManager.autocracyCompletedTurns 2021-07-27 05:24:19 +03:00
Yair Morgenstern
9c1248b741 Deprecated PolicyManager.legalismState 2021-07-27 05:23:23 +03:00
Yair Morgenstern
183b94702e Better unique for defending vs units 2021-07-27 05:02:13 +03:00
Yair Morgenstern
1271c86d03 Another unique that should be deprecated :) 2021-07-27 03:47:24 +03:00
Yair Morgenstern
4479103ccc Deprecation of Building.xpForNewUnits, in favor of an existing unique :) 2021-07-27 03:45:49 +03:00
Yair Morgenstern
c5ffec9ade Replaced "Building.providesFreeBuilding" field with generic unique 2021-07-26 14:29:43 +03:00
Yair Morgenstern
8a1c728438 Step 1 in the Glorious UnitType Moddability Revolution - isRanged(), isMelee(), isMilitary(), isCivilian() are no longer unittype-dependent
Unified all isAir || isMissile to BaseUnit.MovesLikeAirUnit()
2021-07-26 00:15:18 +03:00
SomeTroglodyte
d0155a6ddd
Minimap Slider UI (#4634) 2021-07-25 19:08:50 +03:00
SomeTroglodyte
3e482182b3
Unit name translation (#4635) 2021-07-25 19:05:56 +03:00
SomeTroglodyte
966f70d0d4
Rename Railroad tech to Railroads (#4567)
* Rename Railroad tech to Railroads

* Rename Railroad tech to Railroads - force check

* Rename Railroad tech to Railroads - patch1

* Rename Railroad tech to Railroads - atlas

* Rename Railroad tech to Railroads - patch2
2021-07-25 19:04:51 +03:00
SimonCeder
dbc6bc9f30
optimizing the spawn placement algorithm (#4620)
* optimize spawn placement

* consistent nomenclature
2021-07-24 22:19:46 +03:00
SomeTroglodyte
aa3be63492
Fix canImprovementBeBuiltHere regression (#4623) 2021-07-24 21:45:51 +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
Yair Morgenstern
570ec1c326 Converted Specialist GPP to Counter
Changed jsons of Buildings and Specialists to Great Person names
2021-07-23 16:15:31 +03:00
Yair Morgenstern
0ed47f10a8 Converted building GPP from stats to counter 2021-07-23 15:25:11 +03:00
Yair Morgenstern
2c050283b0 Source-to-GPP mapping - replaces StatMap 2021-07-23 14:29:31 +03:00
Yair Morgenstern
e6bac1c5b5 Moved the stat-to-counter conversion forward to the CityInfo level 2021-07-23 14:00:22 +03:00
Yair Morgenstern
cbfd658480 Part 1 of "generic Great Person points" - changed data type serialized in save to be stat-agnostic 2021-07-23 13:55:08 +03:00
SomeTroglodyte
6791dd3340
Deprecate "Can only be built on coastal tiles" unique (#4581)
* Deprecate "Can only be built on Coastal tiles"

* Deprecate "Cannot be built on bonus resource"

* Deprecate "Can only be built on Coastal tiles" - bump 'as of'
2021-07-23 13:19:35 +03:00
SimonCeder
f41d30e0cc
City states adjustments (#4597)
* city-state AI

* City-state spawns

* City-state border expansion

* City-state border expansion adjustment

* Food and production multipliers for city states

* 6 CS as default
2021-07-23 00:20:20 +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
SomeTroglodyte
e514df5b82
Removed Char-only restriction in keyboard support for unit actions, remap a few keys, key tooltips for non-ascii keys (#4606) 2021-07-23 00:02:20 +03:00
Xander Lenstra
57f647c2d1
Fixed bug where "[All] units" would not apply to city combatants (#4601) 2021-07-22 19:42:38 +03:00
Xander Lenstra
41f9fbfed2
Fixed comodification errors under certain circumstances (#4599) 2021-07-22 19:42:08 +03:00
Xander Lenstra
54df4ba0c0
Fixed a crash in badly defined mods (#4598) 2021-07-22 00:37:54 +03:00
SimonCeder
2971e6bba3
Map generation and start locations (#4588)
* cellular automata for mountains and hills

* cellular automata for mountains and hills

* tweaks

* spawn location algorithm

* consolation prizes

* improve city state spawns

* AI settle in place if possible

* make heightmap generation mod agnostic
2021-07-21 14:41:48 +03:00
SomeTroglodyte
08954c1bd1
Spruced up Civilopedia - phase 6 - uniques (#4587) 2021-07-21 14:40:17 +03:00
Xander Lenstra
e48ae69927
Implemented temples (#4585) 2021-07-21 12:21:24 +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
605581c78b
Fixed bug where 'remove road' would also remove other improvements under specific circumstances (#4583) 2021-07-21 10:42:32 +03:00
SomeTroglodyte
70a18de7cc
City construction Civilopedia-linked (#4573)
* City construction Civilopedia-linked

* City construction Civilopedia-linked - EOF
2021-07-21 10:34:00 +03:00
Xander Lenstra
92c4e4e083
Fixed units not being removed from open borders area after declaring war (#4584) 2021-07-21 10:31:13 +03:00
Xander Lenstra
167d9705f7
Fixed bug where all great people suddenly were scientists (#4582) 2021-07-21 10:28:48 +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
Xander Lenstra
2db2dc0db7
Fix autocracy bonus accidentally being disabled (#4572) 2021-07-20 09:26:46 +03:00
SomeTroglodyte
1b397f0583
Unify all those (isWonder || isNationalWonder) cases (#4574) 2021-07-20 09:26:06 +03:00
Yair Morgenstern
1070584180 Mass deprecation 2021-07-19 23:27:34 +03:00
Yair Morgenstern
7039b6a287 More sequencing for faster unique filtering 2021-07-19 23:13:36 +03:00
Yair Morgenstern
f85bedeb2f Faster filtering to avoid some ANRs 2021-07-19 23:00:05 +03:00
SomeTroglodyte
fce7d39d4a
Fix for missing Farms (all mod TileSetConfigs were always active) (#4553)
* Fix for missing Farms (all mod TileSetConfigs were always active)

* Fix for missing Farms v2

* Fix for missing Farms patch1
2021-07-19 22:05:48 +03:00
SomeTroglodyte
973a8fb0ac
Small fixes (#4548)
* Raze city button should be disabled for original capitals

* Halicarnassus trigger checks Great Person

* New water improvements should recalculate resource stuff

* Should't be able to create water improvements outside borders
2021-07-19 21:53:15 +03:00
SomeTroglodyte
46da6bd56e
Sort Civilopedia entries using locale (#4560) 2021-07-19 21:52:26 +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
SomeTroglodyte
f5a95fad18
TileGroup linting and 0.001% optimization (#4531) 2021-07-18 23:30:28 +03:00
SomeTroglodyte
8c35e54b71
Rewritten Tooltip class (#4552) 2021-07-17 22:44:09 +03:00
SomeTroglodyte
3a7da738c4
Keyboard mapping by keyCode (#4542)
* Keyboard mapping by keyCode

* Keyboard mapping by keyCode - v2
2021-07-17 22:26:20 +03:00
Xander Lenstra
9efcc4f423
Fixed bug where great prophets could be chosen as free great persons when religion was disabled (#4518) 2021-07-15 10:38:26 +03:00
Xander Lenstra
482a1260ca
Fixed bug which leads to crashes for almost all users (#4519) 2021-07-15 10:36:59 +03:00
Yair Morgenstern
df2cf711ba More deprecation 2021-07-14 23:30:47 +03:00
Yair Morgenstern
e3e08732db Deprecations 2021-07-14 22:51:33 +03:00
Yair Morgenstern
6b73a3e9d7 3.15.12 2021-07-14 22:34:11 +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
477051c616
Updated the tile choosing algorithm for city expansion (#4510)
* Updated the tile choosing algorithm for city expansion to the one used in the base game

* Implemented requested changes
2021-07-14 19:32:50 +03:00
SimonCeder
314a2a48bb
Wonder build screens redux (#4509)
* wonder splash screens

* wonder splash screens atlas

* removed pyramids file, add portrait code

* restore atlas
2021-07-13 23:42:40 +03:00
SomeTroglodyte
c9010c5fdc
Tweaked Slider, use in MapParametersTable (#4506) 2021-07-13 20:55:22 +03:00
Xander Lenstra
6c0237fcc3
Disabled city state diplomacy buttons when it is not your turn (#4503) 2021-07-13 17:41:31 +03:00
Xander Lenstra
68b40cf860
Fixed bug where great prophets could be given when religion was disabled (#4502) 2021-07-13 17:40:54 +03:00
Xander Lenstra
07e3a2228e
Fixed bug where effects of all aquaducts nationwide stacked in each city (#4487)
* Fixed bug where effects of all aquaducts nationwide stacked in each city

* Implemented requested changes

* Implemented requested changes better
2021-07-13 06:26:37 +03:00
Yair Morgenstern
2e34253a1e Resolved #4484 - civs with no cities can no longer pick policies 2021-07-12 21:25:52 +03:00
Xander Lenstra
4ee0ef4e1f
Fixed crashes on loading save games with religion (#4479) 2021-07-12 21:12:46 +03:00
Xander Lenstra
f97e64e54e
Fixed bug where submarines could not attack embarked units (#4459)
* Fixed bug where submarines could not attack embarked units

* Implemented requested changes

* Fixed typo
2021-07-12 19:37:56 +03:00
Yair Morgenstern
30082c8254 Resolved #4453 - Spectator no longer appears on Diplomacy overview 2021-07-11 21:51:35 +03:00
lishaoxia1985
ab89768894
Fix worldSizeModifier in TechManager (#4473) 2021-07-11 19:11:50 +03:00
freddyhayward
1fe8c566ee
Fix Hun city names (#4469) (#4476) 2021-07-11 19:10:03 +03:00
Xander Lenstra
63d98c4692
Fixed bug where tile construction time was increased instead of decreased (#4475) 2021-07-11 19:09:17 +03:00
lishaoxia1985
4c9e15c0ea
Make map symmetrical if it's not wrapped (#4461) 2021-07-11 10:51:57 +03:00
Yair Morgenstern
56111fa24c
Translations update (#4465)
* Update Simplified_Chinese.properties (#4456)

* Update Indonesian.properties (#4455)

* Update Indonesian.properties

* Update Indonesian.properties

* Update Italian.properties (#4445)

* Laid some groundwork for implementing further religions (#4444)

* Laid some groundwork for implementing further religions

* Fixed duplication of Religion object

* Update Korean.properties (#4443)

* Update Korean.properties

* Update Korean.properties

* Update Spanish translations fase 1 (#4440)

* Update Spanish translations fase 1

DO NOT merge this until I have finnished it. I run out of time today.

* Update Spanish.properties

* Update Czech.properties (#4437)

* Update Czech.properties

many new (and old) strings translated

* Update Czech.properties

tweaked some newly translated strings

* huns and netherlands strings

* Update Swedish.properties (#4436)

Back up to 100%
Also some tweaks:
Ändrade ett par enheter för att få realegenus (en/den) på så många som möjligt
t ex Pansarskepp -> Pansarbåt (historiskt korrekt benämning, även Monitor är tänkbart)
Man kan överväga även t ex Infanteri -> Infanterist, finns åsikter?

* Update German translation (#4434)

* Adjusting the accent (#4426)

I changed a lot of phrases and words to European Portuguese as these phrases were in Brazilian Portuguese which has its own translation in another document.

Co-authored-by: lishaoxia1985 <49801619+lishaoxia1985@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: Xander Lenstra <71121390+xlenstra@users.noreply.github.com>
Co-authored-by: Samsaek the Calico <saud2410@naver.com>
Co-authored-by: ArchDuque-Pancake <78449553+ArchDuque-Pancake@users.noreply.github.com>
Co-authored-by: stoupa007 <60326342+stoupa007@users.noreply.github.com>
Co-authored-by: SimonCeder <63475501+SimonCeder@users.noreply.github.com>
Co-authored-by: MartinP <77325495+Mape6@users.noreply.github.com>
Co-authored-by: batatasmor <75855494+batatasmor@users.noreply.github.com>
2021-07-10 23:02:23 +03:00
Xander Lenstra
b650b95356
Add missing pantheons, fix minor bugs (#4419)
* Added all remaining pantheons

* AI now choose pantheons, AI no longer tries to get mutually exclusive policies

* I don't know why this was changed

* Implemented requested changes
2021-07-10 22:50:50 +03:00
freddyhayward
77b4bcd26a
Fixed spurious notifications of revealed resources too far away or in foreign territory (#4464)
Co-authored-by: Frederick Hayward <frederick.hayward@student.unimelb.edu.au>
2021-07-10 21:59:46 +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
5925489c0b
Fixed bug (#4449) 2021-07-10 21:18:45 +03:00
Xander Lenstra
02bacac8e7
Fixed nullptrexception (#4458) 2021-07-10 21:10:04 +03:00
Xander Lenstra
74b3db5927
Fixed bug where gold from rivers wasn't doubled during golden ages (#4462) 2021-07-10 21:09:21 +03:00
Xander Lenstra
0c916e85fb
Fixed _very_ old inconsitency that broke my game :( (#4442) 2021-07-09 19:15:16 +03:00
Yair Morgenstern
d262c1a6ea Automated atomic bombs no longer cause crashes 2021-07-09 13:51:18 +03:00
Xander Lenstra
c327b54b1b
City Centers can no longer be removed by nukes (#4423)
* City Centers can no longer be removed by nukes

* Implemented requested changes

* Implemented more requested changes
2021-07-09 12:13:45 +03:00
Yair Morgenstern
df7bba02a1 Merge branch 'master' of https://github.com/yairm210/Unciv 2021-07-09 11:01:40 +03:00
Yair Morgenstern
0d328ef99a Stuffed some +/- uniques into the square brackets 2021-07-09 11:01:25 +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
edad1e10a2 Fix for placeholder parameters changing names and becoming out of sync with existing translations.
Relevant to #4402
2021-07-09 10:16:39 +03:00
Xander Lenstra
21eadb39ff
Updated TranslationFileWriter to include the new values that filters can have (#4402)
* Updated TranslationFileWriter to include the new values that filters can have

* Implemented requested changes
2021-07-09 09:14:24 +03:00
Xander Lenstra
ced85fafd1
Fixed a bug where one city challengers could capture enemy cities (#4431)
* Fixed a bug where one city challengres could capture enemy cities

* Actually, this is a cleaner implementation
2021-07-09 09:11:17 +03:00
Xander Lenstra
fbd64b9520
Refactored the way cities determine what uniques should apply when (#4393)
* I'm so sorry for the size of this PR

* Uniques are better generalized

* Code now compiles

* Missed a line

* Some more cleaning up
2021-07-07 22:01:14 +03:00
SomeTroglodyte
373b42bfcf
Update "World screen" tutorial text and Home key improved (#4403) 2021-07-07 20:00:12 +03:00
SomeTroglodyte
1d080ac54d
ExpanderTab revisited - move and apply to city screen (#4401) 2021-07-07 18:21:51 +03:00
Xander Lenstra
9e37cc8f16
Fixed crash when a city had negative population due to faster razing (#4389) 2021-07-06 19:41:23 +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
Yair Morgenstern
a6041d670d Obvious mistake 2021-07-05 21:11:47 +03:00
Yair Morgenstern
c1ff2e4ba7 Fixed Denmark's unique including also embarking instead of just disembarking 2021-07-05 21:06:54 +03:00
SomeTroglodyte
c42561c545
Spruced up Civilopedia - phase 4 - Visual candy, Units (#4350)
* Spruced up Civilopedia - phase 4 - Visual candy, Units

* Unified separators, CheckBox helper - patch2

* Unified separators, CheckBox helper - atlas merge

* Spruced up Civilopedia - phase 4 - rebuild atlas

* Spruced up Civilopedia - phase 4 - rebuild atlas

* Spruced up Civilopedia - phase 4 - do separator to-do
2021-07-05 16:35:41 +03:00
Xander Lenstra
c2a43ffee0
Fixed bug where city-states would not share their science income even if the player had the right policy (#4381)
* Fixed bug where city-states would not share their science income even if the player had the right policy

* Implemented requested changes
2021-07-05 16:34:15 +03:00
SomeTroglodyte
d909143a34
'Swap units' sound and more attack sounds (#4379) 2021-07-05 11:31:13 +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
Yair Morgenstern
6215a5990d More concurrency problem fixes in nuke effects 2021-07-05 11:12:36 +03:00
SomeTroglodyte
2c51f84bec
Unified separators, CheckBox helper (#4349)
* Unified separators, CheckBox helper

* Unified separators, CheckBox helper - patch1

* Unified separators, CheckBox helper - patch2

* Unified separators, CheckBox helper - patch3
2021-07-05 09:35:25 +03:00
Xander Lenstra
957c8697ac
Added the nation of the Netherlands (#4372)
* Added the nation of the Netherlands

* Added Sea Beggar, Dutch unique unit

* Added polder improvement, Dutch unique improvement

* Added national ability
2021-07-05 09:35:04 +03:00
SomeTroglodyte
8fb55e77a3
ExpanderTab revisited (#4357)
* ExpanderTab revisited

* ExpanderTab revisited - patch1
2021-07-04 21:25:58 +03:00
Xander Lenstra
0d26c69710
More bug fixes (#4370)
* Fixed Air Targetting not having icon

* Fixed the huns not having battering ram unique unit

* Plundering with multiple levels of coastal raider no longer creates multiple notifications

* Implemented requested changes
2021-07-04 19:18:15 +03:00
Xander Lenstra
2a4ca74e7b
Fixed more bugs I introduced myself (#4368)
* Fix bug where mobility doesn't work

* Fixed supply _still_ not working
2021-07-04 17:34:27 +03:00
Xander Lenstra
b3498e6959
Fixed two more of my own bugs (#4361)
* Fixed bug were required science for tech did not match label

* Fixed a bug
2021-07-04 06:23:02 +03:00
Xander Lenstra
aa132c8bf8
Fixed more bugs (#4360)
* Fixed city states spawning with multiple settlers

* Renamed icon for the huns
2021-07-04 00:25:20 +03:00
Yair Morgenstern
82fd24f12c Fixed concurrent modification problem in Nuke attack 2021-07-03 22:38:48 +03:00
Xander Lenstra
6c221cd56b
Fix multiple bugs resulting from updating promotions and implementing missile cruisers (#4355)
* Fixed carriers in mods no longer working

* Fixed scouting prerequisites

* Fixed surivialism not having icon or prerequisites

* Fix logistics in mods not working

* Added image for supply promotion
2021-07-03 22:26:03 +03:00
SomeTroglodyte
d8340b9c1c
Fix mod custom maps unavailable when no local ones exist (#4358) 2021-07-03 22:24:23 +03:00
SomeTroglodyte
8fdb4f413e
Spruced up Civilopedia - phase 3 - Interface, flavour text, new Tutorial (#4334) 2021-07-02 19:22:38 +03:00