Barbarians can be never defeated (#1940)

This commit is contained in:
JackRainy 2020-02-15 19:05:57 +02:00 committed by GitHub
parent 19cac1f7bf
commit cd3004fedb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -279,6 +279,7 @@ class CivilizationInfo {
/** Returns true if the civ was fully initialized and has no cities or settlers remaining */
fun isDefeated()= cities.isEmpty()
&& exploredTiles.isNotEmpty() // Dirty hack: exploredTiles are empty only before starting units are placed
&& !isBarbarian() // Barbarians can be never defeated
&& (citiesCreated > 0 || !getCivUnits().any { it.name == Constants.settler })
fun getEra(): TechEra {