TADS problem


22 Jun 95 13:08:38 MDT

Just Wondering, How come I can't create a class of objects that can be shot, like
a laser gun and a class of objects that can be destroyed by a shootable?
Here is an example...

class destroyable: item
verDoShootAt(actor) = {}
DoShootAt(actor) =
{
if (self.isdestroyed)
"You already blew it up, remember?";
else
{
"You just blew up a <<self.sdesc>>!";
self.isdestroyed := true;
}
}
;
cabin4bed: beditem, destroyable
sdesc = "Bed"
ldesc = " A large bed that looks as if it has been recently slept in."
noun = 'bed'
adjective = 'large'
location = cabin4
;
cabin4dresser: fixeditem
sdesc = "dresser"
ldesc = "A ornate dresser stands against the wall. The dresser drawer looks
unused."
noun = 'dresser'
adjective = 'ornate'
location = cabin4
;
dresserdrawer: openable, fixeditem
isopen = nil
sdesc = "drawer"
noun = 'drawer'
location = cabin4
;
shootVerb: deepverb
sdesc = "shoot"
noun = 'shoot'
ioAction(withPrep) = 'shootat'
prepDefault = withPrep
ioDefault = lasergun
validIoList = (lasergun)
;
lasergun: item
sdesc = "laser gun"
noun = 'lasergun' 'laser' 'gun'
adjective = 'laser'
location = dresserdrawer
;