forked from phenom/healer-man
42 lines
1.6 KiB
TypeScript
42 lines
1.6 KiB
TypeScript
import type { AbilityEffect } from "./abilityCatalog";
|
|
import type { AuraDefinition } from "./combatAuras";
|
|
import type { RomGeneratedAbilityLike } from "./romAbilitySemantics";
|
|
|
|
export const ROM_WARRIOR_BRIAR_TECHNIQUE_TAG = "rom-druid-warrior-briar-technique";
|
|
export const ROM_WARRIOR_BRIAR_TECHNIQUE_PASSIVE_TAG = "rom-druid-warrior-briar-technique-learned";
|
|
export const ROM_WARRIOR_BRIAR_TECHNIQUE_TRIGGER_SPELL_IDS = new Set([494016, 499956, 494216]);
|
|
export const ROM_WARRIOR_BRIAR_TECHNIQUE_AURA: AuraDefinition = {
|
|
id: "rom-druid-warrior-briar-technique",
|
|
name: "Briar Technique",
|
|
disposition: "buff",
|
|
durationMs: 15_000,
|
|
maxStacks: 5,
|
|
stackBehavior: "add",
|
|
utilityTags: [ROM_WARRIOR_BRIAR_TECHNIQUE_TAG],
|
|
modifiers: [
|
|
{ kind: "stat", stat: "attack-power", operation: "percent", value: 0.03, perStack: true },
|
|
{ kind: "stat", stat: "wisdom", operation: "percent", value: 0.03, perStack: true },
|
|
],
|
|
};
|
|
|
|
type RomWarriorGeneratedRow = RomGeneratedAbilityLike & {
|
|
readonly classId?: string;
|
|
readonly secondaryClassId?: string;
|
|
};
|
|
|
|
/** Give the source-defined Warrior/Priest Defender's Roar buffs their party scope. */
|
|
export function overrideRomWarriorEffects(
|
|
row: RomWarriorGeneratedRow,
|
|
translated: readonly AbilityEffect[],
|
|
): readonly AbilityEffect[] | null {
|
|
if (row.classId !== "rom-warrior"
|
|
|| row.secondaryClassId !== "rom-priest"
|
|
|| row.sourceSkillId !== 491466) return null;
|
|
|
|
return translated.map((effect) => effect.kind === "apply-aura"
|
|
&& effect.aura.modifiers?.some((modifier) => modifier.kind === "stat"
|
|
&& modifier.stat === "maximum-health")
|
|
? { ...effect, scope: "party" }
|
|
: effect);
|
|
}
|