Update Healer Man server
This commit is contained in:
1 parent
9d7e0e2f9e
commit
35dfdaed61
94 files changed
+17034
-418
No files matched your search
@@ -5,6 +5,10 @@ import type { RomGeneratedAbilityLike } from "./romAbilitySemantics";
|
||||
export const ROM_ELECTROSTATIC_PERCENT_ABSORB_TAG = "rom-electrostatic-percent-max-health";
|
||||
|
||||
export const ROM_MAGE_WARLOCK_PASSIVE_TAGS = Object.freeze({
|
||||
eruption: "rom-mage-eruption",
|
||||
controlFlame: "rom-mage-druid-control-flame",
|
||||
controlFlameCooldown: "rom-mage-druid-control-flame-cooldown",
|
||||
flameFollower: "rom-mage-warden-flame-follower",
|
||||
industryFire: "rom-mage-warlock-industry-fire",
|
||||
lightningDisplay: "rom-mage-warlock-lightning-display",
|
||||
elementsOfPride: "rom-mage-warlock-elements-of-pride",
|
||||
@@ -23,6 +27,55 @@ 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;
|
||||
const MAGE_ERUPTION_PROC_CHANCE = 0.1;
|
||||
|
||||
function scaledDamage(effect: AbilityEffect, factor: number): AbilityEffect {
|
||||
if (effect.kind !== "damage") 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 }),
|
||||
...(effect.bonusFlat === undefined ? {} : { bonusFlat: effect.bonusFlat * factor }),
|
||||
};
|
||||
}
|
||||
|
||||
function controlFlameTriggeredAuras(): readonly AbilityEffect[] {
|
||||
return [
|
||||
{
|
||||
kind: "apply-aura",
|
||||
recipient: "caster",
|
||||
aura: {
|
||||
id: "rom-mage-druid-control-flame-buff",
|
||||
name: "Control Flame",
|
||||
disposition: "buff",
|
||||
durationMs: 12_000,
|
||||
modifiers: [{ kind: "stat", stat: "magical-attack", operation: "percent", value: 0.08 }],
|
||||
},
|
||||
sourceEffectType: -1,
|
||||
sourceAuraType: 171,
|
||||
miscValue: 8,
|
||||
triggerSpellId: 494054,
|
||||
},
|
||||
{
|
||||
kind: "apply-aura",
|
||||
recipient: "caster",
|
||||
aura: {
|
||||
id: "rom-mage-druid-control-flame-cooldown",
|
||||
name: "Control Flame cooldown",
|
||||
disposition: "buff",
|
||||
durationMs: 20_000,
|
||||
utilityTags: [ROM_MAGE_WARLOCK_PASSIVE_TAGS.controlFlameCooldown],
|
||||
},
|
||||
sourceEffectType: -1,
|
||||
sourceAuraType: -1,
|
||||
miscValue: 0,
|
||||
triggerSpellId: 494078,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
function stateAura(id: string, tag: string, durationMs: number | null): AbilityEffect {
|
||||
return {
|
||||
@@ -53,6 +106,10 @@ export function overrideRomMageWarlockEffects(
|
||||
row: RomGeneratedAbilityLike,
|
||||
translated: readonly AbilityEffect[],
|
||||
): readonly AbilityEffect[] | null {
|
||||
if (row.sourceSkillId === 490221) return [stateAura("eruption", ROM_MAGE_WARLOCK_PASSIVE_TAGS.eruption, null)];
|
||||
if (row.sourceSkillId === 494054) return [stateAura("control-flame", ROM_MAGE_WARLOCK_PASSIVE_TAGS.controlFlame, null)];
|
||||
if (row.sourceSkillId === 494051) return [stateAura("flame-follower", ROM_MAGE_WARLOCK_PASSIVE_TAGS.flameFollower, null)];
|
||||
|
||||
if (row.sourceSkillId === 491156) {
|
||||
return translated.map((effect) => {
|
||||
if (effect.kind !== "apply-aura" || !effect.aura.absorbs?.length) return effect;
|
||||
@@ -113,9 +170,20 @@ export function romMageWarlockCastEffects(
|
||||
ability: AbilityDefinition,
|
||||
effects: readonly AbilityEffect[],
|
||||
passiveTags: ReadonlySet<string>,
|
||||
eruptionProcRoll = 1,
|
||||
): readonly AbilityEffect[] {
|
||||
if (ability.source !== "runewaker") return effects;
|
||||
|
||||
if ([490204, 491150].includes(ability.dbcSpellId)
|
||||
&& passiveTags.has(ROM_MAGE_WARLOCK_PASSIVE_TAGS.eruption)
|
||||
&& eruptionProcRoll < MAGE_ERUPTION_PROC_CHANCE) {
|
||||
const doubledDamage = effects.map((effect) => scaledDamage(effect, 2));
|
||||
return passiveTags.has(ROM_MAGE_WARLOCK_PASSIVE_TAGS.controlFlame)
|
||||
&& !passiveTags.has(ROM_MAGE_WARLOCK_PASSIVE_TAGS.controlFlameCooldown)
|
||||
? [...doubledDamage, ...controlFlameTriggeredAuras()]
|
||||
: doubledDamage;
|
||||
}
|
||||
|
||||
if (ability.dbcSpellId === 497964 && passiveTags.has(ROM_MAGE_WARLOCK_PASSIVE_TAGS.industryFire)) {
|
||||
return [
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user