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;
}
Aggregations