Remove unique units from barbarians.

This commit is contained in:
Duan Tao 2019-01-26 19:04:13 +08:00
parent ddcf3dd83e
commit 624f83d109

View file

@ -93,7 +93,7 @@ class GameInfo {
val allResearchedTechs = civilizations.filterNot { it.isBarbarianCivilization() }
.flatMap { it.tech.researchedTechnologies }.map{ it.name }
val unitList = GameBasics.Units.values.filter { !it.unitType.isCivilian() }
val unitList = GameBasics.Units.values.filter { !it.unitType.isCivilian() && it.uniqueTo == null }
.filter{ allResearchedTechs.contains(it.requiredTech) }
val unit = if (unitList.isEmpty()) "Warrior" else unitList.getRandom().name