aboutsummaryrefslogtreecommitdiff
path: root/games/hack/hack.timeout.c
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1994-09-04 04:03:31 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1994-09-04 04:03:31 +0000
commit554eb505f88b72f17fd718c5b2c4cff707c0f817 (patch)
treea9f8f9086491ddb64c3de11026474c8cb3cf2dd6 /games/hack/hack.timeout.c
parent28178404aff64c092070e5d3ec53c13d06f6a471 (diff)
Bring in the 4.4 Lite games directory, modulo man page changes and segregation
of the x11 based games. I'm not going to tag the originals with bsd_44_lite and do this in two stages since it's just not worth it for this collection, and I've got directory renames to deal with that way. Bleah. Submitted by: jkh
Notes
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=2490
Diffstat (limited to 'games/hack/hack.timeout.c')
-rw-r--r--games/hack/hack.timeout.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/games/hack/hack.timeout.c b/games/hack/hack.timeout.c
new file mode 100644
index 000000000000..d828297684ff
--- /dev/null
+++ b/games/hack/hack.timeout.c
@@ -0,0 +1,62 @@
+/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
+/* hack.timeout.c - version 1.0.3 */
+
+#include "hack.h"
+
+timeout(){
+register struct prop *upp;
+ if(Stoned) stoned_dialogue();
+ for(upp = u.uprops; upp < u.uprops+SIZE(u.uprops); upp++)
+ if((upp->p_flgs & TIMEOUT) && !--upp->p_flgs) {
+ if(upp->p_tofn) (*upp->p_tofn)();
+ else switch(upp - u.uprops){
+ case STONED:
+ killer = "cockatrice";
+ done("died");
+ break;
+ case SICK:
+ pline("You die because of food poisoning.");
+ killer = u.usick_cause;
+ done("died");
+ break;
+ case FAST:
+ pline("You feel yourself slowing down.");
+ break;
+ case CONFUSION:
+ pline("You feel less confused now.");
+ break;
+ case BLIND:
+ pline("You can see again.");
+ setsee();
+ break;
+ case INVIS:
+ on_scr(u.ux,u.uy);
+ pline("You are no longer invisible.");
+ break;
+ case WOUNDED_LEGS:
+ heal_legs();
+ break;
+ }
+ }
+}
+
+/* He is being petrified - dialogue by inmet!tower */
+char *stoned_texts[] = {
+ "You are slowing down.", /* 5 */
+ "Your limbs are stiffening.", /* 4 */
+ "Your limbs have turned to stone.", /* 3 */
+ "You have turned to stone.", /* 2 */
+ "You are a statue." /* 1 */
+};
+
+stoned_dialogue()
+{
+ register long i = (Stoned & TIMEOUT);
+
+ if(i > 0 && i <= SIZE(stoned_texts))
+ pline(stoned_texts[SIZE(stoned_texts) - i]);
+ if(i == 5)
+ Fast = 0;
+ if(i == 3)
+ nomul(-3);
+}