home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!news.tek.com!master!saab!billr
- From: billr@saab.CNA.TEK.COM (Bill Randle)
- Newsgroups: comp.sources.games
- Subject: v15i039: dinkum2 - australian text adventure game, Part04/07
- Message-ID: <4195@master.CNA.TEK.COM>
- Date: 14 Jan 93 03:25:58 GMT
- Sender: news@master.CNA.TEK.COM
- Lines: 1353
- Approved: billr@saab.CNA.TEK.COM
- Xref: uunet comp.sources.games:1538
-
- Submitted-by: Gary Allen <gary@sun.mech.uq.oz.au>
- Posting-number: Volume 15, Issue 39
- Archive-name: dinkum2/Part04
- Supersedes: dinkum: Volume 15, Issue 21-26
- Environment: Unix, DOS
-
-
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 4 (of 7)."
- # Contents: monster.c objlook.c
- # Wrapped by billr@saab on Wed Jan 13 19:20:18 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'monster.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'monster.c'\"
- else
- echo shar: Extracting \"'monster.c'\" \(28639 characters\)
- sed "s/^X//" >'monster.c' <<'END_OF_FILE'
- X#define MNSTR
- X#include "dink_sym.h"
- X#include "dink_glb.h"
- X
- Xint sw_snaked = FALSE, sw_wombat = FALSE ;
- X
- Xvoid monster(loc_pnt)
- X/********************************************************************/
- X/* */
- X/* --- The Monster Subroutine --- */
- X/* */
- X/* monster_flag is a global variable input parameters */
- X/* */
- X/* Software by Gary A. Allen, Jr. 22 December 1992, Version: Mk 1.5 */
- X/* (c) Copyright 1992 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************************************/
- X
- Xint loc_pnt[3] ;
- X{
- Xregister int j ;
- Xint sw_chasing, sw_local ;
- Xstatic int sw_hoop = FALSE, bear_flag = 0 ;
- Xstatic int sw_replaced = FALSE ;
- Xstatic int sw_nogo = FALSE, sw_guarded = TRUE ;
- Xstatic int sw_letter = FALSE ;
- Xstatic int count_down = 0 ;
- X
- Xstruct monster_struct *mnstr, *mnstr_local, *mnstr_chase ;
- X
- X#if (PROTOTYPE)
- Xvoid ender(int), long_descp(int), hold_it(void), boom(void) ;
- Xvoid ned_kills(void), mullah_kills(void) ;
- Xvoid see_letter(int*, int*) ;
- Xvoid chief_mullah(int*) ;
- Xint bribe_mullah(int*) ;
- Xvoid chaser(struct monster_struct*, int[3]) ;
- X#endif
- X
- X/* set up some of the input variables */
- Xsw_chasing = FALSE ; /* turn off the chasing monster switch */
- Xsw_local = FALSE ; /* turn off the local monster switch */
- X
- X/* There can be no active monsters while in the closet */
- Xif (loc_pnt[0] == R_closet) {
- X monster_flag = F_no_monster ;
- X if (sw_letter == TRUE) {
- X sw_letter = FALSE ;
- X sw_nogo = TRUE ;
- Xprintf("\nYou hear a loud \"BOOM!\" from the Prayer Room followed\n");
- Xprintf("by the sounds of people shouting and cursing in Farsi. I\n");
- Xprintf("think it is definitely time that we leave.\n") ;
- X }
- X return ;
- X}
- X
- X/* scan the enemy table for the local and/or chasing monsters */
- Xfor (j = 0; j <= enemy_max; j++) {
- X mnstr = (monster_start + j) ; /* point to the monster */
- X if (mnstr->Location == loc_pnt[0]) {
- X sw_local = TRUE;
- X mnstr_local = mnstr ;
- X }
- X else if (mnstr->Status != F_asleep){
- X if ((N_mullah == j)||(N_guards == j)||((N_ned == j)&&
- X (mnstr->Status == F_stealing))) continue ;
- X sw_chasing = TRUE;
- X mnstr_chase = mnstr ;
- X }
- X}
- X
- X/* see if the monster is local */
- Xif (sw_local) {
- X/* deal with case of being chased by monster to another monster */
- Xif (sw_chasing) {
- X
- X switch(mnstr_chase->Type) {
- X/* Mutant wombat scares off the local monser */
- X case N_wombat:
- X/* put the local monster to sleep and swap location with wombat */
- X mnstr_local->Status = F_asleep ;
- X mnstr_local->Location = Wombat->Location ;
- X chaser(mnstr_chase, loc_pnt) ;
- X return ;
- X
- X/* Hoop Snake breaks off the chase */
- X case N_hoop_snake:
- Xprintf(" ---- What a relief!! ---- \n") ;
- Xprintf(" The dreaded hoop snake has broken off pursuit.\n");
- Xprintf(" But what is this!!\n\n") ;
- Xprintf("You see yet another terrible creature!\n");
- X sw_replaced = TRUE ;
- X break ;
- X }
- X
- X /* put the chasing monster to sleep */
- X monster_flag = F_no_monster ;
- X mnstr_chase->Status = F_asleep ;
- X sw_chasing = FALSE;
- X}
- X
- X/* local monster routines */
- Xswitch(mnstr_local->Type) {
- X
- X/* Revolutionary Guard local (only) behavior */
- Xcase N_guards:
- Xmonster_flag = F_monster_active ;
- X
- X/* guards always kill after the letter bomb has exploded */
- Xif (sw_nogo) {
- Xprintf("\nWith you are three men dressed in ripped and shredded ");
- Xprintf("clothes which have\nbeen blackened by an explosion. They ") ;
- Xprintf("are armed to the teeth and insane\nwith rage. They take ");
- Xprintf("one look at you and proceed to cut you to pieces with\n");
- Xprintf("their automatic weapons!\n\n");
- X ender(F_died) ;
- X}
- X
- X/* guards always kill if they see a rifle */
- Xif (object[O_rifle][J_loc] == B_have) {
- Xprintf("With you are four men dressed in rather shabby clothes. ");
- Xprintf("Three of them\nare clutching AK-47 assault rifles while ");
- Xprintf("the fourth one is holding an Uzi\nmachine gun. They ") ;
- Xprintf("take one look at the M-16 rifle which you are clutching,\n");
- Xprintf("point their own weapons at you and proceed to hose you ");
- Xprintf("with a hail of\nlead! Ten seconds later you look like ");
- Xprintf("a piece of Swiss cheese.\n\n") ;
- X ender(F_died) ;
- X}
- X
- Xswitch (Guards->Status) {
- X case F_asleep:
- X Guards->Status = F_passive ;
- Xprintf("With you are four men dressed in rather shabby clothes. ");
- Xprintf("Three of them\nare clutching AK-47 assault rifles while ");
- Xprintf("the fourth one is holding an Uzi\nmachine gun. They ") ;
- Xprintf("search you but find nothing that is obviously a\n") ;
- Xprintf("weapon. They are in a quandary on what to do with ") ;
- Xprintf("you, since you\nliterally appeared out of thin air.\n");
- X return ;
- X
- X case F_passive:
- X if (Mullah->Status == F_asleep) {
- Xprintf("\nThe four men have concluded that the best thing to do\n");
- Xprintf("with you is to take you to their superiors. Two of the men\n");
- Xprintf("roughly grab hold of you and fling you bodily through the\n");
- Xprintf("doorway to the east.\n\n") ;
- X loc_pnt[0] = R_prayer;
- X long_descp(R_prayer) ;
- X chief_mullah(&count_down) ;
- X return ;
- X }
- X if (sw_guarded) {
- Xprintf("\nAll of the guards are currently in the prayer room.\n") ;
- X sw_guarded = FALSE ;
- X }
- X return ;
- X
- X case F_aggressive:
- X Guards->Status = F_killing ;
- Xprintf("\nThe four guards grab you by the arms and legs, and frog\n");
- Xprintf("march you back into the prayer room.\n");
- X loc_pnt[0] = R_prayer;
- X return ;
- X
- X case F_killing:
- Xprintf("\nThe guards are tired of fooling with you. One of them\n") ;
- Xprintf("hits you on the head with the butt of his rifle. Then the\n");
- Xprintf("other two guards drag you outside where you are executed\n");
- Xprintf("before a jeering mob of 30,000 people!\n\n") ;
- X ender(F_died) ;
- X
- X} /* end of the Guards local routine and switch block */
- X
- X
- X/* Chief Mullah local (only) behaivor */
- Xcase N_mullah:
- Xswitch (Mullah->Status) {
- X case F_asleep:
- X chief_mullah(&count_down) ;
- X return ;
- X
- X case F_aggressive:
- X /* The Mullah takes any valuables dropped */
- X if (bribe_mullah(&count_down)) return ;
- X
- X /* The Mullah sees and takes the letter */
- X if (object[O_letter][J_loc] == R_prayer) {
- X see_letter(&count_down, &sw_letter);
- X return ;
- X }
- X count_down++ ;
- X switch(count_down) {
- X case 1:
- Xprintf("\nThe Mullah is waiting for you to give him something.\n") ;
- X return ;
- X case 2:
- Xprintf("\nThe Mullah is becoming quite impaitent. You had better\n") ;
- Xprintf("do something soon!\n") ;
- X Mullah->Status = F_killing ;
- X }
- X return ;
- X
- X case F_passive:
- X count_down++ ;
- X switch(count_down) {
- X
- X case 1:
- Xprintf("\nThe Mullah is examining the envelope of Muammar's letter.\n");
- X return ;
- X
- X case 2:
- Xprintf("\nThe Mullah has turned the envelope over and is just\n") ;
- Xprintf("about to open it.\n") ;
- X return ;
- X
- X case 3:
- X boom() ;
- Xprintf("The Mullah opened the letter. Needless to say, the letter\n") ;
- Xprintf("was a bomb. The good news is the nasty old Mullah died.\n");
- Xprintf("The bad news is you died in the explosion as well!\n\n") ;
- X ender(F_died) ;
- X }
- X
- X case F_killing:
- X if (bribe_mullah(&count_down)) {
- X Mullah->Status = F_aggressive ;
- X return ;
- X }
- X if (object[O_letter][J_loc]==R_prayer) {
- X see_letter(&count_down, &sw_letter);
- X return ;
- X }
- Xprintf("\"You are a brainless idiot!\" screams the Mullah!\n") ;
- X mullah_kills() ;
- X} /* end of mullah status switch block */
- X
- X/* The mullah sees Gaddafi's lette (this might be dead code) */
- X/* temporary */
- Xsee_letter(&count_down, &sw_letter);
- Xreturn ;
- X/* end of the mullah local behavior routine */
- X
- X/* Ned Kelly local behavior */
- Xcase N_ned:
- Xif (monster_flag == F_no_monster) {
- Xprintf("\nAs you approached the entrance of Ned Kelly's hide out, a ") ;
- Xprintf("man walked out\n") ;
- Xprintf("the front door and prevented you from entering. He is ");
- Xprintf("wearing an iron\n") ;
- Xprintf("helmet with thin eye slits which completely covers ");
- Xprintf("his head. He has\n") ;
- Xprintf("body armour made of thin sheets of iron that covers ");
- Xprintf("his chest and abdomen.\n") ;
- Xprintf("He is holding a 12 guage double barrel shotgun ");
- Xprintf("and has a pistol on\nhis hip. ") ;
- Xprintf("I could be wrong but I think this is Ned Kelly!\n\n");
- X loc_pnt[0] = R_hideout_entr ;
- X monster_flag = F_monster_active ;
- X Ned->Status = F_passive ;
- X return ;
- X}
- Xelse {
- X if (Ned->Status == F_killing) ned_kills() ;
- Xprintf("\nNed is not about to allow you to enter his hide out. He ");
- Xprintf("is now expressing\n") ;
- Xprintf("his displeasure with your continued presence by cocking both ");
- Xprintf("of the hammers on\n") ;
- Xprintf("his shotgun and pointing it at your head. I believe it is ");
- Xprintf("time to go!!\n\n") ;
- X loc_pnt[0] = R_hideout_entr ;
- X Ned->Status = F_killing ;
- X return ;
- X}
- X
- X/* Mutant Wombat monster behavior */
- Xcase N_wombat:
- Xsw_replaced = FALSE ;
- Xif (monster_flag == F_no_monster) {
- Xprintf("\n ----- OH NO!! -----\n") ;
- Xprintf(" You are in ***SERIOUS TROUBLE*** !!!\n") ;
- Xprintf("Forget about hoop snakes, and forget about drop bears. This ");
- Xprintf("is the WORST\n") ;
- Xprintf("thing that can be found in the ACME Mine. You see before ");
- Xprintf("you the awful\n") ;
- Xprintf("spawn of the Pommy nuclear weapon's tests. Its ancestors ");
- Xprintf("were inoffensive\n") ;
- Xprintf("creatures, but gamma radiation has transformed this into...\n");
- Xprintf(" The Dreadful Mutant Wombat!! \n") ;
- Xprintf("Normally I would advise you to run for your life. However ");
- Xprintf("there's really\n");
- Xprintf("no point. You can not out run this thing, and it's almost ");
- Xprintf("impossible to\n");
- Xprintf("kill. You might as well just stand here and let it finish ");
- Xprintf("you off as\n") ;
- Xprintf("quickly and painlessly as possible.\n\n") ;
- X monster_flag = F_monster_active ;
- X Wombat->Status = F_aggressive ;
- X loc_pnt[1] = loc_pnt[0] ;
- X loc_pnt[2] = 0 ; /* zero out the previous location */
- X}
- Xelse {
- X if (Wombat->Status == F_aggressive) {
- Xprintf("\nThe wombat is approaching you. Its mouth is wide open ") ;
- Xprintf("showing its\n") ;
- Xprintf("enormous canines. Its claws are fully extended. The ") ;
- Xprintf("wombat sees\n") ;
- Xprintf("you as an easy meal and is preparing to feast.\n") ;
- X Wombat->Status = F_killing ;
- X return ;
- X }
- X if (Wombat->Status == F_killing) {
- X /* The Mutant Wombat kills the player */
- Xprintf("\nThe obscene creature has grasped you with its terrible ");
- Xprintf("claws! First the\n");
- Xprintf("wombat rips off your right arm with a single jerk and ");
- Xprintf("tosses it down its\n");
- Xprintf("throat like it was an appetizer (which it was!). Next ");
- Xprintf("the monster studies\n");
- Xprintf("you for a moment and then twists off your left leg and ") ;
- Xprintf("chews on it like\n") ;
- Xprintf("a turkey drumstick. After savoring your left leg, it ");
- Xprintf("opens its mouth wide\n");
- Xprintf("and stuffs you in head first! Your last memory was ") ;
- Xprintf("hearing the crunching\n");
- Xprintf("of your own bones as the wombat's jaws clamped down!\n") ;
- X ender(F_died) ;
- X }
- X}
- Xreturn ;
- X
- X/* Drop Bear monster behavior */
- Xcase N_drop_bear:
- Xsw_replaced = FALSE ;
- Xif (monster_flag == F_no_monster) {
- X switch(bear_flag) {
- Xcase 0:
- Xprintf("\nAs you walk in, you see something that looks vaguely like") ;
- Xprintf(" a koala bear\n") ;
- Xprintf("sitting in the middle of the floor. However this \"koala\"") ;
- Xprintf(" has vampire\n") ;
- Xprintf("teeth and blood drooling down the sides of its mouth. The") ;
- Xprintf(" bear takes\n") ;
- Xprintf("one look at you and climbs up the wall onto the ceiling.") ;
- Xprintf(" It \n") ;
- Xprintf("clings to the ceiling much like a fly and seems to be") ;
- Xprintf(" positioning\n") ;
- Xprintf("itself to be directly over you. I could be wrong but I") ;
- Xprintf(" think this is\n") ;
- Xprintf("the deadly DROP BEAR! \n\n") ;
- X bear_flag = 1 ;
- X break ;
- X
- Xcase 1:
- Xprintf("\nJust as you walk in, a drop bear flashes by and hits") ;
- Xprintf(" the ground with\n");
- Xprintf("a THUNK. That was close! Had it hit you, and caught ") ;
- Xprintf("hold with its\n");
- Xprintf("claws, you would have been finished. The dreaded ");
- Xprintf("beast is now\n") ;
- Xprintf("running up the wall towards the ceiling to give it ") ;
- Xprintf("another go. I\n");
- Xprintf("think we had better leave and soon!\n\n") ;;
- X bear_flag = 2 ;
- X break ;
- X
- Xcase 2:
- Xprintf("\nAs you walk in, you see a drop bear lounging lazily in") ;
- Xprintf(" the middle of\n");
- Xprintf("the floor. It rolls over and takes one look at you, ") ;
- Xprintf("runs towards\n");
- Xprintf("the wall and scampers up to the ceiling. It is now ");
- Xprintf("positioning\n") ;
- Xprintf("itself to be directly over you.\n\n") ;
- X bear_flag = 1 ;
- X }
- X
- Xmonster_flag = F_monster_active ;
- Xmnstr_local->Status = F_aggressive ;
- X}
- Xelse {
- X if (mnstr_local->Status == F_aggressive) {
- Xprintf("\nThe drop bear is now positioned directly above you. It is") ;
- Xprintf(" hanging batlike\n") ;
- Xprintf("by its rear paws, with its front arms reaching out with");
- Xprintf(" claws fully \n") ;
- Xprintf("extended. Its mouth is wide open with its vampire teeth ");
- Xprintf("clearly visible.\n") ;
- Xprintf("I think this thing means business! Let's make a hasty ");
- Xprintf("departure!!\n") ;
- X mnstr_local->Status = F_killing ;
- X return ;
- X }
- X if (mnstr_local->Status == F_killing) {
- X /* The drop bear kills the player */
- Xprintf("\nThe drop bear drops on top of you! First it grabs hold ") ;
- Xprintf("of you with its \n") ;
- Xprintf("sharp claws that sink deep into your flesh. Then it bites ");
- Xprintf("into your neck \n") ;
- Xprintf("at the jugular vein and begins sucking your blood. You ");
- Xprintf("try desperately \n") ;
- Xprintf("to pull the horrible monster off, but it only clamps on ");
- Xprintf("harder and sucks \n") ;
- Xprintf("more vigorously. Soon you grow weak from lack of blood, ");
- Xprintf("and lapse into death. \n") ;
- X ender(F_died) ;
- X }
- X}
- Xreturn ;
- X
- X/* Hoop Snake monster behavior */
- Xcase N_hoop_snake:
- Xif (monster_flag == F_no_monster) {
- X if (sw_replaced) {
- X sw_replaced = FALSE ;
- Xprintf("\nA new and rested hoop snake rolls into view. The ");
- Xprintf("snake sees you, lets go of\n") ;
- Xprintf("its tail and starts slithering towards you with fangs ");
- Xprintf("at the ready. \n\n");
- X }
- X else {
- X if (!sw_hoop) {
- Xprintf("\nSomething that looks vaguely like a barrel hoop rolls into ");
- Xprintf("the passage. You \n") ;
- Xprintf("suddenly realize to your horror that this is no hoop but a ");
- Xprintf("snake biting its \n") ;
- Xprintf("own tail. The snake lets go of its tail and starts to ");
- Xprintf("slither towards you \n") ;
- Xprintf("like a regular, highly aggressive snake. \n\n");
- X sw_hoop = TRUE ;
- X }
- X else {
- Xprintf("\nA hoop snake rolls towards you. It lets go of its ");
- Xprintf("tail and starts slithering\n") ;
- Xprintf("in your direction. \n\n");
- X }
- X }
- X monster_flag = F_monster_active ;
- X mnstr_local->Status = F_aggressive ;
- X loc_pnt[1] = loc_pnt[0] ;
- X loc_pnt[2] = 0 ; /* zero out the previous location */
- X return ;
- X}
- Xelse {
- X if (mnstr_local->Status == F_aggressive) {
- Xprintf("\nThe hoop snake is coiling up in front of you and ") ;
- Xprintf("hissing very aggressively. \n") ;
- Xprintf("Venom is dripping from its sharp fangs and seems ") ;
- Xprintf("to be burning holes into\n") ;
- Xprintf("the stone floor.\n\n") ;
- Xprintf("I think it would be wise for us to leave.... Quickly!!\n") ;
- X mnstr_local->Status = F_killing ;
- X return ;
- X }
- X if (mnstr_local->Status == F_killing) {
- X /* The Hoop Snake kills the player */
- Xprintf("\nThe hoop snake strikes and bites you right on the nose!") ;
- Xprintf("\n\nYou begin to thrash around ") ;
- Xprintf("like a Baygon sprayed cocky. The nerve poison \n") ;
- Xprintf("makes you jerk around onto your back with your arms and ") ;
- Xprintf("legs flailing about\n") ;
- Xprintf("in the air. With time your spasmodic twitching reduces") ;
- Xprintf(" in frequency. You\n") ;
- Xprintf("slowly grind down to a halt with the coming of death. \n") ;
- X ender(F_died) ;
- X }
- X
- X}
- X} /* end of the local monster switch group */
- X}
- X
- Xchaser(mnstr_chase, loc_pnt) ;
- Xreturn ;
- X
- X} /* --- end of the "monster" subroutine --- */
- X
- Xvoid chaser(mnstr, loc_pnt)
- X/********************************************************************/
- X/* */
- X/* --- Monster Chasing Subroutine --- */
- X/* */
- X/* Software by Gary A. Allen, Jr. 8 December 1992, Version: Mk 2.0 */
- X/* (c) Copyright 1992 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************************************/
- Xstruct monster_struct *mnstr ;
- Xint loc_pnt[3] ;
- X{
- X
- X#if (PROTOTYPE)
- Xvoid ned_kills(void) ;
- X#endif
- X
- Xswitch(mnstr->Type) {
- X/* Ned Kelly */
- Xcase N_ned:
- X if (loc_pnt[0] == R_hideout_entr) {
- X if (Ned->Status == F_passive) {
- Xprintf("\nNed Kelly is standing in front of you and is holding a ");
- Xprintf("12 guage shotgun\n") ;
- Xprintf("in a rather menacing manner. This guy is really game!\n\n") ;
- Xprintf("I suggest we leave..... and quickly!!\n\n") ;
- X Ned->Status = F_aggressive ;
- X return ;
- X }
- X if (Ned->Status == F_aggressive) {
- Xprintf("\nNed seems to be getting impaitent with you. He is now ");
- Xprintf("expressing his\n") ;
- Xprintf("displeasure with your continued presence by cocking both ");
- Xprintf("of the hammers on\n") ;
- Xprintf("his shotgun and pointing it at your head. I really think ");
- Xprintf("we should be\n") ;
- Xprintf("making a hasty departure!!\n\n") ;
- X Ned->Status = F_killing ;
- X return ;
- X }
- X if (Ned->Status != F_killing) break ;
- X else ned_kills() ;
- X }
- X else break ;
- X
- X/* Mutant wombat chases */
- Xcase N_wombat:
- X if (loc_pnt[0] == R_lift_inside) {
- Xprintf("\nYou run as fast as you can into the lift. You've made it! ") ;
- Xprintf(" You're in the\n") ;
- Xprintf("lift! However as you turn around, you realize to your horror") ;
- Xprintf(" that the\n") ;
- Xprintf("wombat has also made it inside the lift, and the door ");
- Xprintf("is closing!!\n\n") ;
- Xprintf(" Ah, Stuff of Nightmares!!!\n") ;
- Xprintf(" ---Trapped in a Lift with a Mutant Wombat!!!---\n\n");
- Xprintf("This is just too horrible. Let it suffice... You died. \n");
- X ender(F_died) ;
- X }
- X if (loc_pnt[0] == loc_pnt[2]) {
- Xprintf("The wombat is in that direction. You can't go that way!\n");
- X loc_pnt[0] = loc_pnt[1] ;
- X return ;
- X }
- X if (!sw_wombat) {
- Xprintf("\nAs you flee down the passage, you hear the ");
- Xprintf("\"THUD, THUD, THUD\" of the wombat\n") ;
- Xprintf("trudging down the passage. The horrible thing is after") ;
- Xprintf(" you! Give up\n") ;
- Xprintf("all hope! The wombat is driven by nuclear energy and") ;
- Xprintf(" will never stop.\n\n") ;
- X sw_wombat = TRUE ;
- X }
- X else {
- Xprintf("\nThe wombat is still chasing you and not tiring. \n") ;
- X }
- X monster_flag = F_monster_active ;
- X mnstr->Status = F_aggressive ;
- X --room[mnstr->Location][M_monster] ;
- X ++room[loc_pnt[0]][M_monster] ;
- X mnstr->Location = loc_pnt[0] ;
- X loc_pnt[2] = loc_pnt[1] ;
- X loc_pnt[1] = loc_pnt[0] ;
- X return ;
- X
- X/* Hoop Snake chases */
- Xcase N_hoop_snake:
- X if (loc_pnt[0] == R_lift_inside) {
- Xprintf("\nYou seek refuge from the hoop snake by fleeing into the ") ;
- Xprintf("lift. Just as you\n") ;
- Xprintf("enter the lift, its door begins to close. Unfortunately the") ;
- Xprintf(" hoop snake\n") ;
- Xprintf("rolls in the instant before the door is fully closed.\n\n") ;
- Xprintf("We will not describe the unpleasant events that occur behind");
- Xprintf(" the closed door\n");
- Xprintf("of the lift. However one can hear screams, curses, futile ");
- Xprintf("banging on the\n");
- Xprintf("lift door and loud snake hissing. After a few minutes ");
- Xprintf("there is again silence.\n");
- Xprintf("The lift door opens and the hoop snake rolls out and away. ");
- Xprintf("A peek inside the\n");
- Xprintf("lift reveals your corpse which is in the early phases of ");
- Xprintf("rigor mortis.\n") ;
- X ender(F_died) ;
- X }
- X if (loc_pnt[0] == loc_pnt[2]) {
- X if (mnstr->Status == F_killing) {
- Xprintf("The hoop snake is in that direction. ") ;
- Xprintf("You can't go that way!\n");
- X loc_pnt[0] = loc_pnt[1] ;
- X return ;
- X }
- X else {
- Xprintf("You have run back the way you came and passed the hoop ");
- Xprintf("snake, which\n") ;
- Xprintf("is still biting its tail and rolling like a hoop. The ") ;
- Xprintf("vile creature\n") ;
- Xprintf("hisses in frustration and does a U-turn to continue ") ;
- Xprintf("the chase.\n\n") ;
- X }
- X }
- X else {
- X if (!sw_snaked) {
- Xprintf("\nAs you flee down the passage, you hear the characteristic ") ;
- Xprintf("sound of reptilian\n") ;
- Xprintf("scales rubbing the stone floor. You look over your shoulder") ;
- Xprintf(" and see the\n") ;
- Xprintf("hoop snake is rolling along right behind you! The dreaded") ;
- Xprintf(" thing is chasing you!!\n\n") ;
- X sw_snaked = TRUE ;
- X }
- X else {
- Xprintf("\nThe hoop snake is rolling along behind you, and still") ;
- Xprintf(" in hot pursuit!\n\n") ;
- X }
- X }
- X monster_flag = F_monster_active ;
- X mnstr->Status = F_aggressive ;
- X --room[mnstr->Location][M_monster] ;
- X ++room[loc_pnt[0]][M_monster] ;
- X mnstr->Location = loc_pnt[0] ;
- X loc_pnt[2] = loc_pnt[1] ;
- X loc_pnt[1] = loc_pnt[0] ;
- X return ;
- X} /* end of the chasing monster switch group */
- X
- X/* player has fled the monster, so turn it off */
- Xmonster_flag = F_no_monster ;
- Xmnstr->Status = F_asleep ;
- Xreturn ;
- X
- X} /* --- end of the "chaser" subroutine --- */
- X
- Xvoid ned_kills()
- X/********************************************************************/
- X/* */
- X/* --- Ned Killy Kills the Player Subroutine --- */
- X/* */
- X/* Software by Gary A. Allen, Jr. 7 December 1992, Version: Mk 1.0 */
- X/* (c) Copyright 1992 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************************************/
- X{
- X
- X#if (PROTOTYPE)
- Xvoid ender(int) ;
- X#endif
- X
- Xprintf("\nWith an air of professional detachment, Ned Kelly pulls ");
- Xprintf("both triggers\n") ;
- Xprintf("on his shotgun and blows your head clean off your ") ;
- Xprintf("shoulders. \n\n") ;
- X ender(F_died) ;
- X} /* --- end of the ned_kills" subroutine --- */
- X
- Xvoid mullah_kills()
- X/********************************************************************/
- X/* */
- X/* --- Mullah Kills the Player Subroutine --- */
- X/* */
- X/* Software by Gary A. Allen, Jr. 7 December 1992, Version: Mk 1.0 */
- X/* (c) Copyright 1992 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************************************/
- X{
- X
- X#if (PROTOTYPE)
- Xvoid ender(int) ;
- X#endif
- X
- Xprintf("\nWith that pronouncement, the chief Mullah claps his hands\n");
- Xprintf("twice. Two Revolutionary Guards drag you outside where you\n");
- Xprintf("are executed before a jeering mob of 30,000 people!\n") ;
- X ender(F_died) ;
- X} /* --- end of the "mullah_kills" subroutine --- */
- X
- Xvoid see_letter(count_on, sw_letter)
- X/********************************************************************/
- X/* */
- X/* --- Mullah see Gaddafi's Letter Subroutine --- */
- X/* */
- X/* Software by Gary A. Allen, Jr. 7 December 1992, Version: Mk 1.0 */
- X/* (c) Copyright 1992 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************************************/
- X
- Xint *count_on, *sw_letter ;
- X
- X{
- Xprintf("\nThe Mullah gives the letter a casual glance, then\n");
- Xprintf("suddenly his face lights up and he claps his hands with\n") ;
- Xprintf("glee.\n\n") ;
- Xprintf("\"It's a letter from my old friend Muammar!\", he exclaims!\n");
- Xprintf("\"This is an occasion for much jubulation. As a token of\n");
- Xprintf("my esteem take this ancient gong clapper made of gold and\n");
- Xprintf("ivory. It was recovered from the personal collection of\n") ;
- Xprintf("the deposed Shah. It once belonged to the ancient Persian\n") ;
- Xprintf("King Cyrus and is priceless!\"\n\n") ;
- Xprintf("With this glad tiding the Mullah hands you the ancient\n") ;
- Xprintf("clapper and then reaches down to pick up the letter from\n") ;
- Xprintf("his old friend.\n") ;
- X
- XMullah->Status = F_passive ;
- XGuards->Status = F_passive ;
- Xobject[O_letter][J_loc] = B_destroyed ;
- X--room[R_prayer][M_obj_cnt] ;
- Xobject[O_clapper][J_loc] = B_have ;
- Xobject[O_detector][J_loc] = R_guard ;
- X++room[R_guard][M_obj_cnt] ;
- Xcarry_count++ ;
- Xcarry_weight += object[O_clapper][J_weight] ;
- X*sw_letter = TRUE ;
- X*count_on = 0 ;
- X
- X} /* --- end of the "see_letter" subroutine --- */
- X
- Xvoid chief_mullah(count_on)
- X/********************************************************************/
- X/* */
- X/* --- Chief Mullah Subroutine --- */
- X/* */
- X/* Software by Gary A. Allen, Jr. 8 December 1992, Version: Mk 1.0 */
- X/* (c) Copyright 1992 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************************************/
- X
- Xint *count_on ;
- X{
- Xregister int i ;
- X
- X#if (PROTOTYPE)
- Xvoid hold_it(void) ;
- Xvoid mullah_kills(void) ;
- X#endif
- X
- Xprintf("\n") ;
- Xhold_it() ;
- XMullah->Status = F_aggressive ;
- XGuards->Status = F_aggressive ;
- X
- Xprintf("The chief Mullah (or whatever he is) who is sitting on the\n");
- Xprintf("dias glares in your direction and begins expounding in a\n");
- Xprintf("long monologue in Farsi. One of his Revolutionary Guards\n") ;
- Xprintf("starts translating the Mullah's words into fairly good\n");
- Xprintf("English (with an American accent!). Here is what he said:\n") ;
- Xprintf("\n\"I can see by your slouch hat, singlet and short pants\n");
- Xprintf("that you are a good-for-nothing satanic Australian. I am\n");
- Xprintf("compelled to point out that your sort is most unwelcomed in\n");
- X
- X/* see if the player has any valuables or the letter */
- Xfor (i = 0; i <= objcnt; i++) {
- X if ((object[i][J_loc] == B_have)&&
- X ((O_letter == i)||(object[i][J_value] > 0))) {
- X
- X/* Player has something the Mullah wants, so he lives */
- Xprintf("this holy precinct. Unless you can provide some good\n");
- Xprintf("reasons (preferably financial ones) to the contrary, I\n");
- Xprintf("shall order you to be executed immediately for the\n");
- Xprintf("amusement and edification of the local populace!\"\n") ;
- X *count_on = 0 ;
- X return ;
- X }
- X}
- X
- X/* Player has no valuables and doesn't have the letter so he dies */
- Xprintf("this holy precinct. Since you have nothing of value, our\n");
- Xprintf("usual practice would be to take you hostage and extract a\n");
- Xprintf("ransom from your government. However the Ozzie Dollar\n") ;
- Xprintf("doesn't buy all that much anymore, so we'll just execute\n");
- Xprintf("you and leave it at that.\"\n") ;
- Xmullah_kills() ;
- X
- X} /* --- end of the "chief_mullah" subroutine --- */
- X
- Xint bribe_mullah(count_on)
- X/********************************************************************/
- X/* */
- X/* --- Chief Mullah Subroutine --- */
- X/* */
- X/* Software by Gary A. Allen, Jr. 3 January 1993 , Version: Mk 1.0 */
- X/* (c) Copyright 1993 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************************************/
- X
- Xint *count_on ;
- X{
- Xregister int j ;
- Xint sw_bribe ;
- X
- X/* The Mullah takes any valuables dropped */
- Xsw_bribe = FALSE ;
- Xfor (j = 0; j <= objcnt; j++) {
- X if ((object[j][J_loc] == R_prayer) && (object[j][J_value] > 0)) {
- X object[j][J_loc] = B_destroyed ;
- X --room[R_prayer][M_obj_cnt] ;
- X sw_bribe = TRUE ;
- X }
- X}
- Xif (sw_bribe) {
- Xprintf("\nOne of the guards picks up the treasure and hands it over to\n") ;
- Xprintf("the chief Mullah who discretely pockets it within his robe. The\n") ;
- Xprintf("Mullah then looks expectantly towards you... I think he wants\n") ;
- Xprintf("more treasure.\n") ;
- X *count_on = 0 ;
- X return(TRUE) ;
- X}
- Xreturn(FALSE) ;
- X
- X} /* --- end of the "bribe_mullah" function --- */
- END_OF_FILE
- if test 28639 -ne `wc -c <'monster.c'`; then
- echo shar: \"'monster.c'\" unpacked with wrong size!
- fi
- # end of 'monster.c'
- fi
- if test -f 'objlook.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'objlook.c'\"
- else
- echo shar: Extracting \"'objlook.c'\" \(17427 characters\)
- sed "s/^X//" >'objlook.c' <<'END_OF_FILE'
- X#define OBJLKR
- X#include "dink_sym.h"
- X#include "dink_glb.h"
- X
- Xvoid objlooker(n)
- X/*********************************************************/
- X/* */
- X/* --- Object in Room Examination Subroutine --- */
- X/* */
- X/* Program by Gary A. Allen, Jr. 18 May 1990 */
- X/* (c) Copyright 1992 by Gary A. Allen, Jr. */
- X/* */
- X/*********************************************************/
- Xint n ;
- X{
- X#if (PROTOTYPE)
- Xvoid objector(int) ;
- X#endif
- X
- Xregister int i ;
- X
- Xif (((object[O_torch][J_loc] == B_have) && object[O_torch][J_property]) ||
- X (n < 186) || (n > 202)) {
- X if (room[n][M_obj_cnt] == 1) {
- X for (i=0; i <= objcnt; i++) {
- X if ((object[i][J_loc] == n) &&
- X (object[i][J_type] != Z_unmovable)) {
- X if (n == R_office_mang) {
- Xprintf ("On the floor you see ") ;
- X objector(i) ;
- X printf (".\n") ;
- X }
- X else {
- X printf ("You see ") ;
- X objector(i) ;
- X printf (".\n") ;
- X }
- X }
- X }
- X }
- X if (room[n][M_obj_cnt] > 1) {
- X if (n == R_office_mang)
- Xprintf ("You see the following on the floor: \n");
- X else printf ("You see the following: \n");
- X for (i=0; i <= objcnt; i++) {
- X if ((object[i][J_loc] == n) &&
- X (object[i][J_type] != Z_unmovable)) {
- X printf (" ") ;
- X objector(i) ;
- X printf ("\n") ;
- X }
- X }
- X }
- X}
- X} /* end of "objlooker" subroutine */
- X
- Xvoid kelly(n)
- X/********************************************************************/
- X/* */
- X/* --- Ned Kelly Subroutine -- */
- X/* */
- X/* Software by Gary A. Allen, Jr. 5 November 1989 Version: Mk 1.2 */
- X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************************************/
- Xint n ;
- X{
- Xregister int i, k ;
- Xstatic int ned_look = 0, sw_fiddle = TRUE ;
- Xint sw_ned_look, sw_ned_set ;
- X
- X/* check if Ned Kelly is dead */
- Xif (Ned->Location == B_destroyed) return ;
- X
- X/* this switch is for Ned looking for treasure once per cycle */
- Xsw_ned_look = FALSE ;
- Xsw_ned_set = FALSE ;
- X
- X/* check if player is in Ned's trigger rooms */
- Xswitch (n) {
- X/* Cause Ned Kelly to steal */
- Xcase R_lift_inside:
- X /* are there valuables in the safe and the safe open? */
- X if ((score > 0)&&
- X (room[R_office_mang][M_rm_status] >= S_dialed)) {
- X /* is the office building open? */
- X if ((ned_look > 3)||
- X (room[R_office_entr][M_rm_status] == S_open)||
- X (room[R_office_entr][M_rm_status] == S_kicked)||
- X (room[R_office_entr][M_rm_status] == S_unlocked)) {
- X
- X if (ned_look > 3) {
- X room[R_office_entr][M_rm_status] = S_kicked ;
- X room[R_office_entr][2] = R_office_hall ;
- X }
- X/* scan the object list for treasure in safe and transfer to hideout */
- X for (i=0; i <= objcnt; i++) {
- X if ((object[i][J_loc] == B_in_safe)&&(object[i][J_value] > 0)) {
- X ++room[R_hideout][M_obj_cnt] ;
- X object[i][J_loc] = R_hideout;
- X sw_ned_set = TRUE ;
- X }
- X }
- X }
- X/* the safe is open with treasure but the door is locked */
- X else {
- X ++ned_look ;
- X sw_ned_look = TRUE ;
- X }
- X } /* end of the block concerning Ned and the safe */
- X
- X if (sw_valuable) {
- X for (i=0; i <= objcnt; i++) {
- X/* scan for treasure laying around outside the building on surface */
- X for (k = 22; k <= 36; k++) {
- X if ((object[i][J_loc] == k)&&
- X (object[i][J_value] > 0)) {
- X ++room[R_hideout][M_obj_cnt] ;
- X --room[k][M_obj_cnt] ;
- X object[i][J_loc] = R_hideout;
- X sw_ned_set = TRUE ;
- X sw_valuable = FALSE ;
- X break ;
- X }
- X }
- X for (k = 144; k <= 145; k++) {
- X if ((object[i][J_loc] == k)&&
- X (object[i][J_value] > 0)) {
- X ++room[R_hideout][M_obj_cnt] ;
- X --room[k][M_obj_cnt] ;
- X object[i][J_loc] = R_hideout;
- X sw_valuable = FALSE ;
- X sw_ned_set = TRUE ;
- X break ;
- X }
- X }
- X /* scan the office building for treasure on the floor */
- X for (k = 37; k <= 41; k++) {
- X if ((object[i][J_loc] == k)&&
- X (object[i][J_value] > 0)) {
- X/* if the office bldg. door is open then Ned Kelly steals treasure */
- X if ((room[R_office_entr][M_rm_status] == S_open)||
- X (room[R_office_entr][M_rm_status] == S_unlocked)||
- X (room[R_office_entr][M_rm_status] == S_kicked)) {
- X ++room[R_hideout][M_obj_cnt] ;
- X --room[k][M_obj_cnt] ;
- X object[i][J_loc] = R_hideout;
- X sw_valuable = FALSE ;
- X sw_ned_set = TRUE ;
- X break ;
- X }
- X/* if Ned Kelly sees locked treasure four times, he kicks in the door */
- X if (ned_look > 3) {
- X room[R_office_entr][M_rm_status] = S_kicked ;
- X room[R_office_entr][2] = R_office_hall ;
- X ++room[R_hideout][M_obj_cnt] ;
- X --room[k][M_obj_cnt] ;
- X object[i][J_loc] = R_hideout;
- X sw_valuable = FALSE ;
- X sw_ned_set = TRUE ;
- X }
- X else {
- X if (!sw_ned_look) ++ned_look ;
- X sw_ned_look = TRUE ;
- X break ; /* conclude the office bldg. loop */
- X }
- X break ;
- X }
- X }
- X }
- X } /* end of block concerning Ned and loose treasure */
- X
- X if (sw_ned_set) {
- X Ned->Status = F_stealing ;
- X Ned->Location = R_hideout ;
- X room[R_hideout][M_monster] = 1 ;
- X sw_ned_set = FALSE ;
- X }
- X return ;
- X
- Xcase R_office_entr:
- X/* Cause Ned Kelly to run away with treasure */
- X if (Ned->Status == F_stealing) {
- X Ned->Status = F_asleep ;
- Xprintf("There is an odd looking character with an iron bucket on his ");
- Xprintf("head and a swag\n");
- Xprintf("bag over his shoulder running away from the ");
- Xprintf("office building towards\nthe desert. \n\n") ;
- X return ;
- X }
- X if ((ned_look == 2) && sw_fiddle &&
- X (room[R_office_entr][M_rm_status] != S_open) &&
- X (room[R_office_entr][M_rm_status] != S_kicked) &&
- X (room[R_office_entr][M_rm_status] != S_unlocked)) {
- X sw_fiddle = FALSE ;
- Xprintf("As you approach the office building's door, you see a\n");
- Xprintf("strange looking character with a bucket on his head and\n") ;
- Xprintf("wearing an iron breast plate. He is on his knees before\n") ;
- Xprintf("the door trying to pick the lock with a bit of coat hanger\n") ;
- Xprintf("wire. Suddenly, he turns and sees you coming. With amazing\n");
- Xprintf("speed, he throws away his wire and runs off towards the\n") ;
- Xprintf("open desert.\n\n") ;
- X return ;
- X }
- X} /* end of the ned kelly room switch block */
- X} /* --- end of the "kelly" subroutine --- */
- X
- Xvoid sounder(n)
- X/********************************************************************/
- X/* */
- X/* --- Gong Sounding Subroutine -- */
- X/* */
- X/* Software by Gary A. Allen, Jr. 21 June 1989 Version: Mk 1.0 */
- X/* (c) Copyright 1989 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************************************/
- Xint n ;
- X{
- X#if (PROTOTYPE)
- Xvoid exit(int), hold_it(void) ;
- Xvoid los_angeles(void) ;
- Xchar getche(void) ;
- X#endif
- X
- Xchar letter ;
- Xstatic int sw_told = FALSE ;
- X
- X/* see if player is in the gong room */
- Xif (n != R_gong) {
- X if (tag[V_gong]) printf("I don't see a gong here.\n") ;
- X else printf("I don't see how you can do that.\n") ;
- X return ;
- X}
- X
- X/* The player is in the gong room. Does he have the clapper? */
- Xif (tag[V_clapper]) {
- X if (object[O_clapper][J_loc] == B_have) {
- X if (!tag[V_gong]) {
- Xprintf("With what are you going to do that with the clapper?\n") ;
- X return ;
- X }
- Xprintf
- X("\n GGGGGGGG OOOOOOOO NN NN GGGGGGGG !!!\n") ;
- Xprintf
- X("GG GG OO OO NNN NN GG GG !!!\n") ;
- Xprintf
- X("GG OO OO NN N NN GG !!!\n") ;
- Xprintf
- X("GG OO OO NN N NN GG !!!\n") ;
- Xprintf
- X("GG GGGGGGG OO OO NN N NN GG GGGGGG !!!\n") ;
- Xprintf
- X("GG GG OO OO NN N NN GG GG !!!\n") ;
- Xprintf
- X("GG GG OO OO NN N NN GG GG\n") ;
- Xprintf
- X("GG GG OO OO NN NNN GG GG 000\n") ;
- Xprintf
- X(" GGGGGGGG OOOOOOOO NN NN GGGGGGGG 000\n\n") ;
- X
- X/* see if the "end game" can begine */
- X /* Check to see if the recorder was used */
- X if (sw_script) {
- X if (sw_told) printf("Nothing happened.\n") ;
- X else {
- Xprintf("You hear an ethereal voice which says:\n\n") ;
- Xprintf("Sorry Mate! You used the bloody data recorder which gave you\n") ;
- Xprintf("an unfair advantage. If you want to be admitted into the final\n") ;
- Xprintf("part of Dinkum and have a chance at winning then you must find\n") ;
- Xprintf("all the treasure, come back here and sound the gong WITHOUT having\n") ;
- Xprintf("started Dinkum with the command switch \"-S\" (NO data recorder).\n\n");
- Xprintf("You did however put in a good effort. Better luck next time!\n") ;
- X sw_told = TRUE ;
- X }
- X return ;
- X }
- X
- X /* No recorder so admit player to endgame */
- X if ((score < max_score)||(gleep_score == 0)) {
- Xprintf("You hear an ethereal voice which says:\n\n") ;
- X if (score < max_score) {
- Xprintf("Sorry Mate! You haven't put all of the treasure in the\n") ;
- Xprintf("safe yet. Find the rest, and then the secret of the gong\n") ;
- Xprintf("will be revealed.\n") ;
- X return ;
- X }
- X if (gleep_score == 0) {
- Xprintf("Good on you Mate! You've found all of the treasure.\n") ;
- Xprintf("However you haven't put a single gleep in the gleep tank!\n");
- Xprintf("You're not a Fair Dinkum Adventurer until you've put at\n") ;
- Xprintf("least one gleep in the tank.\n") ;
- X return ;
- X }
- X }
- X /* Begin the End Game */
- Xprintf("There is a loud \"Fromp!\" as a portcullis crashes down and\n");
- Xprintf("seals the northern (and only) exit. The lights go dim and\n");
- Xprintf("a hazy fog appears in the room. Slowly this fog coalesces\n") ;
- Xif (sw_warned) {
- Xprintf("into the now familiar form of Banjo Patterson. For some\n") ;
- Xprintf("odd reason Banjo is holding in his right hand a sword of\n") ;
- Xprintf("fire such as one reads about in Genesis. The deathly quiet\n");
- Xprintf("is broken when Banjo begins to speak:\n") ;
- X}
- Xelse {
- Xprintf("into a ghostly human form. This ethereal being is wearing\n") ;
- Xprintf("a grey flannel suit, a bowler hat, and has a gold pocket\n") ;
- Xprintf("watch chain looped across the front of his waist coat. He\n");
- Xprintf("is holding in his right hand a sword of fire such as one\n") ;
- Xprintf("reads about in Genesis. You can hear \"Waltzing Matilda\"\n");
- Xprintf("being played softly in the background. You know what?\n");
- Xprintf("I think this ethereal being is none other than the ghost\n") ;
- Xprintf("of Banjo Patterson! With this realization Banjo begins to\n") ;
- Xprintf("speak:\n") ;
- X}
- X hold_it() ;
- Xprintf("\"Good on you, Fair Dinkum Adventurer! You have braved\n") ;
- Xprintf("the perils of hoop snakes, drop bears, and mutant wombats.\n") ;
- Xprintf("You have solved many riddles, collected much treasure and\n") ;
- Xprintf("encountered true evil and dealt with it appropriately.\n");
- Xprintf("However it has occured to us that you might not be one of\n") ;
- Xprintf("the chosen few who can be admitted into the Land of the\n") ;
- Xprintf("Blessed. The possibility remains that you could be a\n") ;
- Xprintf("whinging Pom or a bleeding Yank. Therefore you will be\n") ;
- Xprintf("tested with three questions. If you answer correctly, you\n") ;
- Xprintf("will be admitted into paradise. However should you answer\n");
- Xprintf("falsely, you will be sent to another place, an abode of\n");
- Xprintf("darkness and dread. So answer wisely, for you will not be\n") ;
- Xprintf("given a second chance!\"\n\n") ;
- X
- Xprintf("What is the capital of Australia?\n\n") ;
- Xprintf(" A) Sydney\n") ;
- Xprintf(" B) Canberra\n") ;
- Xprintf(" C) Melbourne\n\n") ;
- Xprintf("Answer A, B, or C: ") ;
- X#ifndef __TURBOC__
- X for(;;) {
- X letter = getchar() ;
- X if ((letter != '\n')&&(letter != ' ')) break ;
- X }
- X if (('b' == letter)||('B' == letter))
- X printf("\nCorrect!\n\n") ;
- X#endif
- X
- X#ifdef __TURBOC__
- X for(;;) {
- X letter = getche() ;
- X if ((letter != '\n')&&(letter != ' ')) break ;
- X }
- X if (('b' == letter)||('B' == letter))
- X printf("\n\nCorrect!\n\n") ;
- X#endif
- X else {
- X los_angeles() ;
- X return ;
- X }
- X
- Xprintf("In the Australian emblem there appears two animals on\n") ;
- Xprintf("either side of a shield. One of the two animals is a\n") ;
- Xprintf("kangaroo. What species is the other animal?\n\n") ;
- Xprintf(" A) Koala Bear\n") ;
- Xprintf(" B) Platypus\n") ;
- Xprintf(" C) Emu\n\n") ;
- Xprintf("Answer A, B, or C: ") ;
- X#ifndef __TURBOC__
- X for(;;) {
- X letter = getchar() ;
- X if ((letter != '\n')&&(letter != ' ')) break ;
- X }
- X if (('c' == letter)||('C' == letter))
- X printf("\nCorrect!\n\n") ;
- X#endif
- X
- X#ifdef __TURBOC__
- X for(;;) {
- X letter = getche() ;
- X if ((letter != '\n')&&(letter != ' ')) break ;
- X }
- X if (('c' == letter)||('C' == letter))
- X printf("\n\nCorrect!\n\n") ;
- X#endif
- X else {
- X los_angeles() ;
- X return ;
- X }
- X
- Xprintf("Which place is a state in Australia?\n\n") ;
- Xprintf(" A) Arcadia\n") ;
- Xprintf(" B) Patagonia\n") ;
- Xprintf(" C) Tasmania\n\n") ;
- Xprintf("Answer A, B, or C: ") ;
- X#ifndef __TURBOC__
- X for(;;) {
- X letter = getchar() ;
- X if ((letter != '\n')&&(letter != ' ')) break ;
- X }
- X if (('c' == letter)||('C' == letter))
- X printf("\nCorrect!\n\n") ;
- X#endif
- X
- X#ifdef __TURBOC__
- X for(;;) {
- X letter = getche() ;
- X if ((letter != '\n')&&(letter != ' ')) break ;
- X }
- X if (('c' == letter)||('C' == letter))
- X printf("\n\nCorrect!\n\n") ;
- X#endif
- X else {
- X los_angeles() ;
- X return ;
- X }
- X
- X/* Player has won the game */
- Xprintf("You see Banjo Patterson with a beatific smile. He waves\n") ;
- Xprintf("his firey sword with a florish and the scene around you\n") ;
- Xprintf("dissolves into a million tiny motes of light. You now\n") ;
- Xprintf("find yourself wearing swimming togs. You are being carried\n");
- Xprintf("by a guard of honour made up of four sumptuous shielas\n") ;
- Xprintf("dressed in string bikinis and four handsome lifeguards.\n") ;
- Xprintf("They carry you to a perfect beach on South Stradbroke\n") ;
- Xprintf("Island. Off in the distance on the Queensland mainland\n") ;
- Xprintf("you see the Gold Coast which vaguely resembles the Emerald\n") ;
- Xprintf("City of the classic movie. Your guard of honour sets you\n") ;
- Xprintf("down and hands you a can of Power's Bitter. Three\n") ;
- Xprintf("beautiful white pelicans float over head in a clear blue\n") ;
- Xprintf("sky completing a scene of exquisite beauty.\n\n") ;
- Xprintf("You're in paradise Mate and you've also won the game!\n\n") ;
- X
- X/* deal with final gleep announcement */
- Xif (gleep_score == 1) {
- Xprintf("---- A hint for those who want to go on playing Dinkum ----\n");
- Xprintf("In this game you only put the minimum single gleep in the\n");
- Xprintf("gleep tank. In future games try seeding fertile tunnels\n");
- Xprintf("with gleeps and reproducing them. Build up as many gleeps\n");
- Xprintf("as you can and then hit the gong before Dinkum times out.\n");
- X}
- Xelse {
- Xprintf("You won this game with %d gleeps in the gleep tank.\n\n",
- X gleep_score) ;
- X}
- X if (sw_wizard) return ;
- X else exit(0) ;
- X }
- X else {
- X printf("I don't have a clapper to hit it with! \n") ;
- X return ;
- X }
- X}
- Xelse {
- X printf("\nThud!\n\n") ;
- X printf("Nothing happened.\n") ;
- Xprintf("I think you'd have more success if you used a gong clapper.\n");
- X return ;
- X}
- X} /* --- end of the "sounder" subroutine --- */
- X
- Xvoid los_angeles()
- X/********************************************************************/
- X/* */
- X/* --- Los Angeles Subroutine -- */
- X/* */
- X/* Player enters false answer and goes to Los Angeles. */
- X/* */
- X/* Software by Gary A. Allen, Jr. 7 December 1992 Version: Mk 1.0 */
- X/* (c) Copyright 1992 by Gary A. Allen, Jr. */
- X/* */
- X/********************************************************************/
- X{
- Xprintf("\n -!-!-!-!-!- Wrong! -!-!-!-!-!-\n\n") ;
- Xprintf("Banjo Patterson brings down the sword of fire onto your\n");
- Xprintf("head. The scene around you disappears in a flash and you\n");
- Xprintf("find yourself transported to.....\n\n") ;
- Xprintf(" Pico Blvd., West Los Angeles\n\n") ;
- Xprintf("L.A. is having a stage three smog alert. The air is so\n");
- Xprintf("foul you can taste it. A Los Angeles municipal bus roars\n");
- Xprintf("by covering you in soot. Across the street you see a\n");
- Xprintf("modern day Neanderthal selling vials of Crack to children.\n");
- Xprintf("The person next to you has taken a definite physical\n");
- Xprintf("interest in you. She/he is wearing a short skirt and has a\n");
- Xprintf("beehive hairdo. He/she also has a five o'clock shadow, and\n");
- Xprintf("bicepts so thick that he could collapse your skull with a\n");
- Xprintf("single thump.\n\n") ;
- Xprintf("We now leave this unhappy scene. Since you were sent to\n") ;
- Xprintf("Los Angeles your score has been zeroed.\n\n") ;
- Xprintf("So ends yet another unsuccessful session at Dinkum!\n") ;
- X
- Xif (sw_wizard) return ;
- Xelse exit(0) ;
- X
- X} /* --- end of the "los_angeles" subroutine --- */
- END_OF_FILE
- if test 17427 -ne `wc -c <'objlook.c'`; then
- echo shar: \"'objlook.c'\" unpacked with wrong size!
- fi
- # end of 'objlook.c'
- fi
- echo shar: End of archive 4 \(of 7\).
- cp /dev/null ark4isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 7 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-