Class AttributeCondition
java.lang.Object
net.demilich.metastone.game.spells.desc.condition.Condition
net.demilich.metastone.game.spells.desc.condition.AttributeCondition
- All Implemented Interfaces:
Serializable,HasDesc<ConditionDesc>
true when the target or ConditionArg.TARGET has an attribute ConditionArg.ATTRIBUTE
that evaluates to true with the ConditionArg.OPERATION.
Only supports single targets.
Uses the ComparisonOperation.HAS by default, or compares with the ConditionArg.VALUE.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanisFulfilled(GameContext context, Player player, ConditionDesc desc, Entity source, Entity target) protected booleanExpects a single target only.Methods inherited from class net.demilich.metastone.game.spells.desc.condition.Condition
equals, getDesc, hashCode, isFulfilled, isFulfilledForTarget, multipleTargetsEvaluatedAsAnd, multipleTargetsEvaluatedAsOr, requiresAtLeastOneTarget, setDesc, targetConditionArgOverridesSuppliedTarget, usesFilter
-
Constructor Details
-
AttributeCondition
-
-
Method Details
-
isFulfilled
protected boolean isFulfilled(GameContext context, Player player, ConditionDesc desc, Entity source, Entity target) - Specified by:
isFulfilledin classCondition
-
singleTargetOnly
protected boolean singleTargetOnly()Description copied from class:ConditionExpects a single target only. Used in conjunction withCondition.targetConditionArgOverridesSuppliedTarget().- Overrides:
singleTargetOnlyin classCondition- Returns:
-