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