1 /* src/server/thing_actions.h
3 * Actions that can be performed by living things / "actors". Note that apart
4 * from the consequences described below, each action may also trigger log
5 * messages and other minor stuff if the actor is equal to the player.
8 #ifndef THING_ACTIONS_H
9 #define THING_ACTIONS_H
15 /* Actor "t" does nothing. */
16 extern void actor_wait(struct Thing * t);
18 /* Actor "t" tries to move one step in direction described by char t->arg (where
19 * north-east is 'e', east 'd' etc.) Move either succeeds, or another actor is
20 * encountered and hit (which leads ot its lifepoint decreasing by one and
21 * eventually death), or the move fails due to an impassable target square. On
22 * success, update thing's field of view map.
24 extern void actor_move(struct Thing * t);
26 /* Actor "t" tries to drop from inventory thing indexed by number t->args. */
27 extern void actor_drop(struct Thing * t);
29 /* Actor "t" tries to pick up topmost thing from ground into its inventory. */
30 extern void actor_pick(struct Thing * t);
32 /* Actor "t" tries to use thing in inventory indexed by number t->args.
33 * (Currently the only valid use is consuming items defined as consumable.)
35 extern void actor_use(struct Thing * t);