! Operation Rescue ! An adventure game by John Andzelik Constant Story "Operation Rescue"; Constant Headline "^By John Andzelik^"; include "Parser"; include "VerbLib"; include "Grammar"; !use Success as a flag for each level Global Success = 0; verb 'shoot' = 'attack'; [initialise; location = Plains; "^^^After a huge battle, your squad has been captured you alone managed to survive, you can see your weapons. Time to go recue your buddies^Available commands are:^Up, Down, N,S,E,W, and Kill"; ]; Object Plains "Great Plains" with description "You are alone in the plains you see your weapons just up ahead, and enemies looming over the horizon. To the east you see a forrest.", !the user cannot pass through unless they have succeeded on the room in which they are in e_to[; if (Success == 1) { Success = 0; return Forrest; } else { deadflag = true; "You attempt to sneak past the enemy, and die in the attempt.....better luck next time...Oh wait....Your dead, there isn't a next time"; } ], has light; object -> weapon "M4Carbine" with name'Rifle' 'M4''weapon' 'Assualt Rifle', initial "A black rifle appears before you", description "It is your M4 rifle, you have 30 rounds left", after[; take: if (knife in player) "Good Job, you have both of your weapon"; else "You now have your weapon, where is your blade?"; drop: "Why did you drop your weapon, 50 push ups NOW!!"; ]; object -> knife "Hunting Knife" with name 'Survival Knife' 'blade' 'bayonet' 'knife', initial "Over yonder lies your blade", description "Your knife has a sharp blade, and a comfortable handle perfect for sneaking up on someone and killing them", after[; take: if (weapon in player) "You have found both of your weapons, good job"; else "You still need your rifle"; drop: "You shouldn't keep dropping these, you will need them"; ]; object Enemy "Enemy" Plains has static with name 'Bad Guy' 'enemy' 'enemies', description "there are three of them,one of them has a S.A.W. but they haven't spotted you yet", !Use percentage points to determine victory in a battle....with bullets flying there are no guarentees before [; attack: if (weapon in player) { if (random(9) > 1) { score = score + 1; Success = 1; move SAW to Plains; remove Enemy; "You fire 3 shots...One shot one kill...good job"; } else { deadflag = true; "You missed, but they didn't"; } } else "You are still too far away, maybe if you had your rifle"; ]; object->->SAW "Squad Assault Weapon" with name 'Automatic Machine Gun' 'SAW', describe "It is an automatic machine gun aka the SAW. With a full drum of rounds in it. perfect for killing alot of enemies", before[; drop: move SAW to Plains; "Do you know how expensive these things are....you will regret dropping it"; ]; object Forrest with name 'forrest' 'woods', description "You made it over the first hurtle, you are now in a thick forrest, plenty of cover. You hear footsteps, and lots of them getting closer, what could it be? On the edge of the forrest looms a great mountain that you could go UP", w_to[; Success = 1; return Plains; ], u_to[; if (Success == 1) { Success = 0; return Mountain; } else "You cannot climb while the bad guys are still out there"; ], has light; object->EnemySquad "Squad" has static with name 'enemies' 'squad' 'bad guys', description "They are on a routine recon, checking the area for possible intruders, one of them is carrying a Bazooka which could come in handy", before [; attack: if (SAW in player) { if (random(9) > 1) { Success = 1; Score = Score + 1; move Bazooka to Forrest; remove EnemySquad; "You open fire with the SAW mowing them down before they know you are there.....good job, now where did that Bazooka go?"; } else { deadflag = true; "You let loose with the SAW but unfortuantly a few of them dodge, and kill you first....sorry"; } } else { if (random(3) < 2) { Success = 1; Score = Score + 3; move Bazooka to Forrest; remove EnemySquad; "You have got to be the best Sniper ever, You wind up getting every single one of them with your Rifle before they knew what was going on"; } else { deadflag = true; "You attempt to take them out with just a Rifle, and die in the process....should have grabbed the SAW"; } } ]; object->-> Bazooka "Bazooka" with name 'Anti Tank System' 'Really big gun' 'Missle Launcher' 'bazooka', describe "It is long, it is round, and it comes with alot BIG missles... Its a Bazooka...boys and our toys......can you say BIG BANG }:)- ", before [; drop: move Bazooka to Forrest; "Why oh why would you drop such a wonderful toy?"; ]; object Mountain with name 'Mountain' 'Big Hill', description "On top of the mountain looms a giant tank guarding three paths. To the north lies a beautiful garden, to the west, a dismal swamp, and to the east is an artic wasteland", d_to[; Success = 1; return forrest; ], w_to[; if (Success == 1) { deadflag = 1; return Swamp; } else "You cannot pass without first dealing with the tank"; ], n_to[; if (Success == 1) { deadflag = 1; return Garden; } else "You cannot pass without first dealing with the tank"; ], e_to[; if (Success == 1) { deadflag = 2; return Artic; } else "You cannot pass without first dealing with the tank"; ], has light; object->tank "Tank" has static with name 'tank' 'big tank', description "Its a tank, it is big, metal and VERY DANGEROUS", before[; attack: if (Bazooka in player) { if (random(10) > 1) { Success = 1; Score = Score + 5; remove tank; "Good job, you took out the tank^^now for the final riddle:^^Straight is the way of the arrow, but the road to success can often be winding. When at a cross road, choices must be made carefully, or risk losing your way. Down one of three paths lies your teammates, choose well and win the game, choose wrong, and live with the consequences."; } else { deadflag = true; "You miss and the tank does not"; } } else { deadflag = true; "You attempt to take out the tank without the use of a bazooka, not smart...your dead"; } ]; object Swamp "Swamp" with name 'swamp' 'dismal swamp', description "It is a swamp, full of bugs, hot a humid, not a fun place at all, and it looks as though you are trappped here with no way out.", has light; object Garden "Garden" with name 'Garden', description "It is a beautiful feild of roses, tulips, and other wonderful flowers, you could stay here forever without a care in the world", has light; object Artic "Artic" with name 'artic wasteland' 'snow', description "Here in frozen wasteland, at the mercy of mothernature herself, you find your lost comrades.", has light;