updating buff and debuff icons. separated COA classes from WoW classes on the character creation screen

This commit is contained in:
phenom committed 2026-08-16 11:16:51 -04:00
1 parent b5c9bce1aa
commit c00f3211ea
39 files changed
+2037 -208

No files matched your search

+30
View File
@@ -1,6 +1,7 @@
import { baseClassFor, type BaseClassId, type ClassId } from "../app/characterCatalog";
import type { AbilityDefinition } from "./abilityCatalog";
import { abilityAnimationById } from "./abilityAnimationLookup";
import type { CharacterVerticalMotion } from "./playerJump";
export type CharacterCombatAnimationKind =
| "ability-start"
@@ -112,6 +113,35 @@ export function selectCharacterBaseClip<TClip extends NamedAnimationClip>(
return selectWoWAnimationVariation(clips, ids);
}
export function selectCharacterVerticalClip<TClip extends NamedAnimationClip>(
clips: readonly TClip[],
motion: Exclude<CharacterVerticalMotion, "grounded">,
moving: boolean,
): CharacterClipSelection<TClip> | null {
const ids = motion === "rising"
? [37, 38, 40]
: motion === "falling"
? [40, 38, 37]
: moving
? [133, 39, 38]
: [39, 133, 38];
const runewakerNames = motion === "rising"
? ["Action - jump_up", "Action - jump_loop"]
: motion === "falling"
? ["Action - jump_down", "Action - jump_loop"]
: moving
? ["Action - jump_end_run", "Action - jump_end_back"]
: ["Action - jump_end_back", "Action - jump_end_run"];
const clip = selectWoWAnimationVariation(clips, ids)
?? selectRunewakerClipVariation(clips, runewakerNames);
return clip ? {
clip,
loop: motion === "falling",
terminal: false,
native: true,
} : null;
}
function isMeleeAbility(ability: AbilityDefinition | null, classId: ClassId): boolean {
if (!ability) return MELEE_CLASSES.has(baseClassFor(classId));
if (ability.range.max <= 4) return true;