1 | /* alchemy.c */ |
1 | /* alchemy.c */ |
2 | int need_identify (const object *obj); |
2 | int need_identify (const object *obj); |
3 | int apply_shop_mat (object *shop_mat, object *op); |
3 | int apply_shop_mat (object *shop_mat, object *op); |
4 | const char *cost_string_from_value(uint64 cost, int approx); |
4 | const char *cost_string_from_value(sint64 cost, int approx); |
5 | void pay_player (object *pl, uint64 amount); |
5 | void pay_player (object *pl, sint64 amount); |
6 | uint64 pay_player_arch (object *pl, const char *arch, uint64 amount); |
6 | sint64 pay_player_arch (object *pl, const char *arch, sint64 amount); |
7 | void attempt_do_alchemy(object *caster, object *cauldron); |
7 | void attempt_do_alchemy(object *caster, object *cauldron); |
8 | int content_recipe_value(object *op); |
8 | int content_recipe_value(object *op); |
9 | int numb_ob_inside(object *op); |
9 | int numb_ob_inside(object *op); |
10 | object *attempt_recipe(object *caster, object *cauldron, int ability, recipe *rp, int nbatches); |
10 | object *attempt_recipe(object *caster, object *cauldron, int ability, recipe *rp, int nbatches); |
11 | void adjust_product(object *item, int lvl, int yield); |
11 | void adjust_product(object *item, int lvl, int yield); |
… | |
… | |
41 | int unapply_for_ob(object *who, object *op, int aflags); |
41 | int unapply_for_ob(object *who, object *op, int aflags); |
42 | int can_apply_object(object *who, object *op); |
42 | int can_apply_object(object *who, object *op); |
43 | int apply_special(object *who, object *op, int aflags); |
43 | int apply_special(object *who, object *op, int aflags); |
44 | int monster_apply_special(object *who, object *op, int aflags); |
44 | int monster_apply_special(object *who, object *op, int aflags); |
45 | int auto_apply(object *op); |
45 | int auto_apply(object *op); |
46 | void fix_auto_apply(mapstruct *m); |
46 | void fix_auto_apply(maptile *m); |
47 | void eat_special_food(object *who, object *food); |
47 | void eat_special_food(object *who, object *food); |
48 | void apply_lighter(object *who, object *lighter); |
48 | void apply_lighter(object *who, object *lighter); |
49 | void scroll_failure(object *op, int failure, int power); |
49 | void scroll_failure(object *op, int failure, int power); |
50 | void apply_changes_to_player(object *pl, object *change); |
50 | void apply_changes_to_player(object *pl, object *change); |
51 | void apply_item_transformer(object *pl, object *transformer); |
51 | void apply_item_transformer(object *pl, object *transformer); |
… | |
… | |
434 | void destroy_object(object *op); |
434 | void destroy_object(object *op); |
435 | int save_player(object *op, int flag); |
435 | int save_player(object *op, int flag); |
436 | void copy_file(const char *filename, FILE *fpout); |
436 | void copy_file(const char *filename, FILE *fpout); |
437 | void check_login(object *op); |
437 | void check_login(object *op); |
438 | /* main.c */ |
438 | /* main.c */ |
|
|
439 | void server_tick (); |
439 | void version(object *op); |
440 | void version(object *op); |
440 | void info_keys(object *op); |
441 | void info_keys(object *op); |
441 | void start_info(object *op); |
442 | void start_info(object *op); |
442 | char *crypt_string(char *str, char *salt); |
443 | char *crypt_string(char *str, char *salt); |
443 | int check_password(char *typed, char *crypted); |
444 | int check_password(char *typed, char *crypted); |
444 | void enter_player_savebed(object *op); |
445 | void enter_player_savebed(object *op); |
445 | void leave_map(object *op); |
446 | void leave_map(object *op); |
446 | void set_map_timeout(mapstruct *oldmap); |
447 | void set_map_timeout(maptile *oldmap); |
447 | char *clean_path(const char *file); |
448 | char *clean_path(const char *file); |
448 | char *unclean_path(const char *src); |
449 | char *unclean_path(const char *src); |
449 | void enter_exit(object *op, object *exit_ob); |
450 | void enter_exit(object *op, object *exit_ob); |
450 | void process_active_maps(void); |
451 | void process_active_maps(void); |
451 | void process_players1(mapstruct *map); |
452 | void process_players1(maptile *map); |
452 | void process_players2(mapstruct *map); |
453 | void process_players2(maptile *map); |
453 | void process_events(mapstruct *map); |
454 | void process_events(maptile *map); |
454 | void clean_tmp_files(void); |
455 | void clean_tmp_files(void); |
455 | void cleanup(void); |
456 | void cleanup(void); |
456 | void leave(player *pl, int draw_exit); |
457 | void leave(player *pl,int draw_exit); |
457 | int forbid_play(void); |
458 | int forbid_play(void); |
458 | void do_specials(void); |
459 | void do_specials(void); |
459 | int main(int argc, char **argv); |
460 | int main(int argc, char **argv); |
460 | /* monster.c */ |
461 | /* monster.c */ |
461 | object *check_enemy(object *npc, rv_vector *rv); |
462 | object *check_enemy(object *npc, rv_vector *rv); |
… | |
… | |
489 | void pace_movev(object *ob); |
490 | void pace_movev(object *ob); |
490 | void pace_moveh(object *ob); |
491 | void pace_moveh(object *ob); |
491 | void pace2_movev(object *ob); |
492 | void pace2_movev(object *ob); |
492 | void pace2_moveh(object *ob); |
493 | void pace2_moveh(object *ob); |
493 | void rand_move(object *ob); |
494 | void rand_move(object *ob); |
494 | void check_earthwalls(object *op, mapstruct *m, int x, int y); |
495 | void check_earthwalls(object *op, maptile *m, int x, int y); |
495 | void check_doors(object *op, mapstruct *m, int x, int y); |
496 | void check_doors(object *op, maptile *m, int x, int y); |
496 | void communicate(object *op, const char *txt); |
497 | void communicate(object *op, const char *txt); |
497 | int talk_to_npc(object *op, object *npc, const char *txt); |
498 | int talk_to_npc(object *op, object *npc, const char *txt); |
498 | int talk_to_wall(object *pl, object *npc, const char *txt); |
499 | int talk_to_wall(object *pl, object *npc, const char *txt); |
499 | object *find_mon_throw_ob(object *op); |
500 | object *find_mon_throw_ob(object *op); |
500 | int can_detect_enemy(object *op, object *enemy, rv_vector *rv); |
501 | int can_detect_enemy(object *op, object *enemy, rv_vector *rv); |
… | |
… | |
504 | int move_object(object *op, int dir); |
505 | int move_object(object *op, int dir); |
505 | int move_ob(object *op, int dir, object *originator); |
506 | int move_ob(object *op, int dir, object *originator); |
506 | int transfer_ob(object *op, int x, int y, int randomly, object *originator); |
507 | int transfer_ob(object *op, int x, int y, int randomly, object *originator); |
507 | int teleport(object *teleporter, uint8 tele_type, object *user); |
508 | int teleport(object *teleporter, uint8 tele_type, object *user); |
508 | void recursive_roll(object *op, int dir, object *pusher); |
509 | void recursive_roll(object *op, int dir, object *pusher); |
509 | int try_fit(object *op, mapstruct *m, int x, int y); |
510 | int try_fit(object *op, maptile *m, int x, int y); |
510 | int roll_ob(object *op, int dir, object *pusher); |
511 | int roll_ob(object *op, int dir, object *pusher); |
511 | int push_ob(object *who, int dir, object *pusher); |
512 | int push_ob(object *who, int dir, object *pusher); |
512 | /* pets.c */ |
513 | /* pets.c */ |
513 | object *get_pet_enemy(object *pet, rv_vector *rv); |
514 | object *get_pet_enemy(object *pet, rv_vector *rv); |
514 | void terminate_all_pets(object *owner); |
515 | void terminate_all_pets(object *owner); |
515 | void remove_all_pets(mapstruct *map); |
516 | void remove_all_pets(maptile *map); |
516 | int follow_owner(object *ob, object *owner); |
517 | int follow_owner(object *ob, object *owner); |
517 | void pet_move(object *ob); |
518 | void pet_move(object *ob); |
518 | object *fix_summon_pet(archetype *at, object *op, int dir, int is_golem); |
519 | object *fix_summon_pet(archetype *at, object *op, int dir, int is_golem); |
519 | void move_golem(object *op); |
520 | void move_golem(object *op); |
520 | void control_golem(object *op, int dir); |
521 | void control_golem(object *op, int dir); |
… | |
… | |
590 | void plugins_display_list(object *op); |
591 | void plugins_display_list(object *op); |
591 | void *cfapi_system_find_animation(int *type, ...); |
592 | void *cfapi_system_find_animation(int *type, ...); |
592 | void *cfapi_system_strdup_local(int *type, ...); |
593 | void *cfapi_system_strdup_local(int *type, ...); |
593 | void *cfapi_system_register_global_event(int *type, ...); |
594 | void *cfapi_system_register_global_event(int *type, ...); |
594 | void *cfapi_system_unregister_global_event(int *type, ...); |
595 | void *cfapi_system_unregister_global_event(int *type, ...); |
595 | void *cfapi_system_add_string(int *type, ...); |
|
|
596 | void *cfapi_system_remove_string(int *type, ...); |
|
|
597 | void *cfapi_system_check_path(int *type, ...); |
596 | void *cfapi_system_check_path(int *type, ...); |
598 | void *cfapi_system_re_cmp(int *type, ...); |
597 | void *cfapi_system_re_cmp(int *type, ...); |
599 | void *cfapi_system_directory(int *type, ...); |
598 | void *cfapi_system_directory(int *type, ...); |
600 | void *cfapi_map_get_map(int *type, ...); |
599 | void *cfapi_map_get_map(int *type, ...); |
601 | void *cfapi_map_has_been_loaded(int *type, ...); |
600 | void *cfapi_map_has_been_loaded(int *type, ...); |
… | |
… | |
679 | int trap_see(object *op, object *trap); |
678 | int trap_see(object *op, object *trap); |
680 | int trap_show(object *trap, object *where); |
679 | int trap_show(object *trap, object *where); |
681 | int trap_disarm(object *disarmer, object *trap, int risk, object *skill); |
680 | int trap_disarm(object *disarmer, object *trap, int risk, object *skill); |
682 | void trap_adjust(object *trap, int difficulty); |
681 | void trap_adjust(object *trap, int difficulty); |
683 | /* shop.c */ |
682 | /* shop.c */ |
|
|
683 | int get_payment(object *pl); |
684 | uint64 query_cost(const object *tmp, object *who, int flag); |
684 | sint64 query_cost(const object *tmp, object *who, int flag); |
685 | const char *query_cost_string(const object *tmp, object *who, int flag); |
685 | const char *query_cost_string(const object *tmp, object *who, int flag); |
686 | uint64 query_money(const object *op); |
686 | sint64 query_money(const object *op); |
687 | int pay_for_amount(uint64 to_pay, object *pl); |
687 | int pay_for_amount(sint64 to_pay, object *pl); |
688 | int pay_for_item(object *op, object *pl); |
688 | int pay_for_item(object *op, object *pl); |
689 | int can_pay(object *pl); |
689 | int can_pay(object *pl); |
690 | int get_payment(object *pl, object *op); |
|
|
691 | void sell_item(object *op, object *pl); |
690 | void sell_item(object *op, object *pl); |
692 | double shopkeeper_approval(const mapstruct *map, const object *player); |
691 | double shopkeeper_approval(const maptile *map, const object *player); |
693 | int describe_shop(const object *op); |
692 | int describe_shop(const object *op); |
694 | void shop_listing(object *op); |
693 | void shop_listing(object *op); |
|
|
694 | bool is_in_shop (object *o); |
|
|
695 | bool is_in_shop (maptile *map, int x, int y); |
695 | /* skills.c */ |
696 | /* skills.c */ |
696 | int steal(object *op, int dir, object *skill); |
697 | int steal(object *op, int dir, object *skill); |
697 | int pick_lock(object *pl, int dir, object *skill); |
698 | int pick_lock(object *pl, int dir, object *skill); |
698 | int hide(object *op, object *skill); |
699 | int hide(object *op, object *skill); |
699 | int jump(object *pl, int dir, object *skill); |
700 | int jump(object *pl, int dir, object *skill); |
… | |
… | |
787 | /* spell_util.c */ |
788 | /* spell_util.c */ |
788 | object *find_random_spell_in_ob(object *ob, const char *skill); |
789 | object *find_random_spell_in_ob(object *ob, const char *skill); |
789 | void set_spell_skill(object *op, object *caster, object *spob, object *dest); |
790 | void set_spell_skill(object *op, object *caster, object *spob, object *dest); |
790 | void init_spells(void); |
791 | void init_spells(void); |
791 | void dump_spells(void); |
792 | void dump_spells(void); |
792 | void spell_effect(object *spob, int x, int y, mapstruct *map, object *originator); |
793 | void spell_effect(object *spob, int x, int y, maptile *map, object *originator); |
793 | int min_casting_level(object *caster, object *spell); |
794 | int min_casting_level(object *caster, object *spell); |
794 | int caster_level(object *caster, object *spell); |
795 | int caster_level(object *caster, object *spell); |
795 | sint16 SP_level_spellpoint_cost(object *caster, object *spell, int flags); |
796 | sint16 SP_level_spellpoint_cost(object *caster, object *spell, int flags); |
796 | int SP_level_dam_adjust(object *caster, object *spob); |
797 | int SP_level_dam_adjust(object *caster, object *spob); |
797 | int SP_level_duration_adjust(object *caster, object *spob); |
798 | int SP_level_duration_adjust(object *caster, object *spob); |
798 | int SP_level_range_adjust(object *caster, object *spob); |
799 | int SP_level_range_adjust(object *caster, object *spob); |
799 | object *check_spell_known(object *op, const char *name); |
800 | object *check_spell_known(object *op, const char *name); |
800 | object *lookup_spell_by_name(object *op, const char *spname); |
801 | object *lookup_spell_by_name(object *op, const char *spname); |
801 | int reflwall(mapstruct *m, int x, int y, object *sp_op); |
802 | int reflwall(maptile *m, int x, int y, object *sp_op); |
802 | int cast_create_obj(object *op, object *caster, object *new_op, int dir); |
803 | int cast_create_obj(object *op, object *caster, object *new_op, int dir); |
803 | int ok_to_put_more(mapstruct *m, sint16 x, sint16 y, object *op, int immune_stop); |
804 | int ok_to_put_more(maptile *m, sint16 x, sint16 y, object *op, int immune_stop); |
804 | int fire_arch_from_position(object *op, object *caster, sint16 x, sint16 y, int dir, object *spell); |
805 | int fire_arch_from_position(object *op, object *caster, sint16 x, sint16 y, int dir, object *spell); |
805 | void regenerate_rod(object *rod); |
806 | void regenerate_rod(object *rod); |
806 | void drain_rod_charge(object *rod); |
807 | void drain_rod_charge(object *rod); |
807 | object *find_target_for_friendly_spell(object *op, int dir); |
808 | object *find_target_for_friendly_spell(object *op, int dir); |
808 | int spell_find_dir(mapstruct *m, int x, int y, object *exclude); |
809 | int spell_find_dir(maptile *m, int x, int y, object *exclude); |
809 | void put_a_monster(object *op, const char *monstername); |
810 | void put_a_monster(object *op, const char *monstername); |
810 | int summon_hostile_monsters(object *op, int n, const char *monstername); |
811 | int summon_hostile_monsters(object *op, int n, const char *monstername); |
811 | void shuffle_attack(object *op, int change_face); |
812 | void shuffle_attack(object *op, int change_face); |
812 | void prayer_failure(object *op, int failure, int power); |
813 | void prayer_failure(object *op, int failure, int power); |
813 | void spell_failure(object *op, int failure, int power, object *skill); |
814 | void spell_failure(object *op, int failure, int power, object *skill); |
… | |
… | |
819 | /* swamp.c */ |
820 | /* swamp.c */ |
820 | void walk_on_deep_swamp(object *op, object *victim); |
821 | void walk_on_deep_swamp(object *op, object *victim); |
821 | void move_deep_swamp(object *op); |
822 | void move_deep_swamp(object *op); |
822 | /* swap.c */ |
823 | /* swap.c */ |
823 | void read_map_log(void); |
824 | void read_map_log(void); |
824 | void swap_map(mapstruct *map); |
825 | void swap_map(maptile *map); |
825 | void check_active_maps(void); |
826 | void check_active_maps(void); |
826 | mapstruct *map_least_timeout(char *except_level); |
827 | maptile *map_least_timeout(char *except_level); |
827 | void swap_below_max(char *except_level); |
828 | void swap_below_max(char *except_level); |
828 | int players_on_map(mapstruct *m, int show_all); |
829 | int players_on_map(maptile *m, int show_all); |
829 | void flush_old_maps(void); |
830 | void flush_old_maps(void); |
830 | /* time.c */ |
831 | /* time.c */ |
831 | void remove_door(object *op); |
832 | void remove_door(object *op); |
832 | void remove_door2(object *op); |
833 | void remove_door2(object *op); |
833 | void generate_monster_inv(object *gen); |
834 | void generate_monster_inv(object *gen); |
… | |
… | |
840 | void move_timed_gate(object *op); |
841 | void move_timed_gate(object *op); |
841 | void move_detector(object *op); |
842 | void move_detector(object *op); |
842 | void animate_trigger(object *op); |
843 | void animate_trigger(object *op); |
843 | void move_hole(object *op); |
844 | void move_hole(object *op); |
844 | object *stop_item(object *op); |
845 | object *stop_item(object *op); |
845 | void fix_stopped_item(object *op, mapstruct *map, object *originator); |
846 | void fix_stopped_item(object *op, maptile *map, object *originator); |
846 | object *fix_stopped_arrow(object *op); |
847 | object *fix_stopped_arrow(object *op); |
847 | void move_arrow(object *op); |
848 | void move_arrow(object *op); |
848 | void change_object(object *op); |
849 | void change_object(object *op); |
849 | void move_teleporter(object *op); |
850 | void move_teleporter(object *op); |
850 | void move_player_changer(object *op); |
851 | void move_player_changer(object *op); |
… | |
… | |
859 | void cftimer_process_event(object *ob); |
860 | void cftimer_process_event(object *ob); |
860 | int cftimer_create(int id, long delay, object *ob, int mode); |
861 | int cftimer_create(int id, long delay, object *ob, int mode); |
861 | int cftimer_destroy(int id); |
862 | int cftimer_destroy(int id); |
862 | int cftimer_find_free_id(void); |
863 | int cftimer_find_free_id(void); |
863 | /* weather.c */ |
864 | /* weather.c */ |
864 | void set_darkness_map(mapstruct *m); |
865 | void set_darkness_map(maptile *m); |
865 | void tick_the_clock(void); |
866 | void tick_the_clock(void); |
866 | void init_weather(void); |
867 | void init_weather(void); |
867 | void weather_effect(const char *filename); |
868 | void weather_effect(const char *filename); |
868 | int worldmap_to_weathermap(int x, int y, int *wx, int *wy, mapstruct *m); |
869 | int worldmap_to_weathermap(int x, int y, int *wx, int *wy, maptile *m); |
869 | int real_world_temperature(int x, int y, mapstruct *m); |
870 | int real_world_temperature(int x, int y, maptile *m); |
870 | int similar_direction(int a, int b); |
871 | int similar_direction(int a, int b); |