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

Forestry update #6314

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 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
8 changes: 8 additions & 0 deletions src/lib/data/buyables/forestryBuyables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,13 @@ export const forestryBuyables: Buyable[] = [
.add('Yew logs', 60)
.add('Redwood logs', 60)
.add('Magic logs', 60)
},
{
name: 'Golden Pheasant Egg',
itemCost: new Bank().add('Anima-infused bark', 75000)
},
{
name: 'Fox Whistle',
itemCost: new Bank().add('Anima-infused bark', 75000)
}
];
11 changes: 4 additions & 7 deletions src/tasks/minions/woodcuttingActivity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,8 @@ async function handleForestry({ user, duration, loot }: { user: MUser; duration:

let strForestry = '';
const userWcLevel = user.skillLevel(SkillsEnum.Woodcutting);
const chanceWcLevel = Math.min(userWcLevel, 99);
const eggChance = Math.ceil(2700 - ((chanceWcLevel - 1) * (2700 - 1350)) / 98);
const whistleChance = Math.ceil(90 - ((chanceWcLevel - 1) * (90 - 45)) / 98);

perTimeUnitChance(duration, 10, Time.Minute, async () => {
perTimeUnitChance(duration, 8, Time.Minute, async () => {
const eventIndex = randInt(0, ForestryEvents.length - 1);
const event = ForestryEvents[eventIndex];
let eventRounds = 0;
Expand Down Expand Up @@ -90,7 +87,7 @@ async function handleForestry({ user, duration, loot }: { user: MUser; duration:
break;
case 7: // Poachers
eventInteraction = randInt(12, 15); // traps disarmed
if (roll(whistleChance)) {
if (roll(30)) {
loot.add('Fox whistle');
}
eventCounts[event.id]++;
Expand All @@ -99,7 +96,7 @@ async function handleForestry({ user, duration, loot }: { user: MUser; duration:
break;
case 8: // Enchantment Ritual
eventInteraction = randInt(6, 8); // ritual circles
if (roll(50)) {
if (roll(30)) {
loot.add('Petal garland');
}
eventCounts[event.id]++;
Expand All @@ -111,7 +108,7 @@ async function handleForestry({ user, duration, loot }: { user: MUser; duration:
if (percentChance(50)) {
loot.add('Pheasant tail feathers');
}
if (roll(eggChance)) {
if (roll(900)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changes look good, but i think this should be 1/30 aswell and taken out of the eventInteraction loop. I believe its 1/30 per event not per egg anymore. Thats how its worded on the blog/wiki atleast would need to test ingame to confirm.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is per egg, I got it yesterday in osrs on my 2nd egg before the event ended.

loot.add('Golden pheasant egg');
}
}
Expand Down
14 changes: 14 additions & 0 deletions tests/unit/snapshots/banksnapshots.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4166,6 +4166,20 @@ exports[`OSB Buyables 1`] = `
"name": "Forestry top",
"outputItems": undefined,
},
{
"itemCost": {
"28134": 75000,
},
"name": "Golden Pheasant Egg",
"outputItems": undefined,
},
{
"itemCost": {
"28134": 75000,
},
"name": "Fox Whistle",
"outputItems": undefined,
},
{
"itemCost": {
"30038": 100,
Expand Down
Loading