Skip to content
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
b4bdfab
Adding religous city states to unciv!
MorphicDreamer Sep 8, 2021
8c9b59a
Adding religous city states to unciv!
MorphicDreamer Sep 8, 2021
23d23f0
Adding religous city states to unciv!
MorphicDreamer Sep 8, 2021
0d52f61
Adding religous city states to unciv!
MorphicDreamer Sep 8, 2021
984fec1
Adding religous city states to unciv!
MorphicDreamer Sep 8, 2021
8f19cda
Adding religous city states to unciv!
MorphicDreamer Sep 8, 2021
9e0a21c
Merge branch 'yairm210:master' into master
MorphicDreamer Sep 8, 2021
dd9abab
Adding religous city states to unciv!
MorphicDreamer Sep 9, 2021
8a2764c
Adding religous city states to unciv!
MorphicDreamer Sep 9, 2021
362f128
Adding religous city states to unciv!
MorphicDreamer Sep 9, 2021
dbbff1d
Adding religous city states to unciv!
MorphicDreamer Sep 9, 2021
04db1dc
Adding religous city states to unciv!
MorphicDreamer Sep 9, 2021
09fa5b7
Adding religous city states to unciv!
MorphicDreamer Sep 9, 2021
6fd18e3
Adding religous city states to unciv!
MorphicDreamer Sep 9, 2021
c2a97cd
Adding religous city states to unciv!
MorphicDreamer Sep 9, 2021
4f0fc9d
Adding religous city states to unciv!
MorphicDreamer Sep 9, 2021
a362b5a
Adding religous city states to unciv!
MorphicDreamer Sep 9, 2021
368071b
Merge branch 'master' into master
MorphicDreamer Sep 9, 2021
c970044
Adding religous city states to unciv!
MorphicDreamer Sep 9, 2021
b147470
Merge remote-tracking branch 'origin/master'
MorphicDreamer Sep 9, 2021
3c8aaed
Adding religous city states to unciv!
MorphicDreamer Sep 9, 2021
0e61cd0
Adding religous city states to unciv!
MorphicDreamer Sep 9, 2021
89d4aa4
Adding religous city states to unciv!
MorphicDreamer Sep 9, 2021
f356196
Adding religous city states to unciv!
MorphicDreamer Sep 10, 2021
f742a3e
Merge branch 'master' into master
MorphicDreamer Sep 10, 2021
92bf9d9
Adding religous city states to unciv!
MorphicDreamer Sep 10, 2021
a0dc8eb
Adding religous city states to unciv!
MorphicDreamer Sep 10, 2021
b9fa792
Adding religous city states to unciv!
MorphicDreamer Sep 10, 2021
8678be2
Adding religous city states to unciv!
MorphicDreamer Sep 10, 2021
bba4f47
Adding religous city states to unciv!
MorphicDreamer Sep 10, 2021
8df8e61
Adding religous city states to unciv!
MorphicDreamer Sep 10, 2021
b39e926
Adding religous city states to unciv!
MorphicDreamer Sep 10, 2021
d224202
Adding religous city states to unciv!
MorphicDreamer Sep 10, 2021
51aa238
Adding religous city states to unciv!
MorphicDreamer Sep 10, 2021
074dcf0
Adding religous city states to unciv!
MorphicDreamer Sep 11, 2021
dc69f8e
Adding religous city states to unciv!
MorphicDreamer Sep 11, 2021
c47601e
Merge branch 'yairm210:master' into master
MorphicDreamer Sep 11, 2021
57c01b6
Merge branch 'yairm210:master' into master
MorphicDreamer Sep 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/assets/Atlases.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[Tech,Flags,Skin,Construction]
[Construction,Flags,Skin,Tech]
18 changes: 18 additions & 0 deletions android/assets/jsons/Civ V - Vanilla/Eras.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
"Cultured": ["Provides [3] [Culture] per turn"],
"Maritime": ["Provides [2] [Food] [in capital]"],
"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]", "Provides [1] [Food] [in all cities]"],
"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]
Expand All @@ -42,12 +44,14 @@
"Cultured": ["Provides [3] [Culture] per turn"],
"Maritime": ["Provides [2] [Food] [in capital]"],
"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]", "Provides [1] [Food] [in all cities]"],
"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]
Expand All @@ -70,12 +74,14 @@
"Cultured": ["Provides [6] [Culture] per turn"],
"Maritime": ["Provides [2] [Food] [in capital]"],
"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]", "Provides [1] [Food] [in all cities]"],
"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]
Expand All @@ -99,12 +105,14 @@
"Cultured": ["Provides [6] [Culture] per turn"],
"Maritime": ["Provides [2] [Food] [in capital]"],
"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]", "Provides [1] [Food] [in all cities]"],
"Mercantile": ["Provides [3] Happiness", "Provides a unique luxury"],
"Religious": ["Provides [12] [Faith] per turn"],
"Militaristic": ["Provides military units every [17] turns"]
},
"iconRGB": [104, 58, 183]
Expand All @@ -129,12 +137,14 @@
"Cultured": ["Provides [13] [Culture] per turn"],
"Maritime": ["Provides [2] [Food] [in capital]"],
"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]", "Provides [1] [Food] [in all cities]"],
"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],
Expand Down Expand Up @@ -164,12 +174,14 @@
"Cultured": ["Provides [13] [Culture] per turn"],
"Maritime": ["Provides [2] [Food] [in capital]"],
"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]", "Provides [1] [Food] [in all cities]"],
"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],
Expand Down Expand Up @@ -200,12 +212,14 @@
"Cultured": ["Provides [13] [Culture] per turn"],
"Maritime": ["Provides [2] [Food] [in capital]"],
"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]", "Provides [1] [Food] [in all cities]"],
"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],
Expand Down Expand Up @@ -240,12 +254,14 @@
"Cultured": ["Provides [13] [Culture] per turn"],
"Maritime": ["Provides [2] [Food] [in capital]"],
"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]", "Provides [1] [Food] [in all cities]"],
"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],
Expand Down Expand Up @@ -279,12 +295,14 @@
"Cultured": ["Provides [13] [Culture] per turn"],
"Maritime": ["Provides [2] [Food] [in capital]"],
"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]", "Provides [1] [Food] [in all cities]"],
"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],
Expand Down
36 changes: 36 additions & 0 deletions android/assets/jsons/Civ V - Vanilla/Nations.json
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,42 @@
"innerColor": [224,224,224],
"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!",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cute :)

"outerColor": [0, 0, 0],
"innerColor": [198,255,192],
"cities": ["Jerusalem"]
},



Expand Down
1 change: 1 addition & 0 deletions android/assets/jsons/translations/template.properties
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ A [greatPerson] has been born in [cityName]! =
We have encountered [civName]! =
[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 also given us [stats] =
Cannot provide unit upkeep for [unitName] - unit has been disbanded! =
[cityName] has grown! =
[cityName] is starving! =
Expand Down
10 changes: 9 additions & 1 deletion core/src/com/unciv/logic/GameStarter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,20 @@ object GameStarter {

val civNamesWithStartingLocations = gameInfo.tileMap.startingLocationsByNation.keys

val availableCityStatesNames = Stack<String>()
var 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,
// 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
.shuffled().sortedByDescending { it in civNamesWithStartingLocations })

if (!newGameParameters.religionEnabled){
for(cityStateName in availableCityStatesNames){
val civ = CivilizationInfo(cityStateName)
if (civ.cityStateType == CityStateType.Religious)
availableCityStatesNames.remove(cityStateName)
}
}

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())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ class CityStateFunctions(val civInfo: CivilizationInfo) {
civInfo.cityStateType == CityStateType.Mercantile && statType == Stat.Happiness -> true
civInfo.cityStateType == CityStateType.Cultured && statType == Stat.Culture -> true
civInfo.cityStateType == CityStateType.Maritime && statType == Stat.Food -> true
civInfo.cityStateType == CityStateType.Religious && statType == Stat.Faith ->true
else -> false
}
}
Expand Down
3 changes: 2 additions & 1 deletion core/src/com/unciv/logic/civilization/CityStateType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ enum class CityStateType(val color: String = "") {
Cultured("#8b60ff"),
Maritime("#38ff70"),
Mercantile("#ffd800"),
Militaristic("#ff0000")
Militaristic("#ff0000"),
Religious("#FFFFFF")
}

enum class CityStatePersonality {
Expand Down
8 changes: 8 additions & 0 deletions core/src/com/unciv/logic/civilization/CivilizationInfo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,11 @@ class CivilizationInfo {
val cityStateLocation = if (cities.isEmpty()) null else getCapital().location

val giftAmount = Stats(gold = 15f)
val faithAmount = Stats(faith = 4f)
// Later, religious city-states will also gift gold, making this the better implementation
// For now, it might be overkill though.
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) {
giftAmount.timesInPlace(2f)
meetString = "[${civName}] has given us [${giftAmount}] as we are the first major civ to meet them"
Expand All @@ -408,6 +410,12 @@ class CivilizationInfo {
else
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)
otherCiv.addStat(key, value.toInt())
}
Expand Down
2 changes: 2 additions & 0 deletions core/src/com/unciv/logic/civilization/ReligionManager.kt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package com.unciv.logic.civilization

import com.unciv.logic.civilization.diplomacy.RelationshipLevel
import com.unciv.logic.map.MapUnit
import com.unciv.models.Religion
import com.unciv.models.ruleset.Belief
import com.unciv.models.ruleset.BeliefType
import com.unciv.models.ruleset.Era
import com.unciv.ui.pickerscreens.BeliefContainer
import com.unciv.ui.utils.toPercent
import kotlin.random.Random
Expand Down