mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-11 18:39:43 +07:00
Fixed a crash when killing a barbarian invading an unmet city-state (#5396)
This commit is contained in:
parent
e1b4c53573
commit
ec036dc3dd
@ -157,7 +157,7 @@ object Battle {
|
||||
// CS friendship from killing barbarians
|
||||
if (defeatedUnit.matchesCategory("Barbarian") && defeatedUnit.matchesCategory("Military") && civUnit.getCivInfo().isMajorCiv()) {
|
||||
for (cityState in UncivGame.Current.gameInfo.getAliveCityStates()) {
|
||||
if (defeatedUnit.unit.threatensCiv(cityState)) {
|
||||
if (civUnit.getCivInfo().knows(cityState) && defeatedUnit.unit.threatensCiv(cityState)) {
|
||||
cityState.threateningBarbarianKilledBy(civUnit.getCivInfo())
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user