Commit Graph

4006 Commits

Author SHA1 Message Date
yairm210
2f8de2d196 Added Stats as unique parameter type 2021-09-17 10:43:03 +03:00
yairm210
af9e691102 Ease of deprecation, brought to you by unique types!
*Visible*, locatable deprecated uniques!
Stated replacement uniques!
2021-09-17 10:33:53 +03:00
yairm210
1f05239275 Unit filtering actually comes in 2 flavors - one for "unit templates", BaseUnit, and one for "actual units in the field", MapUnit. This should be reflected in the parameter names. 2021-09-17 10:14:05 +03:00
yairm210
fa939e15d9 getMatchingUnique for UniqueType - will allow us to convert most of the uniques painlessly 2021-09-17 09:55:57 +03:00
Yair Morgenstern
34cb48aa31
Unique enum compliance detection (#5226)
* Added basic functionality for uniques enum

* Added unique type to Unique class for faster enum comparisons

* And Elvis operator for unknown parameter type

* Resolved #5162 - AI much less motivated to attack city-states

* Whoops, wrong branch

* New unique checks, with enum.

* Fixed Trog's comments
2021-09-17 09:35:01 +03:00
Xander Lenstra
b73b81a313 Fix bugs and crashes (#5245)
* Fixed crash when liberating city-states

* Fixed crash & building duplication from 'legalism' policy

(cherry picked from commit b0dff6a71c)
2021-09-17 09:13:39 +03:00
Xander Lenstra
b0dff6a71c
Fix bugs and crashes (#5245)
* Fixed crash when liberating city-states

* Fixed crash & building duplication from 'legalism' policy
2021-09-17 08:44:48 +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
3d9c5bcc34
Mod TranslationFileWriter re-work (#5219)
* Mod TranslationFileWriter re-work

* Mod TranslationFileWriter re-work - style and existing in base treatment

* Mod TranslationFileWriter re-work - style and existing in base treatment
2021-09-16 20:59:50 +03:00
SomeTroglodyte
a61efa65c9
Ask before resetting game setup to defaults (#5231) 2021-09-16 20:56:54 +03:00
Xander Lenstra
eb665a9158
Embarked units only have 1 vision (except marines) (#5215)
* Embarked units only have 1 vision

* Embarked units always only have 1 vision, unless they don't
2021-09-16 20:55:33 +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
Yair Morgenstern
6d26a28619
Added basic functionality for uniques enum (#5222)
* Added basic functionality for uniques enum

* Added unique type to Unique class for faster enum comparisons

* And Elvis operator for unknown parameter type

* Resolved #5162 - AI much less motivated to attack city-states

* Whoops, wrong branch
2021-09-16 20:52:06 +03:00
Xander Lenstra
51bfd927c1
Fixed crash when providing free buildings (#5230) 2021-09-15 16:56:43 +03:00
yairm210
ce8dd40c60 #4963 - All city-state influences recalculate ally civ, which recalculates resources, which recalculates stats. 2021-09-15 01:47:17 +03:00
yairm210
b7eb21b606 Merge remote-tracking branch 'origin/master' 2021-09-15 00:59:40 +03:00
yairm210
f60464201b Resolved #5162 - AI much less motivated to attack city-states 2021-09-15 00:59:28 +03:00
SimonCeder
672d2a3c34
Fix Khan unit (#5207)
* fix khan unique

* fix adjacent healing bonus

* plus

* Khan heals itself also

* nerf medic
2021-09-15 00:35:16 +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
Xander Lenstra
fe60c100fa
Simplified check for enabled religion and added it in more places (#5218)
* Reworked `hasReligionEnabled`

* Added more checks for enabled religion

* Consistisized spelling
2021-09-14 17:34:04 +03:00
Xander Lenstra
fe3220299c
Fixed a few spots using the name of a religion instead of its displayName (#5216) 2021-09-14 17:33:06 +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
Xander Lenstra
0f805fbac4
Made CN tower functional, and free buildings are removed on capture (#5206)
* Refactored free buildings from civ.policies to civ.constructions

* Made CN tower function like in the base game

* Fixed random buildings being marked culture buildings
2021-09-14 10:12:08 +03:00
ravignir
893f41a0ed
Add missing Natural Wonders (#5204)
* Add files via upload

* Add files via upload

* Add files via upload

* Update Terrains.json

* Update Constants.kt

* Update Constants.kt

* Update NaturalWonderGenerator.kt

* Update Constants.kt

* Update NaturalWonderGenerator.kt

* Natural Wonders generation fixes.
2021-09-13 20:49:46 +03:00
Xander Lenstra
9c66154a44
Updated piety policy tree (#5195)
* Added piety policy tree

* Misread an ability

* Fixed filter
2021-09-12 21:48:28 +03:00
Xander Lenstra
a4c520fd26
Added "Consumes [amount] [resource]" for improvements (#5129)
* Added "Consumes [amount] [resource]" for improvements

* It now also works for placeable improvements

* Made construction grayed out instead of disappear when no resources available
2021-09-12 21:21:46 +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
Xander Lenstra
03a7288656
Fixed sqrt of negative number (#5193) 2021-09-12 19:07:33 +03:00
Xander Lenstra
b002e53eba
Fixed some bugs (#5178)
* Fixed bug where moving a unit stopped automation

* Fixed bug where chosing an icon last in the religion screen would not enable the 'found religion' button

* Fixed bug where buying units with an increasing cost would deduct the wrong amount

* Fixed bug making it impossible to pick free techs
2021-09-11 23:09:43 +03:00
yairm210
db78bcf00d Fixed another crash when mod game had religion enabled but had no great prophet unit 2021-09-11 23:07:39 +03:00
yairm210
619dfc5e09 Fixed crash when mod game had religion enabled but had no great prophet unit
Also slight deprecation
2021-09-11 23:05:07 +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
SomeTroglodyte
45e87688cf
Guard against crash in getNumThreateningBarbarians without barbs (#5173)
* Guard against crash in getNumThreateningBarbarians without barbs

* Guard against crash in getNumThreateningBarbarians without barbs - missing inits
2021-09-11 21:09:45 +03:00
yairm210
00e962c9ac Resolved #4977 - can no longer fast-tap to confuse the policy/construction screens 2021-09-10 13:51:01 +03:00
yairm210
66d7e8cbd0 Minor improvements 2021-09-10 13:42:37 +03:00
yairm210
3103984250 Merge remote-tracking branch 'origin/master' 2021-09-09 21:55:45 +03:00
yairm210
d8d94cb6bd Deprecation 2021-09-09 21:55:25 +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
f1f4def7f0
Fix Denunceation typo, reorg compatibility code (#5156)
* Fix Denunceation typo, reorg compatibility code

* Fix Denunceation typo - lint
2021-09-09 21:29:13 +03:00
SimonCeder
cbd3c2910e
Icons for city states (#5160)
* Add city state icons

* Add the icons

* Get filename from cityStateType.name

* less padding

* Icon names in enum, icons in diplomacy screen
2021-09-09 21:28:30 +03:00
SomeTroglodyte
df5540442f
Fix crash entering mod management (#5158) 2021-09-09 20:06:37 +03:00
SomeTroglodyte
612ad0ab55
Fix era notification (#5161) 2021-09-09 20:03:51 +03:00
Xander Lenstra
7b6e57d3b5
Religion goes from alpha into beta: available from stat screen immediately (#5149) 2021-09-09 07:24:56 +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
ffdc289611
Civilopedia remove migration-only interface elements (#5150) 2021-09-09 07:18:26 +03:00
Xander Lenstra
9c876ad84e
Wrote an extensive tutorial documenting most of religion (#5130)
* Wrote an extensive tutorial documenting most of religion

* Fixed spelling and improved clarity

* Fixed typo (Thanks for noticing!)

* Reworded and split up tutorials, fixed grammer/spelling mistakes

* Added missing quote mark
2021-09-09 06:22:43 +03:00
SomeTroglodyte
8b210fb798
Kotlin 1.5 new warnings - the rest (#5151) 2021-09-09 06:21:44 +03:00
ravignir
ac5122741b
deleting the annoying part of misimplemeted pledge to protect mechanic. (#5146)
Maybe poll this on discord.
2021-09-08 23:35:20 +03:00
yairm210
1530389507 3.16.13 2021-09-08 23:19:07 +03:00
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