Search in sources :

Example 1 with PassiveAbility

use of main.ability.PassiveAbility in project Eidolons by IDemiurge.

the class StateCloner method cloneAbility.

private Ability cloneAbility(Ability abilities) {
    Effects effects = new Effects();
    for (Effect e : abilities.getEffects()) {
        effects.add(cloneEffect(e));
    }
    Ability ability = (abilities instanceof ActiveAbility) ? new ActiveAbility(abilities.getTargeting(), effects) : new PassiveAbility(abilities.getTargeting(), effects);
    return ability;
}
Also used : ActiveAbility(main.ability.ActiveAbility) Ability(main.ability.Ability) PassiveAbility(main.ability.PassiveAbility) ActiveAbility(main.ability.ActiveAbility) ContinuousEffect(main.ability.effects.continuous.ContinuousEffect) Effect(main.ability.effects.Effect) PassiveAbility(main.ability.PassiveAbility) Effects(main.ability.effects.Effects)

Aggregations

Ability (main.ability.Ability)1 ActiveAbility (main.ability.ActiveAbility)1 PassiveAbility (main.ability.PassiveAbility)1 Effect (main.ability.effects.Effect)1 Effects (main.ability.effects.Effects)1 ContinuousEffect (main.ability.effects.continuous.ContinuousEffect)1