Clamp battle save unit core stats

This commit is contained in:
2026-07-05 13:48:19 +09:00
parent deaec059ee
commit fe5a3edfd2
2 changed files with 12 additions and 4 deletions

View File

@@ -59,6 +59,11 @@ try {
['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 }) }],
['invalid unit hp precision', { units: patchUnit(0, { hp: 12.5 }) }],
['too high unit max hp', { units: patchUnit(0, { hp: 30, maxHp: 10000 }) }],
['invalid unit attack', { units: patchUnit(0, { attack: -1 }) }],
['invalid unit move precision', { units: patchUnit(0, { move: 3.5 }) }],
['too high unit move', { units: patchUnit(0, { move: 100 }) }],
['duplicate live unit tile', { units: patchUnit(1, { x: validState.units[0].x, y: validState.units[0].y }) }],
['invalid unit x', { units: patchUnit(0, { x: 12 }) }],
['invalid unit direction', { units: patchUnit(0, { direction: 'down' }) }],