Release Healer Man 0.1.24

This commit is contained in:
phenom committed 2026-09-09 16:43:37 -04:00
1 parent c4346751a9
commit bac0da9300
118 files changed
+857 -289

No files matched your search

+16 -4
View File
@@ -21,6 +21,7 @@ import type {
} from "./combatAuras";
import generatedData from "./wow335AbilityData.generated.json";
import { playerCombatPower } from "./progression";
import { baseResourcesFor } from "./wotlkStats";
export const BASE_CLASS_STARTER_SOURCE_LEVEL = 10;
@@ -1164,8 +1165,19 @@ function targetForRank(rank: Wow335Rank, effects: readonly AbilityEffect[]): Abi
return "self";
}
function costForRank(resource: ResourceType, rank: Wow335Rank): number {
if (rank.powerCostPercentage > 0) return rank.powerCostPercentage;
function costForRank(classId: BaseClassId, resource: ResourceType, rank: Wow335Rank): number {
if (rank.powerCostPercentage > 0) {
if (resource === "mana") {
// Freeze DBC percent-of-base-mana costs at the level where this rank is
// learned. Advancing levels or equipping Intellect must never make an
// already-known rank more expensive; learning a later rank still can.
const sourceLevel = Math.max(1, rank.sourceLevel || rank.level);
return Math.max(0, Math.round(
baseResourcesFor(classId, sourceLevel).mana * rank.powerCostPercentage / 100,
));
}
return rank.powerCostPercentage;
}
if (resource === "rage" || resource === "runic-power") return Math.round(rank.powerCost / 10);
return rank.powerCost;
}
@@ -1205,8 +1217,8 @@ function rankDefinition(
gcdMs: rank.gcdMs,
cost: {
resource: rankResource,
amount: costForRank(rankResource, rank),
...(rank.powerCostPercentage > 0 ? { percentage: true } : {}),
amount: costForRank(classId, rankResource, rank),
...(rank.powerCostPercentage > 0 && rankResource !== "mana" ? { percentage: true } : {}),
},
effects,
};