! Copyright (C) 2019, 2020 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/ Global guardscalled = 0; Constant DEATH_MENTION_UNDO; Constant MAX_SCORE = 7; Constant Story "Homeland"; Constant Headline "^A work of interactive fiction. ^If you get stuck try typing HELP. ^Ongoing development: https://jxself.org/git/?p=homeland.git ^Send bugs and feedback by email to j@@64jxself.org. ^IFID AC0898CB-0668-4853-9EB9-757958D4AF56 ^Copyright (C) 2019, 2020 Jason Self ^You can change and share this game under the terms of the GNU Affero General Public License as published by the Free Software Foundation (FSF), either version 3 of the License, or (at your option) any later version published by the FSF. See the GNU Affero General Public License for more details.^^You should have received a copy of this game's source code along with a copy of the GNU Affero General Public License so that you can know your rights. If not, contact the place you got it from.^^"; Include "parser"; Include "verblib"; Release 0; Serial "200524"; Include "src/objects/intro/kitchen.inf"; Include "src/objects/intro/livingroom.inf"; Include "src/objects/intro/bedroom.inf"; Include "src/objects/intro/grandlivingroom.inf"; Include "src/objects/intro/sidewalk.inf"; Include "src/objects/intro/frontporch.inf"; Include "src/objects/intro/neighborlivingroom.inf"; Include "src/objects/intro/backyard.inf"; Include "src/objects/intro/neighborkitchen.inf"; Include "src/objects/overworld/campsite.inf"; Include "src/objects/overworld/westofcampsite.inf"; [ DeathMessage; if (deadflag == 3) print "To Be Continued"; ]; [ PrintRank; print ", earning you the rank of "; if (score == 0) "Novice."; if (score == 1) "Trained."; if (score == 2) "Skilled."; if (score == 3) "Talented."; if (score == 4) "Capable."; if (score == 5) "Adept."; if (score == 6) "Proficient."; if (score >= 7) print "Versed."; ]; [ Initialise; Location = Kitchen; print "^It happened again.^^"; print "While reading the morning newspaper, there was another small explosion from your neighbor's home. This time you were able to see the series of three bright blue sparks that your friends were talking about from your kitchen window through the curtains covering their living room window.^^"; print "You crane your neck out the window to look, but all is quiet. ~What's going on over there?~ you wonder.^^"; StartDaemon(machine); ]; [ URL; print "^If you need help try some of the commands from: ^http://pr-if.org/doc/play-if-card/^"; ]; [ XyzzySub; print "Nothing obvious happens.^"; return true; ]; [ HelpSub; if (location == kitchen && window hasnt open) { print "It might be nice to open that window and get some fresh air.^"; } if (location == kitchen && window has open) { print "That window seems almost large enough to climb through.^"; } if (location == livingroom || location == bedroom || location == sidewalk || location == frontporch && window hasnt open) { print "Maybe you should go back to the kitchen and try the HELP command again.^"; } if (location == livingroom || location == bedroom || location == sidewalk || location == frontporch && window has open) { print "That window in your kitchen seems just large enough to climb through...^"; } if (television hasnt on && television.watch_count < 3) { print "I wonder what's on TV?^"; } if (television has on && television.watch_count < 3) { print "The TV show U.S. News And Grue Report is usually very informative.^"; } if (TestScope(poker)) { print "The poker looks like it could make an effective weapon.^"; } URL(); return true; ]; Include "grammar"; Verb 'About' * -> Version; Verb 'Info' * -> Version; Verb 'Help' * -> Help; Verb 'Clue' * -> Help; Verb 'xyzzy' * -> Xyzzy; Verb 'lick' = 'eat'; Verb 'snort' = 'smell'; Verb 'jam' = 'put'; Verb 'jab' = 'put'; Verb 'stick' = 'put'; Verb 'thrust' = 'put'; Verb 'crawl' * 'through' / 'out' / 'via' noun -> Go; Verb 'escape' * 'through' / 'out' / 'via' noun -> Go; Extend 'jump' * 'through' / 'out' / 'via' noun -> Go; Extend 'climb' * 'through' / 'out' / 'via' noun -> Go; Extend 'go' * 'through' / 'out' / 'via' noun -> Go; Extend 'attack' * noun 'with' noun -> Attack;