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

player.shove (push) and player.turn could both support "teleport" #366

Open scrom opened 8 years ago

scrom commented 8 years ago

the old "lift button" problem again. now that missions offer teleport, this is more feasible. the button object (artefact) could have a "teleport" attribute that names the new location (and possibly a string to explain what's going on).

the player verbs "shove" and "turn" should check teleport attributes and enact if data is found.

I think any other objects that caused player relocation would be more "special" (less repeatable) so could be handled by missions.

scrom commented 8 years ago

see also issue #335

scrom commented 8 years ago

custom actions now support mission reward type actions so his is 1 step closer to feasible

scrom commented 8 years ago

this works (briefly prototyped and tested) but needs supporting data changes in all 3 lifts - something like:

{ "object": "artefact", "name": "first floor button", "description": "1", "detailedDescription": "I'd hazard a guess this will take you to the first floor.", "attributes": { "defaultAction": "press", "type": "tool", "canOpen": true, "customAction": [ "press", "push" ], "defaultResult": { "message": "The lift doors close and after a few seconds the lift shudders into life.
After a few seconds of motion (you can't actually tell which direction you went), a muffled recorded voice says 'First floor, doors opening.'", "teleport": "lift-first-floor" } }, "synonyms": [ "one", "one button", "button" ] }