50 int max, sound_was_played;
57 for (ab = trap->
above, tot = 0; ab != NULL; ab = ab->
above)
61 if (!(trap->
value = (tot > trap->
weight) ? 1 : 0)) {
69 for (ab = trap->
above, max = 100, sound_was_played = 0; --max && ab; ab = ab_next) {
76 if (!sound_was_played) {
81 "You fall into a trapdoor!");
#define UP_OBJ_FACE
Only thing that changed was the face.
method_ret common_pre_ob_move_on(object *trap, object *victim, object *originator)
void init_type_trapdoor(void)
Initializer for the TRAPDOOR object type.
#define MSG_TYPE_APPLY_TRAP
Have activated a trap.
#define SOUND_TYPE_GROUND
#define SET_ANIMATION(ob, newanim)
static uint32_t NROF(const object *const ob)
Returns ob->nrof, unless it is 0, in which case return 1.
int32_t value
How much money it is worth (or contains)
object * above
Pointer to the object stacked above this one.
void register_move_on(int ob_type, move_on_func method)
Registers the move_on method for the given type.
MoveType move_on
Move types affected moving on to this space.
Global type definitions and header inclusions.
void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message)
Sends message to player(s).
#define MSG_TYPE_APPLY
Applying objects.
int32_t weight
Attributes of the object.
char method_ret
Define some standard return values for callbacks which don't need to return any other results...
int32_t carrying
How much weight this object contains.
void common_post_ob_move_on(object *trap, object *victim, object *originator)
MoveType move_type
Type of movement this object uses.
static method_ret trapdoor_type_move_on(object *trap, object *victim, object *originator)
Move on this Trapdoor object.
#define NDI_UNIQUE
Print immediately, don't buffer.
int transfer_ob(object *op, int x, int y, int randomly, object *originator)
Move an object (even linked objects) to another spot on the same map.
void play_sound_map(int8_t sound_type, object *emitter, int dir, const char *action)
Plays a sound on a map.
void object_update(object *op, int action)
object_update() updates the array which represents the map.
Object type functions and variables.