Correct minion sacrifice and passive talent semantics (refs #19)
Coordinator Root /root, session 01a12399-cfab-7c72-8455-e0e4cb7e156c. Independently reviewed by /root/combat_source_finish_luna (GPT-6 Luna xhigh). 31 focused DK tests, required release check and complete source type check pass.
This commit is contained in:
1 parent
a9322a3897
commit
3687c423e2
11 files changed
+284
-10
No files matched your search
@@ -1633,6 +1633,14 @@ function classScriptEffects(
|
||||
triggerSpellId: 0,
|
||||
durationMs: 0,
|
||||
}];
|
||||
case "death-knight:Death Pact": return [{
|
||||
kind: "sacrifice-minion",
|
||||
// These are the undead ghoul entries already modeled by Raise Dead and
|
||||
// Army of the Dead. Unknown summon families are never assumed undead.
|
||||
creatureIds: [26125, 24207],
|
||||
radius: rank.effects.find((effect) => effect.effectType === 1)?.radius ?? 0,
|
||||
percentMaxHealth: Math.abs(rank.effects.find((effect) => effect.effectType === 10)?.basePoints ?? 0) / 100,
|
||||
}];
|
||||
case "death-knight:Raise Dead": return [{ kind: "summon", creatureId: 26125, coefficient: 0.45, durationMs: 60_000 }];
|
||||
case "death-knight:Army of the Dead": return Array.from({ length: 8 }, () => ({
|
||||
kind: "summon" as const, creatureId: 24207, coefficient: 0.2, durationMs: 40_000,
|
||||
@@ -1851,6 +1859,11 @@ export function hunterExplosiveTrapDirectScaling(
|
||||
};
|
||||
}
|
||||
|
||||
function learnOnlyRank(rank: Wow335Rank): boolean {
|
||||
const effects = rank.effects.filter((effect) => effect.effectType !== 0);
|
||||
return effects.length > 0 && effects.every((effect) => effect.effectType === 36);
|
||||
}
|
||||
|
||||
function effectsForRank(classId: BaseClassId, rank: Wow335Rank, abilityName: string): readonly AbilityEffect[] {
|
||||
const effects: AbilityEffect[] = [];
|
||||
for (const [effectIndex, effect] of rank.effects.entries()) {
|
||||
@@ -2150,7 +2163,7 @@ function effectsForRank(classId: BaseClassId, rank: Wow335Rank, abilityName: str
|
||||
}
|
||||
const auraOnlyStance = classId === "death-knight"
|
||||
&& ["Blood Presence", "Frost Presence", "Unholy Presence"].includes(abilityName);
|
||||
if (!auraOnlyStance && !(classId === "warrior" && abilityName === "Last Stand")
|
||||
if (!learnOnlyRank(rank) && !auraOnlyStance && !(classId === "warrior" && abilityName === "Last Stand")
|
||||
&& !(classId === "mage" && abilityName === "Molten Armor")
|
||||
&& !effects.some((effect) => ["damage", "heal", "dot", "hot", "shield"].includes(effect.kind))) {
|
||||
if (classId === "death-knight" && abilityName === "Death Coil") {
|
||||
@@ -2167,6 +2180,7 @@ function effectsForRank(classId: BaseClassId, rank: Wow335Rank, abilityName: str
|
||||
.filter((effect) => effect.kind !== "scripted" && effect.kind !== "unsupported")
|
||||
.filter((effect) => !(
|
||||
(classId === "paladin" && abilityName === "Redemption" && effect.kind === "resurrection")
|
||||
|| (classId === "death-knight" && abilityName === "Death Pact" && ["execute", "heal"].includes(effect.kind))
|
||||
|| (classId === "paladin" && abilityName === "Divine Storm"
|
||||
&& (effect.kind === "damage" || effect.kind === "heal"))
|
||||
|| (classId === "paladin" && abilityName === "Holy Shield" && effect.kind === "damage")
|
||||
@@ -2523,8 +2537,9 @@ function abilityDefinition(classId: BaseClassId, chain: Wow335Chain): AbilityDef
|
||||
const effectiveSourceUnlockLevel = classId === "warrior" && chain.name === "Sweeping Strikes"
|
||||
? Math.max(1, firstRaw.sourceLevel || firstRaw.level)
|
||||
: chain.sourceUnlockLevel;
|
||||
const target = abilityNameTarget(classId, chain.name) ?? targetForRank(firstRaw, first.effects);
|
||||
const radius = Math.max(
|
||||
const target = first.effects.some((effect) => effect.kind === "sacrifice-minion")
|
||||
? "self" : abilityNameTarget(classId, chain.name) ?? targetForRank(firstRaw, first.effects);
|
||||
const radius = first.effects.some((effect) => effect.kind === "sacrifice-minion") ? 0 : Math.max(
|
||||
abilityNameRadius(chain.name),
|
||||
...firstRaw.effects.map((effect) => effect.radius),
|
||||
);
|
||||
@@ -2579,7 +2594,8 @@ function abilityDefinition(classId: BaseClassId, chain: Wow335Chain): AbilityDef
|
||||
gcdMs: first.gcdMs,
|
||||
cost: first.cost,
|
||||
effects: first.effects,
|
||||
passive: chain.passive,
|
||||
passive: chain.passive || (Boolean(chain.talentNodeId) && castRanks.every((rank) => learnOnlyRank(rank) && rank.castTimeMs === 0
|
||||
&& rank.cooldownMs === 0 && rank.powerCost === 0 && rank.powerCostPercentage === 0)),
|
||||
source: "wow335-progression",
|
||||
// Some stock WotLK active talents remain in Spell.dbc after Ascension's
|
||||
// patched Talent.dbc removes their nodes (Devastate, Shadowstep, Lava
|
||||
|
||||
Reference in new issue
Block a user