Commit Graph

7044 Commits

Author SHA1 Message Date
SomeTroglodyte
7dc398184f
Fix creating 105x90 rectangular no-wrap maps (#11144) 2024-02-17 21:43:17 +02:00
SeventhM
cc7b8cd26c
Documentation for Personality json (#11138)
* Documentation for Personality json

* whoops, bad link

* Fix inaccurate "double focus" comment

* Fix accidental copy-paste error

* Edit priority text to maybe be clearer
2024-02-17 21:43:05 +02:00
itanasi
c8a7cf29b6
AutoAssign Population with Food Converts to Production (#11141)
* Properly Calculate Population based on Food Conversion to Prod
Trigger properly when Queue is changed

* Remove triggers

* Missed a trigger

* Add triggers in CityConstructionsTable so we can call cityScreen.update()

* Properly Calculate Population based on Food Conversion to Prod
Trigger properly when Queue is changed

* Remove triggers

* Missed a trigger

* Add triggers in CityConstructionsTable so we can call cityScreen.update()
2024-02-17 21:42:23 +02:00
SomeTroglodyte
88df2c26e6
Framework stuff: Preparation for another Warning-Suppression branch (#11128)
* Make source object available to RulesetErrorList.add

* Make ruleset available to RulesetErrorList

* Introduce UniqueTarget.MetaModifier - ModifierHiddenFromUsers won't stay alone

* There was no use of prefix without the unique name - fold

* Introduce UniqueTarget.MetaModifier - doc

* Pass context down even inside UniqueValidator, convenience factory for limited RulesetErrorList's

* Clean up RulesetErrorList.of factory

* Reorder parameters of RulesetErrorList.add
2024-02-17 21:41:37 +02:00
SeventhM
ec1f51dfb8
Allow barb camps to function after giving ruins effects (#11137)
* Allow barb camps to function after giving ruins effects

* Add comment
2024-02-17 21:41:21 +02:00
SeventhM
5730d1b80a
Conditional for building in amount of cities (#11101)
* Conditional for building in amount of cities

* fix order of operations

* Deprecate old require in amount cities uniques

* import

* Fix referring to the unique instead of the conditional

* Fix yield message

* I have no clue how this isn't imported, but I'mma assume this translates fine anyways

* Rename text for unique

* revert unique text

* Whoops

* Remove unnecessary puppet check

* Move additional description to it own function

* Split missing city text into its own function

* Move ToDo comment

* flip to be easier to read

* Move onlyAvailable rejections to its own function to be easier to work with

* Add in the word "of"
2024-02-17 21:41:05 +02:00
Yair Morgenstern
80d57afee0
Version rollout (#11131)
* Bump version and create initial changelog entry

* Update Dutch.properties (#11120)

* Update Dutch.properties

* Update Dutch.properties

* Update Polish.properties (#11118)

* Update Finnish.properties (#11117)

* Update French.properties (#11114)

* Update Italian.properties (#11113)

* Update Brazilian_Portuguese.properties (#11112)

* Update Indonesian.properties (#11110)

* Update Indonesian.properties

Translated some untranslated words and fixed some mistranslated words.

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Gekko03 <148203740+Gekko03@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: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: M792003 <158552928+M792003@users.noreply.github.com>
2024-02-13 23:36:38 +02:00
SeventhM
a7c0df8c0b
Initial Civ Personality implementation (#10939)
* Barebones implementation

* Personality Policy branch

* Initial addtions to Victory.Focus based changes

* Have no focus or personality if human

* Add getter/setter for easier access to focuses

* Add scaled value to various areas

* Make getPersonality non null to simplify checks

* Forgot to add in changes to the base class

* Ugly code to add in Personality preferred victory type. Not sure how to make it cleaner

* Fix typo

* Early return Faith building choice

* Change set concatination to listOf

* fix missing equal sign

* vals for getPersonality

* Remove unnecessary parenthesis

* Early return the other buildings as well

* Some linting and renames
2024-02-13 23:27:38 +02:00
SomeTroglodyte
eb8fee8edd
Autoplay menu cleanup (#11115)
* Minor linting and fix folder-package mismatch

* Actually make AnimatedMenuPopup stay inside the stage in all directions (was done for bottom left only before)

* Proper keyboard bindings for AutoPlay and -menu

* Testing translations

* AutoPlay as widely used term
2024-02-13 23:27:18 +02:00
SomeTroglodyte
9f53b7e1ee
Key binding categories properly sorted in options popup (#11116)
Delay some of the KeyBindingsTab work until it's viewed
2024-02-13 23:27:00 +02:00
Oskar Niesen
539db00cb6
Workers wake up on tile expansion (#11119)
* Workers wake up on tile expansion

* Only owned workers will wake up
2024-02-13 23:26:04 +02:00
Oskar Niesen
ccea2c88d3
Further Espionage Implementation (#11077)
* Added getSpiesInCity method in EspionageManager

* Expanded stealing technology code

* Spies can now die and revive

* Added basic rigging elections

* Spies rigging elections can now be caught

* Added spy rank

* Players can now move spies to city-states

* Spies at a higher rank steal tech quicker

* EspionageAutomation now sends spies to city-states and to do counter intelligence

* Fixed some EspionageAutomation logic

* Fixed EspionageAutomation error

* Spy.location is now stored as a vector2

* Accounted for the only able to be one spy of a civ in each city

* Spies level up when successfully stealing tech.

* Increased tech steal rate by spy rank

* Increased influence gained by rigging elections

* Added a spy level cap

* Spies no longer get stuck on counter-intelligence action

* Spy automation no longer tries to rig elections in city states that it is at war with

* canMoveTo now checks if the city tile is visible

* Added espionage translations

* Changed automateSpySteal/Rig/Counter intelligence return types

* Simplifies automateSpies in EspionageAutomation

* Added blank lines before titles

* Improved spy being found and killed message phrasing
2024-02-13 23:25:07 +02:00
Yair Morgenstern
6b9c98edc5
Compile to jre 8 target (#11122)
* Allow Java 8 to run this seamlessly, because really, why not?
Resolves #11121
Resolves #11074

* Apparently

* Correct version-to-string
2024-02-12 00:49:08 +02:00
Yair Morgenstern
58318cb199 Allow lower-case "all" for all filters 2024-02-10 20:02:59 +02:00
Yair Morgenstern
e7a2b94c60
SomeTrog's versioning test - compile on jdk 17 FOR jre 11, includes gradle upgrade (#11111) 2024-02-10 19:44:47 +02:00
Yair Morgenstern
a9c367907d Allow combatantFilter for cities to use cityFilter 2024-02-09 12:44:56 +02:00
Yair Morgenstern
eb984f06dc 4.10.8 2024-02-09 12:37:42 +02:00
Yair Morgenstern
31b7a0f93f
Version rollout (#11109)
* Bump version and create initial changelog entry

* Update Simplified_Chinese.properties (#11106)

* Update Spanish.properties (#11093)

* Update Spanish.properties

* Update Spanish.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: AutumnPizazz <114050365+AutumnPizazz@users.noreply.github.com>
Co-authored-by: yetanotherfossman <83962798+yetanotherfossman@users.noreply.github.com>
2024-02-09 12:30:41 +02:00
SeventhM
09413a3182
Add unique for increasing price every time it's built (#11100)
* Add unique for increasing price every time it's built

* Update name to be more accurate

* whoops
2024-02-09 12:19:42 +02:00
Yair Morgenstern
f8137b8a52 Allow BaseUnit unique functions to return UnitType uniques
Resolves #9135
2024-02-09 12:01:01 +02:00
SomeTroglodyte
5568cc08c0
Tweak Overview-Politics-Diagram for a defeated player (#11094)
* Adapt Overview Politics diagram view to show a defeated player a little more intuitively

* Fix lines to defeated civ - each is drawn twice, one for each direction

* Defeated civ has no relations on the table view as well
2024-02-08 21:33:38 +02:00
SomeTroglodyte
1ad8c69e60
Patch AlertPopup to correctly close when it cannot find a required asset (#11095) 2024-02-08 21:33:25 +02:00
SomeTroglodyte
4aba1c2751
Fix Capture when a teleport was necessary (#11096)
* Fix captured civilian liberation in the had-to-be-teleported case

* Refactor captureOrConvertToWorker to return where the unit ended up, if at all - and harden the captureCivilianUnit else branch a bit

* Minor lint
2024-02-08 21:32:52 +02:00
SeventhM
3a6a64576d
Fix mistakes with unavailable unique (#11102) 2024-02-08 21:18:09 +02:00
Yair Morgenstern
c0e85938a6 4.10.7 2024-02-06 00:27:59 +02:00
Yair Morgenstern
645a7fdac9
Version rollout (#11086)
* Bump version and create initial changelog entry

* Update Spanish.properties (#11079)

* Update Spanish.properties

* Update Spanish.properties

* Update Catalan.properties (#11078)

* Update French.properties (#11072)

* Update Polish.properties (#11071)

* Update Indonesian.properties (#11067)

* Update Indonesian.properties

* Update Indonesian.properties

* Update Indonesian.properties

* Update Italian.properties (#11065)

* Update Brazilian_Portuguese.properties (#11064)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: M792003 <158552928+M792003@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
2024-02-06 00:20:13 +02:00
SeventhM
91400a2298
Split Strat Balance and Legend Start into its own checkbox (#11081) 2024-02-06 00:17:33 +02:00
SeventhM
d6abd3a941
Avoid crash from city combantants (#11066)
* Avoid crash from city combantants

* null

* Assume the city from CityCombatant

* Not at Computer manually writing imports
2024-02-05 23:54:02 +02:00
SeventhM
bfc18f53d8
Remove cache for nonstandard tile damage (#11080) 2024-02-05 23:53:52 +02:00
Oskar Niesen
10f3781e6f
ThreatManager improvement (#11030)
* Reworked ThreatManager to be optimised for getTilesWithEnemyUnitsInDistance

* Refactored and added an exception

* doesTileHaveMilitaryEnemy now searches all military units on the tile and not just the unit in the military slot

* Fixed some errors

* Refactored getTilesWithEnemyUnitsInDistance to use a mutableIterator

* Added some more comments
2024-02-05 23:53:34 +02:00
Yair Morgenstern
cfc26e03fd Allow city filters to be multifilters and not throw ruleset errors 2024-02-05 23:48:33 +02:00
Yair Morgenstern
3714600384 Resolved #11076 - Korean science boost only applies for buildings *in capital* 2024-02-03 21:49:48 +02:00
Yair Morgenstern
d49b619e9e Further split between different road automations, some cleanup of the roadTo automation (but not enough, still pretty bad) 2024-02-02 00:30:13 +02:00
Yair Morgenstern
779fd51d9e Separated road automation to a separate file, but actually we have 2 completely different functions here, not sure if requires subdivision 2024-02-02 00:14:39 +02:00
Yair Morgenstern
88c7804490 4.10.6 2024-02-01 23:43:07 +02:00
Yair Morgenstern
addae29649
Version rollout (#11063)
* Bump version and create initial changelog entry

* Update Korean.properties (#11059)

* Update Simplified Chinese (#11058)

* Update Brazilian_Portuguese.properties (#11054)

* Update French.properties (#11053)

* Update Polish.properties (#11052)

* Update Italian.properties (#11051)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Yattong the Mackerel <saud2410@naver.com>
Co-authored-by: chr_56 <30681738+chr56@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: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2024-02-01 23:28:28 +02:00
SomeTroglodyte
d25b1c8c41
Fix ModOptions unique parameter types not checked and "uniquetype" ModOptionsConstants (#10930)
* Kill evil ModOptionsConstants

* UniqueFlag to EnumSet and add `NoConditionals`

* Linting or import reorder

* Fix ModOptions unique parameter types not checked

* ModOptions Unique to suppress validation warnings

* Silence spurious RulesetValidator complaints about Denmark

* Revert "ModOptions Unique to suppress validation warnings"
2024-02-01 23:24:59 +02:00
SomeTroglodyte
9e9ffa51d4
Policy picker colors skinnable (#11050)
* Centralize Policy picker colors and make them skinnable

* Most Policy picker colors skinnable, names, UiElementDocsWriter tricked
2024-02-01 23:24:43 +02:00
Oskar Niesen
d1b4d31d87
Players can't move spies when it is not their turn (#11056)
* Players can't move spies when it is not their turn

* Inversed the statement to have the proper behavior.

* Update core/src/com/unciv/ui/screens/overviewscreen/EspionageOverviewScreen.kt

---------

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2024-02-01 23:24:19 +02:00
Yair Morgenstern
67a7fb7d22 Fixed crash due to ranged unit trying to capture civilian but being unable to reach the tile
Resolves #11062
Resolves #11044
Resolves #11040
@tuvus
2024-02-01 23:21:29 +02:00
Yair Morgenstern
875da6cd48 Added unit conditional support to pillage yield uniques
Added doc note in cached uniques so modders can know ahead of time
See #11060
2024-02-01 23:02:31 +02:00
Yair Morgenstern
a8446be6ad Added unit conditional support to pillage yield uniques 2024-02-01 22:20:57 +02:00
Yair Morgenstern
ddea67c608
Version rollout (#11049)
* Bump version and create initial changelog entry

* Update Italian.properties (#11045)

* Update Hungarian.properties (#11042)

* Update Korean.properties (#11038)

* Update Korean.properties

* Update Korean.properties

* Update Korean.properties

* Update Korean.properties

* Update Brazilian_Portuguese.properties (#11037)

* Update French.properties (#11036)

* update Belarusian translation (#11033)

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* Update Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: balazsszalab <balazsszalab@freemail.hu>
Co-authored-by: Yattong the Mackerel <saud2410@naver.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: flac <87523240+twinflac@users.noreply.github.com>
2024-01-30 20:09:25 +02:00
SeventhM
f7702bd71a
Add additional cityFilters (#11047)
* Add additional cityFilters

* Maybe viewingCiv shouldn't be null

* Studio complains it is unnecessary now

* I'm doomed to forget imports

* Ignore this

* typo
2024-01-30 20:06:36 +02:00
Yair Morgenstern
5fb3ab268b Added 'copy to clipboard' button on map errors so we can debug them 2024-01-30 20:06:04 +02:00
SeventhM
277ec5e2a5
Fix gain stat modifier by speed unique action text (#11046)
* Fix gain stat modifier by speed unique action text

* Whoops, should be toInt toString

* I can't escape forgetting imports

* OneTimeGainStatRange also uses modifiers
2024-01-30 20:01:45 +02:00
Yair Morgenstern
da5a1d1a9e
Restrict happiness change updates only to relevant thresholds (#11034)
* As discussed - we currently update on every happiness change, we can limit this to only update all cities if we pass a happiness threshold that is relevant to *some* unique

* Forgot a conditional, and uniqueified results
2024-01-30 19:59:17 +02:00
SomeTroglodyte
d75bb69f4b
Fix: Damage average was raw before clamping to health range (#11041) 2024-01-30 19:58:37 +02:00
SomeTroglodyte
a91f45f410
RulesetValidator: Raise severity for untyped uniques with parameters (#11048) 2024-01-30 19:58:26 +02:00
Yair Morgenstern
52a9eebe28 Gradle 8.2, remove all IOS references due to robovm bug (which we don't use) 2024-01-28 12:35:29 +02:00
Yair Morgenstern
af73a17b61
Version rollout (#11032)
* Bump version and create initial changelog entry

* Update Polish.properties (#11028)

* Update Polish.properties (#11027)

* Update Indonesian.properties (#11021)

Fix unit names

* Update Catalan.properties (#11018)

* Update Brazilian_Portuguese.properties (#11010)

* Update Italian.properties (#11009)

* Update French.properties (#11008)

* Update French.properties

* Update French.properties

Fix a misplaced [tileFilter] key.

* Update German translation (#10950)

* Update German translation

* Update German translation

* Update German translation

* Update German translation

* Update German translation

* Update German translation

* Update German translation

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: kensvin <kensvin28@gmail.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: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
2024-01-28 11:24:08 +02:00
SomeTroglodyte
259b388214
World screen resize delayed (#11015)
* Coalesce repeated WorldScreen resize events to avoid multiple concurrent loadGame coroutines

* Remove resize instrumentation
2024-01-28 11:10:59 +02:00
SomeTroglodyte
3a80db2604
Unit actions dynamic paging (#11002)
* Linting

* Dynamic redistribution of buttons on cramped displays

* Merge the default two pages if they're near empty

* Keyboard bindings independent of button visibility

* Remove caching todo - impossible unless we can guarantee no state change caused outside this class goes undetected - even full equality contract on MapUnit may not be enough
2024-01-28 11:09:41 +02:00
Oskar Niesen
f8d97968ef
Workers now build forts (#10944)
* Workers now build forts

* Workers prioritise other tiles over removing forts

* Units don't pillage forts

* Increased how close a city has to be to be viable for fort building

* Decreased fort value, especially for allied city-states

* Units no longer prioritise pillaging forts instead of not pillaging them at all
2024-01-28 11:07:46 +02:00
Oskar Niesen
f93a3f462b
Worker automation option fix (#11024)
* Generalized removing fallout

* Automated workers don't replace improvements when the option is set
2024-01-28 11:07:22 +02:00
SeventhM
d53766b7d7
Unify unit and civ triggers (#11011)
* Unify unit and civ triggers

* Update conditionalsApply check

* add tile in the city override

* Add StateForConditionals for unit uniques when founding a city

* Accidentally removed unit triggers from uponBuildingImprovement

* Accidentally removed parenthesis

* add "tile = tile" to improvement trigger's StateForContitionals

* Add unit's tile to default tile

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

* Accidentally did getMatchingUniques instead of getTriggeredUniqued

* Merge triggerUnitWideUniques into TrigerUniques

* checkOnGameInfo Helper to shorten line length

* StateForConditionals secondary constructors

* accidentally deleted

* also accidentally deleted

---------

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2024-01-28 11:06:43 +02:00
Oskar Niesen
819541838c
Ranged units capture civilian (#11012)
* Ranged units don't shoot civilian units, they prioritise capturing instead

* Cities don't bombard capturable civilian units
2024-01-28 11:06:32 +02:00
SomeTroglodyte
f1dd08ccc2
Minor Mod manager fix, lints and dox (#11013)
* ModOptions reorder into regions, and bring back "internal" fields into the wiki

* Fix two cases of Mod Manager displaying out-of-sync states

* ModConstants and ModConstants.UnitUpgradeCost get equality contracts and a reflection-based shorter merge

* GithubAPI.kt more documentation
2024-01-28 11:06:25 +02:00
Oskar Niesen
d0c2df995d
Spectators can now see selected civ city-state influence bars (#11029) 2024-01-28 11:06:13 +02:00
Oskar Niesen
7efc71bd28
Fixed spies errors (#11031) 2024-01-28 11:06:04 +02:00
SomeTroglodyte
88034e6d02
Mods can use the Hills and mountains distribution uniques on Land or Feature terrains (#11020)
* Refactor and rewrite raiseMountainsAndHills to allow hill and mountain uniques on land+feature terrain types

* Optimize chooseSpreadOutLocations

* Optimize MapLandmassGenerator's retries for water proportion / large continent count
2024-01-28 11:05:50 +02:00
yairm210
ecceb06d9f 4.10.3-patch1 2024-01-26 13:15:25 +00:00
Yair Morgenstern
ec0cf575f4
Avoid modifying the ruleset object and unique stats (#11014) 2024-01-26 15:15:16 +02:00
Yair Morgenstern
67329cdabd New tileFilter parameter, for tiles belonging directly to you 2024-01-25 23:53:47 +02:00
Yair Morgenstern
09651f711e
Version rollout (#11007)
* Bump version and create initial changelog entry

* Update French.properties (#11006)

* updated belarusian translation (#11005)

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* Update Brazilian_Portuguese.properties (#11003)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: flac <87523240+twinflac@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
2024-01-25 23:36:56 +02:00
Oskar Niesen
d216db5ced
Air unit automation improvement (#10991)
* Improved AirUnitAutomation

* UnitPriority now has special cases for air units

* Fighters now Air-sweep

* Added extra air sweep logic

* Moved airSweepDamagePercentBonus to AirUnitAutomation.kt
2024-01-25 23:28:51 +02:00
Oskar Niesen
5cbc04b63a
Espionage automation (#10974)
* Civilizations now send their spies out

* Idle spies move to a city even if there is no tech to steal

* Fixed moving spies

* Game doesn't crash when the city the spy was at is taken over

* Fixed crash when no other city is viewable

* Spies no longer go to city states again

* Added a new line for the test

* Spies are now removed from a city when it is captured
2024-01-25 23:27:11 +02:00
SeventhM
780c4744cc
Fix errors when starting games as Maya (#11001)
* Split FreeGreatPerson and MayanGainGreatPerson

* Add null check to mayan great person

* Move to NextTurnAutomation to be easier to edit

* Move code fromUniqueTriggerActivation to GreatPersonManager

* Remove unnecessary civInfo.greatPeople
2024-01-25 23:25:41 +02:00
Yair Morgenstern
5f102b4159 chore: Separated conditional checks to separate file 2024-01-25 23:25:12 +02:00
Yair Morgenstern
e0c7741480 Removed Unique.isOfType() + general code cleanup 2024-01-25 23:18:42 +02:00
Yair Morgenstern
8aab8f71e4 Replaced special "hidden after generating a Great Prophet" with a more multi-purpose conditional 2024-01-25 22:49:34 +02:00
Yair Morgenstern
c8bc15c800 Add "Unavailable" unique for all except beliefs, which are a mess right now
I think a lot of the 'hidden after' can be replaced by the Unavailable, but that's for later ;)
2024-01-25 22:35:28 +02:00
Yair Morgenstern
ab7f23835e Enum rename: OnlyAvailableWhen -> OnlyAvailable 2024-01-25 21:58:49 +02:00
Yair Morgenstern
197ec9dc9a Returned deprecated StrengthBonusVsCityStates to work for the usual transitional period 2024-01-25 20:04:15 +02:00
Yair Morgenstern
903963787a Unified 'does resource generate naturally on' checks to include all uniques everywhere 2024-01-25 19:52:19 +02:00
Yair Morgenstern
36baea9250 'not shown on world screen' unique accepts civ conditionals 2024-01-25 19:07:19 +02:00
SeventhM
cc8a0ab9eb
Fix build errors (#11000)
* Fix build errors

* [+30%]%

* Apparently I need to specify cities or units

* Screw it, add "vs [combatantFilter]"

* Accidental listing twice

* case
2024-01-25 09:05:08 +02:00
Yair Morgenstern
74ca1d43e8 Adjacency function can receive civ, for foreign/resource filters 2024-01-25 00:28:46 +02:00
Yair Morgenstern
138d1c64a1 Added adjacency conditionals 2024-01-25 00:24:38 +02:00
Yair Morgenstern
21581b43a0 CityCombatant.matchesFilter contains multifilter and civ filter 2024-01-25 00:12:40 +02:00
Yair Morgenstern
414a11a2d6 ICombatant.matchesCategory -> matchesFilter, standardization 2024-01-25 00:06:44 +02:00
Yair Morgenstern
c93b440fde Added deprecation for multi-tilefilter uniques 2024-01-25 00:05:41 +02:00
Yair Morgenstern
03af1f475c 4.10.2 2024-01-25 00:00:23 +02:00
Yair Morgenstern
d3cefd0b9c
Version rollout (#10998)
* Bump version and create initial changelog entry

* Update Italian.properties (#10997)

* Update Hungarian.properties (#10990)

* Update Dutch.properties (#10989)

* Update Dutch.properties

* Update Dutch.properties

* it is time to continue my work (#10987)

* update android/assets/jsons/translations/Belarusian.properties

* update android/assets/jsons/translations/Belarusian.properties

* Update Brazilian_Portuguese.properties (#10984)

* Update French.properties (#10983)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: balazsszalab <balazsszalab@freemail.hu>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: flac <87523240+twinflac@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
2024-01-24 23:54:45 +02:00
SomeTroglodyte
4c66b4368a
A Conditional checking for a Building globally (#10996) 2024-01-24 23:47:53 +02:00
SeventhM
5e1a0f6da9
Fix Spectator stats when viewing another civ (#10985) 2024-01-24 23:44:02 +02:00
SomeTroglodyte
e576b03fc6
Unit actions "paging" new architecture (#10988)
* Linting (and prioritize addGiftAction efficiency over the get used only by unit test)

* Move "paging" out of MapUnit, drop Normal/Additional getter split, "page" preference via UnitActionType

* Optimize UnitActions API a little - fallback does not enumerate actionTypeToFunctions again

* Cleaner access to GiftUnit action from unit test

* Allow freely switching from Sleep to Sleep-until-healed and back
2024-01-24 23:43:31 +02:00
SeventhM
dabd105cf8
Allow units to upgrade to more than one unit (#10947)
* Allow units to upgrade to more than one unit

* Actaully add changes to Base Unit

* And actually add the unique

* Kdocs fixes

* upgradeUnits to getUpgradeUnits and add missing state for condititonalss

* unique.params[0] shouldn't be empty..., right?

* Make old var first in the list, in case it matters

* wait... We're never yielding a null result

* Remove unnecessary function call

* Remove some indentation in RulesetValidation

* isEmpty instead none

* min cost instead of first

* Ruleset helper functions

* Imports

* helper functions part 2

* sanity check in case the unit actually isn't upgradable here

* I missed a spot

* This is NOT using a filter, itis looking for a unitName. Also, why do we use "unit" instead of "unitName"?

* Avoid crash in Scene2dExtentions, part 1

* Avoid crash in Scene2dExtentions, part 2

* inevitable request to move it to its own function

* Upgrade to the correct unit when upgrading all units

* Kdocs I overlooked

* Whoops

* Revert kdocs changes

* Should probably make sure action isn't null

* Fix loop in checkUnitRulesetInvariant

* Minor irrelevant fix

* No response, Removing getUpgradePath part 1 as it's redundant if we upgrade one at a time

* Move to UnitAutomation

* Imports

* Irrelevant fix: ignore consturctionRejections for upgrades

* Irrelevant fix: We should be able to upgrade to obsolete units, just not build new ones

* Simplify for clarity

* Irrelevant fix: unit is not destroyed is it doesn't upgrade

* Whoops

* Imports

* Remove getUpgradePath part 2: simplify UnitAutomation

* Remove now unnecessary circular reference check. We already check if it upgrades to itself

* Whoops, if we use a special upgrade, we should go back to a normal upgrade if we find no special upgrade unique

* Basic tests for last commit

* Forgot special to normal upgrade test

* whoops, forgot to change comment

* Not at computer: List.isEmpty to Sequence.none

* Not at computer: List.size to Sequence.count()
2024-01-24 23:43:07 +02:00
Oskar Niesen
9522355752
Improved Spectator selected Civ coloring (#10992)
* Spectators now use the colors of the selected civ instead of the viewing civ

* Spectator now sees all city construction, growth bars and nation icons
2024-01-24 23:42:02 +02:00
SeventhM
4a72213cde
Fix problems with stats from tiles and improvements (#10980)
* Fix problems with stats from tiles and improvements

* Hold on, we can get the ruleset from the tile. And I was about to complain about that

* Update docs

* Funky null fix

* if else chain doesn't make sense for percent changes on second thought

* Incorporate suggestions

* Use getUnpillagedImprovement functions in matchesFilter

* We don't actually need the whole improvement here, just the name

* Move Golden Age to after all other stats

* Simplify percent stat adds
2024-01-24 23:41:52 +02:00
SomeTroglodyte
8d7e1a2a42
Fix RequiresBuildingInSomeCities not being displayed in city constructions as rejection reason (#10994) 2024-01-24 23:40:06 +02:00
Yair Morgenstern
65a829b017
Version rollout (#10982)
* Bump version and create initial changelog entry

* Update Italian.properties (#10977)

* Update Catalan.properties (#10973)

* Update French.properties (#10972)

* Update Dutch.properties (#10971)

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Update Dutch.properties

* Update Brazilian_Portuguese.properties (#10970)

* Update Brazilian_Portuguese.properties

* Update Brazilian_Portuguese.properties

* Update Brazilian_Portuguese.properties

* Update Brazilian_Portuguese.properties

* Update Brazilian_Portuguese.properties

* Update Indonesian.properties (#10968)

* Update Korean.properties (#10967)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
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: kensvin <kensvin28@gmail.com>
Co-authored-by: Yattong the Mackerel <saud2410@naver.com>
2024-01-21 19:32:12 +02:00
SomeTroglodyte
77c12fcae4
Unit actions builders use sequence (#10966)
* Change actionTypeToFunctions signature to use Sequence

* Linting and a little left pad for the unit action buttons
2024-01-21 19:14:54 +02:00
SomeTroglodyte
6fad057ced
Improved Console autocomplete (#10962)
* Console: History remembers only _changed_ command lines

* Console: New command sethealth, allow setmovement without argument to set max movement

* Console: All object name comparisons on the "CliInput" level so multiword or varying-case input is recognized properly

* Console: Autocomplete change so continuation is easier: Don't add space if there were alternatives, output CliInput-style

* Console: Autocomplete religions - only from the actually founded ones (but we could easily add ruleset.religions - a '+' would be distinct already)

* Console: Intelligent autocomplete promotions in `unit addpromotion`

* Console: Treat all warnings

* Console: Split off a few classes

* Console: Forgot to treat a reminder - fix crash on `unit addp<tab><tab>`

* Console: setterrain, setresource, consequences of tile changes

* Console: Revert normalizeToRuleset 'safety net' calls
2024-01-21 19:13:58 +02:00
Oskar Niesen
fe111edf30
Spectators can now see the diplomacy screen of the civ that they have selected (#10969) 2024-01-21 19:13:46 +02:00
SeventhM
b43fe8cdf8
Assume the relevant city for triggered uniques (#10979)
* Assume the relevant city for triggered uniques

* whoops

* whoops 2

* Missing bracket

* whoops 3. A PR I was planning on doint but will wait on
2024-01-21 19:13:31 +02:00
Oskar Niesen
bb969efc12
Checking if a tile is in work range now checks all cities (#10978) 2024-01-21 19:13:11 +02:00
Oskar Niesen
169ccf5d03
AI worker road priority rework (#10918)
* WorkerAutomation now caches the roads to use

* Workers now build roads differently

* Fixed error if unit movement is zero

* Fixed civ researching an unwanted tech in a test

* Fixed spelling

* Increased road building priority

* getRoadConnectionBetweenCities no longer does unnecessary sorting

* roadsToConnectCitiesCache no longer stores roads that are already built

* ChooseImprovement now builds roads on resource tiles!

* Fixed tryConnectingCities error related to using minByOrNull instead of firstOrNull

* Roads can't have a negative value if they are bigger
2024-01-21 19:12:14 +02:00
Yair Morgenstern
94256f7160 Resolved #10938 - 'cities auto-bombard at end of turn' is a user option 2024-01-21 18:59:32 +02:00
Yair Morgenstern
6b2f811d58 4.10.0 2024-01-19 12:34:05 +02:00
Yair Morgenstern
15ea7176b0
Version rollout (#10964)
* Bump version and create initial changelog entry

* Update Simplified_Chinese.properties (#10960)

* Update Hungarian.properties (#10958)

* Update Hungarian.properties

* Update Hungarian.properties

* Update Hungarian.properties

* Update French.properties (#10957)

* Update Korean.properties (#10956)

* Update Dutch.properties (#10954)

* Update Italian.properties (#10946)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: AutumnPizazz <114050365+AutumnPizazz@users.noreply.github.com>
Co-authored-by: balazsszalab <balazsszalab@freemail.hu>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Yattong the Mackerel <saud2410@naver.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
2024-01-19 12:28:01 +02:00
SeventhM
016bb80123
Fix conditionals being ignored for some triggers (#10839)
* Fix conditionals being ignored for some triggers

* Import StateForConditionals... again
2024-01-19 12:27:51 +02:00
Oskar Niesen
aba91c9167
AI worker amount increase (#10945)
* Increased the amount of workers the AI builds

* Changed the number of workers a little
2024-01-19 12:26:52 +02:00
SomeTroglodyte
4e67d9535f
The console key should be bindable? (#10952) 2024-01-19 12:07:15 +02:00
SeventhM
940cda3009
Treat all timed uniques as functioning as always true regardless of conditionals (#10940)
* Treat all timed uniques as functioning as always true regardless of conditionals

* use replaceFirst instead of replace
2024-01-19 12:05:28 +02:00
SomeTroglodyte
e5e86aa0d7
Avoid Civilopedia stumbling over missing Grassland (#10953)
* Avoid Civilopedia stumbling over missing Grassland

* A few wiki comments on Terrain

* Minor linting of my own crud

* Pedia linking PromotionPickerScreen

* Change actionTypeToFunctions signature to use Sequence
2024-01-19 11:59:58 +02:00
SomeTroglodyte
bfaf049b6a
Allow map editor to generate smaller than "tiny" Pangaea maps (#10894)
* Allow map editor to generate tiny Pangaea maps (instead of entering an infinite loop)

* rename variable & reword comment
2024-01-19 11:51:52 +02:00
Yair Morgenstern
8977f8f7cc Don't spawn nat wonders next to start location 2024-01-19 11:37:36 +02:00
Yair Morgenstern
a73b159498 Automated spectator in multiplayer games does nothing 2024-01-19 11:22:54 +02:00
Yair Morgenstern
b09354a042 Source object names for users unified 2024-01-15 21:09:46 +02:00
Yair Morgenstern
7f3be9dce2 #10846 - added removeroad command 2024-01-15 19:24:04 +02:00
Yair Morgenstern
06203bfe71 #10846 - Add console command to change city name 2024-01-15 19:19:50 +02:00
Yair Morgenstern
411d8c4a0f 4.9.19 2024-01-15 19:09:25 +02:00
Yair Morgenstern
0c460801c0
Version rollout (#10943)
* Bump version and create initial changelog entry

* Update Brazilian_Portuguese.properties (#10941)

* Update Italian.properties (#10935)

* Update Korean.properties (#10934)

* Update Hungarian.properties (#10925)

* Update Hungarian.properties

[...] -> (...)

* Update Hungarian.properties

* Update Hungarian.properties

* Update Spanish.properties (#10920)

* Update Polish.properties (#10919)

* Update French.properties (#10916)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Yattong the Mackerel <saud2410@naver.com>
Co-authored-by: balazsszalab <balazsszalab@freemail.hu>
Co-authored-by: yetanotherfossman <83962798+yetanotherfossman@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
2024-01-15 19:06:32 +02:00
Oskar Niesen
59b8e9bd76
Spectators receive era notifications again (#10937) 2024-01-15 18:56:38 +02:00
Oskar Niesen
b9f44982b9
Temporarily disabled AI fort building (#10933)
* Half working fort building AI

* Disabled fort building so we can push a fix out

* Updated Uniques to not be hard coded
2024-01-15 18:56:22 +02:00
SomeTroglodyte
cf5eb02ce7
Fix Paradrop crossing World-wrap seam (#10936)
* Fix Paradrop crossing World-wrap seam problem

* Change MoveHereButton for Paradrop
2024-01-15 18:56:13 +02:00
Oskar Niesen
c3a4b5f7af
Worker remove feature AI fix (#10917)
* Workers now value the improvement that they want to build after removing a terrain feature

* Restructured getImprovementRanking
2024-01-15 18:55:45 +02:00
SomeTroglodyte
c829caf51a
ModManagementScreen gets a loading indicator (#10909) 2024-01-15 18:55:36 +02:00
Yair Morgenstern
0b5c2062b6 Modding: "Cannot be traded" unique accepts Civ conditionals 2024-01-15 18:48:43 +02:00
Yair Morgenstern
6998b8d3d1 Changed unitHeight and tileHeight from by lazy to transient vars, to allow updates in preparation for base terrain changes 2024-01-14 19:11:21 +02:00
Yair Morgenstern
6043a62353 Boni -> Bonuses, this is English 2024-01-14 10:03:02 +02:00
Yair Morgenstern
332a2d0af3 Removed new shortestPath algorithm after we determined it to be objectively slower than the current one :( 2024-01-13 20:58:57 +02:00
Yair Morgenstern
b16450e002 Allow comment uniques on follower beliefs 2024-01-13 20:48:08 +02:00
Yair Morgenstern
5997dde157
Version rollout (#10907)
* Bump version and create initial changelog entry

* Update Simplified Chinese (#10905)

* Update Brazilian_Portuguese.properties (#10899)

* Update Korean.properties (#10892)

* Update Korean.properties

* Update Korean.properties

* Update Korean.properties

* Update Korean.properties

* ctrl+z

* Update Spanish.properties (#10890)

* Update French.properties (#10886)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@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: Ouaz <Ouaz@users.noreply.github.com>
2024-01-09 23:26:25 +02:00
Yair Morgenstern
7064f6a1ec Performance improvement for ruleset validation 2024-01-09 23:25:43 +02:00
Roman Kr
b9b0a63d64
Added unique MayBuyConstructionsInPupets (#10597)
* Uniques: added MayBuyConstructionsInPupets unique for a civ

Gives an ability to buy items (units and buildings) in puppet cities

* Uniques: clear unnecessary whitespaces

* Uniques: typo in a `puppet` word

* Uniques: use city's `getMatchingUniques` instead of civ's `hasUnique` during checking the unique
2024-01-09 22:26:07 +02:00
SomeTroglodyte
436809db81
Linting of GameStarter.addCivTechs (#10897)
* Linting

* Fix era number on turn 0

* Revert "Fix era number on turn 0"

This reverts commit 71e428e0c5.
2024-01-09 22:11:22 +02:00
SeventhM
bbba24baae
Reorder AddTechnology (#10901) 2024-01-09 22:11:11 +02:00
SomeTroglodyte
e34854bf7d
Prevent TranslationFileWriter from writing entries crippled by wrong nested brackets interpretation - when UniqueTyped (#10774) 2024-01-09 22:10:57 +02:00
Yair Morgenstern
7845aea440 Performance improvement for canPassThrough 2024-01-09 22:09:29 +02:00
Yair Morgenstern
6b469cb25b Final performance improvements for the new algotihm, before we say 'goodnight sweet prince' - it underperforms drastically compared to current 2024-01-09 12:31:37 +02:00
yairm210
7f37783006 4.9.17-patch2 2024-01-09 05:36:23 +00:00
dHannasch
597574f534
Fix NullPointerException on founding a pantheon (#10888)
* Update ReligionManager.kt

* Move religionState and trigger out of foundPantheon for symmetry

* Update ReligionManager.kt
2024-01-09 07:36:15 +02:00
yairm210
cbea5e1a14 4.9.17-patch1 2024-01-07 20:20:59 +00:00
Yair Morgenstern
93f4817729
Fix 'move to tile' for new movement (#10887) 2024-01-07 22:20:52 +02:00
Oskar Niesen
87ee874f4b
Fixed AutoPlay not working after victory (#10885) 2024-01-07 22:20:20 +02:00
Yair Morgenstern
7a4113554c 4.9.17 2024-01-07 16:20:42 +02:00
Yair Morgenstern
08e1f5704b
Version rollout (#10884)
* Bump version and create initial changelog entry

* Update French.properties (#10875)

* Update Italian.properties (#10873)

* Update Korean.properties (#10872)

* Update Korean.properties

* Update Korean.properties

---------

Co-authored-by: yairm210 <yairm210@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: Yattong the Mackerel <saud2410@naver.com>
2024-01-07 16:16:31 +02:00
Yair Morgenstern
cb01bbc176
Experimental pathfinding! (#10883)
* Experimental pathfinding - still not good enough for main branch

* Fixed strange pathfinding and impassible tiles

* Fixed weirdest bug in the history of weird bugs - remove() on an object did not remove the object

* Avoid damaging and enemy tiles for new pathfinding

* Add option for activating experimental movement
2024-01-07 16:08:30 +02:00
SeventhM
3fefeb2e24
Allow mapUnitFilter to use CivFilter instead of NationFilter (#10879) 2024-01-07 16:08:01 +02:00
SeventhM
9ae782b426
Add terrain filters for resources, any terrain, or "improved" (#10878)
* Add terrain filters for resources, any terrain, or "improved"

* Add entry to validation
2024-01-07 16:07:53 +02:00
SeventhM
26fb286252
Move trigger on founding/enhancing religion to after belief pick (#10877) 2024-01-07 16:07:44 +02:00
Oskar Niesen
be13394b44
Spectator now receives important diplomatic notifications again (#10880) 2024-01-07 16:07:25 +02:00
SomeTroglodyte
50a6e5bbdb
Download mod releases or any mod zip (#10881)
* Allow almost any mod zip download source

* Linting

* Add basic "Release page section" link capability, more linting

* Refactor: Move Github to logic

* Refactor: Split Github into files

* Refactor: centralizing all API knowledge

* Try bumping detekt version to fix false complaint

* Attempt to trick detekt to not complain about `it`

* Better overload-ambiguity-solving + detekt-compatible SAM use
2024-01-07 16:07:15 +02:00
SeventhM
68786d7603
Fix Great General counter not decreasing upon spawning a general (#10882)
* Fix Great General counter not decreasing upon spawning a general

* Actually, screw it, might as well trmove this whole section
2024-01-07 16:07:04 +02:00
PLynx
1b6d75c4db
Add <every [positiveAmount] turns> Conditional unique (not TriggerCondition) (#10871)
* Added a ConditionalEveryTurns unique

* Auto-generated the docs entry
2024-01-07 16:06:55 +02:00
Yair Morgenstern
aa18e826df Console: autocomplete ALL THE THINGS! 2024-01-04 10:35:07 +02:00
Yair Morgenstern
e049427b75 Console: Unified autocomplete 2024-01-04 09:59:25 +02:00
Yair Morgenstern
7ba5924c6d Console: Normalized addStat subcommand 2024-01-04 09:40:34 +02:00
Yair Morgenstern
24c0894f2b Console: Format is inherent part of console action 2024-01-04 09:36:29 +02:00
Yair Morgenstern
3633e95584 City/civ names match ignore case and match with spaces or - 2024-01-04 09:16:38 +02:00
Yair Morgenstern
3b66009dd2
Version rollout (#10869)
* Bump version and create initial changelog entry

* Update Hungarian.properties (#10864)

[...] -> (...)

* Fix some right-side uses of square brackets in translations (#10861)

* Update Korean.properties (#10860)

* Update Indonesian.properties (#10859)

Fix extra placeholder issue

* Update Brazilian_Portuguese.properties (#10856)

* Update Latin.properties (#10849)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: balazsszalab <balazsszalab@freemail.hu>
Co-authored-by: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com>
Co-authored-by: Yattong the Mackerel <saud2410@naver.com>
Co-authored-by: kensvin <kensvin28@gmail.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
2024-01-04 09:15:49 +02:00
soggerr
92e45f89a9
Show carried hammers from mid turn obsolete units (#10841)
Without this, when you get a mid-turn free tech like Oxford University,
the units in city queues are updated but the hammers aren't carried
over from the obsolete unit until the end of turn. This means that to
the player it shows 0 progress for all the new units in queue and
appears like the progress from obsolete units was lost which can be
disconcerting and makes strategizing during that turn difficult.
2024-01-04 09:04:14 +02:00
Oskar Niesen
fa9d7e1ca7
Fixed crash when a worker tries to build a cached improvement that it can't build (#10854)
* Worker won't try to build the cached improvement that it can't build

* Accounted for the repair case as well
2024-01-04 09:04:05 +02:00
Oskar Niesen
1a0bdff019
valueCityStateAlliance no longer causes a crash when the city-state has not been met (#10853) 2024-01-04 09:03:56 +02:00
SomeTroglodyte
a37807f4bb
Wiki: Texture packing updated (#10851)
* Wiki: Remove texture atlas info from the Introduction, minor formatting changes

* Wiki: Add texture atlas info back in under Images-and-Audio, expanded (external tools, settings, encoding warning).

* On second thought...

* Double-check wording for 'game.png is no longer a special boy', ensure game atlas is merged into textureRegions only once
2024-01-04 09:03:48 +02:00
SomeTroglodyte
42188f160c
City-stationed unit icons get a circular touchable area (#10866)
* Linting

* Move ClickableCircle to allow reuse

* Make the Unit list icons clickable only within their circle
2024-01-04 09:03:37 +02:00
SomeTroglodyte
8573aaf8d1
Minor ImprovementPicker linting (#10862) 2024-01-04 09:03:28 +02:00
SeventhM
665b5aa87c
Add unique to allow for generalized great generals (#10828)
* Add unique to allow for generalized great generals

* Don't add compatibility for rulesets with conditional generals

* Add to rulesets

* add in pre Kotlin 9 parenthesis

* whoops missed a parenthesis

* I guess pre Kotlin 9 parenthesis was unnecessary, whoops

* Add back old variables to clone function

* Move the list of all potential generals to Ruleset

* Move list of unit construction rejections to IConstruction

* flip !any{} to none{}

* Fix imports

* Typo
2024-01-04 09:03:14 +02:00
Rémi Dufour
6e84377090
set minimum max coast extension to 1 (#10850) 2024-01-02 11:53:05 +02:00
Yair Morgenstern
1cd72e4272
Version rollout (#10848)
* Bump version and create initial changelog entry

* Use randomize seed checkbox for partial generation (#10844)

* use randomize seed checkbox for partial generation and debug the behavior of raiseMountainsAndHills in partial generation

* small changes

* Update Finnish.properties (#10843)

* Update Finnish.properties

* Update Finnish.properties

* Update Finnish.properties

* Update Korean.properties (#10842)

* Update French.properties (#10838)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Rémi Dufour <remi.dufour@protonmail.com>
Co-authored-by: Securetux <110048962+Securetux@users.noreply.github.com>
Co-authored-by: Yattong the Mackerel <saud2410@naver.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
2023-12-31 23:09:09 +02:00
Oskar Niesen
15a17335c1
Worker remove feature far away from cities fix (#10847)
* Worker AI doesn't remove forests and marshes away from their borders.

* Reverted a previous change that slipped into this branch
2023-12-31 23:06:14 +02:00
Yair Morgenstern
35c19bf9de Fixed tests 2023-12-31 22:59:33 +02:00
Yair Morgenstern
ac82d8bcb4 Added Tile Breakdown table, accessible by clicking on the stats in tile info table 2023-12-31 22:48:04 +02:00
Yair Morgenstern
15dfb892a7 Solved rare pillage-related crash 2023-12-31 22:42:19 +02:00
Yair Morgenstern
b3cdd4fbab game.png is no longer a special boy 2023-12-31 16:22:12 +02:00
Yair Morgenstern
9fcb6860b7 Console: Add "activate trigger" for civ! 2023-12-31 15:39:17 +02:00
Yair Morgenstern
7b43f90dd0 Console: Allow "-delimited strings 2023-12-31 15:26:59 +02:00
Yair Morgenstern
662ba037c8 'capture all capitals' victory accepts defeat of civs that did not found capitals 2023-12-31 14:33:48 +02:00
Yair Morgenstern
8b3163a926 Added console command to reveal entire map 2023-12-31 14:33:17 +02:00
Yair Morgenstern
0b89e609c7 Map editor generation steps don't add multiple terrain features of the same type 2023-12-31 08:52:04 +02:00
Yair Morgenstern
fbef276d0b 4.9.14 2023-12-30 21:36:00 +02:00
Yair Morgenstern
94efddb459 Solved detekt for realz 2023-12-30 21:32:42 +02:00
Yair Morgenstern
4cda91eb7f Fix detekt warnings 2023-12-30 21:28:18 +02:00
Yair Morgenstern
c56df66c7e Deprecated old uniques 2023-12-30 21:21:44 +02:00
Yair Morgenstern
a2fd43f840
Version rollout (#10837)
* Bump version and create initial changelog entry

* Update Catalan.properties (#10834)

* Update Polish.properties (#10831)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
2023-12-30 21:21:25 +02:00
Yair Morgenstern
ab133027cd Fixed scenarios crashing 2023-12-30 21:14:04 +02:00
Oskar Niesen
16fce2bb1d
Worker AI short distance priority fix (#10835)
* Removed extra tilesToAvoid check

* Fixed getBasePriority being negative
2023-12-30 21:01:29 +02:00
Yair Morgenstern
5898f91bb8
New Citizen Focus Options - again (#10827)
* Add Gold Growth and Production Growth Focus
New Manual Focus doesn't reallocate population

* Use Stat Names (and symbols) for focus

* Missing reassign code

* Clean up table for efficiency

* Table v2

* minor translation changes

* COMPATIBILITY

* v3 table

* Minor fixups

* Add Gold Growth and Production Growth Focus
New Manual Focus doesn't reallocate population

* Use Stat Names (and symbols) for focus

* Missing reassign code

* Clean up table for efficiency

* Table v2

* minor translation changes

* COMPATIBILITY

* v3 table

* Minor fixups

* Update to master code
Remove duplicating Food yield multiply

* Revert Compatibility Version

---------

Co-authored-by: itanasi <44038014+itanasi@users.noreply.github.com>
2023-12-30 20:54:12 +02:00
SeventhM
cd4e0333f4
Spawn multiple great people if eligible (#10833)
* Spawn multiple great people if eligible

* Fix referrence to outdated dev environment
2023-12-30 20:53:29 +02:00
SeventhM
24c888ef19
Initial Great Writer functionality (#10721)
* Initial Great Writer functionality

* Cleanup code

* And then ignore the fact that I cleaned it

* Temporary copy of Culture icon for unitActionIcons
2023-12-30 20:53:22 +02:00
Oskar Niesen
2768042700
AI focuses city-state gold gifting (#10836)
* AI prioritises gifting gold to city-states with more influence invested

* AI only gives smaller city-state gold gifts if it already has influence

* AI prioritises gifting gold to city-states with the investment quest

* Only UseGoldAutomation includes valuing if the city-state has a quest
2023-12-30 20:49:57 +02:00
Yair Morgenstern
bd1a3d4d2a Resolved #10818 - Updating server URL allows checking connection immediately 2023-12-30 20:49:36 +02:00
Yair Morgenstern
f0486c1454
Trigger 'capture city' as a unit trigger (#10824)
This will default back to civ trigger if the unique is not a unit trigger, so there should be 100% backwards compatibility
2023-12-28 23:11:31 +02:00
Yair Morgenstern
be0d6c9936
Version rollout (#10826)
* Bump version and create initial changelog entry

* Update Spanish.properties (#10821)

* Update Finnish.properties (#10819)

* Update Finnish.properties

* Update Finnish.properties

* Update Simplified Chinese (#10816)

* Update Brazilian_Portuguese.properties (#10813)

* Update French.properties (#10812)

* Update Italian.properties (#10811)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Securetux <110048962+Securetux@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@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>
2023-12-28 23:07:37 +02:00
Yair Morgenstern
783f846761 Remove source compatibility to java 8, in preparation for Gradle 8.5 upgrade
See #10740
2023-12-28 23:07:24 +02:00
Oskar Niesen
7745cd1c88
Worker AI Rework (#10776)
* WorkerAutomation now uses UnitAutomations's getDangerous tiles

* getPriority now values the current unit tile

* getPriority now values if the tile is worked instead of if it provides a yield

* getPriority prioritises clearing fallout

* getPriority prioritises new resources

* Fixed error in WorkerAutomationTest

* FindTileToWork now uses tilesToAvoid instead of checking for enemies itself

* Workers prioritise their own tile first

* Began reworking tile priority

* Changed getBasePriority() to account for tile damage

* findTileToWork now groups tiles and finds the best tile from the top group

* Fixed method calling findTileToWork()

* Workers don't build roads if their GPT is below 20

* Workers have multiple stages of wanting to connect cities

* Workers prioritise best tiles based on closeness

* Changed stuff

* Fixed a situation where a worker would be on a tile without improving it

* Reduced city connection priority

* Worker prioritises improving closer tiles more

* Worker prioritises improvements that are closer to being finished

* Reverted changes that broke tryConnectingCities more (it is already a little broken)

* Improved repair priority

* Added cityDistanceWant to tryConnectingCities

* Created a partial Test

* Finished first test

* Fixed a merge issue

* Fixed tileHasWorkToDo not accounting for base improvement values

* Added a failing test

* CityPopulationManager now assigns population to tiles in a predictable way for the Worker BasePriority tileProvidesYield

* Added an extra test with two cities and no roads

* Fixed Test creating new workers which ends up failing the test

* Test no longer research and have unnecessary research

* Test no longer include city center tiles as improvements built

* Added a failing test and removed a tryConnectCity filter

* Workers now improve tiles with unseeable resources on them

* Added a resource test

* Fixed should build roads in turns test

* Added an extra test

* tryConnectingCities takes into account the improvement priority

* Separated the improvement stat bonus from the base priority for tryConnectCities

* getBasePriority() now ranks a tile based on its base stats

* replaced mostUnderdevelopedCity with closestUnderDevelopedCity

* changed build road distances wanted

* getImprovementRanking now accounts for resources

* tilePriority now uses a float instead of an int

* Fixed float to int conversion in SpecificUnitAutomation

* Added a test for pillaging
2023-12-28 22:42:11 +02:00
SeventhM
0cbd9810a3
Fix stat on tile uniques doubling on improvement tiles (#10814)
* Fix stat on tile uniques doubling on improvement tiles

* Move to statsFromObject because that's what it is
2023-12-28 22:41:35 +02:00
SeventhM
4ba4eb6e20
Avoid crash if "Only available" unique in policy branch has 2 or more params (#10815)
* Unnecessary linting: for instead of foreach

* Avoid crash if "Only available" unique in policy branch has 2 params

* rename
2023-12-28 22:41:24 +02:00
Oskar Niesen
e823d82471
AI doesn't counter offer and request a defesive pact, open borders or research pact at the same time (#10823)
* AI now does not offer a defensive pact/open border/research agreement if there is a pending counter offer with it

* Moved searching for a pending trade offer to a new function
2023-12-28 22:40:30 +02:00
Rémi Dufour
f1bd13c80c
Randomize seed checkbox (#10782)
* randomize seed checkbox working

* don't reseed when checking the box
2023-12-28 22:40:19 +02:00
SeventhM
3b7974942c
Allow for improvement removal "improvements" (#10820)
* Allow for improvment removal "improvements"

* Flip concatination to avoid multiple startsWith
2023-12-28 22:38:24 +02:00
Oskar Niesen
6c8be3c4e5
Civs now have a 50% chance of picking their favored religion (#10825) 2023-12-28 22:38:13 +02:00
Yair Morgenstern
278288442b Religion button respects "hidden from users" modifier on uniques 2023-12-28 21:58:10 +02:00
Yair Morgenstern
5859aaadca
Version rollout (#10810)
* Bump version and create initial changelog entry

* Update Italian.properties (#10807)

* Update Catalan.properties (#10806)

* Update Polish.properties (#10805)

* Update Turkish.properties (#10803)

* Update Turkish.properties

Added new translations

* Update Turkish.properties

* Update Turkish.properties

* Update Turkish.properties

* Update Turkish.properties

* Update Turkish.properties

Added fastline translate

* Update Turkish.properties

* Update Turkish.properties

* Update Turkish.properties

* Update French.properties (#10800)

* Update Spanish.properties (#10799)

Tradicción is incorrect

* Update Brazilian_Portuguese.properties (#10796)

* Update Romanian.properties (#10798)

* Update Romanian.properties

* Update Romanian.properties

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: komandotayfa <53448093+komandotayfa@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: brihuega <jose.brihuega@gmail.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Tomkode <79474984+Tomkode@users.noreply.github.com>
2023-12-25 21:04:43 +02:00
SomeTroglodyte
bae3566a97
Fix ShadowedLabel using Stack's internal default size, so the usage in BattleTableHelpers had a vast distance between label and shadow. (#10804) 2023-12-25 20:11:42 +02:00
Yair Morgenstern
30c9876e2f Console: Simplified input validation, with exception throwing 2023-12-24 23:51:00 +02:00
Yair Morgenstern
46e5d7e245 Console: added 'set player type' command, for scenario setup 2023-12-24 23:13:35 +02:00
Yair Morgenstern
c3d592393e Added experimental scenarios! 2023-12-23 23:36:14 +02:00
Yair Morgenstern
8e2b443427 Add spaces between 'replaces' unit promotion uniques 2023-12-22 11:31:15 +02:00
Yair Morgenstern
05d9a09579
Version rollout (#10795)
* Bump version and create initial changelog entry

* Update Spanish.properties (#10780)

* Even more translations of Malay.properties (#10778)

I plan to finish the UI section this week. Honestly, going through and skimming a bit I've seen things I've never seen in game.

* Update Brazilian_Portuguese.properties (#10775)

* Some German translations (#10772)

* Update French.properties (#10768)

* Update Italian.properties (#10767)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Mikhail <151419244+MetaFBMI@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: SomeTroglodyte <63000004+SomeTroglodyte@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-12-22 10:12:28 +02:00
Why-not-now
1d97ededbd
Update units ruleset validation (#10781)
* Update units ruleset validation

Removed check for 0 rangedAttack ranged units. Definition here: 75af329b16/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt (L349)
Renamed obseleteTech to upgradeTech

* Undo renaming

* Removed duplicate check

See 93224f1491/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt (L51-L53)

---------

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2023-12-22 10:08:21 +02:00
Yair Morgenstern
b56a168e86
Save city focus as string, to allow changes in available city focuses without breaking games (#10794) 2023-12-22 10:07:28 +02:00
SomeTroglodyte
5f8d2ce340
Make City-state boni display respect hidden from users flags (#10786) 2023-12-22 10:00:21 +02:00
Oskar Niesen
7417b4c041
Added AutoPlay until end setting (#10789)
* Added a new AutoPlay until end button

* Added the new AutoPlay until victory setting to translation

* Reverted some comment fixes to hopefully not have a merge conflict
2023-12-22 10:00:03 +02:00
SomeTroglodyte
f529d969f0
Mod declarative compatibility - a little more (#10751)
* Mod compatibility - update declarations

* Mod compatibility - logic and UI changes

* Mod compatibility - flag some invalid use patterns

* RulesetValidator - lint until Studio shuts up

* Fix isBaseRuleset test in ModRequires validation

---------

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2023-12-22 09:59:38 +02:00
Yair Morgenstern
746918b1d3
Revert "New Citizen Focus Options (#10745)" (#10793)
This reverts commit 07c6728123.
2023-12-22 09:45:45 +02:00
itanasi
07c6728123
New Citizen Focus Options (#10745)
* Add Gold Growth and Production Growth Focus
New Manual Focus doesn't reallocate population

* Use Stat Names (and symbols) for focus

* Missing reassign code

* Clean up table for efficiency

* Table v2

* minor translation changes

* COMPATIBILITY

* v3 table

* Minor fixups
2023-12-22 09:38:43 +02:00
Oskar Niesen
d1bb563333
One player in each round will be processed even if all players are defeated. (#10788) 2023-12-22 09:38:14 +02:00
SomeTroglodyte
d3ac2c5ede
(UI) Politics overview diagram: Add legend popup (#10451)
* Refactor Battle damage shadowed Label into reusable WidgetGroup

* Make Politics Overview "Grid header" fixed and some linting

* Add a Legend popup explaining line colors in the Politics Overview Diagram: Click inside

* Missing translation template

* Final decision on background didn't make it in properly

* Remove unused png - those are now in the Construction atlas

* Smaller background image

* Color and shadow choices

* Redo atlas to include both 10505 and this
2023-12-22 09:37:47 +02:00
Yair Morgenstern
c08270362e Resolves #10792 - 'unique is requirement for tech' only looks at tech conditional 2023-12-22 09:35:12 +02:00
SomeTroglodyte
beced92a69
Linting of MapUnit class (#10785)
* Reorganize - restore meaning to existing regions, sort fields into regions, treat warnings

* Reorganize - double-check pure/side-effect regions and move inappropriate placements
2023-12-21 17:19:02 +02:00
Yair Morgenstern
851ab2e7b8 Separate higher-level autosave functions from lower-level file functions 2023-12-19 23:45:12 +02:00
Yair Morgenstern
7a28f15106 Revert "Great Person Points - Rounding changes, Breakdown UI (#10714)"
This reverts commit 64a455152a.
2023-12-19 23:10:36 +02:00
Yair Morgenstern
1cee3f722e Unit by default not selected on turn start 2023-12-19 23:05:35 +02:00
Yair Morgenstern
b04da39799 Added 'upon turn end' trigger 2023-12-19 22:34:34 +02:00
yairm210
93224f1491 4.9.10-patch1 2023-12-18 19:40:30 +00:00
SomeTroglodyte
77de68cfc5
Fix any tech researched clearing all units from queues (#10777) 2023-12-18 21:40:22 +02:00
Yair Morgenstern
08514cbd2e 4.9.10 2023-12-17 22:33:05 +02:00
Yair Morgenstern
c0f837628b Resolved #10674 - added mod checker warning that movement uniques do not always work with conditionals 2023-12-17 22:25:30 +02:00
Yair Morgenstern
805f008af5
Version rollout (#10766)
* Bump version and create initial changelog entry

* Update Latin.properties (#10765)

* Update Malay.properties (#10764)

It's gonna be a long time till I translate everything. Goddamn there's like 10k+ things to translate. Anyways, gonna sleep.

* Update Catalan.properties (#10762)

* Update French.properties (#10754)

* Update Afrikaans.properties (#10752)

Translation update

* Update Polish.properties (#10750)

* Update Brazilian_Portuguese.properties (#10749)

* Update Brazilian_Portuguese.properties

* Update Brazilian_Portuguese.properties

* fix tests

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Mikhail <151419244+MetaFBMI@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: SielVlokkies <153941039+SielVlokkies@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
2023-12-17 22:20:00 +02:00
PLynx
cde26d325e
Add the remove unit promotion unique (#10759)
* Added the remove unit promotion unique

* Moved two lines of code inside if
2023-12-17 22:03:52 +02:00
SomeTroglodyte
3fd9bc2df3
Fix key bindings all reset to unbound on entering options and leaving without looking at the keys page (#10753) 2023-12-17 22:03:43 +02:00
Rémi Dufour
3797817291
Coast spread algorithm (#10741)
* new algo for coast placement

* optimization?

* change default max coast extension

* put spreadcoast in a function

* default change back, nextBoolean() and for loop
2023-12-17 22:03:31 +02:00
itanasi
af4dea60e0
Stop on Path Blocked (#10758)
* The change

* The change properly this time
2023-12-17 22:03:14 +02:00
Will Allen
51e444df6d
Units that can't build roads should not have connect roads automation. (#10760) 2023-12-17 22:02:59 +02:00
Rémi Dufour
1316271ac6
avoid initializing with terrain that shouldn't be naturally generated (#10756)
* avoid initializing with terrain that shouldn't be naturally generated

* add space

* fix partial generation freeze

* one-liner unique check
2023-12-17 22:02:45 +02:00
SeventhM
7ff38b2687
Fix Great Scientist science calculation (#10763)
* Linting

* Simplify adding science of last 8 turns
2023-12-17 22:02:33 +02:00
SeventhM
7bc3f22733
Show stat percent differences in replacement building differences (#10730) 2023-12-17 22:02:02 +02:00
dHannasch
4b5bb54b72
Add BaseUnit.automaticallyUpgradedInProductionToUnitByTech() (#10664)
* Update BaseUnit.kt

* Update RulesetValidator.kt

* Update BasicTests.kt

* Update BaseUnit.kt

* Update TechManager.kt

* Update BaseUnit.kt

* Update BaseUnit.kt
2023-12-17 22:00:45 +02:00
dHannasch
18c17e3a18
Don't list Unique requiring a tech in the Civilopedia for that tech (#10650)
* Update BuildingDescriptions.kt

* Update BaseUnitDescriptions.kt

* Update DescriptionHelpers.kt

* Update BuildingDescriptions.kt

* Update DescriptionHelpers.kt

* Update Technology.kt

* Update Technology.kt

* Update TechnologyDescriptions.kt

* Update BaseUnit.kt

* Update BaseUnit.kt

* Update Building.kt

* Update TechnologyDescriptions.kt

* Update Building.kt

* Update Building.kt

* Update Building.kt

* Update BaseUnit.kt

* Update BaseUnitDescriptions.kt

* Update BuildingDescriptions.kt

* Update TechnologyDescriptions.kt
2023-12-17 22:00:30 +02:00
Yair Morgenstern
d2d2e5b1ae
Version rollout (#10747)
* Bump version and create initial changelog entry

* Update Russian.properties (#10742)

* Update Polish.properties (#10735)

* Update Polish.properties

* Update Polish.properties

* Update Polish.properties

* Update Korean.properties (#10733)

* Update French.properties (#10732)

* Update Italian.properties (#10731)

* Update Brazilian_Portuguese.properties (#10729)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Anoant <143289571+Anoant@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Yattong the Mackerel <saud2410@naver.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: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
2023-12-15 11:53:05 +02:00
SeventhM
297aa3e082
Avoid crash in mod checker for mods with undefined tech requirements (#10744) 2023-12-15 11:13:23 +02:00
soggerr
c60700193f
Show average damage in battle calculations (#10738)
Change BattleTable to calulate average damage and show alongside the min
and max for easier calculations when planning to attack with multiple
units such as when sieging a city

Unfortunately for min-maxers the randomness is still turn dependent
for a given defending unit, so the damage randomness will not average
out across multiple attacks on a given turn but they will all be more or
all be less depending on the luck that turn.
2023-12-15 11:13:12 +02:00
soggerr
bc1a428eeb
Allow battle calculations when not your turn (#10737)
Allow BattleTable display when it is not the viewing players turn.
This will allow for more planning while waiting for other players.
2023-12-15 11:12:45 +02:00
SeventhM
ad820b6a72
Fix stats from tileFilter unique not working on improvements (#10728) 2023-12-15 11:12:34 +02:00
SeventhM
93b89e1922
Add damage dealing unit trigger (#10720)
* Add damage dealing unit trigger

* Switch Heal/Damage uniques to only allow positive amounts
2023-12-15 11:12:21 +02:00
SeventhM
023b2959af
Fix not getting unique unit from tile based free unit trigger (For real this time) (#10746) 2023-12-15 11:12:05 +02:00
Yair Morgenstern
9a9559a20c Deprecate old religion uniques - finally!!! Months in the making! 2023-12-13 23:28:36 +02:00
Yair Morgenstern
be211d0cc4
Version rollout (#10727)
* Bump version and create initial changelog entry

* Update Italian.properties (#10719)

* update Turkish.properties (#10709)

* Update Turkish.properties

Added new translations

* Update Turkish.properties

* Update Turkish.properties

* Update Turkish.properties

* Update Turkish.properties

* Update Turkish.properties

Added fastline translate

* Update Turkish.properties

* Update Turkish.properties

* Update Simplified_Chinese.properties (#10708)

---------

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: komandotayfa <53448093+komandotayfa@users.noreply.github.com>
Co-authored-by: AutumnPizazz <114050365+AutumnPizazz@users.noreply.github.com>
2023-12-13 23:10:26 +02:00
Yair Morgenstern
358e12a54d Avoid ANRs when users select mods that take above 500ms to run checks on 2023-12-13 23:05:10 +02:00
Yair Morgenstern
626973bfb7 Resolved crash when returning to empire overview and a category is missing 2023-12-13 22:55:36 +02:00
WhoIsJohannes
62469daff6
Add another confirmation when buying a religious unit in a city that … (#9570)
* Add another confirmation when buying a religious unit in a city that doesn't follow a religion founded by the city's civ.

* There's other stuff that can be purchased with Faith. Better to use UniqueType.Religious unit I guess.

* Add string to template.properties

* One more space to make unit tests happy

* Better template.properties

* Reinsert trailing space

* Introduce Constants entry for "Cancel"

* Redo ConfirmBuyPopup

* Dev console command to tweak religion pressures

* Translation templates and one test

---------

Co-authored-by: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com>
2023-12-13 22:45:46 +02:00
Rémi Dufour
153a90623c
Add new map types (#10695)
* fractal map type

* repeat create fractal until enough land

* small changes and add map types Lakes and Small Continents

* fix for removing land at edges of hexagonal maps

* readability
2023-12-13 22:37:27 +02:00
SeventhM
d2dde08824
Allow arbitrary victory types for the purposes of policies (#10716) 2023-12-13 22:36:37 +02:00
SomeTroglodyte
a24f9d7716
Civilopedia key bindings (#10723)
* Move CivilopediaImageGetters object to own file

* Keyboard bindings for Civilopedia

* Better default key choices

* Change default Key Binding Tab visibility to ON
2023-12-13 22:36:29 +02:00
soggerr
aba77b8350
Fix 'Sleep Until Healed' action missing (#10718)
Sleep until healed check unit injured logic fix
2023-12-13 22:36:20 +02:00
SomeTroglodyte
64a455152a
Great Person Points - Rounding changes, Breakdown UI (#10714)
* Change per-City GPP points math and separate breakdown (producer w/ source doc) from aggregates (consumer ignoring source)

* Change CityScreen GPP list to not do aggregation itself, but show a breakdown on click

* Change "birth" city for GPP to a ***weighted*** random - no Great Mufties from cities not generating any Mufty points!

* Nicer signature for getGreatPersonPointsBreakdown

* Minor warnings linting and template for Sweden's bonus in the breakdown Popup
2023-12-13 22:36:12 +02:00
MioBestWaifu
8b5c358904
Update TradeEvaluation.kt (#10713) 2023-12-13 22:36:02 +02:00