add calculateSkillDisplayValue helper for artifact skills
This commit is contained in:
parent
ea09f325a0
commit
4b2d1b7dc0
1 changed files with 17 additions and 0 deletions
|
|
@ -286,3 +286,20 @@ export function getSkillGroupForSlot(slot: number): ArtifactSkillGroup {
|
|||
if (slot === 3) return 'group_ii'
|
||||
return 'group_iii'
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the displayed skill value at a given level
|
||||
* Formula: baseValue + (growth × (level - 1))
|
||||
*
|
||||
* @param baseValue - The base strength value (rolled when skill is obtained)
|
||||
* @param growth - The per-level growth factor (default 0)
|
||||
* @param level - The skill level (1-5)
|
||||
* @returns The calculated display value that matches in-game display
|
||||
*/
|
||||
export function calculateSkillDisplayValue(
|
||||
baseValue: number,
|
||||
growth: number | undefined,
|
||||
level: number
|
||||
): number {
|
||||
return baseValue + (growth ?? 0) * (level - 1)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue