Atrinik Server  4.0
proto.h
1 #ifndef __CPROTO__
2 #include <decls.h>
3 extern void world_maker(void);
4 /* src/commands/permission/arrest.c */
5 extern void command_arrest(object *op, const char *command, char *params);
6 /* src/commands/permission/ban.c */
7 extern void command_ban(object *op, const char *command, char *params);
8 /* src/commands/permission/config.c */
9 extern void command_config(object *op, const char *command, char *params);
10 /* src/commands/permission/follow.c */
11 extern void command_follow(object *op, const char *command, char *params);
12 /* src/commands/permission/freeze.c */
13 extern void command_freeze(object *op, const char *command, char *params);
14 /* src/commands/permission/kick.c */
15 extern void command_kick(object *op, const char *command, char *params);
16 /* src/commands/permission/memfree.c */
17 extern void command_memfree(object *op, const char *command, char *params);
18 /* src/commands/permission/memleak.c */
19 extern void command_memleak(object *op, const char *command, char *params);
20 /* src/commands/permission/mod_chat.c */
21 extern void command_mod_chat(object *op, const char *command, char *params);
22 /* src/commands/permission/no_chat.c */
23 extern void command_no_chat(object *op, const char *command, char *params);
24 /* src/commands/permission/opsay.c */
25 extern void command_opsay(object *op, const char *command, char *params);
26 /* src/commands/permission/password.c */
27 extern void command_password(object *op, const char *command, char *params);
28 /* src/commands/permission/resetmap.c */
29 extern void command_resetmap(object *op, const char *command, char *params);
30 /* src/commands/permission/resetmaps.c */
31 extern void command_resetmaps(object *op, const char *command, char *params);
32 /* src/commands/permission/server_chat.c */
33 extern void command_server_chat(object *op, const char *command, char *params);
34 /* src/commands/permission/settime.c */
35 extern void command_settime(object *op, const char *command, char *params);
36 /* src/commands/permission/shutdown.c */
37 extern void command_shutdown(object *op, const char *command, char *params);
38 /* src/commands/permission/stats.c */
39 extern void command_stats(object *op, const char *command, char *params);
40 /* src/commands/permission/tcl.c */
41 extern void command_tcl(object *op, const char *command, char *params);
42 /* src/commands/permission/tgm.c */
43 extern void command_tgm(object *op, const char *command, char *params);
44 /* src/commands/permission/tli.c */
45 extern void command_tli(object *op, const char *command, char *params);
46 /* src/commands/permission/tls.c */
47 extern void command_tls(object *op, const char *command, char *params);
48 /* src/commands/permission/tp.c */
49 extern void command_tp(object *op, const char *command, char *params);
50 /* src/commands/permission/tphere.c */
51 extern void command_tphere(object *op, const char *command, char *params);
52 /* src/commands/permission/tsi.c */
53 extern void command_tsi(object *op, const char *command, char *params);
54 /* src/commands/player/afk.c */
55 extern void command_afk(object *op, const char *command, char *params);
56 /* src/commands/player/apply.c */
57 extern void command_apply(object *op, const char *command, char *params);
58 /* src/commands/player/chat.c */
59 extern void command_chat(object *op, const char *command, char *params);
60 /* src/commands/player/drop.c */
61 extern void command_drop(object *op, const char *command, char *params);
62 /* src/commands/player/gsay.c */
63 extern void command_gsay(object *op, const char *command, char *params);
64 /* src/commands/player/hiscore.c */
65 extern void command_hiscore(object *op, const char *command, char *params);
66 /* src/commands/player/left.c */
67 extern void command_left(object *op, const char *command, char *params);
68 /* src/commands/player/me.c */
69 extern void command_me(object *op, const char *command, char *params);
70 /* src/commands/player/motd.c */
71 extern void command_motd(object *op, const char *command, char *params);
72 /* src/commands/player/my.c */
73 extern void command_my(object *op, const char *command, char *params);
74 /* src/commands/player/party.c */
75 extern void command_party(object *op, const char *command, char *params);
76 /* src/commands/player/push.c */
77 extern void command_push(object *op, const char *command, char *params);
78 /* src/commands/player/rename.c */
79 extern void command_rename(object *op, const char *command, char *params);
80 /* src/commands/player/reply.c */
81 extern void command_reply(object *op, const char *command, char *params);
82 /* src/commands/player/right.c */
83 extern void command_right(object *op, const char *command, char *params);
84 /* src/commands/player/say.c */
85 extern void command_say(object *op, const char *command, char *params);
86 /* src/commands/player/statistics.c */
87 extern void command_statistics(object *op, const char *command, char *params);
88 /* src/commands/player/take.c */
89 extern void command_take(object *op, const char *command, char *params);
90 /* src/commands/player/tell.c */
91 extern void command_tell(object *op, const char *command, char *params);
92 /* src/commands/player/time.c */
93 extern void command_time(object *op, const char *command, char *params);
94 /* src/commands/player/version.c */
95 extern void command_version(object *op, const char *command, char *params);
96 /* src/commands/player/whereami.c */
97 extern void command_whereami(object *op, const char *command, char *params);
98 /* src/commands/player/who.c */
99 extern void command_who(object *op, const char *command, char *params);
100 /* src/loaders/map_header.c */
101 extern int map_lex_load(mapstruct *m);
102 extern int map_set_variable(mapstruct *m, char *buf);
103 extern void free_map_header_loader(void);
104 extern int load_map_header(mapstruct *m, FILE *fp);
105 extern void save_map_header(mapstruct *m, FILE *fp, int flag);
106 /* src/loaders/object.c */
107 /* src/loaders/random_map.c */
108 extern int rmap_lex_read(RMParms *RP);
109 extern int load_parameters(FILE *fp, int bufstate, RMParms *RP);
110 extern int set_random_map_variable(RMParms *rp, const char *buf);
111 extern void free_random_map_loader(void);
112 /* src/random_maps/decor.c */
113 extern void put_decor(mapstruct *map, char **layout, RMParms *RP);
114 /* src/random_maps/door.c */
115 extern int surround_check2(char **layout, int x, int y, int Xsize, int Ysize);
116 extern void put_doors(mapstruct *the_map, char **maze, char *doorstyle, RMParms *RP);
117 /* src/random_maps/exit.c */
118 extern void find_in_layout(int mode, char target, int *fx, int *fy, char **layout, RMParms *RP);
119 extern void place_exits(mapstruct *map, char **maze, char *exitstyle, int orientation, RMParms *RP);
120 extern void unblock_exits(mapstruct *map, char **maze, RMParms *RP);
121 /* src/random_maps/expand2x.c */
122 extern char **expand2x(char **layout, int xsize, int ysize);
123 /* src/random_maps/floor.c */
124 extern mapstruct *make_map_floor(char *floorstyle, RMParms *RP);
125 /* src/random_maps/maze_gen.c */
126 extern char **maze_gen(int xsize, int ysize, int option);
127 /* src/random_maps/monster.c */
128 extern void place_monsters(mapstruct *map, char *monsterstyle, int difficulty, RMParms *RP);
129 /* src/random_maps/random_map.c */
130 extern void dump_layout(char **layout, RMParms *RP);
131 extern mapstruct *generate_random_map(char *OutFileName, RMParms *RP);
132 extern char **layoutgen(RMParms *RP);
133 extern char **symmetrize_layout(char **maze, int sym, RMParms *RP);
134 extern char **rotate_layout(char **maze, int rotation, RMParms *RP);
135 extern void roomify_layout(char **maze, RMParms *RP);
136 extern int can_make_wall(char **maze, int dx, int dy, int dir, RMParms *RP);
137 extern int make_wall(char **maze, int x, int y, int dir);
138 extern void doorify_layout(char **maze, RMParms *RP);
139 extern void write_map_parameters_to_string(char *buf, RMParms *RP);
140 /* src/random_maps/rogue_layout.c */
141 extern int surround_check(char **layout, int i, int j, int Xsize, int Ysize);
142 extern char **roguelike_layout_gen(int xsize, int ysize, int options);
143 /* src/random_maps/room_gen_onion.c */
144 extern char **map_gen_onion(int xsize, int ysize, int option, int layers);
145 extern void centered_onion(char **maze, int xsize, int ysize, int option, int layers);
146 extern void bottom_centered_onion(char **maze, int xsize, int ysize, int option, int layers);
147 extern void draw_onion(char **maze, float *xlocations, float *ylocations, int layers);
148 extern void make_doors(char **maze, float *xlocations, float *ylocations, int layers, int options);
149 extern void bottom_right_centered_onion(char **maze, int xsize, int ysize, int option, int layers);
150 /* src/random_maps/room_gen_spiral.c */
151 extern char **map_gen_spiral(int xsize, int ysize, int option);
152 extern void connect_spirals(int xsize, int ysize, int sym, char **layout);
153 /* src/random_maps/snake.c */
154 extern char **make_snake_layout(int xsize, int ysize);
155 /* src/random_maps/square_spiral.c */
156 extern void find_top_left_corner(char **maze, int *cx, int *cy);
157 extern char **make_square_spiral_layout(int xsize, int ysize);
158 /* src/random_maps/style.c */
159 extern int load_dir(const char *dir, char ***namelist, int skip_dirs);
160 extern mapstruct *styles;
161 extern mapstruct *load_style_map(char *style_name);
162 extern mapstruct *find_style(const char *dirname, const char *stylename, int difficulty);
163 extern object *pick_random_object(mapstruct *style);
164 extern void free_style_maps(void);
165 /* src/random_maps/wall.c */
166 extern int surround_flag(char **layout, int i, int j, RMParms *RP);
167 extern int surround_flag2(char **layout, int i, int j, RMParms *RP);
168 extern int surround_flag3(mapstruct *map, int i, int j, RMParms *RP);
169 extern int surround_flag4(mapstruct *map, int i, int j, RMParms *RP);
170 extern void make_map_walls(mapstruct *map, char **layout, char *w_style, RMParms *RP);
171 extern object *pick_joined_wall(object *the_wall, char **layout, int i, int j, RMParms *RP);
172 extern object *retrofit_joined_wall(mapstruct *the_map, int i, int j, int insert_flag, RMParms *RP);
173 /* src/server/account.c */
174 extern void account_init(void);
175 extern void account_deinit(void);
176 extern char *account_make_path(const char *name);
177 extern void account_login(socket_struct *ns, char *name, char *password);
178 extern void account_register(socket_struct *ns, char *name, char *password, char *password2);
179 extern void account_new_char(socket_struct *ns, char *name, char *archname);
180 extern void account_login_char(socket_struct *ns, char *name);
181 extern void account_logout_char(socket_struct *ns, player *pl);
182 extern void account_password_change(socket_struct *ns, char *password, char *password_new, char *password_new2);
183 extern void account_password_force(object *op, char *name, const char *password);
184 /* src/server/anim.c */
185 extern Animations *animations;
186 extern int num_animations;
187 extern int animations_allocated;
188 extern void free_all_anim(void);
189 extern void init_anim(void);
190 extern int find_animation(const char *name);
191 extern void animate_object(object *op);
192 extern void animate_turning(object *op);
193 /* src/server/apply.c */
194 extern int manual_apply(object *op, object *tmp, int aflag);
195 extern int player_apply(object *pl, object *op, int aflag, int quiet);
196 extern void player_apply_below(object *pl);
197 /* src/server/arch.c */
198 /* src/server/attack.c */
199 /* src/server/ban.c */
200 /* src/server/cache.c */
201 extern cache_struct *cache_find(shstr *key);
202 extern int cache_add(const char *key, void *ptr, uint32_t flags);
203 extern int cache_remove(shstr *key);
204 extern void cache_remove_all(void);
205 extern void cache_remove_by_flags(uint32_t flags);
206 /* src/server/commands.c */
207 extern void toolkit_commands_init(void);
208 extern void toolkit_commands_deinit(void);
209 extern void commands_add(const char *name, command_func handle_func, double delay, uint64_t flags);
210 extern int commands_check_permission(player *pl, const char *command);
211 extern void commands_handle(object *op, char *cmd);
212 /* src/server/connection.c */
213 extern void connection_object_add(object *op, mapstruct *map, int connected);
214 extern void connection_object_remove(object *op);
215 extern int connection_object_get_value(const object *op);
216 extern void connection_trigger(object *op, int state);
217 extern void connection_trigger_button(object *op, int state);
218 /* src/server/exp.c */
219 /* src/server/faction.c */
220 /* src/server/gods.c */
221 extern object *find_god(const char *name);
222 extern const char *determine_god(object *op);
223 /* src/server/hiscore.c */
224 extern void hiscore_init(void);
225 extern void hiscore_check(object *op, int quiet);
226 extern void hiscore_display(object *op, int max, const char *match);
227 /* src/server/image.c */
228 extern New_Face *new_faces;
229 extern int nroffiles;
230 extern int nrofpixmaps;
231 extern int read_bmap_names(void);
232 extern int find_face(const char *name, int error);
233 extern void free_all_images(void);
234 /* src/server/init.c */
235 extern struct settings_struct settings;
237 extern int world_darkness;
238 extern unsigned long todtick;
239 extern char first_map_path[256];
240 extern int first_map_x;
241 extern int first_map_y;
242 extern void free_strings(void);
243 extern void cleanup(void);
244 extern void init_globals(void);
245 extern void write_todclock(void);
246 extern void init(int argc, char **argv);
247 /* src/server/item.c */
248 extern StringBuffer *object_get_material(const object *op, const object *caller, StringBuffer *sb);
249 extern char *object_get_material_s(const object *op, const object *caller);
250 extern StringBuffer *object_get_title(const object *op, const object *caller, StringBuffer *sb);
251 extern char *object_get_title_s(const object *op, const object *caller);
252 extern StringBuffer *object_get_name(const object *op, const object *caller, StringBuffer *sb);
253 extern char *object_get_name_s(const object *op, const object *caller);
254 extern StringBuffer *object_get_short_name(const object *op, const object *caller, StringBuffer *sb);
255 extern char *object_get_short_name_s(const object *op, const object *caller);
256 extern StringBuffer *object_get_material_name(const object *op, const object *caller, StringBuffer *sb);
257 extern char *object_get_material_name_s(const object *op, const object *caller);
258 extern StringBuffer *object_get_base_name(const object *op, const object *caller, StringBuffer *sb);
259 extern char *object_get_base_name_s(const object *op, const object *caller);
260 extern StringBuffer *object_get_description_terrain(const object *op, const object *caller, StringBuffer *sb);
261 extern char *object_get_description_terrain_s(const object *op, const object *caller);
262 extern StringBuffer *object_get_description_attacks(const object *op, const object *caller, StringBuffer *sb);
263 extern char *object_get_description_attacks_s(const object *op, const object *caller);
264 extern StringBuffer *object_get_description_protections(const object *op, const object *caller, StringBuffer *sb);
265 extern char *object_get_description_protections_s(const object *op, const object *caller);
266 extern StringBuffer *object_get_description_path(const object *op, const object *caller, const uint32_t path, const char *name, StringBuffer *sb);
267 extern char *object_get_description_path_s(const object *op, const object *caller, const uint32_t path, const char *name);
268 extern StringBuffer *object_get_description(const object *op, const object *caller, StringBuffer *sb);
269 extern char *object_get_description_s(const object *op, const object *caller);
270 extern StringBuffer *object_get_name_description(const object *op, const object *caller, StringBuffer *sb);
271 extern char *object_get_name_description_s(const object *op, const object *caller);
272 extern bool need_identify(const object *op);
273 extern void identify(object *op);
274 extern void set_trapped_flag(object *op);
275 /* src/server/light.c */
276 extern void adjust_light_source(mapstruct *map, int x, int y, int light);
277 extern void check_light_source_list(mapstruct *map);
278 extern void remove_light_source_list(mapstruct *map);
279 /* src/server/links.c */
280 extern mempool_struct *pool_objectlink;
281 extern void objectlink_init(void);
282 extern void objectlink_deinit(void);
283 extern objectlink *get_objectlink(void);
284 extern void free_objectlink(objectlink *ol);
285 extern void free_objectlinkpt(objectlink *obp);
286 extern objectlink *objectlink_link(objectlink **startptr, objectlink **endptr, objectlink *afterptr, objectlink *beforeptr, objectlink *objptr);
287 extern objectlink *objectlink_unlink(objectlink **startptr, objectlink **endptr, objectlink *objptr);
288 /* src/server/living.c */
289 extern double dam_bonus[30 + 1];
290 extern int wc_bonus[30 + 1];
291 extern float speed_bonus[30 + 1];
292 extern double falling_mitigation[30 + 1];
293 extern uint32_t weight_limit[30 + 1];
294 extern int learn_spell[30 + 1];
295 extern int monster_signal_chance[30 + 1];
296 extern int savethrow[115 + 1];
297 extern const char *const restore_msg[5];
298 extern const char *const lose_msg[5];
299 extern const char *const statname[5];
300 extern const char *const short_stat_name[5];
301 extern void set_attr_value(living *stats, int attr, int8_t value);
302 extern void change_attr_value(living *stats, int attr, int8_t value);
303 extern int8_t get_attr_value(const living *stats, int attr);
304 extern void check_stat_bounds(living *stats);
305 extern void drain_stat(object *op);
306 extern void drain_specific_stat(object *op, int deplete_stats);
307 extern void living_update_player(object *op);
308 extern void living_update_monster(object *op);
309 extern int living_update(object *op);
310 extern object *living_get_base_info(object *op);
311 extern object *living_find_base_info(object *op);
312 extern void set_mobile_speed(object *op, int idx);
313 /* src/server/los.c */
314 extern void init_block(void);
315 extern void set_block(int x, int y, int bx, int by);
316 extern void update_los(object *op);
317 extern void clear_los(object *op);
318 extern int obj_in_line_of_sight(object *obj, rv_vector *rv);
319 /* src/server/main.c */
320 extern player *first_player;
321 extern mapstruct *first_map;
323 extern struct artifact_list *first_artifactlist;
324 extern player *last_player;
325 extern uint32_t global_round_tag;
326 extern int process_delay;
327 extern void version(object *op);
328 extern void leave_map(object *op);
329 extern void set_map_timeout(mapstruct *map);
330 extern void process_events(void);
331 extern void clean_tmp_files(void);
332 extern void server_shutdown(void);
333 extern int swap_apartments(const char *mapold, const char *mapnew, int x, int y, object *op);
334 extern void shutdown_timer_start(long secs);
335 extern void shutdown_timer_stop(void);
336 extern int main(int argc, char **argv);
337 extern void main_process(void);
338 /* src/server/map.c */
339 /* src/server/move.c */
340 extern int get_random_dir(void);
341 extern int get_randomized_dir(int dir);
342 extern int object_move_to(object *op, int dir, object *originator, mapstruct *m, int x, int y);
343 extern int move_ob(object *op, int dir, object *originator);
344 extern int transfer_ob(object *op, int x, int y, int randomly, object *originator, object *trap);
345 extern int push_ob(object *op, int dir, object *pusher);
346 /* src/server/object.c */
347 /* src/server/object_methods.c */
348 /* src/server/party.c */
349 extern const char *const party_loot_modes[PARTY_LOOT_MAX];
350 extern const char *const party_loot_modes_help[PARTY_LOOT_MAX];
351 extern party_struct *first_party;
352 extern void party_init(void);
353 extern void party_deinit(void);
354 extern void add_party_member(party_struct *party, object *op);
355 extern void remove_party_member(party_struct *party, object *op);
356 extern void form_party(object *op, const char *name);
357 extern party_struct *find_party(const char *name);
358 extern int party_can_open_corpse(object *pl, object *corpse);
359 extern void party_handle_corpse(object *pl, object *corpse);
360 extern void send_party_message(party_struct *party, const char *msg, int flag, object *op, object *except);
361 extern void remove_party(party_struct *party);
362 extern void party_update_who(player *pl);
363 /* src/server/pathfinder.c */
364 extern void path_request(object *waypoint);
365 extern object *path_get_next_request(void);
366 extern shstr *path_encode(path_node_t *path);
367 extern int path_get_next(shstr *buf, int16_t *off, shstr **mappath, mapstruct **map, int *x, int *y, uint32_t *flags);
368 extern path_node_t *path_compress(path_node_t *path);
369 extern void path_visualize(path_visualization_t **visualization, path_visualizer_t **visualizer);
370 extern path_node_t *path_find(object *op, mapstruct *map1, int x, int y, mapstruct *map2, int x2, int y2, path_visualizer_t **visualizer);
371 /* src/server/plugins.c */
372 extern object *get_event_object(object *op, int event_nr);
373 extern void display_plugins_list(object *op);
374 extern void init_plugins(void);
375 extern void init_plugin(const char *pluginfile);
376 extern void remove_plugin(const char *id);
377 extern void remove_plugins(void);
378 extern void map_event_obj_init(object *ob);
379 extern void map_event_free(map_event *tmp);
380 extern int trigger_map_event(int event_id, mapstruct *m, object *activator, object *other, object *other2, const char *text, int parm);
381 extern void trigger_global_event(int event_type, void *parm1, void *parm2);
382 extern void trigger_unit_event(object *const activator, object *const me);
383 extern int trigger_event(int event_type, object *const activator, object *const me, object *const other, const char *msg, int parm1, int parm2, int parm3, int flags);
384 /* src/server/quest.c */
385 extern void quest_handle(object *op, object *quest);
386 /* src/server/race.c */
387 extern const char *item_races[13];
388 extern ob_race *race_find(shstr *name);
389 extern ob_race *race_get_random(void);
390 extern void race_init(void);
391 extern void race_free(void);
392 /* src/server/re-cmp.c */
393 extern const char *re_cmp(const char *str, const char *regexp);
394 /* src/server/readable.c */
395 extern int book_overflow(const char *buf1, const char *buf2, size_t booksize);
396 extern void init_readable(void);
397 extern object *get_random_mon(void);
398 extern void tailor_readable_ob(object *book, int msg_type);
399 extern void free_all_readable(void);
400 /* src/server/region.c */
402 extern void regions_init(void);
403 extern void regions_free(void);
404 extern region_struct *region_find_by_name(const char *region_name);
405 extern const region_struct *region_find_with_map(const region_struct *region);
406 extern const char *region_get_longname(const region_struct *region);
407 extern const char *region_get_msg(const region_struct *region);
408 extern int region_enter_jail(object *op);
409 /* src/server/rune.c */
410 extern int trap_see(object *op, object *trap, int level);
411 extern int trap_show(object *trap, object *where);
412 extern int trap_disarm(object *disarmer, object *trap);
413 extern void trap_adjust(object *trap, int difficulty);
414 /* src/server/shop.c */
415 extern int64_t shop_get_cost(object *op, int mode);
416 extern const char *shop_get_cost_string(int64_t cost);
417 extern const char *shop_get_cost_string_item(object *op, int flag);
418 extern int64_t shop_get_money(object *op);
419 extern bool shop_pay(object *op, int64_t to_pay);
420 extern bool shop_pay_item(object *op, object *item);
421 extern bool shop_pay_items(object *op);
422 extern void shop_sell_item(object *op, object *item);
423 extern int64_t bank_get_balance(object *op);
424 extern object *bank_find_info(object *op);
425 extern int bank_deposit(object *op, const char *text, int64_t *value);
426 extern int bank_withdraw(object *op, const char *text, int64_t *value);
427 extern void shop_insert_coins(object *op, int64_t value);
428 /* src/server/skill_util.c */
429 extern float stat_exp_mult[30 + 1];
430 extern int64_t do_skill(object *op, int dir, const char *params);
431 extern int64_t calc_skill_exp(object *who, object *op, int level);
432 extern void init_new_exp_system(void);
433 extern int check_skill_to_fire(object *op, object *weapon);
434 extern void link_player_skills(object *pl);
435 extern int change_skill(object *who, int sk_index);
436 extern int skill_attack(object *tmp, object *pl, int dir, char *string);
437 extern int SK_level(object *op);
438 extern object *SK_skill(object *op);
439 /* src/server/skills.c */
441 extern void find_traps(object *pl, int level);
442 extern void remove_trap(object *op);
443 /* src/server/spell_effect.c */
444 extern void cast_magic_storm(object *op, object *tmp, int lvl);
445 extern int recharge(object *op);
446 extern int cast_create_food(object *op, object *caster, int dir, const char *stringarg);
447 extern int cast_wor(object *op, object *caster);
448 extern void cast_destruction(object *op, object *caster, int dam);
449 extern int cast_heal_around(object *op, int level, int type);
450 extern int cast_heal(object *op, object *caster, int level, object *target, int spell_type);
451 extern int cast_change_attr(object *op, object *caster, object *target, int spell_type);
452 extern int cast_remove_depletion(object *op, object *target);
453 extern int remove_curse(object *op, object *target, int type, int src);
454 extern int do_cast_identify(object *tmp, object *op, int mode, int *done, int level);
455 extern int cast_identify(object *op, int level, object *single_ob, int mode);
456 extern int cast_consecrate(object *op);
457 extern int finger_of_death(object *op, object *target);
458 extern int cast_cause_disease(object *op, object *caster, int dir, struct archetype *disease_arch, int type);
459 extern int cast_transform_wealth(object *op);
460 /* src/server/spell_util.c */
461 extern spell_struct spells[52];
462 extern const char *const spellpathnames[20];
463 extern struct archetype *spellarch[52];
464 extern void init_spells(void);
465 extern int insert_spell_effect(const char *archname, mapstruct *m, int x, int y);
466 extern spell_struct *find_spell(int spelltype);
467 extern int cast_spell(object *op, object *caster, int dir, int type, int ability, int item, const char *stringarg);
468 extern int cast_create_obj(object *op, object *new_op, int dir);
469 extern int fire_bolt(object *op, object *caster, int dir, int type);
470 extern int fire_arch_from_position(object *op, object *caster, int16_t x, int16_t y, int dir, struct archetype *at, int type, object *target);
471 extern int cast_cone(object *op, object *caster, int dir, int strength, int spell_type, struct archetype *spell_arch);
472 extern void cone_drop(object *op);
473 extern void explode_object(object *op);
474 extern void check_fired_arch(object *op);
475 extern int find_target_for_spell(object *op, object **target, uint32_t flags);
476 extern int SP_level_dam_adjust(object *caster, int spell_type, bool exact);
477 extern int SP_level_strength_adjust(object *caster, int spell_type);
478 extern int SP_level_spellpoint_cost(object *caster, int spell_type, int caster_level);
479 extern void fire_swarm(object *op, object *caster, int dir, struct archetype *swarm_type, int spell_type, int n, int magic);
480 extern void spell_failure_raw_mana(object *caster, int level);
481 extern void spell_failure(object *caster, int level);
482 extern int spell_get_random(int level, int flags);
483 /* src/server/statistics.c */
484 extern void statistics_init(void);
485 extern void statistic_update(const char *type, object *op, int64_t i, const char *buf);
486 extern void statistics_player_logout(player *pl);
487 /* src/server/swap.c */
488 extern void write_map_log(void);
489 extern void read_map_log(void);
490 extern void swap_map(mapstruct *map, int force_flag);
491 extern void check_active_maps(void);
492 extern void flush_old_maps(void);
493 /* src/server/time.c */
494 extern long max_time;
495 extern int max_time_multiplier;
496 extern long pticks;
497 extern struct timeval last_time;
498 extern const char *season_name[4];
499 extern const char *weekdays[7];
500 extern const char *month_name[12];
501 extern const char *periodsofday[10];
502 extern const int periodsofday_hours[24];
503 extern void reset_sleep(void);
504 extern void sleep_delta(void);
505 extern void set_max_time(long t);
506 extern void set_max_time_multiplier(int t);
507 extern void get_tod(timeofday_t *tod);
508 extern void print_tod(object *op);
509 extern void time_info(object *op);
510 extern long seconds(void);
511 /* src/server/treasure.c */
512 extern const char *const coins[6 + 1];
513 extern struct archetype *coins_arch[6];
514 extern void treasure_init(void);
515 extern treasure_list_t *treasure_list_find(const char *name);
516 extern object *treasure_generate_single(treasure_list_t *treasure_list, int difficulty, int artifact_chance);
517 extern void treasure_generate(treasure_list_t *treasure_list, object *op, int difficulty, int flags);
518 extern void free_all_treasures(void);
519 extern int get_environment_level(object *op);
520 /* src/server/weather.c */
521 extern const int season_timechange[4][24];
522 extern void init_world_darkness(void);
523 extern void tick_the_clock(void);
524 /* src/skills/construction.c */
525 extern void construction_do(object *op, int dir);
526 /* src/skills/inscription.c */
527 extern int skill_inscription(object *op, const char *params);
528 /* src/socket/image.c */
529 extern int is_valid_faceset(int fsn);
530 extern void free_socket_images(void);
531 extern void read_client_images(void);
532 extern void socket_command_ask_face(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
533 extern void face_get_data(int face, uint8_t **ptr, uint16_t *len);
534 /* src/socket/info.c */
535 extern void draw_info_send(uint8_t type, const char *name, const char *color, socket_struct *ns, const char *buf);
536 extern void draw_info_full(uint8_t type, const char *name, const char *color, StringBuffer *sb_capture, object *pl, const char *buf);
537 extern void draw_info_full_format(uint8_t type, const char *name, const char *color, StringBuffer *sb_capture, object *pl, const char *format, ...) __attribute__((format(printf, 6, 7)));
538 extern void draw_info_type(uint8_t type, const char *name, const char *color, object *pl, const char *buf);
539 extern void draw_info_type_format(uint8_t type, const char *name, const char *color, object *pl, const char *format, ...) __attribute__((format(printf, 5, 6)));
540 extern void draw_info(const char *color, object *pl, const char *buf);
541 extern void draw_info_format(const char *color, object *pl, const char *format, ...) __attribute__((format(printf, 3, 4)));
542 extern void draw_info_map(uint8_t type, const char *name, const char *color, mapstruct *map, int x, int y, int dist, object *op, object *op2, const char *buf);
543 /* src/socket/init.c */
544 extern Socket_Info socket_info;
546 extern bool init_connection(socket_struct *ns);
547 extern void free_all_newserver(void);
548 extern void free_newsocket(socket_struct *ns);
549 extern void init_srv_files(void);
550 /* src/socket/item.c */
551 extern unsigned int query_flags(object *op);
552 extern void add_object_to_packet(struct packet_struct *packet, object *op, object *pl, uint8_t apply_action, uint32_t flags, int level);
553 extern void esrv_draw_look(object *pl);
554 extern void esrv_close_container(object *pl, object *op);
555 extern void esrv_send_inventory(object *pl, object *op);
556 extern void esrv_update_item(int flags, object *op);
557 extern void esrv_send_item(object *op);
558 extern void esrv_del_item(object *op);
559 extern object *esrv_get_ob_from_count(object *pl, tag_t count);
560 extern void socket_command_item_examine(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
561 extern void send_quickslots(player *pl);
562 extern void socket_command_quickslot(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
563 extern void socket_command_item_apply(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
564 extern void socket_command_item_lock(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
565 extern void socket_command_item_mark(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
566 extern void esrv_move_object(object *pl, tag_t to, tag_t tag, long nrof);
567 /* src/socket/lowlevel.c */
568 extern void socket_buffer_clear(socket_struct *ns);
569 extern void socket_buffer_write(socket_struct *ns);
570 extern void socket_send_packet(socket_struct *ns, struct packet_struct *packet);
571 /* src/socket/metaserver.c */
572 extern void metaserver_info_update(void);
573 extern void metaserver_init(void);
574 extern void metaserver_deinit(void);
575 extern void metaserver_stats(char *buf, size_t size);
576 /* src/socket/request.c */
577 extern void socket_command_setup(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
578 extern void socket_command_player_cmd(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
579 extern void socket_command_version(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
580 extern void socket_command_item_move(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
581 extern void esrv_update_stats(player *pl);
582 extern void esrv_new_player(player *pl, uint32_t weight);
583 extern void draw_map_text_anim(object *pl, const char *color, const char *text);
584 extern void draw_client_map(object *pl);
585 extern void packet_append_map_name(struct packet_struct *packet, object *op, object *map_info);
586 extern void packet_append_map_music(struct packet_struct *packet, object *op, object *map_info);
587 extern void packet_append_map_weather(struct packet_struct *packet, object *op, object *map_info);
588 extern void draw_client_map2(object *pl);
589 extern void socket_command_quest_list(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
590 extern void socket_command_clear(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
591 extern void socket_command_move_path(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
592 extern void socket_command_fire(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
593 extern void socket_command_keepalive(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
594 extern void socket_command_move(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
595 extern void send_target_command(player *pl);
596 extern void socket_command_account(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
597 extern void generate_quick_name(player *pl);
598 extern void socket_command_target(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
599 extern void socket_command_talk(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
600 extern void socket_command_control(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
601 extern void socket_command_combat(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
602 void
604  player *pl,
605  uint8_t *data,
606  size_t len,
607  size_t pos);
608 void
610  player *pl,
611  uint8_t *data,
612  size_t len,
613  size_t pos);
614 /* src/socket/sounds.c */
615 extern void play_sound_player_only(player *pl, int type, const char *filename, int x, int y, int loop, int volume);
616 extern void play_sound_map(mapstruct *map, int type, const char *filename, int x, int y, int loop, int volume);
617 /* src/socket/updates.c */
618 extern void updates_init(void);
619 extern void socket_command_request_update(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos);
620 /* src/types/common/apply.c */
621 extern int common_object_apply(object *op, object *applier, int aflags);
622 extern int object_apply_item(object *op, object *applier, int aflags);
623 /* src/types/common/describe.c */
624 extern void common_object_describe(object *op, object *observer, char *buf, size_t size);
625 /* src/types/common/move_on.c */
626 extern int common_object_move_on(object *op, object *victim, object *originator, int state);
627 /* src/types/common/process.c */
628 extern int common_object_process_pre(object *op);
629 extern void common_object_process(object *op);
630 /* src/types/common/projectile.c */
631 extern void common_object_projectile_process(object *op);
632 extern object *common_object_projectile_move(object *op);
633 extern object *common_object_projectile_stop_missile(object *op, int reason);
634 extern object *common_object_projectile_stop_spell(object *op, int reason);
635 extern object *common_object_projectile_fire_missile(object *op, object *shooter, int dir);
636 extern int common_object_projectile_hit(object *op, object *victim);
637 extern int common_object_projectile_move_on(object *op, object *victim, object *originator, int state);
638 /* src/types/monster.c */
639 extern void set_npc_enemy(object *npc, object *enemy, rv_vector *rv);
640 extern void monster_enemy_signal(object *npc, object *enemy);
641 extern object *check_enemy(object *npc, rv_vector *rv);
642 extern object *find_enemy(object *npc, rv_vector *rv);
643 extern int talk_to_npc(object *op, object *npc, char *txt);
644 extern int is_friend_of(object *op, object *obj);
645 extern int check_good_weapon(object *who, object *item);
646 extern int check_good_armour(object *who, object *item);
647 extern _Bool monster_is_ally_of(object *op, object *target);
648 extern void monster_drop_arrows(object *op);
649 #endif
void command_arrest(object *op, const char *command, char *params)
Definition: arrest.c:37
void find_top_left_corner(char **maze, int *cx, int *cy)
Definition: square_spiral.c:40
int64_t do_skill(object *op, int dir, const char *params)
Definition: skill_util.c:99
treasure_list_t * first_treasurelist
Definition: main.c:61
void doorify_layout(char **maze, RMParms *RP)
Definition: random_map.c:752
void command_drop(object *op, const char *command, char *params)
Definition: drop.c:38
void generate_quick_name(player *pl)
Definition: request.c:2286
int common_object_apply(object *op, object *applier, int aflags)
Definition: apply.c:51
int find_face(const char *name, int error)
Definition: image.c:172
Definition: object.h:94
void animate_object(object *op)
Definition: anim.c:197
void draw_info_full(uint8_t type, const char *name, const char *color, StringBuffer *sb_capture, object *pl, const char *buf)
Definition: info.c:85
StringBuffer * object_get_name(const object *op, const object *caller, StringBuffer *sb)
Definition: item.c:299
void set_attr_value(living *stats, int attr, int8_t value)
Definition: living.c:239
int64_t shop_get_cost(object *op, int mode)
Definition: shop.c:43
void roomify_layout(char **maze, RMParms *RP)
Definition: random_map.c:527
const char * periodsofday[PERIODS_PER_DAY]
Definition: time.c:88
const char * shop_get_cost_string(int64_t cost)
Definition: shop.c:178
char ** roguelike_layout_gen(int xsize, int ysize, int options)
Definition: rogue_layout.c:108
void init_new_exp_system(void)
Definition: skill_util.c:219
void command_mod_chat(object *op, const char *command, char *params)
Definition: mod_chat.c:37
party_struct * first_party
Definition: party.c:54
void drain_stat(object *op)
Definition: living.c:353
const char * shop_get_cost_string_item(object *op, int mode)
Definition: shop.c:238
long seconds(void)
Definition: time.c:338
void init_spells(void)
Definition: spell_util.c:61
void init_anim(void)
Definition: anim.c:57
int remove_curse(object *op, object *target, int type, int src)
Definition: spell_effect.c:848
void esrv_close_container(object *pl, object *op)
Definition: item.c:524
ob_race * race_find(shstr *name)
Definition: race.c:157
void remove_party_member(party_struct *party, object *op)
Definition: party.c:114
void add_object_to_packet(struct packet_struct *packet, object *op, object *pl, uint8_t apply_action, uint32_t flags, int level)
Definition: item.c:109
bool shop_pay(object *op, int64_t to_pay)
Definition: shop.c:428
void read_client_images(void)
Definition: image.c:129
char * object_get_description_terrain_s(const object *op, const object *caller)
Definition: item.c:616
void path_request(object *waypoint)
Definition: pathfinder.c:275
Definition: object.h:488
const char *const restore_msg[NUM_STATS]
Definition: living.c:185
void init_block(void)
Definition: los.c:63
int cast_create_food(object *op, object *caster, int dir, const char *stringarg)
Definition: spell_effect.c:138
char * object_get_name_description_s(const object *op, const object *caller)
Definition: item.c:1303
void command_follow(object *op, const char *command, char *params)
Definition: follow.c:38
void spell_failure(object *caster, int level)
Definition: spell_util.c:1178
void identify(object *op)
Definition: item.c:1364
void monster_enemy_signal(object *npc, object *enemy)
Definition: monster.c:270
int do_cast_identify(object *tmp, object *op, int mode, int *done, int level)
Definition: spell_effect.c:945
void esrv_draw_look(object *pl)
Definition: item.c:396
void cast_destruction(object *op, object *caster, int dam)
Definition: spell_effect.c:259
void process_events(void)
Definition: main.c:148
Definition: map.h:504
int64_t calc_skill_exp(object *who, object *op, int level)
Definition: skill_util.c:158
struct sound_ambient_match __attribute__((packed))
path_node_t * path_find(object *op, mapstruct *map1, int x, int y, mapstruct *map2, int x2, int y2, path_visualizer_t **visualizer)
Definition: pathfinder.c:859
int recharge(object *op)
Definition: spell_effect.c:71
int trigger_event(int event_type, object *const activator, object *const me, object *const other, const char *msg, int parm1, int parm2, int parm3, int flags)
Definition: plugins.c:510
static const char *const stats[]
Definition: stats.c:38
void race_init(void)
Definition: race.c:188
void cache_remove_all(void)
Definition: cache.c:205
uint8_t type
One of operation types.
Definition: sound_ambient.c:45
void check_fired_arch(object *op)
Definition: spell_util.c:843
void treasure_generate(treasure_list_t *treasure_list, object *op, int difficulty, int flags)
Definition: treasure.c:1641
int cast_heal_around(object *op, int level, int type)
Definition: spell_effect.c:326
int get_randomized_dir(int dir)
Definition: move.c:53
void remove_plugin(const char *id)
Definition: plugins.c:318
object * common_object_projectile_move(object *op)
Definition: projectile.c:152
int SP_level_strength_adjust(object *caster, int spell_type)
Definition: spell_util.c:1039
void command_me(object *op, const char *command, char *params)
Definition: me.c:37
void command_settime(object *op, const char *command, char *params)
Definition: settime.c:35
int SK_level(object *op)
Definition: skill_util.c:470
object * get_random_mon(void)
Definition: readable.c:563
void command_memfree(object *op, const char *command, char *params)
Definition: memfree.c:35
const char * region_get_msg(const region_struct *region)
Definition: region.c:330
int can_make_wall(char **maze, int dx, int dy, int dir, RMParms *RP)
Definition: random_map.c:586
void statistic_update(const char *type, object *op, int64_t i, const char *buf)
Definition: statistics.c:83
void write_map_parameters_to_string(char *buf, RMParms *RP)
Definition: random_map.c:811
bool shop_pay_items(object *op)
Definition: shop.c:542
int cast_consecrate(object *op)
char * object_get_material_name_s(const object *op, const object *caller)
Definition: item.c:495
void updates_init(void)
Definition: updates.c:170
void command_hiscore(object *op, const char *command, char *params)
Definition: hiscore.c:36
struct archetype * coins_arch[NUM_COINS]
Definition: treasure.c:258
void quest_handle(object *op, object *quest)
Definition: quest.c:377
StringBuffer * object_get_title(const object *op, const object *caller, StringBuffer *sb)
Definition: item.c:124
object * bank_find_info(object *op)
Definition: bank.c:227
void esrv_move_object(object *pl, tag_t to, tag_t tag, long nrof)
Definition: item.c:1039
void connection_trigger_button(object *op, int state)
Definition: connection.c:272
void command_gsay(object *op, const char *command, char *params)
Definition: gsay.c:35
void connection_object_remove(object *op)
Definition: connection.c:91
int cast_transform_wealth(object *op)
int nroffiles
Definition: image.c:61
void regions_free(void)
Definition: region.c:179
int bank_deposit(object *op, const char *text, int64_t *value)
Definition: bank.c:300
int common_object_projectile_move_on(object *op, object *victim, object *originator, int state)
Definition: projectile.c:376
void map_event_obj_init(object *ob)
Definition: plugins.c:370
void command_tphere(object *op, const char *command, char *params)
Definition: tphere.c:36
void place_exits(mapstruct *map, char **maze, char *exitstyle, int orientation, RMParms *RP)
Definition: exit.c:155
int cast_wor(object *op, object *caster)
Definition: spell_effect.c:211
int obj_in_line_of_sight(object *obj, rv_vector *rv)
Definition: los.c:427
void metaserver_init(void)
Definition: metaserver.c:107
void send_party_message(party_struct *party, const char *msg, int flag, object *op, object *except)
Definition: party.c:470
void check_active_maps(void)
Definition: swap.c:176
region_struct * region_find_by_name(const char *region_name)
Definition: region.c:264
void player_apply_below(object *pl)
Definition: apply.c:161
region_struct * first_region
Definition: region.c:37
void leave_map(object *op)
Definition: main.c:107
Definition: living.h:67
void command_resetmaps(object *op, const char *command, char *params)
Definition: resetmaps.c:58
int8_t get_attr_value(const living *stats, int attr)
Definition: living.c:305
void command_take(object *op, const char *command, char *params)
Definition: take.c:38
void command_reply(object *op, const char *command, char *params)
Definition: reply.c:37
int SP_level_spellpoint_cost(object *caster, int spell_type, int caster_level)
Definition: spell_util.c:1072
int cache_remove(shstr *key)
Definition: cache.c:167
int swap_apartments(const char *mapold, const char *mapnew, int x, int y, object *op)
Definition: main.c:395
int trap_disarm(object *disarmer, object *trap)
Definition: rune.c:117
void free_newsocket(socket_struct *ns)
Definition: init.c:113
void remove_party(party_struct *party)
Definition: party.c:498
void command_opsay(object *op, const char *command, char *params)
Definition: opsay.c:37
void dump_layout(char **layout, RMParms *RP)
Definition: random_map.c:41
const char * region_get_longname(const region_struct *region)
Definition: region.c:309
const char *const spellpathnames[NRSPELLPATHS]
Definition: spellist.h:349
void command_statistics(object *op, const char *command, char *params)
Definition: statistics.c:40
bool init_connection(socket_struct *ns)
Definition: init.c:51
path_node_t * path_compress(path_node_t *path)
Definition: pathfinder.c:759
char ** layoutgen(RMParms *RP)
Definition: random_map.c:158
void world_maker(void)
Definition: world_maker.c:490
void spell_failure_raw_mana(object *caster, int level)
Definition: spell_util.c:1140
object * check_enemy(object *npc, rv_vector *rv)
Definition: monster.c:326
char ** make_snake_layout(int xsize, int ysize)
Definition: snake.c:41
int cast_spell(object *op, object *caster, int dir, int type, int ability, int item, const char *stringarg)
Definition: spell_util.c:192
int manual_apply(object *op, object *tmp, int aflag)
Definition: apply.c:52
void free_socket_images(void)
Definition: image.c:94
const int periodsofday_hours[HOURS_PER_DAY]
Definition: time.c:104
struct timeval last_time
Definition: time.c:50
char * object_get_name_s(const object *op, const object *caller)
Definition: item.c:398
int common_object_move_on(object *op, object *victim, object *originator, int state)
Definition: move_on.c:37
void get_tod(timeofday_t *tod)
Definition: time.c:279
char * object_get_description_protections_s(const object *op, const object *caller)
Definition: item.c:740
float stat_exp_mult[MAX_STAT+1]
Definition: skill_util.c:42
StringBuffer * object_get_short_name(const object *op, const object *caller, StringBuffer *sb)
Definition: item.c:416
void command_tgm(object *op, const char *command, char *params)
Definition: tgm.c:37
void main_process(void)
Definition: main.c:561
int first_map_y
Definition: init.c:73
struct artifact_list * first_artifactlist
Definition: main.c:63
void clean_tmp_files(void)
Definition: main.c:300
void command_my(object *op, const char *command, char *params)
Definition: my.c:37
void unblock_exits(mapstruct *map, char **maze, RMParms *RP)
Definition: exit.c:406
int cast_remove_depletion(object *op, object *target)
Definition: spell_effect.c:759
void server_shutdown(void)
Definition: main.c:329
void make_map_walls(mapstruct *map, char **layout, char *w_style, RMParms *RP)
Definition: wall.c:193
void command_time(object *op, const char *command, char *params)
Definition: time.c:35
const char * season_name[SEASONS_PER_YEAR]
Definition: time.c:53
int push_ob(object *op, int dir, object *pusher)
Definition: move.c:284
cache_struct * cache_find(shstr *key)
Definition: cache.c:95
char ** symmetrize_layout(char **maze, int sym, RMParms *RP)
Definition: random_map.c:344
void party_init(void)
Definition: party.c:64
void command_kick(object *op, const char *command, char *params)
Definition: kick.c:37
void command_password(object *op, const char *command, char *params)
Definition: password.c:36
int surround_flag3(mapstruct *map, int i, int j, RMParms *RP)
Definition: wall.c:119
void init(int argc, char **argv)
Definition: init.c:1215
void set_npc_enemy(object *npc, object *enemy, rv_vector *rv)
Definition: monster.c:85
int64_t shop_get_money(object *op)
Definition: shop.c:251
mapstruct * styles
Definition: style.c:115
void init_globals(void)
Definition: init.c:1116
spell_struct * find_spell(int spelltype)
Definition: spell_util.c:160
Definition: arch.h:40
char * object_get_base_name_s(const object *op, const object *caller)
Definition: item.c:534
void metaserver_info_update(void)
Definition: metaserver.c:588
object * common_object_projectile_stop_spell(object *op, int reason)
Definition: projectile.c:284
int is_friend_of(object *op, object *obj)
Definition: monster.c:1685
void path_visualize(path_visualization_t **visualization, path_visualizer_t **visualizer)
Definition: pathfinder.c:811
void init_plugins(void)
Definition: plugins.c:178
StringBuffer * object_get_base_name(const object *op, const object *caller, StringBuffer *sb)
Definition: item.c:513
void command_ban(object *op, const char *command, char *params)
Definition: ban.c:39
int transfer_ob(object *op, int x, int y, int randomly, object *originator, object *trap)
Definition: move.c:237
StringBuffer * object_get_material_name(const object *op, const object *caller, StringBuffer *sb)
Definition: item.c:471
void draw_client_map(object *pl)
Definition: request.c:426
int cache_add(const char *key, void *ptr, uint32_t flags)
Definition: cache.c:121
const char *const statname[NUM_STATS]
Definition: living.c:212
void free_all_newserver(void)
Definition: init.c:89
const char *const party_loot_modes_help[PARTY_LOOT_MAX]
Definition: party.c:45
void command_version(object *op, const char *command, char *params)
Definition: version.c:35
object * waypoint
Waypoint object.
Definition: pathfinder.c:87
void socket_command_ask_resource(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos)
Definition: request.c:3108
char * object_get_short_name_s(const object *op, const object *caller)
Definition: item.c:453
mapstruct * find_style(const char *dirname, const char *stylename, int difficulty)
Definition: style.c:169
char ** map_gen_spiral(int xsize, int ysize, int option)
void statistics_init(void)
Definition: statistics.c:50
int load_dir(const char *dir, char ***namelist, int skip_dirs)
Definition: style.c:71
void display_plugins_list(object *op)
Definition: plugins.c:139
void drain_specific_stat(object *op, int deplete_stats)
Definition: living.c:365
void free_all_anim(void)
Definition: anim.c:39
void play_sound_player_only(player *pl, int type, const char *filename, int x, int y, int loop, int volume)
Definition: sounds.c:66
int read_bmap_names(void)
Definition: image.c:82
void command_right(object *op, const char *command, char *params)
Definition: right.c:36
void construction_do(object *op, int dir)
Definition: construction.c:681
void command_server_chat(object *op, const char *command, char *params)
Definition: server_chat.c:37
void draw_info_full_format(uint8_t type, const char *name, const char *color, StringBuffer *sb_capture, object *pl, const char *format,...)
Definition: info.c:125
int cast_create_obj(object *op, object *new_op, int dir)
Definition: spell_util.c:501
void change_attr_value(living *stats, int attr, int8_t value)
Definition: living.c:277
object * pick_joined_wall(object *the_wall, char **layout, int i, int j, RMParms *RP)
Definition: wall.c:254
void socket_buffer_clear(socket_struct *ns)
Definition: lowlevel.c:73
union @21 data
Data about the rule.
int surround_check2(char **layout, int x, int y, int Xsize, int Ysize)
Definition: door.c:52
void make_doors(char **maze, float *xlocations, float *ylocations, int layers, int options)
uint32_t weight_limit[MAX_STAT+1]
Definition: living.c:129
int party_can_open_corpse(object *pl, object *corpse)
Definition: party.c:230
StringBuffer * object_get_description_terrain(const object *op, const object *caller, StringBuffer *sb)
Definition: item.c:551
void explode_object(object *op)
Definition: spell_util.c:799
void read_map_log(void)
Definition: swap.c:66
void write_todclock(void)
Definition: init.c:1158
void party_update_who(player *pl)
Definition: party.c:530
void common_object_process(object *op)
Definition: process.c:165
int surround_flag2(char **layout, int i, int j, RMParms *RP)
Definition: wall.c:80
StringBuffer * object_get_material(const object *op, const object *caller, StringBuffer *sb)
Definition: item.c:71
void set_mobile_speed(object *op, int idx)
Definition: living.c:1785
void shop_sell_item(object *op, object *item)
Definition: shop.c:554
char * object_get_material_s(const object *op, const object *caller)
Definition: item.c:107
void find_traps(object *pl, int level)
Definition: skills.c:43
const char * determine_god(object *op)
Definition: gods.c:62
void tailor_readable_ob(object *book, int msg_type)
Definition: readable.c:847
char first_map_path[MAX_BUF]
Definition: init.c:67
int learn_spell[MAX_STAT+1]
Definition: living.c:143
void init_srv_files(void)
Definition: init.c:287
void command_tcl(object *op, const char *command, char *params)
Definition: tcl.c:37
int find_animation(const char *name)
Definition: anim.c:176
void cleanup(void)
Definition: init.c:194
StringBuffer * object_get_description_protections(const object *op, const object *caller, StringBuffer *sb)
Definition: item.c:696
int cast_change_attr(object *op, object *caster, object *target, int spell_type)
Definition: spell_effect.c:638
int talk_to_npc(object *op, object *npc, char *txt)
Definition: monster.c:1615
int cast_heal(object *op, object *caster, int level, object *target, int spell_type)
Definition: spell_effect.c:404
void command_tsi(object *op, const char *command, char *params)
Definition: tsi.c:37
const char * weekdays[DAYS_PER_WEEK]
Definition: time.c:61
bool need_identify(const object *op)
Definition: item.c:1315
void socket_command_crypto(socket_struct *ns, player *pl, uint8_t *data, size_t len, size_t pos)
Definition: request.c:3046
void command_tli(object *op, const char *command, char *params)
Definition: tli.c:37
object * SK_skill(object *op)
Definition: skill_util.c:496
void find_in_layout(int mode, char target, int *fx, int *fy, char **layout, RMParms *RP)
Definition: exit.c:49
void cache_remove_by_flags(uint32_t flags)
Definition: cache.c:222
int insert_spell_effect(const char *archname, mapstruct *m, int x, int y)
Definition: spell_util.c:118
object * common_object_projectile_stop_missile(object *op, int reason)
Definition: projectile.c:182
void swap_map(mapstruct *map, int force_flag)
Definition: swap.c:128
StringBuffer * object_get_description_path(const object *op, const object *caller, const uint32_t path, const char *name, StringBuffer *sb)
Definition: item.c:763
void centered_onion(char **maze, int xsize, int ysize, int option, int layers)
void connect_spirals(int xsize, int ysize, int sym, char **layout)
void init_plugin(const char *pluginfile)
Definition: plugins.c:231
int trigger_map_event(int event_id, mapstruct *m, object *activator, object *other, object *other2, const char *text, int parm)
Definition: plugins.c:416
void living_update_monster(object *op)
Definition: living.c:1174
void hiscore_check(object *op, int quiet)
Definition: hiscore.c:332
int find_target_for_spell(object *op, object **target, uint32_t flags)
Definition: spell_util.c:896
int change_skill(object *who, int sk_index)
Definition: skill_util.c:340
void command_say(object *op, const char *command, char *params)
Definition: say.c:37
char * object_get_description_attacks_s(const object *op, const object *caller)
Definition: item.c:678
void party_deinit(void)
Definition: party.c:73
void trigger_unit_event(object *const activator, object *const me)
Definition: plugins.c:477
int common_object_projectile_hit(object *op, object *victim)
Definition: projectile.c:344
void esrv_del_item(object *op)
Definition: item.c:755
void command_shutdown(object *op, const char *command, char *params)
Definition: shutdown.c:37
int bank_withdraw(object *op, const char *text, int64_t *value)
Definition: bank.c:402
void clear_los(object *op)
Definition: los.c:363
void init_readable(void)
Definition: readable.c:447
int connection_object_get_value(const object *op)
Definition: connection.c:125
int skill_inscription(object *op, const char *params)
Definition: inscription.c:94
const char *const coins[NUM_COINS+1]
Definition: treasure.c:38
void draw_onion(char **maze, float *xlocations, float *ylocations, int layers)
object * pick_random_object(mapstruct *style)
Definition: style.c:286
void esrv_send_item(object *op)
Definition: item.c:703
void link_player_skills(object *pl)
Definition: skill_util.c:287
void command_motd(object *op, const char *command, char *params)
Definition: motd.c:36
void command_party(object *op, const char *command, char *params)
Definition: party.c:39
mapstruct * load_style_map(char *style_name)
Definition: style.c:124
void connection_trigger(object *op, int state)
Definition: connection.c:258
void hiscore_init(void)
Definition: hiscore.c:315
object * living_get_base_info(object *op)
Definition: living.c:1732
void command_no_chat(object *op, const char *command, char *params)
Definition: no_chat.c:37
unsigned long todtick
Definition: init.c:64
int make_wall(char **maze, int x, int y, int dir)
Definition: random_map.c:709
object * esrv_get_ob_from_count(object *pl, tag_t count)
Definition: item.c:814
void fire_swarm(object *op, object *caster, int dir, struct archetype *swarm_type, int spell_type, int n, int magic)
Definition: spell_util.c:1109
void draw_client_map2(object *pl)
Definition: request.c:653
void hiscore_display(object *op, int max, const char *match)
Definition: hiscore.c:412
void adjust_light_source(mapstruct *map, int x, int y, int light)
Definition: light.c:257
int cast_cone(object *op, object *caster, int dir, int strength, int spell_type, struct archetype *spell_arch)
Definition: spell_util.c:687
int fire_arch_from_position(object *op, object *caster, int16_t x, int16_t y, int dir, struct archetype *at, int type, object *target)
Definition: spell_util.c:615
void tick_the_clock(void)
Definition: weather.c:67
int object_move_to(object *op, int dir, object *originator, mapstruct *m, int x, int y)
Definition: move.c:77
void regions_init(void)
Definition: region.c:47
object * find_god(const char *name)
Definition: gods.c:40
mapstruct * generate_random_map(char *OutFileName, RMParms *RP)
Definition: random_map.c:72
void send_target_command(player *pl)
Definition: request.c:2144
void command_rename(object *op, const char *command, char *params)
Definition: rename.c:37
Definition: race.h:36
spell_struct spells[NROFREALSPELLS]
Definition: spellist.h:34
char ** rotate_layout(char **maze, int rotation, RMParms *RP)
Definition: random_map.c:439
int world_darkness
Definition: init.c:61
void play_sound_map(mapstruct *map, int type, const char *filename, int x, int y, int loop, int volume)
Definition: sounds.c:159
struct settings_struct settings
Definition: init.c:55
StringBuffer * object_get_name_description(const object *op, const object *caller, StringBuffer *sb)
Definition: item.c:1240
void command_resetmap(object *op, const char *command, char *params)
Definition: resetmap.c:36
void command_config(object *op, const char *command, char *params)
Definition: config.c:39
void put_doors(mapstruct *the_map, char **maze, char *doorstyle, RMParms *RP)
Definition: door.c:90
unsigned int query_flags(object *op)
Definition: item.c:51
int check_good_weapon(object *who, object *item)
Definition: monster.c:1764
void remove_light_source_list(mapstruct *map)
Definition: light.c:424
void shop_insert_coins(object *op, int64_t value)
Definition: shop.c:587
void metaserver_stats(char *buf, size_t size)
Definition: metaserver.c:643
const char *const lose_msg[NUM_STATS]
Definition: living.c:203
void sleep_delta(void)
Definition: time.c:174
int common_object_process_pre(object *op)
Definition: process.c:123
char * object_get_description_path_s(const object *op, const object *caller, const uint32_t path, const char *name)
Definition: item.c:811
int wc_bonus[MAX_STAT+1]
Definition: living.c:57
void set_block(int x, int y, int bx, int by)
Definition: los.c:145
void free_all_images(void)
Definition: image.c:183
object * treasure_generate_single(treasure_list_t *treasure_list, int difficulty, int artifact_chance)
Definition: treasure.c:1672
double falling_mitigation[MAX_STAT+1]
Definition: living.c:110
void reset_sleep(void)
Definition: time.c:130
int object_apply_item(object *op, object *applier, int aflags)
Definition: apply.c:110
void race_free(void)
Definition: race.c:225
void command_apply(object *op, const char *command, char *params)
Definition: apply.c:75
int SP_level_dam_adjust(object *caster, int spell_type, bool exact)
Definition: spell_util.c:992
void face_get_data(int face, uint8_t **ptr, uint16_t *len)
Definition: image.c:272
object * get_event_object(object *op, int event_nr)
Definition: plugins.c:121
int skill_attack(object *tmp, object *pl, int dir, char *string)
Definition: skill_util.c:377
void command_who(object *op, const char *command, char *params)
Definition: who.c:37
object * common_object_projectile_fire_missile(object *op, object *shooter, int dir)
Definition: projectile.c:301
int region_enter_jail(object *op)
Definition: region.c:350
void flush_old_maps(void)
Definition: swap.c:208
void command_chat(object *op, const char *command, char *params)
Definition: chat.c:37
void command_stats(object *op, const char *command, char *params)
Definition: stats.c:44
shstr_constants shstr_cons
Definition: init.c:58
int path_get_next(shstr *buf, int16_t *off, shstr **mappath, mapstruct **map, int *x, int *y, uint32_t *flags)
Definition: pathfinder.c:652
int get_random_dir(void)
Definition: move.c:41
void draw_info_map(uint8_t type, const char *name, const char *color, mapstruct *map, int x, int y, int dist, object *op, object *op2, const char *buf)
Definition: info.c:195
void statistics_player_logout(player *pl)
Definition: statistics.c:111
void form_party(object *op, const char *name)
Definition: party.c:191
float speed_bonus[MAX_STAT+1]
Definition: living.c:97
const char * month_name[MONTHS_PER_YEAR]
Definition: time.c:72
void esrv_update_item(int flags, object *op)
Definition: item.c:639
void version(object *op)
Definition: main.c:84
void set_max_time(long t)
Definition: time.c:239
void write_map_log(void)
Definition: swap.c:37
void init_world_darkness(void)
Definition: weather.c:43
struct archetype * spellarch[NROFREALSPELLS]
Definition: spell_util.c:43
Definition: tod.h:65
void esrv_new_player(player *pl, uint32_t weight)
Definition: request.c:337
int fire_bolt(object *op, object *caster, int dir, int type)
Definition: spell_util.c:545
StringBuffer * object_get_description_attacks(const object *op, const object *caller, StringBuffer *sb)
Definition: item.c:634
void print_tod(object *op)
Definition: time.c:301
int book_overflow(const char *buf1, const char *buf2, size_t booksize)
Definition: readable.c:346
int surround_flag(char **layout, int i, int j, RMParms *RP)
Definition: wall.c:45
void send_quickslots(player *pl)
Definition: item.c:870
shstr * name
More definite name, like "kobold".
Definition: arch.h:46
void command_afk(object *op, const char *command, char *params)
Definition: afk.c:37
Socket_Info socket_info
Definition: init.c:39
void animate_turning(object *op)
Definition: anim.c:216
int surround_flag4(mapstruct *map, int i, int j, RMParms *RP)
Definition: wall.c:158
void free_all_readable(void)
Definition: readable.c:896
void metaserver_deinit(void)
Definition: metaserver.c:122
bool shop_pay_item(object *op, object *item)
Definition: shop.c:465
int spell_get_random(int level, int flags)
Definition: spell_util.c:1230
void check_stat_bounds(living *stats)
Definition: living.c:333
void check_light_source_list(mapstruct *map)
Definition: light.c:324
void update_los(object *op)
Definition: los.c:314
void trigger_global_event(int event_type, void *parm1, void *parm2)
Definition: plugins.c:455
int living_update(object *op)
Definition: living.c:1661
void(* command_func)(object *op, const char *command, char *params)
Definition: commands.h:44
socket_struct * init_sockets
Definition: init.c:41
int monster_signal_chance[MAX_STAT+1]
Definition: living.c:152
ob_race * race_get_random(void)
Definition: race.c:175
void free_all_treasures(void)
Definition: treasure.c:1737
int cast_cause_disease(object *op, object *caster, int dir, struct archetype *disease_arch, int type)
mapstruct * make_map_floor(char *floorstyle, RMParms *RP)
Definition: floor.c:43
const region_struct * region_find_with_map(const region_struct *region)
Definition: region.c:285
void esrv_update_stats(player *pl)
Definition: request.c:187
void set_trapped_flag(object *op)
Definition: item.c:1386
void bottom_centered_onion(char **maze, int xsize, int ysize, int option, int layers)
int player_apply(object *pl, object *op, int aflag, int quiet)
Definition: apply.c:123
void set_max_time_multiplier(int t)
Definition: time.c:259
party_struct * find_party(const char *name)
Definition: party.c:208
int surround_check(char **layout, int i, int j, int Xsize, int Ysize)
Definition: rogue_layout.c:71
char * object_get_description_s(const object *op, const object *caller)
Definition: item.c:1222
void monster_drop_arrows(object *op)
Definition: monster.c:1887
treasure_list_t * treasure_list_find(const char *name)
Definition: treasure.c:789
void bottom_right_centered_onion(char **maze, int xsize, int ysize, int option, int layers)
int check_skill_to_fire(object *op, object *weapon)
Definition: skill_util.c:252
void time_info(object *op)
Definition: time.c:328
object * path_get_next_request(void)
Definition: pathfinder.c:303
void treasure_init(void)
Definition: treasure.c:754
int get_environment_level(object *op)
Definition: treasure.c:1762
const char *const party_loot_modes[PARTY_LOOT_MAX]
Definition: party.c:38
char ** maze_gen(int xsize, int ysize, int option)
Definition: maze_gen.c:69
StringBuffer * object_get_description(const object *op, const object *caller, StringBuffer *sb)
Definition: item.c:839
void remove_trap(object *op)
Definition: skills.c:115
object * retrofit_joined_wall(mapstruct *the_map, int i, int j, int insert_flag, RMParms *RP)
Definition: wall.c:333
player * first_player
Definition: main.c:57
int nrofpixmaps
Definition: image.c:67
void command_tls(object *op, const char *command, char *params)
Definition: tls.c:37
void command_push(object *op, const char *command, char *params)
Definition: push.c:36
int trap_show(object *trap, object *where)
Definition: rune.c:73
void cast_magic_storm(object *op, object *tmp, int lvl)
Definition: spell_effect.c:45
void party_handle_corpse(object *pl, object *corpse)
Definition: party.c:424
double dam_bonus[MAX_STAT+1]
Definition: living.c:44
int move_ob(object *op, int dir, object *originator)
Definition: move.c:155
int trap_see(object *op, object *trap, int level)
Definition: rune.c:46
object * living_find_base_info(object *op)
Definition: living.c:1705
void put_decor(mapstruct *map, char **layout, RMParms *RP)
Definition: decor.c:42
object * find_enemy(object *npc, rv_vector *rv)
Definition: monster.c:350
Definition: map.h:536
char ** map_gen_onion(int xsize, int ysize, int option, int layers)
shstr * path_encode(path_node_t *path)
Definition: pathfinder.c:589
int finger_of_death(object *op, object *target)
char * object_get_title_s(const object *op, const object *caller)
Definition: item.c:282
skill_struct skills[NROFSKILLS]
Definition: skillist.h:62
int first_map_x
Definition: init.c:70
char ** make_square_spiral_layout(int xsize, int ysize)
Definition: square_spiral.c:66
const char *const short_stat_name[NUM_STATS]
Definition: living.c:221
void command_left(object *op, const char *command, char *params)
Definition: left.c:36
void place_monsters(mapstruct *map, char *monsterstyle, int difficulty, RMParms *RP)
Definition: monster.c:46
const char * item_races[NROF_ITEM_RACES]
Definition: race.c:37
int cast_identify(object *op, int level, object *single_ob, int mode)
Definition: spell_effect.c:997
int main(int argc, char **argv)
Definition: main.c:588
int is_valid_faceset(int fsn)
Definition: image.c:82
mapstruct * first_map
Definition: main.c:59
void esrv_send_inventory(object *pl, object *op)
Definition: item.c:557
void command_memleak(object *op, const char *command, char *params)
Definition: memleak.c:35
void command_freeze(object *op, const char *command, char *params)
Definition: freeze.c:38
player * last_player
Definition: main.c:67
int savethrow[MAXLEVEL+1]
Definition: living.c:165
void socket_buffer_write(socket_struct *ns)
Definition: lowlevel.c:88
void connection_object_add(object *op, mapstruct *map, int connected)
Definition: connection.c:44
void set_map_timeout(mapstruct *map)
Definition: main.c:124
void map_event_free(map_event *tmp)
Definition: plugins.c:392
void command_tell(object *op, const char *command, char *params)
Definition: tell.c:38
void common_object_projectile_process(object *op)
Definition: projectile.c:68
void free_strings(void)
Definition: init.c:104
void cone_drop(object *op)
Definition: spell_util.c:777
void remove_plugins(void)
Definition: plugins.c:345
int64_t bank_get_balance(object *op)
Definition: bank.c:278
int check_good_armour(object *who, object *item)
Definition: monster.c:1811
void free_style_maps(void)
Definition: style.c:312
void command_whereami(object *op, const char *command, char *params)
Definition: whereami.c:36
void command_tp(object *op, const char *command, char *params)
Definition: tp.c:38
void add_party_member(party_struct *party, object *op)
Definition: party.c:84
const char * re_cmp(const char *, const char *)
Definition: re-cmp.c:76
void living_update_player(object *op)
Definition: living.c:614