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