* 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
* 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
* 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
* 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
* 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
* 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
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.
* 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
* 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
* 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>
* 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
* 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
* 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
* 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>
* 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
* 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>
* 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
* 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