Validate battle save bond state
This commit is contained in:
@@ -83,12 +83,14 @@ try {
|
||||
['duplicate bond id', { bonds: [validState.bonds[0], { ...validState.bonds[0], unitIds: ['guan-yu', 'liu-bei'] }] }],
|
||||
['too many bonds', { bonds: Array.from({ length: 129 }, (_, index) => ({ ...validState.bonds[0], id: `bond-${index}` })) }],
|
||||
['unknown bond unit id', { bonds: [{ ...validState.bonds[0], unitIds: ['liu-bei', 'ghost-unit'] }] }],
|
||||
['self bond unit ids', { bonds: [{ ...validState.bonds[0], unitIds: ['liu-bei', 'liu-bei'] }] }],
|
||||
['invalid bond level', { bonds: [{ ...validState.bonds[0], level: 0 }] }],
|
||||
['too high bond level', { bonds: [{ ...validState.bonds[0], level: 101 }] }],
|
||||
['invalid bond exp', { bonds: [{ ...validState.bonds[0], exp: -1 }] }],
|
||||
['invalid bond exp threshold', { bonds: [{ ...validState.bonds[0], level: 1, exp: 100 }] }],
|
||||
['invalid max-level bond exp threshold', { bonds: [{ ...validState.bonds[0], level: 100, exp: 101 }] }],
|
||||
['invalid bond battle exp', { bonds: [{ ...validState.bonds[0], battleExp: 1.5 }] }],
|
||||
['too high bond battle exp', { bonds: [{ ...validState.bonds[0], battleExp: 1000000 }] }],
|
||||
['invalid item stock count', { itemStocks: { 'liu-bei': { bean: -1 } } }],
|
||||
['too many item stock count', { itemStocks: { 'liu-bei': { bean: 4, wine: 2 } } }],
|
||||
['unknown item stock unit id', { itemStocks: { 'ghost-unit': { bean: 1 } } }],
|
||||
|
||||
Reference in New Issue
Block a user