1 /* src/server/thing_actions.h
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.
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.
12 #ifndef THING_ACTIONS_H
13 #define THING_ACTIONS_H
19 /* Actor "t" does nothing. */
20 extern void actor_wait(struct Thing * t);
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.
28 extern void actor_move(struct Thing * t);
30 /* Actor "t" tries to drop from inventory thing indexed by number t->args. */
31 extern void actor_drop(struct Thing * t);
33 /* Actor "t" tries to pick up topmost thing from ground into its inventory. */
34 extern void actor_pick(struct Thing * t);
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.)
39 extern void actor_use(struct Thing * t);