Class ExecutingEntityTargetingStrategy
java.lang.Object
de.gurkenlabs.litiengine.abilities.targeting.TargetingStrategy
de.gurkenlabs.litiengine.abilities.targeting.ExecutingEntityTargetingStrategy
A targeting strategy that always targets the entity executing the ability.
This strategy ignores the impact area entirely and resolves to a single-element collection containing the executor itself. It is useful for self-cast abilities such as heals, buffs, or other effects that should only affect the caster.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newExecutingEntityTargetingStrategy. -
Method Summary
Modifier and TypeMethodDescriptionfindTargetsInternal(Shape impactArea, ICombatEntity executor) Returns the executing entity as the sole target, regardless of the given impact area.Methods inherited from class TargetingStrategy
custom, enemies, executingEntity, findTargets, fixed, friendly, friendlyDead, isMultiTarget, none, prioritizeByDistance, setCustomTargetPriorityComparator, setMultiTarget, setPrioritizeByDistance, withCondition
-
Constructor Details
-
ExecutingEntityTargetingStrategy
public ExecutingEntityTargetingStrategy()Creates a new
ExecutingEntityTargetingStrategy.The strategy is configured as single-target and unsorted, since the resulting collection always contains exactly one entity (the executor).
-
-
Method Details
-
findTargetsInternal
Returns the executing entity as the sole target, regardless of the given impact area.- Specified by:
findTargetsInternalin classTargetingStrategy- Parameters:
impactArea- the shape representing the ability's area of effect; ignored by this strategy.executor- the combat entity executing the ability; this entity is returned as the only target.- Returns:
- an immutable collection containing exactly the
executor.
-