Search in sources :

Example 1 with AbilityEffect

use of eidolons.ability.effects.containers.AbilityEffect in project Eidolons by IDemiurge.

the class DialogueSyntax method getAbilities.

public static Abilities getAbilities(String text) {
    if (!text.contains(PARAM_MOD))
        return null;
    String parsedPart = text.substring(text.indexOf(PARAM_MOD), text.indexOf(PARAM_MOD_CLOSE));
    // specify KEY
    Targeting t = new FixedTargeting();
    Effects paramModEffects = getParamModEffects(parsedPart);
    if (!paramModEffects.getEffects().isEmpty()) {
        return new Abilities(new ActiveAbility(t, paramModEffects));
    }
    return new Abilities(new ActiveAbility(t, new AbilityEffect(parsedPart)));
}
Also used : ActiveAbility(main.ability.ActiveAbility) Abilities(main.ability.Abilities) FixedTargeting(main.elements.targeting.FixedTargeting) Targeting(main.elements.targeting.Targeting) FixedTargeting(main.elements.targeting.FixedTargeting) Effects(main.ability.effects.Effects) AbilityEffect(eidolons.ability.effects.containers.AbilityEffect)

Example 2 with AbilityEffect

use of eidolons.ability.effects.containers.AbilityEffect in project Eidolons by IDemiurge.

the class AddSpecialEffects method applyThis.

@Override
public boolean applyThis() {
    if (case_type == null) {
        case_type = new EnumMaster<SPECIAL_EFFECTS_CASE>().retrieveEnumConst(SPECIAL_EFFECTS_CASE.class, caseName);
    }
    if (effects == null) {
        effects = new AbilityEffect(abilName).getEffects();
    }
    if (!(ref.getTargetObj() instanceof DC_Obj)) {
        return false;
    }
    DC_Obj targetObj = (DC_Obj) ref.getTargetObj();
    targetObj.addSpecialEffect(case_type, effects);
    if (triggerEffect == null) {
        triggerEffect = getTriggerEffect();
        if (triggerEffect != null) {
            triggerEffect.apply(ref);
        }
    }
    return true;
}
Also used : DC_Obj(eidolons.entity.obj.DC_Obj) EnumMaster(main.system.auxiliary.EnumMaster) AbilityEffect(eidolons.ability.effects.containers.AbilityEffect)

Aggregations

AbilityEffect (eidolons.ability.effects.containers.AbilityEffect)2 DC_Obj (eidolons.entity.obj.DC_Obj)1 Abilities (main.ability.Abilities)1 ActiveAbility (main.ability.ActiveAbility)1 Effects (main.ability.effects.Effects)1 FixedTargeting (main.elements.targeting.FixedTargeting)1 Targeting (main.elements.targeting.Targeting)1 EnumMaster (main.system.auxiliary.EnumMaster)1