--- deliantra/server/include/sproto.h 2008/09/23 04:29:11 1.91 +++ deliantra/server/include/sproto.h 2009/06/27 03:51:05 1.104 @@ -25,7 +25,7 @@ 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); +void attempt_do_alchemy (object *caster, object *cauldron, object *skill); 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); @@ -69,6 +69,9 @@ 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); @@ -96,8 +99,6 @@ /* 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); @@ -176,6 +177,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); @@ -261,17 +263,10 @@ /* 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, object *spell); -int reduce_symptoms (object *sufferer, int reduction); /* egoitem.c */ int create_artifact (object *op, const char *artifactname); @@ -283,20 +278,19 @@ 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); +int lookup_god_by_name (shstr_cmp name); +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); +archetype *determine_holy_arch (object *god, shstr_cmp 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); int tailor_god_spell (object *spellop, object *caster); /* init.c */ @@ -402,8 +396,7 @@ 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 */ @@ -431,8 +424,8 @@ 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); +object *find_better_arrow (object *op, object *target, shstr_cmp type, int *better); +object *pick_arrow_target (object *op, shstr_cmp 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); @@ -555,8 +548,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); @@ -566,7 +559,7 @@ 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 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); @@ -585,16 +578,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 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); @@ -609,11 +602,12 @@ 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_party_spell (object *op, object *caster, int dir, object *spell_ob, char *spellparam); +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);