Commit Graph

10223 Commits

Author SHA1 Message Date
PLynx
2d1e55a4d4
Add MovedToNewCapital buiding unique (#11213)
* Added MovedToNewCapital building unique

Yet to be tested

* Applied the suggestions

Of @yairm210 and @SomeTroglodyte
2024-03-03 20:03:12 +02:00
SomeTroglodyte
61972cd50e
Move DiplomacyScreen close button to top right (#11225) 2024-03-03 20:03:04 +02:00
SomeTroglodyte
69c047790e
Validation warning Suppression as Unique or modifier (#11142)
* 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

* Suppression Unique and implementation

* Remove logging
2024-03-03 20:02:54 +02:00
Oskar Niesen
657ec94f4a
Better military unit retreat (#11192)
* Refactored tryRetreat checking if a tile has a unit or not

* Refactored tryRetreat to put ourDistanceToClosestEnemy outside of the loop
2024-03-03 20:02:42 +02:00
SomeTroglodyte
d843ac0c68
UI: Fix options popup "spilling" in cramped screen conditions (#11235)
* Remove unused "Closing page" feature from TabbedPager

* Minor linting

* Ensure Popup's innerTable doesn't exceed its Cell within Popup

* Change a few defaults and remove a misguided comment

* Move OptionPopup's close button to top right - another Red X
2024-03-03 20:02:31 +02:00
Yair Morgenstern
b577f5ee9a
Fix double-count of civ-wide resources, while allowing propagation of city-wide resources via uniques (#11236)
* Fix double-count of civ-wide resources, while allowing propagation of city-wide resources via uniques

* Added test to ensure civ-wide resources propagate between cities (they do)

GetResourceAmount -> GetAvailableResourceAmount

* Extra clarity in function names! Better than possible confusion.
2024-03-03 20:02:21 +02:00
Yair Morgenstern
2ec4d3be8e Changed tech trigger to accept tech filters 2024-03-03 19:40:52 +02:00
Yair Morgenstern
e6e07d1bec 4.10.14 2024-02-29 00:35:54 +02:00
Yair Morgenstern
971758f732
Version rollout (#11220)
* Bump version and create initial changelog entry

* Update French.properties (#11214)

* Update Italian.properties (#11211)

* Update Brazilian_Portuguese.properties (#11210)

* Update Indonesian.properties (#11209)

* Update Indonesian.properties

Fixed and added translation to some words.

* Update Indonesian.properties

* Update Indonesian.properties

* Added a Russian translation for the introductory text of Queen Elizabeth (#11206)

This is a translation close to the text. However, I have tried to keep the solemn style in translation, so there is a slight departure from the original.

---------

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: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: M792003 <158552928+M792003@users.noreply.github.com>
Co-authored-by: NoobTutorial <142553623+NoobTutorial@users.noreply.github.com>
2024-02-29 00:13:33 +02:00
Yair Morgenstern
e6893ef298 AI tile evaluation considers Faith 2024-02-29 00:06:42 +02:00
SomeTroglodyte
83fb2d048c
Unit upgrade menu can scroll (#11218)
* ScrollableAnimatedMenuPopup widget and base UnitUpgradeMenu off it

* More lack of resources info in UnitUpgradeMenu

* Make UnitUpgradeMenu available even if you can't afford any upgrade
2024-02-28 23:53:04 +02:00
SomeTroglodyte
8946ee8bfa
Remove unnecessary/harmful open on classes without subclasses (#11217)
* Remove open modifier from classes never actually subclassed

* Correct resulting compilation errors with readabilty improvement
2024-02-28 23:52:46 +02:00
SomeTroglodyte
6a61a71c36
Type declaration colon blanks linting (#11216) 2024-02-28 23:46:21 +02:00
Oskar Niesen
a5f1ba0401
Military unit healing improvement (#11195)
* Military units prioritize healing more

* Military units try to pillage tiles when attacking

* tryHeal() now tries to pillage multiple times if a unit have more movement

* Barbarians now pillage more

* Units stay healing on its tile if it can heal in two turns

* Units will heal when no enemies are around in their territory

* TryHealUnit returns false after pillaging to full health

* Refactored canUnitHealInTurnsOnCurrentTile

* Refactored movePreparingAttack pillaging
2024-02-28 23:45:35 +02:00
SomeTroglodyte
c8f9f38d96
Some linting and readability helpers (#11215) 2024-02-28 23:41:39 +02:00
Yair Morgenstern
ce8a7e9e3e Mods with no policy branches don't crash when clicking on culture icon 2024-02-27 23:37:54 +02:00
Yair Morgenstern
9054d84626 Simplified blockade function 2024-02-27 19:46:15 +02:00
Yair Morgenstern
4f5fdf1727 Civ-wide uniques for city-wide resources 2024-02-27 19:38:14 +02:00
Yair Morgenstern
04528696f7 Added conditional for exact amount of population in a city 2024-02-27 16:00:42 +02:00
Yair Morgenstern
ffeae91b0a Suggest corrections for misspelt conditionals; Better text similarity for strings with errors at the start 2024-02-27 14:28:08 +02:00
Yair Morgenstern
817ac64e58 Only require explicit building/wonder costs for tech columns that have buildings/wonders with unspecified cost 2024-02-27 14:05:53 +02:00
Yair Morgenstern
27d63f00f4 Added 'city addbuilding', 'city removebuilding' console commands 2024-02-27 13:22:10 +02:00
Yair Morgenstern
3689eed3aa Add unique to conditionally control construction costs 2024-02-27 11:13:26 +02:00
Yair Morgenstern
b4cb0e3d75 getProductionCost can receive city - this will allow us to control city-specific production cost changes! 2024-02-27 11:05:50 +02:00
Yair Morgenstern
fd428ce606 RemoveIf -> RemoveAll to avoid jvm dependencies 2024-02-27 11:00:39 +02:00
Yair Morgenstern
6448f8e47e Fix links in mod file structure - #11183 2024-02-26 22:53:28 +02:00
Yair Morgenstern
1101f42957 4.10.13 2024-02-26 22:47:43 +02:00
Yair Morgenstern
f34948d0c2
Version rollout (#11208)
* Bump version and create initial changelog entry

* Update French.properties (#11199)

* Update Italian.properties (#11198)

* Update Catalan.properties (#11197)

* Update Indonesian.properties (#11196)

Translated and fixed the translation of some words.

* Update Brazilian_Portuguese.properties (#11194)

* Update Brazilian_Portuguese.properties

* Update Brazilian_Portuguese.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: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: M792003 <158552928+M792003@users.noreply.github.com>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
2024-02-26 22:39:43 +02:00
SomeTroglodyte
a899a11ad2
New notifications bell icon with actual count (#11205)
* Refactor OtherIcons/Circle handling

* New "Bell" icon for Notifications

* Remove "todo" line
2024-02-26 22:20:40 +02:00
PLynx
91bfcbab2f
Added ConditionalAboveHappiness unique (#11207) 2024-02-26 22:20:34 +02:00
SomeTroglodyte
d7a2af5ced
Fix TabbedPager geometry - the cell for the close button needs to be ignored in the rest of the Table! (#11204) 2024-02-26 22:20:26 +02:00
Yair Morgenstern
a0f710b885 Resolved #11200 - Add AI for land-based nukes 2024-02-26 22:13:20 +02:00
Yair Morgenstern
e6a132a9d7 Fixed game load, removed extraneous getBaseUnit() function 2024-02-26 21:30:29 +02:00
Yair Morgenstern
2d49838f13 changed requiredTech to revealedBy in tileResources json schema, added deposit amounts and improvedBy 2024-02-25 23:36:57 +02:00
Yair Morgenstern
46dacd2991 Added resourceType field to tileResources json schema 2024-02-25 23:31:24 +02:00
Yair Morgenstern
cba867bb7e json schema for tileResources 2024-02-25 23:27:23 +02:00
Yair Morgenstern
4dbed12e45 Keep opened mods open and at top of list when reloading mods in 'locate mod errors' tab 2024-02-25 23:07:02 +02:00
Yair Morgenstern
83655bbd34 Resolves #11193 - above/below HP conditionals work outside of combat 2024-02-25 22:45:21 +02:00
Yair Morgenstern
72fa2a3f48 Resolves #11193 - update uniques upon taking damage and other situations 2024-02-25 21:42:05 +02:00
Yair Morgenstern
2494b1dcbc Move takeDamage function from MapUnitCombatant to MApUnit where it belongs 2024-02-25 21:35:08 +02:00
Yair Morgenstern
adccee0b2e 'cached unique' documentation is within collapsible block 2024-02-25 21:25:01 +02:00
Yair Morgenstern
8675a8a747 4.10.12 2024-02-25 00:35:00 +02:00
Yair Morgenstern
f5d80c5463
Version rollout (#11191)
* Bump version and create initial changelog entry

* Update French.properties (#11171)

* Update Italian.properties (#11168)

* Update Indonesian.properties (#11166)

* Update Indonesian.properties

Added and fixed some translation.

* 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: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: M792003 <158552928+M792003@users.noreply.github.com>
2024-02-24 22:51:54 +02:00
SomeTroglodyte
4a138478f6
Right-click/longpress for World screen city buttons (#10771)
* City buttons support right-click / long-press to enter CityScreen directly

* City r-click: Rename helper and UI tips

* City capitalization follows getCurrentTutorialTask precedent

* City capitalization change applied to existing translation keys

* Revert "City capitalization change applied to existing translation keys"

This reverts commit c3638a0daf.

* Revert "City capitalization follows getCurrentTutorialTask precedent"

This reverts commit b618f4cae3.

* City capitalization in new text follows getCurrentTutorialTask precedent
2024-02-24 22:42:31 +02:00
SomeTroglodyte
dd1f0142f1
Unit actions from Uniques shouldn't be active at zero movement (#11188) 2024-02-24 22:41:39 +02:00
Oskar Niesen
04083de766
Added unit escorting formation!!! (#11057)
* Added escort button

* Added basic escort movement

* Improved escort movement

* Swapping breaks escorting

* Added stop escorting button

* Added link icon to unit

* getDistanceToTiles() now automatically includes escorting

* Multi-turn movement with different units works somewhat

* Escorting units persist to escort across saves

* Escorting units are only idle if their partner unit is idle as well

* Fixed multi-turn escort movement where one unit has more movement points left over

* Added basic tests

* Added a test for formation idle units

* Added some basic movement tests

* Added some canMoveTo tests

* getDistanceToTiles only caches when includeEscort is true

* added getDistanceToTiles test

* An entire commit to remove one line of white space just for you! And yes, there are no semi-colons;

* Added translations

* Added more stopEscorting() calls when the unit is removed

* Added extra comments and refactoring

* Refactored removeAllTilesNotInSet to use a mutableIterator

* Refactored code based on review

* Refactored removing tiles in PathsToTilesWithinTurn that aren't in another PathsToTilesWithinTurn
2024-02-24 22:39:04 +02:00
SeventhM
54201c381c
Allow conditional timed triggers for unit actions or most other trigger conditionals (#11181)
* Allow conditional timed triggers to be visible from all uniqueMaps

* Whoops
2024-02-24 22:38:32 +02:00
SpacedOutChicken
b17f162be9
Allow Barbarians to make set-up ranged units (#11173)
Allow Barbarians to create units that must set up to ranged attack, unless specifically forbidden by the relevant unique

Since we have a unique for this explicit purpose, we no longer need this extra prevention for Barbarian unit types.
2024-02-24 22:38:22 +02:00
SomeTroglodyte
bebe0c67da
Fix double "close" action from Overview ESC key (#11185) 2024-02-24 22:38:12 +02:00
SomeTroglodyte
84902b7957
Fix a few applications of the "hidden from users" modifer (#11186)
* Respect hidden modifier in a nation's unique improvements display

* Respect hidden modifier in the Unhappiness stat overview

* No auto-icons for an ExpanderTab title
2024-02-24 22:38:02 +02:00