!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~! !~~ The Last Ninja ~~! !~~ ~~! !~~ Written by: Eric Nelson ~~! !~~ ~~! !~~ For: DR. Maxim's CIS 487 Class, ~~! !~~ ~~! !~~ Released on: Oct. 17, 2005 ~~! !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~! !======================================! !=== Game Title and Author display ====! !======================================! Constant Story "The Last NiNja"; Constant Headline "^Created in 2005 by Eric Nelson^^"; Constant DEBUG; Include "parser"; Include "verblib"; Include "grammar"; !======================================! !=== Initial Story ====================! !======================================! [ Initialise; location = meeting_room; print "^^^You are the last ninja of the Shinjiku Clan. All others have been maimed or slain in the recent conflict brewing with the Owari Clan. All out war with the Owari is certain, and your clan is not strong enough to survive their might for long. ^^The Tanhoko Clan has been your ally for generations, but mysterious happenings and stories from an unknown source have all but turned them against you. It is vital that these rumors be put to rest immediately. You were summoned by the clan's lord and given this very mission. ^^You lied in wait at a suspected meeting place used by the unknown source. After days of waiting you witness a suspicious diplomat meeting with the Tanhoko. You followed the diplomat from this meeting back to a village within Owari's borders. He stopped at a house on the outskirts of this village briefly before leaving again. You decided to stay and search the house. ^^Night falls, and you sneak past the guards into the house through a window. You are determined to find some clue, some evidence, of the recent treachery...^^"; ]; !======================================! !=== Meeting (Player Entrance) Room ===! % Silver Key to Strongbox here % !======================================! Object meeting_room "Meeting Room" with name "meeting" "meetingroom" "council" "councilroom", description "This room is floored with fine thick mats. Six low tables each with a rich cushion form a circle in the center of the room. On the walls several paintings are hung. To the north you see the window you broke in from, and to the south is a paper door.", s_to office, n_to outside, has light; Object paintings1 "Paintings" meeting_room has scenery static with name "painting" "paintings" "art", description "You see paintings of bonsai trees on the walls. You check the frames, but find no secret compartments.", before [; Take: "Even one of these paintings is much too big to go sneaking around with."; ]; Object tables1 "Tables" meeting_room has scenery static supporter with name "table" "low" "tables", description "These are low tables, arranged in a circle. One of these tables has a secret drawer.", before [; if (self hasnt general) { give self general; move silver_key to player; "You find a silver key setting in the drawer."; } ]; Object cushions1 "Cushions" meeting_room has scenery supporter with name "cushion" "cushions" "pillow" "pillows", description "These are some nice cushions, with finely threaded tassels.", before [; Take: "You need to keep your hands free for more important things."; ]; Object window1 "Window" meeting_room has scenery static with name "window", description "This window has its shutters closed. You could climb out and leave if you wanted to."; Object silver_key "Silver Key" with name "silver" "silver-key", description "This key looks valuable by itself. Who knows what it will unlock."; !======================================! !& Bonsai Seal Here &! !=== Secret (Strongbox) Room ==========! !======================================! !$ Assassination Orders Here $! Object secret_room "Secret Room" with name "secret" "secretroom" "hidden" "hiddenroom", description "A fine table is set in the middle of this small room. Towards the back of the room you spot a large strongbox, with a lock to match. There is a window to the east, and to the south is a sliding wooden door, designed to match the walls.", s_to pedestal_room, e_to outside, has light; Object strongbox "Strongbox" secret_room has scenery static with name "chest" "box" "strong-box" "strong" "strongbox" "treasure" "safe", description [; if (player == parent(silver_key) ) { if (self hasnt general) { give self general; move orders2 to player; "You insert the Silver Key into the lock, and it turns. Inside the strongbox you find a scroll bearing the Owari seal."; } "There is nothing more of use to be found."; } "You see a wooden box, bound with steel. A lock is set in the center of the front. The box doesn't open, and you don't find a secret latch to do the trick either."; ], before [; Attack: "Your sword barely scratches the strongbox."; ]; Object table2 "Table" secret_room has scenery static supporter with name "table" "expensive" "carved" "fine", description [; if (self hasnt general) { give self general; move seal to player; "You see a richly carved cherrywood table with papers and scrolls on top. Mixed in with the paperwork is an official-looking seal, you take it."; } "You see a richly carved cherrywood table with papers and scrolls on top."; ]; Object window2 "Window" secret_room has scenery static with name "window", description "This window has its shutters closed. You could climb out and leave if you wanted to."; Object seal "Bonsai Seal" with name "seal" "bonsai-seal" "bonsaiseal" "official-seal", description "This is a seal, used to sign letters with ink or seal scrolls with wax. This one has a bonsai tree design."; Object orders2 "Assassination Orders" with name "assassination" "assassin" "orders" "scroll", description "The scroll reads: 'Dispatch a messenger to Tanhoko warning of an imminent assassination. Then, take the sword stolen from the Shinjiku, and slay the nephew of the Lord of Tanhoko. Leave the sword in his body, so the blame is placed on the Shinjiku Clan.' It bears the Owari seal, this is prime evidence!"; !======================================! !=== Library ==========================! !======================================! !$ Military Map Here $! Object library "Library" with name "library" "libraryroom", description "This room must be the library. A system of shelves run along each wall, stacked high with scrolls. A large window is set in the shelves on the west wall. A small table sets in the middle of the room. Behind the door to the north you can barely make out what sounds like snoring. There is also a paper door to the east.", n_to barracks, e_to office, w_to outside, has light; Object table3 "Table" Library has scenery static supporter with name "table", description "You see a table with scrolls in three neat piles."; Object shelves1 "Shelves" Library has scenery static supporter with name "shelves" "shelf" "shelving" "shelfing", description [; if (self hasnt general) { give self general; move map to player; "These wooden shelves are made up of bins about one cubic foot in size, each fairly full of scrolls. You look for a while, and come across a map of the Shinjiku Lands, your home."; } "These wooden shelves are made up of bins about one cubic foot in size, each fairly full of scrolls. You look for a while, but don't find anything interesting."; ]; Object window3 "Window" Library has scenery static with name "window", description "This window has its shutters closed. You could climb out and leave if you wanted to."; Object map "Military Map" with name "military" "map" "shinjiku", description "This is a map of your Clan's territory. Your people's strongholds are all clearly marked and labeled, with several lines running to each from Owari lands. Even your clan's hidden fortress refuge is marked!"; !======================================! !=== Barracks =========================! !======================================! Object barracks "Barracks" with name "barracks" "bedroom", initial "You enter the room, and see three men sleeping on bedrolls.", description "This room is the sleeping chamber for the inhabitants of the house. Fresh blood pools around the three bodies laying on woven straw mats.", s_to library, has light; Object body "Body" barracks has scenery static with name "body" "bodies" "corpse" "corpses", initial "You move from one man to the next, slaying each in turn with a quick stroke from your sword. In seconds it is over, and the snoring stops.", description "This man is dead, a deep cut runs into his neck."; Object mat "Mat" barracks has scenery static supporter with name "mat" "bedroll" "woven" "bed" "sleepingbag", description "This bedding is sopping with fresh blood."; !======================================! !=== Office ===========================! % Iron Key to Storeroom here % !======================================! $ Mission Report Here $ Object office "Office" with name "office" "officeroom", description "This large office area has lots of papers and scrolls here and there. On the east side of the room is a table and some shelves. The west side has a desk stacked with papers. There is a paper door on each wall.", w_to library, n_to meeting_room, s_to main_entry, e_to pedestal_room, has light; Object table4 "Table" office has scenery static supporter with name "table", description [; if (self hasnt general) { give self general; move iron_key to player; "A lamp sits on this table. You find a key under the tabletop when taking a closer look."; } if (lamp notin table4) "You see a bare wooden table."; "You see a bare wooden table, with a lamp sitting on it."; ]; Object desk "Desk" office has scenery static supporter with name "desk" "officedesk" "desks", description [; if (self hasnt general) { give self general; move report to player; "This desk is mostly covered with useless paperwork, but you do find an interesting looking report and take it."; } "This desk is covered with useless paperwork."; ]; Object shelves2 "Shelves" office has scenery static supporter with name "shelf" "shelves" "shelving" "shelfing", description [; if (self hasnt general) { give self general; move flint to player; "You come across flint and steel on one of the shelves."; } "You don't find anything worth taking on these shelves."; ]; Object lamp "Oil Lamp" table4 has supporter with name "lamp" "oillamp" "oil-lamp", description [; if (self has general) "This lamp will provide light when lit."; "This lamp is out of oil, try Inserting some if you find any."; ]; Object iron_key "Iron Key" with name "iron" "iron-key", description "This is a fairly hefty key, forged from iron."; Object flint "Flint and Steel" with name "flint" "steel" "lighter", description "Flint and steel is used to make sparks to create fire."; Object report "Mission Report" with name "mission" "report" "mission-report", description "The paper reads: 'We have the Shinjiku sword, and have sent the messenger to Tanhoko. All will be completed soon.' It bears a bonsai seal."; !======================================! !=== Secret Door From Pedistal Room ===! !======================================! Object nowhere; Object hidden_door "hidden door" has door openable static with name "hidden" "door", when_open [; if (location == pedestal_room) "The wall to the north opens, revealing a room."; "This door leads back to the pedestal room."; ], when_closed "What hidden door?", door_dir [; if (location == pedestal_room) return n_to; return s_to; ], door_to [; if (location == pedestal_room) return secret_room; return pedestal_room; ], before [; Close: if (location == secret_room) "You don't see any mechanism to close the door in here."; "You can't just pull this door closed."; ], found_in nowhere secret_room; Object stone "Bonsai Stone" with name "stone" "rock" "bonsai-stone" "bansai-stone" "statue" "white", description "This white stone oddly resembles a bonsai tree, and has a circular base.", before[; PutOn,Transfer,Insert: if (second == pedestal) { (hidden_door.&found_in)-->0 = pedestal_room; give hidden_door open; MoveFloatingObjects(); "You place the bonsai stone into the recess..."; } Take: (hidden_door.&found_in)-->0 = nowhere; give hidden_door ~open; MoveFloatingObjects(); "You take the bonsai stone, and the door to the north slides closed."; ]; !======================================! !=== Pedistal (Secret Door) Room ======! % Gold Key to Trapdoor here % !======================================! Object pedestal_room "Pedistal Room" with name "pedestalroom" "columnroom", description "This room has an expensive stone pedestal in the northwest corner. In the northeast corner sits a well used stool. A dresser sits against the south wall. There is a paper door to the west.", w_to office, n_to [; if(hidden_door has open) { PlayerTo(secret_room); return true; } else { print_ret "You can't go that way."; } ], has light; Object pedestal "Pedistal" pedestal_room has scenery static supporter with name "pedistal" "stone" "column" "pedestal" "pedistel", description "You see a stone pedestal. There is a circular indentation in the center of the surface."; Object stool "Stool" pedestal_room has scenery static supporter with name "wooden" "stool" "three" "legged", description "This is a plain wooden three-legged stool."; Object dresser "Dresser" pedestal_room has scenery static supporter with name "dressor" "dresser" "ornate" "painted", description [; if (self hasnt general) { give self general; move gold_key to player; "You see an ornate dresser, with nicely painted drawer facings. You find a gold key in one of the drawers, and take it."; } ]; Object gold_key "Gold Key" with name "gold" "golden" "gold-key" "golden-key", description "This is one nice key, the craftsmanship is amazing."; !======================================! !=== Sake (Trapdoor) Room =============! !======================================! Object sake_room "Sake Room" with name "drinkroom" "sakeroom" "boozeroom" "drinksroom", description "There doesn't seem to be much to this room. A fine carpet lays in the center,and several thick cushions run along the walls. Also to be seen is a low round table in one corner. A sliding paper door is to the east.", e_to main_entry, d_to [; if (player == parent (gold_key) ) PlayerTo(stair_room); ], has light; Object cushion2 "Cushion" sake_room has scenery static supporter with name "cushion" "cushions" "thick" "pillow" "pillows", description "You look at a cushion, it's long and round, and would make for a good seat or backrest."; Object sake_table "Table" sake_room has scenery static supporter with name "table" "lowtable" "low-table" "sake-table", description [; if (self hasnt general) { give self general; move sake to sake_table; "You see a corner table, with a single drawer. Inside you find a nice sake set."; } "You see a corner table, with a single drawer."; ]; Object rug "Rug" sake_room has scenery static supporter with name "rug" "carpet" "mat" "carpeting" "rugs", description "You see a very nice rug in the center of the room.", before [; Push,Pull: "You put the rug up against the wall, and discover a trap door."; ]; Object trap_door "Trap Door" sake_room has scenery static with name "trap" "trapdoor" "trap-door", description "You see a solid wooden door set in the floor. There is a lock next to the handle ring.", before [; if (self hasnt general) { if (player == parent (gold_key) ) { give self general; "You use the gold key, and swing the door open. It's dark down there."; } "You really need the key to open this door."; } ]; Object sake "Sake Set" with name "sake" "set" "saki" "sake-set", description "It's a nice sake set, but looks like someone already drank all the sake from the bottle."; !======================================! !=== Main Entrance ====================! !======================================! Object main_entry "Main Entrance" with name "main" "entry" "entrance" "mainentry" "mainentrance", description "This room has several beautiful paintings of bonsai trees on the walls. There are a few short benches along the walls beneath the paintings. In one corner is a bonsai tree in a pot, sitting on a table. It is illuminated by small circular windows set in the ceiling along the south wall. Paper doors are to the north and west. A solid looking door is to the east, with a lock on it. There is a heavy door to the south.", s_to outside, w_to sake_room, n_to office, e_to [; if (player == parent (iron_key) ) PlayerTo(storeroom); "The storeroom door is locked tight."; ], has light; Object table5 "Table" main_entry has scenery static supporter with name "table" "tall" "thin", description "It is a tall, thin wooden table with a potted bonsai on it."; Object bonsai_tree "Potted Bonsai Tree" table5 has scenery static with name "pot" "potted" "bonsai" "tree" "bansai" "banzai" "bonsai-tree" "potted-tree" "potted-bonsai-tree", description [; if (self hasnt general) { give self general; move stone to player; "You see a carefully trimmed bonsai tree, in a pot of moist dirt. In the pot you see an interesting stone, and take it."; } "You see a carefully trimmed bonsai tree, growing away in a pot of moist dirt."; ]; Object benches "Benches" main_entry has scenery static supporter with name "bench" "benches" "seats", description "You see a couple plain old benches in this room, nothing special.", before [; Attack: "You chop one of the benches, soon it's just a pile of wood."; ]; Object painting2 "Painting" main_entry has scenery static with name "painting" "paintings" "art", description "You see paintings of bonsai trees on the walls.", before [; Take: "Even one of these paintings is much too big to go sneaking around with."; ]; !@@@@ Object stone "Bonsai Stone" is defined above in the Secret Door section !======================================! !=== Store Room =======================! !======================================! Object storeroom "Storeroom" with name "storeroom" "stockroom" "storageroom", description "This appears to be a storeroom. Three shelves are mounted on one wall, the others have desks and tables pushed up against them. The door out is to the west.", w_to main_entry, has light; Object shelves3 "Shelves" storeroom has scenery static supporter with name "shelf" "shelves" "bookshelf", description "These are some pretty plain shelves."; Object lantern "Lantern" shelves3 with name "lantern" "metal", description "This lantern is made of iron. The candle set in the chamber looks fresh, it should burn quite a while once lit.", before [; if (self hasnt general) if (player == parent(flint) ) { give self general; give lantern light; "You light the lantern on a whim."; } ]; Object oil "Lamp Oil" shelves3 with description "This is a special type of oil that can act as fuel for oil lamps.", before [; PutOn,Transfer,Insert: if (self hasnt general) { if (second == lamp) { if (player == parent(flint) ) { give lamp light; give self general; "You pour some oil into the lamp, and light it."; } } } "The lamp is already quite full of oil."; ]; !======================================! !=== Stair Room =======================! !======================================! Object stair_room "Stair Room" with name "stairroom" "stairsroom" "ladderroom" "steproom" "stepsroom", description "This room is dimly lit by your lantern, with little help from the moonlight drifting through the trapdoor. As you gaze around all you see is the steep stairway you came down. Peering into the darkness you can make out paper paneling on the walls, and the outline of a door to the north.", u_to sake_room, n_to trophy_room; Object stairs "Stairs" stair_room has scenery static with name "stair" "stairs" "staircase" "ladder" "stairway" "steep", description "In the flickering light you see the stairway you came down. It's quite steep, but still manageable."; !======================================! & Sword Here & !=== Trophy (Sword) Room ==============! !======================================! Object trophy_room "Trophy Room" with name "swordroom" "trophyroom" "prizeroom" "sword-room", description "In the flickering light you see a sword rack.", s_to stair_room; Object swordrack "Swordrack" trophy_room has scenery static supporter with name "rack" "swordrack" "swordstand" "stand" "holder" "swordholder", description [; if (self hasnt general) { give self general; move sword to player; "This wooden rack is built to hold swords, and one happens to be sitting in the rack. Its a nice sword, you take it."; } "This wooden rack is built to hold swords, but has none."; ]; Object sword "Sword" with name "sword" "blade" "knife" "rapier" "katana", description "This sword is a work of craftsmanship. No doubt it is very valuable."; !======================================! !=== Outside ==========================! !======================================! Object outside "outside" with name "outside" "outdoors", description [; if (player ~= parent (orders2) || player ~= parent (report) ) "You jump from the window, and escape into the night. ^^You travel as fast as you can, just trying to stay alive. After running all day, you stumble into a main road just as an enemy patrol is approaching. Before you can catch your breath and flee, you die a thousand dishonorable deaths. ^^-Poor Ending-"; if ( ((((player == parent(orders2)) == parent(sword)) == parent(seal)) == parent(report)) == parent(map) ) "You jump from the window, and escape into the night. ^^You bring the evidence back to your lord in just a few day's time. Your clan manages to smooth things over with the Tanhoko, and they march with you to meet the approaching Owari forces. The battle rages back and forth all day. That night, you lead a small group of men into the enemy camp. After setting fire to their supplies, you seak out the enemy lord in the confusion. He is spotted near the main tent, and you chase him down like the dog he is. As he turns around, a slice with your sword removes his head. You grab it by the hair and withdraw from the camp with your remaining men. Your small force marches victoriously into camp, and you present the head to your lord. He gives you some land and riches, and you live as happily ever after as a ninja can... ^^-Best Ending-"; "You jump from the window, and escape into the night. ^^You bring the evidence back to your lord in just a few day's time. Your clan manages to smooth things over with the Tanhoko, and they march with you to meet the approaching Owari forces. The battle rages on all day. When night falls, you sneak into the enemy camp to assassinate their lord. You manage to kill two of his look-alikes before being discovered. As you make your escape, a soldier cleaves off your left arm at the shoulder. You manage to make your way back to camp, and a doctor saves your life. The next day, the fighting is even fiercer. You take to the front line, and fall as many others. The day is won by your clan, but at a terrible price. ^^-Good Ending-"; ]; !quit;