Search in sources :

Example 1 with Abilities

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

use of main.ability.Abilities 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 3 with Abilities

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

the class ObjectiveMaster method addTrigger.

private static void addTrigger(EVENT_TEMPLATE ET, String eventData, SCRIPT_CONDITION_TEMPLATE CT, String conditionData, ACTION_TEMPLATE AT, String actionData) {
    STANDARD_EVENT_TYPE eventType = null;
    Conditions conditions = null;
    Abilities abilities = null;
    addTrigger(eventType, conditions, abilities);
}
Also used : Abilities(main.ability.Abilities) STANDARD_EVENT_TYPE(main.game.logic.event.Event.STANDARD_EVENT_TYPE) Conditions(main.elements.conditions.Conditions)

Example 4 with Abilities

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

the class DualAttackMaster method createDual.

private static DC_UnitAction createDual(DC_UnitAction main, DC_UnitAction offhand) {
    Costs costs = getDualCosts(main, offhand);
    // cooldown!
    ActiveAbility activateAttacks = new ActiveAbility(main.getTargeting(), new Effects(new ActivateEffect(main.getName(), true), new ActivateEffect(offhand.getName(), true)));
    Ability setCooldown = new ActiveAbility(new AutoTargeting(new PropCondition(G_PROPS.ACTION_TAGS, "Dual", false)), new ModifyValueEffect(PARAMS.C_COOLDOWN, MOD.SET, getCooldown(main.getOwnerObj())));
    Abilities abilities = new Abilities();
    abilities.add(activateAttacks);
    abilities.add(setCooldown);
    ObjType newType = new ObjType("Dual: " + main.getName() + " and " + offhand.getName(), DataManager.getType("Dual Attack", DC_TYPE.ACTIONS));
    for (Cost cost : costs.getCosts()) {
        PARAMETER p = cost.getCostParam();
        if (p == null)
            continue;
        newType.setParam(p, cost.getPayment().getAmountFormula().toString());
    }
    DC_UnitAction dual = new DC_UnitAction(newType, main.getOwner(), main.getGame(), new Ref(main.getOwnerObj()));
    dual.setAbilities(abilities);
    dual.setCosts(costs);
    dual.setTargeting(main.getTargeting());
    dual.getTargeter().setTargetingInitialized(true);
    dual.setConstructed(true);
    return dual;
}
Also used : ActiveAbility(main.ability.ActiveAbility) ActiveAbility(main.ability.ActiveAbility) Ability(main.ability.Ability) AutoTargeting(main.elements.targeting.AutoTargeting) Costs(main.elements.costs.Costs) Abilities(main.ability.Abilities) ModifyValueEffect(eidolons.ability.effects.common.ModifyValueEffect) Effects(main.ability.effects.Effects) PropCondition(main.elements.conditions.PropCondition) Cost(main.elements.costs.Cost) DC_UnitAction(eidolons.entity.active.DC_UnitAction) Ref(main.entity.Ref) ObjType(main.entity.type.ObjType) ActivateEffect(eidolons.ability.effects.oneshot.activation.ActivateEffect) PARAMETER(main.content.values.parameters.PARAMETER)

Example 5 with Abilities

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

the class SpeechBuilder method processText.

protected String processText(String text, Speech speech) {
    try {
        Condition reqs = DialogueSyntax.getConditions(text);
        speech.setConditions(reqs);
    } catch (Exception e) {
        main.system.ExceptionMaster.printStackTrace(e);
    }
    try {
        Abilities abils = DialogueSyntax.getAbilities(text);
        speech.setAbilities(abils);
    } catch (Exception e) {
        main.system.ExceptionMaster.printStackTrace(e);
    }
    try {
        String script = DialogueSyntax.getScript(text);
        speech.setScript(script);
    } catch (Exception e) {
        main.system.ExceptionMaster.printStackTrace(e);
    }
    return DialogueSyntax.getRawText(text);
}
Also used : Condition(main.elements.conditions.Condition) Abilities(main.ability.Abilities)

Aggregations

Abilities (main.ability.Abilities)8 ModifyValueEffect (eidolons.ability.effects.common.ModifyValueEffect)4 AddBuffEffect (eidolons.ability.effects.attachment.AddBuffEffect)3 ActiveAbility (main.ability.ActiveAbility)3 Effect (main.ability.effects.Effect)3 ShapeEffect (eidolons.ability.effects.containers.customtarget.ShapeEffect)2 WaveEffect (eidolons.ability.effects.containers.customtarget.WaveEffect)2 BehaviorModeEffect (eidolons.ability.effects.continuous.BehaviorModeEffect)2 DealDamageEffect (eidolons.ability.effects.oneshot.DealDamageEffect)2 DrainEffect (eidolons.ability.effects.oneshot.mechanic.DrainEffect)2 ModifyCounterEffect (eidolons.ability.effects.oneshot.mechanic.ModifyCounterEffect)2 MoveEffect (eidolons.ability.effects.oneshot.move.MoveEffect)2 CreateObjectEffect (eidolons.ability.effects.oneshot.unit.CreateObjectEffect)2 GatewayEffect (eidolons.ability.effects.oneshot.unit.GatewayEffect)2 RaiseEffect (eidolons.ability.effects.oneshot.unit.RaiseEffect)2 SummonEffect (eidolons.ability.effects.oneshot.unit.SummonEffect)2 Effects (main.ability.effects.Effects)2 OwnershipChangeEffect (main.ability.effects.common.OwnershipChangeEffect)2 SpecialTargetingEffect (main.ability.effects.container.SpecialTargetingEffect)2 InstantDeathEffect (main.ability.effects.oneshot.InstantDeathEffect)2