* 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
* 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
* 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>
* 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
* 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
* Improved AirUnitAutomation
* UnitPriority now has special cases for air units
* Fighters now Air-sweep
* Added extra air sweep logic
* Moved airSweepDamagePercentBonus to AirUnitAutomation.kt
* 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
* 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
* 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
* 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()
* 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
* 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
* 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