use of main.game.bf.Coordinates.UNIT_DIRECTION in project Eidolons by IDemiurge.
the class DC_MovementManager method getTemplateMoveCoordinate.
@Override
public Coordinates getTemplateMoveCoordinate(MOVE_TEMPLATES template, FACING_DIRECTION facing, Obj obj, Ref ref) {
// getOrCreate some caching to optimize this!
UNIT_DIRECTION direction = template.getDirection();
String range = template.getRange();
Boolean selective = template.isSelectiveTargeting();
if (template.getVarClasses() != null) {
String vars = ref.getObj(KEYS.ACTIVE).getCustomProperty(CustomValueManager.getVarEnumCustomValueName(MOVE_TEMPLATES.class));
List<String> varList = VariableManager.getVarList(vars);
range = varList.get(0);
if (varList.size() > 1) {
direction = new EnumMaster<UNIT_DIRECTION>().retrieveEnumConst(UNIT_DIRECTION.class, varList.get(1));
}
if (varList.size() > 2) {
selective = new Boolean(varList.get(2));
}
}
switch(template) {
}
if (selective == null) {
selective = false;
}
if (selective) {
// create filter by directions and range!
} else {
if (range.equals("1")) {
return obj.getCoordinates().getAdjacentCoordinate(DirectionMaster.getDirectionByFacing(facing, direction));
}
// preCheck int >= formla
}
return null;
}
Aggregations