--- deliantra/server/include/sproto.h 2007/06/21 22:42:48 1.69 +++ deliantra/server/include/sproto.h 2009/11/06 12:27:05 1.109 @@ -1,23 +1,23 @@ /* - * This file is part of Crossfire TRT, the Multiplayer Online Role Playing Game. + * This file is part of Deliantra, the Roguelike Realtime MMORPG. * - * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team + * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * - * Crossfire TRT is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. + * Deliantra is free software: you can redistribute it and/or modify it under + * the terms of the Affero GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along - * with Crossfire TRT; if not, write to the Free Software Foundation, Inc. 51 - * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * You should have received a copy of the Affero GNU General Public License + * and the GNU General Public License along with this program. If not, see + * . * - * The authors can be reached via e-mail to + * The authors can be reached via e-mail to */ /* alchemy.c */ @@ -26,91 +26,49 @@ const char *cost_string_from_value (sint64 cost, int approx); void pay_player (object *pl, sint64 amount); sint64 pay_player_arch (object *pl, const char *arch, sint64 amount); -void attempt_do_alchemy (object *caster, object *cauldron); -int content_recipe_value (object *op); -int numb_ob_inside (object *op); -object *attempt_recipe (object *caster, object *cauldron, int ability, recipe *rp, int nbatches); -void adjust_product (object *item, int lvl, int yield); -object *make_item_from_recipe (object *cauldron, recipe *rp); -object *find_transmution_ob (object *first_ingred, recipe *rp, size_t *rp_arch_index, int create_item); -void alchemy_failure_effect (object *op, object *cauldron, recipe *rp, int danger); -void remove_contents (object *first_ob, object *save_item); -int calc_alch_danger (object *caster, object *cauldron, recipe *rp); +void attempt_do_alchemy (object *caster, object *cauldron, object *skill); /* apply.c */ int transport_can_hold (const object *transport, const object *op, int nrof); int apply_transport (object *pl, object *transport, int aflag); int should_director_abort (object *op, object *victim); int apply_potion (object *op, object *tmp); -int improve_weapon_stat (object *op, object *improver, object *weapon, signed char *stat, int sacrifice_count, const char *statname); -int prepare_weapon (object *op, object *improver, object *weapon); -int improve_weapon (object *op, object *improver, object *weapon); -int check_improve_weapon (object *op, object *tmp); -int improve_armour (object *op, object *improver, object *armour); -int convert_item (object *item, object *converter); -int apply_container (object *op, object *sack); int esrv_apply_container (object *op, object *sack); void move_apply (object *trap, object *victim, object *originator); void do_learn_spell (object *op, object *spell, int special_prayer); void do_forget_spell (object *op, const char *spell); void apply_scroll (object *op, object *tmp, int dir); -int dragon_eat_flesh (object *op, object *meal); void apply_poison (object *op, object *tmp); -int is_legal_2ways_exit (object *op, object *exit); int manual_apply (object *op, object *tmp, int aflag); int player_apply (object *pl, object *op, int aflag, int quiet); void player_apply_below (object *pl); -int unapply_for_ob (object *who, object *op, int aflags); int can_apply_object (object *who, object *op); int apply_special (object *who, object *op, int aflags); -int monster_apply_special (object *who, object *op, int aflags); int auto_apply (object *op); void fix_auto_apply (maptile *m); void eat_special_food (object *who, object *food); -void apply_lighter (object *who, object *lighter); -void scroll_failure (object *op, int failure, int power); void apply_changes_to_player (object *pl, object *change); -void apply_item_transformer (object *pl, object *transformer); +extern void handle_apply_yield (object *op); +void apply_lamp (object *op, bool switch_on); +void get_animation_from_arch (object *op, arch_ptr a); +extern int convert_item (object *item, object *converter); /* attack.c */ void cancellation (object *op); -int did_make_save_item (object *op, int type, object *originator); void save_throw_object (object *op, int type, object *originator); int hit_map (object *op, int dir, int type, int full_hit); -void attack_message (int dam, int type, object *op, object *hitter); int attack_ob (object *op, object *hitter); object *hit_with_arrow (object *op, object *victim); -void tear_down_wall (object *op); -void scare_creature (object *target, object *hitter); int hit_player_attacktype (object *op, object *hitter, int dam, uint32 attacknum, int magic); int kill_object (object *op, int dam, object *hitter, int type); int friendly_fire (object *op, object *hitter); int hit_player (object *op, int dam, object *hitter, int type, int full_hit); -void poison_player (object *op, object *hitter, int dam); -void slow_player (object *op, object *hitter, int dam); void confuse_player (object *op, object *hitter, int dam); void blind_player (object *op, object *hitter, int dam); void paralyze_player (object *op, object *hitter, int dam); -void deathstrike_player (object *op, object *hitter, int *dam); -int adj_attackroll (object *hitter, object *target); -int is_aimed_missile (object *op); /* build_map.c */ -int can_build_over (struct mapdef *map, object *tmp, short x, short y); -void remove_marking_runes (struct mapdef *map, short x, short y); -int find_unused_connected_value (struct mapdef *map); -int find_or_create_connection_for_map (object *pl, short x, short y, object *rune); -object *get_connection_rune (object *pl, short x, short y); -object *get_msg_book (object *pl, short x, short y); -object *get_wall (struct mapdef *map, int x, int y); -void fix_walls (maptile *map, int x, int y); -void fix_walls_around (maptile *map, int x, int y); -void apply_builder_floor (object *pl, object *material, short x, short y); -void apply_builder_wall (object *pl, object *material, short x, short y); -void apply_builder_item (object *pl, object *item, short x, short y); -void apply_builder_remove (object *pl, int dir); void apply_map_builder (object *pl, int dir); -int adjust_sign_msg (object *pl, short x, short y, object *tmp); /* c_misc.c */ int command_motd (object *op, char *params); @@ -136,12 +94,10 @@ int command_statistics (object *pl, char *params); int command_fix_me (object *op, char *params); int command_players (object *op, char *paramss); -int command_logs (object *op, char *params); int command_bowmode (object *op, char *params); int command_showpets (object *op, char *params); int command_resistances (object *op, char *params); int command_help (object *op, char *params); -int onoff_value (const char *line); int command_quit (object *op, char *params); int command_real_quit (object *op, char *params); void receive_player_name (object *op, char k); @@ -163,7 +119,6 @@ /* c_new.c */ void execute_newserver_command (object *pl, char *command); -int bad_command (object *op, char *params); /* c_object.c */ object *find_best_object_match (object *pl, const char *params); @@ -179,6 +134,7 @@ int command_take (object *op, char *params); void put_object_in_sack (object *op, object *sack, object *tmp, uint32 nrof); void drop_object (object *op, object *tmp, uint32 nrof); +void drop_object (object *dropper, object *obj); void drop (object *op, object *tmp); int command_dropall (object *op, char *params); int command_drop (object *op, char *params); @@ -187,7 +143,6 @@ void examine_monster (object *op, object *tmp); const char *long_desc (object *tmp, object *pl); void examine (object *op, object *tmp); -void inventory (object *op, object *inv); int command_pickup (object *op, char *params); void set_pickup_mode (object *op, int i); int command_search_items (object *op, char *params); @@ -195,12 +150,9 @@ /* c_party.c */ partylist *get_firstparty (void); -void remove_party (partylist *target_party); void obsolete_parties (void); void add_kill_to_party (partylist *party, const char *killer, const char *dead, long exp); -int confirm_party_password (object *op); void receive_party_password (object *op, char k); -void send_party_message (object *op, char *msg); int command_gsay (object *op, char *params); int command_party (object *op, char *params); @@ -208,14 +160,11 @@ int command_invoke (object *op, char *params); int command_cast (object *op, char *params); int command_prepare (object *op, char *params); -int command_cast_spell (object *op, char *params, char command); int legal_range (object *op, int r); -void change_spell (object *op, char k); int command_rotateshoottype (object *op, char *params); /* c_wiz.c */ int command_loadtest (object *op, char *params); -void do_wizard_hide (object *op, int silent_dm); int command_hide (object *op, char *params); int command_setgod (object *op, char *params); int command_banish (object *op, char *params); @@ -237,20 +186,13 @@ int command_abil (object *op, char *params); int command_reset (object *op, char *params); int command_nowiz (object *op, char *params); -int do_wizard_dm (object *op, char *params, int silent); int command_dm (object *op, char *params); int command_invisible (object *op, char *params); int command_learn_spell (object *op, char *params); int command_learn_special_prayer (object *op, char *params); int command_forget_spell (object *op, char *params); -int command_listplugins (object *op, char *params); -int command_loadplugin (object *op, char *params); -int command_unloadplugin (object *op, char *params); int command_dmhide (object *op, char *params); -void dm_stack_pop (player *pl); -object *dm_stack_peek (player *pl); void dm_stack_push (player *pl, tag_t item); -object *get_dm_object (player *pl, char **params, int *from); int command_stack_pop (object *op, char *params); int command_stack_push (object *op, char *params); int command_stack_list (object *op, char *params); @@ -268,86 +210,33 @@ /* disease.c */ int move_disease (object *disease); -int remove_symptoms (object *disease); -object *find_symptom (object *disease); -int check_infection (object *disease); int infect_object (object *victim, object *disease, int force); -int do_symptoms (object *disease); -int grant_immunity (object *disease); int move_symptom (object *symptom); int check_physically_infect (object *victim, object *hitter); -object *find_disease (object *victim); -int cure_disease (object *sufferer, object *caster); -int reduce_symptoms (object *sufferer, int reduction); +int cure_disease (object *sufferer, object *caster, object *spell); /* egoitem.c */ -int create_artifact (object *op, const char *artifactname); int apply_power_crystal (object *op, object *crystal); /* hiscore.c */ -char *spool (char *bp, char *error); void check_score (object *op); -void display_high_score (object *op, int max, const char *match); /* gods.c */ -int lookup_god_by_name (const char *name); -object *find_god (const char *name); -const char *determine_god (object *op); +object *find_god (shstr_cmp name); +shstr_tmp determine_god (object *op); void pray_at_altar (object *pl, object *altar, object *skill); void become_follower (object *op, object *new_god); -int worship_forbids_use (object *op, object *exp_obj, uint32 flag, const char *string); -void stop_using_item (object *op, int type, int number); -void update_priest_flag (object *god, object *exp_ob, uint32 flag); -archetype *determine_holy_arch (object *god, const char *type); -void god_intervention (object *op, object *god, object *skill); -int god_examines_priest (object *op, object *god); -int god_examines_item (object *god, object *item); -int get_god (object *priest); -const char *get_god_for_race (const char *race); +archetype *determine_holy_arch (object *god, shstr_cmp type); int tailor_god_spell (object *spellop, object *caster); /* init.c */ -void set_logfile (char *val); -void call_version (void); -void showscores (void); -void set_debug (void); -void unset_debug (void); -void set_mondebug (void); -void set_dumpmon1 (void); -void set_dumpmon2 (void); -void set_dumpmon3 (void); -void set_dumpmon4 (void); -void set_dumpmon5 (void); -void set_dumpmon6 (void); -void set_dumpmon7 (void); -void set_dumpmon8 (void); -void set_dumpmon9 (void); -void set_dumpmont (char *name); -void set_daemon (void); -void set_datadir (char *path); -void set_confdir (char *path); -void set_localdir (char *path); -void set_mapdir (char *path); -void set_archetypes (char *path); -void set_regions (char *path); -void set_treasures (char *path); -void set_uniquedir (char *path); -void set_templatedir (char *path); -void set_playerdir (char *path); -void set_tmpdir (char *path); -void showscoresparm (char *data); -void set_csport (char *val); +void load_settings (void); +void load_materials (void); void init (int argc, char **argv); void usage (void); void help (void); void init_beforeplay (void); -void init_startup (void); -void compile_info (void); void init_signals (void); -void init_races (void); -void dump_races (void); -void add_to_racelist (const char *race_name, object *op); -racelink *get_racelist (void); racelink *find_racelink (const char *name); /* login.c */ @@ -355,7 +244,6 @@ int verify_player (const char *name, char *password); int check_name (player *me, const char *name); int create_savedir_if_needed (char *savedir); -void destroy_object (object *op); void copy_file (const char *filename, FILE *fpout); /* main.c */ @@ -363,54 +251,21 @@ void version (object *op); void info_keys (object *op); char *crypt_string (char *str, char *salt); -int check_password (char *typed, char *crypted); void enter_player_savebed (object *op); void leave_map (object *op); -void set_map_timeout (maptile *oldmap); char *clean_path (const char *file); char *unclean_path (const char *src); void enter_exit (object *op, object *exit_ob); -void process_events (); void clean_tmp_files (void); void leave (player *pl,int draw_exit); -int forbid_play (void); -void do_specials (void); int main (int argc, char **argv); /* monster.c */ object *check_enemy (object *npc, rv_vector *rv); object *find_nearest_living_creature (object *npc); -object *find_enemy (object *npc, rv_vector *rv); -int check_wakeup (object *op, object *enemy, rv_vector *rv); -int move_randomly (object *op); int move_monster (object *op); -int can_hit (object *ob1, object *ob2, rv_vector *rv); -object *monster_choose_random_spell (object *monster); -int monster_cast_spell (object *head, object *part, object *pl, int dir, rv_vector *rv); -int monster_use_scroll (object *head, object *part, object *pl, int dir, rv_vector *rv); -int monster_use_skill (object *head, object *part, object *pl, int dir); -int monster_use_range (object *head, object *part, object *pl, int dir); -int monster_use_bow (object *head, object *part, object *pl, int dir); -int check_good_weapon (object *who, object *item); -int check_good_armour (object *who, object *item); -void monster_check_pickup (object *monster); -int monster_can_pick (object *monster, object *item); -void monster_apply_below (object *monster); void monster_check_apply (object *mon, object *item); void npc_call_help (object *op); -int dist_att (int dir, object *ob, object *enemy, object *part, rv_vector *rv); -int run_att (int dir, object *ob, object *enemy, object *part, rv_vector *rv); -int hitrun_att (int dir, object *ob, object *enemy); -int wait_att (int dir, object *ob, object *enemy, object *part, rv_vector *rv); -int disthit_att (int dir, object *ob, object *enemy, object *part, rv_vector *rv); -int wait_att2 (int dir, object *ob, object *enemy, object *part, rv_vector *rv); -void circ1_move (object *ob); -void circ2_move (object *ob); -void pace_movev (object *ob); -void pace_moveh (object *ob); -void pace2_movev (object *ob); -void pace2_moveh (object *ob); -void rand_move (object *ob); void check_earthwalls (object *op, maptile *m, int x, int y); void check_doors (object *op, maptile *m, int x, int y); void communicate (object *op, const char *txt); @@ -427,8 +282,6 @@ int transfer_ob (object *op, int x, int y, int randomly, object *originator); int teleport (object *teleporter, uint8 tele_type, object *user); void recursive_roll (object *op, int dir, object *pusher); -int try_fit (object *op, maptile *m, int x, int y); -int roll_ob (object *op, int dir, object *pusher); int push_ob (object *who, int dir, object *pusher); /* pets.c */ @@ -437,23 +290,16 @@ void remove_all_pets (maptile *map); int follow_owner (object *ob, object *owner); void pet_move (object *ob); -object *fix_summon_pet (archetype *at, object *op, int dir, int is_golem); void move_golem (object *op); void control_golem (object *op, int dir); int summon_golem (object *op, object *caster, int dir, object *spob); -object *choose_cult_monster (object *pl, object *god, int summon_level); -int summon_object (object *op, object *caster, object *spell_ob, int dir, const char *stringarg); -object *get_real_owner (object *ob); +int summon_object (object *op, object *caster, object *spell_ob, int dir, const char *spellparam); int should_arena_attack (object *pet, object *owner, object *target); /* player.c */ player *find_player (const char *plname); player *find_player_partial_name (const char *plname); -void display_motd (const object *op); -void send_rules (const object *op); -void send_news (const object *op); int playername_ok (const char *cp); -archetype *get_player_archetype (archetype *at); object *get_nearest_player (object *mon); int path_to_player (object *mon, object *pl, unsigned mindiff); void give_initial_items (object *pl, treasurelist *items); @@ -468,25 +314,15 @@ int key_roll_stat (object *op, char key); int key_change_class (object *op, char key); int key_confirm_quit (object *op, char key); -void flee_player (object *op); int check_pick (object *op); -object *find_arrow (object *op, const char *type); -object *find_better_arrow (object *op, object *target, const char *type, int *better); -object *pick_arrow_target (object *op, const char *type, int dir); int fire_bow (object *op, object *part, object *arrow, int dir, int wc_mod, sint16 sx, sint16 sy); -int player_fire_bow (object *op, int dir); -void fire_misc_object (object *op, int dir); bool fire (object *op, int dir); object *find_key (object *pl, object *container, object *door); bool move_player_attack (object *op, int dir); bool move_player (object *op, int dir); bool handle_newcs_player (object *op); -int save_life (object *op); -void remove_unpaid_objects (object *op, object *env); -char *gravestone_text (object *op); void do_some_living (object *op); void kill_player (object *op); -void loot_object (object *op); void fix_weight (void); void fix_luck (void); void cast_dust (object *op, object *throw_ob, int dir); @@ -496,105 +332,16 @@ void do_hidden_move (object *op); int stand_near_hostile (object *who); int player_can_view (object *pl, object *op); -int action_makes_visible (object *op); int op_on_battleground (object *op, int *x, int *y); void dragon_ability_gain (object *who, int atnr, int level); void player_unready_range_ob (player *pl, object *ob); -/* plugins.c */ -int execute_event (object *op, int eventcode, object *activator, object *third, const char *message, int fix); -int execute_global_event (int eventcode, ...); -int plugins_init_plugin (const char *libfile); -void *cfapi_get_hooks (int *type, ...); -int plugins_remove_plugin (const char *id); -crossfire_plugin *plugins_find_plugin (const char *id); -void plugins_display_list (object *op); -void *cfapi_system_find_animation (int *type, ...); -void *cfapi_system_strdup (int *type, ...); -void *cfapi_system_register_global_event (int *type, ...); -void *cfapi_system_unregister_global_event (int *type, ...); -void *cfapi_system_check_path (int *type, ...); -void *cfapi_system_re_cmp (int *type, ...); -void *cfapi_system_directory (int *type, ...); -void *cfapi_map_get_map (int *type, ...); -void *cfapi_map_has_been_loaded (int *type, ...); -void *cfapi_map_create_path (int *type, ...); -void *cfapi_map_get_map_property (int *type, ...); -void *cfapi_map_set_map_property (int *type, ...); -void *cfapi_map_out_of_map (int *type, ...); -void *cfapi_map_update_position (int *type, ...); -void *cfapi_map_delete_map (int *type, ...); -void *cfapi_map_message (int *type, ...); -void *cfapi_map_get_object_at (int *type, ...); -void *cfapi_map_get_flags (int *type, ...); -void *cfapi_map_present_arch_by_name (int *type, ...); -void *cfapi_object_move (int *type, ...); -void *cfapi_object_get_key (int *type, ...); -void *cfapi_object_set_key (int *type, ...); -void *cfapi_object_get_property (int *type, ...); -void *cfapi_object_set_property (int *type, ...); -void *cfapi_object_apply_below (int *type, ...); -void *cfapi_object_apply (int *type, ...); -void *cfapi_object_identify (int *type, ...); -void *cfapi_object_describe (int *type, ...); -void *cfapi_object_drain (int *type, ...); -void *cfapi_object_fix (int *type, ...); -void *cfapi_object_give_skill (int *type, ...); -void *cfapi_object_transmute (int *type, ...); -void *cfapi_object_remove (int *type, ...); -void *cfapi_object_delete (int *type, ...); -void *cfapi_object_clone (int *type, ...); -void *cfapi_object_find (int *type, ...); -void *cfapi_object_create (int *type, ...); -void *cfapi_object_insert (int *type, ...); -void *cfapi_object_split (int *type, ...); -void *cfapi_object_merge (int *type, ...); -void *cfapi_object_distance (int *type, ...); -void *cfapi_object_update (int *type, ...); -void *cfapi_object_clear (int *type, ...); -void *cfapi_object_reset (int *type, ...); -void *cfapi_object_check_inventory (int *type, ...); -void *cfapi_object_clean_object (int *type, ...); -void *cfapi_object_on_same_map (int *type, ...); -void *cfapi_object_spring_trap (int *type, ...); -void *cfapi_object_check_trigger (int *type, ...); -void *cfapi_object_query_cost (int *type, ...); -void *cfapi_object_query_money (int *type, ...); -void *cfapi_object_cast (int *type, ...); -void *cfapi_object_learn_spell (int *type, ...); -void *cfapi_object_forget_spell (int *type, ...); -void *cfapi_object_check_spell (int *type, ...); -void *cfapi_object_pay_amount (int *type, ...); -void *cfapi_object_pay_item (int *type, ...); -void *cfapi_object_transfer (int *type, ...); -void *cfapi_object_find_archetype_inside (int *type, ...); -void *cfapi_object_drop (int *type, ...); -void *cfapi_object_take (int *type, ...); -void *cfapi_object_say (int *type, ...); -void *cfapi_object_speak (int *type, ...); -void *cfapi_player_find (int *type, ...); -void *cfapi_player_message (int *type, ...); -void *cfapi_player_send_inventory (int *type, ...); -void *cfapi_object_teleport (int *type, ...); -void *cfapi_object_pickup (int *type, ...); -void *cfapi_archetype_get_first (int *type, ...); -void *cfapi_archetype_get_property (int *type, ...); -void *cfapi_party_get_property (int *type, ...); -void *cfapi_region_get_property (int *type, ...); -CommArray_s *find_plugin_command (char *cmd, object *op); -int initPlugins (void); - /* resurrection.c */ int cast_raise_dead_spell (object *op, object *caster, object *spell, int dir, const char *arg); -int resurrection_fails (int levelcaster, int leveldead); -void dead_player (object *op); -void dead_character (const char *name); -int dead_player_exists (const char *name); /* rune.c */ int write_rune (object *op, object *caster, object *spell, int dir, const char *runename); void move_rune (object *op); -void rune_attack (object *op, object *victim); void spring_trap (object *trap, object *victim); int dispel_rune (object *op, object *caster, object *spell, object *skill, int dir); int trap_see (object *op, object *trap); @@ -610,7 +357,7 @@ int pay_for_amount (sint64 to_pay, object *pl); int pay_for_item (object *op, object *pl); int can_pay (object *pl); -void sell_item (object *op, object *pl); +bool sell_item (object *op, object *pl); double shopkeeper_approval (const maptile *map, const object *player); int describe_shop (const object *op); void shop_listing (object *sign, object *op); @@ -622,7 +369,6 @@ int pick_lock (object *pl, int dir, object *skill); int hide (object *op, object *skill); int jump (object *pl, int dir, object *skill); -int do_skill_ident2 (object *tmp, object *pl, int obj_class, object *skill); int skill_ident (object *pl, object *skill); int use_oratory (object *pl, int dir, object *skill); int singing (object *pl, int dir, object *skill); @@ -644,24 +390,18 @@ int skill_attack (object *tmp, object *pl, int dir, const char *string, object *skill); /* spell_attack.c */ -void check_spell_knockback (object *op); -void forklightning (object *op, object *tmp); void move_bolt (object *op); int fire_bolt (object *op, object *caster, int dir, object *spob, object *skill); void explosion (object *op); -void explode_bullet (object *op); void check_bullet (object *op); void move_bullet (object *op); int fire_bullet (object *op, object *caster, int dir, object *spob); -void cone_drop (object *op); void move_cone (object *op); int cast_cone (object *op, object *caster, int dir, object *spell); void animate_bomb (object *op); int create_bomb (object *op, object *caster, int dir, object *spell); -object *get_pointed_target (object *op, int dir, int range, int type); int cast_smite_spell (object *op, object *caster, int dir, object *spell); void move_missile (object *op); -int make_object_glow (object *op, int radius, int time); int cast_destruction (object *op, object *caster, object *spell_ob); int cast_curse (object *op, object *caster, object *spell_ob, int dir); int mood_change (object *op, object *caster, object *spell); @@ -679,8 +419,8 @@ void polymorph_item (object *who, object *op); void polymorph (object *op, object *who); int cast_polymorph (object *op, object *caster, object *spell_ob, int dir); -int cast_create_missile (object *op, object *caster, object *spell, int dir, const char *stringarg); -int cast_create_food (object *op, object *caster, object *spell_ob, int dir, const char *stringarg); +int cast_create_missile (object *op, object *caster, object *spell, int dir, const char *spellparam); +int cast_create_food (object *op, object *caster, object *spell_ob, int dir, const char *spellparam); int probe (object *op, object *caster, object *spell_ob, int dir); int makes_invisible_to (object *pl, object *mon); int cast_invisible (object *op, object *caster, object *spell_ob); @@ -690,8 +430,9 @@ int cast_wonder (object *op, object *caster, int dir, object *spell_ob); int perceive_self (object *op); int magic_wall (object *op, object *caster, int dir, object *spell_ob); -int dimension_door (object *op, object *caster, object *spob, int dir); +int dimension_door (object *op, object *caster, object *spob, int dir, const char *spellparam); int cast_heal (object *op, object *caster, object *spell, int dir); +int change_ability_duration (object *spell, object *caster); int cast_change_ability (object *op, object *caster, object *spell_ob, int dir, int silent); int cast_bless (object *op, object *caster, object *spell_ob, int dir); int alchemy (object *op, object *caster, object *spell_ob); @@ -709,18 +450,16 @@ int write_mark (object *op, object *spell, const char *msg); /* spell_util.c */ -object *find_random_spell_in_ob (object *ob, const char *skill); +object *find_random_spell_in_ob (object *ob, shstr_cmp skill = shstr_cmp ()); void set_spell_skill (object *op, object *caster, object *spob, object *dest); -void init_spells (void); -void dump_spells (void); void spell_effect (object *spob, int x, int y, maptile *map, object *originator); int min_casting_level (object *caster, object *spell); -int caster_level (object *caster, object *spell); +int casting_level (object *caster, object *spell); sint16 SP_level_spellpoint_cost (object *caster, object *spell, int flags); int SP_level_dam_adjust (object *caster, object *spob); int SP_level_duration_adjust (object *caster, object *spob); int SP_level_range_adjust (object *caster, object *spob); -object *check_spell_known (object *op, const char *name); +object *check_spell_known (object *op, shstr_cmp name); object *lookup_spell_by_name (object *op, const char *spname); int reflwall (maptile *m, int x, int y, object *sp_op); int cast_create_obj (object *op, object *caster, object *new_op, int dir); @@ -730,16 +469,13 @@ void drain_rod_charge (object *rod); object *find_target_for_friendly_spell (object *op, int dir); int spell_find_dir (maptile *m, int x, int y, object *exclude); -void put_a_monster (object *op, const char *monstername); int summon_hostile_monsters (object *op, int n, const char *monstername); void shuffle_attack (object *op, int change_face); -void prayer_failure (object *op, int failure, int power); void spell_failure (object *op, int failure, int power, object *skill); -int cast_party_spell (object *op, object *caster, int dir, object *spell_ob, char *stringarg); -int cast_spell (object *op, object *caster, int dir, object *spell_ob, char *stringarg); +int cast_spell (object *op, object *caster, int dir, object *spell_ob, char *spellparam); void move_spell_effect (object *op); -void check_spell_effect (object *op); void apply_spell_effect (object *spell, object *victim); +void create_exploding_ball_at (object *victim, int level); /* swamp.c */ void walk_on_deep_swamp (object *op, object *victim); @@ -757,36 +493,17 @@ /* time.c */ void remove_door (object *op); void remove_door2 (object *op); -void generate_monster (object *gen); -void remove_force (object *op); -void remove_blindness (object *op); -void poison_more (object *op); -void move_gate (object *op); -void move_timed_gate (object *op); -void move_detector (object *op); void animate_trigger (object *op); -void move_hole (object *op); object *stop_item (object *op); void fix_stopped_item (object *op, maptile *map, object *originator); object *fix_stopped_arrow (object *op); void move_arrow (object *op); -void change_object (object *op); void move_teleporter (object *op); -void move_player_changer (object *op); void move_firewall (object *op); -void move_player_mover (object *op); void move_duplicator (object *op); void move_creator (object *creator); void move_marker (object *op); void process_object (object *op); -/* timers.c */ -void cftimer_process_timers (void); -void cftimer_process_event (object *ob); -int cftimer_create (int id, long delay, object *ob, int mode); -int cftimer_destroy (int id); -int cftimer_find_free_id (void); - /* weather.c */ -void set_darkness_map (maptile *m); void adjust_daylight (void);