53 lines
1.8 KiB
TypeScript
53 lines
1.8 KiB
TypeScript
import type { AbilityEffect } from "./abilityCatalog";
|
|
import type { RomGeneratedAbilityLike } from "./romAbilitySemantics";
|
|
|
|
export const ROM_PRIEST_MAGE_ENLIGHTENMENT = Object.freeze({
|
|
passiveSpellId: 492_933,
|
|
wisdomPercent: 12,
|
|
});
|
|
|
|
export const ROM_PRIEST_MAGE_ENLIGHTENMENT_PASSIVE_TAG = "rom-priest-mage:492933:enlightenment-passive";
|
|
|
|
export const ROM_PRIEST_MAGE_ENLIGHTENMENT_PASSIVE_EFFECT: Extract<AbilityEffect, { kind: "apply-aura" }> = {
|
|
kind: "apply-aura",
|
|
recipient: "caster",
|
|
aura: {
|
|
id: ROM_PRIEST_MAGE_ENLIGHTENMENT_PASSIVE_TAG,
|
|
name: "Enlightenment",
|
|
description: "Increases Wisdom by 12%.",
|
|
disposition: "buff",
|
|
durationMs: null,
|
|
maxStacks: 1,
|
|
stackBehavior: "refresh",
|
|
utilityTags: [ROM_PRIEST_MAGE_ENLIGHTENMENT_PASSIVE_TAG],
|
|
modifiers: [{
|
|
kind: "stat",
|
|
stat: "wisdom",
|
|
operation: "percent",
|
|
value: ROM_PRIEST_MAGE_ENLIGHTENMENT.wisdomPercent / 100,
|
|
}],
|
|
},
|
|
sourceEffectType: -1,
|
|
sourceAuraType: -1,
|
|
miscValue: ROM_PRIEST_MAGE_ENLIGHTENMENT.wisdomPercent,
|
|
triggerSpellId: ROM_PRIEST_MAGE_ENLIGHTENMENT.passiveSpellId,
|
|
};
|
|
|
|
/** Current CoA Enlightenment is a permanent +12% Wisdom passive. */
|
|
export function romPriestMageEnlightenmentPassiveEffects(
|
|
learned: boolean,
|
|
): readonly AbilityEffect[] {
|
|
return learned ? [ROM_PRIEST_MAGE_ENLIGHTENMENT_PASSIVE_EFFECT] : [];
|
|
}
|
|
|
|
/** Replace RuneWaker's conditional Enlightenment components with the current CoA passive. */
|
|
export function overrideRomPriestMageEffects(
|
|
row: RomGeneratedAbilityLike,
|
|
_translated: readonly AbilityEffect[],
|
|
): readonly AbilityEffect[] | null {
|
|
if (row.classId !== "rom-priest"
|
|
|| row.secondaryClassId !== "rom-mage"
|
|
|| row.sourceSkillId !== ROM_PRIEST_MAGE_ENLIGHTENMENT.passiveSpellId) return null;
|
|
return romPriestMageEnlightenmentPassiveEffects(true);
|
|
}
|