Class AbilityEffect

java.lang.Object
de.gurkenlabs.litiengine.abilities.effects.Effect
de.gurkenlabs.litiengine.abilities.effects.AbilityEffect
All Implemented Interfaces:
IUpdateable

public abstract class AbilityEffect extends Effect
The `AbilityEffect` class is an abstract class that represents an effect associated with a specific ability. It extends the `Effect` class and is used to apply effects that are tied to a particular ability.

This class provides a way to manage and access the ability that triggers the effect, allowing for the integration of ability-specific attributes such as the executor and duration.

  • Constructor Details

    • AbilityEffect

      protected AbilityEffect(TargetingStrategy targetingStrategy, Ability ability)
      Constructs a new `AbilityEffect` with the specified targeting strategy and ability.

      The effect will inherit the executor and duration attributes from the provided ability.

      Parameters:
      targetingStrategy - The strategy used to select the targets for this effect.
      ability - The ability associated with this effect, providing information such as the executor and duration.
  • Method Details

    • getAbility

      public Ability getAbility()