51 int max, sound_was_played;
58 for (ab = trap->above, tot = 0; ab != NULL; ab = ab->above)
59 if ((ab->move_type && trap->move_on) || ab->move_type == 0)
60 tot += NROF(ab)*ab->weight+ab->carrying;
62 if (!(trap->value = (tot > trap->weight) ? 1 : 0)) {
70 for (ab = trap->above, max = 100, sound_was_played = 0; --max && ab; ab = ab_next) {
76 if ((ab->move_type && trap->move_on) || ab->move_type == 0) {
77 if (!sound_was_played) {
82 "You fall into a trapdoor!");
method_ret common_pre_ob_move_on(object *trap, object *victim, object *originator)
#define MSG_TYPE_APPLY_TRAP
#define SOUND_TYPE_GROUND
#define SET_ANIMATION(ob, newanim)
void object_update(object *op, int action)
void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message)
void register_move_on(int ob_type, move_on_func method)
void common_post_ob_move_on(object *trap, object *victim, object *originator)
static method_ret trapdoor_type_move_on(ob_methods *context, object *trap, object *victim, object *originator)
void init_type_trapdoor(void)
int transfer_ob(object *op, int x, int y, int randomly, object *originator)
void play_sound_map(int8_t sound_type, object *emitter, int dir, const char *action)