UnitCard.leader constructor
UnitCard.leader({})
Creates a leader unit card with the given properties.
Restrictions
If any field is invalid, an error is thrown.
Implementation
UnitCard.leader({
required super.cardSet,
required super.orderInSet,
required super.name,
required super.aspects,
required super.cost,
required super.traits,
required String this.title,
required this.power,
required this.hp,
this.arena = Arena.ground,
}) : isLeader = true,
super(unique: true) {
checkNotEmpty(value: title!, name: 'title');
RangeError.checkNotNegative(power, 'power');
checkPositive(hp, 'hp');
}