Expose uniqueItemCount config value for use in choosing total items to return in Completion quests

Weekly quests now require more items than dailies
This commit is contained in:
Dev 2023-11-19 14:58:45 +00:00
parent 3b1c6b3fdd
commit 396b56d08d
3 changed files with 9 additions and 10 deletions

View File

@ -312,6 +312,7 @@
"possibleSkillRewards": ["Endurance", "Strength", "Vitality"], "possibleSkillRewards": ["Endurance", "Strength", "Vitality"],
"minRequestedAmount": 1, "minRequestedAmount": 1,
"maxRequestedAmount": 4, "maxRequestedAmount": 4,
"uniqueItemCount": 2,
"minRequestedBulletAmount": 20, "minRequestedBulletAmount": 20,
"maxRequestedBulletAmount": 60, "maxRequestedBulletAmount": 60,
"useWhitelist": true, "useWhitelist": true,
@ -980,8 +981,9 @@
}, },
"Completion": { "Completion": {
"possibleSkillRewards": ["Endurance", "Strength", "Vitality"], "possibleSkillRewards": ["Endurance", "Strength", "Vitality"],
"minRequestedAmount": 2, "minRequestedAmount": 4,
"maxRequestedAmount": 10, "maxRequestedAmount": 12,
"uniqueItemCount": 4,
"minRequestedBulletAmount": 20, "minRequestedBulletAmount": 20,
"maxRequestedBulletAmount": 60, "maxRequestedBulletAmount": 60,
"useWhitelist": true, "useWhitelist": true,
@ -1650,7 +1652,8 @@
"Completion": { "Completion": {
"possibleSkillRewards": ["Endurance", "Strength", "Vitality"], "possibleSkillRewards": ["Endurance", "Strength", "Vitality"],
"minRequestedAmount": 1, "minRequestedAmount": 1,
"maxRequestedAmount": 5, "maxRequestedAmount": 3,
"uniqueItemCount": 1,
"minRequestedBulletAmount": 20, "minRequestedBulletAmount": 20,
"maxRequestedBulletAmount": 60, "maxRequestedBulletAmount": 60,
"useWhitelist": true, "useWhitelist": true,

View File

@ -498,12 +498,7 @@ export class RepeatableQuestGenerator
const levelsConfig = repeatableConfig.rewardScaling.levels; const levelsConfig = repeatableConfig.rewardScaling.levels;
const roublesConfig = repeatableConfig.rewardScaling.roubles; const roublesConfig = repeatableConfig.rewardScaling.roubles;
// In the available dumps only 2 distinct items were ever requested const distinctItemsToRetrieveCount = this.randomUtil.getInt(1, completionConfig.uniqueItemCount);
let numberDistinctItems = 1;
if (Math.random() > 0.75)
{
numberDistinctItems = 2;
}
const quest = this.generateRepeatableTemplate("Completion", traderId, repeatableConfig.side) as ICompletion; const quest = this.generateRepeatableTemplate("Completion", traderId, repeatableConfig.side) as ICompletion;
@ -570,7 +565,7 @@ export class RepeatableQuestGenerator
} }
// Draw items to ask player to retrieve // 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 itemSelected = itemSelection[this.randomUtil.randInt(itemSelection.length)];
const itemUnitPrice = this.itemHelper.getItemPrice(itemSelected[0]); const itemUnitPrice = this.itemHelper.getItemPrice(itemSelected[0]);

View File

@ -106,6 +106,7 @@ export interface ICompletion extends IBaseQuestConfig
{ {
minRequestedAmount: number; minRequestedAmount: number;
maxRequestedAmount: number; maxRequestedAmount: number;
uniqueItemCount: number
minRequestedBulletAmount: number; minRequestedBulletAmount: number;
maxRequestedBulletAmount: number; maxRequestedBulletAmount: number;
useWhitelist: boolean; useWhitelist: boolean;