Crossfire Server, Trunk  R20513
libproto.h
Go to the documentation of this file.
1 /* anim.c */
2 extern void free_all_anim(void);
3 extern void init_anim(void);
4 extern int find_animation(const char *name);
5 extern int try_find_animation(const char *name);
6 extern void animate_object(object *op, int dir);
7 extern void apply_anim_suffix(object *who, sstring suffix);
8 extern void dump_animations(void);
9 /* arch.c */
10 extern archetype *find_archetype_by_object_name(const char *name);
11 extern archetype *find_archetype_by_object_type_name(int type, const char *name);
12 extern archetype *get_archetype_by_skill_name(const char *skill, int type);
13 extern archetype *get_archetype_by_type_subtype(int type, int subtype);
14 extern object *create_archetype_by_object_name(const char *name);
15 extern void init_archetypes(void);
16 extern void arch_info(object *op);
17 extern void clear_archetable(void);
18 extern void dump_arch(archetype *at, StringBuffer *sb);
19 extern void dump_all_archetypes(void);
20 extern void free_arch(archetype *at);
21 extern void free_all_archs(void);
22 extern archetype *get_archetype_struct(void);
23 extern void check_generators(void);
24 extern void check_summoned(void);
25 extern object *arch_to_object(archetype *at);
26 extern object *create_singularity(const char *name);
27 extern object *create_archetype(const char *name);
28 extern archetype *try_find_archetype(const char *name);
29 extern archetype *find_archetype(const char *name);
30 extern object *object_create_arch(archetype *at);
31 extern int is_type_valid(uint8_t type);
32 /* artifact.c */
33 extern void free_all_artifacts(void);
34 extern void generate_artifact(object *op, int difficulty);
35 extern void give_artifact_abilities(object *op, const object *artifact);
36 extern int legal_artifact_combination(const object *op, const artifact *art);
37 extern void add_abilities(object *op, const object *change);
38 extern void init_artifacts(void);
39 extern const artifactlist *find_artifactlist(int type);
40 extern const artifact *find_artifact(const object *op, const char *name);
41 extern void dump_artifacts(void);
42 extern unsigned artifact_get_face(const artifact *art);
43 /* button.c */
44 extern void trigger_connected(objectlink *ol, object *cause, const int state);
45 extern void push_button(object *op);
46 extern void update_button(object *op);
47 extern void update_buttons(mapstruct *m);
48 extern void use_trigger(object *op);
49 extern void animate_turning(object *op);
50 extern int check_altar_sacrifice(const object *altar, const object *sacrifice, int remove_others, int *toremove);
51 extern int operate_altar(object *altar, object **sacrifice);
52 extern int check_trigger(object *op, object *cause);
53 extern void add_button_link(object *button, mapstruct *map, int connected);
54 extern void remove_button_link(object *op);
55 extern int get_button_value(const object *button);
56 extern object *check_inv_recursive(object *op, const object *trig);
57 extern void check_inv(object *op, object *trig);
58 extern void verify_button_links(const mapstruct *map);
59 /* dialog.c */
60 extern void free_dialog_information(object *op);
61 extern int get_dialog_message(object *op, const char *text, struct_dialog_message **message, struct_dialog_reply **reply);
62 /* exp.c */
63 extern int64_t new_exp(const object *ob);
64 extern int has_ability(const object *ob);
65 extern void init_experience(void);
66 extern void dump_experience(void);
67 extern void free_experience(void);
68 /* friend.c */
69 extern void add_friendly_object(object *op);
70 extern void remove_friendly_object(object *op);
71 extern void dump_friendly_objects(void);
72 extern void clean_friendly_list(void);
73 extern int is_friendly(const object *op);
74 /* glue.c */
75 extern void fatal(enum fatal_error err);
76 /* holy.c */
77 extern void init_gods(void);
78 extern godlink *get_rand_god(void);
79 extern const object *pntr_to_god_obj(godlink *godlnk);
80 extern int describe_god(const object *god, int what, StringBuffer *buf, size_t maxlen);
81 extern void free_all_god(void);
82 extern void dump_gods(void);
83 /* info.c */
84 extern void dump_abilities(void);
85 extern void print_monsters(void);
86 /* image.c */
87 extern void read_bmap_names(void);
88 extern unsigned find_face(const char *name, unsigned error);
89 extern int read_smooth(void);
90 extern int find_smooth(uint16_t face, uint16_t *smoothed);
91 extern void free_all_images(void);
92 extern void read_client_images(void);
93 extern int is_valid_faceset(int fsn);
94 extern void free_socket_images(void);
95 extern int get_face_fallback(int faceset, int imageno);
96 /* init.c */
97 extern void init_library(void);
98 extern void init_globals(void);
99 extern void free_globals(void);
100 extern void init_objects(void);
101 extern void write_todclock(void);
102 /* item.c */
103 extern int get_power_from_ench(int ench);
104 extern int calc_item_power(const object *op);
105 extern const typedata *get_typedata(int itemtype);
106 extern const typedata *get_typedata_by_name(const char *name);
107 extern StringBuffer *describe_resistance(const object *op, int newline, int use_media_tags, StringBuffer *buf);
108 extern void query_weight(const object *op, char *buf, size_t size);
109 extern void get_levelnumber(int i, char *buf, size_t size);
110 extern void query_short_name(const object *op, char *buf, size_t size);
111 extern void query_name(const object *op, char *buf, size_t size);
112 extern void query_base_name(const object *op, int plural, char *buf, size_t size);
113 extern StringBuffer *describe_monster(const object *op, int use_media_tags, StringBuffer *buf);
114 extern StringBuffer *describe_item(const object *op, const object *owner, int use_media_tags, StringBuffer *buf);
115 extern int is_magical(const object *op);
116 extern int need_identify(const object *op);
117 extern void object_give_identified_properties(object *op);
118 extern object *identify(object *op);
119 /* languages.c */
120 extern int get_language(object *op);
121 extern const char *i18n(const object *who, const char *code);
122 extern int i18n_find_language_by_code(const char *code);
123 extern int i18n_get_language_by_code(const char *code);
124 extern sstring i18n_get_language_code(int language);
125 extern void i18n_list_languages(object *who);
126 extern void i18n_init(void);
127 extern void i18n_free(void);
128 /* links.c */
129 extern objectlink *get_objectlink(void);
130 extern oblinkpt *get_objectlinkpt(void);
131 extern void free_objectlink(objectlink *ol);
132 extern void free_objectlinkpt(oblinkpt *obp);
133 /* living.c */
134 extern void set_attr_value(living *stats, int attr, int8_t value);
135 extern void change_attr_value(living *stats, int attr, int8_t value);
136 extern int8_t get_attr_value(const living *stats, int attr);
137 extern void check_stat_bounds(living *stats, int8_t min_stat, int8_t max_stat);
138 extern int change_abil(object *op, object *tmp);
139 extern void drain_stat(object *op);
140 extern void drain_specific_stat(object *op, int deplete_stats);
141 extern int remove_depletion(object *op, int level);
142 extern void change_luck(object *op, int value);
143 extern void remove_statbonus(object *op);
144 extern void add_statbonus(object *op);
145 extern void fix_object(object *op);
146 extern int allowed_class(const object *op);
147 extern void set_dragon_name(object *pl, const object *abil, const object *skin);
148 extern object *give_skill_by_name(object *op, const char *skill_name);
149 extern void player_lvl_adj(object *who, object *op);
150 extern int64_t level_exp(int level, double expmul);
151 extern void calc_perm_exp(object *op);
152 extern int64_t check_exp_loss(const object *op, int64_t exp);
153 extern int64_t check_exp_adjust(const object *op, int64_t exp);
154 extern void change_exp(object *op, int64_t exp, const char *skill_name, int flag);
155 extern void apply_death_exp_penalty(object *op);
156 extern int did_make_save(const object *op, int level, int bonus);
157 extern void share_exp(object *op, int64_t exp, const char *skill, int flag);
158 extern int get_cha_bonus(int stat);
159 extern int get_dex_bonus(int stat);
160 extern int get_thaco_bonus(int stat);
161 extern uint32_t get_weight_limit(int stat);
162 extern int get_learn_spell(int stat);
163 extern int get_cleric_chance(int stat);
164 extern int get_turn_bonus(int stat);
165 extern int get_dam_bonus(int stat);
166 extern float get_speed_bonus(int stat);
167 extern int get_fear_bonus(int stat);
168 extern void init_stats(int reload);
169 /* logger.c */
170 extern void LOG(LogLevel logLevel, const char *format, ...);
171 /* los.c */
172 extern void init_block(void);
173 extern void clear_los(object *op);
174 extern int has_carried_lights(const object *op);
175 extern void update_los(object *op);
176 extern void update_all_map_los(mapstruct *map);
177 extern void update_all_los(const mapstruct *map, int x, int y);
178 extern void print_los(object *op);
179 extern void make_sure_seen(const object *op);
180 extern void make_sure_not_seen(const object *op);
181 /* map.c */
182 extern mapstruct *has_been_loaded(const char *name);
183 extern char *create_pathname(const char *name, char *buf, size_t size);
184 extern void create_overlay_pathname(const char *name, char *buf, size_t size);
185 extern void create_template_pathname(const char *name, char *buf, size_t size);
186 extern int check_path(const char *name, int prepend_dir);
187 extern void dump_map(const mapstruct *m);
188 extern void dump_all_maps(void);
189 extern int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny);
190 extern int blocked_link(object *ob, mapstruct *m, int sx, int sy);
191 extern int ob_blocked(const object *ob, mapstruct *m, int16_t x, int16_t y);
192 extern void fix_container(object *container);
193 extern mapstruct *get_linked_map(void);
194 extern mapstruct *get_empty_map(int sizex, int sizey);
195 extern mapstruct *mapfile_load(const char *map, int flags);
196 extern int save_map(mapstruct *m, int flag);
197 extern void clean_object(object *op);
198 extern void free_map(mapstruct *m);
199 extern void delete_map(mapstruct *m);
200 extern mapstruct *ready_map_name(const char *name, int flags);
201 extern int calculate_difficulty(mapstruct *m);
202 extern void clean_tmp_map(mapstruct *m);
203 extern void free_all_maps(void);
204 extern int change_map_light(mapstruct *m, int change);
205 extern void update_position(mapstruct *m, int x, int y);
206 extern void set_map_reset_time(mapstruct *map);
207 extern int out_of_map(mapstruct *m, int x, int y);
209 extern int get_rangevector(object *op1, const object *op2, rv_vector *retval, int flags);
210 extern int get_rangevector_from_mapcoord(const mapstruct *m, int x, int y, const object *op2, rv_vector *retval, int flags);
211 extern int on_same_map(const object *op1, const object *op2);
212 extern object *map_find_by_flag(mapstruct *map, int x, int y, int flag);
213 extern void map_remove_unique_files(const mapstruct *map);
214 extern const char *map_get_path(const object *item);
215 /* ob_methods.c */
216 extern method_ret ob_apply(object *op, object *applier, int aflags);
217 extern method_ret ob_process(object *op);
218 extern char *ob_describe(const object *op, const object *observer, char *buf, size_t size);
219 extern method_ret ob_move_on(object *op, object *victim, object *originator);
220 extern method_ret ob_trigger(object *op, object *cause, int state);
221 /* ob_types.c */
222 extern void init_ob_method_struct(ob_methods *methods, ob_methods *fallback);
223 extern void init_ob_types(ob_methods *base_type);
224 extern void register_apply(int ob_type, apply_func method);
225 extern void register_process(int ob_type, process_func method);
226 extern void register_describe(int ob_type, describe_func method);
227 extern void register_move_on(int ob_type, move_on_func method);
228 extern void register_trigger(int ob_type, trigger_func method);
229 /* object.c */
230 extern int object_can_merge(object *ob1, object *ob2);
231 extern signed long object_sum_weight(object *op);
232 extern object *object_get_env_recursive(object *op);
233 extern object *object_get_player_container(object *op);
234 extern void object_dump(const object *op, StringBuffer *sb);
235 extern void object_dump_all(void);
236 extern object *object_find_by_tag_global(tag_t i);
237 extern object *object_find_by_name_global(const char *str);
238 extern void object_free_all_data(void);
239 extern object *object_get_owner(object *op);
240 extern void object_clear_owner(object *op);
241 extern void object_set_owner(object *op, object *owner);
242 extern void object_copy_owner(object *op, object *clone);
243 extern void object_set_enemy(object *op, object *enemy);
244 extern void object_reset(object *op);
245 extern void object_free_key_values(object *op);
246 extern void object_clear(object *op);
247 extern void object_copy(const object *src_ob, object *dest_ob);
248 extern void object_copy_with_inv(const object *src_ob, object *dest_ob);
249 extern object *object_new(void);
250 extern void object_update_turn_face(object *op);
251 extern void object_update_speed(object *op);
252 extern void object_remove_from_active_list(object *op);
253 extern void object_update(object *op, int action);
254 extern void object_free_drop_inventory(object *ob);
255 extern void object_free2(object *ob, int flags);
256 extern int object_count_free(void);
257 extern int object_count_used(void);
258 extern int object_count_active(void);
259 extern void object_sub_weight(object *op, signed long weight);
260 extern void object_remove(object *op);
261 extern object *object_merge(object *op, object *top);
262 extern object *object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y);
263 extern void object_merge_spell(object *op, int16_t x, int16_t y);
264 extern object *object_insert_in_map(object *op, mapstruct *m, object *originator, int flag);
265 extern void object_replace_insert_in_map(const char *arch_string, object *op);
266 extern object *object_split(object *orig_ob, uint32_t nr, char *err, size_t size);
267 extern object *object_decrease_nrof(object *op, uint32_t i);
268 extern void object_add_weight(object *op, signed long weight);
269 extern object *object_insert_in_ob(object *op, object *where);
270 extern int object_check_move_on(object *op, object *originator);
271 extern object *map_find_by_archetype(mapstruct *m, int x, int y, const archetype *at);
272 extern object *map_find_by_type(mapstruct *m, int x, int y, uint8_t type);
273 extern object *object_present_in_ob(uint8_t type, const object *op);
274 extern object *object_present_in_ob_by_name(int type, const char *str, const object *op);
275 extern object *arch_present_in_ob(const archetype *at, const object *op);
276 extern void object_set_flag_inv(object *op, int flag);
277 extern void object_unset_flag_inv(object *op, int flag);
278 extern void object_set_cheat(object *op);
279 extern int object_find_multi_free_spot_around(const object *ob, const object *gen, int *hx, int *hy);
280 extern int object_find_multi_free_spot_within_radius(const object *ob, const object *gen, int *hx, int *hy);
281 extern int object_find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop);
282 extern int object_find_first_free_spot(const object *ob, mapstruct *m, int x, int y);
283 extern void get_search_arr(int *search_arr);
284 extern int map_find_dir(mapstruct *m, int x, int y, object *exclude);
285 extern int object_distance(const object *ob1, const object *ob2);
286 extern int find_dir_2(int x, int y);
287 extern int absdir(int d);
288 extern int dirdiff(int dir1, int dir2);
289 extern int can_see_monsterP(mapstruct *m, int x, int y, int dir);
290 extern int object_can_pick(const object *who, const object *item);
291 extern object *object_create_clone(object *asrc);
292 extern object *object_find_by_name(const object *who, const char *name);
293 extern object *object_find_by_type(const object *who, int type);
294 extern object *object_find_by_type2(const object *who, int type1, int type2);
295 extern object *object_find_by_tag(const object *who, tag_t tag);
296 extern object *object_find_by_type_applied(const object *who, int type);
297 extern object *object_find_by_type_and_name(const object *who, int type, const char *name);
298 extern object *object_find_by_type_and_race(const object *who, int type, const char *race);
299 extern object *object_find_by_type_and_slaying(const object *who, int type, const char *slaying);
300 extern object *object_find_by_type_and_skill(const object *who, int type, const char *skill);
301 extern object *object_find_by_flag(const object *who, int flag);
302 extern object *object_find_by_flag_applied(const object *who, int flag);
303 extern object *object_find_by_arch_name(const object *who, const char *name);
304 extern object *object_find_by_type_and_arch_name(const object *who, int type, const char *name);
305 extern object *object_find_by_type_subtype(const object *who, int type, int subtype);
306 extern key_value *object_get_key_value(const object *ob, const char *key);
307 extern const char *object_get_value(const object *op, const char *const key);
308 extern int object_set_value(object *op, const char *key, const char *value, int add_key);
309 extern int object_matches_string(object *pl, object *op, const char *name);
310 extern void object_fix_multipart(object *tmp);
311 extern void object_get_multi_size(const object *ob, int *sx, int *sy, int *hx, int *hy);
312 extern void object_insert_to_free_spot_or_free(object *op, mapstruct *map, int x, int y, int start, int stop, object *originator);
313 extern void object_set_msg(object *op, const char *msg);
314 extern void get_ob_diff(StringBuffer *sb, const object *op, const object *op2);
315 extern int save_object(FILE *fp, object *op, int flag);
316 /* path.c */
317 extern char *path_combine(const char *src, const char *dst, char *path, size_t size);
318 extern void path_normalize(char *path);
319 extern char *path_combine_and_normalize(const char *src, const char *dst, char *path, size_t size);
320 /* porting.c */
321 extern FILE *tempnam_secure(const char *dir, const char *pfx, char **filename);
322 extern void remove_directory(const char *path);
323 extern int isqrt(int n);
324 extern void make_path_to_file(const char *filename);
325 /* player.c */
326 extern void clear_player(player *pl);
327 extern void free_player(player *pl);
328 extern int atnr_is_dragon_enabled(int attacknr);
329 extern int is_dragon_pl(const object *op);
330 extern client_spell *get_client_spell_state(player *pl, object *spell);
331 extern int is_wraith_pl(object *op);
332 extern int is_old_wraith_pl(object *op);
333 extern void player_set_dragon_title(struct pl *pl, int level, const char *attack, int skin_resist);
334 extern void player_get_title(const struct pl *pl, char *buf, size_t bufsize);
335 extern int player_has_own_title(const struct pl *pl);
336 extern const char *player_get_own_title(const struct pl *pl);
337 extern void player_set_own_title(struct pl *pl, const char *title);
338 /* re-cmp.c */
339 extern const char *re_cmp(const char *str, const char *regexp);
340 /* readable.c */
341 extern int nstrtok(const char *buf1, const char *buf2);
342 extern char *strtoktolin(const char *buf1, const char *buf2, char *retbuf, size_t size);
343 extern int book_overflow(const char *buf1, const char *buf2, size_t booksize);
344 extern void init_readable(void);
345 extern object *get_random_mon(int level);
346 extern void tailor_readable_ob(object *book, int msg_type);
347 extern void free_all_readable(void);
348 extern void write_book_archive(void);
349 extern const readable_message_type *get_readable_message_type(object *readable);
350 extern const GeneralMessage *get_message_from_identifier(const char *identifier);
351 extern sstring get_message_title(const GeneralMessage *message);
352 extern sstring get_message_body(const GeneralMessage *message);
353 extern unsigned int get_message_face(const GeneralMessage *message);
354 /* recipe.c */
355 extern recipelist *get_formulalist(int i);
356 extern void init_formulae(void);
357 extern void dump_alchemy(void);
358 extern archetype *find_treasure_by_name(const treasure *t, const char *name, int depth);
359 extern void dump_alchemy_costs(void);
360 extern int strtoint(const char *buf);
361 extern const artifact *locate_recipe_artifact(const recipe *rp, size_t idx);
362 extern recipe *get_random_recipe(recipelist *rpl);
363 extern void free_all_recipes(void);
364 extern recipe *find_recipe_for_tool(const char *tool, recipe *from);
365 /* region.c */
366 extern region *get_region_by_name(const char *region_name);
368 extern const char *get_name_of_region_for_map(const mapstruct *m);
369 extern region *get_region_from_string(const char *name);
370 extern int region_is_child_of_region(const region *child, const region *r);
371 extern const char *get_region_longname(const region *r);
372 extern const char *get_region_msg(const region *r);
373 extern object *get_jail_exit(object *op);
374 extern int init_regions(void);
375 extern region *get_region_struct(void);
376 /* shstr.c */
377 extern void init_hash_table(void);
378 extern sstring add_string(const char *str);
379 extern sstring add_refcount(sstring str);
380 extern int query_refcount(sstring str);
381 extern sstring find_string(const char *str);
382 extern void free_string(sstring str);
383 extern void ss_dump_statistics(char *buf, size_t size);
384 extern char *ss_dump_table(int what, char *buf, size_t size);
385 extern int buf_overflow(const char *buf1, const char *buf2, size_t bufsize);
386 /* stringbuffer.c */
387 extern StringBuffer *stringbuffer_new(void);
388 extern void stringbuffer_delete(StringBuffer *sb);
389 extern char *stringbuffer_finish(StringBuffer *sb);
391 extern void stringbuffer_append_string(StringBuffer *sb, const char *str);
392 extern void stringbuffer_append_printf(StringBuffer *sb, const char *format, ...);
393 extern void stringbuffer_append_stringbuffer(StringBuffer *sb, const StringBuffer *sb2);
394 extern size_t stringbuffer_length(StringBuffer *sb);
395 /* time.c */
396 extern const char *get_periodofday(const int index);
397 extern const char *get_month_name(const int index);
398 extern const char *get_weekday(const int index);
399 extern const char *get_season_name(const int index);
400 extern void reset_sleep(void);
401 extern long usec_elapsed(struct timespec first, struct timespec second);
402 extern void sleep_delta(void);
403 extern void set_max_time(long t);
404 extern void get_tod(timeofday_t *tod);
405 extern void time_info(object *op);
406 extern long seconds(void);
407 extern const char *time_format_time(const timeofday_t *tod, char *buf, size_t bufsize);
408 /* treasure.c */
409 extern void init_archetype_pointers(void);
410 extern void load_treasures(void);
411 extern treasurelist *find_treasurelist(const char *name);
412 extern void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries);
413 extern object *generate_treasure(treasurelist *t, int difficulty);
414 extern void set_abs_magic(object *op, int magic);
415 extern void fix_generated_item(object *op, object *creator, int difficulty, int max_magic, int flags);
416 extern void dump_monster_treasure(const char *name);
417 extern void free_all_treasures(void);
418 extern objectlink *treasurelist_find_matching_type(const treasurelist *randomitems, int type, int traverse);
419 /* utils.c */
420 extern int random_roll(int min, int max, const object *op, int goodbad);
421 extern int64_t random_roll64(int64_t min, int64_t max, const object *op, int goodbad);
422 extern int die_roll(int num, int size, const object *op, int goodbad);
423 extern int rndm(int min, int max);
424 extern void decay_objects(mapstruct *m);
425 extern materialtype_t *name_to_material(const char *name);
426 extern void transmute_materialname(object *op, const object *change);
427 extern void set_materialname(object *op);
428 extern const char *strrstr(const char *haystack, const char *needle);
429 extern void strip_endline(char *buf);
430 extern void replace(const char *src, const char *key, const char *replacement, char *result, size_t resultsize);
431 extern void make_list_like(char *input);
432 extern int get_random_dir(void);
433 extern int get_randomized_dir(int dir);
434 extern int adjust_dir(int dir, int destination_dir);
435 extern void replace_unprintable_chars(char *buf);
436 extern size_t split_string(char *str, char *array[], size_t array_size, char sep);
437 extern StringBuffer *describe_spellpath_attenuation(const char *attenuation, int value, StringBuffer *buf);
438 extern StringBuffer *describe_attacktype(const char *attack, int value, StringBuffer *buf);
439 /* loader.c */
440 extern int lex_load(int *depth, object **items, int maxdepth, int map_flags, int linemode);
441 extern void yyrestart(FILE *input_file);
442 extern void yypop_buffer_state(void);
443 extern int yyget_lineno(void);
444 extern FILE *yyget_in(void);
445 extern FILE *yyget_out(void);
446 extern char *yyget_text(void);
447 extern void yyset_lineno(int line_number);
448 extern void yyset_in(FILE *in_str);
449 extern void yyset_out(FILE *out_str);
450 extern int yyget_debug(void);
451 extern void yyset_debug(int bdebug);
452 extern int yylex_destroy(void);
453 extern void yyfree(void *ptr);
454 extern int load_object(FILE *fp, object *op, int bufstate, int map_flags);
455 extern int set_variable(object *op, const char *buf);
456 extern void free_loader(void);
void init_objects(void)
Sets up and initialises the linked list of free and used objects.
Definition: init.c:366
int init_regions(void)
Initialises regions from the regions file.
Definition: region.c:292
void object_set_owner(object *op, object *owner)
Sets the owner and sets the skill and exp pointers to owner's current skill and experience objects...
Definition: object.c:601
void object_reset(object *op)
Sets to 0 vital variables in an object.
Definition: object.c:704
int object_count_free(void)
Objects statistics.
Definition: object.c:1560
object * create_archetype_by_object_name(const char *name)
Creates an object given the name that appears during the game (for example, "writing pen" instead of ...
Definition: arch.c:160
int yyget_debug(void)
void dump_map(const mapstruct *m)
Prints out debug-information about a map.
Definition: map.c:247
const char * player_get_own_title(const struct pl *pl)
Returns the player's own title.
Definition: player.c:252
void free_all_recipes(void)
Frees all memory allocated to recipes and recipes lists.
Definition: recipe.c:745
const object * pntr_to_god_obj(godlink *godlnk)
Returns a pointer to the object We need to be VERY careful about using this, as we are returning a po...
Definition: holy.c:123
mapstruct * ready_map_name(const char *name, int flags)
Makes sure the given map is loaded and swapped in.
Definition: map.c:1803
object * object_find_by_tag_global(tag_t i)
Returns the object which has the count-variable equal to the argument.
Definition: object.c:476
archetype * find_archetype_by_object_name(const char *name)
This function retrieves an archetype given the name that appears during the game (for example...
Definition: arch.c:57
One player.
Definition: player.h:92
char * yyget_text(void)
char * path_combine_and_normalize(const char *src, const char *dst, char *path, size_t size)
Combines the 2 paths.
Definition: path.c:172
int is_type_valid(uint8_t type)
Checks if the specified type is a valid one for a Crossfire object.
Definition: arch.c:763
oblinkpt * get_objectlinkpt(void)
Allocates a new oblinkpt structure, initialises it, and returns a pointer to it.
Definition: links.c:53
int check_altar_sacrifice(const object *altar, const object *sacrifice, int remove_others, int *toremove)
Checks whether the altar has enough to sacrifice.
Definition: button.c:352
void verify_button_links(const mapstruct *map)
This does a minimal check of the button link consistency for object map.
Definition: button.c:851
List of recipes with a certain number of ingredients.
Definition: recipe.h:37
int need_identify(const object *op)
This function really should not exist - by default, any item not identified should need it...
Definition: item.c:1331
int on_same_map(const object *op1, const object *op2)
Checks whether 2 objects are on the same map or not.
Definition: map.c:2627
void make_sure_not_seen(const object *op)
The object which is supposed to be visible through walls has just been removed from the map...
Definition: los.c:655
void free_all_archs(void)
Frees all memory allocated to archetypes.
Definition: arch.c:287
int object_matches_string(object *pl, object *op, const char *name)
This is a subset of the parse_id command.
Definition: object.c:4453
This is used by get_rangevector to determine where the other creature is.
Definition: map.h:380
void(* describe_func)(const ob_methods *, const object *, const object *, char *buf, size_t size)
Definition: ob_methods.h:41
treasureliststruct represents one logical group of items to be generated together.
Definition: treasure.h:82
void init_hash_table(void)
Initialises the hash-table used by the shared string library.
Definition: shstr.c:55
void free_map(mapstruct *m)
Frees everything allocated by the given mapstructure.
Definition: map.c:1694
void object_merge_spell(object *op, int16_t x, int16_t y)
This sees if there are any objects on the space that can merge with op.
Definition: object.c:1953
Used to link together several objects.
Definition: object.h:442
int i18n_find_language_by_code(const char *code)
Attenmpt to find the identifier of a language from its code.
Definition: languages.c:95
void object_copy_owner(object *op, object *clone)
Set the owner to clone's current owner and set the skill and experience objects to clone's objects (t...
Definition: object.c:657
void free_arch(archetype *at)
Frees archetype.
Definition: arch.c:263
void add_abilities(object *op, const object *change)
Used in artifact generation.
Definition: artifact.c:284
sstring stringbuffer_finish_shared(StringBuffer *sb)
Definition: stringbuffer.c:85
const char * get_month_name(const int index)
give access to month names
Definition: time.c:109
FILE * yyget_in(void)
object * map_find_by_archetype(mapstruct *m, int x, int y, const archetype *at)
Searches for any objects with a matching archetype at the given map and coordinates.
Definition: object.c:2944
int player_has_own_title(const struct pl *pl)
Returns whether the player has a custom title.
Definition: player.c:239
void replace_unprintable_chars(char *buf)
Replaces any unprintable character in the given buffer with a space.
Definition: utils.c:473
StringBuffer * describe_resistance(const object *op, int newline, int use_media_tags, StringBuffer *buf)
Generates the visible naming for resistances.
Definition: item.c:383
void init_formulae(void)
Builds up the lists of formula from the file in the libdir.
Definition: recipe.c:161
object * object_find_by_type_and_skill(const object *who, int type, const char *skill)
Find object in inventory by type and skill.
Definition: object.c:4074
Typedefs for ob_methods.
Definition: ob_methods.h:45
void sleep_delta(void)
Sleep until the next tick.
Definition: time.c:180
int adjust_dir(int dir, int destination_dir)
Adjusts a given direction by +/-1 towards a destination direction.
Definition: utils.c:452
void register_apply(int ob_type, apply_func method)
Registers the apply method for the given type.
Definition: ob_types.c:62
void clear_los(object *op)
Clears/initialises the los-array associated to the player controlling the object. ...
Definition: los.c:248
void ss_dump_statistics(char *buf, size_t size)
A call to this function will cause the statistics to be dumped into specified buffer.
Definition: shstr.c:323
unsigned char uint8_t
Definition: win32.h:161
int is_old_wraith_pl(object *op)
Checks if player is a wraith without the 'wraith feed' skill.
Definition: player.c:177
objectlink * get_objectlink(void)
Allocates a new objectlink structure, initialises it, and returns a pointer to it.
Definition: links.c:33
void dump_abilities(void)
Dump to standard out the abilities of all monsters.
Definition: info.c:63
void decay_objects(mapstruct *m)
Decay and destroy persihable items in a map.
Definition: utils.c:174
void print_los(object *op)
Debug-routine which dumps the array which specifies the visible area of a player. ...
Definition: los.c:602
int get_dex_bonus(int stat)
Definition: living.c:2247
void check_generators(void)
Check all generators have the other_arch set or something in inventory.
Definition: arch.c:467
int random_roll(int min, int max, const object *op, int goodbad)
Roll a random number between min and max.
Definition: utils.c:42
void update_all_map_los(mapstruct *map)
update all_map_los is like update_all_los() below, but updates everyone on the map, no matter where they are.
Definition: los.c:504
void dump_experience(void)
Dump the experience table, then calls exit() - useful in terms of debugging to make sure the format o...
Definition: exp.c:249
void dump_all_archetypes(void)
Dumps all archetypes to debug-level output.
Definition: arch.c:242
Information on one title.
Definition: readable.c:106
object * object_find_by_type_subtype(const object *who, int type, int subtype)
Find object in inventory.
Definition: object.c:4195
int describe_god(const object *god, int what, StringBuffer *buf, size_t maxlen)
Describe a god.
Definition: holy.c:137
int change_abil(object *op, object *tmp)
Permanently alters an object's stats/flags based on another object.
Definition: living.c:394
void object_insert_to_free_spot_or_free(object *op, mapstruct *map, int x, int y, int start, int stop, object *originator)
Inserts an object into its map.
Definition: object.c:4675
region * get_region_by_map(mapstruct *m)
Gets a region from a map.
Definition: region.c:74
void object_replace_insert_in_map(const char *arch_string, object *op)
This function inserts an object of a specified archetype in the map, but if it finds objects of its o...
Definition: object.c:2425
void clean_friendly_list(void)
It traverses the friendly list removing objects that should not be here (ie, do not have friendly fla...
Definition: friend.c:111
void free_socket_images(void)
Frees all faceset information.
Definition: image.c:572
int can_see_monsterP(mapstruct *m, int x, int y, int dir)
Recursive routine to see if we can find a path to a certain point.
Definition: object.c:3745
object * create_singularity(const char *name)
Creates a dummy object.
Definition: arch.c:598
treasurelist * find_treasurelist(const char *name)
Searches for the given treasurelist in the globally linked list of treasurelists which has been built...
Definition: treasure.c:292
void object_dump(const object *op, StringBuffer *sb)
Dumps an object.
Definition: object.c:394
void object_dump_all(void)
Dumps all objects to console.
Definition: object.c:450
void change_luck(object *op, int value)
Alter the object's luck.
Definition: living.c:791
void object_copy_with_inv(const object *src_ob, object *dest_ob)
copy an object with an inventory...
Definition: object.c:975
int get_power_from_ench(int ench)
Definition: item.c:228
void map_remove_unique_files(const mapstruct *map)
Remove files containing the map's unique items.
Definition: map.c:2667
void init_gods(void)
This takes a look at all of the archetypes to find the objects which correspond to the GODS (type GOD...
Definition: holy.c:53
void stringbuffer_append_stringbuffer(StringBuffer *sb, const StringBuffer *sb2)
Definition: stringbuffer.c:131
archetype * find_archetype(const char *name)
Finds, using the hashtable, which archetype matches the given name.
Definition: arch.c:695
void delete_map(mapstruct *m)
Frees the map, including the mapstruct.
Definition: map.c:1741
void yypop_buffer_state(void)
int get_thaco_bonus(int stat)
Definition: living.c:2251
void init_archetype_pointers(void)
Initialize global archtype pointers:
Definition: treasure.c:64
int object_find_multi_free_spot_around(const object *ob, const object *gen, int *hx, int *hy)
Sets hx and hy to the coords to insert a possibly multi-tile ob at, around gen.
Definition: object.c:3147
void apply_anim_suffix(object *who, sstring suffix)
Applies a compound animation to an object.
Definition: anim.c:292
void yyfree(void *ptr)
void yyset_out(FILE *out_str)
void update_button(object *op)
Updates everything connected with the button op.
Definition: button.c:167
void use_trigger(object *op)
Toggles the state of specified button.
Definition: button.c:259
archetype * find_archetype_by_object_type_name(int type, const char *name)
This function retrieves an archetype by type and name that appears during the game.
Definition: arch.c:83
int try_find_animation(const char *name)
Tries to find the animation id that matches name, don't LOG() an error if not found.
Definition: anim.c:159
int object_set_value(object *op, const char *key, const char *value, int add_key)
Updates the key in op to value.
Definition: object.c:4375
int8_t get_attr_value(const living *stats, int attr)
Gets the value of a stat.
Definition: living.c:313
Used to link together the gods.
Definition: god.h:12
int yylex_destroy(void)
int operate_altar(object *altar, object **sacrifice)
Checks if sacrifice was accepted and removes sacrificed objects.
Definition: button.c:468
object * give_skill_by_name(object *op, const char *skill_name)
Given the skill name skill_name, we find the skill archetype/object, set appropriate values...
Definition: living.c:1727
void object_set_msg(object *op, const char *msg)
Set the message field of an object.
Definition: object.c:4695
object * object_insert_in_ob(object *op, object *where)
This function inserts the object op in the linked list inside the object environment.
Definition: object.c:2690
void query_short_name(const object *op, char *buf, size_t size)
query_short_name(object) is similar to query_name(), but doesn't contain any information about object...
Definition: item.c:547
void dump_gods(void)
Prints all gods to stderr.
Definition: holy.c:386
size_t split_string(char *str, char *array[], size_t array_size, char sep)
Splits a string delimited by passed in sep value into characters into an array of strings...
Definition: utils.c:499
int die_roll(int num, int size, const object *op, int goodbad)
Roll a number of dice (2d3, 4d6).
Definition: utils.c:121
region * get_region_by_name(const char *region_name)
Gets a region by name.
Definition: region.c:46
treasure is one element in a linked list, which together consist of a complete treasure-list.
Definition: treasure.h:63
region * get_region_from_string(const char *name)
Tries to find a region that 'name' corresponds to.
Definition: region.c:121
This stores, for a spell a player knows, the last sp/gr/dam information sent to client.
Definition: player.h:74
object * object_find_by_type_and_arch_name(const object *who, int type, const char *name)
Find object in inventory by type and archetype name.
Definition: object.c:4168
Various statistics of objects.
Definition: living.h:34
void dump_alchemy_costs(void)
Dumps to output all costs of recipes.
Definition: recipe.c:519
void dump_friendly_objects(void)
Dumps all friendly objects.
Definition: friend.c:100
void object_update_turn_face(object *op)
If an object with the IS_TURNABLE() flag needs to be turned due to the closest player being on the ot...
Definition: object.c:1109
const typedata * get_typedata(int itemtype)
Definition: item.c:334
int object_find_multi_free_spot_within_radius(const object *ob, const object *gen, int *hx, int *hy)
Sets hx and hy to the coords to insert a possibly multi-tile ob at, within radius of generator...
Definition: object.c:3266
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
Definition: stringbuffer.c:104
int object_can_pick(const object *who, const object *item)
Finds out if an object can be picked up.
Definition: object.c:3793
region * get_region_struct(void)
Allocates and zeros a region struct, this isn't free()'d anywhere, so might be a memory leak...
Definition: region.c:325
int get_fear_bonus(int stat)
Definition: living.c:2279
void init_experience(void)
This loads the experience table from the exp_table file.
Definition: exp.c:167
Link an object type with skill needed to identify, and general name.
Definition: define.h:89
object * object_merge(object *op, object *top)
This function goes through all objects below and including top, and merges op to the first matching o...
Definition: object.c:1869
void generate_artifact(object *op, int difficulty)
Decides randomly which artifact the object should be turned into.
Definition: artifact.c:155
const char * strrstr(const char *haystack, const char *needle)
Finds a string in a string.
Definition: utils.c:324
int object_find_free_spot(const object *ob, mapstruct *m, int x, int y, int start, int stop)
object_find_free_spot(object, map, x, y, start, stop) will search for a spot at the given map and coo...
Definition: object.c:3415
The archetype structure is a set of rules on how to generate and manipulate objects which point to ar...
Definition: object.h:465
void free_objectlinkpt(oblinkpt *obp)
Recursively frees all linked list of objectlink pointers.
Definition: links.c:83
void fatal(enum fatal_error err)
fatal() is meant to be called whenever a fatal signal is intercepted.
Definition: utils.c:596
signed long object_sum_weight(object *op)
object_sum_weight() is a recursive function which calculates the weight an object is carrying...
Definition: object.c:311
int get_dialog_message(object *op, const char *text, struct_dialog_message **message, struct_dialog_reply **reply)
Tries to find a message matching the said text.
Definition: dialog.c:209
void write_todclock(void)
Write out the current time to the file so time does not reset every time the server reboots...
Definition: init.c:446
int yyget_lineno(void)
mapstruct * mapfile_load(const char *map, int flags)
Opens the file "filename" and reads information about the map from the given file, and stores it in a newly allocated mapstruct.
Definition: map.c:1235
int get_cha_bonus(int stat)
Definition: living.c:2243
int64_t check_exp_loss(const object *op, int64_t exp)
This function checks to make sure that object 'op' can lose 'exp' experience.
Definition: living.c:1974
int find_dir_2(int x, int y)
Computes a direction which you should travel to move of x and y.
Definition: object.c:3600
Used to link together several object links.
Definition: object.h:451
void query_base_name(const object *op, int plural, char *buf, size_t size)
Query a short name for the item.
Definition: item.c:722
object * object_find_by_type_and_slaying(const object *who, int type, const char *slaying)
Find object in inventory by type and slaying.
Definition: object.c:4049
void yyset_in(FILE *in_str)
int get_face_fallback(int faceset, int imageno)
This returns the set we will actually use when sending a face.
Definition: image.c:602
int get_cleric_chance(int stat)
Definition: living.c:2263
void path_normalize(char *path)
Cleans specified path.
Definition: path.c:85
One reply a NPC can expect.
Definition: dialog.h:18
char * strtoktolin(const char *buf1, const char *buf2, char *retbuf, size_t size)
Takes a string in buf1 and separates it into a list of strings delimited by buf2. ...
Definition: readable.c:680
void object_remove_from_active_list(object *op)
This function removes object 'op' from the list of active objects.
Definition: object.c:1194
void create_treasure(treasurelist *t, object *op, int flag, int difficulty, int tries)
This calls the appropriate treasure creation function.
Definition: treasure.c:490
int check_trigger(object *op, object *cause)
Definition: button.c:523
char method_ret
Define some standard return values for callbacks which don't need to return any other results...
Definition: ob_methods.h:14
void init_readable(void)
Initialize linked lists utilized by message functions in tailor_readable_ob()
Definition: readable.c:1005
void object_fix_multipart(object *tmp)
Ensures specified object has its more parts correctly inserted in map.
Definition: object.c:4564
object * map_find_by_type(mapstruct *m, int x, int y, uint8_t type)
Searches for any objects with a matching type variable at the given map and coordinates.
Definition: object.c:2974
void push_button(object *op)
Push the specified object.
Definition: button.c:154
const char * destination_dir
Root destination dir.
void free_string(sstring str)
This will reduce the refcount, and if it has reached 0, str will be freed.
Definition: shstr.c:280
int set_variable(object *op, const char *buf)
int object_can_merge(object *ob1, object *ob2)
Examines the 2 objects given to it, and returns true if they can be merged together, including inventory.
Definition: object.c:171
FILE * yyget_out(void)
int absdir(int d)
Computes an absolute direction.
Definition: object.c:3637
void free_loader(void)
object * map_find_by_flag(mapstruct *map, int x, int y, int flag)
Finds an object in a map tile by flag number.
Definition: map.c:2650
StringBuffer * describe_spellpath_attenuation(const char *attenuation, int value, StringBuffer *buf)
Describe the specified path attenuation.
Definition: utils.c:533
sstring get_message_body(const GeneralMessage *message)
Get a message's body.
Definition: readable.c:2235
void init_block(void)
initialises the array used by the LOS routines.
Definition: los.c:88
void query_name(const object *op, char *buf, size_t size)
Describes an item.
Definition: item.c:625
void object_clear_owner(object *op)
Clears the owner of specified object.
Definition: object.c:581
void object_unset_flag_inv(object *op, int flag)
Desactivate recursively a flag on an object inventory.
Definition: object.c:3101
void object_add_weight(object *op, signed long weight)
object_add_weight(object, weight) adds the specified weight to an object, and also updates how much t...
Definition: object.c:2663
void i18n_free(void)
Clears all i18n-related data.
Definition: languages.c:252
int atnr_is_dragon_enabled(int attacknr)
Determine if the attacktype represented by the specified attack-number is enabled for dragon players...
Definition: player.c:95
object * arch_present_in_ob(const archetype *at, const object *op)
Searches for any objects with a matching archetype in the inventory of the given object.
Definition: object.c:3061
void free_dialog_information(object *op)
Frees obj::dialog_information.
Definition: dialog.c:32
archetype * get_archetype_struct(void)
Allocates, initialises and returns the pointer to an archetype structure.
Definition: arch.c:312
const char * get_periodofday(const int index)
give access to weekday names
Definition: time.c:102
void free_all_treasures(void)
Free all treasure-related memory.
Definition: treasure.c:1597
void create_template_pathname(const char *name, char *buf, size_t size)
same as create_pathname(), but for the template maps.
Definition: map.c:145
const char * get_weekday(const int index)
give access to weekday names
Definition: time.c:116
object * create_archetype(const char *name)
Finds which archetype matches the given name, and returns a new object containing a copy of the arche...
Definition: arch.c:620
void player_set_dragon_title(struct pl *pl, int level, const char *attack, int skin_resist)
Updates the title of a dragon player to reflect the current level, attack type, and resistances...
Definition: player.c:194
archetype * get_archetype_by_type_subtype(int type, int subtype)
Retrieves an archetype by type and subtype.
Definition: arch.c:136
int read_smooth(void)
Reads the smooth file to know how to smooth datas.
Definition: image.c:323
object * object_present_in_ob(uint8_t type, const object *op)
Searches for any objects with a matching type variable in the inventory of the given object...
Definition: object.c:3001
int get_rangevector(object *op1, const object *op2, rv_vector *retval, int flags)
From map.c This is used by get_player to determine where the other creature is.
Definition: map.c:2516
void object_clear(object *op)
Frees everything allocated by an object, and also clears all variables and flags to default settings...
Definition: object.c:759
signed short int16_t
Definition: win32.h:160
object * object_find_by_type_and_race(const object *who, int type, const char *race)
Find object in inventory by type and race.
Definition: object.c:4024
int get_rangevector_from_mapcoord(const mapstruct *m, int x, int y, const object *op2, rv_vector *retval, int flags)
This is basically the same as get_rangevector() above, but instead of the first parameter being an ob...
Definition: map.c:2589
void free_experience(void)
Frees experience-related memory.
Definition: exp.c:261
int save_map(mapstruct *m, int flag)
Saves a map to file.
Definition: map.c:1436
const char * object_get_value(const object *op, const char *const key)
Get an extra value by key.
Definition: object.c:4246
char * ob_describe(const object *op, const object *observer, char *buf, size_t size)
Returns the description of an object, as seen by the given observer.
Definition: ob_methods.c:85
void fix_generated_item(object *op, object *creator, int difficulty, int max_magic, int flags)
fix_generated_item(): This is called after an item is generated, in order to set it up right...
Definition: treasure.c:1110
void object_free_drop_inventory(object *ob)
Frees everything allocated by an object, removes it from the list of used objects, and puts it on the list of free objects.
Definition: object.c:1368
int object_find_first_free_spot(const object *ob, mapstruct *m, int x, int y)
object_find_first_free_spot(archetype, mapstruct, x, y) works like object_find_free_spot(), but it will search max number of squares.
Definition: object.c:3458
StringBuffer * describe_monster(const object *op, int use_media_tags, StringBuffer *buf)
Describes a monster.
Definition: item.c:806
This is a game region.
Definition: map.h:276
void remove_statbonus(object *op)
Subtracts stat-bonuses given by the class which the player has chosen.
Definition: living.c:840
void object_copy(const object *src_ob, object *dest_ob)
Copy object first frees everything allocated by the second object, and then copies the contents of th...
Definition: object.c:838
void object_update_speed(object *op)
Updates the speed of an object.
Definition: object.c:1129
void change_exp(object *op, int64_t exp, const char *skill_name, int flag)
Changes experience to a player/monster.
Definition: living.c:2076
client_spell * get_client_spell_state(player *pl, object *spell)
Gets the (client-side) spell state for specified spell.
Definition: player.c:136
uint32_t get_weight_limit(int stat)
Definition: living.c:2255
sstring add_string(const char *str)
This will add 'str' to the hash table.
Definition: shstr.c:124
const char * get_region_msg(const region *r)
Gets a message for a region.
Definition: region.c:238
object * object_find_by_tag(const object *who, tag_t tag)
Find object in inventory.
Definition: object.c:3951
void clean_object(object *op)
Remove and free all objects in the inventory of the given object.
Definition: map.c:1631
materialtype_t * name_to_material(const char *name)
Convert materialname to materialtype_t.
Definition: utils.c:247
void update_los(object *op)
Recalculates the array which specifies what is visible for the given player-object.
Definition: los.c:455
int query_refcount(sstring str)
This will return the refcount of the string str.
Definition: shstr.c:224
void tailor_readable_ob(object *book, int msg_type)
The main routine.
Definition: readable.c:2019
void read_bmap_names(void)
This reads the bmaps file to get all the bitmap names and stuff.
Definition: image.c:180
void transmute_materialname(object *op, const object *change)
When doing transmutation of objects, we have to recheck the resistances, as some that did not apply p...
Definition: utils.c:266
void free_globals(void)
Cleans all memory allocated for global variables.
Definition: init.c:326
int object_distance(const object *ob1, const object *ob2)
Return the square of the distance between the two given objects.
Definition: object.c:3584
void update_buttons(mapstruct *m)
Updates every button on the map (by calling update_button() for them).
Definition: button.c:232
void drain_stat(object *op)
Drains a random stat from op.
Definition: living.c:712
void yyrestart(FILE *input_file)
archetype * find_treasure_by_name(const treasure *t, const char *name, int depth)
Find a treasure with a matching name.
Definition: recipe.c:389
mapstruct * get_empty_map(int sizex, int sizey)
Creates and returns a map of the specific size.
Definition: map.c:874
int64_t new_exp(const object *ob)
Alternative way to calculate experience based on the ability of a monster.
Definition: exp.c:100
const readable_message_type * get_readable_message_type(object *readable)
Get the readable type for an object (hopefully book).
Definition: readable.c:2200
const char * get_region_longname(const region *r)
Gets the longname of a region.
Definition: region.c:217
object * object_find_by_type_and_name(const object *who, int type, const char *name)
Find object in inventory by type and name.
Definition: object.c:3999
void load_treasures(void)
Opens LIBDIR/treasure and reads all treasure-declarations from it.
Definition: treasure.c:221
void dump_animations(void)
Dump all animations to stderr, for debugging purposes.
Definition: anim.c:322
int object_count_active(void)
Objects statistics.
Definition: object.c:1598
void register_trigger(int ob_type, trigger_func method)
Registers the trigger method for the given type.
Definition: ob_types.c:98
int out_of_map(mapstruct *m, int x, int y)
this returns TRUE if the coordinates (x,y) are out of map m.
Definition: map.c:2294
int get_learn_spell(int stat)
Definition: living.c:2259
int has_ability(const object *ob)
Checks whether object has innate abilities (spell/spellbook in inventory).
Definition: exp.c:153
int is_friendly(const object *op)
Checks if the given object is already in the friendly list or not Lauwenmark - 31/07/05.
Definition: friend.c:144
void init_library(void)
It is vital that init_library() is called by any functions using this library.
Definition: init.c:201
One material type.
Definition: material.h:33
StringBuffer * stringbuffer_new(void)
Definition: stringbuffer.c:57
float get_speed_bonus(int stat)
Definition: living.c:2275
Struct to store the message_type and message_subtype for signs and books used by the player...
Definition: book.h:36
int check_path(const char *name, int prepend_dir)
This function checks if a file with the given path exists.
Definition: map.c:203
int get_map_flags(mapstruct *oldmap, mapstruct **newmap, int16_t x, int16_t y, int16_t *nx, int16_t *ny)
This rolls up wall, blocks_magic, blocks_view, etc, all into one function that just returns a P_...
Definition: map.c:302
Each object (this also means archetypes!) could have a few of these "dangling" from it; this could al...
Definition: object.h:40
void free_all_god(void)
Frees all god information.
Definition: holy.c:337
char * create_pathname(const char *name, char *buf, size_t size)
Get the full path to a map file.
Definition: map.c:104
void animate_turning(object *op)
Animates one step of object.
Definition: button.c:275
void object_free2(object *ob, int flags)
Frees everything allocated by an object, removes it from the list of used objects, and puts it on the list of free objects.
Definition: object.c:1391
int has_carried_lights(const object *op)
Checks if op has a light source.
Definition: los.c:311
void make_path_to_file(const char *filename)
Checks if any directories in the given path doesn't exist, and creates if necessary.
Definition: porting.c:312
void dump_artifacts(void)
For debugging purposes.
Definition: artifact.c:666
void add_friendly_object(object *op)
Add a new friendly object to the linked list of friendly objects.
Definition: friend.c:30
char * stringbuffer_finish(StringBuffer *sb)
Definition: stringbuffer.c:76
object * object_insert_in_map(object *op, mapstruct *m, object *originator, int flag)
This function inserts the object in the two-way linked list which represents what is on a map...
Definition: object.c:2152
object * object_present_in_ob_by_name(int type, const char *str, const object *op)
Searches for any objects with a matching type & name variable in the inventory of the given object...
Definition: object.c:3039
object * object_find_by_type_applied(const object *who, int type)
Find applied object in inventory.
Definition: object.c:3974
This represents all archetypes for one particular object type.
Definition: artifact.h:26
unsigned int get_message_face(const GeneralMessage *message)
Get a message's face.
Definition: readable.c:2244
const artifactlist * find_artifactlist(int type)
Searches the artifact lists and returns one that has the same type of objects on it.
Definition: artifact.c:630
object * object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
object_split(ob,nr) splits up ob into two parts.
Definition: object.c:2463
void init_stats(int reload)
This loads statistic bonus/penalties from the stat_bonus file.
Definition: living.c:2487
void object_update(object *op, int action)
object_update() updates the array which represents the map.
Definition: object.c:1239
uint32_t tag_t
Object tag, unique during the whole game.
Definition: object.h:12
void object_get_multi_size(const object *ob, int *sx, int *sy, int *hx, int *hy)
Computes the size of a multitile object.
Definition: object.c:4626
void init_artifacts(void)
Builds up the lists of artifacts from the file in the libdir.
Definition: artifact.c:513
object * arch_to_object(archetype *at)
Creates and returns a new object which is a copy of the given archetype.
Definition: arch.c:571
void stringbuffer_append_string(StringBuffer *sb, const char *str)
Definition: stringbuffer.c:95
void free_all_artifacts(void)
Free all artifact-related information.
Definition: artifact.c:140
void set_map_reset_time(mapstruct *map)
Updates the map's timeout.
Definition: map.c:2233
int nstrtok(const char *buf1, const char *buf2)
Simple routine to return the number of list items in buf1 as separated by the value of buf2...
Definition: readable.c:650
int allowed_class(const object *op)
Returns true if the given player is a legal class.
Definition: living.c:1602
method_ret ob_process(object *op)
Processes an object, giving it the opportunity to move or react.
Definition: ob_methods.c:62
mapstruct * has_been_loaded(const char *name)
Checks whether map has been loaded.
Definition: map.c:79
void yyset_lineno(int line_number)
object * object_find_by_type2(const object *who, int type1, int type2)
Find object in inventory.
Definition: object.c:3928
void yyset_debug(int bdebug)
int find_smooth(uint16_t face, uint16_t *smoothed)
Find the smooth face for a given face.
Definition: image.c:379
void init_ob_method_struct(ob_methods *methods, ob_methods *fallback)
Initializes a ob_methods struct.
Definition: ob_types.c:32
void read_client_images(void)
Loads all the image types into memory.
Definition: image.c:448
void set_attr_value(living *stats, int attr, int8_t value)
Sets Str/Dex/con/Wis/Cha/Int/Pow in stats to value, depending on what attr is (STR to POW)...
Definition: living.c:218
int calculate_difficulty(mapstruct *m)
This routine is supposed to find out the difficulty of the map.
Definition: map.c:1913
This is one artifact, ie one special item.
Definition: artifact.h:14
int dirdiff(int dir1, int dir2)
Computes a direction difference.
Definition: object.c:3655
void i18n_list_languages(object *who)
List all languages for who.
Definition: languages.c:132
int get_button_value(const object *button)
Returns the first value linked to this button.
Definition: button.c:754
LogLevel
Log levels for the LOG() function.
Definition: logger.h:10
const char * time_format_time(const timeofday_t *tod, char *buf, size_t bufsize)
Formats a timestamp in Crossfire time.
Definition: time.c:365
void free_all_images(void)
Deallocates memory allocated by read_bmap_names() and read_smooth().
Definition: image.c:396
int save_object(FILE *fp, object *op, int flag)
Dumps all variables in an object to a file.
Definition: object.c:5186
FILE * tempnam_secure(const char *dir, const char *pfx, char **filename)
A replacement for the tempnam_local() function since that one is not very secure. ...
Definition: porting.c:108
char * ss_dump_table(int what, char *buf, size_t size)
Dump the contents of the share string tables.
Definition: shstr.c:354
int calc_item_power(const object *op)
This takes an object 'op' and figures out what its item_power rating should be.
Definition: item.c:246
object * get_random_mon(int level)
Returns a random monster selected from linked list of all monsters in the current game...
Definition: readable.c:1371
method_ret(* process_func)(ob_methods *, object *)
Definition: ob_methods.h:40
key_value * object_get_key_value(const object *ob, const char *key)
Search for a field by key.
Definition: object.c:4218
void make_list_like(char *input)
Taking a string as an argument, mutate it into a string that looks like a list.
Definition: utils.c:394
void trigger_connected(objectlink *ol, object *cause, const int state)
Trigger every object in an objectlink.
Definition: button.c:41
int get_randomized_dir(int dir)
Returns a random direction (1..8) similar to a given direction.
Definition: utils.c:438
void fix_container(object *container)
When the map is loaded, load_object() does not actually insert objects into inventory, but just links them.
Definition: map.c:544
mapstruct * get_map_from_coord(mapstruct *m, int16_t *x, int16_t *y)
This is basically the same as out_of_map above(), but instead we return NULL if no map is valid (coor...
Definition: map.c:2366
int book_overflow(const char *buf1, const char *buf2, size_t booksize)
Checks if buf1 and buf2 can be combined.
Definition: readable.c:710
void free_player(player *pl)
Clears player structure, including pointed object (through object_free_drop_inventory()).
Definition: player.c:57
unsigned short uint16_t
Definition: win32.h:163
int strtoint(const char *buf)
Convert buf into an integer equal to the coadded sum of the (lowercase) character.
Definition: recipe.c:640
sstring add_refcount(sstring str)
This will increase the refcount of the string str.
Definition: shstr.c:210
void remove_button_link(object *op)
Remove the object from the linked lists of buttons in the map.
Definition: button.c:698
int i18n_get_language_by_code(const char *code)
Find the identifier of a language from its code.
Definition: languages.c:110
signed __int64 int64_t
Definition: win32.h:168
int get_language(object *op)
Returns the i18n language index associated with the given object.
Definition: languages.c:55
void remove_directory(const char *path)
This function removes everything in the directory, and the directory itself.
Definition: porting.c:154
static const flag_definition flags[]
Flag mapping.
void object_sub_weight(object *op, signed long weight)
Recursively (outwards) subtracts a number from the weight of an object (and what is carried by it's e...
Definition: object.c:1625
object * check_inv_recursive(object *op, const object *trig)
Checks object and its inventory for specific item.
Definition: button.c:786
void object_set_enemy(object *op, object *enemy)
Sets the enemy of an object.
Definition: object.c:679
int blocked_link(object *ob, mapstruct *m, int sx, int sy)
Returns true if the given coordinate is blocked except by the object passed is not blocking...
Definition: map.c:346
const char * get_season_name(const int index)
give access to season names
Definition: time.c:123
void object_free_all_data(void)
Destroys all allocated objects.
Definition: object.c:522
void clear_archetable(void)
Initialise the hashtable used by the archetypes.
Definition: arch.c:205
const artifact * find_artifact(const object *op, const char *name)
Searches and returns a specific artifact, NULL if not found.
Definition: artifact.c:640
int is_magical(const object *op)
Checks whether object is magical.
Definition: item.c:1242
const char * sstring
Strings that should be manipulated through add_string() and free_string().
Definition: global.h:40
object * object_find_by_type(const object *who, int type)
Find object in inventory.
Definition: object.c:3903
recipe * find_recipe_for_tool(const char *tool, recipe *from)
Find a recipe for a specified tool.
Definition: recipe.c:828
int get_random_dir(void)
Returns a random direction (1..8).
Definition: utils.c:426
void object_give_identified_properties(object *op)
Ensure op has all its "identified" properties set.
Definition: item.c:1375
unsigned artifact_get_face(const artifact *art)
Get a suitable face number for representing an artifact.
Definition: artifact.c:692
unsigned int uint32_t
Definition: win32.h:162
method_ret ob_apply(object *op, object *applier, int aflags)
Applies an object.
Definition: ob_methods.c:42
size_t stringbuffer_length(StringBuffer *sb)
Definition: stringbuffer.c:154
object * object_get_player_container(object *op)
Finds the player carrying an object.
Definition: object.c:353
void create_overlay_pathname(const char *name, char *buf, size_t size)
Same as create_pathname(), but for the overlay maps.
Definition: map.c:125
void update_all_los(const mapstruct *map, int x, int y)
This function makes sure that update_los() will be called for all players on the given map within the...
Definition: los.c:532
objectlink * treasurelist_find_matching_type(const treasurelist *randomitems, int type, int traverse)
This function looks at the passed in treasurelist and returns all objects on it, or on treasurelists ...
Definition: treasure.c:1707
const char * re_cmp(const char *str, const char *regexp)
re-cmp - get regular expression match.
Definition: re-cmp.c:69
recipelist * get_formulalist(int i)
Gets a formula list by ingredients count.
Definition: recipe.c:114
archetype * try_find_archetype(const char *name)
Finds, using the hashtable, which archetype matches the given name.
Definition: arch.c:666
int get_dam_bonus(int stat)
Definition: living.c:2271
const artifact * locate_recipe_artifact(const recipe *rp, size_t idx)
Finds an artifact for a recipe.
Definition: recipe.c:661
void free_objectlink(objectlink *ol)
Recursively frees all objectlinks.
Definition: links.c:71
method_ret(* apply_func)(ob_methods *, object *, object *, int)
Definition: ob_methods.h:39
int64_t check_exp_adjust(const object *op, int64_t exp)
Returns the maximum experience the object can gain or lose.
Definition: living.c:1999
void change_attr_value(living *stats, int attr, int8_t value)
Like set_attr_value(), but instead the value (which can be negative) is added to the specified stat...
Definition: living.c:264
archetype * get_archetype_by_skill_name(const char *skill, int type)
Retrieves an archetype by skill name and type.
Definition: arch.c:107
int is_dragon_pl(const object *op)
Checks if player is a dragon.
Definition: player.c:114
void register_describe(int ob_type, describe_func method)
Registers the describe method for the given type.
Definition: ob_types.c:80
int region_is_child_of_region(const region *child, const region *r)
Checks if a region is a child of another.
Definition: region.c:190
void object_remove(object *op)
This function removes the object op from the linked list of objects which it is currently tied to...
Definition: object.c:1654
method_ret(* trigger_func)(ob_methods *, object *, object *, int)
Definition: ob_methods.h:43
mapstruct * get_linked_map(void)
Allocates, initialises, and returns a pointer to a mapstruct.
Definition: map.c:793
signed char int8_t
Type definitions for fixed-size integer types.
Definition: win32.h:158
void init_ob_types(ob_methods *base_type)
Initializes the object system.
Definition: ob_types.c:49
void drain_specific_stat(object *op, int deplete_stats)
Drain a specified stat from op.
Definition: living.c:724
void replace(const char *src, const char *key, const char *replacement, char *result, size_t resultsize)
Replace in string src all occurrences of key by replacement.
Definition: utils.c:353
int load_object(FILE *fp, object *op, int bufstate, int map_flags)
int map_find_dir(mapstruct *m, int x, int y, object *exclude)
Search some close squares in the given map at the given coordinates for live objects.
Definition: object.c:3534
method_ret ob_trigger(object *op, object *cause, int state)
An object is triggered by another one.
Definition: ob_methods.c:127
int get_turn_bonus(int stat)
Definition: living.c:2267
long usec_elapsed(struct timespec first, struct timespec second)
Return the number of microseconds between two timespec structures.
Definition: cfanim.c:1099
object * object_create_clone(object *asrc)
Create clone from object to another.
Definition: object.c:3832
void init_archetypes(void)
Initialises the internal linked list of archetypes (read from file).
Definition: arch.c:182
void free_all_maps(void)
Frees all allocated maps.
Definition: map.c:1963
One message a NPC can react to.
Definition: dialog.h:28
Represents the ingame time.
Definition: tod.h:32
object * object_new(void)
Grabs an object from the list of unused objects, makes sure it is initialised, and returns it...
Definition: object.c:1037
int change_map_light(mapstruct *m, int change)
Used to change map light level (darkness) up or down.
Definition: map.c:1995
void player_lvl_adj(object *who, object *op)
For the new exp system.
Definition: living.c:1768
const char * map_get_path(const object *item)
Return the map path on which the specified item is.
Definition: map.c:2690
int64_t level_exp(int level, double expmul)
Returns how much experience is needed for a player to become the given level.
Definition: living.c:1822
void free_all_anim(void)
Clears all animation-related memory.
Definition: anim.c:30
int did_make_save(const object *op, int level, int bonus)
This function takes an object (monster/player, op), and determines if it makes a basic save throw by ...
Definition: living.c:2175
void add_statbonus(object *op)
Adds stat-bonuses given by the class which the player has chosen.
Definition: living.c:863
recipe * get_random_recipe(recipelist *rpl)
Gets a random recipe from a list, based on chance.
Definition: recipe.c:721
void player_set_own_title(struct pl *pl, const char *title)
Sets the custom title.
Definition: player.c:264
void get_search_arr(int *search_arr)
New function to make monster searching more efficient, and effective! This basically returns a random...
Definition: object.c:3501
void get_levelnumber(int i, char *buf, size_t size)
Formats a level.
Definition: item.c:446
object * get_jail_exit(object *op)
Returns an object which is an exit through which the player represented by op should be sent in order...
Definition: region.c:260
sstring find_string(const char *str)
Searches a string in the shared strings.
Definition: shstr.c:236
const char * get_name_of_region_for_map(const mapstruct *m)
Gets the name of a region for a map.
Definition: region.c:92
void object_free_key_values(object *op)
Zero the key_values on op, decrementing the shared-string refcounts and freeing the links...
Definition: object.c:727
void animate_object(object *op, int dir)
Updates the face-variable of an object.
Definition: anim.c:186
void player_get_title(const struct pl *pl, char *buf, size_t bufsize)
Returns the player's title.
Definition: player.c:224
int remove_depletion(object *op, int level)
Remove depletion from op, if present, and warn player of such restorations.
Definition: living.c:751
void check_stat_bounds(living *stats, int8_t min_stat, int8_t max_stat)
Ensures that all stats (str/dex/con/wis/cha/int) are within the passed in range of min_stat and max_s...
Definition: living.c:354
int object_count_used(void)
Object statistics.
Definition: object.c:1579
void check_summoned(void)
This checks all summonable items for move_type and other things.
Definition: arch.c:495
void calc_perm_exp(object *op)
Ensure that the permanent experience requirements in an exp object are met.
Definition: living.c:1838
void init_anim(void)
Loads the lib/animations file.
Definition: anim.c:44
int is_valid_faceset(int fsn)
Checks specified faceset is valid.
Definition: image.c:563
void set_max_time(long t)
Sets the max speed.
Definition: time.c:203
object * object_insert_in_map_at(object *op, mapstruct *m, object *originator, int flag, int x, int y)
Same as object_insert_in_map() except it handle separate coordinates and do a clean job preparing mul...
Definition: object.c:1921
char * path_combine(const char *src, const char *dst, char *path, size_t size)
Combines 2 paths, which can be relative.
Definition: path.c:51
long seconds(void)
Return wall clock time in seconds.
Definition: time.c:344
void dump_monster_treasure(const char *name)
For debugging purposes.
Definition: treasure.c:1449
int isqrt(int n)
Compute the square root.
Definition: utils.c:585
int rndm(int min, int max)
Returns a number between min and max.
Definition: utils.c:161
object * object_find_by_name_global(const char *str)
Finds an object by name.
Definition: object.c:499
int buf_overflow(const char *buf1, const char *buf2, size_t bufsize)
We don't want to exceed the buffer size of buf1 by adding on buf2!
Definition: shstr.c:398
object * object_find_by_flag(const object *who, int flag)
Find object in inventory by flag.
Definition: object.c:4097
object * identify(object *op)
Identifies an item.
Definition: item.c:1437
void update_position(mapstruct *m, int x, int y)
This function updates various attributes about a specific space on the map (what it looks like...
Definition: map.c:2119
sstring i18n_get_language_code(int language)
Return the code of a specified language.
Definition: languages.c:122
void check_inv(object *op, object *trig)
Function to search the inventory, of a player and then based on a set of conditions, the square will activate connected items.
Definition: button.c:826
void set_dragon_name(object *pl, const object *abil, const object *skin)
Set the new dragon name after gaining levels or changing ability focus (later this can be extended to...
Definition: living.c:1629
const typedata * get_typedata_by_name(const char *name)
Definition: item.c:354
void print_monsters(void)
As dump_abilities(), but with an alternative way of output.
Definition: info.c:95
godlink * get_rand_god(void)
Returns a random god.
Definition: holy.c:101
sstring get_message_title(const GeneralMessage *message)
Get a message's title.
Definition: readable.c:2226
void make_sure_seen(const object *op)
The object is supposed to be visible through walls, thus check if any players are nearby...
Definition: los.c:632
One general message, from the lib/messages file.
Definition: readable.c:134
void register_move_on(int ob_type, move_on_func method)
Registers the move_on method for the given type.
Definition: ob_types.c:89
void register_process(int ob_type, process_func method)
Registers the process method for the given type.
Definition: ob_types.c:71
const GeneralMessage * get_message_from_identifier(const char *identifier)
Find the message from its identifier.
Definition: readable.c:2213
void arch_info(object *op)
Stores debug-information about how efficient the hashtable used for archetypes has been in the static...
Definition: arch.c:196
void set_materialname(object *op)
Set the material name and type for an item, if not set.
Definition: utils.c:300
void object_set_flag_inv(object *op, int flag)
Activate recursively a flag on an object's inventory.
Definition: object.c:3081
void i18n_init(void)
Initializes the i18n subsystem.
Definition: languages.c:168
void dump_arch(archetype *at, StringBuffer *sb)
Dumps an archetype to buffer.
Definition: arch.c:233
int is_wraith_pl(object *op)
Tests if a player is a wraith.
Definition: player.c:165
A buffer that will be expanded as content is added to it.
Definition: stringbuffer.c:25
int64_t random_roll64(int64_t min, int64_t max, const object *op, int goodbad)
This is a 64 bit version of random_roll() above.
Definition: utils.c:77
void get_tod(timeofday_t *tod)
Computes the ingame time of the day.
Definition: time.c:215
void free_all_readable(void)
Free all readable-related information.
Definition: readable.c:2101
void write_book_archive(void)
Write out the updated book archive to bookarch file.
Definition: readable.c:2150
void apply_death_exp_penalty(object *op)
Applies a death penalty experience, the size of this is defined by the settings death_penalty_percent...
Definition: living.c:2126
object * generate_treasure(treasurelist *t, int difficulty)
Generate a treasure from a list generating a single item.
Definition: treasure.c:518
void add_button_link(object *button, mapstruct *map, int connected)
Links specified object in the map.
Definition: button.c:661
object * object_find_by_arch_name(const object *who, const char *name)
Find object in inventory by archetype name.
Definition: object.c:4143
int find_animation(const char *name)
Finds the animation id that matches name.
Definition: anim.c:144
This is a game-map.
Definition: map.h:325
StringBuffer * describe_item(const object *op, const object *owner, int use_media_tags, StringBuffer *buf)
Describes an item, in all its details.
Definition: item.c:980
int lex_load(int *depth, object **items, int maxdepth, int map_flags, int linemode)
void stringbuffer_delete(StringBuffer *sb)
Definition: stringbuffer.c:71
void clear_player(player *pl)
Clears data in player structure.
Definition: player.c:33
void fix_object(object *op)
Updates all abilities given by applied objects in the inventory of the given object.
Definition: living.c:1120
void share_exp(object *op, int64_t exp, const char *skill, int flag)
Gives experience to a player/monster, sharing it with party if applicable.
Definition: living.c:2205
void strip_endline(char *buf)
Removes endline from buffer (modified in place).
Definition: utils.c:340
void time_info(object *op)
Players wants to know the time.
Definition: time.c:294
object * object_decrease_nrof(object *op, uint32_t i)
Decreases a specified number from the amount of an object.
Definition: object.c:2505
unsigned find_face(const char *name, unsigned error)
This returns an the face number of face 'name'.
Definition: image.c:303
object * object_create_arch(archetype *at)
Create a full object using the given archetype.
Definition: arch.c:736
object * object_get_owner(object *op)
Returns the object which this object marks as being the owner.
Definition: object.c:559
void query_weight(const object *op, char *buf, size_t size)
Formats the item's weight.
Definition: item.c:426
fatal_error
Fatal variables; used as arguments to fatal().
Definition: define.h:47
void object_set_cheat(object *op)
object_set_cheat(object) sets the cheat flag (WAS_WIZ) in the object and in all it's inventory (recur...
Definition: object.c:3122
static ob_methods base_type
Definition: ob_methods.c:27
void init_globals(void)
Initialises all global variables.
Definition: init.c:272
int ob_blocked(const object *ob, mapstruct *m, int16_t x, int16_t y)
Returns true if the given object can't fit in the given spot.
Definition: map.c:489
object * object_get_env_recursive(object *op)
Utility function.
Definition: object.c:333
method_ret ob_move_on(object *op, object *victim, object *originator)
Makes an object move on top of another one.
Definition: ob_methods.c:105
void clean_tmp_map(mapstruct *m)
Removse the temporary file used by the map.
Definition: map.c:1954
void reset_sleep(void)
Initialise all variables used in the timing routines.
Definition: time.c:130
void give_artifact_abilities(object *op, const object *artifact)
Fixes the given object, giving it the abilities and titles it should have due to the second artifact-...
Definition: artifact.c:203
void set_abs_magic(object *op, int magic)
Sets magical bonus in an object, and recalculates the effect on the armour variable, and the effect on speed of armour.
Definition: treasure.c:836
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
Definition: logger.c:51
StringBuffer * describe_attacktype(const char *attack, int value, StringBuffer *buf)
Describe the specified attack type.
Definition: utils.c:561
void get_ob_diff(StringBuffer *sb, const object *op, const object *op2)
Returns a pointer to a static string which contains all variables which are different in the two give...
Definition: object.c:4845
method_ret(* move_on_func)(ob_methods *, object *, object *, object *)
Definition: ob_methods.h:42
int object_check_move_on(object *op, object *originator)
Checks if any objects has a move_type that matches objects that effect this object on this space...
Definition: object.c:2835
int legal_artifact_combination(const object *op, const artifact *art)
Checks if op can be combined with art.
Definition: artifact.c:221
object * object_find_by_name(const object *who, const char *name)
Finds an object in inventory name.
Definition: object.c:3879
void dump_alchemy(void)
Dumps alchemy recipes to output.
Definition: recipe.c:317
One alchemy recipe.
Definition: recipe.h:10
object * object_find_by_flag_applied(const object *who, int flag)
Find applied object in inventory by flag.
Definition: object.c:4120
void dump_all_maps(void)
Prints out debug-information about all maps.
Definition: map.c:270
void remove_friendly_object(object *op)
Removes the specified object from the linked list of friendly objects.
Definition: friend.c:56
const char * i18n(const object *who, const char *code)
Translate a message in the appropriate language.
Definition: languages.c:69