add aliases validation

This commit is contained in:
guiyomu-dev
2026-01-29 07:19:53 +01:00
parent 4d9c6e75cd
commit d0987cb9e9
2 changed files with 14 additions and 0 deletions

View File

@@ -488,6 +488,16 @@ func getRequiredStatsForRule(line string) []string {
return statsList
}
// ValidateStats checks that all required stats in stage2 are valid aliases.
func (r Rule) ValidateStats() error {
for _, statName := range r.requiredStats {
if _, found := statAliases[statName]; !found {
return fmt.Errorf("property %s is not valid or not supported", statName)
}
}
return nil
}
func evaluateClassSkillsSum(it data.Item) int {
// Check all class skills stats
totalClassSkills := 0