1 /* $NetBSD: moreobj.c,v 1.10 2008/02/04 01:07:01 dholland Exp $ */
4 * moreobj.c Larn is copyrighted 1986 by Noah Morgan.
6 * Routines in this file:
8 * oaltar() othrone() ochest() ofountain()
10 #include <sys/cdefs.h>
12 __RCSID("$NetBSD: moreobj.c,v 1.10 2008/02/04 01:07:01 dholland Exp $");
19 static void fch(int, long *);
22 * subroutine to process an altar object
28 lprcat("\nDo you (p) pray (d) desecrate");
34 lprcat(" pray\nDo you (m) give money or (j) just pray? ");
51 act_desecrate_altar();
64 subroutine to process a throne object
71 lprcat("\nDo you (p) pry off jewels, (s) sit down");
99 lprcat("\nDo you (s) sit down");
108 lprcat("\nZaaaappp! You've been teleported!\n");
112 lprcat("\nnothing happens");
124 subroutine to process a throne object
130 lprcat("\nDo you (t) take it, (o) try to open it");
137 act_open_chest(playerx
, playery
);
142 if (take(OCHEST
, iarg
[playerx
][playery
]) == 0)
143 item
[playerx
][playery
] = know
[playerx
][playery
] = 0;
155 process a fountain object
162 lprcat("\nDo you (d) drink, (w) wash yourself");
168 act_drink_fountain();
177 lprcat("wash yourself");
188 subroutine to process an up/down of a character attribute for ofountain
196 lprcat(" went down by one!");
199 lprcat(" went up by one!");
206 a subroutine to raise or lower character levels
207 if x > 0 they are raised if x < 0 they are lowered
217 lprcat("Your strength");
221 lprcat("Your intelligence");
225 lprcat("Your wisdom");
229 lprcat("Your constitution");
233 lprcat("Your dexterity");
237 lprcat("Your charm");
243 lprintf("You lose %ld hit point", (long) j
);
250 lprintf("You gain %ld hit point", (long) j
);
263 lprintf("You just gained %ld spell", (long) j
);
264 raisemspells((int) j
);
270 lprintf("You just lost %ld spell", (long) j
);
271 losemspells((int) j
);
281 j
= 5 * rnd((level
+ 1) * (level
+ 1));
283 lprintf("You just lost %ld experience point", (long) j
);
288 loseexperience((long) j
);
290 lprintf("You just gained %ld experience point", (long) j
);
295 raiseexperience((long) j
);