mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 01:08:25 +07:00
Barbarians can be never defeated (#1940)
This commit is contained in:
@ -279,6 +279,7 @@ class CivilizationInfo {
|
|||||||
/** Returns true if the civ was fully initialized and has no cities or settlers remaining */
|
/** Returns true if the civ was fully initialized and has no cities or settlers remaining */
|
||||||
fun isDefeated()= cities.isEmpty()
|
fun isDefeated()= cities.isEmpty()
|
||||||
&& exploredTiles.isNotEmpty() // Dirty hack: exploredTiles are empty only before starting units are placed
|
&& 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 })
|
&& (citiesCreated > 0 || !getCivUnits().any { it.name == Constants.settler })
|
||||||
|
|
||||||
fun getEra(): TechEra {
|
fun getEra(): TechEra {
|
||||||
|
Reference in New Issue
Block a user