Added unique documentation generation when running from Android Studio :)

This commit is contained in:
yairm210 2021-11-22 20:49:31 +02:00
parent 532f42365c
commit 4617bc21a7
3 changed files with 804 additions and 0 deletions

View File

@ -43,6 +43,10 @@ internal object DesktopLauncher {
val versionFromJar = DesktopLauncher.javaClass.`package`.specificationVersion ?: "Desktop"
if(versionFromJar == "Desktop") {
UniqueDocsWriter().write()
}
val desktopParameters = UncivGameParameters(
versionFromJar,
cancelDiscordEvent = { discordTimer?.cancel() },

View File

@ -0,0 +1,19 @@
package com.unciv.app.desktop
import com.unciv.models.ruleset.unique.UniqueType
import java.io.File
class UniqueDocsWriter {
fun write() {
val lines = ArrayList<String>()
for (targetType in UniqueType.values().groupBy { it.targetTypes.first() }) {
lines += "## " + targetType.key.name + " uniques"
for (unique in targetType.value) {
lines += "#### " + unique.text
lines += "Applicable to: " + unique.targetTypes.joinToString()
lines += ""
}
}
File("../../docs/uniques.md").writeText(lines.joinToString("\n"))
}
}

781
docs/uniques.md Normal file
View File

@ -0,0 +1,781 @@
## Improvement uniques
#### [stats]
Applicable to: Improvement, Global, FollowerBelief
#### Provides [amount] [resource]
Applicable to: Improvement, Building
#### Can also be built on tiles adjacent to fresh water
Applicable to: Improvement
#### [stats] from [tileFilter] tiles
Applicable to: Improvement
#### [stats] on [tileFilter] tiles once [tech] is discovered
Applicable to: Improvement
#### [stats] once [tech] is discovered
Applicable to: Improvement, Building
#### [stats] for each adjacent [tileFilter]
Applicable to: Improvement
#### Can be built outside your borders
Applicable to: Improvement
#### Can be built just outside your borders
Applicable to: Improvement
#### Cannot be built on [tileFilter] tiles until [tech] is discovered
Applicable to: Improvement
#### Cannot be built on [tileFilter] tiles
Applicable to: Improvement
#### Does not need removal of [tileFilter]
Applicable to: Improvement
#### Gives a defensive bonus of [amount]%
Applicable to: Improvement
#### Costs [amount] gold per turn when in your territory
Applicable to: Improvement
#### Deal [amount] damage to adjacent enemy units
Applicable to: Improvement
#### Deal 30 damage to adjacent enemy units
Applicable to: Improvement
#### Great Improvement
Applicable to: Improvement
#### Provides a random bonus when entered
Applicable to: Improvement
#### Unpillagable
Applicable to: Improvement
#### Indestructible
Applicable to: Improvement
## Global uniques
#### [stats] [cityFilter]
Applicable to: Global
#### [stats] if this city has at least [amount] specialists
Applicable to: Global
#### [stats] from every specialist [cityFilter]
Applicable to: Global
#### [stats] from every specialist
Applicable to: Global
#### [stats] per [amount] population [cityFilter]
Applicable to: Global
#### [stats] in cities with [amount] or more population
Applicable to: Global, FollowerBelief
#### [stats] in cities on [terrainFilter] tiles
Applicable to: Global, FollowerBelief
#### [stats] per turn from cities before [tech/policy]
Applicable to: Global
#### [stats] whenever a Great Person is expended
Applicable to: Global
#### [stats] from [tileFilter] tiles [cityFilter]
Applicable to: Global
#### [stats] from [tileFilter] tiles without [tileFilter] [cityFilter]
Applicable to: Global, FollowerBelief
#### [stats] from every [tileFilter/specialist/buildingName]
Applicable to: Global, FollowerBelief
#### [amount]% [stat]
Applicable to: Global
#### [amount]% [stat] from City-States
Applicable to: Global
#### [amount]% [stat] [cityFilter]
Applicable to: Global
#### +[amount]% [stat] [cityFilter]
Applicable to: Global
#### +[amount]% [stat] in all cities
Applicable to: Global
#### [amount]% [stat] while the empire is happy
Applicable to: Global
#### [amount]% [stat] from every follower, up to [amount]%
Applicable to: Global, FollowerBelief
#### [amount]% Production when constructing [buildingFilter] wonders [cityFilter]
Applicable to: Global, Resource, FollowerBelief
#### [amount]% Production when constructing [buildingFilter] buildings [cityFilter]
Applicable to: Global
#### [amount]% Production when constructing [baseUnitFilter] units [cityFilter]
Applicable to: Global
#### +[amount]% Production when constructing [stat] buildings
Applicable to: Global
#### +[amount]% Production when constructing [constructionFilter]
Applicable to: Global
#### +[amount]% Production when constructing a [buildingName]
Applicable to: Global
#### +[amount]% Production when constructing [constructionFilter] [cityFilter]
Applicable to: Global
#### +[amount]% Production when constructing [baseUnitFilter] units [cityFilter]
Applicable to: Global
#### [amount]% unhappiness from population [cityFilter]
Applicable to: Global
#### Unhappiness from population decreased by [amount]%
Applicable to: Global
#### Unhappiness from population decreased by [amount]% [cityFilter]
Applicable to: Global
#### Military Units gifted from City-States start with [amount] XP
Applicable to: Global
#### Gifts of Gold to City-States generate [amount]% more Influence
Applicable to: Global
#### Can spend Gold to annex or puppet a City-State that has been your ally for [amount] turns.
Applicable to: Global
#### City-State territory always counts as friendly territory
Applicable to: Global
#### Allied City-States will occasionally gift Great People
Applicable to: Global
#### [amount] units cost no maintenance
Applicable to: Global
#### [amount]% maintenance costs for [mapUnitFilter] units
Applicable to: Global
#### -[amount]% [mapUnitFilter] unit maintenance costs
Applicable to: Global
#### -[amount]% unit upkeep costs
Applicable to: Global
#### [amount]% growth [cityFilter]
Applicable to: Global, FollowerBelief
#### +[amount]% growth [cityFilter]
Applicable to: Global
#### +[amount]% growth [cityFilter] when not at war
Applicable to: Global
#### Gain a free [buildingName] [cityFilter]
Applicable to: Global
#### Provides a free [buildingName] [cityFilter]
Applicable to: Global
#### May choose [amount] additional [beliefType] beliefs when [foundingOrEnhancing] a religion
Applicable to: Global
#### May choose [amount] additional belief(s) of any type when [foundingOrEnhancing] a religion
Applicable to: Global
#### [amount]% food consumption by specialists [cityFilter]
Applicable to: Global
#### -[amount]% food consumption by specialists [cityFilter]
Applicable to: Global
#### [amount]% of excess happiness converted to [stat]
Applicable to: Global
#### 50% of excess happiness added to culture towards policies
Applicable to: Global
#### May buy [baseUnitFilter] units for [amount] [stat] [cityFilter] at an increasing price ([amount])
Applicable to: Global
#### May buy [buildingFilter] buildings for [amount] [stat] [cityFilter] at an increasing price ([amount])
Applicable to: Global
#### May buy [baseUnitFilter] units for [amount] [stat] [cityFilter]
Applicable to: Global, FollowerBelief
#### May buy [buildingFilter] buildings for [amount] [stat] [cityFilter]
Applicable to: Global, FollowerBelief
#### May buy [baseUnitFilter] units with [stat] [cityFilter]
Applicable to: Global, FollowerBelief
#### May buy [buildingFilter] buildings with [stat] [cityFilter]
Applicable to: Global, FollowerBelief
#### May buy [baseUnitFilter] units with [stat] for [amount] times their normal Production cost
Applicable to: Global, FollowerBelief
#### May buy [buildingFilter] buildings with [stat] for [amount] times their normal Production cost
Applicable to: Global, FollowerBelief
#### May buy [baseUnitFilter] units for [amount] [stat] [cityFilter] starting from the [era] at an increasing price ([amount])
Applicable to: Global
#### [mapUnitFilter] units deal +[amount]% damage
Applicable to: Global
#### +10% Strength for all units during Golden Age
Applicable to: Global
#### [amount]% Strength for [mapUnitFilter] units in [tileFilter]
Applicable to: Global
#### +15% Combat Strength for all units when attacking Cities
Applicable to: Global
#### Increases embarked movement +1
Applicable to: Global
#### +1 Movement for all embarked units
Applicable to: Global
#### +[amount] Movement for all [mapUnitFilter] units
Applicable to: Global
#### +1 Movement for all units during Golden Age
Applicable to: Global
#### [amount] Sight for all [mapUnitFilter] units
Applicable to: Global
#### [amount]% Spread Religion Strength for [mapUnitFilter] units
Applicable to: Global
#### Free [baseUnitFilter] appears
Applicable to: Global
#### [amount] free [baseUnitFilter] units appear
Applicable to: Global
#### Free Social Policy
Applicable to: Global
#### [amount] Free Social Policies
Applicable to: Global
#### Empire enters golden age
Applicable to: Global
#### Free Great Person
Applicable to: Global
#### [amount] population [cityFilter]
Applicable to: Global
#### Free Technology
Applicable to: Global
#### [amount] Free Technologies
Applicable to: Global
#### Reveals the entire map
Applicable to: Global
#### Triggers voting for the Diplomatic Victory
Applicable to: Global
#### This Unit upgrades for free
Applicable to: Global
#### This Unit gains the [promotion] promotion
Applicable to: Global
#### [mapUnitFilter] units gain the [promotion] promotion
Applicable to: Global
#### Quantity of strategic resources produced by the empire +[amount]%
Applicable to: Global
#### +[amount]% attack strength to all [mapUnitFilter] Units for [amount] turns
Applicable to: Global
#### Provides the cheapest [stat] building in your first [amount] cities for free
Applicable to: Global
#### Provides a [buildingName] in your first [amount] cities for free
Applicable to: Global
#### Immediately creates the cheapest available cultural building in each of your first [amount] cities for free
Applicable to: Global
#### Immediately creates a [buildingName] in each of your first [amount] cities for free
Applicable to: Global
## Building uniques
#### Remove extra unhappiness from annexed cities
Applicable to: Building
#### Cost increases by [amount] per owned city
Applicable to: Building
#### Cannot be built with [buildingName]
Applicable to: Building
#### Requires a [buildingName] in this city
Applicable to: Building
#### Not displayed as an available construction unless [buildingName] is built
Applicable to: Building
#### Must be on [terrainFilter]
Applicable to: Building
#### Must not be on [terrainFilter]
Applicable to: Building
#### Must be next to [terrainFilter]
Applicable to: Building
#### Must not be next to [terrainFilter]
Applicable to: Building
## CityState uniques
#### Provides [stats] per turn
Applicable to: CityState
#### Provides [stats] [cityFilter] per turn
Applicable to: CityState
#### Provides [amount] Happiness
Applicable to: CityState
#### Provides military units every ≈[amount] turns
Applicable to: CityState
#### Provides a unique luxury
Applicable to: CityState
## Nation uniques
#### Will not be chosen for new games
Applicable to: Nation
#### Receive a free Great Person at the end of every [comment] (every 394 years), after researching [tech]. Each bonus person can only be chosen once.
Applicable to: Nation
#### Once The Long Count activates, the year on the world screen displays as the traditional Mayan Long Count.
Applicable to: Nation
## Unit uniques
#### Consumes [amount] [resource]
Applicable to: Unit, Improvement, Building
#### Unbuildable
Applicable to: Unit, Building
#### Cannot be purchased
Applicable to: Unit, Building
#### Can be purchased with [stat] [cityFilter]
Applicable to: Unit, Building
#### Can be purchased for [amount] [stat] [cityFilter]
Applicable to: Unit, Building
#### Not displayed as an available construction without [buildingName/tech/resource/policy]
Applicable to: Unit, Building
#### Founds a new city
Applicable to: Unit
#### Can build [improvementFilter/terrainFilter] improvements on tiles
Applicable to: Unit
#### May create improvements on water resources
Applicable to: Unit
#### Can see invisible [mapUnitFilter] units
Applicable to: Unit
#### [amount]% Strength
Applicable to: Unit, Global
#### [amount]% Strength decreasing with distance from the capital
Applicable to: Unit
#### +[amount]% Strength
Applicable to: Unit
#### -[amount]% Strength
Applicable to: Unit
#### +[amount]% Strength vs [combatantFilter]
Applicable to: Unit
#### -[amount]% Strength vs [combatantFilter]
Applicable to: Unit
#### +[amount]% Combat Strength
Applicable to: Unit
#### +[amount]% Strength when attacking
Applicable to: Unit
#### +[amount]% Strength when defending
Applicable to: Unit
#### [amount]% Strength when defending vs [mapUnitFilter] units
Applicable to: Unit
#### +[amount]% defence in [tileFilter] tiles
Applicable to: Unit
#### +[amount]% Strength in [tileFilter]
Applicable to: Unit
#### [amount] Movement
Applicable to: Unit, Global
#### [amount] Sight
Applicable to: Unit, Global
#### [amount]% Spread Religion Strength
Applicable to: Unit, Global
#### May found a religion
Applicable to: Unit
#### May enhance a religion
Applicable to: Unit
#### Normal vision when embarked
Applicable to: Unit, Global
#### Cannot attack
Applicable to: Unit
#### Must set up to ranged attack
Applicable to: Unit
#### [amount] Visibility Range
Applicable to: Unit
#### Limited Visibility
Applicable to: Unit
#### Blast radius [amount]
Applicable to: Unit
#### Can carry [amount] [mapUnitFilter] units
Applicable to: Unit
#### Can carry [amount] extra [mapUnitFilter] units
Applicable to: Unit
#### Cannot be carried by [mapUnitFilter] units
Applicable to: Unit
#### [amount]% maintenance costs
Applicable to: Unit
#### Double movement in [terrainFilter]
Applicable to: Unit
#### Double movement in coast
Applicable to: Unit
#### Double movement rate through Forest and Jungle
Applicable to: Unit
#### Double movement in Snow, Tundra and Hills
Applicable to: Unit
#### All tiles cost 1 movement
Applicable to: Unit
#### Can pass through impassable tiles
Applicable to: Unit
#### Ignores terrain cost
Applicable to: Unit
#### Ignores Zone of Control
Applicable to: Unit
#### Rough terrain penalty
Applicable to: Unit
#### Can enter ice tiles
Applicable to: Unit
#### Cannot enter ocean tiles
Applicable to: Unit
#### Cannot enter ocean tiles until Astronomy
Applicable to: Unit
#### Never appears as a Barbarian unit
Applicable to: Unit
#### Hidden when religion is disabled
Applicable to: Unit, Ruins, Building
## Terrain uniques
#### Must be adjacent to [amount] [simpleTerrain] tiles
Applicable to: Terrain
#### Must be adjacent to [amount] to [amount] [simpleTerrain] tiles
Applicable to: Terrain
#### Must not be on [amount] largest landmasses
Applicable to: Terrain
#### Must be on [amount] largest landmasses
Applicable to: Terrain
#### Occurs on latitudes from [amount] to [amount] percent of distance equator to pole
Applicable to: Terrain
#### Occurs in groups of [amount] to [amount] tiles
Applicable to: Terrain
#### Neighboring tiles will convert to [baseTerrain]
Applicable to: Terrain
#### Neighboring tiles except [baseTerrain] will convert to [baseTerrain]
Applicable to: Terrain
#### Units ending their turn on this terrain take [amount] damage
Applicable to: Terrain
#### Grants [promotion] ([comment]) to adjacent [mapUnitFilter] units for the rest of the game
Applicable to: Terrain
#### [amount] Strength for cities built on this terrain
Applicable to: Terrain
#### Provides a one-time Production bonus to the closest city when cut down
Applicable to: Terrain
#### Tile provides yield without assigned population
Applicable to: Terrain, Improvement
#### Nullifies all other stats this tile provides
Applicable to: Terrain
#### Only [improvementFilter] improvements may be built on this tile
Applicable to: Terrain
#### Blocks line-of-sight from tiles at same elevation
Applicable to: Terrain
#### Has an elevation of [amount] for visibility calculations
Applicable to: Terrain
#### Always Fertility [amount] for Map Generation
Applicable to: Terrain
#### [amount] to Fertility for Map Generation
Applicable to: Terrain
#### A Region is formed with at least [amount]% [simpleTerrain] tiles, with priority [amount]
Applicable to: Terrain
#### A Region is formed with at least [amount]% [simpleTerrain] tiles and [simpleTerrain] tiles, with priority [amount]
Applicable to: Terrain
#### A Region can not contain more [simpleTerrain] tiles than [simpleTerrain] tiles
Applicable to: Terrain
#### Base Terrain on this tile is not counted for Region determination
Applicable to: Terrain
#### Considered [terrainQuality] when determining start locations
Applicable to: Terrain
#### Doesn't generate naturally
Applicable to: Terrain
#### Occurs at temperature between [amount] and [amount] and humidity between [amount] and [amount]
Applicable to: Terrain
#### Occurs in chains at high elevations
Applicable to: Terrain
#### Occurs in groups around high elevations
Applicable to: Terrain
#### Rare feature
Applicable to: Terrain
#### Resistant to nukes
Applicable to: Terrain
#### Can be destroyed by nukes
Applicable to: Terrain
#### Fresh water
Applicable to: Terrain
#### Rough terrain
Applicable to: Terrain
## Resource uniques
#### Appears in [regionType] regions with weight [amount]
Applicable to: Resource
#### Appears near City States with weight [amount]
Applicable to: Resource
#### Special placement during map generation
Applicable to: Resource
#### Deposits in [tileFilter] tiles always provide [amount] resources
Applicable to: Resource
#### Deposits in [tileFilter] tiles always provide [amount] resources
Applicable to: Resource
#### Can only be created by Mercantile City-States
Applicable to: Resource
## Conditional uniques
#### when at war
Applicable to: Conditional
#### when not at war
Applicable to: Conditional
#### while the empire is happy
Applicable to: Conditional
#### during a Golden Age
Applicable to: Conditional
#### during the [era]
Applicable to: Conditional
#### before the [era]
Applicable to: Conditional
#### starting from the [era]
Applicable to: Conditional
#### after discovering [tech]
Applicable to: Conditional
#### before discovering [tech]
Applicable to: Conditional
#### after adopting [policy]
Applicable to: Conditional
#### before adopting [policy]
Applicable to: Conditional
#### if this city has at least [amount] specialists
Applicable to: Conditional
#### for [mapUnitFilter] units
Applicable to: Conditional
#### vs cities
Applicable to: Conditional
#### vs [mapUnitFilter] units
Applicable to: Conditional
#### when fighting units from a Civilization with more Cities than you
Applicable to: Conditional
#### when attacking
Applicable to: Conditional
#### when defending
Applicable to: Conditional
#### when fighting in [tileFilter] tiles
Applicable to: Conditional
#### on foreign continents
Applicable to: Conditional
#### with [amount] to [amount] neighboring [tileFilter] tiles
Applicable to: Conditional
#### with [amount] to [amount] neighboring [tileFilter] [tileFilter] tiles
Applicable to: Conditional
#### on water maps
Applicable to: Conditional
#### in [regionType] Regions
Applicable to: Conditional
#### in all except [regionType] Regions
Applicable to: Conditional
## Ruins uniques
#### Free [baseUnitFilter] found in the ruins
Applicable to: Ruins
#### [amount] population in a random city
Applicable to: Ruins
#### [amount] free random researchable Tech(s) from the [era]
Applicable to: Ruins
#### Gain [amount] [stat]
Applicable to: Ruins
#### Gain [amount]-[amount] [stat]
Applicable to: Ruins
#### Gain enough Faith for a Pantheon
Applicable to: Ruins
#### Gain enough Faith for [amount]% of a Great Prophet
Applicable to: Ruins
#### Reveal up to [amount/'all'] [tileFilter] within a [amount] tile radius
Applicable to: Ruins
#### From a randomly chosen tile [amount] tiles away from the ruins, reveal tiles up to [amount] tiles away with [amount]% chance
Applicable to: Ruins
#### This Unit gains [amount] XP
Applicable to: Ruins
#### This Unit upgrades for free including special upgrades
Applicable to: Ruins
#### Hidden before founding a Pantheon
Applicable to: Ruins
#### Hidden after founding a Pantheon
Applicable to: Ruins
#### Hidden after generating a Great Prophet
Applicable to: Ruins
#### Only available after [amount] turns
Applicable to: Ruins
## Promotion uniques
#### Heal this unit by [amount] HP
Applicable to: Promotion