Class AdjacentEffectSpell
java.lang.Object
net.demilich.metastone.game.spells.Spell
net.demilich.metastone.game.spells.RelativeToTargetEffectSpell
net.demilich.metastone.game.spells.AdjacentEffectSpell
- All Implemented Interfaces:
Serializable,HasDesc<SpellDesc>
- Direct Known Subclasses:
AdjacentDeathrattleSpell
Casts
SpellArg.SPELL1 on the target minion, and SpellArg.SPELL2 on the minions adjacent to
the target.
Used to implement text like, "Also damages the minions next to whomever this attacks":
"trigger": {
"eventTrigger": {
"class": "AfterPhysicalAttackTrigger",
"hostTargetType": "IGNORE_OTHER_SOURCES",
"targetEntityType": "MINION"
},
"spell": {
"class": "AdjacentEffectSpell",
"target": "EVENT_TARGET",
"spell2": {
"class": "DamageSpell",
"value": {
"class": "AttributeValueProvider",
"target": "SELF",
"attribute": "ATTACK"
}
}
}
}
Observe that "damaging next to" is implemented by querying this minion's attack and dealing damage to adjacent
minions like a damage spell.- See Also:
-
for an abstract base class that can be used to cast spells relative to atarget.to directly target minions adjacent to thesource(i.e., the result of EntityReference#SELF).to direct target minions adjacent to the resolution of EntityReference#TARGET, the currently selected player target.- Serialized Form
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class net.demilich.metastone.game.spells.RelativeToTargetEffectSpell
onCastMethods inherited from class net.demilich.metastone.game.spells.Spell
cast, castForPlayer, checkArguments, getDesc, isNativeStateful, setDesc, toString
-
Constructor Details
-
AdjacentEffectSpell
public AdjacentEffectSpell()
-
-
Method Details
-
create
public static SpellDesc create(EntityReference target, SpellDesc primarySpell, SpellDesc secondarySpell) -
create
-
getActors
- Specified by:
getActorsin classRelativeToTargetEffectSpell
-