Search in sources :

Example 1 with DOOR_ACTION

use of eidolons.game.module.dungeoncrawl.objects.DoorMaster.DOOR_ACTION in project Eidolons by IDemiurge.

the class DoorMaster method getActions.

public List<DC_ActiveObj> getActions(DungeonObj door, Unit unit) {
    if (!(door instanceof Door))
        return new ArrayList<>();
    if (!checkUnitCanHandleActions(unit)) {
        return new ArrayList<>();
    }
    // check intelligence, mastery
    List<DC_ActiveObj> list = new ArrayList<>();
    DC_UnitAction action = null;
    for (DOOR_ACTION sub : DOOR_ACTION.values()) {
        if (checkAction(unit, (Door) door, sub)) {
            action = createAction(sub, unit, door);
            if (action != null) {
                list.add(action);
            }
        }
    }
    return list;
}
Also used : ArrayList(java.util.ArrayList) DC_ActiveObj(eidolons.entity.active.DC_ActiveObj) DC_UnitAction(eidolons.entity.active.DC_UnitAction) DOOR_ACTION(eidolons.game.module.dungeoncrawl.objects.DoorMaster.DOOR_ACTION)

Aggregations

DC_ActiveObj (eidolons.entity.active.DC_ActiveObj)1 DC_UnitAction (eidolons.entity.active.DC_UnitAction)1 DOOR_ACTION (eidolons.game.module.dungeoncrawl.objects.DoorMaster.DOOR_ACTION)1 ArrayList (java.util.ArrayList)1