Search in sources :

Example 16 with DC_HeroItemObj

use of eidolons.entity.item.DC_HeroItemObj in project Eidolons by IDemiurge.

the class DroppedItemManager method pickedUp.

public void pickedUp(Obj item) {
    if (!(item instanceof DC_HeroItemObj)) {
        return;
    }
    Coordinates coordinates = item.getCoordinates();
    Obj cell = game.getCellByCoordinate(coordinates);
    pickUp(cell, (DC_HeroItemObj) item);
}
Also used : Obj(main.entity.obj.Obj) DC_HeroItemObj(eidolons.entity.item.DC_HeroItemObj) Coordinates(main.game.bf.Coordinates) DC_HeroItemObj(eidolons.entity.item.DC_HeroItemObj)

Example 17 with DC_HeroItemObj

use of eidolons.entity.item.DC_HeroItemObj in project Eidolons by IDemiurge.

the class DroppedItemManager method dropDead.

public void dropDead(Unit unit) {
    unit.unequip(ItemEnums.ITEM_SLOT.ARMOR);
    unit.unequip(ItemEnums.ITEM_SLOT.MAIN_HAND);
    unit.unequip(ItemEnums.ITEM_SLOT.OFF_HAND);
    for (DC_HeroItemObj item : unit.getInventory()) {
        drop(item, unit);
    }
    for (DC_HeroItemObj item : unit.getQuickItems()) {
        drop(item, unit);
    }
    for (DC_HeroItemObj item : unit.getJewelry()) {
        drop(item, unit);
    }
}
Also used : DC_HeroItemObj(eidolons.entity.item.DC_HeroItemObj)

Example 18 with DC_HeroItemObj

use of eidolons.entity.item.DC_HeroItemObj in project Eidolons by IDemiurge.

the class ContainerClickHandler method takeAllClicked.

public void takeAllClicked() {
    for (DC_HeroItemObj item : new ArrayList<>(container.getItems())) {
        if (unit.isInventoryFull()) {
            FloatingTextMaster.getInstance().createFloatingText(TEXT_CASES.DEFAULT, "Inventory is full!", unit);
            return;
        }
        container.getItems().remove(item);
        unit.addItemToInventory(item);
    }
    GuiEventManager.trigger(GuiEventType.SHOW_LOOT_PANEL, null);
}
Also used : ArrayList(java.util.ArrayList) DC_HeroItemObj(eidolons.entity.item.DC_HeroItemObj)

Example 19 with DC_HeroItemObj

use of eidolons.entity.item.DC_HeroItemObj in project Eidolons by IDemiurge.

the class HungItemMaster method generateItem.

private DC_HeroItemObj generateItem(HungItem hungObj) {
    Ref ref = new Ref();
    DC_HeroItemObj itemObj = ItemFactory.createItemObj(hungObj.getItemType(), DC_Player.NEUTRAL, (MicroGame) ref.getGame(), ref, false);
    return itemObj;
}
Also used : Ref(main.entity.Ref) DC_HeroItemObj(eidolons.entity.item.DC_HeroItemObj)

Example 20 with DC_HeroItemObj

use of eidolons.entity.item.DC_HeroItemObj in project Eidolons by IDemiurge.

the class LootMaster method awardLoot.

private static void awardLoot(ObjType type, Unit h) {
    DC_HeroItemObj item = ItemFactory.createItemObj(type, h.getOriginalOwner(), h.getGame(), h.getRef(), false);
    h.addItemToInventory(item);
// SAVE: containers into props for type
}
Also used : DC_HeroItemObj(eidolons.entity.item.DC_HeroItemObj)

Aggregations

DC_HeroItemObj (eidolons.entity.item.DC_HeroItemObj)29 DC_QuickItemObj (eidolons.entity.item.DC_QuickItemObj)7 Obj (main.entity.obj.Obj)6 Ref (main.entity.Ref)5 ObjType (main.entity.type.ObjType)5 DC_JewelryObj (eidolons.entity.item.DC_JewelryObj)3 DC_WeaponObj (eidolons.entity.item.DC_WeaponObj)3 Unit (eidolons.entity.obj.unit.Unit)3 ArrayList (java.util.ArrayList)3 SelectiveTargeting (main.elements.targeting.SelectiveTargeting)2 Coordinates (main.game.bf.Coordinates)2 RandomWizard (main.system.auxiliary.RandomWizard)2 WeightMap (main.system.datatypes.WeightMap)2 CanActCondition (eidolons.ability.conditions.special.CanActCondition)1 AddBuffEffect (eidolons.ability.effects.attachment.AddBuffEffect)1 ModifyPropertyEffect (eidolons.ability.effects.common.ModifyPropertyEffect)1 ModifyValueEffect (eidolons.ability.effects.common.ModifyValueEffect)1 DC_SpellObj (eidolons.entity.active.DC_SpellObj)1 DC_ArmorObj (eidolons.entity.item.DC_ArmorObj)1 DC_Cell (eidolons.entity.obj.DC_Cell)1