mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 15:27:50 +07:00
Adding religous city states to unciv! (#5136)
* Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv! * Adding religous city states to unciv!
This commit is contained in:
@ -1 +1 @@
|
|||||||
[Tech,Flags,Skin,Construction]
|
[Construction,Flags,Skin,Tech]
|
@ -16,12 +16,14 @@
|
|||||||
"Cultured": ["Provides [3] [Culture] per turn"],
|
"Cultured": ["Provides [3] [Culture] per turn"],
|
||||||
"Maritime": ["Provides [2] [Food] [in capital]"],
|
"Maritime": ["Provides [2] [Food] [in capital]"],
|
||||||
"Mercantile": ["Provides [2] Happiness"],
|
"Mercantile": ["Provides [2] Happiness"],
|
||||||
|
"Religious": ["Provides [3] [Faith] per turn"],
|
||||||
"Militaristic": ["Provides military units every ≈[20] turns"]
|
"Militaristic": ["Provides military units every ≈[20] turns"]
|
||||||
},
|
},
|
||||||
"allyBonus": {
|
"allyBonus": {
|
||||||
"Cultured": ["Provides [6] [Culture] per turn"],
|
"Cultured": ["Provides [6] [Culture] per turn"],
|
||||||
"Maritime": ["Provides [2] [Food] [in capital]", "Provides [1] [Food] [in all cities]"],
|
"Maritime": ["Provides [2] [Food] [in capital]", "Provides [1] [Food] [in all cities]"],
|
||||||
"Mercantile": ["Provides [2] Happiness", "Provides a unique luxury"],
|
"Mercantile": ["Provides [2] Happiness", "Provides a unique luxury"],
|
||||||
|
"Religious": ["Provides [6] [Faith] per turn"],
|
||||||
"Militaristic": ["Provides military units every ≈[17] turns"]
|
"Militaristic": ["Provides military units every ≈[17] turns"]
|
||||||
},
|
},
|
||||||
"iconRGB": [255, 87, 35]
|
"iconRGB": [255, 87, 35]
|
||||||
@ -42,12 +44,14 @@
|
|||||||
"Cultured": ["Provides [3] [Culture] per turn"],
|
"Cultured": ["Provides [3] [Culture] per turn"],
|
||||||
"Maritime": ["Provides [2] [Food] [in capital]"],
|
"Maritime": ["Provides [2] [Food] [in capital]"],
|
||||||
"Mercantile": ["Provides [2] Happiness"],
|
"Mercantile": ["Provides [2] Happiness"],
|
||||||
|
"Religious": ["Provides [3] [Faith] per turn"],
|
||||||
"Militaristic": ["Provides military units every ≈[20] turns"]
|
"Militaristic": ["Provides military units every ≈[20] turns"]
|
||||||
},
|
},
|
||||||
"allyBonus": {
|
"allyBonus": {
|
||||||
"Cultured": ["Provides [6] [Culture] per turn"],
|
"Cultured": ["Provides [6] [Culture] per turn"],
|
||||||
"Maritime": ["Provides [2] [Food] [in capital]", "Provides [1] [Food] [in all cities]"],
|
"Maritime": ["Provides [2] [Food] [in capital]", "Provides [1] [Food] [in all cities]"],
|
||||||
"Mercantile": ["Provides [2] Happiness", "Provides a unique luxury"],
|
"Mercantile": ["Provides [2] Happiness", "Provides a unique luxury"],
|
||||||
|
"Religious": ["Provides [6] [Faith] per turn"],
|
||||||
"Militaristic": ["Provides military units every ≈[17] turns"]
|
"Militaristic": ["Provides military units every ≈[17] turns"]
|
||||||
},
|
},
|
||||||
"iconRGB": [233, 31, 99]
|
"iconRGB": [233, 31, 99]
|
||||||
@ -70,12 +74,14 @@
|
|||||||
"Cultured": ["Provides [6] [Culture] per turn"],
|
"Cultured": ["Provides [6] [Culture] per turn"],
|
||||||
"Maritime": ["Provides [2] [Food] [in capital]"],
|
"Maritime": ["Provides [2] [Food] [in capital]"],
|
||||||
"Mercantile": ["Provides [3] Happiness"],
|
"Mercantile": ["Provides [3] Happiness"],
|
||||||
|
"Religious": ["Provides [6] [Faith] per turn"],
|
||||||
"Militaristic": ["Provides military units every ≈[20] turns"]
|
"Militaristic": ["Provides military units every ≈[20] turns"]
|
||||||
},
|
},
|
||||||
"allyBonus": {
|
"allyBonus": {
|
||||||
"Cultured": ["Provides [12] [Culture] per turn"],
|
"Cultured": ["Provides [12] [Culture] per turn"],
|
||||||
"Maritime": ["Provides [2] [Food] [in capital]", "Provides [1] [Food] [in all cities]"],
|
"Maritime": ["Provides [2] [Food] [in capital]", "Provides [1] [Food] [in all cities]"],
|
||||||
"Mercantile": ["Provides [3] Happiness", "Provides a unique luxury"],
|
"Mercantile": ["Provides [3] Happiness", "Provides a unique luxury"],
|
||||||
|
"Religious": ["Provides [12] [Faith] per turn"],
|
||||||
"Militaristic": ["Provides military units every ≈[17] turns"]
|
"Militaristic": ["Provides military units every ≈[17] turns"]
|
||||||
},
|
},
|
||||||
"iconRGB": [157, 39, 176]
|
"iconRGB": [157, 39, 176]
|
||||||
@ -99,12 +105,14 @@
|
|||||||
"Cultured": ["Provides [6] [Culture] per turn"],
|
"Cultured": ["Provides [6] [Culture] per turn"],
|
||||||
"Maritime": ["Provides [2] [Food] [in capital]"],
|
"Maritime": ["Provides [2] [Food] [in capital]"],
|
||||||
"Mercantile": ["Provides [3] Happiness"],
|
"Mercantile": ["Provides [3] Happiness"],
|
||||||
|
"Religious": ["Provides [6] [Faith] per turn"],
|
||||||
"Militaristic": ["Provides military units every ≈[20] turns"]
|
"Militaristic": ["Provides military units every ≈[20] turns"]
|
||||||
},
|
},
|
||||||
"allyBonus": {
|
"allyBonus": {
|
||||||
"Cultured": ["Provides [12] [Culture] per turn"],
|
"Cultured": ["Provides [12] [Culture] per turn"],
|
||||||
"Maritime": ["Provides [2] [Food] [in capital]", "Provides [1] [Food] [in all cities]"],
|
"Maritime": ["Provides [2] [Food] [in capital]", "Provides [1] [Food] [in all cities]"],
|
||||||
"Mercantile": ["Provides [3] Happiness", "Provides a unique luxury"],
|
"Mercantile": ["Provides [3] Happiness", "Provides a unique luxury"],
|
||||||
|
"Religious": ["Provides [12] [Faith] per turn"],
|
||||||
"Militaristic": ["Provides military units every ≈[17] turns"]
|
"Militaristic": ["Provides military units every ≈[17] turns"]
|
||||||
},
|
},
|
||||||
"iconRGB": [104, 58, 183]
|
"iconRGB": [104, 58, 183]
|
||||||
@ -129,12 +137,14 @@
|
|||||||
"Cultured": ["Provides [13] [Culture] per turn"],
|
"Cultured": ["Provides [13] [Culture] per turn"],
|
||||||
"Maritime": ["Provides [2] [Food] [in capital]"],
|
"Maritime": ["Provides [2] [Food] [in capital]"],
|
||||||
"Mercantile": ["Provides [3] Happiness"],
|
"Mercantile": ["Provides [3] Happiness"],
|
||||||
|
"Religious": ["Provides [13] [Faith] per turn"],
|
||||||
"Militaristic": ["Provides military units every ≈[20] turns"]
|
"Militaristic": ["Provides military units every ≈[20] turns"]
|
||||||
},
|
},
|
||||||
"allyBonus": {
|
"allyBonus": {
|
||||||
"Cultured": ["Provides [26] [Culture] per turn"],
|
"Cultured": ["Provides [26] [Culture] per turn"],
|
||||||
"Maritime": ["Provides [2] [Food] [in capital]", "Provides [1] [Food] [in all cities]"],
|
"Maritime": ["Provides [2] [Food] [in capital]", "Provides [1] [Food] [in all cities]"],
|
||||||
"Mercantile": ["Provides [3] Happiness", "Provides a unique luxury"],
|
"Mercantile": ["Provides [3] Happiness", "Provides a unique luxury"],
|
||||||
|
"Religious": ["Provides [26] [Faith] per turn"],
|
||||||
"Militaristic": ["Provides military units every ≈[17] turns"]
|
"Militaristic": ["Provides military units every ≈[17] turns"]
|
||||||
},
|
},
|
||||||
"iconRGB": [63, 81, 182],
|
"iconRGB": [63, 81, 182],
|
||||||
@ -164,12 +174,15 @@
|
|||||||
"Cultured": ["Provides [13] [Culture] per turn"],
|
"Cultured": ["Provides [13] [Culture] per turn"],
|
||||||
"Maritime": ["Provides [2] [Food] [in capital]"],
|
"Maritime": ["Provides [2] [Food] [in capital]"],
|
||||||
"Mercantile": ["Provides [3] Happiness"],
|
"Mercantile": ["Provides [3] Happiness"],
|
||||||
|
|
||||||
|
"Religious": ["Provides [13] [Faith] per turn"],
|
||||||
"Militaristic": ["Provides military units every ≈[20] turns"]
|
"Militaristic": ["Provides military units every ≈[20] turns"]
|
||||||
},
|
},
|
||||||
"allyBonus": {
|
"allyBonus": {
|
||||||
"Cultured": ["Provides [26] [Culture] per turn"],
|
"Cultured": ["Provides [26] [Culture] per turn"],
|
||||||
"Maritime": ["Provides [2] [Food] [in capital]", "Provides [1] [Food] [in all cities]"],
|
"Maritime": ["Provides [2] [Food] [in capital]", "Provides [1] [Food] [in all cities]"],
|
||||||
"Mercantile": ["Provides [3] Happiness", "Provides a unique luxury"],
|
"Mercantile": ["Provides [3] Happiness", "Provides a unique luxury"],
|
||||||
|
"Religious": ["Provides [26] [Faith] per turn"],
|
||||||
"Militaristic": ["Provides military units every ≈[17] turns"]
|
"Militaristic": ["Provides military units every ≈[17] turns"]
|
||||||
},
|
},
|
||||||
"iconRGB": [33, 150, 243],
|
"iconRGB": [33, 150, 243],
|
||||||
@ -200,12 +213,14 @@
|
|||||||
"Cultured": ["Provides [13] [Culture] per turn"],
|
"Cultured": ["Provides [13] [Culture] per turn"],
|
||||||
"Maritime": ["Provides [2] [Food] [in capital]"],
|
"Maritime": ["Provides [2] [Food] [in capital]"],
|
||||||
"Mercantile": ["Provides [3] Happiness"],
|
"Mercantile": ["Provides [3] Happiness"],
|
||||||
|
"Religious": ["Provides [13] [Faith] per turn"],
|
||||||
"Militaristic": ["Provides military units every ≈[20] turns"]
|
"Militaristic": ["Provides military units every ≈[20] turns"]
|
||||||
},
|
},
|
||||||
"allyBonus": {
|
"allyBonus": {
|
||||||
"Cultured": ["Provides [26] [Culture] per turn"],
|
"Cultured": ["Provides [26] [Culture] per turn"],
|
||||||
"Maritime": ["Provides [2] [Food] [in capital]", "Provides [1] [Food] [in all cities]"],
|
"Maritime": ["Provides [2] [Food] [in capital]", "Provides [1] [Food] [in all cities]"],
|
||||||
"Mercantile": ["Provides [3] Happiness", "Provides a unique luxury"],
|
"Mercantile": ["Provides [3] Happiness", "Provides a unique luxury"],
|
||||||
|
"Religious": ["Provides [26] [Faith] per turn"],
|
||||||
"Militaristic": ["Provides military units every ≈[17] turns"]
|
"Militaristic": ["Provides military units every ≈[17] turns"]
|
||||||
},
|
},
|
||||||
"iconRGB": [0, 150, 136],
|
"iconRGB": [0, 150, 136],
|
||||||
@ -240,13 +255,16 @@
|
|||||||
"Cultured": ["Provides [13] [Culture] per turn"],
|
"Cultured": ["Provides [13] [Culture] per turn"],
|
||||||
"Maritime": ["Provides [2] [Food] [in capital]"],
|
"Maritime": ["Provides [2] [Food] [in capital]"],
|
||||||
"Mercantile": ["Provides [3] Happiness"],
|
"Mercantile": ["Provides [3] Happiness"],
|
||||||
|
"Religious": ["Provides [13] [Faith] per turn"],
|
||||||
"Militaristic": ["Provides military units every ≈[20] turns"]
|
"Militaristic": ["Provides military units every ≈[20] turns"]
|
||||||
},
|
},
|
||||||
"allyBonus": {
|
"allyBonus": {
|
||||||
"Cultured": ["Provides [26] [Culture] per turn"],
|
"Cultured": ["Provides [26] [Culture] per turn"],
|
||||||
"Maritime": ["Provides [2] [Food] [in capital]", "Provides [1] [Food] [in all cities]"],
|
"Maritime": ["Provides [2] [Food] [in capital]", "Provides [1] [Food] [in all cities]"],
|
||||||
"Mercantile": ["Provides [3] Happiness", "Provides a unique luxury"],
|
"Mercantile": ["Provides [3] Happiness", "Provides a unique luxury"],
|
||||||
|
"Religious": ["Provides [26] [Faith] per turn"],
|
||||||
"Militaristic": ["Provides military units every ≈[17] turns"]
|
"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",
|
||||||
@ -279,13 +297,17 @@
|
|||||||
"Cultured": ["Provides [13] [Culture] per turn"],
|
"Cultured": ["Provides [13] [Culture] per turn"],
|
||||||
"Maritime": ["Provides [2] [Food] [in capital]"],
|
"Maritime": ["Provides [2] [Food] [in capital]"],
|
||||||
"Mercantile": ["Provides [3] Happiness"],
|
"Mercantile": ["Provides [3] Happiness"],
|
||||||
|
"Religious": ["Provides [13] [Faith] per turn"],
|
||||||
"Militaristic": ["Provides military units every ≈[20] turns"]
|
"Militaristic": ["Provides military units every ≈[20] turns"]
|
||||||
|
|
||||||
},
|
},
|
||||||
"allyBonus": {
|
"allyBonus": {
|
||||||
"Cultured": ["Provides [26] [Culture] per turn"],
|
"Cultured": ["Provides [26] [Culture] per turn"],
|
||||||
"Maritime": ["Provides [2] [Food] [in capital]", "Provides [1] [Food] [in all cities]"],
|
"Maritime": ["Provides [2] [Food] [in capital]", "Provides [1] [Food] [in all cities]"],
|
||||||
"Mercantile": ["Provides [3] Happiness", "Provides a unique luxury"],
|
"Mercantile": ["Provides [3] Happiness", "Provides a unique luxury"],
|
||||||
|
"Religious": ["Provides [26] [Faith] per turn"],
|
||||||
"Militaristic": ["Provides military units every ≈[17] turns"]
|
"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",
|
||||||
|
@ -1121,6 +1121,42 @@
|
|||||||
"innerColor": [224,224,224],
|
"innerColor": [224,224,224],
|
||||||
"cities": ["Mogadishu"]
|
"cities": ["Mogadishu"]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "Bratislava",
|
||||||
|
"adjective": ["Bratislava"],
|
||||||
|
"cityStateType": "Religious",
|
||||||
|
|
||||||
|
"declaringWar": "I didn't want to do this. We declare war.",
|
||||||
|
"attacked": "I will fear no evil. For god is with me!",
|
||||||
|
"defeated": "Why have you forsaken us my lord?",
|
||||||
|
"outerColor": [0, 0, 0],
|
||||||
|
"innerColor": [255,255,255],
|
||||||
|
"cities": ["Bratislava"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Cahokia",
|
||||||
|
"adjective": ["Cahokia"],
|
||||||
|
"cityStateType": "Religious",
|
||||||
|
|
||||||
|
"declaringWar": "We have wanted this for a LONG time. War it shall be.",
|
||||||
|
"attacked": "Very well, we will kick you back to the ancient era!",
|
||||||
|
"defeated": "This isn't how it is supposed to be!",
|
||||||
|
"outerColor": [0, 0, 0],
|
||||||
|
"innerColor": [203, 253, 232],
|
||||||
|
"cities": ["Cahokia"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jerusalem",
|
||||||
|
"adjective": ["Jerusalem"],
|
||||||
|
"cityStateType": "Religious",
|
||||||
|
|
||||||
|
"declaringWar": "By god's grace we will not allow these atrocities to occur any longer. We declare war!",
|
||||||
|
"attacked": "May god have mercy on your evil soul.",
|
||||||
|
"defeated": "I for one welcome our new conquer overlord!",
|
||||||
|
"outerColor": [0, 0, 0],
|
||||||
|
"innerColor": [198,255,192],
|
||||||
|
"cities": ["Jerusalem"]
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -499,6 +499,7 @@ A [greatPerson] has been born in [cityName]! =
|
|||||||
We have encountered [civName]! =
|
We have encountered [civName]! =
|
||||||
[cityStateName] has given us [stats] as a token of goodwill for meeting us =
|
[cityStateName] has given us [stats] as a token of goodwill for meeting us =
|
||||||
[cityStateName] has given us [stats] as we are the first major civ to meet them =
|
[cityStateName] has given us [stats] as we are the first major civ to meet them =
|
||||||
|
[cityStateName] has also given us [stats] =
|
||||||
Cannot provide unit upkeep for [unitName] - unit has been disbanded! =
|
Cannot provide unit upkeep for [unitName] - unit has been disbanded! =
|
||||||
[cityName] has grown! =
|
[cityName] has grown! =
|
||||||
[cityName] is starving! =
|
[cityName] is starving! =
|
||||||
|
@ -191,16 +191,26 @@ object GameStarter {
|
|||||||
val availableCityStatesNames = Stack<String>()
|
val availableCityStatesNames = Stack<String>()
|
||||||
// since we shuffle and then order by, we end up with all the City-States with starting tiles first in a random order,
|
// since we shuffle and then order by, we end up with all the City-States with starting tiles first in a random order,
|
||||||
// and then all the other City-States in a random order! Because the sortedBy function is stable!
|
// and then all the other City-States in a random order! Because the sortedBy function is stable!
|
||||||
availableCityStatesNames.addAll(ruleset.nations.filter { it.value.isCityState() }.keys
|
availableCityStatesNames.addAll( ruleset.nations
|
||||||
.shuffled().sortedByDescending { it in civNamesWithStartingLocations })
|
.filter { it.value.isCityState() && (it.value.cityStateType != CityStateType.Religious || newGameParameters.religionEnabled) }
|
||||||
|
.keys
|
||||||
|
.shuffled()
|
||||||
|
.sortedByDescending { it in civNamesWithStartingLocations } )
|
||||||
|
|
||||||
|
|
||||||
|
val allMercantileResources = ruleset.tileResources.values.filter { it.unique == "Can only be created by Mercantile City-States" }.map { it.name }
|
||||||
|
val unusedMercantileResources = Stack<String>()
|
||||||
|
unusedMercantileResources.addAll(allMercantileResources.shuffled())
|
||||||
|
|
||||||
var addedCityStates = 0
|
var addedCityStates = 0
|
||||||
// Keep trying to add city states until we reach the target number.
|
// Keep trying to add city states until we reach the target number.
|
||||||
while (addedCityStates < newGameParameters.numberOfCityStates) {
|
while (addedCityStates < newGameParameters.numberOfCityStates) {
|
||||||
if (availableCityStatesNames.isEmpty()) // We ran out of city-states somehow
|
if (availableCityStatesNames.isEmpty()) // We ran out of city-states somehow
|
||||||
break
|
break
|
||||||
|
|
||||||
val cityStateName = availableCityStatesNames.pop()
|
val cityStateName = availableCityStatesNames.pop()
|
||||||
val civ = CivilizationInfo(cityStateName)
|
val civ = CivilizationInfo(cityStateName)
|
||||||
if (civ.initCityState(ruleset, newGameParameters.startingEra, availableCivNames)) { // true if successful init
|
if (civ.initCityState(ruleset, newGameParameters.startingEra, availableCivNames)) {
|
||||||
gameInfo.civilizations.add(civ)
|
gameInfo.civilizations.add(civ)
|
||||||
addedCityStates++
|
addedCityStates++
|
||||||
}
|
}
|
||||||
|
@ -425,6 +425,7 @@ class CityStateFunctions(val civInfo: CivilizationInfo) {
|
|||||||
civInfo.cityStateType == CityStateType.Mercantile && statType == Stat.Happiness -> true
|
civInfo.cityStateType == CityStateType.Mercantile && statType == Stat.Happiness -> true
|
||||||
civInfo.cityStateType == CityStateType.Cultured && statType == Stat.Culture -> true
|
civInfo.cityStateType == CityStateType.Cultured && statType == Stat.Culture -> true
|
||||||
civInfo.cityStateType == CityStateType.Maritime && statType == Stat.Food -> true
|
civInfo.cityStateType == CityStateType.Maritime && statType == Stat.Food -> true
|
||||||
|
civInfo.cityStateType == CityStateType.Religious && statType == Stat.Faith ->true
|
||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ enum class CityStateType(val color: String = "", val icon: String) {
|
|||||||
Maritime("#38ff70", "OtherIcons/Maritime"),
|
Maritime("#38ff70", "OtherIcons/Maritime"),
|
||||||
Mercantile("#ffd800", "OtherIcons/Mercantile"),
|
Mercantile("#ffd800", "OtherIcons/Mercantile"),
|
||||||
Militaristic("#ff0000", "OtherIcons/Militaristic"),
|
Militaristic("#ff0000", "OtherIcons/Militaristic"),
|
||||||
//Religious("#FFFFFF", "OtherIcons/Religious")
|
Religious("#FFFFFF", "OtherIcons/Religious")
|
||||||
}
|
}
|
||||||
|
|
||||||
enum class CityStatePersonality {
|
enum class CityStatePersonality {
|
||||||
|
@ -406,9 +406,11 @@ class CivilizationInfo {
|
|||||||
val cityStateLocation = if (cities.isEmpty()) null else getCapital().location
|
val cityStateLocation = if (cities.isEmpty()) null else getCapital().location
|
||||||
|
|
||||||
val giftAmount = Stats(gold = 15f)
|
val giftAmount = Stats(gold = 15f)
|
||||||
|
val faithAmount = Stats(faith = 4f)
|
||||||
// Later, religious city-states will also gift gold, making this the better implementation
|
// Later, religious city-states will also gift gold, making this the better implementation
|
||||||
// For now, it might be overkill though.
|
// For now, it might be overkill though.
|
||||||
var meetString = "[${civName}] has given us [${giftAmount}] as a token of goodwill for meeting us"
|
var meetString = "[${civName}] has given us [${giftAmount}] as a token of goodwill for meeting us"
|
||||||
|
val religionMeetString = "[${civName}] has also given us [${faithAmount}]"
|
||||||
if (diplomacy.filter { it.value.otherCiv().isMajorCiv() }.count() == 1) {
|
if (diplomacy.filter { it.value.otherCiv().isMajorCiv() }.count() == 1) {
|
||||||
giftAmount.timesInPlace(2f)
|
giftAmount.timesInPlace(2f)
|
||||||
meetString = "[${civName}] has given us [${giftAmount}] as we are the first major civ to meet them"
|
meetString = "[${civName}] has given us [${giftAmount}] as we are the first major civ to meet them"
|
||||||
@ -418,6 +420,12 @@ class CivilizationInfo {
|
|||||||
else
|
else
|
||||||
otherCiv.addNotification(meetString, NotificationIcon.Gold)
|
otherCiv.addNotification(meetString, NotificationIcon.Gold)
|
||||||
|
|
||||||
|
if (otherCiv.isCityState() && otherCiv.canGiveStat(Stat.Faith)){
|
||||||
|
otherCiv.addNotification(religionMeetString, NotificationIcon.Faith)
|
||||||
|
|
||||||
|
for ((key, value) in faithAmount)
|
||||||
|
otherCiv.addStat(key, value.toInt())
|
||||||
|
}
|
||||||
for ((key, value) in giftAmount)
|
for ((key, value) in giftAmount)
|
||||||
otherCiv.addStat(key, value.toInt())
|
otherCiv.addStat(key, value.toInt())
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
package com.unciv.logic.civilization
|
package com.unciv.logic.civilization
|
||||||
|
|
||||||
|
import com.unciv.logic.civilization.diplomacy.RelationshipLevel
|
||||||
import com.unciv.logic.map.MapUnit
|
import com.unciv.logic.map.MapUnit
|
||||||
import com.unciv.models.Religion
|
import com.unciv.models.Religion
|
||||||
import com.unciv.models.ruleset.Belief
|
import com.unciv.models.ruleset.Belief
|
||||||
import com.unciv.models.ruleset.BeliefType
|
import com.unciv.models.ruleset.BeliefType
|
||||||
|
import com.unciv.models.ruleset.Era
|
||||||
import com.unciv.ui.pickerscreens.BeliefContainer
|
import com.unciv.ui.pickerscreens.BeliefContainer
|
||||||
import com.unciv.ui.utils.toPercent
|
import com.unciv.ui.utils.toPercent
|
||||||
import kotlin.random.Random
|
import kotlin.random.Random
|
||||||
|
Reference in New Issue
Block a user