Skip to content

Commit

Permalink
lint for keys
Browse files Browse the repository at this point in the history
  • Loading branch information
nwjgit committed Feb 22, 2024
1 parent 7e02fca commit e7eff7d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
19 changes: 11 additions & 8 deletions src/lib/MUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,11 @@ GROUP BY data->>'clueID';`);
return this.caPoints() >= CombatAchievements[tier].rewardThreshold;
}

buildTertiaryItemChanges(hasRingOfWealthI: boolean = false, isInWilderness: boolean = false, isOnSlayerTask: boolean = false) {
buildTertiaryItemChanges(
hasRingOfWealthI: boolean = false,
isInWilderness: boolean = false,
isOnSlayerTask: boolean = false
) {
const changes = new Map();

const tiers = Object.keys(CombatAchievements) as Array<keyof typeof CombatAchievements>;
Expand All @@ -754,25 +758,24 @@ GROUP BY data->>'clueID';`);
changes.set(`Clue scroll (${tier})`, change);
}

if (isInWilderness) changes.set('Giant key', 50);
if (isInWilderness) changes.set('Giant key', 50);

let mossGiantType: string = `${isInWilderness}_${isOnSlayerTask}`;
switch(mossGiantType) {
switch (mossGiantType) {
case 'true_false':
changes.set('Mossy key', 60)
changes.set('Mossy key', 60);
break;
case 'false_true':
changes.set('Mossy key', 66.67)
changes.set('Mossy key', 66.67);
break;
case 'true_true':
changes.set('Mossy key', 77.6)
changes.set('Mossy key', 77.6);
break;
}

return changes;
}


async checkBankBackground() {
if (this.bitfield.includes(BitField.isModerator)) {
return;
Expand Down
6 changes: 5 additions & 1 deletion src/tasks/minions/monsterActivity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,11 @@ export const monsterTask: MinionTask = {
hasSuperiors: superiorTable,
inCatacombs: isInCatacombs,
lootTableOptions: {
tertiaryItemPercentageChanges: user.buildTertiaryItemChanges(hasRingOfWealthI, isInWilderness, isOnTaskResult.isOnTask)
tertiaryItemPercentageChanges: user.buildTertiaryItemChanges(
hasRingOfWealthI,
isInWilderness,
isOnTaskResult.isOnTask
)
}
};

Expand Down

0 comments on commit e7eff7d

Please sign in to comment.