Constant Story "Room Testing"; Constant Headline "^Rooms with dark/light properties^"; Constant DEATH_MENTION_UNDO; REPLACE ScoreSub; Include "Parser"; Include "Verblib"; Include "Dirs"; Include "Grammar"; Class Room has light ; [Initialise; Banner(); location = LitRm; lookmode = 2; print "^You are in a plain room with only a single exit to the North.^"; return 2;]; Room DarkRm "Dark Room" with description "The beam of your flashlight shows nothing but bare walls^ However turning your light off would be an extremely UNWISE move.", s_to [; if (Flash in player) {PlayerTo (LitRm,1); "You return to the Lit Room with the flashlight in hand.^^ A Lit Room^ A plain ordinary room with a single exit north.^^";}; if (Flash in location) {PlayerTo (LitRm,1); "You return to the Lit room without the flashlight.^^ A Lit Room^ A plain ordinary room with a single exit north.^^";};], cant_go "Only exit outta here is south.", has ~light ; Room LitRm "A Lit Room" with description "A plain ordinary room with a single exit north.", cant_go "You can only go north from the Lit Room.", n_to [; if (Flash notin player or DarkRm) "You need a light source before proceeding."; if (flash in player && flash hasnt light) "You need to turn the flashlight on before proceeding."; if (flash in player && flash has light) {PlayerTo (DarkRm,1); "Dark Room^The beam of your flashlight shows nothing but bare walls^ However turning your light off would be an extremely UNWISE move.";}; if (Flash in DarkRm) {PlayerTo(DarkRm,1); "You re-enter the Dark Room and notice your flashlight on the floor.^";};], has light ; Object -> Flash "Flashlight" with name 'flash' 'light' 'torch' 'flashlight', description "A standard flashlight which can be either:^ 1. turned on (or lit)^ or^ 2. turned off (or extinguished)^", before [; burn: if (self has light) "",(The)self," is already lit."; <>; SwitchOn: if (self has light) "",(The)self," is already on!"; give self light; "You switch the flashlight on."; SwitchOff: if (self has light && player in DarkRm) {deadflag=1; "You turn off the flashlight. A starving grue suddenly appears and thanks you for making such a tasty meal!";}; if (self hasnt light) "",(The)self," is already off."; give self ~light; "You switch the flashlight off.";], ; [DamageSub; "Not a wise idea!";]; [ScoreSub; "Ain't no score in this here game Booby!";]; verb 'extinguish' * noun -> SwitchOff; verb 'break' 'damage' 'destroy' 'trash' 'wreck' 'vandalize' 'ruin' 'smash' * noun -> Damage;