nskins / goby

Command-line role-playing game framework
MIT License
122 stars 56 forks source link

Auto events #61

Open nskins opened 7 years ago

nskins commented 7 years ago

Some Events may need to be triggered automatically. For instance, an NPC may require a fee to cross a particular Tile. Upon moving to that Tile, the Event must start running.

One idea for the implementation would be to add an auto_event member variable (of type Event) to Tile. Upon moving to the Tile and seeing that auto_event is not nil and also visible, run auto_event.

Send pull requests to the auto-events branch.

nskins commented 7 years ago

@gintavang, would you care to work on this?

gintavang commented 7 years ago

Got dis

nskins commented 7 years ago

Hey @gintavang, I hope to have this written soon, could you let me know if you would still like to implement this? No worries if you want to hand it over to me.

gintavang commented 7 years ago

My bad man, totally forgot. If you wouldn't mind taking it, would be much appreciated

shubham7saxena commented 7 years ago

@nskins I would like to get into this. Do you mind helping me dive in the goby project through the help of this feature enhancement?

nskins commented 7 years ago

Hi @shubham7saxena. Yes, I can help you work on this feature.

Quick overview: two tests must be written. One will be for an visible auto Event and the other will be for a non-visible auto Event. You can use the Chest event with an argument to its gold member variable to ensure that the Player does (or does not) automatically receive the gold upon moving to the Tile.

Please see my first post on this issue for some basics. Most of the implementation will be in the Player's #move_to function. Ensure that auto-events run after fighting a Monster, if any exist on the Tile.

Let me know if I can clear anything up or if you have some questions.

nskins commented 7 years ago

Hey @shubham7saxena, any luck on this feature? Let me know if I could be of assistance.

EDIT: I hadn't thought of this before, but if the Player dies while fighting a Monster, the auto Event should not run.

CPerry26 commented 6 years ago

Hey @nskins, is this issue still available?

I've never contributed to open source before, but I'm somewhat familiar with the Git workflow and I have around 2 years of experience in Ruby so I'd love to help out! If it's already been taken care of, I'll keep my eyes open for some smaller issues to get started with. Thanks!

nskins commented 6 years ago

Hi @CPerry26 - yes, it is available! Please reference my previous comments on the implementation details. You will make the pull request to the 0.2.1 branch. There will be quite a few more tests to write than I originally thought (death to monster, after defeating monster, etc.?). Not 100% sure how it will work yet. Please let me know if you have questions about anything.

CPerry26 commented 6 years ago

@nskins Not a problem! I'll start by writing all the tests I think should be there for proper coverage and then I can get in touch with you and see if there's anything I missed. Sound good?

nskins commented 6 years ago

@CPerry26 Yep. Sounds good!

CPerry26 commented 6 years ago

@nskins Alright, I'll get started today/tomorrow!

CPerry26 commented 6 years ago

@nskins Hey, I've been super busy (finishing my last semester of college) so I haven't finished this yet. I added some of the basic tests so far. I finish in a couple of weeks and then I'll have plenty of free time to work on this. If someone else wants to take this before that feel free! Sorry for taking so long to update.

CPerry26 commented 6 years ago

If someone else wants to take this, feel free. It seems my hard drive has corrupted and I've lost my work which I haven't been able to recover :(

Tauntalus commented 5 years ago

Hey, anybody mind if I pick this issue up?

nskins commented 5 years ago

Hi @Tauntalus - apologies on the late reply. Feel free to work on this issue if you'd like.