@page "/admin/abilities" @model Abilities.IndexModel @using DataServer.Data.Enums @{ ViewData["Title"] = "Mob Abilities"; }

Mob Abilities

Manage abilities that can be assigned to mobs

+ New Ability
@if (TempData["Message"] != null) {
@TempData["Message"]
} @if (TempData["Error"] != null) {
@TempData["Error"]
}
Clear
@foreach (var ability in Model.Abilities) { }
Name Key Type Damage Range Cooldown Status Actions
@ability.Name @ability.Key @ability.AbilityType @ability.BaseDamage @ability.Range @ability.Cooldown.ToString("0.#")s @if (ability.IsEnabled) { Enabled } else { Disabled }
Edit
@Html.AntiForgeryToken()
@if (Model.Abilities.Count == 0) {
No abilities found. Create one
}
@functions { string GetTypeBadge(MobAbilityType type) { return type switch { MobAbilityType.MeleeAttack or MobAbilityType.Cleave => "bg-red-600", MobAbilityType.ProjectileSingle or MobAbilityType.ProjectileAoe => "bg-orange-600", MobAbilityType.HealSelf or MobAbilityType.HealAlly or MobAbilityType.HealAoe => "bg-green-600", MobAbilityType.Poison or MobAbilityType.Bleed or MobAbilityType.Burn => "bg-purple-600", MobAbilityType.Stun or MobAbilityType.Knockback or MobAbilityType.Fear or MobAbilityType.Pull => "bg-yellow-600", MobAbilityType.SummonSingle or MobAbilityType.SummonBulk => "bg-blue-600", _ => "bg-gray-600" }; } }