forked from phenom/healer-man
Complete RoM pair elite mechanics and creature family rules
This commit is contained in:
1 parent
c8b3a3d95a
commit
0206fda9e2
21 files changed
+1082
-134
No files matched your search
@@ -13,10 +13,16 @@ export const ROM_MAGE_WARLOCK_PASSIVE_TAGS = Object.freeze({
|
||||
} as const);
|
||||
|
||||
export const ROM_SOUL_STEPPING_CAST_TAG = "rom-mage-warlock-soul-stepping-cast";
|
||||
export const ROM_BREATH_ERASE_THREAT_TAG = "rom-mage-warlock-breath-erase-threat";
|
||||
export const ROM_FIRE_LIGHTNING_BURST_RESET_GUARD_TAG = "rom-fire-lightning-burst-reset-guard";
|
||||
export const ROM_FIRE_LIGHTNING_BURST_RESET_GUARD_MS = 6_000;
|
||||
|
||||
// Industry Fire's player tooltip gives no magnitude for its extra fire hit.
|
||||
// One Soul Pain tick is a conservative source-derived starting value.
|
||||
const INDUSTRY_FIRE_DOT_MULTIPLIER = 1.1;
|
||||
// Hidden replacement skill 498746: 621504 is the initial Fire hit, and
|
||||
// 621503 is its 24-second Fire DoT. These values come from MagicObject.db.
|
||||
const INDUSTRY_FIRE_HIT_BASE = 140;
|
||||
const INDUSTRY_FIRE_HIT_PER_LEVEL = 40;
|
||||
const INDUSTRY_FIRE_DOT_BASE = 23.4;
|
||||
const INDUSTRY_FIRE_DOT_PER_LEVEL = 10.4;
|
||||
|
||||
function stateAura(id: string, tag: string, durationMs: number | null): AbilityEffect {
|
||||
return {
|
||||
@@ -60,6 +66,16 @@ export function overrideRomMageWarlockEffects(
|
||||
});
|
||||
}
|
||||
|
||||
if (row.sourceSkillId === 498750) {
|
||||
return translated.map((effect) => effect.kind === "apply-aura" ? {
|
||||
...effect,
|
||||
aura: {
|
||||
...effect.aura,
|
||||
utilityTags: [...(effect.aura.utilityTags ?? []), ROM_BREATH_ERASE_THREAT_TAG],
|
||||
},
|
||||
} : effect);
|
||||
}
|
||||
|
||||
if (row.sourceSkillId === 498745) return [stateAura("industry-fire", ROM_MAGE_WARLOCK_PASSIVE_TAGS.industryFire, null)];
|
||||
if (row.sourceSkillId === 498748) return [stateAura("lightning-display", ROM_MAGE_WARLOCK_PASSIVE_TAGS.lightningDisplay, null)];
|
||||
if (row.sourceSkillId === 498751) return [stateAura("elements-of-pride", ROM_MAGE_WARLOCK_PASSIVE_TAGS.elementsOfPride, null)];
|
||||
@@ -72,18 +88,6 @@ export function overrideRomMageWarlockEffects(
|
||||
return null;
|
||||
}
|
||||
|
||||
function scaleDamage(effect: AbilityEffect, factor: number): AbilityEffect {
|
||||
if (effect.kind !== "damage" && effect.kind !== "dot") return effect;
|
||||
return {
|
||||
...effect,
|
||||
coefficient: effect.coefficient * factor,
|
||||
...(effect.coefficientPerLevel === undefined ? {} : { coefficientPerLevel: effect.coefficientPerLevel * factor }),
|
||||
...(effect.basePoints === undefined ? {} : { basePoints: effect.basePoints * factor }),
|
||||
...(effect.pointsPerLevel === undefined ? {} : { pointsPerLevel: effect.pointsPerLevel * factor }),
|
||||
...(effect.bonusPowerCoefficient === undefined ? {} : { bonusPowerCoefficient: effect.bonusPowerCoefficient * factor }),
|
||||
};
|
||||
}
|
||||
|
||||
function elementsOfPrideAura(school: "fire" | "nature", value: number): AbilityEffect {
|
||||
return {
|
||||
kind: "apply-aura",
|
||||
@@ -113,20 +117,25 @@ export function romMageWarlockCastEffects(
|
||||
if (ability.source !== "runewaker") return effects;
|
||||
|
||||
if (ability.dbcSpellId === 497964 && passiveTags.has(ROM_MAGE_WARLOCK_PASSIVE_TAGS.industryFire)) {
|
||||
const transformed = effects.map((effect) => effect.kind === "dot"
|
||||
? { ...scaleDamage(effect, INDUSTRY_FIRE_DOT_MULTIPLIER), school: "fire" as const }
|
||||
: effect);
|
||||
const dot = transformed.find((effect) => effect.kind === "dot");
|
||||
if (dot?.kind !== "dot") return transformed;
|
||||
return [
|
||||
...transformed,
|
||||
{
|
||||
kind: "damage",
|
||||
school: "fire",
|
||||
coefficient: dot.coefficient,
|
||||
basePoints: dot.basePoints ?? 0,
|
||||
pointsPerLevel: dot.pointsPerLevel ?? 0,
|
||||
sourceLevel: dot.sourceLevel ?? 1,
|
||||
coefficient: 0,
|
||||
basePoints: INDUSTRY_FIRE_HIT_BASE,
|
||||
pointsPerLevel: INDUSTRY_FIRE_HIT_PER_LEVEL,
|
||||
sourceLevel: 1,
|
||||
},
|
||||
{
|
||||
kind: "dot",
|
||||
school: "fire",
|
||||
coefficient: 0,
|
||||
basePoints: INDUSTRY_FIRE_DOT_BASE,
|
||||
pointsPerLevel: INDUSTRY_FIRE_DOT_PER_LEVEL,
|
||||
sourceLevel: 1,
|
||||
ticks: 24,
|
||||
intervalMs: 1_000,
|
||||
tag: "rom-industry-fire",
|
||||
},
|
||||
];
|
||||
}
|
||||
@@ -134,19 +143,52 @@ export function romMageWarlockCastEffects(
|
||||
let result = effects;
|
||||
if (passiveTags.has(ROM_MAGE_WARLOCK_PASSIVE_TAGS.lightningDisplay)) {
|
||||
result = result.map((effect) => {
|
||||
if (effect.kind === "apply-aura" && effect.aura.utilityTags?.includes("rom-charged")
|
||||
&& ability.dbcSpellId === 491169) {
|
||||
return { ...effect, aura: { ...effect.aura, durationMs: 18_000 } };
|
||||
if (effect.kind === "apply-aura" && [491169, 498749].includes(ability.dbcSpellId)) {
|
||||
if (effect.aura.utilityTags?.includes("rom-charged")) {
|
||||
return { ...effect, aura: { ...effect.aura, durationMs: 18_000 } };
|
||||
}
|
||||
if (effect.aura.modifiers?.some((modifier) => modifier.kind === "stat"
|
||||
&& modifier.stat === "magical-critical-strike")) {
|
||||
return {
|
||||
...effect,
|
||||
aura: {
|
||||
...effect.aura,
|
||||
durationMs: 18_000,
|
||||
modifiers: [
|
||||
...effect.aura.modifiers,
|
||||
{ kind: "damage" as const, direction: "dealt" as const, school: "nature" as const,
|
||||
operation: "percent" as const, value: 0.01 },
|
||||
],
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
return (effect.kind === "damage" || effect.kind === "dot") && effect.school === "nature"
|
||||
? scaleDamage(effect, 1.01)
|
||||
: effect;
|
||||
return effect;
|
||||
});
|
||||
}
|
||||
|
||||
if (passiveTags.has(ROM_MAGE_WARLOCK_PASSIVE_TAGS.elementsOfPride)) {
|
||||
if (ability.dbcSpellId === 491150) result = [...result, elementsOfPrideAura("nature", 0.02)];
|
||||
if (ability.dbcSpellId === 491170) result = [...result, elementsOfPrideAura("fire", 0.01)];
|
||||
if ([491150, 498755, 499812].includes(ability.dbcSpellId)) {
|
||||
result = [...result, elementsOfPrideAura("nature", 0.02)];
|
||||
}
|
||||
if ([491170, 498756, 499851].includes(ability.dbcSpellId)) {
|
||||
result = [...result, elementsOfPrideAura("fire", 0.01)];
|
||||
}
|
||||
}
|
||||
|
||||
if (ability.dbcSpellId === 491170 && passiveTags.has(ROM_MAGE_WARLOCK_PASSIVE_TAGS.elementalExtraction)) {
|
||||
// Hidden level-70 Electric Explosion 499851 replaces the normal branch's
|
||||
// 620232 hit with 623668; its Charged 623669 hit keeps the same values.
|
||||
const damage = result.filter((effect) => effect.kind === "damage");
|
||||
const normal = damage.at(-1);
|
||||
if (damage.length >= 2 && normal) result = result.map((effect) => effect === normal ? {
|
||||
kind: "damage" as const,
|
||||
school: "nature" as const,
|
||||
coefficient: 0,
|
||||
basePoints: 65,
|
||||
pointsPerLevel: 15,
|
||||
sourceLevel: 1,
|
||||
} : effect);
|
||||
}
|
||||
|
||||
if (ability.dbcSpellId === 498757 && !passiveTags.has(ROM_MAGE_WARLOCK_PASSIVE_TAGS.soulSpeed)) {
|
||||
@@ -162,7 +204,7 @@ export function romMageWarlockCriticalEffects(
|
||||
passiveTags: ReadonlySet<string>,
|
||||
): readonly AbilityEffect[] {
|
||||
if (!passiveTags.has(ROM_MAGE_WARLOCK_PASSIVE_TAGS.elementalExtraction)
|
||||
|| (ability.dbcSpellId !== 491170 && ability.dbcSpellId !== 499812)) return [];
|
||||
|| ![491150, 491170, 498755, 498756, 499812, 499851].includes(ability.dbcSpellId)) return [];
|
||||
return [{
|
||||
kind: "apply-aura",
|
||||
recipient: "ability-target",
|
||||
@@ -184,3 +226,18 @@ export function romMageWarlockCriticalEffects(
|
||||
triggerSpellId: 499814,
|
||||
}];
|
||||
}
|
||||
|
||||
/** Lua script 02557: reset Burst on a surviving target once per six seconds. */
|
||||
export function romFireLightningBurstReset(
|
||||
ability: AbilityDefinition,
|
||||
targetAlive: boolean,
|
||||
guardActive: boolean,
|
||||
): { readonly reset: boolean; readonly guardDurationMs: number } {
|
||||
const reset = ability.dbcSpellId === 498759 && targetAlive && !guardActive;
|
||||
return { reset, guardDurationMs: reset ? ROM_FIRE_LIGHTNING_BURST_RESET_GUARD_MS : 0 };
|
||||
}
|
||||
|
||||
/** Breath Erase source 621506: ten percent less generated threat for five seconds. */
|
||||
export function romMageWarlockThreatScale(activeTags: ReadonlySet<string>): number {
|
||||
return activeTags.has(ROM_BREATH_ERASE_THREAT_TAG) ? 0.9 : 1;
|
||||
}
|
||||
Reference in new issue
Block a user