Search in sources :

Example 16 with AbstractItem

use of com.lilithsthrone.game.inventory.item.AbstractItem in project liliths-throne-public by Innoxia.

the class EnchantingUtils method craftItem.

public static AbstractItem craftItem(AbstractCoreItem ingredient, List<ItemEffect> effects) {
    AbstractItem craftedItem = null;
    craftedItem = AbstractItemType.generateItem((AbstractItemType) ingredient.getEnchantmentItemType(effects));
    List<ItemEffect> effectsToBeAdded = new ArrayList<>();
    effectsToBeAdded.addAll(effects);
    craftedItem.setItemEffects(effectsToBeAdded);
    craftedItem.setName(getPotionName(ingredient, effectsToBeAdded));
    craftedItem.setColour(ingredient.getEnchantmentEffect().getColour());
    craftedItem.setSVGString(getSVGString(ingredient, effectsToBeAdded));
    return craftedItem;
}
Also used : AbstractItemType(com.lilithsthrone.game.inventory.item.AbstractItemType) ArrayList(java.util.ArrayList) ItemEffect(com.lilithsthrone.game.inventory.item.ItemEffect) AbstractItem(com.lilithsthrone.game.inventory.item.AbstractItem)

Aggregations

AbstractItem (com.lilithsthrone.game.inventory.item.AbstractItem)16 ItemEffect (com.lilithsthrone.game.inventory.item.ItemEffect)9 AbstractClothing (com.lilithsthrone.game.inventory.clothing.AbstractClothing)8 AbstractWeapon (com.lilithsthrone.game.inventory.weapon.AbstractWeapon)7 ArrayList (java.util.ArrayList)6 AbstractItemType (com.lilithsthrone.game.inventory.item.AbstractItemType)5 Colour (com.lilithsthrone.utils.Colour)4 NPC (com.lilithsthrone.game.character.npc.NPC)3 AbstractClothingType (com.lilithsthrone.game.inventory.clothing.AbstractClothingType)3 InventorySelectedItemEventListener (com.lilithsthrone.controller.eventListeners.InventorySelectedItemEventListener)2 InventoryTooltipEventListener (com.lilithsthrone.controller.eventListeners.InventoryTooltipEventListener)2 TooltipInformationEventListener (com.lilithsthrone.controller.eventListeners.TooltipInformationEventListener)2 GameCharacter (com.lilithsthrone.game.character.GameCharacter)2 Attribute (com.lilithsthrone.game.character.attributes.Attribute)2 Perk (com.lilithsthrone.game.character.effects.Perk)2 StatusEffect (com.lilithsthrone.game.character.effects.StatusEffect)2 Fetish (com.lilithsthrone.game.character.fetishes.Fetish)2 TestNPC (com.lilithsthrone.game.character.npc.dominion.TestNPC)2 SpecialAttack (com.lilithsthrone.game.combat.SpecialAttack)2 Spell (com.lilithsthrone.game.combat.Spell)2