* Prepare Leader Voices: Framework
* Leader Voices: Hooks and corresponding text field comments
* Leader Voices: wiki
* Leader Voices: oops, comments
* Decouple voice play calls to make global modification easier
* Move voices to own folder and give them a separate volume setting
* Oops, template needed too
* Oops, wiki needed too
* UncivGame is a pure class file again, GUI split off
* Purify GameSettings step 1 - non-multiplayer nested classes
* Purify GameSettings step 2 - multiplayer nested classes
* Purify GameParameters - BaseRuleset to own file
* Rework WindowState to centralize minimum/maximum treatment
* Rename MultiplayerTurnNotifierDesktop to UncivWindowListener
* Clarifications on what the WindowListener actually does (and now the attention-getting does something on non-Windows too)
* Change "took tile damage" notification to select the poor victim
* Convenience constructor for NotificationAction:MapUnitAction
* More verbose Kdoc for MapUnitAction
* Merged Original AIDiplomacyBalancing changes to this branch
* Fixed being over supply resulting in the civ not attacking
* Fixed "War with allies" motivation not being added
* Drop AndroidTvLauncher - unused
* Additional memory info on Android CrashScreen
* Refactor getModsAndBaseRuleset - reduce clones and put base first
* Add Permanent audiovisual Mods to CrashScreen report
* Add a secret Debug option to intentionally crash Unciv
* Make "Secret" debug OptionsPopup page available on Android w/o physical keyboard
* Add AndroidTvLauncher back in
---------
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
* Refactor: move UI functions from Building to BuildingDescriptions
* Move Nation "unique building" diff code to BuildingDescriptions, fix hidden ignore, equalize to how BaseUnitDescriptions.getDifferences works
* Fix translation errors for difference description "Lost ability"
* River yields moddable and Civilopedia entry
* Improve text and better fresh water explanations
* Map editor exclusion as Unique, for River and previously hardcoded Improvements
* Map editor brush to Civilopedia link, starting locations cleaned
* Some SeventhM input applied
* Reword River/Lakes/Oasis civilopediaText and comments again
* Let WorldScreenTopBarStats scale itself down when content exceeds available width
* Refactor scale mapper functionality into reusable ScalingTableWrapper
* Use ScalingTableWrapper on WorldScreenTopBarResources too
* Oops, they're now equal, but technically it should be prefWidth now, and the comment is moot
* Added Human and AI filters, separated civFilter from nationFilter (very similar and yet slightly different)
* Changed "Human" and "AI" to "Human player" and "AI player"
* Fix "AskForAssistance" Quest notification untranslatable
* Extend DiplomacyAction to allow showing the TradeTable of the other civ
* Make "trade ends" notifications clickable
* Make entries in Trade page of Empire Overview clickable
* Highlight selected civ in DiplomacyScreen, moddable
* A little proactive comment
* Completely rewrote settler settle logic
* Added back original file to eligible locations
* Improved settling
* Fixed not finding cities in range
* Fixed settle AI not filtering impassible tiles.
* Fixed the possibility that there is no best tile within range.
* Fixed minimum city range being to low and causing an error
* Found the real fix for when there is no path to a tile to settle
* Adjusted tile ranking values
* Inverted sorting order to be from highest to lowest
* Fixed using tile instead of rankTile
* Fixed settle AI only looking at the current tile
* Changed behavior of settle AI at the start of the game
* Reduced the impact of being near a city
* Evaluation now assumes that a lighthouse is build while on a coast
* Settle highlight now sorts correctly
* Changed the weight of being near a city again
* Settle AI now prefers moving to the best tile when no viable tiles were in close distance
* Fixed an annoying bug where the settle does not value a city consistently for ranking
* Fixed a newer version of the unreachable tile error again
* Increased the distance to consider cities by one
* Tiles to settle now do not contain duplicate unique luxury resource values
* Increased coast tile value
* Removed only AI benefiting from ranking unexplored tiles
* Changed nearbyCities.any to a for loop
* Changed filter and sorting order
* Move rankTile to its own function
* Moved valuing tiles by distance to city to its own function
* Filtering tiles now creates a new map
* First settler no longer explores for a better location
* Removed bestTile rank from the return
* Changed BestTilesToFoundCity to return a separate class holding the return data
* Removed some trailing whitespace
* RekMod-inspired: StatPercentFromReligionFollowers does work on FounderBelief target
* RekMod-inspired: Make StatPercentFromReligionFollowers check correct Religion
* RekMod-inspired: Prep: flags on ImprovementBuildingProblem
* RekMod-inspired: Don't offer e.g. Kampong Ayer to non-Brunei Workboats
* Update "filtering Uniques" documentation
Each error has in fact 2 determiners: What the error *severity* is (probably ok, warning, error) and what the *scope* is (error regardless of what ruleset we're in, error because of the specific ruleset)
Having the warning be as part of the scope is...problematic, but that's for phase 2, this is just a rename
* Added AI Unit retreat behaviour
* Reduced highest value to allow for variation
* Fixed distance calculations
* Tiles farther away are now checked first
* Units no longer try to retreat when at a far distance
* Changed unit priority values to account for unit health for retreating
* Units don't retreat while at peace
* canUnitSwapToReachableTile no longer removes the units from their tiles.
* Decreased retreat trigger range
* Renamed tryRetreat to trySwapRetreat to match its current functionality
* Allow typing Y and N in file names in Linux custom save file dialog
* Fix default custom save location suggestion on X11
* Minor linting
* Allow clean reactivation of custom buttons after cancelling the file chooser
* User-Cancel support on Android and non-X11 desktop
* Block custom save for online multiplayer games
* Fix X11 custom save remembering location
* Fix X11 custom save "Save" button enabling, forbid potentially bad names
* Add overwrite confirmation to X11 custom save
* Redefine how local saving of online multiplayer games is blocked
* Verbose exception for the original RekMod's Civilian crash
* Make ConstructImprovementInstantly validation gameInfo-agnostic
* Helpers to encapsulate repetitive Conditional test patterns, eliminating ruleset(), all ruleset access guarded
* Make ConditionalFirstCivToResearch actually work on Policies - ???
* Linting
* Revert params accessor helpers and reduce ConditionalFirstCivToResearch to tech only
* Implement ConditionalFirstCivToAdopt for nicer symmetry
* Fixed cities being sold for at most 1000 gold
* Replaced evaluateBuy/SellCost with evaluateBuy/SellCostWithInflation
* Fixed goldInflation being multiplied instead of divided
* Increased inflation modifier, lowering it's impact
* Changed inflation values to be lower
* Moved return value to be inline again (it was moved for testing)
* Added two new Conditional Uniques
These are:
- <when above [amount] gold>
- <when below [amount] gold>
* Added Remove Building unique
It has two parameters: buildingFilter and cityFilter
* Minor example update
* Applied the corrections proposed by SomeTroglodyte
* Update uniques.md
* Slightly changed an unique text
Removed "in" word from the unique
* Updated the Stat Conditional to support more stats
Now supports more stockpileable Stats
- Gold
- Faith
- Culture
- Science
* Added the game speed-adjusted conditionals
Now there are 5 uniques in my pull request
* Integrated the Stat and Resource Conditionals
Requested by @yairm210
* Applied the suggestions of @yairm210
* Applied the suggestions of @yairm210 again
I hope my PR is ready to merge
* Bump version and create initial changelog entry
* Update Catalan.properties (#10310)
* Fix Manufactory name (#10306)
* Fix Manufactory name
Like, why on earth was it called the same as the factory??
* Update Spanish.properties
* Update Spanish.properties
* Update Japanese.properties (#10269)
* Update Japanese.properties
* Update Japanese.properties
---------
Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Joan Josep <juanjo.ng.83@gmail.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: North Field <56919414+Harukin1030@users.noreply.github.com>
* Fix consuming resources not being affected by condtionals
* Add requirements from buildings back in
* one too many parenthesis
* Whoops, forgot a bracket
* Fix Iconstruction
* Accidental font regression
* Address suggested changes
* Fix font "symbols" not showing
* Move Fonts.kt to sub-package
* Re-sort imports
* Move top-level constants to prepare split
* Split Fonts.kt each existing class to its own file
* Split off FontRulesetIcons
* Linting and comments
* Try to respect actual font layout, so fontSizeMultiplier works for ruleset icons too
* Replace font-based nation symbol in top bar with statically sized actor
* Reuse getReadonlyPixmap in extractPixmapFromTextureRegion
* Tweak topbar selected civ vertical align to be more pleasing to the human eye
* FasterUIDevelopment missing implementation of FontMetricsCommon
* Address hardcoded pixel coordinates comment
* Readability and comment cleanup
* More readability changes
* Extend MusicController to allow one extra 'overlay' track
* Reduce CityAmbiencePlayer to a proxy for MusicController's 'overlay'
* Treat all the LongLine complaints
* Test Free Buildings
* Flip the order of logging free buildings to avoid loops with stat buildings
* unprivate constructionComplete for the notification and add validating the queue to addBuilding
* reimplement #10142
* Switch free buildings in cityFilter to also use constructionComplete for consistency
Problem was that updating the select box was inconsistent
Simplified by
- Separating 'do we have maps' and 'do we have recent maps' logic from the loading of all maps
- Map loading done in one continuous thread not one-per-map
- Only the map-loading thread triggers selectbox load
* Bump version and create initial changelog entry
* Update Spanish.properties (#10201)
I'm not sure about using an '@' for indicating both grammatical genres.
I mean, the current use is not wrong, but it bothers me that something's genres are feminine/masculine and the article used is the opposite.
On the other side, I don't know if it looks clean, nice or professional to use these variants, not only the '@', but the '/a' as well.
But it really calms my mind.
* Add required Russian translations (#10200)
* Update Bulgarian.properties (#10193)
* Update Italian.properties (#10191)
* Update Italian.properties
* Update Italian.properties
* Update German translation (#10189)
* Update Brazilian_Portuguese.properties (#10188)
* Update Polish.properties (#10186)
* Update Polish.properties
* Update Polish.properties
* Update French.properties (#10185)
* Update Simplified_Chinese.properties (#10184)
6365 rows. The value is wrong. "Units heal 10 health per turn in enemy territory or neutral land" should translate to "在异国领土和无主的领土上,每回合会恢复10点生命值" and not "在异国领土和无主的领土上,每回合会恢复15点生命值"。
---------
Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Nicolas Flamme <nclsf87@gmail.com>
Co-authored-by: Dob <100198047+dobval@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: mape6 <mape6@posteo.de>
Co-authored-by: Vitor Gabriel <59321138+Ranbut@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: liweishu <44702553+liweishu@users.noreply.github.com>
* Display Pixel Unit Art in Civilopedia
* Pixel Unit Art in Civilopedia - Setting UI
* Change FormattedLine.extraImage sizing to apply to longer coordinate
* Pixel Unit Art in Civilopedia - better centering using 'crop to content'
* Fix topbar layout never going back to default un-moved floating buttons
* Tweak topbar resources layout so the half-moved floating buttons triggers earlier, and swap turns label back to the left
* Apply conditionals for free buildings to the destination city instead of the originating city
* Attempt 1 at addressing issues
* Forgot matching uniques for cities
* Forgot import
* Remove the intended(?) non functional removal of free buildings on capture
* More SortableGrid comments
* Fix City Overview header row
* CityOverviewTab minor lint
* Documentation for the 'Gdx Scene2D debug' option
* Lint - TabbedPager sort imports and some spaces
* Giant refactoring - get rid of old religion style actions!!!
* Added special promotion to replace Great Mosque of Djenne ability
* removed double promotion added my mistake
* Added AI recognition of cities with bonus spread religion charges
* Added "disallowed for pantheon" filtering to new unit actions
* merge unit action changes with religion action changes
* Use new invokeUnitAction function for simplicity
* revert inquisitor unique change used for tests
* separate modifier side effects from old-style side effects
* Use canUSe shorthand for clarity
* Bump version and create initial changelog entry
* Update Dutch.properties (#10174)
* Update Turkish.properties (#10171)
* Update Turkish.properties
Almost fully translated up to line 950 with very few lines untranslated to that point.
(do let me know if I did anything wrong I never used github before)
(but I did read the translating text so I did not change things like [amount])
* Update Turkish.properties
Changed a few things and translated up to 1000~
* Update Turkish.properties
* Update Turkish.properties
* Update Turkish.properties
* Update Simplified_Chinese (#10168)
* Update Spanish.properties (#10166)
* Update French.properties (#10165)
* Update Polish.properties (#10164)
* Update Italian.properties (#10163)
* Update Brazilian_Portuguese.properties (#10162)
* Update Brazilian_Portuguese.properties
* Update Brazilian_Portuguese.properties
---------
Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Lena Bullens <95299589+LenaBullens@users.noreply.github.com>
Co-authored-by: TheFighter <95092927+The-Fighter@users.noreply.github.com>
Co-authored-by: chr_56 <30681738+chr56@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Lesiakower <125187776+Lesiakower@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>
* Increased declined flags time
* AI now only offers open borders if it has the relevant technologies
* Increased the factor of AIs wanting to fight instead of sign open borders
* Added notifications to Civs that didn't have tiles hit by nuke
* Changed notifications based on if the nuke fails to detonate
* Moved nuke notifications above unit hit notification
* Added translations for new messages
* Moved a line of code back to preserve original order
* Changed notification messages
* Reorganize WorldScreenTopBar and change its update to rebuild the cells instead of tweaking layout
* Fix layout error: filler backgrounds looking too small
* AI now can offer declaration of friendship
* AI now offers open borders
* Added spectator notifications for DoFs and defensive pacts
* AI now wants friendship less as more Civs die
* Re-added spectator notifications that weren't added in the merge
* Replaced min with coerceAtLeast
* Replaced .filter and .count() with .count
* Removed some minus DoF motivation modifiers being in a military focus.
* Fixed AI offering open borders with City-States
* AI now signs defensive pacts
* Increased motivationToAttack weight when determining value of a declaration of friendship
* Removed double trade processing and notifications from Treaties
* Removed commented code
* Added wantsToSignDefensivePact
* Added defensive pact trade evaluation
* Revert "Removed commented code"
This reverts commit 6476a08d26.
* Revert "Removed double trade processing and notifications from Treaties"
This reverts commit 371e8e8a62.
* Changed wantsToSignDefensivePact to use a for loop
* Changed chance to consider offering a defensive pact back to 30%
* Added DeclinedOpenBordersFlag
* Added DeclinedDeclarationOfFriendshipFlag
* Civ AI now has a positive modifier when friends with under 1/4 of alive Civs
* AI values friendship based also on relative strength
* Changed AI valueing of a defensive pact
* AIs not use DeclinedDeclarationOfFriendship flag
* Fixed otherCivNonOverlappingDefensivePacts causing error with unmet Civs
* Avoid the detekt false positive for typed lambda `it` and its comment
* Fix regression of what-is-a-garrison (8952)
* Initial implementation of "Status" column
* "Status" column gets a header icon
* Improved handling of "Nothing" construction
* Suppress "All" entries when you have only one city
* Global Construction Blacklist
* Reviews
* Reviews - missed renames
* A few yield extensions - use in existing code to do later
* Refactor getFreeBuildings to allow hasFreeBuilding not enumerating all
* Prevent selling free buildings - with a little easter egg
* Test translatability
* Shift "Free Building" methods towards preferring object parameters
* Remove easter egg
* Linting and improving Kdoc precision
* Linting and improving Kdoc precision: CityConstructions
* Convert stack overflow into explicit exception when a mod has recursive unit upgrade/replaces
* RulesetValidator detects recursive unit upgrade/replaces
* Override DoF displayed on Politics table with defensive pact when applicable and added CYAN color to table and diagram.
* City-state alliances now show as CYAN in the politics table
* ♻️ merge together two branches executing same code
* ♻️ swap if-else chain with when to improve readability
* ⚡️ swap conditions to first check the lighter computationally-wise
* ♻️ extract method to increase readability
* 💚 add some tests for TargetHelper
* 💡 add comment explaining how Unciv grid system works using a graphical example
* 💚 add other tests
* ♻️ change method name to better reflect what it does
* 🐛 fix import after rebase
* 🔥 remove parameter when value is the default and use static field for Vector2(0f, 0f)
* ♻️ split setTileTerrainAndFeatures in two different methods
* ♻️ update older tests to use the new functions
* Fixed Civ getting two notifications of canceling their defensive pact when attacking.
* Added Defensive Pact related warnings to the Declare War popup
* Improved the warning to not include Civs that are already at war with the aggressor
* Improved the warning to not include Civs that are already at war with the aggressor
* Added defensive pact related warning translations
* Refactored removeDefensivePacts
* DeclareWarButton text now uses arrayListOf<String> and changed the for loop to a while loop
* Extracted the DeclareWarButton text to a new method.
* Fix UniqueType.ChangesTerrain not working for base terrain parameter
* Fix spawnRiver resultingTiles to include all affected tiles on both sides of the River
* Fix terrain conversion for rivers from Map Editor partial generation / paint from-to
* forEach linting
* Instrumentation for generateSingleStep
* forEach linting
* Remove lazies
* Some preparation refactoring
* Some preparation API extension
* Initial constructions context menu
* More CityConstructions API clarification
* Templates and KeyBindings
* Fix quirks and prettify highlighting issues
Big DUH moment, we've been applying this same trick everywhere but haven't generalized it yet...
This will both make performance improvements easier, AND improve readability!
- Cache civ uniques ignoring conditionals, for better reuse
- Cache civ uniques *when querying city uniques*, same
This allows us to use the same UniqueCache between cities, and we still get the performance boost of "search once filter always", since the searching is the heavier part, and in any case we'll always have to do the filtering by conditionals either way
* Added "Jump To Destination" UnitActionButton for moving unit
This commit also fixes the situation where the player is unable to open the Show More unit actions list while the unit is moving and out of moves for the turn. Previously, clicking Show More in this scenario would jump to the next active unit.
* Added Jump To Destination to translation file
* Changed Jump to Destination to Show Unit Destination, updated icon, credits
* 💡 add some comments providing examples
* ♻ refactor getGeneralModifiers to increase readability
* ♻ refactor getAttackModifiers to increase readability
* 🏗 move constants expressed as magic number to separated class to increase maintainability and expressivity
* ♻ invert condition to remove continue statement and simplify code
* 💚 add some tests for battle damage class
* Fix promotions being available when they shouldn't
* Move unreachable code to the bottom
* Remove unnecessary comment
* Details for adopted nodes technically shouldn't be overriden
* Add back in unreachable before we do checks
* Just realized we're back to square one. Here's an actual fix