-#include <stdlib.h> /* for malloc(), calloc(), free() */
-#include <string.h> /* for strlen() */
-#include "yx_uint16.h" /* for yx_uint16 struct, mv_yx_in_dir(), yx_uint16_cmp */
-#include "misc.h" /* for update_log(), turn_over()*/
-#include "map.h" /* for Map struct */
-#include "main.h" /* for World struct */
-#include "map_objects.h" /* for map object (definition) structs */
-#include "rrand.h" /* for rrand() */
-
-
-
-/* Log monster (described by "desc_monster1") bumping into "monster2". */
-static void monster_bumps_monster(struct World * world, char * desc_monster1,
- struct Monster * monster2);
-
-/* Decrement player HPs due to attack of monster described by "desc_monster",
- * kill player if his HP hit zero; log the whole action.
+#include <stdint.h> /* for uint8_t, uint16_t */
+#include <string.h> /* for strlen(), strcmp() */
+#include "yx_uint16.h" /* for yx_uint16 struct, mv_yx_in_dir(),
+ * yx_uint16_cmp()
+ */
+#include "map_objects.h" /* for MapObj, MapObjDef structs, get_player(),
+ * set_object_position(), own_map_object()
+ */
+#include "misc.h" /* for update_log(), try_malloc() */
+#include "map.h" /* for is_passable() */
+#include "main.h" /* for world global */
+#include "readwrite.h" /* for try_fopen(), try_fclose(), textfile_sizes() */
+#include "rexit.h" /* for exit_err() */
+
+
+
+/* If "name" fits "moa"->name, set "moa"->func to "func". */
+static uint8_t try_func_name(struct MapObjAct * moa,
+ char * name, void (* func) (struct MapObj *));
+
+/* One actor "wounds" another actor, decrementing his lifepoints and, if they
+ * reach zero in the process, killing it. Generates appropriate log message.