1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * |
5 | * |
6 | * Deliantra is free software: you can redistribute it and/or modify |
6 | * Deliantra is free software: you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by |
7 | * it under the terms of the GNU General Public License as published by |
8 | * the Free Software Foundation, either version 3 of the License, or |
8 | * the Free Software Foundation, either version 3 of the License, or |
9 | * (at your option) any later version. |
9 | * (at your option) any later version. |
… | |
… | |
132 | int command_version (object *op, char *params); |
132 | int command_version (object *op, char *params); |
133 | void bug_report (const char *reportstring); |
133 | void bug_report (const char *reportstring); |
134 | int command_statistics (object *pl, char *params); |
134 | int command_statistics (object *pl, char *params); |
135 | int command_fix_me (object *op, char *params); |
135 | int command_fix_me (object *op, char *params); |
136 | int command_players (object *op, char *paramss); |
136 | int command_players (object *op, char *paramss); |
137 | int command_logs (object *op, char *params); |
|
|
138 | int command_bowmode (object *op, char *params); |
137 | int command_bowmode (object *op, char *params); |
139 | int command_showpets (object *op, char *params); |
138 | int command_showpets (object *op, char *params); |
140 | int command_resistances (object *op, char *params); |
139 | int command_resistances (object *op, char *params); |
141 | int command_help (object *op, char *params); |
140 | int command_help (object *op, char *params); |
142 | int onoff_value (const char *line); |
141 | int onoff_value (const char *line); |
… | |
… | |
175 | int sack_can_hold (object *pl, object *sack, object *op, uint32 nrof); |
174 | int sack_can_hold (object *pl, object *sack, object *op, uint32 nrof); |
176 | void pick_up (object *op, object *alt); |
175 | void pick_up (object *op, object *alt); |
177 | int command_take (object *op, char *params); |
176 | int command_take (object *op, char *params); |
178 | void put_object_in_sack (object *op, object *sack, object *tmp, uint32 nrof); |
177 | void put_object_in_sack (object *op, object *sack, object *tmp, uint32 nrof); |
179 | void drop_object (object *op, object *tmp, uint32 nrof); |
178 | void drop_object (object *op, object *tmp, uint32 nrof); |
180 | void update_after_inventory_change (object *op); |
179 | void drop_object (object *dropper, object *obj); |
181 | void drop (object *op, object *tmp); |
180 | void drop (object *op, object *tmp); |
182 | int command_dropall (object *op, char *params); |
181 | int command_dropall (object *op, char *params); |
183 | int command_drop (object *op, char *params); |
182 | int command_drop (object *op, char *params); |
184 | int command_examine (object *op, char *params); |
183 | int command_examine (object *op, char *params); |
185 | object *find_marked_object (object *op); |
184 | object *find_marked_object (object *op); |
… | |
… | |
196 | void remove_party (partylist *target_party); |
195 | void remove_party (partylist *target_party); |
197 | void obsolete_parties (void); |
196 | void obsolete_parties (void); |
198 | void add_kill_to_party (partylist *party, const char *killer, const char *dead, long exp); |
197 | void add_kill_to_party (partylist *party, const char *killer, const char *dead, long exp); |
199 | int confirm_party_password (object *op); |
198 | int confirm_party_password (object *op); |
200 | void receive_party_password (object *op, char k); |
199 | void receive_party_password (object *op, char k); |
201 | void send_party_message (object *op, char *msg); |
200 | void send_party_message (object *op, const char *msg); |
202 | int command_gsay (object *op, char *params); |
201 | int command_gsay (object *op, char *params); |
203 | int command_party (object *op, char *params); |
202 | int command_party (object *op, char *params); |
204 | |
203 | |
205 | /* c_range.c */ |
204 | /* c_range.c */ |
206 | int command_invoke (object *op, char *params); |
205 | int command_invoke (object *op, char *params); |
… | |
… | |
261 | /* daemon.c */ |
260 | /* daemon.c */ |
262 | FILE *BecomeDaemon (const char *filename); |
261 | FILE *BecomeDaemon (const char *filename); |
263 | |
262 | |
264 | /* disease.c */ |
263 | /* disease.c */ |
265 | int move_disease (object *disease); |
264 | int move_disease (object *disease); |
266 | int remove_symptoms (object *disease); |
|
|
267 | object *find_symptom (object *disease); |
|
|
268 | int check_infection (object *disease); |
|
|
269 | int infect_object (object *victim, object *disease, int force); |
265 | int infect_object (object *victim, object *disease, int force); |
270 | int do_symptoms (object *disease); |
|
|
271 | int grant_immunity (object *disease); |
|
|
272 | int move_symptom (object *symptom); |
266 | int move_symptom (object *symptom); |
273 | int check_physically_infect (object *victim, object *hitter); |
267 | int check_physically_infect (object *victim, object *hitter); |
274 | object *find_disease (object *victim); |
|
|
275 | int cure_disease (object *sufferer, object *caster, object *spell); |
268 | int cure_disease (object *sufferer, object *caster, object *spell); |
276 | int reduce_symptoms (object *sufferer, int reduction); |
|
|
277 | |
269 | |
278 | /* egoitem.c */ |
270 | /* egoitem.c */ |
279 | int create_artifact (object *op, const char *artifactname); |
271 | int create_artifact (object *op, const char *artifactname); |
280 | int apply_power_crystal (object *op, object *crystal); |
272 | int apply_power_crystal (object *op, object *crystal); |
281 | |
273 | |
… | |
… | |
283 | char *spool (char *bp, char *error); |
275 | char *spool (char *bp, char *error); |
284 | void check_score (object *op); |
276 | void check_score (object *op); |
285 | void display_high_score (object *op, int max, const char *match); |
277 | void display_high_score (object *op, int max, const char *match); |
286 | |
278 | |
287 | /* gods.c */ |
279 | /* gods.c */ |
288 | int lookup_god_by_name (const char *name); |
280 | int lookup_god_by_name (shstr_cmp name); |
289 | object *find_god (const char *name); |
281 | object *find_god (shstr_cmp name); |
290 | const char *determine_god (object *op); |
282 | shstr_tmp determine_god (object *op); |
291 | void pray_at_altar (object *pl, object *altar, object *skill); |
283 | void pray_at_altar (object *pl, object *altar, object *skill); |
292 | void become_follower (object *op, object *new_god); |
284 | void become_follower (object *op, object *new_god); |
293 | int worship_forbids_use (object *op, object *exp_obj, uint32 flag, const char *string); |
285 | int worship_forbids_use (object *op, object *exp_obj, uint32 flag, const char *string); |
294 | void stop_using_item (object *op, int type, int number); |
286 | void stop_using_item (object *op, int type, int number); |
295 | void update_priest_flag (object *god, object *exp_ob, uint32 flag); |
287 | void update_priest_flag (object *god, object *exp_ob, uint32 flag); |
296 | archetype *determine_holy_arch (object *god, const char *type); |
288 | archetype *determine_holy_arch (object *god, shstr_cmp type); |
297 | void god_intervention (object *op, object *god, object *skill); |
289 | void god_intervention (object *op, object *god, object *skill); |
298 | int god_examines_priest (object *op, object *god); |
290 | int god_examines_priest (object *op, object *god); |
299 | int god_examines_item (object *god, object *item); |
291 | int god_examines_item (object *god, object *item); |
300 | int get_god (object *priest); |
292 | int get_god (object *priest); |
301 | const char *get_god_for_race (const char *race); |
|
|
302 | int tailor_god_spell (object *spellop, object *caster); |
293 | int tailor_god_spell (object *spellop, object *caster); |
303 | |
294 | |
304 | /* init.c */ |
295 | /* init.c */ |
305 | void set_logfile (char *val); |
296 | void load_settings (void); |
306 | void call_version (void); |
297 | void load_materials (void); |
307 | void showscores (void); |
|
|
308 | void set_debug (void); |
|
|
309 | void unset_debug (void); |
|
|
310 | void set_mondebug (void); |
|
|
311 | void set_dumpmon1 (void); |
|
|
312 | void set_dumpmon2 (void); |
|
|
313 | void set_dumpmon3 (void); |
|
|
314 | void set_dumpmon4 (void); |
|
|
315 | void set_dumpmon5 (void); |
|
|
316 | void set_dumpmon6 (void); |
|
|
317 | void set_dumpmon7 (void); |
|
|
318 | void set_dumpmon8 (void); |
|
|
319 | void set_dumpmon9 (void); |
|
|
320 | void set_dumpmont (char *name); |
|
|
321 | void set_daemon (void); |
|
|
322 | void set_datadir (char *path); |
|
|
323 | void set_confdir (char *path); |
|
|
324 | void set_localdir (char *path); |
|
|
325 | void set_mapdir (char *path); |
|
|
326 | void set_archetypes (char *path); |
|
|
327 | void set_regions (char *path); |
|
|
328 | void set_treasures (char *path); |
|
|
329 | void set_uniquedir (char *path); |
|
|
330 | void set_templatedir (char *path); |
|
|
331 | void set_playerdir (char *path); |
|
|
332 | void set_tmpdir (char *path); |
|
|
333 | void showscoresparm (char *data); |
|
|
334 | void set_csport (char *val); |
|
|
335 | void init (int argc, char **argv); |
298 | void init (int argc, char **argv); |
336 | void usage (void); |
299 | void usage (void); |
337 | void help (void); |
300 | void help (void); |
338 | void init_beforeplay (void); |
301 | void init_beforeplay (void); |
339 | void init_signals (void); |
302 | void init_signals (void); |
… | |
… | |
431 | void move_golem (object *op); |
394 | void move_golem (object *op); |
432 | void control_golem (object *op, int dir); |
395 | void control_golem (object *op, int dir); |
433 | int summon_golem (object *op, object *caster, int dir, object *spob); |
396 | int summon_golem (object *op, object *caster, int dir, object *spob); |
434 | object *choose_cult_monster (object *pl, object *god, int summon_level); |
397 | object *choose_cult_monster (object *pl, object *god, int summon_level); |
435 | int summon_object (object *op, object *caster, object *spell_ob, int dir, const char *stringarg); |
398 | int summon_object (object *op, object *caster, object *spell_ob, int dir, const char *stringarg); |
436 | object *get_real_owner (object *ob); |
|
|
437 | int should_arena_attack (object *pet, object *owner, object *target); |
399 | int should_arena_attack (object *pet, object *owner, object *target); |
438 | |
400 | |
439 | /* player.c */ |
401 | /* player.c */ |
440 | player *find_player (const char *plname); |
402 | player *find_player (const char *plname); |
441 | player *find_player_partial_name (const char *plname); |
403 | player *find_player_partial_name (const char *plname); |
… | |
… | |
459 | int key_change_class (object *op, char key); |
421 | int key_change_class (object *op, char key); |
460 | int key_confirm_quit (object *op, char key); |
422 | int key_confirm_quit (object *op, char key); |
461 | void flee_player (object *op); |
423 | void flee_player (object *op); |
462 | int check_pick (object *op); |
424 | int check_pick (object *op); |
463 | object *find_arrow (object *op, const char *type); |
425 | object *find_arrow (object *op, const char *type); |
464 | object *find_better_arrow (object *op, object *target, const char *type, int *better); |
426 | object *find_better_arrow (object *op, object *target, shstr_cmp type, int *better); |
465 | object *pick_arrow_target (object *op, const char *type, int dir); |
427 | object *pick_arrow_target (object *op, shstr_cmp type, int dir); |
466 | int fire_bow (object *op, object *part, object *arrow, int dir, int wc_mod, sint16 sx, sint16 sy); |
428 | int fire_bow (object *op, object *part, object *arrow, int dir, int wc_mod, sint16 sx, sint16 sy); |
467 | int player_fire_bow (object *op, int dir); |
429 | int player_fire_bow (object *op, int dir); |
468 | void fire_misc_object (object *op, int dir); |
430 | void fire_misc_object (object *op, int dir); |
469 | bool fire (object *op, int dir); |
431 | bool fire (object *op, int dir); |
470 | object *find_key (object *pl, object *container, object *door); |
432 | object *find_key (object *pl, object *container, object *door); |
471 | bool move_player_attack (object *op, int dir); |
433 | bool move_player_attack (object *op, int dir); |
472 | bool move_player (object *op, int dir); |
434 | bool move_player (object *op, int dir); |
473 | bool handle_newcs_player (object *op); |
435 | bool handle_newcs_player (object *op); |
474 | int save_life (object *op); |
436 | int save_life (object *op); |
475 | char *gravestone_text (object *op); |
437 | const char *gravestone_text (object *op); |
476 | void do_some_living (object *op); |
438 | void do_some_living (object *op); |
477 | void kill_player (object *op); |
439 | void kill_player (object *op); |
478 | void loot_object (object *op); |
440 | void loot_object (object *op); |
479 | void fix_weight (void); |
441 | void fix_weight (void); |
480 | void fix_luck (void); |
442 | void fix_luck (void); |
… | |
… | |
514 | const char *query_cost_string (const object *tmp, object *who, int flag); |
476 | const char *query_cost_string (const object *tmp, object *who, int flag); |
515 | sint64 query_money (const object *op); |
477 | sint64 query_money (const object *op); |
516 | int pay_for_amount (sint64 to_pay, object *pl); |
478 | int pay_for_amount (sint64 to_pay, object *pl); |
517 | int pay_for_item (object *op, object *pl); |
479 | int pay_for_item (object *op, object *pl); |
518 | int can_pay (object *pl); |
480 | int can_pay (object *pl); |
519 | void sell_item (object *op, object *pl); |
481 | bool sell_item (object *op, object *pl); |
520 | double shopkeeper_approval (const maptile *map, const object *player); |
482 | double shopkeeper_approval (const maptile *map, const object *player); |
521 | int describe_shop (const object *op); |
483 | int describe_shop (const object *op); |
522 | void shop_listing (object *sign, object *op); |
484 | void shop_listing (object *sign, object *op); |
523 | bool is_in_shop (object *o); |
485 | bool is_in_shop (object *o); |
524 | bool is_in_shop (maptile *map, int x, int y); |
486 | bool is_in_shop (maptile *map, int x, int y); |
… | |
… | |
613 | void move_aura (object *aura); |
575 | void move_aura (object *aura); |
614 | void move_peacemaker (object *op); |
576 | void move_peacemaker (object *op); |
615 | int write_mark (object *op, object *spell, const char *msg); |
577 | int write_mark (object *op, object *spell, const char *msg); |
616 | |
578 | |
617 | /* spell_util.c */ |
579 | /* spell_util.c */ |
618 | object *find_random_spell_in_ob (object *ob, const char *skill); |
580 | object *find_random_spell_in_ob (object *ob, shstr_cmp skill = shstr_cmp ()); |
619 | void set_spell_skill (object *op, object *caster, object *spob, object *dest); |
581 | void set_spell_skill (object *op, object *caster, object *spob, object *dest); |
620 | void spell_effect (object *spob, int x, int y, maptile *map, object *originator); |
582 | void spell_effect (object *spob, int x, int y, maptile *map, object *originator); |
621 | int min_casting_level (object *caster, object *spell); |
583 | int min_casting_level (object *caster, object *spell); |
622 | int caster_level (object *caster, object *spell); |
584 | int casting_level (object *caster, object *spell); |
623 | sint16 SP_level_spellpoint_cost (object *caster, object *spell, int flags); |
585 | sint16 SP_level_spellpoint_cost (object *caster, object *spell, int flags); |
624 | int SP_level_dam_adjust (object *caster, object *spob); |
586 | int SP_level_dam_adjust (object *caster, object *spob); |
625 | int SP_level_duration_adjust (object *caster, object *spob); |
587 | int SP_level_duration_adjust (object *caster, object *spob); |
626 | int SP_level_range_adjust (object *caster, object *spob); |
588 | int SP_level_range_adjust (object *caster, object *spob); |
627 | object *check_spell_known (object *op, const char *name); |
589 | object *check_spell_known (object *op, shstr_cmp name); |
628 | object *lookup_spell_by_name (object *op, const char *spname); |
590 | object *lookup_spell_by_name (object *op, const char *spname); |
629 | int reflwall (maptile *m, int x, int y, object *sp_op); |
591 | int reflwall (maptile *m, int x, int y, object *sp_op); |
630 | int cast_create_obj (object *op, object *caster, object *new_op, int dir); |
592 | int cast_create_obj (object *op, object *caster, object *new_op, int dir); |
631 | int ok_to_put_more (maptile *m, sint16 x, sint16 y, object *op, int immune_stop); |
593 | int ok_to_put_more (maptile *m, sint16 x, sint16 y, object *op, int immune_stop); |
632 | int fire_arch_from_position (object *op, object *caster, sint16 x, sint16 y, int dir, object *spell); |
594 | int fire_arch_from_position (object *op, object *caster, sint16 x, sint16 y, int dir, object *spell); |