Search in sources :

Example 6 with Conditions

use of main.elements.conditions.Conditions in project Eidolons by IDemiurge.

the class DC_BuffRule method getConditions.

protected Condition getConditions(Integer level) {
    Conditions conditions = conditionsMap.get(level);
    if (conditions != null) {
        return conditions;
    }
    conditions = new Conditions(getCondition(level));
    // less or equal than this level
    boolean reverse = isConditionGreater(level);
    conditions.setNegative(reverse);
    // is this really necessary?
    // if (level != ((!reverse) ? getMinLevel() : getMaxLevel())) {
    // Conditions notCondition = new Conditions(getCondition(level
    // + (reverse ? 1 : -1)));
    // conditions.add(
    // // new NotCondition(reverse,
    // notCondition);
    // notCondition.setNegative(!reverse);
    // }
    conditionsMap.put(level, conditions);
    return conditionsMap.get(level);
}
Also used : Conditions(main.elements.conditions.Conditions)

Example 7 with Conditions

use of main.elements.conditions.Conditions in project Eidolons by IDemiurge.

the class ScenarioPrecombatMaster method getSelectHeroConditions.

public static Condition getSelectHeroConditions() {
    // generic - level!
    Conditions conditions = new Conditions(ConditionMaster.toConditions(scenario.getProperty(MACRO_PROPS.HERO_SELECTION_FILTER_CONDITIONS)));
    String level = scenario.getParam(PARAMS.LEVEL);
    if (!level.isEmpty()) {
        // extract
        conditions.add(new NumericCondition("{MATCH_LEVEL}", level));
    }
    return conditions;
}
Also used : NumericCondition(main.elements.conditions.NumericCondition) Conditions(main.elements.conditions.Conditions)

Example 8 with Conditions

use of main.elements.conditions.Conditions in project Eidolons by IDemiurge.

the class PartyHelper method getPrincipleConditions.

public static Conditions getPrincipleConditions(Party party) {
    Conditions principlesConditions = new Conditions();
    for (Unit m : party.getMembers()) {
        String principles = m.getProperty(G_PROPS.PRINCIPLES);
        Condition principlesCondition = new PrinciplesCondition(principles, "{MATCH_" + G_PROPS.PRINCIPLES + "}", true);
        principlesConditions.add(principlesCondition);
    }
    return principlesConditions;
}
Also used : PrinciplesCondition(main.elements.conditions.PrinciplesCondition) Condition(main.elements.conditions.Condition) Unit(eidolons.entity.obj.unit.Unit) PrinciplesCondition(main.elements.conditions.PrinciplesCondition) Conditions(main.elements.conditions.Conditions)

Example 9 with Conditions

use of main.elements.conditions.Conditions in project Eidolons by IDemiurge.

the class DC_MathManager method calculateClaimedObjects.

@Override
public int calculateClaimedObjects(Obj obj, String BF_OBJECT_TYPE) {
    Conditions conditions = ConditionMaster.getClaimedBfObjConditions(BF_OBJECT_TYPE);
    Ref ref = new Ref(game, obj.getId());
    int i = new Filter<>(ref, conditions).getObjects().size();
    PARAMETER param = ContentManager.getPARAM("CLAIMED_" + BF_OBJECT_TYPE + "S");
    obj.setParam(param, i);
    return i;
}
Also used : Ref(main.entity.Ref) Filter(main.elements.Filter) Conditions(main.elements.conditions.Conditions) PARAMETER(main.content.values.parameters.PARAMETER)

Example 10 with Conditions

use of main.elements.conditions.Conditions in project Eidolons by IDemiurge.

the class ActivesConstructor method getDefaultSingleTargeting.

public static Targeting getDefaultSingleTargeting(DC_ActiveObj entity) {
    Conditions conditions = (DC_ConditionMaster.getSelectiveTargetingTemplateConditions(DEFAULT_TARGETING_TEMPLATE));
    Targeting targeting = new SelectiveTargeting(conditions);
    return targeting;
}
Also used : TemplateSelectiveTargeting(eidolons.ability.targeting.TemplateSelectiveTargeting) SelectiveTargeting(main.elements.targeting.SelectiveTargeting) FixedTargeting(main.elements.targeting.FixedTargeting) TemplateAutoTargeting(eidolons.ability.targeting.TemplateAutoTargeting) TemplateSelectiveTargeting(eidolons.ability.targeting.TemplateSelectiveTargeting) Targeting(main.elements.targeting.Targeting) MultiTargeting(main.elements.targeting.MultiTargeting) SelectiveTargeting(main.elements.targeting.SelectiveTargeting) Conditions(main.elements.conditions.Conditions)

Aggregations

Conditions (main.elements.conditions.Conditions)43 Ref (main.entity.Ref)12 Condition (main.elements.conditions.Condition)7 SelectiveTargeting (main.elements.targeting.SelectiveTargeting)6 Obj (main.entity.obj.Obj)6 AddBuffEffect (eidolons.ability.effects.attachment.AddBuffEffect)5 ArrayList (java.util.ArrayList)5 NumericCondition (main.elements.conditions.NumericCondition)5 AutoTargeting (main.elements.targeting.AutoTargeting)5 Unit (eidolons.entity.obj.unit.Unit)4 ObjType (main.entity.type.ObjType)4 Coordinates (main.game.bf.Coordinates)4 FacingCondition (eidolons.ability.conditions.FacingCondition)3 AddTriggerEffect (eidolons.ability.effects.attachment.AddTriggerEffect)3 TemplateSelectiveTargeting (eidolons.ability.targeting.TemplateSelectiveTargeting)3 Effects (main.ability.effects.Effects)3 OrConditions (main.elements.conditions.OrConditions)3 RefCondition (main.elements.conditions.RefCondition)3 Targeting (main.elements.targeting.Targeting)3 GroupImpl (main.entity.group.GroupImpl)3