--- deliantra/server/include/sproto.h 2008/12/29 07:43:36 1.95 +++ deliantra/server/include/sproto.h 2009/10/12 14:00:58 1.106 @@ -3,18 +3,19 @@ * * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * - * Deliantra 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 3 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. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * 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 */ @@ -25,7 +26,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 +70,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 +100,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); @@ -277,20 +279,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 */ @@ -396,7 +397,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); +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 */ @@ -424,8 +425,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); @@ -548,8 +549,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); @@ -559,8 +560,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); @@ -578,7 +580,7 @@ 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); @@ -587,7 +589,7 @@ 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); @@ -602,11 +604,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);