UnitCard class final

A unit card.

Inheritance
Implementers
Available extensions
Annotations
  • @immutable

Constructors

UnitCard({required CardSet cardSet, required int orderInSet, required String name, required Set<Aspect> aspects, required int cost, required Set<Trait> traits, required int power, required int health, Arena arena = Arena.ground})
Creates a unit card with the given properties.
UnitCard.unique({required CardSet cardSet, required int orderInSet, required String name, required String title, required Set<Aspect> aspects, required int cost, required Set<Trait> traits, required int power, required int health, Arena arena = Arena.ground})
Creates a unique unit card with the given properties.

Properties

arena → Arena
The arena the unit is played in.
finalinherited
aspects → Set<Aspect>
Aspects that the card belongs to.
finalinherited
cardSet → CardSet
The set the card belongs to.
finalinherited
cost → int
The cost of the card.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
health → int
The health of the unit.
finalinherited
name → String
The name of the card.
finalinherited
orderInSet → int
Within the set, the card's number from 1 to CardSet.totalCards.
finalinherited
power → int
The power of the unit.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
title → String?
The title of the card, if this is unique.
finalinherited
traits → Set<Trait>
Traits that the card has.
finalinherited
unique → bool
Whether the card is unique.
finalinherited

Methods

duplicate(int count) → Iterable<T>

Available on T, provided by the CardDuplicator extension

Returns an iterable that yields this card count times.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDebugString() → String
Returns a string representation of this object, suitable for debugging.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited