mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-25 10:26:05 +07:00
Converted all era uniques to conditional uniques for city-states
This commit is contained in:
parent
4ab0b62a7f
commit
ee2ab74715
@ -1,32 +1,55 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"name":"Cultured",
|
"name": "Cultured",
|
||||||
"friendBonusUniques": ["[+3 Culture]"],
|
"friendBonusUniques": [
|
||||||
"allyBonusUniques": ["[+6 Culture]"],
|
"[+3 Culture] <before the [Medieval era]>",
|
||||||
|
"[+6 Culture] <starting from the [Medieval era]> <before the [Industrial era]>",
|
||||||
|
"[+13 Culture] <starting from the [Industrial era]>"
|
||||||
|
],
|
||||||
|
"allyBonusUniques": [
|
||||||
|
"[+6 Culture] <before the [Medieval era]>",
|
||||||
|
"[+12 Culture] <starting from the [Medieval era]> <before the [Industrial era]>",
|
||||||
|
"[+26 Culture] <starting from the [Industrial era]>"
|
||||||
|
],
|
||||||
"color": [139, 96, 255]
|
"color": [139, 96, 255]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name":"Maritime",
|
"name": "Maritime",
|
||||||
"friendBonusUniques": ["[+2 Food] [in capital]"],
|
"friendBonusUniques": ["[+2 Food] [in capital]"],
|
||||||
"allyBonusUniques": ["[+2 Food] [in capital]", "[+1 Food] [in all cities]"],
|
"allyBonusUniques": ["[+2 Food] [in capital]", "[+1 Food] [in all cities]"],
|
||||||
"color": [56, 255, 112]
|
"color": [56, 255, 112]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name":"Mercantile",
|
"name": "Mercantile",
|
||||||
"friendBonusUniques": ["[+2 Happiness]"],
|
"friendBonusUniques": [
|
||||||
"allyBonusUniques": ["[+2 Happiness]", "Provides a unique luxury"],
|
"[+2 Happiness] <before the [Medieval era]>",
|
||||||
|
"[+3 Happiness] <starting from the [Medieval era]>"
|
||||||
|
],
|
||||||
|
"allyBonusUniques": [
|
||||||
|
"[+2 Happiness] <before the [Medieval era]>",
|
||||||
|
"[+3 Happiness] <starting from the [Medieval era]>",
|
||||||
|
"Provides a unique luxury"
|
||||||
|
],
|
||||||
"color": [255, 216, 0]
|
"color": [255, 216, 0]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name":"Militaristic",
|
"name": "Militaristic",
|
||||||
"friendBonusUniques": ["Provides military units every ≈[20] turns"],
|
"friendBonusUniques": ["Provides military units every ≈[20] turns"],
|
||||||
"allyBonusUniques": ["Provides military units every ≈[17] turns"],
|
"allyBonusUniques": ["Provides military units every ≈[17] turns"],
|
||||||
"color": [255, 0, 0]
|
"color": [255, 0, 0]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name":"Religious",
|
"name":"Religious",
|
||||||
"friendBonusUniques": ["[+3 Faith]"],
|
"friendBonusUniques": [
|
||||||
"allyBonusUniques": ["[+6 Faith]"],
|
"[+3 Faith] <before the [Medieval era]>",
|
||||||
|
"[+6 Faith] <starting from the [Medieval era]> <before the [Industrial era]>",
|
||||||
|
"[+13 Faith] <starting from the [Industrial era]>"
|
||||||
|
],
|
||||||
|
"allyBonusUniques": [
|
||||||
|
"[+6 Faith] <before the [Medieval era]>",
|
||||||
|
"[+12 Faith] <starting from the [Medieval era]> <before the [Industrial era]>",
|
||||||
|
"[+26 Faith] <starting from the [Industrial era]>"
|
||||||
|
],
|
||||||
"color": [255, 255, 255]
|
"color": [255, 255, 255]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -14,20 +14,6 @@
|
|||||||
"embarkDefense": 3,
|
"embarkDefense": 3,
|
||||||
"startPercent": 0,
|
"startPercent": 0,
|
||||||
"citySound": "cityAncient",
|
"citySound": "cityAncient",
|
||||||
"friendBonus": {
|
|
||||||
"Cultured": ["Provides [+3 Culture] per turn"],
|
|
||||||
"Maritime": ["Provides [+2 Food] [in capital] per turn"],
|
|
||||||
"Mercantile": ["Provides [+2] Happiness"],
|
|
||||||
"Religious": ["Provides [+3 Faith] per turn"],
|
|
||||||
"Militaristic": ["Provides military units every ≈[20] turns"]
|
|
||||||
},
|
|
||||||
"allyBonus": {
|
|
||||||
"Cultured": ["Provides [+6 Culture] per turn"],
|
|
||||||
"Maritime": ["Provides [+2 Food] [in capital] per turn", "Provides [+1 Food] [in all cities] per turn"],
|
|
||||||
"Mercantile": ["Provides [+2] Happiness", "Provides a unique luxury"],
|
|
||||||
"Religious": ["Provides [+6 Faith] per turn"],
|
|
||||||
"Militaristic": ["Provides military units every ≈[17] turns"]
|
|
||||||
},
|
|
||||||
"iconRGB": [255, 87, 35]
|
"iconRGB": [255, 87, 35]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -44,20 +30,6 @@
|
|||||||
"embarkDefense": 4,
|
"embarkDefense": 4,
|
||||||
"startPercent": 10,
|
"startPercent": 10,
|
||||||
"citySound": "cityClassical",
|
"citySound": "cityClassical",
|
||||||
"friendBonus": {
|
|
||||||
"Cultured": ["Provides [+3 Culture] per turn"],
|
|
||||||
"Maritime": ["Provides [+2 Food] [in capital] per turn"],
|
|
||||||
"Mercantile": ["Provides [+2] Happiness"],
|
|
||||||
"Religious": ["Provides [+3 Faith] per turn"],
|
|
||||||
"Militaristic": ["Provides military units every ≈[20] turns"]
|
|
||||||
},
|
|
||||||
"allyBonus": {
|
|
||||||
"Cultured": ["Provides [+6 Culture] per turn"],
|
|
||||||
"Maritime": ["Provides [+2 Food] [in capital] per turn", "Provides [+1 Food] [in all cities] per turn"],
|
|
||||||
"Mercantile": ["Provides [+2] Happiness", "Provides a unique luxury"],
|
|
||||||
"Religious": ["Provides [+6 Faith] per turn"],
|
|
||||||
"Militaristic": ["Provides military units every ≈[17] turns"]
|
|
||||||
},
|
|
||||||
"iconRGB": [233, 31, 99]
|
"iconRGB": [233, 31, 99]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -79,20 +51,6 @@
|
|||||||
"embarkDefense": 6,
|
"embarkDefense": 6,
|
||||||
"startPercent": 25,
|
"startPercent": 25,
|
||||||
"citySound": "cityMedieval",
|
"citySound": "cityMedieval",
|
||||||
"friendBonus": {
|
|
||||||
"Cultured": ["Provides [+6 Culture] per turn"],
|
|
||||||
"Maritime": ["Provides [+2 Food] [in capital] per turn"],
|
|
||||||
"Mercantile": ["Provides [+3] Happiness"],
|
|
||||||
"Religious": ["Provides [+6 Faith] per turn"],
|
|
||||||
"Militaristic": ["Provides military units every ≈[20] turns"]
|
|
||||||
},
|
|
||||||
"allyBonus": {
|
|
||||||
"Cultured": ["Provides [+12 Culture] per turn"],
|
|
||||||
"Maritime": ["Provides [+2 Food] [in capital] per turn", "Provides [+1 Food] [in all cities] per turn"],
|
|
||||||
"Mercantile": ["Provides [+3] Happiness", "Provides a unique luxury"],
|
|
||||||
"Religious": ["Provides [+12 Faith] per turn"],
|
|
||||||
"Militaristic": ["Provides military units every ≈[17] turns"]
|
|
||||||
},
|
|
||||||
"iconRGB": [157, 39, 176]
|
"iconRGB": [157, 39, 176]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -112,20 +70,6 @@
|
|||||||
"embarkDefense": 8,
|
"embarkDefense": 8,
|
||||||
"startPercent": 37,
|
"startPercent": 37,
|
||||||
"citySound": "cityRenaissance",
|
"citySound": "cityRenaissance",
|
||||||
"friendBonus": {
|
|
||||||
"Cultured": ["Provides [+6 Culture] per turn"],
|
|
||||||
"Maritime": ["Provides [+2 Food] [in capital] per turn"],
|
|
||||||
"Mercantile": ["Provides [+3] Happiness"],
|
|
||||||
"Religious": ["Provides [+6 Faith] per turn"],
|
|
||||||
"Militaristic": ["Provides military units every ≈[20] turns"]
|
|
||||||
},
|
|
||||||
"allyBonus": {
|
|
||||||
"Cultured": ["Provides [+12 Culture] per turn"],
|
|
||||||
"Maritime": ["Provides [+2 Food] [in capital] per turn", "Provides [+1 Food] [in all cities] per turn"],
|
|
||||||
"Mercantile": ["Provides [+3] Happiness", "Provides a unique luxury"],
|
|
||||||
"Religious": ["Provides [+12 Faith] per turn"],
|
|
||||||
"Militaristic": ["Provides military units every ≈[17] turns"]
|
|
||||||
},
|
|
||||||
"uniques": ["Every major Civilization gains a spy once a civilization enters this era"],
|
"uniques": ["Every major Civilization gains a spy once a civilization enters this era"],
|
||||||
"iconRGB": [104, 58, 183]
|
"iconRGB": [104, 58, 183]
|
||||||
},
|
},
|
||||||
@ -147,20 +91,6 @@
|
|||||||
"embarkDefense": 10,
|
"embarkDefense": 10,
|
||||||
"startPercent": 50,
|
"startPercent": 50,
|
||||||
"citySound": "cityIndustrial",
|
"citySound": "cityIndustrial",
|
||||||
"friendBonus": {
|
|
||||||
"Cultured": ["Provides [+13 Culture] per turn"],
|
|
||||||
"Maritime": ["Provides [+2 Food] [in capital] per turn"],
|
|
||||||
"Mercantile": ["Provides [+3] Happiness"],
|
|
||||||
"Religious": ["Provides [+13 Faith] per turn"],
|
|
||||||
"Militaristic": ["Provides military units every ≈[20] turns"]
|
|
||||||
},
|
|
||||||
"allyBonus": {
|
|
||||||
"Cultured": ["Provides [+26 Culture] per turn"],
|
|
||||||
"Maritime": ["Provides [+2 Food] [in capital] per turn", "Provides [+1 Food] [in all cities] per turn"],
|
|
||||||
"Mercantile": ["Provides [+3] Happiness", "Provides a unique luxury"],
|
|
||||||
"Religious": ["Provides [+26 Faith] per turn"],
|
|
||||||
"Militaristic": ["Provides military units every ≈[17] turns"]
|
|
||||||
},
|
|
||||||
"iconRGB": [63, 81, 182],
|
"iconRGB": [63, 81, 182],
|
||||||
"uniques": ["May not generate great prophet equivalents naturally",
|
"uniques": ["May not generate great prophet equivalents naturally",
|
||||||
"May buy [Great Prophet] units for [200] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([100])",
|
"May buy [Great Prophet] units for [200] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([100])",
|
||||||
@ -187,20 +117,6 @@
|
|||||||
"embarkDefense": 13,
|
"embarkDefense": 13,
|
||||||
"startPercent": 65,
|
"startPercent": 65,
|
||||||
"citySound": "cityModern",
|
"citySound": "cityModern",
|
||||||
"friendBonus": {
|
|
||||||
"Cultured": ["Provides [+13 Culture] per turn"],
|
|
||||||
"Maritime": ["Provides [+2 Food] [in capital] per turn"],
|
|
||||||
"Mercantile": ["Provides [+3] Happiness"],
|
|
||||||
"Religious": ["Provides [+13 Faith] per turn"],
|
|
||||||
"Militaristic": ["Provides military units every ≈[20] turns"]
|
|
||||||
},
|
|
||||||
"allyBonus": {
|
|
||||||
"Cultured": ["Provides [+26 Culture] per turn"],
|
|
||||||
"Maritime": ["Provides [+2 Food] [in capital] per turn", "Provides [+1 Food] [in all cities] per turn"],
|
|
||||||
"Mercantile": ["Provides [+3] Happiness", "Provides a unique luxury"],
|
|
||||||
"Religious": ["Provides [+26 Faith] per turn"],
|
|
||||||
"Militaristic": ["Provides military units every ≈[17] turns"]
|
|
||||||
},
|
|
||||||
"iconRGB": [33, 150, 243],
|
"iconRGB": [33, 150, 243],
|
||||||
"uniques": ["May not generate great prophet equivalents naturally",
|
"uniques": ["May not generate great prophet equivalents naturally",
|
||||||
"May buy [Great Prophet] units for [200] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([100])",
|
"May buy [Great Prophet] units for [200] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([100])",
|
||||||
@ -228,20 +144,6 @@
|
|||||||
"embarkDefense": 16,
|
"embarkDefense": 16,
|
||||||
"startPercent": 65,
|
"startPercent": 65,
|
||||||
"citySound": "cityAtomic",
|
"citySound": "cityAtomic",
|
||||||
"friendBonus": {
|
|
||||||
"Cultured": ["Provides [+13 Culture] per turn"],
|
|
||||||
"Maritime": ["Provides [+2 Food] [in capital] per turn"],
|
|
||||||
"Mercantile": ["Provides [+3] Happiness"],
|
|
||||||
"Religious": ["Provides [+13 Faith] per turn"],
|
|
||||||
"Militaristic": ["Provides military units every ≈[20] turns"]
|
|
||||||
},
|
|
||||||
"allyBonus": {
|
|
||||||
"Cultured": ["Provides [+26 Culture] per turn"],
|
|
||||||
"Maritime": ["Provides [+2 Food] [in capital] per turn", "Provides [+1 Food] [in all cities] per turn"],
|
|
||||||
"Mercantile": ["Provides [+3] Happiness", "Provides a unique luxury"],
|
|
||||||
"Religious": ["Provides [+26 Faith] per turn"],
|
|
||||||
"Militaristic": ["Provides military units every ≈[17] turns"]
|
|
||||||
},
|
|
||||||
"iconRGB": [0, 150, 136],
|
"iconRGB": [0, 150, 136],
|
||||||
"uniques": ["May not generate great prophet equivalents naturally",
|
"uniques": ["May not generate great prophet equivalents naturally",
|
||||||
"May buy [Great Prophet] units for [200] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([100])",
|
"May buy [Great Prophet] units for [200] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([100])",
|
||||||
@ -271,21 +173,6 @@
|
|||||||
"startPercent": 80,
|
"startPercent": 80,
|
||||||
|
|
||||||
"citySound": "cityInformation",
|
"citySound": "cityInformation",
|
||||||
"friendBonus": {
|
|
||||||
"Cultured": ["Provides [+13 Culture] per turn"],
|
|
||||||
"Maritime": ["Provides [+2 Food] [in capital] per turn"],
|
|
||||||
"Mercantile": ["Provides [+3] Happiness"],
|
|
||||||
"Religious": ["Provides [+13 Faith] per turn"],
|
|
||||||
"Militaristic": ["Provides military units every ≈[20] turns"]
|
|
||||||
},
|
|
||||||
"allyBonus": {
|
|
||||||
"Cultured": ["Provides [+26 Culture] per turn"],
|
|
||||||
"Maritime": ["Provides [+2 Food] [in capital] per turn", "Provides [+1 Food] [in all cities] per turn"],
|
|
||||||
"Mercantile": ["Provides [+3] Happiness", "Provides a unique luxury"],
|
|
||||||
"Religious": ["Provides [+26 Faith] per turn"],
|
|
||||||
"Militaristic": ["Provides military units every ≈[17] turns"]
|
|
||||||
|
|
||||||
},
|
|
||||||
"iconRGB": [76, 176, 81],
|
"iconRGB": [76, 176, 81],
|
||||||
"uniques": ["May not generate great prophet equivalents naturally",
|
"uniques": ["May not generate great prophet equivalents naturally",
|
||||||
"May buy [Great Prophet] units for [200] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([100])",
|
"May buy [Great Prophet] units for [200] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([100])",
|
||||||
@ -316,21 +203,6 @@
|
|||||||
"embarkDefense": 25,
|
"embarkDefense": 25,
|
||||||
"startPercent": 80,
|
"startPercent": 80,
|
||||||
"citySound": "cityFuture",
|
"citySound": "cityFuture",
|
||||||
"friendBonus": {
|
|
||||||
"Cultured": ["Provides [+13 Culture] per turn"],
|
|
||||||
"Maritime": ["Provides [+2 Food] [in capital] per turn"],
|
|
||||||
"Mercantile": ["Provides [+3] Happiness"],
|
|
||||||
"Religious": ["Provides [+13 Faith] per turn"],
|
|
||||||
"Militaristic": ["Provides military units every ≈[20] turns"]
|
|
||||||
},
|
|
||||||
"allyBonus": {
|
|
||||||
"Cultured": ["Provides [+26 Culture] per turn"],
|
|
||||||
"Maritime": ["Provides [+2 Food] [in capital] per turn", "Provides [+1 Food] [in all cities] per turn"],
|
|
||||||
"Mercantile": ["Provides [+3] Happiness", "Provides a unique luxury"],
|
|
||||||
"Religious": ["Provides [+26 Faith] per turn"],
|
|
||||||
"Militaristic": ["Provides military units every ≈[17] turns"]
|
|
||||||
|
|
||||||
},
|
|
||||||
"iconRGB": [76, 176, 81],
|
"iconRGB": [76, 176, 81],
|
||||||
"uniques": ["May not generate great prophet equivalents naturally",
|
"uniques": ["May not generate great prophet equivalents naturally",
|
||||||
"May buy [Great Prophet] units for [200] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([100])",
|
"May buy [Great Prophet] units for [200] [Faith] [in all cities in which the majority religion is a major religion] at an increasing price ([100])",
|
||||||
|
@ -211,7 +211,7 @@ class Translations : LinkedHashMap<String, TranslationEntry>(){
|
|||||||
// Whenever this string is changed, it should also be changed in the translation files!
|
// Whenever this string is changed, it should also be changed in the translation files!
|
||||||
// It is mostly used as the template for translating the order of conditionals
|
// It is mostly used as the template for translating the order of conditionals
|
||||||
const val englishConditionalOrderingString =
|
const val englishConditionalOrderingString =
|
||||||
"<with a garrison> <for [mapUnitFilter] units> <above [amount] HP> <below [amount] HP> <vs cities> <vs [mapUnitFilter] units> <when fighting in [tileFilter] tiles> <when attacking> <when defending> <if this city has at least [amount] specialists> <when at war> <when not at war> <while the empire is happy> <during a Golden Age> <during the [era]> <before the [era]> <starting from the [era]> <with [techOrPolicy]> <without [techOrPolicy]>"
|
"<with a garrison> <for [mapUnitFilter] units> <above [amount] HP> <below [amount] HP> <vs cities> <vs [mapUnitFilter] units> <when fighting in [tileFilter] tiles> <when attacking> <when defending> <if this city has at least [amount] specialists> <when at war> <when not at war> <while the empire is happy> <during a Golden Age> <during the [era]> <starting from the [era]> <before the [era]> <with [techOrPolicy]> <without [techOrPolicy]>"
|
||||||
const val conditionalUniqueOrderString = "ConditionalsPlacement"
|
const val conditionalUniqueOrderString = "ConditionalsPlacement"
|
||||||
const val shouldCapitalizeString = "StartWithCapitalLetter"
|
const val shouldCapitalizeString = "StartWithCapitalLetter"
|
||||||
}
|
}
|
||||||
@ -305,7 +305,7 @@ fun String.tr(): String {
|
|||||||
var translatedBaseUnique = this.removeConditionals().tr()
|
var translatedBaseUnique = this.removeConditionals().tr()
|
||||||
|
|
||||||
val conditionals = this.getConditionals().map { it.placeholderText }
|
val conditionals = this.getConditionals().map { it.placeholderText }
|
||||||
val conditionsWithTranslation: HashMap<String, String> = hashMapOf()
|
val conditionsWithTranslation: LinkedHashMap<String, String> = linkedMapOf()
|
||||||
|
|
||||||
for (conditional in this.getConditionals())
|
for (conditional in this.getConditionals())
|
||||||
conditionsWithTranslation[conditional.placeholderText] = conditional.text.tr()
|
conditionsWithTranslation[conditional.placeholderText] = conditional.text.tr()
|
||||||
|
@ -248,15 +248,15 @@ class DiplomacyScreen(
|
|||||||
|
|
||||||
val eraInfo = viewingCiv.getEra()
|
val eraInfo = viewingCiv.getEra()
|
||||||
|
|
||||||
var friendBonusText = "{When Friends:} ".tr()
|
var friendBonusText = "{When Friends:}\n".tr()
|
||||||
val friendBonusObjects = eraInfo.getCityStateBonuses(otherCiv.cityStateType, RelationshipLevel.Friend)
|
val friendBonusObjects = eraInfo.getCityStateBonuses(otherCiv.cityStateType, RelationshipLevel.Friend)
|
||||||
val friendBonusStrings = getAdjustedBonuses(friendBonusObjects)
|
val friendBonusStrings = getAdjustedBonuses(friendBonusObjects)
|
||||||
friendBonusText += friendBonusStrings.joinToString(separator = ", ") { it.tr() }
|
friendBonusText += friendBonusStrings.joinToString(separator = "\n") { it.tr() }
|
||||||
|
|
||||||
var allyBonusText = "{When Allies:} ".tr()
|
var allyBonusText = "{When Allies:}\n".tr()
|
||||||
val allyBonusObjects = eraInfo.getCityStateBonuses(otherCiv.cityStateType, RelationshipLevel.Ally)
|
val allyBonusObjects = eraInfo.getCityStateBonuses(otherCiv.cityStateType, RelationshipLevel.Ally)
|
||||||
val allyBonusStrings = getAdjustedBonuses(allyBonusObjects)
|
val allyBonusStrings = getAdjustedBonuses(allyBonusObjects)
|
||||||
allyBonusText += allyBonusStrings.joinToString(separator = ", ") { it.tr() }
|
allyBonusText += allyBonusStrings.joinToString(separator = "\n") { it.tr() }
|
||||||
|
|
||||||
val relationLevel = otherCivDiplomacyManager.relationshipLevel()
|
val relationLevel = otherCivDiplomacyManager.relationshipLevel()
|
||||||
if (relationLevel >= RelationshipLevel.Friend) {
|
if (relationLevel >= RelationshipLevel.Friend) {
|
||||||
|
Loading…
Reference in New Issue
Block a user