Search in sources :

Example 1 with DungeonObj

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

the class LockEffect method applyThis.

@Override
public boolean applyThis() {
    DungeonObj obj = (DungeonObj) ref.getTargetObj();
    // check traps!
    if (identifier != null) {
        if (!obj.getName().equalsIgnoreCase(identifier))
            return false;
    }
    if (!key) {
    // try
    }
    obj.getDM().open(obj, ref);
    return true;
}
Also used : DungeonObj(eidolons.game.module.dungeoncrawl.objects.DungeonObj)

Example 2 with DungeonObj

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

the class DefaultActionHandler method leftClickUnit.

public static boolean leftClickUnit(boolean shift, boolean control, BattleFieldObject target) {
    if (shift) {
        return leftClickCell(true, false, target.getX(), target.getY());
    }
    if (control) {
        return leftClickCell(false, true, target.getX(), target.getY());
    }
    if (!OptionsMaster.getGameplayOptions().getBooleanValue(GAMEPLAY_OPTION.DEFAULT_ACTIONS))
        return false;
    Unit source = Eidolons.getGame().getManager().getActiveObj();
    if (source.getGame().isDebugMode()) {
        return doDebugStuff(source, target);
    }
    if (target.isMine())
        return false;
    DC_ActiveObj action = null;
    if (target instanceof DungeonObj)
        action = getDungeonObjAction(source, (DungeonObj) target);
    else
        action = getPreferredAttackAction(source, target);
    if (action == null)
        return false;
    Context context = new Context(source, target);
    return activate(context, action);
}
Also used : Context(main.game.logic.action.context.Context) DungeonObj(eidolons.game.module.dungeoncrawl.objects.DungeonObj) Unit(eidolons.entity.obj.unit.Unit)

Aggregations

DungeonObj (eidolons.game.module.dungeoncrawl.objects.DungeonObj)2 Unit (eidolons.entity.obj.unit.Unit)1 Context (main.game.logic.action.context.Context)1