Pre-release
AdventureJS Docs Downloads
Score: 0 Moves: 0
Tutorial explaining replace Verbs in AdventureJS. tutorial, verbs

Advanced Verb Use:Replace Verbs

replaceVerb() lets an author completely replace any of the predefined Verbs.

MyGame.replaceVerb( "xyzzy", {
  name: "xyzzy",
  prettyname: "xyzzy",
  synonyms: [],
  verb_prep_noun: [],
  verb_noun_prep_noun: [],
  verb_noun_prep_noun_prep_noun: [],
  do: function( params ) 
  {
    console.log( "verbs.do" );
    var msg = "Clever xyzzy response!";
    if(msg) this.game.print( msg, MyGame.input.output_class );
    return params
  },
});