Search in sources :

Example 1 with ListSizeCondition

use of main.elements.conditions.standard.ListSizeCondition in project Eidolons by IDemiurge.

the class AlertRule method getWakeUpConditions.

public static Condition getWakeUpConditions() {
    // TODO will be checked with a ref from UNIT_ACTION_COMPLETE event!
    Conditions conditions = new OrConditions();
    // adjacent enemy condition - the problem is that it will then be
    // impossible to be *alert* if there are enemies adjacent already... or
    // is it a good design?
    // action was targeting *source* - directly or as one of the targets -
    // the problem is that it won't work for allies which could be exploited
    // largely
    // all in all, Alert Mode is probably not for *complicated situations*,
    // it's for the simple ones when you just wait for the fight
    // patiently...
    // new PropCondition(prop, str2)
    conditions.add(new Conditions(new NotCondition(new OwnershipCondition(KEYS.SOURCE, KEYS.EVENT_SOURCE)), new OrConditions(new RefCondition(KEYS.EVENT_TARGET, KEYS.SOURCE), new GroupCondition(KEYS.SOURCE.toString(), true))));
    conditions.add(new ListSizeCondition(true, new Conditions(ConditionMaster.getAliveAndConsciousFilterCondition(), ConditionMaster.getEnemyCondition(), ConditionMaster.getAdjacentCondition()), "1"));
    return conditions;
}
Also used : ListSizeCondition(main.elements.conditions.standard.ListSizeCondition) OwnershipCondition(main.elements.conditions.standard.OwnershipCondition) GroupCondition(main.elements.conditions.standard.GroupCondition)

Aggregations

GroupCondition (main.elements.conditions.standard.GroupCondition)1 ListSizeCondition (main.elements.conditions.standard.ListSizeCondition)1 OwnershipCondition (main.elements.conditions.standard.OwnershipCondition)1