scrom / Experiments

a NodeJS text adventure - deliberately coded badly to re-experience the pain of legacy code
http://mvta.herokuapp.com/
2 stars 0 forks source link

Mission objects should support repeatability. #367

Open scrom opened 8 years ago

scrom commented 8 years ago

as a means of supporting some more exotic custom activity, a mission object could have a "repeat" attribute. This would indicate the number of times it could be repeated. 0 for a normal mission, -1 for infinite etc.

When completing a repeatable mission, the reward would be delivered but not removed. The mission timer would also be reset. It'd be important to set one of the conditions of a repeatable mission to clear so that it doesn't happen immediately. I'd consider always having a time limit for repetition and if not set, default to say 25 ticks.

scrom commented 8 years ago

this would also support the day/night transitions

scrom commented 8 years ago

Rather than repeatable missions, my thinking is to add greater custom action support (see also issue #415. For starters, the mission reward processor can be used to do all the same things a mission reward can do but can be associated to a new attribute on an artefact (and possibly on both a creature and location triggers). To support this, I'm factoring out the mission reward processor into a new object.

In order for other game objects to support this processor...

The nice thing is that in its simplest form, the customAction processor can return x.message which can in turn be a $action result - so we can replicate the current defaultResult stuff quite easily.

This also give more future scope for greater custom results for both player actions and missions - although the next priority is just getting more data sorted.