! Copyright (C) 2019 Jason Self ! ! This file is free software: you may copy, redistribute and/or ! modify it under the terms of the GNU Affero General Public License ! as published by the Free Software Foundation, either version 3 of ! the License, or (at your option) any later version. ! ! This file is distributed in the hope that it will be useful, but ! WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ! Affero General Public License for more details. ! ! You should have received a copy of the GNU Affero General Public ! License along with this file. If not, see https://gnu.org/licenses/ Object neighborlivingroom "Neighbor's Livingroom" with description "You are in your neighbor's livingroom. It seems that no one has lived here in a long time, even though you saw your neighbor here last week. All of the furniture has been removed and the air smells stale. A large bay window enclosed by sheer cobalt blue curtains allowing light to come through. There's another room to the north. A door is to the east.^^A machine as tall as you sits in the center of their livingroom. It consists of three transparent spheres joined together containing machinery. A barrel with a small aperture comes out of the farthest sphere, pointing down and to the wall. The entire thing rests on a shiny metal platform allowing it to rotate and tilt with ease.", w_to neighborkitchen, e_to neighbordoor, n_to grandlivingroom, before [; Go: if (bluebutton has on && poker notin machine) { machine.shoot(); rtrue; } ], has light; Object neighborwindow "window" neighborlivingroom with name 'large' 'bay' 'window' 'windows', description "A large bay window enclosed by sheer cobalt blue curtains allowing light to come through.", before [; Go: print_ret "The window is not something you can go through."; Open, Close: print_ret "This isn't the type of window that can be opened or closed."; ], has scenery; Object neighborcurtains "curtains" neighborlivingroom with name 'cobalt' 'blue' 'curtain' 'curtains', description "Cobalt blue in color, the curtains have been decorated with intricate embroidery.", before [; Take, Pull, Push, PushDir: print_ret "Don't you think they look nice where they are?"; ], has scenery openable pluralname; Object embroidery "embroidery" neighborlivingroom with name 'embroidery' 'pattern' 'patterns', has scenery; Object redbutton "red button" neighborlivingroom with name 'red' 'red button' 'button' 'buttons', before [; Push: if (bluebutton has on && poker notin machine) { print "You reach for the red button, but not in time...^ "; machine.shoot(); rtrue; } if (poker in machine) print_ret "You press the red button but it's futile because the machine's shorted out."; else { print "You push the red button. The machine makes clunky noises as machinery moves inside. A loud humming begins to emanate from it. It comes to life, spins around on its base, aims, and quickly fires a series of three bright blue sparks at you. You hear a small explosive sound as they impact your chest. You feel a little disoriented as it teleports you away.^"; PlayerTo(campsite); rtrue; } ], has scenery; Object bluebutton "blue button" neighborlivingroom with name 'blue' 'blue button' 'button' 'buttons', before [; Push: if (bluebutton has on) { if (poker notin machine) { print "You reach for the blue button, but not in time...^ "; machine.shoot(); rtrue; } else { give bluebutton ~on; print_ret "You push the blue button. The machine sounds like it powers down."; } } else { give bluebutton on; if (poker notin machine) { machine.shoot(); rtrue; } print_ret "You push the blue button."; } ], has scenery on; Object machine "machine" neighborlivingroom with name 'machine' 'machinery' 'sphere' 'spheres' 'platform' 'barrel' 'aperture' 'metal platform' 'shiny metal platform' 'shiny platform' 'shiny' 'metal', description "It consists of three transparent spheres joined together containing machinery. A barrel with a small aperture comes out of the farthest sphere, pointing down and to the wall. The entire thing rests on a shiny metal platform allowing it to rotate and tilt with ease. There is a blue button and a red button.", time_left, before [ weapon; Attack: if (noun == self) weapon = second; else weapon = noun; if (weapon ~= poker) { print "That wasn't helpful.^"; if (bluebutton has on) self.shoot(); rtrue; } self.shortout(); return true; Receive: if (noun == poker) { self.shortout(); return true; } if (bluebutton has on) self.shoot(); rtrue; ], time_out [; if (poker in self) StopTimer(machine); else if (bluebutton has on) self.shoot(); ], daemon [; if (poker in player) rfalse; if (player in parent(self) && poker notin machine) self.shoot(); ], shoot [ destination; destination = random(3); print "^A loud humming begins to emanate from the machine. It comes to life, spins around on its base, aims, and quickly fires a series of three bright blue sparks at you. You hear a small explosive sound as they impact your chest. You feel a little disoriented as it teleports you away.^"; if (destination == 1) PlayerTo(kitchen); if (destination == 2) PlayerTo(livingroom); if (destination == 3) PlayerTo(bedroom); ], shortout [; if (machine hasnt visited) { score = score + 1; give machine visited; } move poker to self; print "You put the poker into ", (the) self, ". Sparks fly wildly in every direction as it shorts out.^"; ], has scenery container open;