Skip to content

Commit

Permalink
fix crash on specific core levels (#2638)
Browse files Browse the repository at this point in the history
  • Loading branch information
frzyc authored Jan 28, 2025
1 parent 7654897 commit 432142e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libs/zzz/stats/src/char.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ export function getCharacterStats(
hp_growth * (level - 1) +
levelStats[Math.floor(level / 10) - 1].hp,
}
Object.entries(coreStats[core - 1]).forEach(([k, v]) => {
stats[k] = (stats[k] || 0) + v
})
if (core > 1 && coreStats[core - 1])
Object.entries(coreStats[core - 1]).forEach(([k, v]) => {
stats[k] = (stats[k] || 0) + v
})

return stats
}

0 comments on commit 432142e

Please sign in to comment.