Skip to content

Commit

Permalink
quick ordering fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkWorldsArtist committed Oct 29, 2024
1 parent aceac81 commit 821bad7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/tasks/minions/PrayerActivity/offeringActivity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,15 @@ export const offeringTask: MinionTask = {
// Determine if the offered item is a bone or a prepared fish
const bone = Prayer.Bones.find(bone => bone.inputId === boneID);
const fish = Prayer.PreparedFish.find(fish => fish.inputId === boneID); // Assuming you can identify fish with boneID

const XPMod = 3.5;
let bonesLost = 0;
let newQuantity = quantity; // Initialize newQuantity

if (bone) {
// Logic for bones
// Prevent losing more bones than brought
const maxPK = quantity >= 27 ? 27 : quantity;
const trips = Math.ceil(quantity / 27);
let deathCounter = 0;
let bonesLost = 0;

// Roll a 10% chance to get pked per trip
for (let i = 0; i < trips; i++) {
Expand All @@ -64,7 +62,7 @@ export const offeringTask: MinionTask = {
}
}

newQuantity = quantity - bonesLost + bonesSaved + zealBonesSaved;
const newQuantity = quantity - bonesLost + bonesSaved + zealBonesSaved;

const xpReceived = newQuantity * bone.xp * XPMod;

Expand Down

0 comments on commit 821bad7

Please sign in to comment.