2023-07-24 08:36:28 +08:00
|
|
|
#ifndef LIB_OBJ_H
|
|
|
|
|
#define LIB_OBJ_H
|
2023-06-05 11:03:51 +08:00
|
|
|
|
2023-06-09 11:19:45 +08:00
|
|
|
#include "define_lite.h"
|
|
|
|
|
#include "define_extra.h"
|
|
|
|
|
|
2023-06-05 11:03:51 +08:00
|
|
|
#define obj_name_safe(obj) (obj_name(obj) if obj else "(null)")
|
|
|
|
|
#define get_active_weapon(critter) critter_inven_obj(critter, (2 - active_hand) if critter == dude_obj else INVEN_TYPE_RIGHT_HAND)
|
2023-07-31 20:55:34 +08:00
|
|
|
#define obj_has_lof_to_obj(critter, target) (obj_blocking_line(critter, tile_num(target), BLOCKING_TYPE_SHOOT) == target)
|
|
|
|
|
#define obj_can_hear_and_shoot_obj(critter, target) (obj_can_hear_obj(critter, target) and obj_has_lof_to_obj(critter, target))
|
2023-06-05 11:03:51 +08:00
|
|
|
|
|
|
|
|
#endif
|