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

feat: fishing skill #390

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

jameshallam93
Copy link
Contributor

Co-authored-by: James Monger [email protected]

Co-authored-by: James Monger <[email protected]>
@Jameskmonger
Copy link
Collaborator

still in progress, will work with @jameshallam93

return;
}
if(taskIteration === 0) {
this.actor.sendMessage('You swing your axe at the tree.');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops

Comment on lines +67 to +68
// TODO (jameskmonger) this doesn't currently account for a moving NPC target
targetActor.position,
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should change ActorWalkToTask to also accept Actor rather than passing the position in manually, that way we can easily defer the "tracking" of moving targets easily.

Copy link
Collaborator

Choose a reason for hiding this comment

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

then this would just be

Suggested change
// TODO (jameskmonger) this doesn't currently account for a moving NPC target
targetActor.position,
targetActor,

return;
}

// TODO: check npc still exists
Copy link
Collaborator

Choose a reason for hiding this comment

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

need to investigate what happens when NPCs die/are removed

I suspect we need to do something similar to the activeWorld.findObjectAtLocation in ActorLandscapeObjectInteractionTask

@@ -12,6 +12,10 @@ import { ActorWalkToTask } from './actor-walk-to-task';
* @author jameskmonger
*/
export abstract class ActorLandscapeObjectInteractionTask<TActor extends Actor = Actor> extends ActorWalkToTask<TActor, LandscapeObject> {
/*
* TODO (jameskmonger) consider exposing this, currently people must always access it through `otherActor`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* TODO (jameskmonger) consider exposing this, currently people must always access it through `otherActor`
* TODO (jameskmonger) consider exposing this, currently people must always access it through `landscapeObject`

my bad

import { canInitiateHarvest } from '@engine/world/skill-util/harvest-skill';
import { randomBetween } from '@engine/util';


Copy link
Collaborator

Choose a reason for hiding this comment

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

please add javadoc comment

Comment on lines +66 to +67
const roll = randomBetween(1, 256)
if(roll > 200){
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should move this into a separate file (see woodcutting, which has its own chance file) though also some research is needed on the OSRS wiki to see how fishing chances are handled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants