UnitPromotions

class UnitPromotions

Functions

addPromotion
Link copied to clipboard
fun addPromotion(promotionName: String, isFree: Boolean = false)
canBePromoted
Link copied to clipboard
fun canBePromoted(): Boolean
clone
Link copied to clipboard
fun clone(): UnitPromotions
doDirectPromotionEffects
Link copied to clipboard
private fun doDirectPromotionEffects(promotion: Promotion)
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
getAvailablePromotions
Link copied to clipboard
fun getAvailablePromotions(): Sequence<Promotion>

Gets all promotions this unit could currently "buy" with enough XP Checks unit type, already acquired promotions, prerequisites and incompatibility uniques.

getPromotions
Link copied to clipboard
fun getPromotions(sorted: Boolean = false): Sequence<Promotion>

Gets this unit's promotions as objects.

hashCode
Link copied to clipboard
open fun hashCode(): Int
setTransients
Link copied to clipboard
fun setTransients(unit: MapUnit)
toString
Link copied to clipboard
open fun toString(): String
totalXpProduced
Link copied to clipboard
fun totalXpProduced(): Int
xpForNextPromotion
Link copied to clipboard
fun xpForNextPromotion(): Int

Properties

numberOfPromotions
Link copied to clipboard
var numberOfPromotions: Int = 0

The number of times this unit has been promoted using experience, not counting free promotions

promotions
Link copied to clipboard
var promotions: HashSet<String>

The names of the promotions this unit has acquired - see getPromotions for object access

unit
Link copied to clipboard
private lateinit var unit: MapUnit
XP
Link copied to clipboard
var XP: Int = 0

Experience this unit has accumulated on top of the last promotion

Sources

jvm source
Link copied to clipboard