Files
systemrevivalserver/data/entities/DungeonItemDefinition.cs
T
2025-12-06 18:06:03 -05:00

71 lines
2.2 KiB
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Server.Data.Enums;
namespace Server.Data.Entities;
/// <summary>
/// Item template/definition - what an item IS
/// </summary>
[Table("dungeon_item_definitions")]
public class DungeonItemDefinition
{
[Key]
public int Id { get; set; }
[Required]
[MaxLength(64)]
public string Name { get; set; } = "";
[MaxLength(256)]
public string Description { get; set; } = "";
public ItemType Type { get; set; }
public ItemRarity Rarity { get; set; } = ItemRarity.Common;
public DungeonEquipmentSlot? EquipSlot { get; set; } // Null if not equippable
// Stat requirements to equip/use
public int RequiredStrength { get; set; } = 0;
public int RequiredIntelligence { get; set; } = 0;
public int RequiredWisdom { get; set; } = 0;
public int RequiredDexterity { get; set; } = 0;
public int RequiredLevel { get; set; } = 1;
// Stat bonuses when equipped
public int BonusStrength { get; set; } = 0;
public int BonusIntelligence { get; set; } = 0;
public int BonusWisdom { get; set; } = 0;
public int BonusEndurance { get; set; } = 0;
public int BonusDexterity { get; set; } = 0;
public int BonusHealth { get; set; } = 0;
public int BonusMana { get; set; } = 0;
// Weapon stats
public int MinDamage { get; set; } = 0;
public int MaxDamage { get; set; } = 0;
public float AttackRange { get; set; } = 0; // 0 = melee
public DamageType DamageType { get; set; } = DamageType.Physical;
// Armor stats
public int Armor { get; set; } = 0;
public int MagicResist { get; set; } = 0;
// Consumable effects
public int HealAmount { get; set; } = 0;
public int ManaRestore { get; set; } = 0;
public int StaminaRestore { get; set; } = 0;
// Special
public bool IsTeleportScroll { get; set; } = false;
public int? TeachesSpellId { get; set; } // For spell tomes
// Stacking
public bool Stackable { get; set; } = false;
public int MaxStack { get; set; } = 1;
// Visuals
public int SpriteId { get; set; } = 0;
public bool IsEnabled { get; set; } = true;
}