Class EnemyTargetingStrategy


public class EnemyTargetingStrategy extends OtherEntityTargetingStrategy

A targeting strategy that selects enemy entities as ability targets.

This strategy extends OtherEntityTargetingStrategy and is preconfigured to exclude the executing entity itself as well as any friendly entities, thereby restricting the set of valid targets to enemies only.

See Also:
  • Constructor Details

    • EnemyTargetingStrategy

      public EnemyTargetingStrategy(boolean multiTarget, boolean sortByDistance, boolean includeDead)
      Creates a new EnemyTargetingStrategy.
      Parameters:
      multiTarget - if true, the strategy may return multiple matching targets; otherwise only a single target is selected.
      sortByDistance - if true, the resulting targets are ordered by their distance to the executing entity (closest first).
      includeDead - if true, dead entities are considered valid targets; otherwise only living entities are selected.