Clamp battle save unit levels

This commit is contained in:
2026-07-05 13:30:09 +09:00
parent 68960d6fd7
commit ad7e80b58f
2 changed files with 2 additions and 0 deletions

View File

@@ -55,6 +55,7 @@ try {
['self-targeting attack intent', { attackIntents: [{ attackerId: 'liu-bei', targetId: 'liu-bei' }] }],
['duplicate attack intent attacker id', { attackIntents: [{ attackerId: 'liu-bei', targetId: 'rebel-1' }, { attackerId: 'liu-bei', targetId: 'rebel-1' }] }],
['invalid units array', { units: {} }],
['too high unit level', { units: patchUnit(0, { level: 100, exp: 0 }) }],
['invalid unit exp threshold', { units: patchUnit(0, { exp: 100 }) }],
['invalid max-level unit exp threshold', { units: patchUnit(0, { level: 99, exp: 101 }) }],
['invalid unit hp', { units: patchUnit(0, { hp: 99, maxHp: 30 }) }],