Search in sources :

Example 6 with ActiveAbility

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

the class WaitEffect method getAbility.

protected Ability getAbility(Ref ref) {
    Effect effect = new Effects(new RemoveBuffEffect(getBuffName()));
    Ability ability = new ActiveAbility(new FixedTargeting(KEYS.SOURCE), effect);
    ability.setRef(ref);
    return ability;
}
Also used : ActiveAbility(main.ability.ActiveAbility) Ability(main.ability.Ability) ActiveAbility(main.ability.ActiveAbility) RemoveBuffEffect(eidolons.ability.effects.oneshot.buff.RemoveBuffEffect) FixedTargeting(main.elements.targeting.FixedTargeting) AddBuffEffect(eidolons.ability.effects.attachment.AddBuffEffect) Effect(main.ability.effects.Effect) MicroEffect(main.ability.effects.MicroEffect) SetCustomModeEffect(eidolons.ability.effects.continuous.SetCustomModeEffect) RemoveBuffEffect(eidolons.ability.effects.oneshot.buff.RemoveBuffEffect) AddTriggerEffect(eidolons.ability.effects.attachment.AddTriggerEffect) OneshotEffect(main.ability.effects.OneshotEffect) Effects(main.ability.effects.Effects)

Example 7 with ActiveAbility

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

the class ObjectiveMaster method initObjectiveTrigger.

public static void initObjectiveTrigger(OBJECTIVE_TYPE type, String data, Location mission) {
    Dungeon dungeon = mission.getBossLevel();
    objectiveData = data;
    STANDARD_EVENT_TYPE eventType = null;
    Conditions conditions = new Conditions();
    Abilities abilities = new Abilities();
    abilities.add(new ActiveAbility(new FixedTargeting(), new EndGameEffect(true)));
    Ref ref = new Ref();
    Integer id = null;
    String name;
    switch(type) {
        case BOSS:
            eventType = STANDARD_EVENT_TYPE.UNIT_HAS_BEEN_KILLED;
            Coordinates c = DC_ObjInitializer.getCoordinatesFromObjString(objectiveData);
            // new Coordinates(s);
            name = DC_ObjInitializer.getNameFromObjString(objectiveData);
            // conditions.add(new ObjComparison(KEY, KEYS.TARGET.toString()));
            break;
        case CAPTURE_HOLD:
            // "As long as
            break;
        case SURVIVE_TIME:
            break;
        case ESCAPE:
            // eventType = STANDARD_EVENT_TYPE.UNIT_GONE_THRU_ENTRANCE;
            break;
        case ITEM:
            break;
    }
    // some objectives will be initialized on a condition, e.g. capture-hold
    addTrigger(eventType, conditions, abilities);
}
Also used : ActiveAbility(main.ability.ActiveAbility) Ref(main.entity.Ref) Abilities(main.ability.Abilities) FixedTargeting(main.elements.targeting.FixedTargeting) Dungeon(eidolons.game.battlecraft.logic.dungeon.universal.Dungeon) STANDARD_EVENT_TYPE(main.game.logic.event.Event.STANDARD_EVENT_TYPE) EndGameEffect(eidolons.ability.effects.special.meta.EndGameEffect) Coordinates(main.game.bf.Coordinates) Conditions(main.elements.conditions.Conditions)

Example 8 with ActiveAbility

use of main.ability.ActiveAbility 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)

Example 9 with ActiveAbility

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

the class BlockEffect method applyThis.

@Override
public boolean applyThis() {
    // effect interrupt
    String OBJ_REF = null;
    switch(BLOCK_TYPE) {
        case ATTACK:
            event_type = Event.STANDARD_EVENT_TYPE.UNIT_IS_BEING_ATTACKED;
            conditions.add(new RefCondition(KEYS.EVENT_TARGET, KEYS.SOURCE, false));
            break;
        case HOSTILE_ACTION:
            event_type = Event.STANDARD_EVENT_TYPE.HOSTILE_ACTION;
            conditions.add(new RefCondition(KEYS.EVENT_TARGET, KEYS.SOURCE, false));
            break;
        case DAMAGE:
            event_type = Event.STANDARD_EVENT_TYPE.UNIT_IS_BEING_DEALT_TOUGHNESS_DAMAGE;
            break;
        case DAMAGE_FROM_SOURCE:
            break;
        case DAMAGE_TYPE:
            break;
        case HOSTILE_SPELLS:
            event_type = Event.STANDARD_EVENT_TYPE.SPELL_BEING_RESOLVED;
            conditions.add(new RefCondition(KEYS.EVENT_TARGET, KEYS.TARGET, false));
            OBJ_REF = Ref.KEYS.SPELL.name();
            break;
        case SPELLS_FROM_SOURCE:
            break;
        default:
            break;
    }
    effects = new Effects(new InterruptEffect(OBJ_REF));
    ActiveAbility abilities = new ActiveAbility(new FixedTargeting(KEYS.SOURCE), effects);
    abilities.setRef(ref);
    new AddTriggerEffect(event_type, conditions, abilities).apply(ref);
    return true;
}
Also used : ActiveAbility(main.ability.ActiveAbility) InterruptEffect(main.ability.effects.triggered.InterruptEffect) FixedTargeting(main.elements.targeting.FixedTargeting) RefCondition(main.elements.conditions.RefCondition) AddTriggerEffect(eidolons.ability.effects.attachment.AddTriggerEffect)

Example 10 with ActiveAbility

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

the class DamageInversionEffect method applyThis.

@Override
public boolean applyThis() {
    // endurance damage; modify endurance only? above base?
    Targeting targeting = new FixedTargeting(KEYS.SOURCE);
    Effects effects = new Effects();
    if (restoreEndurance) {
        ModifyValueEffect effect = new ModifyValueEffect(PARAMS.C_ENDURANCE, code, formula.toString());
        if (!restoreEnduranceAboveBase) {
            effect.setMaxParam(PARAMS.ENDURANCE);
        }
        effects.add(effect);
    }
    if (restoreToughness) {
        ModifyValueEffect effect = new ModifyValueEffect(PARAMS.C_TOUGHNESS, code, formula.toString());
        if (!restoreToughnessAboveBase) {
            effect.setMaxParam(PARAMS.TOUGHNESS);
        }
        effects.add(effect);
    }
    ActiveAbility ability = new ActiveAbility(targeting, effects);
    new AddTriggerEffect(event_type, conditions, ability).apply(ref);
    return true;
}
Also used : ActiveAbility(main.ability.ActiveAbility) FixedTargeting(main.elements.targeting.FixedTargeting) Targeting(main.elements.targeting.Targeting) FixedTargeting(main.elements.targeting.FixedTargeting) ModifyValueEffect(eidolons.ability.effects.common.ModifyValueEffect) Effects(main.ability.effects.Effects) AddTriggerEffect(eidolons.ability.effects.attachment.AddTriggerEffect)

Aggregations

ActiveAbility (main.ability.ActiveAbility)12 FixedTargeting (main.elements.targeting.FixedTargeting)8 AddTriggerEffect (eidolons.ability.effects.attachment.AddTriggerEffect)7 Effects (main.ability.effects.Effects)7 ModifyValueEffect (eidolons.ability.effects.common.ModifyValueEffect)4 Ability (main.ability.Ability)4 Targeting (main.elements.targeting.Targeting)4 Abilities (main.ability.Abilities)3 AutoTargeting (main.elements.targeting.AutoTargeting)3 Ref (main.entity.Ref)3 AddBuffEffect (eidolons.ability.effects.attachment.AddBuffEffect)2 RemoveBuffEffect (eidolons.ability.effects.oneshot.buff.RemoveBuffEffect)2 Effect (main.ability.effects.Effect)2 Conditions (main.elements.conditions.Conditions)2 RefCondition (main.elements.conditions.RefCondition)2 AbilityEffect (eidolons.ability.effects.containers.AbilityEffect)1 ZoneEffect (eidolons.ability.effects.containers.customtarget.ZoneEffect)1 SetCustomModeEffect (eidolons.ability.effects.continuous.SetCustomModeEffect)1 ActivateEffect (eidolons.ability.effects.oneshot.activation.ActivateEffect)1 EndGameEffect (eidolons.ability.effects.special.meta.EndGameEffect)1