* Added ConditionalWhenBetweenStatResource unique
* Currently the ConditionalBetweenHappiness function only applies to Happiness. Wouldn't it be more better if it could also be extended to other stats and resources. 😊
* Resolved the issue with ConditionalWhenAboveStatResource, ConditionalWhenBelowStatResource, and their modified speed versions not functioning properly on city-level stats (food & production).
This new unique has been tested using the following examples:
1. In GlobalUniques.json:
- "[+12]% [Gold] [in all cities] <when between [1] to [100] [Gold]>",
- "[+24]% [Gold] [in all cities] <when between [1] to [100] [Gold] (modified by game speed)>",
2. In Buildings.json:
- "[+12]% [Production] [in this city] <when between [1] to [5] [Production]>",
- "[+12]% [Food] [in this city] <when between [1] to [5] [Food]>",
* Update uniques.md
* Correct english mistake of the new unique
* Refactor checkResourceOrStatAmount function
* Unified all related functions into one
* 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
* Terraforming!
* comment
* whoops
* And better tests, that actually output text.
* SomeTrog caught this doc error :)
* Fix natural wonder placement, it better belongs with base terrain
Also, normalize tiles to ruleset after plonking a new terrain
* Out Of Cheese Error, Redo From Start
- Only terrains, no improvements - one problem at a time
- Fit new functional trigger format
- Respect occursOn
- Teleport units out of tiles if they can't pass through (nat wonders for example)
- No need for terrainFeature unique parameter
- Tested with "Turn this tile into a [Grand Mesa] tile <for [0] movement>", "Turn this tile into a [Forest] tile <for [0] movement>" uniques
* Don't allow city tiles to turn into water/wonders etc kudos @SomeTrog
* Documentation for Personality json
* whoops, bad link
* Fix inaccurate "double focus" comment
* Fix accidental copy-paste error
* Edit priority text to maybe be clearer
* 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
* Add additional cityFilters
* Maybe viewingCiv shouldn't be null
* Studio complains it is unnecessary now
* I'm doomed to forget imports
* Ignore this
* typo
* 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
* 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
* 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
* 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
* xpForNewUnits is not used anymore
* Adding links to json files
* Redid some tables (TODO)
* Deprecate cannotBeBuiltWith
* Update 2-Civilization-related-JSON-files.md
Standardised uniques link and description
Miscellaneous changes to grammar to be consistent
* First round of amendment
Fixed up some links
Made grammar more consistent
Removed deprecated `effect` from ModOptions.json
Added CityStateTypes.json
* Second round of amendment
Made grammar more consistent
Changed `Optional` header to `Default`
Removed tabs from json code
Changed all stats to a `<stats>`
* Undid accidental replacement
* Undid accidental replacement
* Made list more consistent
* Rewrote policy branch and turns in eras.json
* Third round of amendment
Split stats
Fixed a couple of stuff idk tbh
* Added stats
* Added nationFilter
* Final amendment
* Adding markdown table format based on suggestion
* Fixed errors/suggestions based on reviews
changed building.cost default to be -1
added footnotes for improvements instead of list
removed faith from unit.hurryCostModifier
removed assosciation of nationFilter with civFilter
* 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>
* 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
* Tweaked the stat gamespeed conditional
Tweaked the stat gamespeed conditional to accept the resources
* Changed some names
* Fixed a double limit bug
* Added a frigate cannon fire volley sound with crashing
* Changed the frigate and ship of the line to use shipCannonVolley.mp3
* Added proper credits
* Renamed "Volly" to "Volley"
* Start on road connect feature.
* Rough UI and tile highlighting
- Highlight visible tiles for selected unit red
-- Maybe change this to all explored tiles
- Move action firing inside WorldMapHolder
- Set begin and end tiles
* Serialize Vector2 instead of Tile
* Add road icon
* Much better UI handling
- Tile highlights go away after choosing a tile
- Added restrictions to allowed tile destination choices.
- Explored
- Land
- Passable
- Added two-tap button
* Refactor part of `onTileClicked` for readability
* Band-aid fix null pointer error
* Add RoadConnection icon
* Tentatively working connect road feature
* AStar search implementation
* AStar connect road automation
* Fix worker getting stuck in city tiles
* Heuristic should be between tiles
* Add heuristic to road connect, remove maxSize limit
* Fix predicates
* Cancel automation when worker is force moved off path
* Change valid/highlighted tiles to be friendly or neutral
* Put log back the way it was
* Fix behavior when kicked off path
* Worker no longer wastes movement points
* Workers will progress multiple tiles at a time towards the next build destination.
* Respect civs with certain tiles as roads
* Refractor ForceAutomateRoadConnection -> AutomateRoadConnection
* Connect road UI button only shows for units with UniqueType.BuildImprovements
* Connect road UI button only show when road tech is unlocked
* Add wagon sound
* Fix destination icon, add KeyboardBinding to 'c'
* UI highlight connect road path tiles orange
* Downsample wagon.mp3
* Apply migration patch, idiomatic sequence processing
* Add notifications on success and failure
* Extract movement cost function to be reusable
* Refactor road pathfinding into MapPathing.kt
* Make pathing calls more general for future extendability
* Add UI road connection tile path preview
* Keep road path highlighting when routing to a city tile
* Adjust road pathing cost function
* Path includes pillaged roads
* Repair pillaged roads along path
* Valid road path tiles now include all passable tiles (open borders)
* Ruleset-validate some Unique amounts to be positive
* Add TechAction for tech gained from Ruins
* Allow PolicyPickerScreen to highlight a Policy
* Add the 'PolicyAction' NotificationAction
* Use the new PolicyAction
* 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
* 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
* 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
* 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
* 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
* 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
* 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'
* 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
* 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
* Victory Screen Illustrations page
* Fix WorldReligion victory disclosing random player count
* Victory screen icons and Victory types get their separately moddable path
* Merge fix and nicer wiki text
* VictoryScreenIllustrations debug run
* Fix Image sizing and some polishing
* Fix white squares on some Victory Screen Cultural milestone buttons
* Defensive Pacts can now be offered.
* Signing a defensive pact now makes the Civs join all defensive wars. Any future defensive wars will force the other civ to join.
* Removed Popup Alert Defensive Pact.
* Defensive pact and Research pact now are only on the trade screen.
* AI now offers defensive pacts.
* Added AI evaluating sending and receiving Defensive Pact offers.
* Reverted some temporary changes
* Reduced the chance an AI offers a defensive pact
* Starting an offensive war now cancels all Defensive Pacts with other civilisations.
* Removed extra requirements before an AI will sign or offer a defensive pact.
* Added Defensive Pacts to the Civilopedia.
* Fixed the AI counter offering with treaties.
* Fixed a test using the old method of checking if a civ is at war.
* Fixed a previous refactor error.
* Deleted commented out Research Agreement button code.
* Fixed some spelling errors and remnant debugging code.
* Removed signing a defensive pact brings both Civ's into each others previous defensive wars.
* Refactored setFriendshipBasedModifier to look better
* Starting an offensive war now removes the defensive pact form both sides.
* Reverted changes to DiplomaticStatus
* Removed extra technology check to sign a defensive pact.
* Removed DiplomacyManager.isAtWar() completely.
* Moved setting defensivePact flags from TradeLogic.transferTrade() to DiplomacyManager.signDefensivePact.
* Changed diplomatic modifiers related to Defensive Pacts to be less extreme.
* Fixed canceling Defensive Pacts when declaring war and notifying other Civs.
* Updated the Defensive Pact entry in the Civilopedia and fixed some spelling.
* Fixed Defensive Pact behavior while attacking and defending.
* Changed a variable to a more readable name.
* Improved readability of setFriendshipBasedModifier().
* Moved the important onWarDeclared functionality to their own functions.
* Added a notification for the attacking Civ when a Civ joins war through a Defensive Pact.
* Refactored setDefensivePactBasedModifier() to be more readable.
* Increased DeclinedDefensivePact time.
* Deleted old commented code that removed the research agreement button.
* Fixed having reverting changes errors in UnitMovementTests.
* Refactored breaking treaties when declaring war.
* Removed unnecessary semicolons.
* Treat remaining untyped Uniques in default rulesets, make unit test catch them
* Change untyped filtering Uniques check to Validation by inclusion in GlobalUniques instead of UniqueType.AircraftMarker
* Wiki for untyped filtering Uniques
* Re-include the "Who knows" of Future Tech on the Tech picker
* Overhaul NUKE code to behave closer to original
* Separate garrison protection of Bomb Shelter to its own Unique
* Reduce code duplication: getNukeBlastRadius
* Disallow nuking unknown civs
* Don't show Nuke attack table when the Nuke has just been selected
* World map display of nuke blast radius and friendly fire
* Reduce conversion of local mod folder names to treat only ending spaces/dashes
* Wiki entry for GlobalUniques
* Missing originRuleset coverage
* Nicer RulesetValidator messages when name or originRuleset are missing
* Allow a few working UniqueType-UniqueTarget combos in RulesetValidator
* RulesetValidator checks GlobalUniques
* Alternate Settlers and Workers recognized via Unique - same rules in RulesetValidator and GameStarter, wiki clarification