evershade/Assets/Data/ScriptableObjects/Items/WeaponItemSo.cs

80 lines
2.3 KiB
C#

using Types.Items;
using UnityEngine;
namespace Data.ScriptableObjects.Items
{
[CreateAssetMenu(fileName = "Weapon", menuName = "Game Data/Weapon")]
public class WeaponItemSo : EquipmentItemSo
{
public int attackSpeed;
public int critChance;
public int critDamage;
public int damage;
public bool isCursed;
public bool isEnchanted;
public bool isMagic;
public bool isMelee;
// Add other weapon-specific properties and methods here
// abilities
public bool isRanged;
public int range;
// set the type on creation
public WeaponItemSo()
{
type = ItemType.Weapon;
}
public new GameItem Clone()
{
var clone = new WeaponItem
{
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,
Slot = slot,
Weight = weight,
Level = level,
Armor = armor,
Durability = durability,
MaxDurability = maxDurability,
Attack = attack,
Defense = defense,
Speed = speed,
Luck = luck,
Magic = magic,
Sanity = sanity,
Health = health,
Damage = damage,
AttackSpeed = attackSpeed,
CritChance = critChance,
CritDamage = critDamage,
Range = range,
IsRanged = isRanged,
IsMelee = isMelee,
IsMagic = isMagic,
IsEnchanted = isEnchanted,
IsCursed = isCursed
};
return clone;
}
}
}