Release Healer Man 0.1.7

This commit is contained in:
phenom committed 2026-08-22 15:53:43 -04:00
1 parent b12fb84859
commit eca6b5db9b
99 files changed
+1931 -150

No files matched your search

+15 -17
View File
@@ -1,14 +1,12 @@
import { useMemo } from "react";
import { classById } from "../app/characterCatalog";
import { use, useMemo } from "react";
import { classById, type CoaClassId } from "../app/characterCatalog";
import { useCombatStore } from "../game/combatStore";
import {
spentTalentPointsInTree,
talentNodesForTree,
talentTreesForClass,
unspentCoaEssence,
unspentTalentPoints,
} from "../game/talentCatalog";
import { isCoaClassId } from "../game/coaLiveCatalog";
runtimeSpentTalentPointsInTree,
runtimeUnspentCoaEssence,
runtimeUnspentTalentPoints,
} from "../game/talentRuntimeCatalog";
import { loadTalentUiCatalog, talentUiNodesForTree } from "../game/talentUiCatalog";
import { TalentsPanel } from "./TalentsPanel";
function treeSigil(name: string): string {
@@ -20,19 +18,20 @@ export default function TalentGameplayPanel() {
const level = useCombatStore((state) => state.level);
const talentRanks = useCombatStore((state) => state.talentRanks);
const classDefinition = classById(classId);
const talentTrees = useMemo(() => talentTreesForClass(classId).map((tree) => ({
const catalog = use(loadTalentUiCatalog(classId));
const talentTrees = useMemo(() => catalog.trees.map((tree) => ({
id: tree.id,
name: tree.name,
description: tree.description,
points: spentTalentPointsInTree(talentRanks, tree.id),
points: runtimeSpentTalentPointsInTree(talentRanks, tree.id),
color: classDefinition.color,
sigil: treeSigil(tree.name),
iconUrl: tree.icon,
backgroundUrl: tree.background,
nodes: talentNodesForTree(tree.id),
})), [classDefinition.color, classId, talentRanks]);
const coaEssence = isCoaClassId(classId)
? unspentCoaEssence(level, talentRanks, classId)
nodes: talentUiNodesForTree(catalog, tree.id),
})), [catalog, classDefinition.color, talentRanks]);
const coaEssence = classDefinition.mode === "conquest"
? runtimeUnspentCoaEssence(level, talentRanks, classId as CoaClassId)
: null;
return <TalentsPanel
@@ -40,11 +39,10 @@ export default function TalentGameplayPanel() {
ranks={talentRanks}
classId={classId}
playerLevel={level}
availablePoints={unspentTalentPoints(level, talentRanks, classId)}
availablePoints={runtimeUnspentTalentPoints(level, talentRanks, classId)}
abilityEssence={coaEssence?.ability}
talentEssence={coaEssence?.talent}
onInvest={(nodeId) => { useCombatStore.getState().allocateTalent(nodeId); }}
onReset={() => useCombatStore.getState().resetTalents()}
/>;
}