mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-07 14:02:48 +07:00
Correct check for the city connection quest (#6875)
This commit is contained in:
parent
eb1c874e24
commit
a272e8e7ba
@ -366,7 +366,7 @@ class QuestManager {
|
||||
return when (quest.name) {
|
||||
QuestName.ClearBarbarianCamp.value -> getBarbarianEncampmentForQuest() != null
|
||||
QuestName.Route.value -> !challenger.cities.none()
|
||||
&& !civInfo.isCapitalConnectedToCity(challenger.getCapital())
|
||||
&& !challenger.isCapitalConnectedToCity(civInfo.getCapital())
|
||||
// Need to have a city within 7 tiles on the same continent
|
||||
&& challenger.cities.any { it.getCenterTile().aerialDistanceTo(civInfo.getCapital().getCenterTile()) <= 7
|
||||
&& it.getCenterTile().getContinent() == civInfo.getCapital().getCenterTile().getContinent() }
|
||||
@ -393,7 +393,7 @@ class QuestManager {
|
||||
private fun isComplete(assignedQuest: AssignedQuest): Boolean {
|
||||
val assignee = civInfo.gameInfo.getCivilization(assignedQuest.assignee)
|
||||
return when (assignedQuest.questName) {
|
||||
QuestName.Route.value -> civInfo.isCapitalConnectedToCity(assignee.getCapital())
|
||||
QuestName.Route.value -> assignee.isCapitalConnectedToCity(civInfo.getCapital())
|
||||
QuestName.ConnectResource.value -> assignee.detailedCivResources.map { it.resource }.contains(civInfo.gameInfo.ruleSet.tileResources[assignedQuest.data1])
|
||||
QuestName.ConstructWonder.value -> assignee.cities.any { it.cityConstructions.isBuilt(assignedQuest.data1) }
|
||||
QuestName.GreatPerson.value -> assignee.getCivGreatPeople().any { it.baseUnit.getReplacedUnit(civInfo.gameInfo.ruleSet).name == assignedQuest.data1 }
|
||||
|
Loading…
Reference in New Issue
Block a user