forked from phenom/healer-man
Update Healer Man server
This commit is contained in:
1 parent
1fedb9368d
commit
cc3b2fa4d5
27 files changed
+1988
-83
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import type { AbilityDefinition } from "./abilityCatalog";
|
||||
|
||||
/**
|
||||
* Resolves the abilities affected by a cooldown reset. An untargeted reset is
|
||||
* the WoW "other abilities" form, so it must never make its source ability
|
||||
* immediately available again.
|
||||
*/
|
||||
export function cooldownResetCandidates(
|
||||
abilities: readonly AbilityDefinition[],
|
||||
sourceAbilityId: string,
|
||||
abilityName?: string,
|
||||
): readonly AbilityDefinition[] {
|
||||
if (abilityName) {
|
||||
const normalizedName = abilityName.toLowerCase();
|
||||
return abilities.filter((candidate) => candidate.name.toLowerCase() === normalizedName);
|
||||
}
|
||||
return abilities.filter((candidate) => candidate.id !== sourceAbilityId);
|
||||
}
|
||||
Reference in new issue
Block a user