Validate max-level equipment exp

This commit is contained in:
2026-07-05 15:08:42 +09:00
parent 2ebabac498
commit 947dc222c7

View File

@@ -117,6 +117,8 @@ function validateUnitEquipment(errors, unitEntries, itemCatalog, itemKeys, equip
errors.push(`${context}: invalid ${slot} exp ${state.exp}`);
} else if (state.level < 9 && state.exp >= equipmentExpToNext(state.level)) {
errors.push(`${context}: ${slot} exp ${state.exp} should be below next level threshold ${equipmentExpToNext(state.level)}`);
} else if (state.level >= 9 && state.exp > equipmentExpToNext(state.level)) {
errors.push(`${context}: max-level ${slot} exp ${state.exp} should be at most ${equipmentExpToNext(state.level)}`);
}
});
});