fix: clone nested element objects in discipline-slice processTick to avoid bypassing Zustand reactivity
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s

This commit is contained in:
2026-05-19 12:51:41 +02:00
parent 213425e6c9
commit ebcaab62bf
3 changed files with 8 additions and 5 deletions
+5 -2
View File
@@ -101,8 +101,11 @@ export const useDisciplineStore = create<DisciplineStore>()(
if (def.manaType === 'raw') {
rawMana -= drain;
} else {
elements[def.manaType].current -= drain;
} else if (elements[def.manaType]) {
elements[def.manaType] = {
...elements[def.manaType],
current: elements[def.manaType].current - drain,
};
}
newDisciplines[id] = { ...disc, xp: disc.xp + 1 };