Clamp campaign objective target markers
This commit is contained in:
@@ -768,7 +768,15 @@ try {
|
||||
status: 'lost',
|
||||
detail: 12,
|
||||
rewardGold: '80',
|
||||
targetTile: { x: '4', y: '5', radius: '2' }
|
||||
targetTile: { x: '4', y: '5', radius: '200' }
|
||||
},
|
||||
{
|
||||
id: 'broken-target',
|
||||
label: 'Broken target',
|
||||
achieved: false,
|
||||
detail: 'Bad target tile',
|
||||
rewardGold: 0,
|
||||
targetTile: { x: '-1', y: '5', radius: '2' }
|
||||
},
|
||||
'broken-objective',
|
||||
...Array.from({ length: 30 }, (_, index) => ({
|
||||
@@ -879,9 +887,12 @@ try {
|
||||
`Expected stale latestBattleId to recover to the latest valid settlement: ${JSON.stringify(malformedHistory)}`
|
||||
);
|
||||
assert(
|
||||
malformedHistory.battleHistory['first-battle-zhuo-commandery']?.objectives.length === 24 &&
|
||||
malformedHistory.battleHistory['first-battle-zhuo-commandery']?.objectives.length === 24 &&
|
||||
malformedHistory.battleHistory['first-battle-zhuo-commandery']?.objectives[0].rewardGold === 80 &&
|
||||
malformedHistory.battleHistory['first-battle-zhuo-commandery']?.objectives[0].targetTile?.x === 4 &&
|
||||
malformedHistory.battleHistory['first-battle-zhuo-commandery']?.objectives[0].targetTile?.radius === 99 &&
|
||||
malformedHistory.battleHistory['first-battle-zhuo-commandery']?.objectives[1].id === 'broken-target' &&
|
||||
malformedHistory.battleHistory['first-battle-zhuo-commandery']?.objectives[1].targetTile === undefined &&
|
||||
malformedHistory.battleHistory['first-battle-zhuo-commandery']?.objectives[0].status === undefined &&
|
||||
malformedHistory.battleHistory['first-battle-zhuo-commandery']?.units.length === 1 &&
|
||||
malformedHistory.battleHistory['first-battle-zhuo-commandery']?.units[0].level === 4 &&
|
||||
|
||||
Reference in New Issue
Block a user