Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add teleport scrolls and bugfix #6148

Merged
merged 1 commit into from
Oct 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions src/lib/minions/data/killableMonsters/bosses/misc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,15 @@ const killableBosses: KillableMonster[] = [
}
},
defaultAttackStyles: [SkillsEnum.Ranged, SkillsEnum.Magic],
disallowedAttackStyles: [SkillsEnum.Attack, SkillsEnum.Strength]
disallowedAttackStyles: [SkillsEnum.Attack, SkillsEnum.Strength],
itemCost: [
{
itemCost: new Bank().add('Zul-andra teleport'),
qtyPerKill: 0.25,
boostPercent: 10,
optional: true
}
]
},
{
id: Monsters.KalphiteQueen.id,
Expand Down Expand Up @@ -347,7 +355,15 @@ const killableBosses: KillableMonster[] = [
combatXpMultiplier: 1.15,
healAmountNeeded: 20 * 15,
attackStyleToUse: GearStat.AttackCrush,
attackStylesUsed: [GearStat.AttackCrush]
attackStylesUsed: [GearStat.AttackCrush],
itemCost: [
{
itemCost: new Bank().add('Key master teleport'),
qtyPerKill: 0.1,
boostPercent: 10,
optional: true
}
]
},
{
id: Monsters.KingBlackDragon.id,
Expand Down
10 changes: 9 additions & 1 deletion src/lib/minions/data/killableMonsters/chaeldarMonsters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,14 @@ export const chaeldarMonsters: KillableMonster[] = [
healAmountNeeded: 250,
attackStyleToUse: GearStat.AttackStab,
attackStylesUsed: [GearStat.AttackSlash, GearStat.AttackRanged, GearStat.AttackMagic],
requiredQuests: [QuestID.WhileGuthixSleeps]
requiredQuests: [QuestID.WhileGuthixSleeps],
itemCost: [
{
itemCost: new Bank().add('Guthixian temple teleport'),
qtyPerKill: 0.05,
boostPercent: 10,
optional: true
}
]
}
];
236 changes: 162 additions & 74 deletions src/lib/minions/data/killableMonsters/revs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,22 @@ export const revenantMonsters: KillableMonster[] = [
qpRequired: 0,
pkActivityRating: 9,
pkBaseDeathChance: 8,
itemCost: {
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [
{ itemCost: new Bank().add('Super restore (4)', 1), qtyPerMinute: 0.17 },
{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }
]
},
itemCost: [
{
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [
{ itemCost: new Bank().add('Super restore (4)', 1), qtyPerMinute: 0.17 },
{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }
]
},
{
itemCost: new Bank().add('Revenant cave teleport'),
qtyPerKill: 0.05,
boostPercent: 5,
optional: true
}
],
canBePked: true
},
{
Expand All @@ -36,14 +44,22 @@ export const revenantMonsters: KillableMonster[] = [
qpRequired: 0,
pkActivityRating: 9,
pkBaseDeathChance: 8,
itemCost: {
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [
{ itemCost: new Bank().add('Super restore (4)', 1), qtyPerMinute: 0.17 },
{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }
]
},
itemCost: [
{
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [
{ itemCost: new Bank().add('Super restore (4)', 1), qtyPerMinute: 0.17 },
{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }
]
},
{
itemCost: new Bank().add('Revenant cave teleport'),
qtyPerKill: 0.05,
boostPercent: 5,
optional: true
}
],
canBePked: true
},
{
Expand All @@ -57,14 +73,22 @@ export const revenantMonsters: KillableMonster[] = [
qpRequired: 0,
pkActivityRating: 9,
pkBaseDeathChance: 8,
itemCost: {
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [
{ itemCost: new Bank().add('Super restore (4)', 1), qtyPerMinute: 0.17 },
{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }
]
},
itemCost: [
{
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [
{ itemCost: new Bank().add('Super restore (4)', 1), qtyPerMinute: 0.17 },
{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }
]
},
{
itemCost: new Bank().add('Revenant cave teleport'),
qtyPerKill: 0.05,
boostPercent: 5,
optional: true
}
],
canBePked: true
},
{
Expand All @@ -78,14 +102,22 @@ export const revenantMonsters: KillableMonster[] = [
qpRequired: 0,
pkActivityRating: 9,
pkBaseDeathChance: 8,
itemCost: {
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [
{ itemCost: new Bank().add('Super restore (4)', 1), qtyPerMinute: 0.17 },
{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }
]
},
itemCost: [
{
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [
{ itemCost: new Bank().add('Super restore (4)', 1), qtyPerMinute: 0.17 },
{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }
]
},
{
itemCost: new Bank().add('Revenant cave teleport'),
qtyPerKill: 0.05,
boostPercent: 5,
optional: true
}
],
canBePked: true
},
{
Expand All @@ -99,7 +131,15 @@ export const revenantMonsters: KillableMonster[] = [
qpRequired: 0,
pkActivityRating: 8,
pkBaseDeathChance: 8,
canBePked: true
canBePked: true,
itemCost: [
{
itemCost: new Bank().add('Revenant cave teleport'),
qtyPerKill: 0.05,
boostPercent: 5,
optional: true
}
]
},
{
id: Monsters.RevenantHellhound.id,
Expand All @@ -112,14 +152,22 @@ export const revenantMonsters: KillableMonster[] = [
qpRequired: 0,
pkActivityRating: 9,
pkBaseDeathChance: 8,
itemCost: {
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [
{ itemCost: new Bank().add('Super restore (4)', 1), qtyPerMinute: 0.17 },
{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }
]
},
itemCost: [
{
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [
{ itemCost: new Bank().add('Super restore (4)', 1), qtyPerMinute: 0.17 },
{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }
]
},
{
itemCost: new Bank().add('Revenant cave teleport'),
qtyPerKill: 0.05,
boostPercent: 5,
optional: true
}
],
canBePked: true
},
{
Expand All @@ -133,14 +181,22 @@ export const revenantMonsters: KillableMonster[] = [
qpRequired: 0,
pkActivityRating: 9,
pkBaseDeathChance: 8,
itemCost: {
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [
{ itemCost: new Bank().add('Super restore (4)', 1), qtyPerMinute: 0.17 },
{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }
]
},
itemCost: [
{
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [
{ itemCost: new Bank().add('Super restore (4)', 1), qtyPerMinute: 0.17 },
{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }
]
},
{
itemCost: new Bank().add('Revenant cave teleport'),
qtyPerKill: 0.05,
boostPercent: 5,
optional: true
}
],
canBePked: true
},
{
Expand All @@ -154,7 +210,15 @@ export const revenantMonsters: KillableMonster[] = [
qpRequired: 0,
pkActivityRating: 8,
pkBaseDeathChance: 8,
canBePked: true
canBePked: true,
itemCost: [
{
itemCost: new Bank().add('Revenant cave teleport'),
qtyPerKill: 0.05,
boostPercent: 5,
optional: true
}
]
},
{
id: Monsters.RevenantKnight.id,
Expand All @@ -167,14 +231,22 @@ export const revenantMonsters: KillableMonster[] = [
qpRequired: 0,
pkActivityRating: 9,
pkBaseDeathChance: 8,
itemCost: {
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [
{ itemCost: new Bank().add('Super restore (4)', 1), qtyPerMinute: 0.17 },
{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }
]
},
itemCost: [
{
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [
{ itemCost: new Bank().add('Super restore (4)', 1), qtyPerMinute: 0.17 },
{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }
]
},
{
itemCost: new Bank().add('Revenant cave teleport'),
qtyPerKill: 0.05,
boostPercent: 5,
optional: true
}
],
canBePked: true
},
{
Expand All @@ -188,14 +260,22 @@ export const revenantMonsters: KillableMonster[] = [
qpRequired: 0,
pkActivityRating: 9,
pkBaseDeathChance: 8,
itemCost: {
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [
{ itemCost: new Bank().add('Super restore (4)', 1), qtyPerMinute: 0.17 },
{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }
]
},
itemCost: [
{
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [
{ itemCost: new Bank().add('Super restore (4)', 1), qtyPerMinute: 0.17 },
{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }
]
},
{
itemCost: new Bank().add('Revenant cave teleport'),
qtyPerKill: 0.05,
boostPercent: 5,
optional: true
}
],
canBePked: true
},
{
Expand All @@ -209,14 +289,22 @@ export const revenantMonsters: KillableMonster[] = [
qpRequired: 0,
pkActivityRating: 9,
pkBaseDeathChance: 8,
itemCost: {
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [
{ itemCost: new Bank().add('Super restore (4)', 1), qtyPerMinute: 0.17 },
{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }
]
},
itemCost: [
{
itemCost: new Bank().add('Blighted super restore (4)', 1),
qtyPerMinute: 0.17,
alternativeConsumables: [
{ itemCost: new Bank().add('Super restore (4)', 1), qtyPerMinute: 0.17 },
{ itemCost: new Bank().add('Prayer potion (4)', 1), qtyPerMinute: 0.17 }
]
},
{
itemCost: new Bank().add('Revenant cave teleport'),
qtyPerKill: 0.05,
boostPercent: 5,
optional: true
}
],
canBePked: true
}
];
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ export function getItemCostFromConsumables({

const maxBasedOnTime = Math.floor(maxTripLength / timeToFinish);
const maxCanKillWithItemCost =
consumableCosts.length === 0 ? Number.POSITIVE_INFINITY : Math.floor(floatCostsPerKill.fits(gearBank.bank));
consumableCosts.length === 0
? Number.POSITIVE_INFINITY
: floatCostsPerKill.length() === 0
? Number.POSITIVE_INFINITY
: Math.floor(floatCostsPerKill.fits(gearBank.bank));
const maxAllowed = Math.min(maxBasedOnTime, maxCanKillWithItemCost);
let finalQuantity = Math.max(1, inputQuantity ? Math.min(inputQuantity, maxAllowed) : maxAllowed) ?? maxAllowed;
if (slayerKillsRemaining && finalQuantity > slayerKillsRemaining) {
Expand Down