83 lines
2.4 KiB
C#
83 lines
2.4 KiB
C#
using Types.Items;
|
|
using UnityEngine;
|
|
|
|
namespace Data.ScriptableObjects.Items
|
|
{
|
|
[CreateAssetMenu(fileName = "ConsumableItem", menuName = "Game Data/Consumable")]
|
|
public class ConsumableItemSo : GameItemSo
|
|
{
|
|
public int attack;
|
|
public int critChance;
|
|
public int critDamage;
|
|
public int defense;
|
|
public int duration;
|
|
public int health;
|
|
public int luck;
|
|
public int magic;
|
|
|
|
// high quality
|
|
public int quality;
|
|
public int sanity;
|
|
public int speed;
|
|
public int stamina;
|
|
|
|
// Add other consumable-specific properties and methods here
|
|
|
|
// set the default values for the consumable item
|
|
public ConsumableItemSo()
|
|
{
|
|
health = 0;
|
|
sanity = 0;
|
|
stamina = 0;
|
|
magic = 0;
|
|
luck = 0;
|
|
speed = 0;
|
|
attack = 0;
|
|
defense = 0;
|
|
critChance = 0;
|
|
critDamage = 0;
|
|
duration = 0;
|
|
quality = 0;
|
|
type = ItemType.Consumable;
|
|
}
|
|
|
|
public new ConsumableItem Clone()
|
|
{
|
|
var clone = new ConsumableItem
|
|
{
|
|
ItemName = itemName,
|
|
Icon = icon,
|
|
ItemValue = itemValue,
|
|
Rarity = rarity,
|
|
Quantity = quantity,
|
|
StackSize = stackSize,
|
|
SellValue = sellValue,
|
|
IsStackable = isStackable,
|
|
IsEquippable = isEquippable,
|
|
IsConsumable = isConsumable,
|
|
IsQuestItem = isQuestItem,
|
|
IsKeyItem = isKeyItem,
|
|
IsCraftable = isCraftable,
|
|
IsTradeable = isTradeable,
|
|
IsSellable = isSellable,
|
|
IsDroppable = isDroppable,
|
|
IsDestroyable = isDestroyable,
|
|
IsUsable = isUsable,
|
|
Health = health,
|
|
Sanity = sanity,
|
|
Stamina = stamina,
|
|
Magic = magic,
|
|
Luck = luck,
|
|
Speed = speed,
|
|
Attack = attack,
|
|
Defense = defense,
|
|
CritChance = critChance,
|
|
CritDamage = critDamage,
|
|
Duration = duration,
|
|
Quality = quality,
|
|
Type = type
|
|
};
|
|
return clone;
|
|
}
|
|
}
|
|
} |