! >CO A traditional Inform example object: ! ---------------------------------------------------------------------------- Object -> cone "green cone" with name "green" "cone" "emerald" "marzipan", describe [; if (cone has moved) "^A misshapen cone of green marzipan sits here."; "^Nearby is an emerald green cone, one foot high."; ], description "The cone seems to be made of emerald-coloured marzipan.", before [; Eat: if (random(100) <= 30) { deadflag = 1; "Unfortunately, you seem to be allergic to almonds."; } "You nibble at a corner of the cone."; ], after [; Take: "Taken. (Your hands are smeared with marzipan.)"; Drop: cone.description = "The cone is a vague green mess."; "The cone drops to the floor and sags a little."; ], has edible; ! ----------------------------------------------------------------------------