diff --git a/project/assets/configs/quest.json b/project/assets/configs/quest.json index e500c036..2d48678b 100644 --- a/project/assets/configs/quest.json +++ b/project/assets/configs/quest.json @@ -312,6 +312,7 @@ "possibleSkillRewards": ["Endurance", "Strength", "Vitality"], "minRequestedAmount": 1, "maxRequestedAmount": 4, + "uniqueItemCount": 2, "minRequestedBulletAmount": 20, "maxRequestedBulletAmount": 60, "useWhitelist": true, @@ -980,8 +981,9 @@ }, "Completion": { "possibleSkillRewards": ["Endurance", "Strength", "Vitality"], - "minRequestedAmount": 2, - "maxRequestedAmount": 10, + "minRequestedAmount": 4, + "maxRequestedAmount": 12, + "uniqueItemCount": 4, "minRequestedBulletAmount": 20, "maxRequestedBulletAmount": 60, "useWhitelist": true, @@ -1650,7 +1652,8 @@ "Completion": { "possibleSkillRewards": ["Endurance", "Strength", "Vitality"], "minRequestedAmount": 1, - "maxRequestedAmount": 5, + "maxRequestedAmount": 3, + "uniqueItemCount": 1, "minRequestedBulletAmount": 20, "maxRequestedBulletAmount": 60, "useWhitelist": true, diff --git a/project/src/generators/RepeatableQuestGenerator.ts b/project/src/generators/RepeatableQuestGenerator.ts index e06d464d..fcb9086d 100644 --- a/project/src/generators/RepeatableQuestGenerator.ts +++ b/project/src/generators/RepeatableQuestGenerator.ts @@ -498,12 +498,7 @@ export class RepeatableQuestGenerator const levelsConfig = repeatableConfig.rewardScaling.levels; const roublesConfig = repeatableConfig.rewardScaling.roubles; - // In the available dumps only 2 distinct items were ever requested - let numberDistinctItems = 1; - if (Math.random() > 0.75) - { - numberDistinctItems = 2; - } + const distinctItemsToRetrieveCount = this.randomUtil.getInt(1, completionConfig.uniqueItemCount); const quest = this.generateRepeatableTemplate("Completion", traderId, repeatableConfig.side) as ICompletion; @@ -570,7 +565,7 @@ export class RepeatableQuestGenerator } // Draw items to ask player to retrieve - for (let i = 0; i < numberDistinctItems; i++) + for (let i = 0; i < distinctItemsToRetrieveCount; i++) { const itemSelected = itemSelection[this.randomUtil.randInt(itemSelection.length)]; const itemUnitPrice = this.itemHelper.getItemPrice(itemSelected[0]); diff --git a/project/src/models/spt/config/IQuestConfig.ts b/project/src/models/spt/config/IQuestConfig.ts index 147373ea..94f126ae 100644 --- a/project/src/models/spt/config/IQuestConfig.ts +++ b/project/src/models/spt/config/IQuestConfig.ts @@ -106,6 +106,7 @@ export interface ICompletion extends IBaseQuestConfig { minRequestedAmount: number; maxRequestedAmount: number; + uniqueItemCount: number minRequestedBulletAmount: number; maxRequestedBulletAmount: number; useWhitelist: boolean;