use of main.elements.conditions.NotCondition in project Eidolons by IDemiurge.
the class AshAnnihilationRule method initConditions.
@Override
public void initConditions() {
conditions = new Conditions(new NumericCondition("{match_blaze_counters}", "0"));
conditions.add(new NotCondition(new ClassificationCondition(CLASSIFICATIONS.ELEMENTAL)));
conditions.add(new NotCondition(new PropCondition(G_PROPS.STANDARD_PASSIVES, STANDARD_PASSIVES.IMMATERIAL.getName())));
}
use of main.elements.conditions.NotCondition in project Eidolons by IDemiurge.
the class UnitGroupMaster method createGroupLeader.
public static ObjType createGroupLeader(boolean me, Entity faction, int unitGroupLevel) {
// type =
List<ObjType> list = DataManager.getTypesSubGroup(DC_TYPE.CHARS, StringMaster.PRESET);
String backgrounds = faction.getProperty(PROPS.HERO_BACKGROUNDS);
FilterMaster.filterOut(list, new NotCondition(new StringComparison(backgrounds, StringMaster.getValueRef(KEYS.MATCH, G_PROPS.BACKGROUND), false)));
FilterMaster.filterOut(list, new NotCondition(new NumericCondition("2", "abs(" + StringMaster.getValueRef(KEYS.MATCH, PARAMS.LEVEL) + "-" + unitGroupLevel + ")", false)));
String name = ListChooser.chooseType(DataManager.toStringList(list), DC_TYPE.CHARS);
if (name == null) {
return null;
}
if (me) {
myHero = name;
} else {
enemyHero = name;
}
return DataManager.getType(name, DC_TYPE.CHARS);
}
use of main.elements.conditions.NotCondition in project Eidolons by IDemiurge.
the class FilterMaster method getCellsInRadius.
public static Set<Obj> getCellsInRadius(Obj centerObj, Integer radius) {
Conditions conditions = new Conditions();
conditions.add(ConditionMaster.getDistanceFilterCondition("SOURCE", radius, true));
conditions.add(new NotCondition(new OccupiedCondition("MATCH")));
Set<Obj> set = new Filter<Obj>(centerObj.getRef(), conditions, DC_TYPE.TERRAIN).getObjects();
return set;
}
use of main.elements.conditions.NotCondition in project Eidolons by IDemiurge.
the class ZoneEffect method initTargeting.
public void initTargeting() {
Conditions conditions = new Conditions();
int spell_radius = radius.getInt(ref);
// if (spell_radius == 0) {
// spell_radius = ref.getObj(KEYS.ACTIVE.name()).getIntParam(G_PARAMS.RADIUS);
// }
NumericCondition condition = ConditionMaster.getDistanceFilterCondition(KEYS.TARGET.name(), spell_radius);
conditions.add(condition);
if (// just on same cell
spell_radius == 0)
condition.setStrict(false);
// TODO really???
conditions.add(ConditionMaster.getNotDeadCondition());
if (notSelf) {
conditions.add(new NotCondition(ConditionMaster.getSelfFilterCondition()));
}
if (// TODO target filtering - targeting
allyOrEnemyOnly != null) // modifiers?
{
conditions.add(allyOrEnemyOnly ? ConditionMaster.getAllyCondition() : ConditionMaster.getEnemyCondition());
}
// legacy?
// if (allyOrEnemyOnly==null)
// conditions.add(ConditionMaster.getEnemyCondition());
// else if (!allyOrEnemyOnly) {
// conditions.add(allyOrEnemyOnly? ConditionMaster.getAllyCondition() :
// ConditionMaster.getEnemyCondition());
// }
// if (effects.getSpell() != null)
// if (effects.getSpell().checkBool(STD_BOOLS.APPLY_THRU))
this.targeting = new AutoTargeting(conditions, C_OBJ_TYPE.BF);
if (targeting == null) {
this.targeting = new AutoTargeting(conditions, C_OBJ_TYPE.BF_OBJ);
}
setFilteringConditions(conditions);
}
use of main.elements.conditions.NotCondition in project Eidolons by IDemiurge.
the class SpellInitializer method initCosts.
@Override
public void initCosts() {
Costs costs;
costs = DC_CostsFactory.getCostsForSpell(getEntity(), // isSpell()
true);
costs.getRequirements().add(new Requirement(new NotCondition(new StatusCheckCondition(UnitEnums.STATUS.SILENCED)), InfoMaster.SILENCE));
costs.setActive(getEntity());
getEntity().getActivator().setCanActivate(costs.canBePaid(getRef()));
getEntity().setCosts(costs);
}
Aggregations