home · contact · privacy
Add basic food clock (but no consumables yet to re-set it).
[plomrogue] / src / server / thing_actions.h
1 /* src/server/thing_actions.h
2  *
3  * This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3
4  * or any later version. For details on its copyright, license, and warranties,
5  * see the file NOTICE in the root directory of the PlomRogue source package.
6  *
7  * Actions that can be performed by living things / "actors". Note that apart
8  * from the consequences described below, each action may also trigger log
9  * messages and other minor stuff if the actor is equal to the player.
10  */
11
12 #ifndef THING_ACTIONS_H
13 #define THING_ACTIONS_H
14
15 struct Thing;
16
17
18
19 /* Actor "t" does nothing. */
20 extern void actor_wait(struct Thing * t);
21
22 /* Actor "t" tries to move one step in direction described by char t->arg (where
23  * north-east is 'e', east 'd' etc.) Move either succeeds, or another actor is
24  * encountered and hit (which leads ot its lifepoint decreasing by one and
25  * eventually death), or the move fails due to an impassable target square. On
26  * success, update thing's field of view map.
27  */
28 extern void actor_move(struct Thing * t);
29
30 /* Actor "t" tries to drop from inventory thing indexed by number t->args. */
31 extern void actor_drop(struct Thing * t);
32
33 /* Actor "t" tries to pick up topmost thing from ground into its inventory. */
34 extern void actor_pick(struct Thing * t);
35
36 /* Actor "t" tries to use thing in inventory indexed by number t->args.
37  * (Currently the only valid use is consuming items defined as consumable.)
38  */
39 extern void actor_use(struct Thing * t);
40
41 /* Decrement "t"'s satiation and trigger a chance (dependent on over-/under-
42  * satiation value) of lifepoint decrement, when its type's .stomach is >0.
43  */
44 extern void hunger(struct Thing * t);
45
46
47
48 #endif