2 * All the daemon and fuse functions are in here
4 * @(#)daemons.c 3.7 (Berkeley) 6/15/81
6 * Rogue: Exploring the Dungeons of Doom
7 * Copyright (C) 1980, 1981 Michael Toy, Ken Arnold and Glenn Wichman
10 * See the file LICENSE.TXT for full copyright and licensing information.
18 * A healing daemon that restors hit points after rest
30 if (quiet
> 20 - lv
*2)
35 pstats
.s_hpt
+= rnd(lv
- 7)+1;
36 if (ISRING(LEFT
, R_REGEN
))
38 if (ISRING(RIGHT
, R_REGEN
))
40 if (ohp
!= pstats
.s_hpt
)
42 if (pstats
.s_hpt
> max_hp
)
43 pstats
.s_hpt
= max_hp
;
50 * Called when it is time to start rolling for wandering monsters
55 start_daemon(rollwand
, 0, BEFORE
);
60 * Called to roll to see if a wandering monster starts up
72 kill_daemon(rollwand
);
73 fuse(swander
, 0, WANDERTIME
, BEFORE
);
81 * Release the poor player from his confusion
86 player
.t_flags
&= ~ISHUH
;
87 msg("You feel less confused now");
93 * He lost his see invisible power
98 player
.t_flags
&= ~CANSEE
;
103 * He gets his sight back
108 if (on(player
, ISBLIND
))
111 player
.t_flags
&= ~ISBLIND
;
113 msg("The veil of darkness lifts");
124 player
.t_flags
&= ~ISHASTE
;
125 msg("You feel yourself slowing down.");
129 * digest the hero's food
133 register int oldfood
;
138 * the hero is fainting
140 if (no_command
|| rnd(100) > 20)
142 no_command
= rnd(8)+4;
144 addmsg("You feel too weak from lack of food. ");
153 food_left
-= ring_eat(LEFT
) + ring_eat(RIGHT
) + 1 - amulet
;
155 if (food_left
< MORETIME
&& oldfood
>= MORETIME
)
157 msg("You are starting to feel weak");
160 else if (food_left
< 2 * MORETIME
&& oldfood
>= 2 * MORETIME
)
163 msg("You are starting to get hungry");
165 msg("Getting hungry");