AI will not waste promotions on Heal Instantly

This commit is contained in:
Yair Morgenstern 2023-08-10 11:13:51 +03:00
parent 95b8fab950
commit 654b9f80f2

View File

@ -158,6 +158,7 @@ object UnitAutomation {
if (unit.promotions.canBePromoted()) {
val availablePromotions = unit.promotions.getAvailablePromotions()
.filterNot { it.hasUnique(UniqueType.SkipPromotion) }
if (availablePromotions.any())
unit.promotions.addPromotion(availablePromotions.toList().random().name)
}