Class AdjacentToPermanentCondition
java.lang.Object
net.demilich.metastone.game.spells.desc.condition.Condition
net.demilich.metastone.game.spells.desc.condition.AdjacentToPermanentCondition
- All Implemented Interfaces:
Serializable
,HasDesc<ConditionDesc>
true
if the source
(or the enchantment host) is adjacent to a Attribute.PERMANENT
, which is ordinarily untargetable.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
isFulfilled
(GameContext context, Player player, ConditionDesc desc, Entity source, Entity target) protected boolean
Expects a single target only.protected boolean
Whentrue
,ConditionArg.TARGET
is evaluated instead of being interpreted by the subclass, replacingtarget
if it is specified.Methods inherited from class net.demilich.metastone.game.spells.desc.condition.Condition
equals, getDesc, hashCode, isFulfilled, isFulfilledForTarget, multipleTargetsEvaluatedAsAnd, multipleTargetsEvaluatedAsOr, requiresAtLeastOneTarget, setDesc, usesFilter
-
Constructor Details
-
AdjacentToPermanentCondition
-
-
Method Details
-
isFulfilled
protected boolean isFulfilled(GameContext context, Player player, ConditionDesc desc, Entity source, Entity target) - Specified by:
isFulfilled
in classCondition
-
targetConditionArgOverridesSuppliedTarget
protected boolean targetConditionArgOverridesSuppliedTarget()Description copied from class:Condition
Whentrue
,ConditionArg.TARGET
is evaluated instead of being interpreted by the subclass, replacingtarget
if it is specified.When
false
, onlytarget
is passed.- Overrides:
targetConditionArgOverridesSuppliedTarget
in classCondition
- Returns:
-
singleTargetOnly
protected boolean singleTargetOnly()Description copied from class:Condition
Expects a single target only. Used in conjunction withCondition.targetConditionArgOverridesSuppliedTarget()
.- Overrides:
singleTargetOnly
in classCondition
- Returns:
-