using System.Collections.Generic;
using UnityEngine;
namespace BulletHellTemplate
{
///
/// Represents an inventory item that can be equipped by a character.
///
[CreateAssetMenu(fileName = "NewInventoryItem", menuName = "Inventory/InventoryItem", order = 52)]
public class InventoryItem : ScriptableObject
{
///
/// The title of the inventory item.
///
public string title;
///
/// Array of translated titles by language.
///
public NameTranslatedByLanguage[] titleTranslatedByLanguage;
///
/// The description of the inventory item.
///
[TextArea]
public string description;
///
/// Array of translated descriptions by language.
///
public DescriptionTranslatedByLanguage[] descriptionTranslatedByLanguage;
///
/// Unique identifier for the inventory item.
///
public string itemId;
///
/// Category of the inventory item.
///
public string category;
///
/// Icon representing the inventory item.
///
public Sprite itemIcon;
///
/// The character characterStatsComponent associated with this inventory item.
///
public CharacterStats itemStats;
///
/// List of upgrades available for this inventory item.
///
public List itemUpgrades;
///
/// Indicates whether the inventory item is unlocked.
///
public bool isUnlocked;
///
/// The rarity of the inventory item.
///
public Rarity rarity;
///
/// The slot type for this item (e.g., Armor, Weapon, etc.).
///
[Tooltip("The slot type for this item (e.g., Armor, Weapon, etc.).")]
public string slot;
}
///
/// Represents an upgrade for an inventory item.
///
[System.Serializable]
public class ItemUpgrade
{
///
/// The percentage increase in characterStatsComponent per level.
///
public float statIncreasePercentagePerLevel;
///
/// The currency tag used for the upgrade cost.
///
public string currencyTag = "GO";
///
/// The cost required for the upgrade.
///
public int upgradeCosts;
///
/// The success rate for the upgrade (between 0.1 and 1.0).
///
[Range(0.1f, 1f)]
public float successRate = 1.0f;
///
/// If true, the level will decrease if the upgrade fails.
///
public bool decreaseLevelIfFail = false;
}
public enum Rarity { Common, Uncommon, Rare, Epic, Legendary }
}