Ejemplo n.º 1
0
        public Armor(string itemName, ARMOR_CLASS armorClass, ITEM_SLOT itemSlot, ITEM_RARITY rarity = ITEM_RARITY.NORMAL, int id = -1) : base(itemName, rarity, id, itemSlot)
        {
            switch (armorClass)
            {
            case ARMOR_CLASS.CLOTH:
                this.Armor_Min = CLOTH_ARMOR_MIN;
                this.Armor_Max = CLOTH_ARMOR_MAX;
                break;

            case ARMOR_CLASS.LEATHER:
                this.Armor_Min = LEATHER_ARMOR_MIN;
                this.Armor_Max = LEATHER_ARMOR_MAX;
                break;

            case ARMOR_CLASS.PLATE:
                this.Armor_Min = PLATE_ARMOR_MIN;
                this.Armor_Max = PLATE_ARMOR_MAX;
                break;

            case ARMOR_CLASS.SHIELD:
                break;

            default:
                Debug.Log("Armor class not set");
                break;
            }
        }
Ejemplo n.º 2
0
 public ItemBase(string itemName, ITEM_RARITY rarity = ITEM_RARITY.NORMAL, int id = -1, ITEM_SLOT itemSlot = ITEM_SLOT.INVENTORY)
 {
     this._rarity   = rarity;
     this._id       = id;
     this._itemSlot = itemSlot;
     this._itemName = itemName;
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Items.Item"/> class.
        /// </summary>
        /// <param name="name">The item's name.</param>
        /// <param name="description">The item's description.</param>
        /// <param name="mass">The mass of the item</param>
        /// <param name="components">A list of components for the item to have</param>
        /// <param name="slot">The itemslot to equip to.</param>
        public Item(string name, string description, float mass, List <IItemComponent> components, ITEM_SLOT slot)
        {
            Name        = name;
            Description = description;
            Mass        = mass;
            Components  = components;
            EquipSlot   = slot;
            ItemEffect  = new Effect();

            foreach (IGrantsEffect component in this.ComponentsOfType <IGrantsEffect>())
            {
                component.ApplyEffect(this);
            }
        }
Ejemplo n.º 4
0
 public Weapon(string itemName, WEAPON_CLASS wClass, WEAPON_TYPE wType, ITEM_RARITY rarity = ITEM_RARITY.NORMAL, int id = -1, ITEM_SLOT itemSlot = ITEM_SLOT.WEAPON) : base(itemName, rarity, id, itemSlot)
 {
     weaponClass = wClass;
     weaponType  = wType;
 }
Ejemplo n.º 5
0
 public Misc(string itemName, string displayText, ITEM_RARITY rarity = ITEM_RARITY.NORMAL, ITEM_SLOT itemSlot = ITEM_SLOT.MISC, int id = -1) : base(itemName, rarity, id, itemSlot)
 {
     DisplayText = displayText;
 }
Ejemplo n.º 6
0
        public Shield(string itemName, SHIELD_TYPE shieldType, ITEM_RARITY rarity = ITEM_RARITY.NORMAL, ITEM_SLOT itemSlot = ITEM_SLOT.SHIELD, int id = -1) : base(itemName, ARMOR_CLASS.SHIELD, itemSlot, rarity, id)
        {
            switch (shieldType)
            {
            case SHIELD_TYPE.SMALL:
                blockChanceMin = MEDIUM_BLOCK_CHANCE_MIN;
                blockChanceMax = SMALL_BLOCK_CHANCE_MAX;

                Armor_Max -= 15;
                break;

            case SHIELD_TYPE.MEDIUM:
                blockChanceMin = MEDIUM_BLOCK_CHANCE_MIN;
                blockChanceMax = MEDIUM_BLOCK_CHANCE_MAX;

                Armor_Min += 5;
                Armor_Max -= 5;
                break;

            case SHIELD_TYPE.LARGE:
                blockChanceMin = LARGE_BLOCK_CHANCE_MIN;
                blockChanceMax = LARGE_BLOCK_CHANCE_MAX;

                Armor_Min += 10;
                Armor_Max += 5;
                break;

            default:
                Debug.Log("Shield type not set");
                break;
            }
        }
Ejemplo n.º 7
0
        public Jewelry(string itemName, SPECIAL_EFFECT specialEffect = SPECIAL_EFFECT.NONE, ITEM_RARITY rarity = ITEM_RARITY.NORMAL, ITEM_SLOT itemSlot = ITEM_SLOT.JEWELERY, int id = -1) : base(itemName, rarity, id, itemSlot)
        {
            this.SpecialEffect = specialEffect;

            switch (rarity)
            {
            case ITEM_RARITY.NORMAL:
                bonus_amount = 1;
                break;

            case ITEM_RARITY.MAGIC:
                bonus_amount = 5;
                break;

            case ITEM_RARITY.UNIQUE:
                bonus_amount = 10;
                break;

            case ITEM_RARITY.SET:
                bonus_amount = 8;
                break;

            case ITEM_RARITY.QUEST:
                bonus_amount = 0;
                break;

            default:
                Debug.Log("Jewelry rarity not set");
                break;
            }

            if (specialEffect == SPECIAL_EFFECT.MANA)
            {
                bonus_amount *= 10;
            }
        }