Release Healer Man 0.1.6
This commit is contained in:
@@ -85,6 +85,29 @@ describe("generated RuneWaker player catalog", () => {
|
||||
expect(abilityAtLevel(ranked, 80).dbcSpellId).toBe(eligible.spellId);
|
||||
});
|
||||
|
||||
it("preserves every source rank and its full flat or percentage cost", () => {
|
||||
const normalizedCosts = (rows: readonly { resource: string; amount: number; percentage?: boolean }[]) => rows.map((cost) => ({
|
||||
resource: cost.resource,
|
||||
amount: cost.amount,
|
||||
...(cost.percentage ? { percentage: true } : {}),
|
||||
}));
|
||||
const generatedRanks = generated.skills.reduce((sum, ability) => sum + ability.ranks.length, 0);
|
||||
expect(generatedRanks).toBe(934);
|
||||
expect(Math.max(...generated.skills.flatMap((ability) => (
|
||||
ability.costs.filter((cost) => !cost.percentage).map((cost) => cost.amount)
|
||||
)))).toBe(400);
|
||||
|
||||
for (const source of generated.skills) {
|
||||
const runtime = ROM_ALL_ABILITIES.find((ability) => ability.id === source.id)!;
|
||||
expect(runtime.costs, `${source.name} base costs`).toEqual(normalizedCosts(source.costs));
|
||||
expect(runtime.ranks).toHaveLength(source.ranks.length);
|
||||
for (const [index, sourceRank] of source.ranks.entries()) {
|
||||
expect(runtime.ranks?.[index]?.spellId, `${source.name} rank ${sourceRank.rank}`).toBe(sourceRank.sourceSkillId);
|
||||
expect(runtime.ranks?.[index]?.costs, `${source.name} rank ${sourceRank.rank} costs`).toEqual(normalizedCosts(sourceRank.costs));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
it("adds exactly ten percent of the secondary class base stats", () => {
|
||||
const primary = romNativeClassBaseStats("rom-warrior", 40);
|
||||
const secondary = romNativeClassBaseStats("rom-scout", 40);
|
||||
|
||||
Reference in New Issue
Block a user