From 17333ec0d353c678ab1626be48ae950843ad9ee3 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Sun, 3 Jan 2021 19:15:27 +0200 Subject: [PATCH] Fixed crash when attempting to issue a 'connect to capital' quest for a civ with no capital --- core/src/com/unciv/logic/civilization/QuestManager.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/civilization/QuestManager.kt b/core/src/com/unciv/logic/civilization/QuestManager.kt index 3ddca6535e..3ed69390fd 100644 --- a/core/src/com/unciv/logic/civilization/QuestManager.kt +++ b/core/src/com/unciv/logic/civilization/QuestManager.kt @@ -295,7 +295,8 @@ class QuestManager { return when (quest.name) { QuestName.ClearBarbarianCamp.value -> getBarbarianEncampmentForQuest(challenger) != null - QuestName.Route.value -> civInfo.hasEverBeenFriendWith(challenger) && !civInfo.isCapitalConnectedToCity(challenger.getCapital()) + QuestName.Route.value -> civInfo.hasEverBeenFriendWith(challenger) && challenger.cities.any() + && !civInfo.isCapitalConnectedToCity(challenger.getCapital()) QuestName.ConnectResource.value -> civInfo.hasEverBeenFriendWith(challenger) && getResourceForQuest(challenger) != null QuestName.ConstructWonder.value -> civInfo.hasEverBeenFriendWith(challenger) && getWonderToBuildForQuest(challenger) != null QuestName.GreatPerson.value -> civInfo.hasEverBeenFriendWith(challenger) && getGreatPersonForQuest(challenger) != null