// replaceVerb.js
(function () {
/*global adventurejs A*/
"use strict";
var p = adventurejs.Dictionary.prototype;
/**
*
* @memberOf adventurejs.Dictionary
* @method adventurejs.Dictionary#replaceVerb
* @param {String} oldVerb
* @param {Object} newVerb
*/
p.replaceVerb = function (oldVerb, newVerb) {
oldVerb = this.disableVerbs(oldVerb);
newVerb = this.createVerb(newVerb);
if (false !== newVerb) {
this.game.log(
"log",
2,
"replaceVerb successfully replaced verb " + newVerb.name + ".",
"dictionary"
);
}
return newVerb;
};
})();