From 9efbbae6de8644161802c10218dcbe2ebe60a2ba Mon Sep 17 00:00:00 2001 From: Oskar Niesen Date: Thu, 11 Apr 2024 15:38:21 -0500 Subject: [PATCH] Added an extra barbarian check to nukes (#11454) --- core/src/com/unciv/logic/battle/Nuke.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/com/unciv/logic/battle/Nuke.kt b/core/src/com/unciv/logic/battle/Nuke.kt index e7288f4b48..d87fc2345b 100644 --- a/core/src/com/unciv/logic/battle/Nuke.kt +++ b/core/src/com/unciv/logic/battle/Nuke.kt @@ -39,6 +39,7 @@ object Nuke { if (defenderCiv == null) return // Allow nuking yourself! (Civ5 source: CvUnit::isNukeVictim) if (defenderCiv == attackerCiv || defenderCiv.isDefeated()) return + if (defenderCiv.isBarbarian()) return // Gleaned from Civ5 source - this disallows nuking unknown civs even in invisible tiles // https://github.com/Gedemon/Civ5-DLL/blob/master/CvGameCoreDLL_Expansion1/CvUnit.cpp#L5056 // https://github.com/Gedemon/Civ5-DLL/blob/master/CvGameCoreDLL_Expansion1/CvTeam.cpp#L986