Constant Story "Peanuts"; Constant Headline "^A small exercise to see how attributes^ and properties can be implemented.^^"; Release 1; Serial "000001"; CONSTANT DEBUG; CONSTANT MANUAL_PRONOUNS; Include "Parser"; Include "VerbLib"; Include "replay"; [Initialise; location = PlainRoom; "You are in a plain non-descript room wth a table, a jar of unsalted^ peanuts, a pitcher of water, and a salt shaker with an infinite supply of salt.^";]; Object PlainRoom "Plain Room" with description "You are in a plain non descript room.", cant_go "You are stuck here till you quit the game.", has light ; Object -> DiningTable "DiningTable" with name 'dining' 'table' 'diningtable', describe [; "There is a table here.";], has static supporter enterable ; Object -> PeaJar "Peanut Jar" with name 'jar', describe [; "There is a jar of peanuts here.";], has container openable ; Object -> Shaker "Salt Shaker" with name 'shaker', describe [; "There is a salt shaker here.";], has container open ; Object TableSalt "Table Salt" Shaker with name 'salt' 'seasoning' 'condiment', description "a bunch of table salt.", before [; pour: if (second ~=PlainPea) "You can't salt that!"; if (saltpea in location) "You've already over-salted the damn things as it is!"; else if (PlainPea in location) {remove plainpea; move saltpea to location; "You pour salt over the peanuts they have now become salted.";};], has pluralname concealed ; Object -> WaterPitch "Pitcher" with name 'pitcher', describe [; "This is a pitcher of water here.";], before [; receive: "Nothing goes in the pitcher except water.";] has container open ; Object Water "Water" WaterPitch with name 'water', describe [; "Water for washing the peanuts";], before [; drink: "That water is for washing the peanuts only!"; pour: if (second ~=SaltPea) "What? and waste some good washing water on that?"; if (second ==PlainPea) "The peanuts are already washed!"; remove saltpea; move plainpea to location; "You pour water over the salted peanuts they have now become plain again.";], has pluralname ; Object PlainPea "Plain Peanuts" PeaJar with name 'unsalted' 'peanuts' 'plain' 'nuts', description " There are a bunch of plain unsalted peanuts here.", with unsalted, before [; eat: if (self in location) move self to PeaJar; "You pop a few of the peanuts into your mouth. UGH!!^ You spit them out. Way way too plain for your delicate palate."; salt: remove self; move saltpea to location; "You pour salt over the plain peanuts they have now become salted."; pour: if (second == DiningTable && PeaJar has open) "You pour the plain nuts on the table."; if (second == DiningTable && PeaJar hasnt open) "The jar ain't open!"; if (second == PeaJar && second has open) {move PlainPea to peajar; "Your re-pour the plain peanuts back into the jar.";}; if (noun ==TableSalt && second ==self) "You salt the peanuts."; if (self in PeaJar && PeaJar has open) {move PlainPea to DiningTable; "You pour the plain peanuts on the table.";}; wash: if (self in location) "They've already been washed!";], has edible pluralname ; Object SaltPea "Salted Peanuts" with name 'salted' 'peanuts' 'nuts', description "there are a buch of salted peanuts here.", with salted, before [; eat: move self to Peajar; "You pop a few of the peanuts into your mouth.^ MMM velly velly tasteee."; salt: "You've already over-salted the damn things as it is!"; pour: if (self in DiningTable && PeaJar hasnt open) "The jar ain't open!"; if (self in DiningTable && PeaJar has open) {move self to peajar; "Your re-pour the salted peanuts back into the jar;";} if (self in PeaJar) {move self to DiningTable; "You pour the salted peanuts on the table.";} wash: if (second == self) {remove self; move PlainPea to location; "You wash the salt off the peanuts they become plain once again.";};], has edible pluralname ; Include "Grammar"; [WashSub; "You can't wash that!";]; [PourSub; "You can't pour that.";]; [SaltSub; "You can't salt that.";]; verb "salt" * noun -> Salt; verb "pour" * noun -> Pour * noun 'on' noun -> Pour * noun 'in' noun -> Pour; verb "wash" * noun -> Wash * noun 'with' noun -> Wash;