55 && strncmp(
EXIT_PATH(trap),
"/random/", 8))
93 if (!exitmap && exit->
race)
162 "The %s is closed.", name);
167 && strncmp(
EXIT_PATH(exit),
"/random/", 8))
void enter_exit(object *op, object *exit_ob)
Tries to move 'op' to exit_ob.
method_ret common_pre_ob_move_on(object *trap, object *victim, object *originator)
#define MSG_TYPE_APPLY_FAILURE
Apply OK, but no/bad result.
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
#define MSG_TYPE_APPLY_TRAP
Have activated a trap.
player * first_player
First player.
partylist * party
Party this player is part of.
object * above
Pointer to the object stacked above this one.
int16_t y
Position in the map for this object.
void register_move_on(int ob_type, move_on_func method)
Registers the move_on method for the given type.
Global type definitions and header inclusions.
struct player * contr
Pointer to the player which control this object.
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.
char method_ret
Define some standard return values for callbacks which don't need to return any other results...
player * next
Pointer to next player, NULL if this is last.
uint32_t unique
If set, this is a per player unique map.
char path[HUGE_BUF]
Filename of the map.
void query_name(const object *op, char *buf, size_t size)
Describes an item.
sstring msg
If this is a book/sign/magic mouth/etc.
sstring race
Human, goblin, dragon, etc.
object * ob
The object representing the player.
void init_type_exit(void)
Initializer for the EXIT object type.
static method_ret exit_type_move_on(object *trap, object *victim, object *originator)
Move on this Exit object.
living stats
Str, Con, Dex, etc.
#define MAX_BUF
Used for all kinds of things.
struct mapstruct * map
Pointer to the map in which this object is present.
void common_post_ob_move_on(object *trap, object *victim, object *originator)
static int is_legal_2ways_exit(object *op, object *exit)
This fonction return true if the exit is not a 2 ways one or it is 2 ways, valid exit.
#define MAP_PLAYER_UNIQUE
This map is player-specific.
sstring name
The name of the object, obviously...
static method_ret exit_type_apply(object *exit, object *op, int autoapply)
Handles applying an exit.
uint8_t type
PLAYER, BULLET, etc.
#define MSG_TYPE_APPLY_SUCCESS
Was able to apply object.
#define GET_MAP_OB(M, X, Y)
Gets the bottom object on a map.
#define NDI_UNIQUE
Print immediately, don't buffer.
mapstruct * has_been_loaded(const char *name)
Checks whether map has been loaded.
mapstruct * ready_map_name(const char *name, int flags)
Makes sure the given map is loaded and swapped in.
Object type functions and variables.
void register_apply(int ob_type, apply_func method)
Registers the apply method for the given type.