mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-11 00:08:58 +07:00
Fixed a crash when marrying a city-state without cities (#7684)
This commit is contained in:
@ -284,6 +284,7 @@ class CityStateFunctions(val civInfo: CivilizationInfo) {
|
||||
fun canBeMarriedBy(otherCiv: CivilizationInfo): Boolean {
|
||||
return (!civInfo.isDefeated()
|
||||
&& civInfo.isCityState()
|
||||
&& civInfo.cities.any()
|
||||
&& civInfo.getDiplomacyManager(otherCiv).relationshipLevel() == RelationshipLevel.Ally
|
||||
&& !otherCiv.getDiplomacyManager(civInfo).hasFlag(DiplomacyFlags.MarriageCooldown)
|
||||
&& otherCiv.getMatchingUniques(UniqueType.CityStateCanBeBoughtForGold).any()
|
||||
|
Reference in New Issue
Block a user