prevent collection quests requesting more than 1 ammo per repeatable quest
This commit is contained in:
parent
89ff63f822
commit
f727b13215
@ -714,7 +714,6 @@
|
|||||||
"5aa2b986e5b5b00014028f4c": 8889,
|
"5aa2b986e5b5b00014028f4c": 8889,
|
||||||
"5aa2b9aee5b5b00015693121": 23371,
|
"5aa2b9aee5b5b00015693121": 23371,
|
||||||
"5aa2b9ede5b5b000137b758b": 19374,
|
"5aa2b9ede5b5b000137b758b": 19374,
|
||||||
"5aa2ba19e5b5b00014028f4e": 9622,
|
|
||||||
"5aa2ba46e5b5b000137b758d": 39810,
|
"5aa2ba46e5b5b000137b758d": 39810,
|
||||||
"5aa2ba71e5b5b000137b758f": 50525,
|
"5aa2ba71e5b5b000137b758f": 50525,
|
||||||
"5aa66a9be5b5b0214e506e89": 27124,
|
"5aa66a9be5b5b0214e506e89": 27124,
|
||||||
|
@ -565,6 +565,7 @@ export class RepeatableQuestGenerator
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Draw items to ask player to retrieve
|
// Draw items to ask player to retrieve
|
||||||
|
let isAmmo = 0
|
||||||
for (let i = 0; i < distinctItemsToRetrieveCount; i++)
|
for (let i = 0; i < distinctItemsToRetrieveCount; i++)
|
||||||
{
|
{
|
||||||
const itemSelected = itemSelection[this.randomUtil.randInt(itemSelection.length)];
|
const itemSelected = itemSelection[this.randomUtil.randInt(itemSelection.length)];
|
||||||
@ -573,6 +574,14 @@ export class RepeatableQuestGenerator
|
|||||||
let maxValue = completionConfig.maxRequestedAmount;
|
let maxValue = completionConfig.maxRequestedAmount;
|
||||||
if (this.itemHelper.isOfBaseclass(itemSelected[0], BaseClasses.AMMO))
|
if (this.itemHelper.isOfBaseclass(itemSelected[0], BaseClasses.AMMO))
|
||||||
{
|
{
|
||||||
|
// Prevent multiple ammo requirements from being picked, stop after 6 attempts
|
||||||
|
if (isAmmo > 0 && isAmmo < 6)
|
||||||
|
{
|
||||||
|
isAmmo++;
|
||||||
|
i--;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
isAmmo++;
|
||||||
minValue = completionConfig.minRequestedBulletAmount;
|
minValue = completionConfig.minRequestedBulletAmount;
|
||||||
maxValue = completionConfig.maxRequestedBulletAmount;
|
maxValue = completionConfig.maxRequestedBulletAmount;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user