1 /* map_object_actions.h
3 * Routines for the actions available to map objects.
6 #ifndef MAP_OBJECT_ACTIONS_H
7 #define MAP_OBJECT_ACTIONS_H
11 #include "yx_uint16.h" /* for yx_uint16 coordinates */
18 /* Try to move "monster" in random direction. On contact with other monster,
19 * only bump. On contact with player, fight / reduce player's hitpoints,
20 * and thereby potentially trigger the player's death. Update the log for any
23 extern void move_monster(struct World * world, struct Monster * monster);
27 /* Try to move player in direction "d". On contact with monster, fight / reduce
28 * monster's hitpoints, and thereby potentially trigger the monster's death.
29 * Update the log on whatever the player did and turn control over to the enemy.
31 extern void move_player (struct World * world, enum dir d);
35 /* Make player wait one turn, i.e. only update_log with a "you wait" message
36 * and turn control over to the enemy.
38 extern void player_wait(struct World * world);
42 /* Check if coordinate pos on (or beyond) map is accessible to map object
45 extern char is_passable (struct Map * map, struct yx_uint16 pos);