update wave, cycle, damage type ...

This commit is contained in:
2025-05-02 16:54:55 +07:00
parent 665bdd497a
commit f9fd97598e
49 changed files with 2072 additions and 702 deletions
+3 -3
View File
@@ -2,13 +2,13 @@ import useBattleDataStore from "@/stores/battleDataStore";
import { useMemo } from "react";
export function useCalcTotalDmgAvatar(avatarId: number) {
const { turnHistory } = useBattleDataStore.getState();
const { skillHistory } = useBattleDataStore.getState();
return useMemo(() => {
return turnHistory
return skillHistory
.filter(t => t.avatarId === avatarId)
.reduce((sum, turn) => sum + turn.totalDamage, 0);
}, [avatarId, turnHistory]);
}, [avatarId, skillHistory]);
}