character editing
This commit is contained in:
@@ -0,0 +1,145 @@
|
||||
@model Server.Data.Entities.DungeonItemDefinition
|
||||
@using Server.Data.Enums
|
||||
|
||||
@{
|
||||
var rarityColor = Model.Rarity switch
|
||||
{
|
||||
ItemRarity.Uncommon => "text-green-400",
|
||||
ItemRarity.Rare => "text-blue-400",
|
||||
ItemRarity.Epic => "text-purple-400",
|
||||
ItemRarity.Legendary => "text-orange-400",
|
||||
_ => "text-gray-300"
|
||||
};
|
||||
|
||||
var rarityBg = Model.Rarity switch
|
||||
{
|
||||
ItemRarity.Uncommon => "border-green-600",
|
||||
ItemRarity.Rare => "border-blue-600",
|
||||
ItemRarity.Epic => "border-purple-600",
|
||||
ItemRarity.Legendary => "border-orange-600",
|
||||
_ => "border-gray-600"
|
||||
};
|
||||
}
|
||||
|
||||
<div class="bg-gray-900 border @rarityBg rounded-lg p-3 w-64 shadow-xl">
|
||||
<!-- Header -->
|
||||
<div class="mb-2">
|
||||
<p class="font-semibold @rarityColor">@Model.Name</p>
|
||||
<p class="text-xs text-gray-500">@Model.Type • @Model.Rarity</p>
|
||||
</div>
|
||||
|
||||
@if (!string.IsNullOrEmpty(Model.Description))
|
||||
{
|
||||
<p class="text-xs text-gray-400 italic mb-2">@Model.Description</p>
|
||||
}
|
||||
|
||||
<!-- Weapon Stats -->
|
||||
@if (Model.MinDamage > 0 || Model.MaxDamage > 0)
|
||||
{
|
||||
<div class="text-sm mb-2">
|
||||
<span class="text-white">@Model.MinDamage - @Model.MaxDamage</span>
|
||||
<span class="text-gray-500">@Model.DamageType Damage</span>
|
||||
@if (Model.AttackRange > 0)
|
||||
{
|
||||
<span class="text-gray-500 block text-xs">Range: @Model.AttackRange</span>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- Armor Stats -->
|
||||
@if (Model.Armor > 0 || Model.MagicResist > 0)
|
||||
{
|
||||
<div class="text-sm mb-2 space-y-1">
|
||||
@if (Model.Armor > 0)
|
||||
{
|
||||
<p><span class="text-gray-500">Armor:</span> <span class="text-white">@Model.Armor</span></p>
|
||||
}
|
||||
@if (Model.MagicResist > 0)
|
||||
{
|
||||
<p><span class="text-gray-500">Magic Resist:</span> <span class="text-white">@Model.MagicResist</span></p>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- Stat Bonuses -->
|
||||
@{
|
||||
var bonuses = new List<(string name, int value, string color)>();
|
||||
if (Model.BonusStrength != 0) bonuses.Add(("STR", Model.BonusStrength, "text-red-400"));
|
||||
if (Model.BonusIntelligence != 0) bonuses.Add(("INT", Model.BonusIntelligence, "text-blue-400"));
|
||||
if (Model.BonusWisdom != 0) bonuses.Add(("WIS", Model.BonusWisdom, "text-purple-400"));
|
||||
if (Model.BonusEndurance != 0) bonuses.Add(("END", Model.BonusEndurance, "text-green-400"));
|
||||
if (Model.BonusDexterity != 0) bonuses.Add(("DEX", Model.BonusDexterity, "text-yellow-400"));
|
||||
if (Model.BonusHealth != 0) bonuses.Add(("HP", Model.BonusHealth, "text-green-300"));
|
||||
if (Model.BonusMana != 0) bonuses.Add(("Mana", Model.BonusMana, "text-blue-300"));
|
||||
}
|
||||
@if (bonuses.Any())
|
||||
{
|
||||
<div class="text-sm mb-2 space-y-0.5">
|
||||
@foreach (var bonus in bonuses)
|
||||
{
|
||||
var sign = bonus.value > 0 ? "+" : "";
|
||||
<p class="@bonus.color">@sign@bonus.value @bonus.name</p>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- Consumable Effects -->
|
||||
@if (Model.HealAmount > 0 || Model.ManaRestore > 0 || Model.StaminaRestore > 0)
|
||||
{
|
||||
<div class="text-sm mb-2 space-y-0.5 text-green-400">
|
||||
@if (Model.HealAmount > 0)
|
||||
{
|
||||
<p>Restores @Model.HealAmount HP</p>
|
||||
}
|
||||
@if (Model.ManaRestore > 0)
|
||||
{
|
||||
<p>Restores @Model.ManaRestore Mana</p>
|
||||
}
|
||||
@if (Model.StaminaRestore > 0)
|
||||
{
|
||||
<p>Restores @Model.StaminaRestore Stamina</p>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- Requirements -->
|
||||
@{
|
||||
var reqs = new List<string>();
|
||||
if (Model.RequiredLevel > 1) reqs.Add($"Level {Model.RequiredLevel}");
|
||||
if (Model.RequiredStrength > 0) reqs.Add($"{Model.RequiredStrength} STR");
|
||||
if (Model.RequiredIntelligence > 0) reqs.Add($"{Model.RequiredIntelligence} INT");
|
||||
if (Model.RequiredWisdom > 0) reqs.Add($"{Model.RequiredWisdom} WIS");
|
||||
if (Model.RequiredDexterity > 0) reqs.Add($"{Model.RequiredDexterity} DEX");
|
||||
}
|
||||
@if (reqs.Any())
|
||||
{
|
||||
<div class="text-xs text-red-400 mt-2 pt-2 border-t border-gray-700">
|
||||
Requires: @string.Join(", ", reqs)
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- Special -->
|
||||
@if (Model.IsTeleportScroll)
|
||||
{
|
||||
<p class="text-xs text-cyan-400 mt-1">Teleport Scroll</p>
|
||||
}
|
||||
@if (Model.TeachesSpellId.HasValue)
|
||||
{
|
||||
<p class="text-xs text-cyan-400 mt-1">Teaches a spell</p>
|
||||
}
|
||||
|
||||
<!-- Stack Info -->
|
||||
@if (Model.Stackable)
|
||||
{
|
||||
<p class="text-xs text-gray-500 mt-2">Stackable (max @Model.MaxStack)</p>
|
||||
}
|
||||
|
||||
<!-- Equip Slot -->
|
||||
@if (Model.EquipSlot.HasValue)
|
||||
{
|
||||
<p class="text-xs text-gray-500 mt-1">Slot: @Model.EquipSlot</p>
|
||||
}
|
||||
|
||||
<!-- Item ID -->
|
||||
<p class="text-xs text-gray-600 mt-2">ID: @Model.Id</p>
|
||||
</div>
|
||||
Reference in New Issue
Block a user