blob: a0481c108e2a713d4f875dbef230f5d0c7581166 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
/* $OpenBSD: hack.timeout.c,v 1.2 2001/01/28 23:41:45 niklas Exp $ */
/*
* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985.
*/
#ifndef lint
static char rcsid[] = "$OpenBSD: hack.timeout.c,v 1.2 2001/01/28 23:41:45 niklas Exp $";
#endif /* not lint */
#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);
}
|