Search in sources :

Example 1 with AbilityType

use of main.ability.AbilityType in project Eidolons by IDemiurge.

the class CloneMaster method getTypeCopy.

public static ObjType getTypeCopy(ObjType type, String newName, Game game, String group) {
    // Ref ref = type.getRef();
    // type.setGame(null);
    // type.setRef(null);
    ObjType newType = null;
    if (type instanceof AbilityType)
        newType = new AbilityType((AbilityType) type);
    else
        newType = new ObjType(type);
    // (ObjType) CloneMaster.deepCopy(type);
    newType.cloned();
    return newType;
}
Also used : AbilityType(main.ability.AbilityType) ObjType(main.entity.type.ObjType)

Example 2 with AbilityType

use of main.ability.AbilityType in project Eidolons by IDemiurge.

the class VariableManager method getVarType.

public static AbilityType getVarType(String abilTypeName) {
    String vars = getVarPart(abilTypeName);
    abilTypeName = abilTypeName.replace(vars, "");
    AbilityType type = (AbilityType) DataManager.getType(abilTypeName, DC_TYPE.ABILS);
    if (type == null) {
        return null;
    }
    if (vars == "") {
        return type;
    }
    AbilityType newType = new AbilityType(type);
    type.initType();
    setAbilityVariables(newType, vars);
    // type.setVariables(varList);
    return newType;
}
Also used : AbilityType(main.ability.AbilityType)

Example 3 with AbilityType

use of main.ability.AbilityType in project Eidolons by IDemiurge.

the class TypeInitializer method getNewType.

public ObjType getNewType(OBJ_TYPE obj_type) {
    DC_TYPE OBJ_TYPE;
    ObjType type = new ObjType();
    if (obj_type instanceof DC_TYPE) {
        OBJ_TYPE = (DC_TYPE) obj_type;
        switch(OBJ_TYPE) {
            case DIALOGUE:
                type = new DialogueType();
                setXmlTreeValue(true);
                break;
            case ABILS:
                type = new AbilityType();
                setXmlTreeValue(true);
                break;
            case BUFFS:
                type = new BuffType();
                break;
            case ACTIONS:
                type = new ActionType();
                break;
            case SPELLS:
                type = new SpellType();
                break;
            case UNITS:
                type = new UnitType();
                // type.addProp(CLASSIFICATION, UNIT);
                break;
            case CHARS:
                type = new UnitType();
                // type.addProp(CLASSIFICATION, CHAR);
                break;
            default:
                break;
        }
    }
    type.setProperty(G_PROPS.TYPE, obj_type.getName());
    type.setOBJ_TYPE_ENUM(obj_type);
    return type;
}
Also used : DialogueType(main.data.dialogue.DialogueType) DC_TYPE(main.content.DC_TYPE) AbilityType(main.ability.AbilityType)

Example 4 with AbilityType

use of main.ability.AbilityType in project Eidolons by IDemiurge.

the class DungeonObjMaster method createAction.

public DC_UnitAction createAction(T sub, Unit unit, String typeName, DungeonObj obj) {
    // TODO CACHE
    DC_UnitAction action = unit.getGame().getActionManager().getOrCreateAction(typeName, unit);
    action.setTargeting(new SelectiveTargeting(new Conditions(new DistanceCondition("1", true), new FacingCondition(FACING_SINGLE.IN_FRONT))));
    action.setConstructed(true);
    action.getTargeter().setTargetingInitialized(true);
    action.setTargetingCachingOff(true);
    action.setActionTypeGroup(ACTION_TYPE_GROUPS.STANDARD);
    action.setAbilities(null);
    List<ActiveObj> actives = new ArrayList<>();
    actives.add(new ActiveAbilityObj((AbilityType) DataManager.getType("Dummy Ability", DC_TYPE.ABILS), unit.getRef(), unit.getOwner(), unit.getGame()) {

        @Override
        public boolean activatedOn(Ref ref) {
            return actionActivated(sub, unit, obj);
        }
    });
    action.setActives(actives);
    action.setActionTypeGroup(ACTION_TYPE_GROUPS.DUNGEON);
    return action;
}
Also used : SelectiveTargeting(main.elements.targeting.SelectiveTargeting) Ref(main.entity.Ref) ActiveObj(main.entity.obj.ActiveObj) DC_ActiveObj(eidolons.entity.active.DC_ActiveObj) AbilityType(main.ability.AbilityType) DistanceCondition(main.elements.conditions.DistanceCondition) ArrayList(java.util.ArrayList) ActiveAbilityObj(main.ability.ActiveAbilityObj) FacingCondition(eidolons.ability.conditions.FacingCondition) DC_UnitAction(eidolons.entity.active.DC_UnitAction) Conditions(main.elements.conditions.Conditions)

Aggregations

AbilityType (main.ability.AbilityType)4 FacingCondition (eidolons.ability.conditions.FacingCondition)1 DC_ActiveObj (eidolons.entity.active.DC_ActiveObj)1 DC_UnitAction (eidolons.entity.active.DC_UnitAction)1 ArrayList (java.util.ArrayList)1 ActiveAbilityObj (main.ability.ActiveAbilityObj)1 DC_TYPE (main.content.DC_TYPE)1 DialogueType (main.data.dialogue.DialogueType)1 Conditions (main.elements.conditions.Conditions)1 DistanceCondition (main.elements.conditions.DistanceCondition)1 SelectiveTargeting (main.elements.targeting.SelectiveTargeting)1 Ref (main.entity.Ref)1 ActiveObj (main.entity.obj.ActiveObj)1 ObjType (main.entity.type.ObjType)1