]>
git.cameronkatri.com Git - bsdgames-darwin.git/blob - larn/moreobj.c
1 /* $NetBSD: moreobj.c,v 1.12 2012/06/19 05:30:43 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.12 2012/06/19 05:30:43 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
70 lprcat("\nDo you (p) pry off jewels, (s) sit down");
98 lprcat("\nDo you (s) sit down");
107 lprcat("\nZaaaappp! You've been teleported!\n");
111 lprcat("\nnothing happens");
123 subroutine to process a throne object
129 lprcat("\nDo you (t) take it, (o) try to open it");
136 act_open_chest(playerx
, playery
);
141 if (take(OCHEST
, iarg
[playerx
][playery
]) == 0)
142 item
[playerx
][playery
] = know
[playerx
][playery
] = 0;
154 process a fountain object
161 lprcat("\nDo you (d) drink, (w) wash yourself");
167 act_drink_fountain();
176 lprcat("wash yourself");
187 subroutine to process an up/down of a character attribute for ofountain
190 fch(int how
, long *x
)
193 lprcat(" went down by one!");
196 lprcat(" went up by one!");
203 a subroutine to raise or lower character levels
204 if x > 0 they are raised if x < 0 they are lowered
213 lprcat("Your strength");
217 lprcat("Your intelligence");
221 lprcat("Your wisdom");
225 lprcat("Your constitution");
229 lprcat("Your dexterity");
233 lprcat("Your charm");
239 lprintf("You lose %ld hit point", (long) j
);
246 lprintf("You gain %ld hit point", (long) j
);
259 lprintf("You just gained %ld spell", (long) j
);
260 raisemspells((int) j
);
266 lprintf("You just lost %ld spell", (long) j
);
267 losemspells((int) j
);
277 j
= 5 * rnd((level
+ 1) * (level
+ 1));
279 lprintf("You just lost %ld experience point", (long) j
);
284 loseexperience((long) j
);
286 lprintf("You just gained %ld experience point", (long) j
);
291 raiseexperience((long) j
);