--- deliantra/server/include/sproto.h 2008/09/23 04:29:11 1.91 +++ deliantra/server/include/sproto.h 2009/11/02 07:21:50 1.108 @@ -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); @@ -94,21 +98,7 @@ 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); @@ -176,6 +166,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 +252,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 +267,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,16 +385,12 @@ 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); @@ -431,8 +410,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 +534,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,8 +545,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); @@ -585,16 +565,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 +589,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);