Ability fixes and cleanup

This commit is contained in:
dingo
2026-02-08 18:57:04 -05:00
parent ec48fce15a
commit 6e3be67f64
10 changed files with 248 additions and 16 deletions
+26
View File
@@ -384,6 +384,7 @@
<tr class="border-b border-gray-700">
<th class="py-2 text-left text-gray-400">Ability</th>
<th class="py-2 text-left text-gray-400">Type</th>
<th class="py-2 text-left text-gray-400">Animation</th>
<th class="py-2 text-left text-gray-400">Damage</th>
<th class="py-2 text-left text-gray-400">Range</th>
<th class="py-2 text-left text-gray-400">Cooldown</th>
@@ -396,9 +397,20 @@
@foreach (var assignment in Model.MobAbilities)
{
var ability = assignment.AbilityDefinition;
var hasMappedAnimation = Model.AbilityAnimationByAssignmentId.TryGetValue(assignment.Id, out var mappedAnimation);
var resolvedAnimation = hasMappedAnimation
? mappedAnimation
: (!string.IsNullOrWhiteSpace(ability?.AnimationKey) ? ability!.AnimationKey : "attack");
<tr class="hover:bg-gray-800/50">
<td class="py-3 text-white font-medium">@ability?.Name</td>
<td class="py-3 text-gray-300">@ability?.AbilityType</td>
<td class="py-3 text-gray-300">
@resolvedAnimation
@if (hasMappedAnimation)
{
<span class="ml-1 text-xs text-cyan-400">(override)</span>
}
</td>
<td class="py-3 text-gray-300">@ability?.BaseDamage</td>
<td class="py-3 text-gray-300">@ability?.Range</td>
<td class="py-3 text-gray-300">@ability?.Cooldown.ToString("0.#")s</td>
@@ -475,6 +487,20 @@
<label class="label">Priority Override (0 = use default)</label>
<input type="number" name="priority" value="0" class="input" min="0" />
</div>
<div>
<label class="label">Animation (optional override)</label>
<select name="animationKey" class="input">
<option value="">Use ability default</option>
@foreach (var key in Model.AvailableAbilityAnimationKeys)
{
<option value="@key">@key</option>
}
</select>
@if (!Model.AvailableAbilityAnimationKeys.Any())
{
<p class="text-xs text-amber-400 mt-1">No mob animations assigned yet. Add animations first.</p>
}
</div>
<div>
<label class="label">Phase (0 = all phases)</label>
<input type="number" name="phase" value="0" class="input" min="0" />