* Copyright (c) 1983 Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
static char sccsid
[] = "@(#)com5.c 5.2 (Berkeley) 6/19/88";
while (wordtype
[++wordnumber
] != NOUNS
&& wordnumber
<= wordcount
);
if (wordtype
[wordnumber
] == NOUNS
&& testbit(location
[position
].objects
,wordvalue
[wordnumber
])){
switch (wordvalue
[wordnumber
]){
puts("She squirms and avoids your advances.");
puts("She is coming around; she didn't fight it as much.");
puts("She's begining to like it.");
puts("She's gone limp.");
puts("The lips are warm and her body robust. She pulls you down to the ground.");
puts("The old man blushes.");
puts("The dwarf punches you in the kneecap.");
else puts("I'd prefer not to.");
while (wordtype
[++wordnumber
] != NOUNS
&& wordnumber
<= wordcount
);
if (wordtype
[wordnumber
] == NOUNS
&& testbit(location
[position
].objects
,wordvalue
[wordnumber
])){
if (wordvalue
[wordnumber
] == NORMGOD
&& !loved
)
puts("She cuddles up to you, and her mouth starts to work:\n'That was my sister's amulet. The lovely goddess, Purl, was she. The Empire\ncaptured her just after the Darkness came. My other sister, Vert, was killed\nby the Dark Lord himself. He took her amulet and warped its power.\nYour quest was foretold by my father before he died, but to get the Dark Lord's\namulet you must use cunning and skill. I will leave you my amulet.");
puts("which you may use as you wish. As for me, I am the last goddess of the\nwaters. My father was the Island King, and the rule is rightfully mine.'\n\nShe pulls the throne out into a large bed.");
if (card(injuries
, NUMOFINJURIES
)){
puts("Her kisses revive you; your wounds are healed.\n");
for (n
=0; n
< NUMOFINJURIES
; n
++)
setbit(location
[position
].objects
,MEDALION
);
if (wordvalue
[wordnumber
] == NATIVE
){
puts("The girl is easy prey. She peals off her sarong and indulges you.");
else puts("I't doesn't seem to work.");
if ((snooze
- time
) < (0.75 * CYCLE
)){
time
+= 0.75 * CYCLE
- (snooze
- time
);
for (n
= 0; n
< time
- oldtime
; n
++)
snooze
+= 3 * (time
- oldtime
);
fuel
-= (time
- oldtime
);
if (location
[position
].down
){
position
= location
[position
].down
;
if (OUTSIDE
&& rnd(100) < 50){
puts("You are awakened abruptly by the sound of someone nearby.");
if (n
!= AMULET
&& n
!= MEDALION
&& n
!= TALISMAN
)
setbit(location
[position
].objects
,n
);
encumber
-= objcumber
[n
];
puts("A fiendish little Elf is stealing your treasures!");
setbit(location
[position
].objects
,DEADWOOD
);
setbit(location
[position
].objects
,HALBERD
);
if ((time
/ CYCLE
+ 1) % 2 && OUTSIDE
)
switch((time
% CYCLE
)/(CYCLE
/ 7)){
puts("It is just after sunrise.");
puts("It is early morning.");
puts("It is late morning.");
puts("It is near noon.");
puts("It is early afternoon.");
puts("It is late afternoon.");
puts("It is near sunset.");
switch((time
% CYCLE
)/(CYCLE
/ 7)){
puts("It is just after sunset.");
puts("It is early evening.");
puts("The evening is getting old.");
puts("It is near midnight.");
puts("These are the wee hours of the morning.");
puts("The night is waning.");
puts("It is almost morning.");
puts("I can't tell the time in here.");
int obj
= -1, result
= -1, person
= 0, firstnumber
, last1
, last2
;
firstnumber
= wordnumber
;
while (wordtype
[++wordnumber
] != OBJECT
&& wordvalue
[wordnumber
] != AMULET
&& wordvalue
[wordnumber
] != MEDALION
&& wordvalue
[wordnumber
] != TALISMAN
&& wordnumber
<= wordcount
);
if (wordnumber
<= wordcount
){
obj
= wordvalue
[wordnumber
];
wordtype
[wordnumber
] = -1;
wordnumber
= firstnumber
;
while ((wordtype
[++wordnumber
] != NOUNS
|| wordvalue
[wordnumber
] == obj
) && wordnumber
<= wordcount
);
if (wordtype
[wordnumber
] == NOUNS
){
person
= wordvalue
[wordnumber
];
if (person
&& testbit(location
[position
].objects
,person
))
if (person
== NORMGOD
&& godready
< 2 && !(obj
== RING
|| obj
== BRACELET
))
puts("The goddess won't look at you.");
puts("I don't think that is possible.");
if (result
!= -1 && (testbit(location
[position
].objects
,obj
) || obj
== AMULET
|| obj
== MEDALION
|| obj
== TALISMAN
)){
clearbit(location
[position
].objects
,obj
);
puts("She accepts it shyly.");
if (obj
== RING
|| obj
== BRACELET
){
puts("She takes the charm and puts it on. A little kiss on the cheek is");
if (obj
== AMULET
|| obj
== MEDALION
|| obj
== TALISMAN
){
puts("The powers of the earth are now legitimate. You have destroyed the Darkness");
puts("and restored the goddess to her thrown. The entire island celebrates with");
puts("dancing and spring feasts. As a measure of her gratitude, the goddess weds you");
puts("in the late summer and crowns you Prince Liverwort, Lord of Fungus.");
puts("\nBut, as the year wears on and autumn comes along, you become restless and");
puts("yearn for adventure. The goddess, too, realizes that the marriage can't last.");
puts("She becomes bored and takes several more natives as husbands. One evening,");
puts("after having been out drinking with the girls, she kicks the throne particulary");
puts("hard and wakes you up. (If you want to win this game, you're going to have to\nshoot her!)");
clearbit(location
[position
].objects
,MEDALION
);
puts("He fingers the coins for a moment and then looks up agape. `Kind you are and");
puts("I mean to repay you as best I can.' Grabbing a pencil and cocktail napkin...\n");
printf( "+-----------------------------------------------------------------------------+\n");
printf( "| xxxxxxxx\\ |\n");
printf( "| xxxxx\\ CLIFFS |\n");
printf( "| FOREST xxx\\ |\n");
printf( "| \\\\ x\\ OCEAN |\n");
printf( "| || ROAD x\\ |\n");
printf( "| SECRET || ......... |\n");
printf( "| - + - || ........ |\n");
printf( "| ENTRANCE || ... BEACH |\n");
printf( "| || ... E |\n");
printf( "| || ... | |\n");
printf( "| // ... N <-- + --- S |\n");
printf( "| PALM GROVE // ... | |\n");
printf( "| // ... W |\n");
printf( "+-----------------------------------------------------------------------------+\n");
puts("\n`This map shows a secret entrance to the catacombs.");
puts("You will know when you arrive because I left an old pair of shoes there.'");
wordnumber
= max(last1
,last2
);