Commit Graph

374 Commits

Author SHA1 Message Date
8da58ed34a Add a Unique allowing an Improvement to specify which Resource(s) it improves (#11718)
* Linting

* Add UniqueType.ImprovesResources

* Address reviews and extensive Kdoc

* Oops, better include the generated stuff
2024-06-27 23:26:14 +03:00
54d872045c Better "Withdraws before melee combat" unique 2024-06-26 00:17:06 +03:00
095c4faed6 Countables for Cities, Units, Buildings allow filters 2024-06-25 23:56:01 +03:00
d640ed9557 Revert "Better countables - phase 1"
This reverts commit 7165c62573.
2024-06-25 23:44:10 +03:00
7165c62573 Better countables - phase 1 2024-06-25 23:43:11 +03:00
0a19cfb739 Resolved #11829 - "after [amount] turns" -> "after turn number [amount]", "before [amount] turns" -> "before turn number [amount]" 2024-06-25 16:09:18 +03:00
2093761e2d Resolved #11829 - "after [amount] turns" -> "after turn number [amount]" 2024-06-25 16:01:57 +03:00
39de50829a Resolve #11795 - fix performance problem for displaying air units in cities 2024-06-24 23:53:36 +03:00
de04c00dd0 Improvement picker fixes (#11801)
* 🎵 A little linting 🎶

* Prevent queueing unresearched removals by adding their problem reports on top

* More linting and bugfixes

* Hide "too advanced" Improvements in the PickerScreen

* ImprovementPickerScreen fully Civilopedia-linked

* Fix dumb mistake

* Slightly improve PickerPane descriptionLabel layout

* Slightly improve ImprovementPickerScreen top padding
2024-06-22 22:20:16 +03:00
109955c523 Simplified DispatcherVetoer, explained dispatcher 2024-06-19 00:37:07 +03:00
79be14e291 Resolved #11082 - Added "Will not be replaced by automated units" unique 2024-06-17 23:12:50 +03:00
0a357e3598 Resolved #11758 2024-06-15 23:14:51 +03:00
2b8c965d6b Personality implementation (#11729)
* Add Personalities.json

* Personality tags

* Askia, Attila, Augustus Personalities

* Bismark & Boudica

* Added parsed personalities

* Linked Personalities to their nation

* Tweaked some personalities

* Added the declareWar Personality

* Fixed some misnaming

---------

Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
2024-06-15 22:02:51 +03:00
b61961d0a5 Moddable city ranges (#11708)
* Added city bombard, work and expand range ModConstants

* Changed some city range integers to city.getWorkRange() or some equivalent

* Fixed city screen

* Fixed create game error

* Improved support for CityScreen when work range is higher than expand range

* Improved WonderOverviewTab Style

* Improved Civilization.modConstants

* Improved random spacing

* Changed WonderOverviewTab to use a constant again

* Added comments in documentation
2024-06-10 22:22:30 +03:00
d39c7a97bf Use Events for the floating "Tutorials" (#11717)
* Split off reuses of CityStateIcons/Cultured to allow modding separately

* Reposition floating tutorials in case the TopBar moved its buttons

* Event definition, art and basic support

* Split off Event rendering from AlertPopup

* Support Event presentation modes and replace hardcoded floating tutorials

* "Meet another civilization" art - can't find any better

* Tweak TranslationFileWriter and some polishing
2024-06-10 22:22:18 +03:00
b496784ab5 Extra Civ and Spy moddability (#11702)
* Made minimum duration of a war moddable

* Made turns until revolt moddable

* Made spy skill moddable

* Migrated city-state elections to use the Civ flag system

* Moved cityStateElectionTurns away from espionage

* Added new moddable constants to the documentation

* Fixed merge conflicts
2024-06-10 22:22:09 +03:00
7012297af6 Centralize and organize use of special unicode codepoints (#11647)
* Centralize and organize use of special unicode codepoints

* Centralize and organize use of special unicode codepoints - minor doc addition
2024-06-10 22:21:56 +03:00
be3260d770 History command no longer breaks on autocomplete sometimes 2024-06-10 22:19:21 +03:00
616a297f49 Documentation for mobile console 2024-06-09 14:31:22 +03:00
2f8b8ca974 4.11.18 2024-06-08 23:33:38 +03:00
68e29e9c53 "(modified by game speed)" modifier (#11696)
* "(modified by game speed)" modifier

* Added missing flags

* Fixed G&K ruleset
2024-06-08 21:58:52 +03:00
e276a08d61 UniqueParameterType getErrorSeverity/isKnownValue architecture simplification (#11701)
* UniqueParameterType getErrorSeverity/isKnownValue simplification

* Minor changes to a few UniqueType documentations

* Allow UnitsGainPromotion e.g. "[Melee] units gain the [Morale] promotion"
2024-06-08 21:58:38 +03:00
1296b16f90 4.11.17 2024-06-04 18:18:49 +03:00
7e3bbb6053 A ModOptions unique allowing a mod to control which map gets preselected (#11468)
* Minor linting

* UniqueType.ModMapPreselection
2024-06-04 18:00:29 +03:00
bdb0dcef65 Resolved #11675 - Unavailable techs work well with tech picker screen 2024-05-31 19:06:12 +03:00
5404b97009 4.11.16 2024-05-30 00:07:01 +03:00
d7018de5c5 Add unit name and building name countables 2024-05-27 16:15:08 +03:00
11cee77fb9 "for every [countable]" unique modifier (#11641)
* "for every [countable]" unique modifier

* detekt fix

* Test city-unique edge cases
2024-05-27 12:32:12 +03:00
4bbeece29e Added links to base ruleset template in docs 2024-05-22 23:33:04 +03:00
a976bda25d Personality Behaviors Template (#11165)
* Added behaviours

* Added the behaviours to the docs

* Fixed spelling

* Fixed references to PersonalityValue.Military

* Commented out Personality Behaviours docs and added a message

* Changed the names of some of the new personality behaviours
2024-05-21 20:11:41 +03:00
ec253a5886 ImagePacker detects changed settings file, improve documentation. (#11625) 2024-05-21 19:55:22 +03:00
cd9db42672 Added the culture-refunding remove policy unique (#11538) 2024-05-14 11:00:16 +03:00
d41a18ecd4 More movement uniques that have problems with conditionals 2024-05-05 20:39:48 +03:00
dee12bf23d 4.11.10 2024-05-04 21:51:28 +03:00
a13f71e654 Added victoryType conditionals (#11542) 2024-05-04 21:03:22 +03:00
df6b179102 [docs] fix links to Unique-parameters#terrainfilter and uniques.md (#11535) 2024-04-30 00:36:04 +03:00
2df8a405c7 Added "checkfilter" console commands for city, tile, and unit, for easy mod checking 2024-04-28 14:25:26 +03:00
9dcfb963e3 Multi-filter improve code clarity and more unit tests (#11503)
* Some linting and region reorder

* Make MultiFilter accept a negated "and" list plus more unit tests

* MultiFilter gets 'or' capability

* Revert "MultiFilter gets 'or' capability"

This reverts commit 9f6e7c794a.
2024-04-24 00:00:40 +03:00
c75861af25 Prettier Events - that now respect 'hidden from users' (#11474)
* Expand Events to allow civilopediaText, fixing hidden uniques as side effect

* Fix ConditionalChance save scumming

* Fix ExtraImages not working within mods

* Missing documentation of the changes to Events

* Kdoc to clarify why helper returns nullable

* Lint getJavaClassByName: fix compiler warning and re-sort when

* FormattedLine now throws on problems with extraImage loading

* Fix Tutorial extraImage by removing auto and making it explicit

* Revert "FormattedLine now throws on problems with extraImage loading"

This reverts commit b5ab4084ee.

* Partially revert the revert, so bad extraImage fields are console-logged
2024-04-21 15:30:41 +03:00
8ef90cbaf1 Minor Scenarios UX improvements (#11466)
* Give "Scenarios" its own icon

* A little more wiki info on the console

* Minor ScenarioScreen UX improvements
2024-04-15 23:55:25 +03:00
43e38e3869 4.11.4 2024-04-12 00:10:52 +03:00
a072f452b6 Allow policy removal unique to remove multiple policies (#11427)
* Allow policy removal unique to remove multiple policies

* Fix typo and filter

* More accurate translation line. Not sure if the engine cares
2024-04-11 23:32:59 +03:00
ef9965e218 Espionage Uniques, Buildings and Policy (#11401)
* Added OneTimeSpiesLevelUp, OneTimeGainSpy, SpyEffectiveness, EnemySpyEffectiveness and HiddenWithoutEspionage Uniques

* Spy effectiveness affects stealing tech and rigging elections

* Fixed HiddenWithoutEspionage

* Added Constabulary and Police Station

* Added cityFilter to SpyEffectiveness

* Added national Intelligence agency

* Added Great Firewall

* Fixed great firewall having a float value

* EspionageManager addSpy now returns Spy instead of name

* Added some simple espionage tests

* Fixed OneTimeSpiesLevelUp still wanting parameter

* Spy efficiency occurs after skill modifier

* Added another test

* Added Police State spy efficiency reduction unique

* Fixed "Hidden when espionage is disabled" wording

* Fixed "effectiveness" wording

* Changed "enemy spy effectiveness" unique to use negative matters

* Spy effectiveness only affect tech steal rate

* Changed "Gain an extra spy" and "Promotes all spies" uniques

* Removed Police State comment that is no longer accurate

* Changed spy effectiveness to be multiplicative
2024-04-09 23:12:21 +03:00
d1606cdcb9 Added triggerable unique to remove policy (#11405)
* Added triggerable unique to remove policy

* Revert a completed branch to incomplete state

* Fixed grammatical error
2024-04-07 11:28:25 +03:00
cc45cefb99 Work boat construction automation tweaks (#11395)
* Minor lint and optimize addWorkBoatChoice

* Moddable findTileWorthImproving search distance

* Don't count bonus resources outside any city work range as worth improving

* Look for existing work boat in a fixed radius instead of city-owned tiles, depending on work boat speed

* Some UnitMovement readability

* Work boat construction and automation code synergies
2024-04-07 11:27:12 +03:00
3ea1e4a539 Allow for replacement improvements (#11369)
* Allow for replacement improvements

* imports

* Forgot the most important change, lol

* Docs

* Replacement description, validation, and filter

* Move more into ImprovementDescriptions

* Whoops, forgot to yield

* Fix some copy-paste artifacts

* New translations

* Fix double see also

* Add space for translation engine
2024-04-04 23:39:44 +03:00
0caf0cb4fa Add configurable natural wonder discovery stat bonuses (#11249)
* Added configurable natural wonder discovery stats

* Shortened the code

* Updated the base rulesets with new unique

* Updated the El Dorado unique

* Applied the suggestions

* Reintroduced the implementation for deprecated uniques

* Changed tile.naturalWonder to naturalWonder
2024-04-04 23:39:31 +03:00
c2a2bcb417 4.11.0 2024-04-01 14:22:17 +03:00
5e89e2f46d Countable comparison conditional uniques (#11308)
* Added the countable comparison conditional uniques

* Applied the suggestions of yairm

* Minor wording change
2024-04-01 12:01:20 +03:00
30b983c0c1 Updated how manual mod copying actually works on Android 2024-03-18 22:12:56 +02:00