Ignore malformed campaign reward labels
This commit is contained in:
@@ -125,6 +125,15 @@ try {
|
||||
visitResynced.firstBattleReport?.completedCampVisits.includes('repeat-visit'),
|
||||
`Expected report-only camp visit completion to resync without duplicate rewards: ${JSON.stringify(visitResynced)}`
|
||||
);
|
||||
applyCampVisitReward('dirty-reward-visit', { itemRewards: ['', ' ', 'Bean -2', 'Bean +0', 'Bean x2'] });
|
||||
const dirtyRewardVisit = getCampaignState();
|
||||
assert(
|
||||
dirtyRewardVisit.inventory.Bean === 7 &&
|
||||
dirtyRewardVisit.inventory[''] === undefined &&
|
||||
dirtyRewardVisit.inventory['Bean -'] === undefined &&
|
||||
dirtyRewardVisit.completedCampVisits.includes('dirty-reward-visit'),
|
||||
`Expected malformed reward labels to be ignored while valid rewards apply: ${JSON.stringify(dirtyRewardVisit)}`
|
||||
);
|
||||
const repeatBondId = firstScenario.bonds[0].id;
|
||||
applyCampBondExp('repeat-dialogue', repeatBondId, 10);
|
||||
const repeatedDialogueOnce = getCampaignState();
|
||||
|
||||
Reference in New Issue
Block a user