Commit Graph

6436 Commits

Author SHA1 Message Date
Yair Morgenstern
824b0d2af9
Version rollout (#10096)
* Bump version and create initial changelog entry

* Update Korean.properties (#10093)

* Update Spanish.properties (#10084)

* Update Italian.properties (#10082)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Yattong the Mackerel <saud2410@naver.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2023-09-11 09:47:55 +03:00
SeventhM
c2acdadc50
Fix unique Great Prophets not having the correct cost when buying at an increasing cost (#10095) 2023-09-11 09:29:25 +03:00
SeventhM
2061b2cc03
Fix free units with a build limit not spawning (#10091)
* Fix free units with a build limit not spawning

* Flip the amount when at the limit

* Unrelated linting
2023-09-11 09:29:18 +03:00
SeventhM
fbb516f90f
Fix AI getting stuck when it can't promote with enough xp (#10089)
* Fix AI getting stuck when it can't promote with enough xp

* Reverse the check for promotions

* Forgot to remove extra break
2023-09-11 09:29:06 +03:00
SomeTroglodyte
19f9cba058
Allow the Space key to close Alert popups with no actual choice (#10085) 2023-09-11 09:28:59 +03:00
Oskar Niesen
c3484381c3
Fixed politics tab not showing defensive pacts (#10079)
* Override DoF displayed on Politics table with defensive pact when applicable and added CYAN color to table and diagram.

* City-state alliances now show as CYAN in the politics table
2023-09-11 09:28:52 +03:00
Yair Morgenstern
a68f7db463
Version rollout (#10080)
* Bump version and create initial changelog entry

* Update Polish.properties (#10075)

* Update Brazilian_Portuguese.properties (#10074)

* Update Russian.properties (#10073)

* Update Russian.properties

* Update Russian.properties

New string and corrects

* Update Russian.properties

#2

* Update Russian.properties

*3

* Update German translation (#10069)

* Update Dutch.properties (#10067)

* Update French.properties (#10066)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Anoant <143289571+Anoant@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
2023-09-07 10:13:19 +03:00
Yair Morgenstern
30570747a8
Unify placeholder parsing for unique parameters (#10072)
* Unify placeholder parsing for unique parameters

* Remove double "remove conditional" call - kudos @SomeTroglodyte
2023-09-07 09:57:40 +03:00
Yair Morgenstern
55a3fa2a75 cleanup: Copy Zero vectors before passing to localToStageCoordinates (#10048) 2023-09-06 12:38:14 +03:00
Framonti
538330db87
Test/refactor target helper and test it (#10048)
* ♻️ merge together two branches executing same code

* ♻️ swap if-else chain with when to improve readability

* ️ swap conditions to first check the lighter computationally-wise

* ♻️ extract method to increase readability

* 💚 add some tests for TargetHelper

* 💡 add comment explaining how Unciv grid system works using a graphical example

* 💚 add other tests

* ♻️ change method name to better reflect what it does

* 🐛 fix import after rebase

* 🔥 remove parameter when value is the default and use static field for Vector2(0f, 0f)

* ♻️ split setTileTerrainAndFeatures in two different methods

* ♻️ update older tests to use the new functions
2023-09-05 22:25:28 +03:00
Yair Morgenstern
4f9dc953cb
Version rollout (#10065)
* Bump version and create initial changelog entry

* Update Polish.properties (#10057)

* Update German translation (#10056)

* Update Spanish.properties (#10051)

* Update French.properties (#10049)

* Update Italian.properties (#10046)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2023-09-05 19:10:29 +03:00
SomeTroglodyte
855b2959a1
Fix Map Editor double map holders after ruleset change (#10047)
* Fix Map Editor double map holders after ruleset change

* Fix buttons are vertical in AskFitMapToRulesetPopup

* Sort imports over mapeditor package
2023-09-05 19:02:36 +03:00
SomeTroglodyte
5bccc4abf3
Fix longpress triggering when an onClick discards its actor (#10052) 2023-09-05 19:02:27 +03:00
Oskar Niesen
eec3732c96
Defensive pact notification fix (#10025)
* Fixed Civ getting two notifications of canceling their defensive pact when attacking.

* Added Defensive Pact related warnings to the Declare War popup

* Improved the warning to not include Civs that are already at war with the aggressor

* Improved the warning to not include Civs that are already at war with the aggressor

* Added defensive pact related warning translations

* Refactored removeDefensivePacts

* DeclareWarButton text now uses arrayListOf<String> and changed the for loop to a while loop

* Extracted the DeclareWarButton text to a new method.
2023-09-05 19:01:45 +03:00
Yair Morgenstern
5cc57f9293 performance: Don't calc checksum for non-multiplayer games, no one cares if you hack your own game 2023-09-05 18:52:42 +03:00
SomeTroglodyte
a2fa4cebf4
Improve BaseUnit hasUnique(FoundCity) handling (#10063) 2023-09-05 15:40:55 +03:00
SomeTroglodyte
f7069851c7
Fix Gdx not forced to UTF-8 when saving a game (#10062) 2023-09-05 14:35:54 +03:00
Yair Morgenstern
e58dd7c1f6 Buildings missing from ruleset are removed from loaded games *properly* 2023-09-04 16:42:21 +03:00
Yair Morgenstern
9fd7ddf050
Version rollout (#10044)
* Bump version and create initial changelog entry

* Update German translation (#10042)

* Update Brazilian_Portuguese.properties (#10039)

* Update Brazilian_Portuguese.properties

* Update Brazilian_Portuguese.properties

* Update French.properties (#10037)

* Update Swedish.properties (#10035)

* Update Swedish.properties

* bracket fix

* Update Spanish.properties (#10034)

* Update Russian.properties (#10033)

* Update Bulgarian.properties (#10032)

* Update Bulgarian.properties

* Update Bulgarian.properties

* Update Bulgarian.properties

* Update Bulgarian.properties

* Update Polish.properties (#10030)

* Update Polish.properties

* Update Polish.properties

* Update Polish.properties

* Update Polish.properties

* Update Polish.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Mr-Bajs <93934125+Mr-Bajs@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Anoant <143289571+Anoant@users.noreply.github.com>
Co-authored-by: Instrumentarium <143902440+Instrumentarium@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
2023-09-04 15:02:51 +03:00
Yair Morgenstern
06691d429e Resolved #10011 - Teleport units away from city center when liberating 2023-09-04 14:58:48 +03:00
Yair Morgenstern
1037b3d240 Resolved #10031 - don't add icons to selection boxes 2023-09-04 14:41:47 +03:00
Yair Morgenstern
743c90d454 chore: Moved TranslatedSelectBox to its own file in ui.components - see #10031 2023-09-04 14:41:05 +03:00
SeventhM
d19281e0e6
Add unique for a promotion to be free (#10015)
* Add unique for a promotion to be free

* Have Ai prefer free promotions

* Allow AI to get multiple promotions each step
2023-09-04 14:37:59 +03:00
Oskar Niesen
087c2a0946
Fixed AI unit attack decision making (#10036)
* Limited the impact of a high attacksToKill value

* Fixed chooseAttackTarget returning nothing when attackableEnemies only has one element
2023-09-04 14:37:44 +03:00
SeventhM
ac5e51dbea
Fix cities getting the resource list of other cities (#10041) 2023-09-04 14:37:06 +03:00
SomeTroglodyte
d758da4d11
Fix ChangesTerrain unique for base terrains (#10043)
* Fix UniqueType.ChangesTerrain not working for base terrain parameter

* Fix spawnRiver resultingTiles to include all affected tiles on both sides of the River

* Fix terrain conversion for rivers from Map Editor partial generation / paint from-to

* forEach linting

* Instrumentation for generateSingleStep

* forEach linting

* Remove lazies
2023-09-04 14:36:52 +03:00
Yair Morgenstern
8b9d0af4bf 4.8.0 2023-09-03 09:55:02 +03:00
Yair Morgenstern
057a7ce9b5
Version rollout (#10029)
* Bump version and create initial changelog entry

* Update Dutch.properties (#10023)

* Update Simplified_Chinese.properties (#10020)

* Update Italian.properties (#10019)

* Update Russian.properties (#10017)

* Update Russian.properties

Defensive pacts

* Update Russian.properties

Some lines

* Update Spanish.properties (#10016)

* Update Spanish.properties

* Correct Kongo name

* Update French.properties (#10013)

* Update German translation (#10008)

* Update German translation

* Update German translation

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: qw142536 <123065131+qw142536@users.noreply.github.com>
Co-authored-by: TommasoPetrolito <tommasouni@gmail.com>
Co-authored-by: Anoant <143289571+Anoant@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
2023-09-03 09:42:57 +03:00
SomeTroglodyte
ca160b56fa
City construct menu (#9961)
* Some preparation refactoring

* Some preparation API extension

* Initial constructions context menu

* More CityConstructions API clarification

* Templates and KeyBindings

* Fix quirks and prettify highlighting issues
2023-09-03 09:36:11 +03:00
SeventhM
dcb50bbbf5
Fix: "Only available" not working properly for religions or transforming/upgrading units (#10012) 2023-09-03 09:32:40 +03:00
SomeTroglodyte
bb3335aaa8
Pedia Search (#9997)
* Minor Civilopedia linting

* Civilopedia Search Popup

* Add missing "entire current complex ruleset" scope

* Address comments

* Wording change

* Remove comment
2023-09-03 09:32:28 +03:00
Yair Morgenstern
6f9d2ea6d5 There's no need to save the civ uniques in *every* city unique usage differently, waste of RAM and CPU 2023-08-31 15:26:29 +03:00
Yair Morgenstern
ad7397ecc9 Performance: Cache uniques when choosing best tiles to settle/create improvements on
Resuse cache between cities for choosing best improvement for worker to pick (but not between workers...YET)

Alternate title: MOAR CACHES EVERYWHERE
2023-08-31 14:42:10 +03:00
Yair Morgenstern
f8ccefd10c performance: Use the same trick of 'save unfiltered, return filtered' for cached city uniques, so devs don't need to worry about cache state when improving performance!
Big DUH moment, we've been applying this same trick everywhere but haven't generalized it yet...

This will both make performance improvements easier, AND improve readability!
2023-08-31 14:27:57 +03:00
Yair Morgenstern
97b16d2b5f performance: Unique caching revamp!
- Cache civ uniques ignoring conditionals, for better reuse
- Cache civ uniques *when querying city uniques*, same

This allows us to use the same UniqueCache between cities, and we still get the performance boost of "search once filter always", since the searching is the heavier part, and in any case we'll always have to do the filtering by conditionals either way
2023-08-31 14:15:32 +03:00
Yair Morgenstern
e2faba879b
Version rollout (#10006)
* Bump version and create initial changelog entry

* Update Catalan.properties (#10003)

* Update Brazilian_Portuguese.properties (#10000)

* Update French.properties (#9999)

* Update Simplified_Chinese (#9995)

* Update Italian.properties (#9993)

* Update German.properties - missing and changed translations added… (#9991)

* Update German.properties - missing and changed translations added + making one previous string translation consistent with similar ones

* Update German.properties unified translation of "defensive" in my changes

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: qubodup <qubodup@gmail.com>
2023-08-30 23:54:28 +03:00
Yair Morgenstern
cb7bb51e18 Removed "in other cities" conditional and cityfilter, allowing civ.getMatchingUniques to NOT be city-based, thus cacheable - makes future performance optimization possible :D 2023-08-30 23:53:47 +03:00
Brian
a6142ec482
"Jump To Destination" Unit Action Button for units that are moving (#9955)
* Added "Jump To Destination" UnitActionButton for moving unit

This commit also fixes the situation where the player is unable to open the Show More unit actions list while the unit is moving and out of moves for the turn. Previously, clicking Show More in this scenario would jump to the next active unit.

* Added Jump To Destination to translation file

* Changed Jump to Destination to Show Unit Destination, updated icon, credits
2023-08-30 23:39:16 +03:00
Framonti
7952366afb
Refactor BattleDamage object and test it (#9992)
* 💡 add some comments providing examples

* ♻ refactor getGeneralModifiers to increase readability

* ♻ refactor getAttackModifiers to increase readability

* 🏗 move constants expressed as magic number to separated class to increase maintainability and expressivity

* ♻ invert condition to remove continue statement and simplify code

* 💚 add some tests for battle damage class
2023-08-30 23:37:10 +03:00
Yair Morgenstern
96e96cf449 Resolved #10004 - Defensive pact allies *meet* the aggressor civ so they can declare war on them, if they haven't already met 2023-08-30 23:14:51 +03:00
Yair Morgenstern
5585dfa470 Resolved #10005 - Great person points for units not in ruleset are ignored, and warned against 2023-08-30 23:10:14 +03:00
Yair Morgenstern
713c5968b8 Performance: No need to calculate stats before reassigning population, since it's done there anyway 2023-08-29 22:51:07 +03:00
Yair Morgenstern
41fa29f50c Performance - copy resourceCache, and don't reassign population and update civ resources, when checking improvement stat diff 2023-08-29 22:38:26 +03:00
SomeTroglodyte
bf687f2f0f
UnitTable close button mouseover (#9998) 2023-08-29 22:11:56 +03:00
Yair Morgenstern
1fa2d945c3 Resolved #9954 - clarify when trade decision is made for new players 2023-08-29 14:57:30 +03:00
Yair Morgenstern
014dea246f Automated units will not autopromote by default (changeable by options setting) 2023-08-29 14:49:05 +03:00
Yair Morgenstern
bffbd009ad
Version rollout (#9989)
* Bump version and create initial changelog entry

* Update German.properties translating missing strings (#9984)

* Update Korean.properties (#9974)

* Update Brazilian_Portuguese.properties (#9972)

* Update Brazilian_Portuguese.properties

* Update Brazilian_Portuguese.properties

* Update Catalan.properties (#9971)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: qubodup <qubodup@gmail.com>
Co-authored-by: DoosanBears82 <142787703+DoosanBears82@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
2023-08-28 11:02:51 +03:00
SeventhM
8955d16e6a
Fix promotions being available when they shouldn't (#9986)
* Fix promotions being available when they shouldn't

* Move unreachable code to the bottom

* Remove unnecessary comment

* Details for adopted nodes technically shouldn't be overriden

* Add back in unreachable before we do checks

* Just realized we're back to square one. Here's an actual fix
2023-08-28 10:52:51 +03:00
SomeTroglodyte
96292cbf4d
Fix Permanent Audiovisual toggle and start on declarative Mod Compatibility (#9970)
* Fix Mod Manager not offering "Permanent Audiovisual" for audio-only mods

* Beginnings of declarative Mod Compatibility
2023-08-28 10:51:14 +03:00
Oskar Niesen
0db070a25f
Ai nuke improvement (#9968)
* Improved Nuke AI

* AI can only nuke visible tiles now

* Removed an extra space

* Removed commented changes from another feature in testing

* Removed commented changes from another feature in testing again

* AI now doesn't calculate the value of nuking a tile while at peace

* Removed extra change related to attacking cities.
2023-08-28 10:49:57 +03:00
Oskar Niesen
c8de5a7de3
AI now move units closer to enemy first in wartime (#9967) 2023-08-28 10:46:46 +03:00
Oskar Niesen
88741f95e9
Improved AI chooseAttackTarget (#9979)
* Improved AI chooseAttackTarget

* Added extra import statement

* Restructured chooseAttackTarget to use .maxByOrNull

* Refactored getUnitAttackValue

* Standardised attack valuing in BattleHelper
2023-08-28 10:43:26 +03:00
SeventhM
ef8deffe67
Allow buildings to require population, Allow buildings to use condtionals (#9987)
* Allow buildings to require population, Allow buildings to use condtionals

* Almost forgot the conditional part, whoops

* Fix unintended error
2023-08-28 09:10:44 +03:00
SeventhM
35b370b43b
Add Improvements to the list of of known improvement filters (#9981) 2023-08-28 08:59:17 +03:00
SeventhM
bda3215006
Refactor: Remove unnecessary ruleset checks (#9973)
* address unnecessary ruleset checks

* Add missing imports

* Fix units not getting the ability uses set if it the city has your own religion

* Remove unnecessary cityConstructions check

* Remove more cases of unnecessary ruleset checks
2023-08-27 22:48:20 +03:00
SomeTroglodyte
066c698117
Linting of unused new function shouldOpenPolicyPicker() (#9969) 2023-08-25 00:10:40 +03:00
Framonti
53748a40d7
Add tests for city class and introduce small refactor (#9965)
* ♻ extract methods to improve readability

* 💚 introduce tests for city logic
2023-08-24 17:14:02 +03:00
Yair Morgenstern
94dbb3377a Fix detekt by using fully qualified import 2023-08-24 15:59:29 +03:00
Yair Morgenstern
ac85888cfd Resolved ANRs on new game screen when user has a lot of maps, by deferring the parsing of most of the map files until after the screen has loaded 2023-08-24 11:33:02 +03:00
Yair Morgenstern
2028c0569b Fixed errors when cloning civ that should open policy picker
We should not be using get() functions for serializable fields that we want to clone!
2023-08-24 10:53:01 +03:00
Yair Morgenstern
5bcfcb3e8c 4.7.17-patch1
Resolved ANRs due to A. Multiplayer checker not cancelling in loop and B. trying to update resources while checking tile improvement stat differences
2023-08-24 10:46:20 +03:00
Yair Morgenstern
978cb301f1 4.7.17 2023-08-24 10:34:42 +03:00
Yair Morgenstern
f7da97b6b8
Version rollout (#9964)
* Bump version and create initial changelog entry

* Update Italian.properties (#9960)

* Update Spanish.properties (#9958)

* Update Spanish.properties

* Update Spanish.properties

* Update Dutch.properties (#9956)

* Update Dutch.properties

* Update Dutch.properties

* update Dutch.properties

* Update Dutch.properties

* Update French.properties (#9953)

* Update Polish.properties (#9952)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
2023-08-24 10:19:01 +03:00
Oskar Niesen
592304ba2f
Research agreements with gold offer (#9933)
* Research agreements can now be offered when both civilizations combined have enough gold.

* Moved a OfferColumnsTable constructor parameter.

* Fixed the ordering of an argument in TradeTable.

* Added an extra comment to OffersListScroll.

* Refactored research pact trade balancing when offered.

* Research agreement cost now uses the highest era from both participants.
2023-08-24 10:10:12 +03:00
SomeTroglodyte
12e3cfc5b3
A few more useful notification actions (#9811)
* Minor UI tweaks - mainly duplicate icons on ResourcesOverviewTab and EspionageOverviewScreen

* Bugfix and expand NotificationActions

* Switch NotificationAction migration to Phase IV

* Tweak a few Notifications to have more useful actions

* Remove one `run {}`

* Better predictability of clicks on Notifications pulled out of history

* Unit creation notifications can now select the unit

* Linting

* ClearBarbarianCamp quest Notification shows map location first

* More Linting

* Hide City-state call for help from aggressor
2023-08-24 10:09:57 +03:00
SomeTroglodyte
40fe93888f
Centralize hasUnitMovedThisTurn and fix by moving TransferMovement implementation to getMaxMovement (#9950) 2023-08-24 10:09:35 +03:00
SomeTroglodyte
c79d1d4d52
Bombard to the north (#9951)
* Tweak TileOverlays slightly to make city bombard accessible

* Linting
2023-08-24 10:09:24 +03:00
SomeTroglodyte
88449a819b
Fix next-turn not offering Policy Picker for free Policies (#9963) 2023-08-24 10:09:09 +03:00
SomeTroglodyte
cfd22621ee
Fix intended Longpress-to-move on Android not working (#9962) 2023-08-24 10:08:36 +03:00
Yair Morgenstern
2ce258b281 Free water units are always added to coastal cities 2023-08-24 10:07:33 +03:00
Oskar Niesen
d668c5dceb
General Starting locations in map editor (#9920)
* Added an Any Civ starting location brush.

* Fixed the Remove starting locations brush from being too long.

* Civs without a specific starting location given to them now use the spectator starting locations before finding a free tile.

* Removed spectator from civilizations to give a starting location.

* Added comments

* Removed accidentally added import statements.

* Added new display text to template.properties

* Replaced an inline when statement with an if statement.

* Fixed not having a space after a translation.

* Moved finding a starting location to a new function.

* Fixed GameStarter.getCivStartingLocation to return a null if it couldn't find a tile to start on.
2023-08-21 22:42:14 +03:00
Yair Morgenstern
70b04765cc
Version rollout (#9949)
* Bump version and create initial changelog entry

* Update Simplified_Chinese (#9938)

* Update Italian.properties (Defensive Pacts) (#9924)

* Update French.properties (#9922)

* Update Spanish.properties (#9921)

* Update Spanish.properties

* Reword

* Add missing equal sign

Co-authored-by: TommasoPetrolito <tommasouni@gmail.com>

---------

Co-authored-by: TommasoPetrolito <tommasouni@gmail.com>

* Update Brazilian_Portuguese.properties (#9919)

* Update Brazilian_Portuguese.properties

* Update Brazilian_Portuguese.properties

* Update Korean.properties (#9948)

New unciv & github user here.
I found Korean translation stopped on February and thought this would help a little bit.
It still has untranslated lines and some may be incorrect, but better than never? :)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: TommasoPetrolito <tommasouni@gmail.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: DoosanBears82 <142787703+DoosanBears82@users.noreply.github.com>
2023-08-21 22:41:47 +03:00
Brian
1ef883ecdd
ImprovementPicker screen displays tile owner civ and city (#9942)
* Added owner civ and city to the ImprovementPicker screen with translation

* Switched tileOwnerText from var to val

* Changed unowned tile message and city name link to city screen
2023-08-21 22:41:15 +03:00
SomeTroglodyte
ff806b5f3c
Fix minimum votes needed for a diplomatic victory (#9932)
* Diplomatic Vote tweak: Defensively make sure Spectator can't vote

* Diplomatic Vote tweak: Fix votesNeededForDiplomaticVictory formula and base count
2023-08-21 18:17:32 +03:00
SomeTroglodyte
cc43a41ec7
Consistent UTF-8 where possible (#9927)
* Consistent UTF-8 where possible

* Remove one import
2023-08-21 18:17:21 +03:00
SomeTroglodyte
4851865bce
Victory illustrations (#9934)
* Victory Screen Illustrations page

* Fix WorldReligion victory disclosing random player count

* Victory screen icons and Victory types get their separately moddable path

* Merge fix and nicer wiki text

* VictoryScreenIllustrations debug run

* Fix Image sizing and some polishing

* Fix white squares on some Victory Screen Cultural milestone buttons
2023-08-21 18:17:13 +03:00
John McDonnell
56a3f298ef
Add option to Enable/Disable unit upgrades for automated units (#9941)
* Add option to enable/disable unit upgrades for automated units

* Add automated unit upgrade String to template.properties

* Change check for isPlayer to isHuman when performing upgrades for automated units
2023-08-21 18:16:59 +03:00
Brian
f7415bf0a9
Visual indicator for building outside workable tiles 9486 (#9935)
* Added warning to improvement picker buttons for improvements out of range for population to work

City population can not work tiles farther than 3 tiles from the city center. The improvement picker did not warn that improvements providing stat increases would not be workable, so the improvement might be worthless. The ImprovementPicker screen will now warn on the improvement button if the improvement provides a stat increase, but is farther than 3 tiles from the owning city center. The warning happens for all improvements that increase the tile stats, including Luxury and Strategic resource improvements. The warning does not disallow building the improvement.

* Changed methods for finding positive stat increases and added translation for warning text

* Condensed conditional for warning text in ImprovementPicker
2023-08-21 18:16:07 +03:00
Yair Morgenstern
f3ff1033ea Resolved #9944 - Undo button in Multiplayer no longer changes 'next turn' button 2023-08-21 18:15:48 +03:00
SeventhM
08a04d3575
Refactor: Move checking targets from automation to logic (#9945)
* Move checking targets from automation to logic

* Ending newline, move attackable tile

* move getBombardableTiles for similar reasons

* fix package name

* remove import
2023-08-20 09:18:47 +03:00
Yair Morgenstern
72a7f4df57 4.7.15-patch1 2023-08-18 12:51:37 +03:00
SomeTroglodyte
0e664d943b
Fix missing DiplomaticVotePickerScreen link in NextTurnAction (#9931) 2023-08-17 16:18:23 +03:00
SomeTroglodyte
e1a44b1076
Fix AutoScrollPane to not steal focus when disabled (#9930) 2023-08-17 16:12:43 +03:00
SeventhM
67adabb78f
Additional unit tests (#9866)
* Additional unit tests

* Missing import

* Changing stuff solely to avoid an import

* Example of the test, in different orders

* New PromotionTree test

* Add functions to make PromotionTree easier to work with

* Changing values to be lateinit variables
2023-08-17 09:17:23 +03:00
SeventhM
1c85ca8c09
Fix City-States giving untradeable resources (#9923) 2023-08-17 08:50:39 +03:00
Yair Morgenstern
886f0f8caa 4.7.15 2023-08-16 18:17:58 +03:00
Yair Morgenstern
3bc06efc16
Version rollout (#9918)
* Bump version and create initial changelog entry

* Update Indonesian.properties (#9916)

* Update Indonesian.properties

* Update Indonesian.properties

Variable errors

* Italian: Add translations for '# Requires' lines (#9915)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: kensvin <kensvin28@gmail.com>
Co-authored-by: TommasoPetrolito <tommasouni@gmail.com>
2023-08-16 18:02:57 +03:00
SeventhM
6e3d4d99e0
Add "Improvement" as an improvement filter (#9906)
* Add "Improvement" as an improvement filter

* Update docs, change from non road improvement to all improvement
2023-08-16 17:59:54 +03:00
Oskar Niesen
548b536818
Add Defensive pact (#9900)
* Defensive Pacts can now be offered.

* Signing a defensive pact now makes the Civs join all defensive wars. Any future defensive wars will force the other civ to join.

* Removed Popup Alert Defensive Pact.

* Defensive pact and Research pact now are only on the trade screen.

* AI now offers defensive pacts.

* Added AI evaluating sending and receiving Defensive Pact offers.

* Reverted some temporary changes

* Reduced the chance an AI offers a defensive pact

* Starting an offensive war now cancels all Defensive Pacts with other civilisations.

* Removed extra requirements before an AI will sign or offer a defensive pact.

* Added Defensive Pacts to the Civilopedia.

* Fixed the AI counter offering with treaties.

* Fixed a test using the old method of checking if a civ is at war.

* Fixed a previous refactor error.

* Deleted commented out Research Agreement button code.

* Fixed some spelling errors and remnant debugging code.

* Removed signing a defensive pact brings both Civ's into each others previous defensive wars.

* Refactored setFriendshipBasedModifier to look better

* Starting an offensive war now removes the defensive pact form both sides.

* Reverted changes to DiplomaticStatus

* Removed extra technology check to sign a defensive pact.

* Removed DiplomacyManager.isAtWar() completely.

* Moved setting defensivePact flags from  TradeLogic.transferTrade() to DiplomacyManager.signDefensivePact.

* Changed diplomatic modifiers related to Defensive Pacts to be less extreme.

* Fixed canceling Defensive Pacts when declaring war and notifying other Civs.

* Updated the Defensive Pact entry in the Civilopedia and fixed some spelling.

* Fixed Defensive Pact behavior while attacking and defending.

* Changed a variable to a more readable name.

* Improved readability of setFriendshipBasedModifier().

* Moved the important onWarDeclared functionality to their own functions.

* Added a notification for the attacking Civ when a Civ joins war through a Defensive Pact.

* Refactored setDefensivePactBasedModifier() to be more readable.

* Increased DeclinedDefensivePact time.

* Deleted old commented code that removed the research agreement button.

* Fixed having reverting changes errors in UnitMovementTests.

* Refactored breaking treaties when declaring war.

* Removed unnecessary semicolons.
2023-08-16 17:59:41 +03:00
Oskar Niesen
65f884cb54
Nuke blast simulation no longer shows invisible units. (#9913)
* Nuke blast simulation no longer shows invisible units.

* Changed code to look better.

* Improved readability.
2023-08-16 17:59:30 +03:00
SomeTroglodyte
9889bfcd1d
Show impassable tile percentage on Map Editor View summary (#9917) 2023-08-16 17:59:14 +03:00
Yair Morgenstern
ff24a5b884
Version rollout (#9909)
* Bump version and create initial changelog entry

* Update Russian.properties (#9903)

* Update Russian.properties

* Update Russian.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: deqtodo <94169613+deqtodo@users.noreply.github.com>
2023-08-14 16:29:05 +03:00
SomeTroglodyte
a4a43dadc1
Mod manager smallish overhaul (#9878)
* Mod Manager - move classes, visibility

* Mod Manager - separate metadata from UI buttons

* Mod Manager - split off info/actions pane and make it scrollable

* Mod Manager - fix bottom button mouseover

* Mod Manager - getRepoSize lint and doc

* Mod Manager - banner for builtin rulesets and hide visual checkbox in obvious-BS cases

* Mod Manager - MB rounded to next instead of down

* Mod Manager - One missed lint

* Post-merge sort imports

* Avatars as fallback for preview
2023-08-14 16:17:18 +03:00
Oskar Niesen
756431ee74
Fixed GameStarter adding gold to spectator Civilization on later eras when it shouldn't. (#9901) 2023-08-14 16:14:45 +03:00
Yair Morgenstern
c1da217ff6 Resolved #9908 - Improvements created by buildings can activate 'take over adjacent tiles' unique 2023-08-14 16:14:05 +03:00
Yair Morgenstern
42a5440a76 Safeguard against errors in establishing the URL connection to Github 2023-08-11 11:52:33 +03:00
Yair Morgenstern
34fbe9e9a2 AI: Better policy selection 2023-08-10 16:20:01 +03:00
Yair Morgenstern
e406533ef0 AI: Finer-tuned Food ranking vs other stats for cities 2023-08-10 16:05:38 +03:00
Yair Morgenstern
27a5bd0cc5 AI: Build melee naval units to defend coastal cities and move them there 2023-08-10 12:00:03 +03:00
Yair Morgenstern
654b9f80f2 AI will not waste promotions on Heal Instantly 2023-08-10 11:13:51 +03:00
Yair Morgenstern
95b8fab950 Rivers at the bottom edge of maps are considered by tiles for river-adjacency 2023-08-10 10:45:47 +03:00
SeventhM
0fbe5a18b8
Fix promotions being unavailable when it can be reached a slower way (#9856)
Previously if a promotion could require 2 promotions from branch A but 1 branch B and the branch B also lead to an earlier promotion from branch A, it erroneously consider that a loop. Solved by copying the logic from the ruleset Validator (going child up to parent, rather than parent to child and passing in the hashset rather than using a global one)
2023-08-09 09:17:09 +03:00
Yair Morgenstern
98029b68d2
Version rollout (#9899)
* Bump version and create initial changelog entry

* Update Catalan.properties (#9897)

* some Persian-UN translations (#9893)

* Update Persian_(Pinglish-UN).properties

Added and fixed some till 1295.

* Update Persian_(Pinglish-UN).properties

fixed typo.

* Update Persian_(Pinglish-UN).properties

till 2254

* Update Persian_(Pinglish-UN).properties

fixed "Populism".

* Update Turkish.properties (#9891)

Just making same translate...

* Update Italian.properties (#9883)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: Ilia <81512402+ilia-abbasi@users.noreply.github.com>
Co-authored-by: Omar Mammadov <114606477+OmarMammadov@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2023-08-09 01:00:26 +03:00
SomeTroglodyte
8576f16c6e
Ruleset validator: Tilesets (#9881)
* Defensive Tileset loading

* Deleting a mod should do the same cleanup as downloading a new one

* Extensive RulesetValidator checks on Tileset mod integrity
2023-08-09 00:47:14 +03:00
SomeTroglodyte
903fb2c097
NextTurnAction as enum (#9889) 2023-08-09 00:47:07 +03:00
SomeTroglodyte
6c841e52c6
Minor Mod Manager fixes (mods having dashes in their repo name not shown right away) (#9894)
* Fix Mod Manager not displaying some freshly downloaded mods immediately
(and scroll it into view)

* Mod Manager DL-from-URL stays open after invalid link

* Minor lint

* Another lint on an unfortunate lint
2023-08-09 00:46:59 +03:00
Yair Morgenstern
0561a7951c Much more accurate improvement stat effects 2023-08-09 00:46:33 +03:00
SomeTroglodyte
4fac033704
Ruleset object reorganization (#9898)
* IHasUniques without INamed removed - treat ModOptions same as GlobalUniques in that respect

* Unify uniqueObjects and uniqueMap initialization

* Move and split RulesetValidator

* Split Ruleset file to make it pure single-class

* Minor linting
2023-08-08 23:06:33 +03:00
Yair Morgenstern
7b778f7535 Moved changeImprovement to TileInfoImprovementFunctions 2023-08-08 22:06:25 +03:00
Yair Morgenstern
3cbd447620 Removed HandleImprovementCompletion function, added test for citadel tile takeover 2023-08-08 22:00:18 +03:00
Yair Morgenstern
08c8bcf383 Removed double lines between handleImprovementCompletion and changeImprovement 2023-08-08 20:25:12 +03:00
Yair Morgenstern
417b6ff798 removeImprovement convenience function 2023-08-08 19:29:33 +03:00
Yair Morgenstern
55b4191be3 changeImprovement now contains 'terrain feature removal' logic 2023-08-08 19:25:51 +03:00
Yair Morgenstern
545ff0b944 Resolved #9887 - Improvement picker screen does not cause 'phantom' units to be assigned to civ 2023-08-04 13:35:41 +03:00
Yair Morgenstern
af49e8297f #9876 fix - Lock known city states before gaining influence to avoid altering the sequence we're iterating on 2023-08-04 09:29:34 +03:00
Yair Morgenstern
d9ceb9290d 4.7.12-patch1 2023-08-04 09:21:51 +03:00
Yair Morgenstern
5956f0ceb6 4.7.12 2023-08-03 13:17:31 +03:00
Yair Morgenstern
e49fda3b97
Version rollout (#9880)
* Bump version and create initial changelog entry

* Update Simplified_Chinese (#9879)

* Update Spanish.properties (#9877)

* Update Polish.properties (#9875)

* Update Brazilian_Portuguese.properties (#9867)

* Update German.properties (#9864)

* Update German.properties

Fixed a few mistakes and added more translations

* Fixed a few mistakes in German translation

---------

Co-authored-by: Birk Birkner <birkner@bbirkner.de>

* Update French.properties (#9862)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Knirps1 <52383078+Knirps1@users.noreply.github.com>
Co-authored-by: Birk Birkner <birkner@bbirkner.de>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
2023-08-03 13:05:13 +03:00
Yair Morgenstern
c92afe0f04
Compare improvements by tile yield calculation (#9873)
* Compare improvements by tile yield calculation

* Docstring

* Explicit documentation for which functions in Stats are and are not mutating functions
2023-08-03 11:39:04 +03:00
SomeTroglodyte
bcb26b6d2a
Treat remaining untyped Uniques in default rulesets (#9763)
* Treat remaining untyped Uniques in default rulesets, make unit test catch them

* Change untyped filtering Uniques check to Validation by inclusion in GlobalUniques instead of UniqueType.AircraftMarker

* Wiki for untyped filtering Uniques

* Re-include the "Who knows" of Future Tech on the Tech picker
2023-08-03 11:38:50 +03:00
Yair Morgenstern
fc40da11d9
Added tests to ensure that resources from buildings behave as expected (#9860)
* Added tests to ensure that resources from buildings behave as expected

* More tests suggested by @SeventhM

* Caught an edge case - if you pillage your own tile improvement, your resources would not have updated!

* Actually every time an improvement changes you could have a resource change

* Update resources eon every improvement change because they could be providing resources via uniques
2023-08-03 11:38:36 +03:00
Oskar Niesen
15bfaa24a5
Transported units gifting fix (#9865)
* Gifting units containing transported units now gifts the transported units as well.

* Change transported units so that they can't be gifted.
2023-08-03 11:38:25 +03:00
SeventhM
0fe584700b
Allow free unit triggers for any location (#9870)
* Allow free unit triggers for any location

* Almost forgot this was broken

* Fix situation when tile is null, but therebis a city to place at
2023-08-03 11:38:14 +03:00
Yair Morgenstern
5e7f49dac8 Resolved #9874 - free buildings are converted to civ-specific replacements 2023-08-02 16:01:21 +03:00
Yair Morgenstern
8de47b4a62 Resolved #9871
Workers now remove fallout and similar stat-hindering terrains
2023-08-02 11:47:12 +03:00
SomeTroglodyte
ad75ad916b
Move Mod Manager to prepare class splits (#9863) 2023-07-31 21:54:55 +03:00
Yair Morgenstern
15577cb3c5 double-click on worked tile icon locks tile, for worked tiles as well! 2023-07-31 11:17:23 +03:00
Yair Morgenstern
b89611c953
Version rollout (#9859)
* Bump version and create initial changelog entry

* Update Dutch.properties (#9846)

* Update Dutch.properties

* Update Dutch.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
2023-07-30 18:12:16 +03:00
SomeTroglodyte
52e756e9fb
Key bindings CityScreen (#9828)
* CityScreen keyboard bindings - ExpanderTab update

* CityScreen keyboard bindings - Linting

* CityScreen keyboard bindings - Main Keys

* CityScreen keyboard bindings - Queue

* CityScreen keyboard bindings - Fix Expander scroll-to
2023-07-30 17:40:05 +03:00
SeventhM
203ee77c8b
Clean up some differences between units that can move on water and other units (#9841)
* Clean up some differences between units that can move on water, water units, and land units

* Strangely no evidence this actually comes up?

* refernce the cache in more places

* Decided to change this back to match expected results

* Remove unnecessary parenthesis
2023-07-30 17:39:41 +03:00
SomeTroglodyte
b838d8ec5a
Overhaul NUKE code to behave closer to original (#9797)
* Overhaul NUKE code to behave closer to original

* Separate garrison protection of Bomb Shelter to its own Unique

* Reduce code duplication: getNukeBlastRadius

* Disallow nuking unknown civs

* Don't show Nuke attack table when the Nuke has just been selected

* World map display of nuke blast radius and friendly fire
2023-07-30 17:39:28 +03:00
SomeTroglodyte
443bf3afdb
Local mod folder names preserved. (#9844)
* Reduce conversion of local mod folder names to treat only ending spaces/dashes

* Wiki entry for GlobalUniques

* Missing originRuleset coverage

* Nicer RulesetValidator messages when name or originRuleset are missing
2023-07-30 17:38:33 +03:00
SomeTroglodyte
b992144ecd
Fix a few now flagged but working Unique targets (#9845)
* Allow a few working UniqueType-UniqueTarget combos in RulesetValidator

* RulesetValidator checks GlobalUniques

* Alternate Settlers and Workers recognized via Unique - same rules in RulesetValidator and GameStarter, wiki clarification
2023-07-30 17:38:26 +03:00
SeventhM
ae7ac6a063
Fix resources subtracting in an incorrect manner when they have the same source (#9858) 2023-07-30 17:38:00 +03:00
SomeTroglodyte
bb7c75840e
Simple Originating-Mod display in Civilopedia (#9850)
* Simple Originating-Mod display in Civilopedia

* Simple Originating-Mod display in Civilopedia - patch
2023-07-30 17:37:50 +03:00
Oskar Niesen
df7fd27b94
Spectator can now see all invisible units including submarines without fog of war. (#9852) 2023-07-30 17:37:36 +03:00
SeventhM
283edd0875
Fix free buildings from other buildings not showing up correctly (#9857)
* Rearrange order of actions when adding buildings

* Turns out you need to updateCivResources after adding in uniques. Whoops

* Mirror change to remove buildings as well
2023-07-30 17:37:24 +03:00
itanasi
488ec9f82f
Fix logic in Fog Busting (#9855) 2023-07-30 17:36:38 +03:00
alexban011
5f8c675512
Fix linting warnings (#9701)
* fix: VariableNaming warnings

* fix: MatchingDeclarationName warnings

* fix: SwallowedException warnings

* fix: UseRequire warnings

* Revert "fix: MatchingDeclarationName warnings"

This reverts commit 9475af5052.
2023-07-26 07:30:14 +03:00
Yair Morgenstern
48ad5780d9
Version rollout (#9843)
* Bump version and create initial changelog entry

* Update Simplified_Chinese.properties (#9835)

* more Persian UN Translation (#9832)

* Update Persian_(Pinglish-UN).properties

Added and fixed some of the translations till line 1039.

* Update Persian_(Pinglish-UN).properties

- Fixed a few till 1039.
- Added and fixed some from 1039 till 1254.

* Update Persian_(Pinglish-UN).properties

Added and fixed some till 5000

* Update Persian_(Pinglish-UN).properties

* Update Persian_(Pinglish-UN).properties

* Update Dutch.properties (#9816)

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Updated Brazilian_Portuguese.properties (#9813)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: AutumnPizazz <114050365+AutumnPizazz@users.noreply.github.com>
Co-authored-by: Ilia <81512402+ilia-abbasi@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
2023-07-24 10:51:13 +03:00
Oskar Niesen
6dcad3add5
Fixed automated workers not replacing forts for AI civ. (#9837)
* Fixed automated workers not replacing forts for AI civ.

* Fixed double parenthesis.

* Removed repeat removing fort in progress code.

* Improved evaluateFortPlacement
2023-07-24 10:42:18 +03:00
Yair Morgenstern
97b80973d1 More BaseUnit unique-finding including type uniques 2023-07-21 15:18:39 +03:00
Yair Morgenstern
bc9b5615eb BaseUnit unique-finding always takes Type uniques into account 2023-07-21 15:09:14 +03:00
Yair Morgenstern
33ae13479d 4.7.9-patch1 2023-07-20 09:24:41 +03:00
SomeTroglodyte
383cb38c7d
NotificationAction compatibility patch (#9824)
* NotificationAction compatibility patch

* NotificationAction compatibility patch
2023-07-20 09:24:25 +03:00
SeventhM
4421a2a54e
Fix issues when adding/removing buildings (#9822) 2023-07-20 09:16:02 +03:00
Yair Morgenstern
d7b277b6b5 Memory performance improvement - don't create strings when you can instead hash the list! New ists are cheaper in-memory than new strings (only need to allocate "number of strings in list" pointers, and not "number of chars in all strings" chars) 2023-07-18 18:28:04 +03:00
Yair Morgenstern
ed74b03ff3
Version rollout (#9812)
* Bump version and create initial changelog entry

* Update Catalan.properties (#9807)

* Update Hungarian.properties (#9798)

* Update Hungarian.properties

* Update Hungarian.properties

* Update Hungarian.properties

* Update Hungarian.properties

* Update Hungarian.properties

* Update Hungarian.properties

* Update Hungarian.properties

* Update Hungarian.properties

* Update Hungarian.properties

* Update Hungarian.properties

* Update Czech.properties (#9795)

* Update Czech.properties

* Update Czech.properties

* Missing brackets fix

* Update Spanish.properties (#9794)

* Update Simplified_Chinese (#9789)

* Update German translation (#9788)

* Update French.properties (#9786)

* Update Dutch.properties (#9785)

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Updated Brazilian_Portuguese.properties (#9784)

* Updated Brazilian_Portuguese.properties

* Update Brazilian_Portuguese.properties

* Update Polish.properties (#9783)

* Update Polish.properties

* Update Polish.properties

* Update Italian.properties (#9782)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: balazsszalab <balazsszalab@freemail.hu>
Co-authored-by: jahodovykolac <79529669+jahodovykolac@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2023-07-18 18:16:06 +03:00
SeventhM
b37aaeb3c6
Fix issues from gaining free beliefs (#9764)
* Fix issues from gaining free beliefs

* chooseBeliefs code I forgot

* Revert changes to next turn actions and allow for free beliefs while founding/expanding

* Missed a spot
2023-07-18 18:08:59 +03:00
SeventhM
1ca9766811
Fix issues when transferring capitals (#9801)
* Revert previous patches

* Fix the unit test, I guess
2023-07-18 18:08:30 +03:00
SomeTroglodyte
37465b5032
Prevent deserialization problem with Espionage (#9809)
* Prevent deserialization problem with Espionage

* Move comment and explain context a little better
2023-07-18 18:08:18 +03:00
SomeTroglodyte
0e64b8230f
Little Promotion UX improvements (#9808)
* Fix regression incorrectly allowing promotions from Unit Overview

* Autoclose PromotionPicker when all promotions chosen in one go

* Fix Unit Overview not showing new promotions when returning from PromotionPicker
2023-07-18 07:25:00 +03:00
SeventhM
1e66c2e131
Avoid built buildings (#9806)
* Removing most interactions with builtBuildings

* Might as well edit this too

* Fix issues and edit isBuilt

* Simplify isAllBuilt
2023-07-16 23:01:17 +03:00
SomeTroglodyte
a29cdc91e8
Unique target compliance test v2 (#9802)
* Split off some UniqueType helper classes, make regions work in Android Studio and linting

* Fix wrong UniqueType.Stats target

* Fix two Pantheon uniques

* BeliefType a little nicer to read

* More linting

* Implement UniqueTarget validation

* Validation of UniqueTypes allowed as conditionals
2023-07-15 22:06:12 +03:00
Yair Morgenstern
00e008b656 4.7.8-patch1
Resolves #9792 resolves #9791
2023-07-11 16:47:24 +03:00
Yair Morgenstern
bcd5ad6c69
Version rollout (#9781)
* Bump version and create initial changelog entry

* Update German translation (#9780)

* Update Catalan.properties (#9775)

* [Translation] Update Simplified Chinese (#9771)

* update Simplified_Chinese

* Update Simplified_Chinese

* Update Dutch.properties (#9769)

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Update Italian.properties (#9762)

* Update Polish.properties (#9759)

* Updated Brazilian_Portuguese.properties (#9758)

* Update French.properties (#9757)

* Update Dutch.properties (#9767)

* Update Dutch.properties

Completing Dutch translation part I

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

---------

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

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: EmperorPinguin <99119424+EmperorPinguin@users.noreply.github.com>
2023-07-10 17:01:47 +03:00
Yair Morgenstern
4c5db52a5c Change default fallback to HexaRealm instead - it's been ready for a while :) 2023-07-10 16:28:54 +03:00
Yair Morgenstern
ee092a5851
City-level resources (#9774)
* City-level resources are...
- Not displayed in civ top bar
- Not considered civ-level resources (for trade, non-city conditionals, etc)
- Are explicitly treated in city conditionals
- ARE considered for constructing buildings requiring resource
- ARE NOT considered for construction units requiring resource

* getCityResources separates resources by origin so we need to sum them - kudos @SeventhM

* CR fixes

* Added new Civilization.getResourceAmount function

* More usages of civInfo.getResourceAmount()

* Don't add city resource table if it's empty
2023-07-10 16:24:50 +03:00
SomeTroglodyte
a737747284
Little Diplomatic Victory makeover (#9756)
* Linting and give two votes to UN owner

* Allow human player to abstain, show UN 2 votes

* More info on voting results

* AI won't vote for hated enemies

* Improve PopupAlert handling

* Translation templates

* One missing template
2023-07-10 15:25:59 +03:00
random271
8f761642f6
Added notification for destruction of tile improvements [via unit ability] (#9754)
* Added notification for desctruction of tile improvements [via unit ability]

* Modified template properties

* Update template.properties
2023-07-09 23:24:38 +03:00
Yair Morgenstern
3c56319640 Display resource uniques in civilopedia 2023-07-09 11:51:25 +03:00
Yair Morgenstern
31f6a406c2 Resolved #9745 - memory improvement, cache uniquemap for tiles with identical terrain 2023-07-09 10:12:16 +03:00
Yair Morgenstern
d229d45298
Version rollout (#9755)
* Bump version and create initial changelog entry

* Update Simplified_Chinese.properties (#9744)

* Update Italian.properties (#9737)

* Update Italian.properties

* Update Italian.properties

* Update French.properties (#9733)

* Updated Brazilian_Portuguese.properties (#9732)

* Update Dutch.properties (#9730)

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Update Catalan.properties (#9728)

* Update German translation (#9723)

* Update Polish.properties (#9718)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: maxdu <d.darmax@gmail.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
2023-07-06 00:42:39 +03:00
Yair Morgenstern
8042402c1c Fixed tile filter for civ-related conditions for "upon ending a turn in a [tileFilter] tile" trigger 2023-07-06 00:39:04 +03:00
SeventhM
5ea1d5722b
Fix buildings/units not triggering and golden age stat updates (#9731)
* Fix buildings not triggering, golden age stat updates, and units not triggering

* Forgot import, whoops

* uodate resources and city connection when removing a building

* Move building triggers to function, added unit notification to translations

* Quick edits without android studio sucks

* Add unitActionModifier check back to hasTriggerConditional

---------

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2023-07-06 00:36:43 +03:00
SeventhM
d2dac66f40
Avoid crashes with incorrect condtionals (#9753) 2023-07-05 22:57:06 +03:00
Yair Morgenstern
fdb07b06c1 Resolved #9740 - incorrect ruleset combos for 'buy building with stat' no longer crash 2023-07-05 21:59:01 +03:00
Yair Morgenstern
103234a6b8 Keep track of what mod each ruleset object comes from, for debug and civilopedia purposes 2023-07-05 21:55:57 +03:00
SomeTroglodyte
6a6a8a0c94
Minimal support for Alpha Frontier-like Workers (#9690)
* Linting

* Cache hasUnique(UniqueType.CreateWaterImprovements)

* Move automateWorkBoats to WorkerAutomation - for readability and better chances to create synergies

* Add a chance for automated Alpha Frontier Workers to create Water improvements

* Reorg random271's Lemming code a little

* Tune Worker automation for buildable Water improvements
2023-07-05 21:11:17 +03:00
Yair Morgenstern
19bf15558d Fixed India's 'double unhappiness' unique 2023-07-05 21:10:22 +03:00
SeventhM
08a280c29d
Scaling purchase costs for faith/culture/science/etc. with speed (#9721)
* Scaling with speed

* Changing to float, and allowing a unique to set a gold price
2023-07-04 20:16:48 +03:00
SomeTroglodyte
ad0af51020
Explain the invoke trick as well (#9739) 2023-07-04 15:12:30 +03:00
SomeTroglodyte
05f9d3cb36
Clearer NotificationActions code (#9738) 2023-07-04 13:59:35 +03:00
SomeTroglodyte
fb3064dd4b
Prevent activation of disabled actors via key shortcuts (#9736)
Avoid activation concurrent modification problems
2023-07-04 13:58:34 +03:00
Skekdog
8263d972ff
Fix civilopedia gold cost (#9729)
* Fix exponent being applied wrong

* Format more consistent with rest of project

* Fix building gold cost in civilopedia and use slash instead of a comma

* Add INonPerpetualConstruction.getCivilopediaGoldCost()
2023-07-03 23:52:47 +03:00
SeventhM
afb30fb1ca
Better support for lacking a capital (#9709)
* more getCapital null checks

* Move first city if no capital check to getCapital
2023-07-03 23:47:49 +03:00
Yair Morgenstern
86cde678b3 chore: Modernized TileImprovementConstructionTests 2023-07-03 23:43:03 +03:00
Yair Morgenstern
06377feaeb 4.7.6-patch2
Resolved crash when moving cities between civs, added tests to ensure future changes do not break city moving functionality
2023-07-03 14:13:31 +03:00
SomeTroglodyte
6726d2ce03
Keyboard bindings for Main Menu Screen (#9680)
* Main Menu keyboard bindings

* Make keyboard binding tooltips dynamic so user changes need no UI rebuild
2023-07-02 22:28:10 +03:00
Yair Morgenstern
6f0a51d6d8 4.7.6-patch1
Captured 'last city' capitals do not retain capital status
2023-07-02 17:36:38 +03:00
Yair Morgenstern
bfc2e3cd59
Version rollout (#9717)
* Bump version and create initial changelog entry

* Various new lines added, some minor corrections. (Dutch.properties) (#9713)

* Various new lines added, some minor corrections.

* Minor correction in placeholder

* Update Spanish.properties (#9702)

* Updated Brazilian_Portuguese.properties (#9696)

* Update French.properties (#9692)

* Update Italian.properties (#9688)

* Update Italian.properties

* Update Italian.properties

* Update Simplified_Chinese.properties (#9687)

* Update Simplified_Chinese.properties

* Update Simplified_Chinese.properties

* Update Simplified_Chinese.properties

* Update Polish.properties (#9686)

* Update Polish.properties

* Update Polish.properties

* Update Polish.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: CrispyXYZ <64761703+CrispyXYZ@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
2023-07-02 15:18:50 +03:00
SeventhM
0e8c960867
Check for triggers conditions (#9699)
* Check for triggers conditions

* removing shadowed names

* Move Conditional check to Uniques
2023-07-02 14:53:34 +03:00
itanasi
753358c1f0
On City Raze, previous owner doesn't pay Road Maintenance (#9706) 2023-07-02 14:53:19 +03:00
SeventhM
589a9fa29f
Fix when units can be purchased (#9715) 2023-07-02 14:53:06 +03:00
Yair Morgenstern
0edfa4841e Better image documentation for modders 2023-07-02 02:42:36 +03:00
Yair Morgenstern
bb22b1de72 Actually generated unique type documentation 2023-07-02 01:36:28 +03:00
Yair Morgenstern
d0643efe6b Added unique type documentation in wiki 2023-07-02 01:28:27 +03:00
Yair Morgenstern
fd2bfbdc10 Resolves #9561 - "Requires a [buildingFilter] in at least [amount] cities" works correctly with filters that aren't building names 2023-06-30 15:47:45 +03:00
Yair Morgenstern
947a1001c4 Resolves #9703 - AI only buys tiles contiguous to the current city tiles (was: contiguous to civ tiles) 2023-06-30 15:13:14 +03:00
SomeTroglodyte
1694a59fd2
Defense against circular references in Promotions (#9694)
* Promotion picker - working defense against circular references

* Mod checker - complain about circular references
2023-06-29 09:18:07 +03:00
Yair Morgenstern
6eeb630b6c chore: 'cityInfo' purge (changed to 'city' everywhere) 2023-06-28 23:38:01 +03:00
Yair Morgenstern
83270ddf8f Resolved #9689 - no city window on citybutton click 2023-06-28 19:08:52 +03:00
Yair Morgenstern
4a7f484900 Revert "Solved strange concurrency crashes due to players keypress-activating disabled buttons"
This reverts commit ee855b8d77.
2023-06-28 19:01:37 +03:00
Yair Morgenstern
4c28905e2c Undo Move button moved to far right, so other buttons stay in place 2023-06-28 13:23:22 +03:00
SomeTroglodyte
a8ec8f84ec
Architectural update - Make animated menu reusable (#9685)
* Extract AnimatedMenuPopup from UnitUpgradeMenu to make its basic idea reusable

* Rebase UnitUpgradeMenu onto AnimatedMenuPopup

* Add SoundPlayer.playRepeated for future reusability

* Move UnitUpgradeMenu to popups package

* Reuse playRepeated in PromotionPickerScreen

* Reuse playRepeated in PromotionPickerScreen - clean up imports
2023-06-28 12:05:04 +03:00
Yair Morgenstern
f5d3f346b1
Version rollout (#9684)
* Bump version and create initial changelog entry

* Update Spanish.properties (#9682)

* Updated Brazilian_Portuguese.properties (#9677)

* Updated Brazilian_Portuguese.properties

* Update Brazilian_Portuguese.properties

* Update German translation (#9675)

* Update French.properties (#9674)

* Update Russian.properties (#9672)

* Update Russian.properties

* Update Russian.properties

* Update Italian.properties (#9670)

* Update Polish.properties (#9668)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: JOGANfruit <77359522+JOGANfruit@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
2023-06-28 11:05:23 +03:00
SomeTroglodyte
c45d3ecb7c
Promotion picker allowing picking chains in one go (#9655)
* Try to allow chained promotion picking

* Reorg PromotionPickerScreen into own package

* Draft for new PromotionTree

* Change PromotionPickerScreen to use new tree (picking still not done)

* Finish new PromotionPickerScreen - code

* Finish new PromotionPickerScreen - assets and linting

* Finish new PromotionPickerScreen - polish positioning and lines

* Finish new PromotionPickerScreen - fix sound

* Finish new PromotionPickerScreen - little optimization

* Finish new PromotionPickerScreen - emphasize line along path

* Finish new PromotionPickerScreen - merge fix

* Finish new PromotionPickerScreen - address comments

* Finish new PromotionPickerScreen - fix sort and update wiki
2023-06-28 10:49:35 +03:00
random271
d298f85099
Fixing workers dying in mountains bug for Carthage (#9665)
* Fixed workers dying in mountain tiles issue for Carthage

* Accounts for all damage dealing tiles

* Update WorkerAutomation.kt

* Update Tile.kt

* Update WorkerAutomation.kt

* Update WorkerAutomation.kt
2023-06-28 10:48:44 +03:00
SeventhM
73fa87e6b4
Check for trigger uniques when starting and recaluating population (#9673)
* Check for trigger uniques when starting and recaluating population

* Adding imports

* whoops

* Moved where starting techs are added, added a parameter, and fixed the check for GUI
2023-06-28 10:48:33 +03:00
Yair Morgenstern
ee855b8d77 Solved strange concurrency crashes due to players keypress-activating disabled buttons 2023-06-28 10:45:36 +03:00