Search in sources :

Example 96 with Obj

use of main.entity.obj.Obj in project Eidolons by IDemiurge.

the class DC_StateManager method removeObject.

public void removeObject(Integer id) {
    Obj obj = game.getObjectById(id);
    if (obj == null) {
        return;
    }
    if (obj instanceof BattleFieldObject) {
        if (obj instanceof Structure) {
            getGame().getStructures().remove(obj);
        }
        if (obj instanceof Unit) {
            getGame().getUnits().remove(obj);
        }
        removeAttachedObjects((Unit) obj);
    }
    Map<Integer, Obj> map = state.getObjMaps().get(obj.getOBJ_TYPE_ENUM());
    if (map != null) {
        map.remove(id);
    }
// super.removeObject(id);
}
Also used : BattleFieldObject(eidolons.entity.obj.BattleFieldObject) BuffObj(main.entity.obj.BuffObj) DC_SpellObj(eidolons.entity.active.DC_SpellObj) DC_Obj(eidolons.entity.obj.DC_Obj) DC_ActiveObj(eidolons.entity.active.DC_ActiveObj) Obj(main.entity.obj.Obj) Structure(eidolons.entity.obj.Structure) Unit(eidolons.entity.obj.unit.Unit)

Example 97 with Obj

use of main.entity.obj.Obj in project Eidolons by IDemiurge.

the class DC_StateManager method checkCellBuffs.

private void checkCellBuffs() {
    for (BattleFieldObject unit : getGame().getBfObjects()) {
        if (unit.isDead()) {
            continue;
        }
        Obj cell = game.getCellByCoordinate(unit.getCoordinates());
        if (cell == null) {
            continue;
        }
        if (cell.getBuffs() == null) {
            continue;
        }
        for (BuffObj buff : game.getCellByCoordinate(unit.getCoordinates()).getBuffs()) {
            if (unit.hasBuff(buff.getName())) {
                continue;
            }
            if (buff.isAppliedThrough()) {
                Condition retainCondition = new PositionCondition(KEYS.SOURCE.toString(), cell);
                getGame().getManager().copyBuff(buff, unit, retainCondition);
            }
        }
    }
}
Also used : PositionCondition(main.elements.conditions.standard.PositionCondition) Condition(main.elements.conditions.Condition) BattleFieldObject(eidolons.entity.obj.BattleFieldObject) BuffObj(main.entity.obj.BuffObj) DC_SpellObj(eidolons.entity.active.DC_SpellObj) DC_Obj(eidolons.entity.obj.DC_Obj) DC_ActiveObj(eidolons.entity.active.DC_ActiveObj) Obj(main.entity.obj.Obj) BuffObj(main.entity.obj.BuffObj) PositionCondition(main.elements.conditions.standard.PositionCondition)

Example 98 with Obj

use of main.entity.obj.Obj in project Eidolons by IDemiurge.

the class Loader method initializeObjects.

private static void initializeObjects(List<Obj> objects) {
    DC_Game game = DC_Game.game;
    DC_GameState state = game.getState();
    for (Obj obj : objects) {
        state.addObject(obj);
    }
}
Also used : DC_WeaponObj(eidolons.entity.item.DC_WeaponObj) DC_QuickItemObj(eidolons.entity.item.DC_QuickItemObj) DC_BuffObj(eidolons.entity.obj.attach.DC_BuffObj) DC_FeatObj(eidolons.entity.obj.attach.DC_FeatObj) DC_JewelryObj(eidolons.entity.item.DC_JewelryObj) DC_SpellObj(eidolons.entity.active.DC_SpellObj) Obj(main.entity.obj.Obj) DC_ArmorObj(eidolons.entity.item.DC_ArmorObj) DC_Game(eidolons.game.core.game.DC_Game)

Example 99 with Obj

use of main.entity.obj.Obj in project Eidolons by IDemiurge.

the class MapComp method highlight.

public void highlight(Collection<Obj> targets) {
    for (Obj o : targets) {
        MapObjComp component = getComponent(o);
        component.setHighlighted(true);
        component.refresh();
    }
}
Also used : Obj(main.entity.obj.Obj) MapObjComp(eidolons.game.module.adventure.gui.map.obj.MapObjComp)

Example 100 with Obj

use of main.entity.obj.Obj in project Eidolons by IDemiurge.

the class MapComp method highlightsOff.

public void highlightsOff() {
    for (Obj o : placeComps.keySet()) {
        MapObjComp component = placeComps.get(o);
        component.setHighlighted(false);
    }
    for (Obj o : routeComps.keySet()) {
        MapObjComp component = routeComps.get(o);
        component.setHighlighted(false);
    }
}
Also used : Obj(main.entity.obj.Obj) MapObjComp(eidolons.game.module.adventure.gui.map.obj.MapObjComp)

Aggregations

Obj (main.entity.obj.Obj)127 DC_ActiveObj (eidolons.entity.active.DC_ActiveObj)34 DC_Obj (eidolons.entity.obj.DC_Obj)30 Coordinates (main.game.bf.Coordinates)27 Unit (eidolons.entity.obj.unit.Unit)24 ArrayList (java.util.ArrayList)19 Ref (main.entity.Ref)15 DC_SpellObj (eidolons.entity.active.DC_SpellObj)14 BuffObj (main.entity.obj.BuffObj)13 DC_WeaponObj (eidolons.entity.item.DC_WeaponObj)12 DC_QuickItemObj (eidolons.entity.item.DC_QuickItemObj)11 ActiveObj (main.entity.obj.ActiveObj)10 BattleFieldObject (eidolons.entity.obj.BattleFieldObject)9 PassiveAbilityObj (main.ability.PassiveAbilityObj)9 ObjType (main.entity.type.ObjType)8 DC_HeroItemObj (eidolons.entity.item.DC_HeroItemObj)7 DC_BuffObj (eidolons.entity.obj.attach.DC_BuffObj)7 PARAMETER (main.content.values.parameters.PARAMETER)7 Conditions (main.elements.conditions.Conditions)6 MicroObj (main.entity.obj.MicroObj)6