Enum Class CardCostModifierArg
java.lang.Object
java.lang.Enum<CardCostModifierArg>
net.demilich.metastone.game.spells.desc.manamodifier.CardCostModifierArg
- All Implemented Interfaces:
Serializable
,Comparable<CardCostModifierArg>
,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe card type to filter against.TheClass
of this description.ACondition
for this card cost modifier to be activeWhen this trigger fires, theCardCostModifier
stops affecting theCard
it applies to.When this trigger fires, theCardCostModifier
stops affecting theCard
it applies to.A filter to apply to theTARGET
.Specifies the minimum value that theCardCostModifier
can reduce the cost to.AnAlgebraicOperation
that corresponds to how the cost modification should apply.The card's race that is required for this modifier to apply.An attribute that is required for this modifier to apply.The entities that thisCardCostModifier
should apply to.The player against which we should evaluate thisCardCostModifier
, considering theEnchantment.getHostReference()
andEntity.getOwner()
.A trigger that, when fired, turns off thisCardCostModifier
effect.A trigger that, when fired, turns on thisCardCostModifier
effect.The value that will be interpreted by the givenOPERATION
to determine the final cost effect. -
Method Summary
Modifier and TypeMethodDescriptionstatic CardCostModifierArg
Returns the enum constant of this class with the specified name.static CardCostModifierArg[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CLASS
TheClass
of this description. -
CARD_TYPE
The card type to filter against. -
REQUIRED_ATTRIBUTE
An attribute that is required for this modifier to apply. -
EXPIRATION_TRIGGER
When this trigger fires, theCardCostModifier
stops affecting theCard
it applies to. -
EXPIRATION_TRIGGERS
When this trigger fires, theCardCostModifier
stops affecting theCard
it applies to. -
MIN_VALUE
Specifies the minimum value that theCardCostModifier
can reduce the cost to.Implements Summoning Portal.
-
VALUE
The value that will be interpreted by the givenOPERATION
to determine the final cost effect.By default, the card cost modifier's operation is
AlgebraicOperation.ADD
, so a negative value will reduce the cost of the card when specified here without an operation. -
RACE
The card's race that is required for this modifier to apply. -
TARGET_PLAYER
The player against which we should evaluate thisCardCostModifier
, considering theEnchantment.getHostReference()
andEntity.getOwner()
. -
TOGGLE_ON_TRIGGER
A trigger that, when fired, turns on thisCardCostModifier
effect. -
TOGGLE_OFF_TRIGGER
A trigger that, when fired, turns off thisCardCostModifier
effect. -
TARGET
The entities that thisCardCostModifier
should apply to. -
FILTER
A filter to apply to theTARGET
. -
OPERATION
AnAlgebraicOperation
that corresponds to how the cost modification should apply.The best way to interpret this operation is, for a given card entity:
Card.getBaseManaCost()
AlgebraicOperation
VALUE
.If there are multiple card cost modifiers applying on the given
Card
, then the game evaluates the modifiers that came into play earliest, and uses their resulting values on the left-hand side.For example, to reduce the cost of the card by
1
, this attribute should be set toAlgebraicOperation.SUBTRACT
and theVALUE
should be1
.- See Also:
-
to see more on how operations are evaluated.
-
CONDITION
ACondition
for this card cost modifier to be active
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-