@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"]
}
@foreach (var ability in Model.Abilities)
{
| @ability.Name |
@ability.Key |
@ability.AbilityType
|
@ability.BaseDamage |
@ability.Range |
@ability.Cooldown.ToString("0.#")s |
@if (ability.IsEnabled)
{
Enabled
}
else
{
Disabled
}
|
|
}
@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"
};
}
}