What's wrong with this picture?
Code:
/*******************************************************************************
* Always worn. A class of objects that the player cannot take off. *
*******************************************************************************/
class AlwaysWorn: Wearable
wornBy=me
dobjFor(Doff)
{
check()
{
cannotDoffMsg;
exit;
}
}
cannotDoffMsg = "You really should be wearing this and have no reason to get rid
of it."
/* Exclude these from Drop All and DOFF All. */
hideFromAll(action)
{
return action.ofKind(DropAction)
||action.ofKind(DoffAction)
||action.ofKind(PutInAction)
||inherited(action);
}
;
/*Next batch of code***************/
replace VerbRule(Doff)
('doff'|'drop')dobjList

offAction
verbPhrase='doff/doffing(what)'
;
Code:
I am using the above two batches of code. The first batch was posted to me by TOMASB. The second, small batch is by me.
I have two AlwaysWorn objects. If I use "Doff" to drop the objects, it works fine and the objects are not dropped. If I use "Drop" to drop the objects then I get a run-time error
Any Ideas
RonG