9955 Commits

Author SHA1 Message Date
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
a215685b57 4.10.5 4.10.5 2024-01-30 20:17:51 +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
7b930f8f7d FINALLY
What a HASSLE
2024-01-28 14:48:33 +02:00
Yair Morgenstern
27f445e830 Possible fix for OpenJDK gradle bug with using softlink chicanery 2024-01-28 13:31:37 +02:00
Yair Morgenstern
590cfd8b71 Fix docker jdk to 17 2024-01-28 13:04:53 +02:00
Yair Morgenstern
748d1117be buildMultiplatform.yml - java 17, since that's the min requirement for new gradle version 2024-01-28 13:03:27 +02:00
Yair Morgenstern
52a9eebe28 Gradle 8.2, remove all IOS references due to robovm bug (which we don't use) 4.10.4-gradle82 2024-01-28 12:35:29 +02:00
Yair Morgenstern
1318cfdc4a 4.10.4 4.10.4 2024-01-28 11:37:17 +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 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
9d670c8671 4.10.3 4.10.3 2024-01-25 23:43:41 +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 4.10.2 2024-01-25 00:00:23 +02:00