Crossfire Server, Branches 1.12  R18729
sproto.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void add_player (socket_struct *ns)
 
int alchemy (object *op, object *caster, object *spell_ob)
 
int animate_weapon (object *op, object *caster, object *spell, int dir)
 
void apply_builder_remove (object *pl, int dir)
 
void apply_changes_to_player (object *pl, object *change)
 
int apply_container (object *op, object *sack)
 
void apply_map_builder (object *pl, int dir)
 
int apply_special (object *who, object *op, int aflags)
 
int attack_ob (object *op, object *hitter)
 
int auto_apply (object *op)
 
void become_daemon (void)
 
void become_follower (object *op, const object *new_god)
 
void blind_living (object *op, object *hitter, int dam)
 
sint64 calc_skill_exp (object *who, object *op, object *skill)
 
int can_apply_object (object *who, object *op)
 
int can_detect_enemy (object *op, object *enemy, rv_vector *rv)
 
int can_pay (object *pl)
 
int can_see_enemy (object *op, object *enemy)
 
int cast_bless (object *op, object *caster, object *spell_ob, int dir)
 
int cast_cause_disease (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_change_map_lightlevel (object *op, object *caster, object *spell)
 
int cast_cone (object *op, object *caster, int dir, object *spell)
 
int cast_consecrate (object *op, object *caster, object *spell)
 
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 *stringarg)
 
int cast_create_obj (object *op, object *new_op, int dir)
 
int cast_create_town_portal (object *op, object *caster, object *spell, int dir)
 
int cast_curse (object *op, object *caster, object *spell_ob, int dir)
 
int cast_destruction (object *op, object *caster, object *spell_ob)
 
int cast_detection (object *op, object *caster, object *spell)
 
void cast_dust (object *op, object *throw_ob, int dir)
 
int cast_earth_to_dust (object *op, object *caster, object *spell_ob)
 
int cast_heal (object *op, object *caster, object *spell, int dir)
 
int cast_identify (object *op, object *caster, object *spell)
 
int cast_invisible (object *op, object *caster, object *spell_ob)
 
int cast_item_curse_or_curse (object *op, object *caster, object *spell_ob)
 
int cast_light (object *op, object *caster, object *spell, int dir)
 
void cast_magic_storm (object *op, object *tmp, int lvl)
 
int cast_polymorph (object *op, object *caster, object *spell_ob, int dir)
 
int cast_raise_dead_spell (object *op, object *caster, object *spell, int dir, const char *arg)
 
int cast_smite_spell (object *op, object *caster, int dir, object *spell)
 
int cast_spell (object *op, object *caster, int dir, object *spell_ob, char *stringarg)
 
int cast_transfer (object *op, object *caster, object *spell, int dir)
 
int cast_wonder (object *op, object *caster, int dir, object *spell_ob)
 
int cast_word_of_recall (object *op, object *caster, object *spell_ob)
 
int caster_level (const object *caster, const object *spell)
 
void * cfapi_archetype_get_property (int *type,...)
 
void * cfapi_friendlylist_get_next (int *type,...)
 
void * cfapi_generate_random_map (int *type,...)
 
void * cfapi_get_hooks (int *type,...)
 
void * cfapi_get_month_name (int *type,...)
 
void * cfapi_get_periodofday_name (int *type,...)
 
void * cfapi_get_season_name (int *type,...)
 
void * cfapi_get_time (int *type,...)
 
void * cfapi_get_weekday_name (int *type,...)
 
void * cfapi_log (int *type,...)
 
void * cfapi_map_change_light (int *type,...)
 
void * cfapi_map_create_path (int *type,...)
 
void * cfapi_map_delete_map (int *type,...)
 
void * cfapi_map_get_map (int *type,...)
 
void * cfapi_map_get_map_property (int *type,...)
 
void * cfapi_map_get_object_at (int *type,...)
 
void * cfapi_map_has_been_loaded (int *type,...)
 
void * cfapi_map_message (int *type,...)
 
void * cfapi_map_out_of_map (int *type,...)
 
void * cfapi_map_present_arch_by_name (int *type,...)
 
void * cfapi_map_set_map_property (int *type,...)
 
void * cfapi_map_trigger_connected (int *type,...)
 
void * cfapi_map_update_position (int *type,...)
 
void * cfapi_object_apply (int *type,...)
 
void * cfapi_object_apply_below (int *type,...)
 
void * cfapi_object_cast (int *type,...)
 
void * cfapi_object_change_abil (int *type,...)
 
void * cfapi_object_change_exp (int *type,...)
 
void * cfapi_object_check_inventory (int *type,...)
 
void * cfapi_object_check_spell (int *type,...)
 
void * cfapi_object_check_trigger (int *type,...)
 
void * cfapi_object_clean_object (int *type,...)
 
void * cfapi_object_clear (int *type,...)
 
void * cfapi_object_clone (int *type,...)
 
void * cfapi_object_create (int *type,...)
 
void * cfapi_object_delete (int *type,...)
 
void * cfapi_object_describe (int *type,...)
 
void * cfapi_object_distance (int *type,...)
 
void * cfapi_object_drain (int *type,...)
 
void * cfapi_object_drop (int *type,...)
 
void * cfapi_object_find (int *type,...)
 
void * cfapi_object_find_archetype_inside (int *type,...)
 
void * cfapi_object_fix (int *type,...)
 
void * cfapi_object_forget_spell (int *type,...)
 
void * cfapi_object_get_key (int *type,...)
 
void * cfapi_object_get_property (int *type,...)
 
void * cfapi_object_give_skill (int *type,...)
 
void * cfapi_object_identify (int *type,...)
 
void * cfapi_object_insert (int *type,...)
 
void * cfapi_object_learn_spell (int *type,...)
 
void * cfapi_object_merge (int *type,...)
 
void * cfapi_object_move (int *type,...)
 
void * cfapi_object_on_same_map (int *type,...)
 
void * cfapi_object_pay_amount (int *type,...)
 
void * cfapi_object_pay_item (int *type,...)
 
void * cfapi_object_pickup (int *type,...)
 
void * cfapi_object_query_cost (int *type,...)
 
void * cfapi_object_query_money (int *type,...)
 
void * cfapi_object_remove (int *type,...)
 
void * cfapi_object_reset (int *type,...)
 
void * cfapi_object_say (int *type,...)
 
void * cfapi_object_set_key (int *type,...)
 
void * cfapi_object_set_property (int *type,...)
 
void * cfapi_object_split (int *type,...)
 
void * cfapi_object_spring_trap (int *type,...)
 
void * cfapi_object_teleport (int *type,...)
 
void * cfapi_object_transfer (int *type,...)
 
void * cfapi_object_transmute (int *type,...)
 
void * cfapi_object_update (int *type,...)
 
void * cfapi_object_user_event (int *type,...)
 
void * cfapi_party_get_property (int *type,...)
 
void * cfapi_player_can_pay (int *type,...)
 
void * cfapi_player_find (int *type,...)
 
void * cfapi_player_message (int *type,...)
 
void * cfapi_region_get_property (int *type,...)
 
void * cfapi_set_random_map_variable (int *type,...)
 
void * cfapi_system_add_string (int *type,...)
 
void * cfapi_system_check_path (int *type,...)
 
void * cfapi_system_directory (int *type,...)
 
void * cfapi_system_find_animation (int *type,...)
 
void * cfapi_system_find_face (int *type,...)
 
void * cfapi_system_find_string (int *type,...)
 
void * cfapi_system_re_cmp (int *type,...)
 
void * cfapi_system_register_global_event (int *type,...)
 
void * cfapi_system_remove_string (int *type,...)
 
void * cfapi_system_strdup_local (int *type,...)
 
void * cfapi_system_unregister_global_event (int *type,...)
 
void * cfapi_timer_create (int *type,...)
 
void * cfapi_timer_destroy (int *type,...)
 
int cftimer_create (int id, long delay, object *ob, int mode)
 
int cftimer_destroy (int id)
 
int cftimer_find_free_id (void)
 
void cftimer_init (void)
 
void cftimer_process_timers (void)
 
int change_skill (object *who, object *new_skill, int flag)
 
void change_spell (object *op, char k)
 
void check_active_maps (void)
 
void check_bullet (object *op)
 
void check_doors (object *op, mapstruct *m, int x, int y)
 
void check_earthwalls (object *op, mapstruct *m, int x, int y)
 
objectcheck_enemy (object *npc, rv_vector *rv)
 
void check_login (object *op)
 
int check_name (player *me, const char *name)
 
int check_password (char *typed, char *crypted)
 
void check_physically_infect (object *victim, object *hitter)
 
int check_pick (object *op)
 
void check_score (object *op, int quiet)
 
void check_spell_expiry (object *spell)
 
objectcheck_spell_known (object *op, const char *name)
 
void check_spells (void)
 
int check_weapon_power (const object *who, int improvs)
 
int checkbanned (const char *login, const char *host)
 
void clean_tmp_files (void)
 
void cleanup (void)
 
void cleanupPlugins (void)
 
void clear_skill (object *who)
 
int command_abil (object *op, char *params)
 
int command_accuse (object *op, char *params)
 
int command_addexp (object *op, char *params)
 
int command_afk (object *op, char *params)
 
int command_apply (object *op, char *params)
 
int command_applymode (object *op, char *params)
 
int command_archs (object *op, char *params)
 
int command_arrest (object *op, char *params)
 
int command_banish (object *op, char *params)
 
int command_beg (object *op, char *params)
 
int command_bleed (object *op, char *params)
 
int command_blush (object *op, char *params)
 
int command_body (object *op, char *params)
 
int command_bounce (object *op, char *params)
 
int command_bow (object *op, char *params)
 
int command_bowmode (object *op, char *params)
 
int command_brace (object *op, char *params)
 
int command_burp (object *op, char *params)
 
int command_cackle (object *op, char *params)
 
int command_cast (object *op, char *params)
 
int command_cast_spell (object *op, char *params, char command)
 
int command_chat (object *op, char *params)
 
int command_chuckle (object *op, char *params)
 
int command_clap (object *op, char *params)
 
int command_cointoss (object *op, char *params)
 
int command_cough (object *op, char *params)
 
int command_create (object *op, char *params)
 
int command_cringe (object *op, char *params)
 
int command_cry (object *op, char *params)
 
int command_dance (object *op, char *params)
 
int command_debug (object *op, char *params)
 
int command_diff (object *op, char *params)
 
int command_disarm (object *op, char *params)
 
int command_dm (object *op, char *params)
 
int command_dmhide (object *op, char *params)
 
int command_dmtell (object *op, char *params)
 
int command_drop (object *op, char *params)
 
int command_dropall (object *op, char *params)
 
int command_dump (object *op, char *params)
 
int command_dumpallarchetypes (object *op, char *params)
 
int command_dumpallmaps (object *op, char *params)
 
int command_dumpallobjects (object *op, char *params)
 
int command_dumpbelow (object *op, char *params)
 
int command_dumpfriendlyobjects (object *op, char *params)
 
int command_dumpmap (object *op, char *params)
 
int command_east (object *op, char *params)
 
int command_empty (object *op, char *params)
 
int command_examine (object *op, char *params)
 
int command_explore (object *op, char *params)
 
int command_fire (object *op, char *params)
 
int command_fire_stop (object *op, char *params)
 
int command_fix_me (object *op, char *params)
 
int command_flip (object *op, char *params)
 
int command_follow (object *op, char *params)
 
int command_forget_spell (object *op, char *params)
 
int command_free (object *op, char *params)
 
int command_freeze (object *op, char *params)
 
int command_frown (object *op, char *params)
 
int command_gasp (object *op, char *params)
 
int command_giggle (object *op, char *params)
 
int command_glare (object *op, char *params)
 
int command_goto (object *op, char *params)
 
int command_grin (object *op, char *params)
 
int command_groan (object *op, char *params)
 
int command_growl (object *op, char *params)
 
int command_gsay (object *op, char *params)
 
int command_help (object *op, char *params)
 
int command_hiccup (object *op, char *params)
 
int command_hide (object *op, char *params)
 
int command_hiscore (object *op, char *params)
 
int command_hug (object *op, char *params)
 
int command_insert_into (object *op, char *params)
 
int command_inventory (object *op, char *params)
 
int command_invisible (object *op, char *params)
 
int command_invoke (object *op, char *params)
 
int command_kick (object *op, const char *params)
 
int command_kill_pets (object *op, char *params)
 
int command_kiss (object *op, char *params)
 
int command_language (object *op, char *params)
 
int command_laugh (object *op, char *params)
 
int command_learn_special_prayer (object *op, char *params)
 
int command_learn_spell (object *op, char *params)
 
int command_lick (object *op, char *params)
 
int command_listen (object *op, char *params)
 
int command_listplugins (object *op, char *params)
 
int command_loadplugin (object *op, char *params)
 
int command_loadtest (object *op, char *params)
 
int command_lock_item (object *op, char *params)
 
int command_malloc (object *op, char *params)
 
int command_mapinfo (object *op, char *params)
 
int command_maps (object *op, char *params)
 
int command_mark (object *op, char *params)
 
int command_me (object *op, char *params)
 
int command_mon_aggr (object *op, char *params)
 
int command_motd (object *op, char *params)
 
int command_news (object *op, char *params)
 
int command_nod (object *op, char *params)
 
int command_north (object *op, char *params)
 
int command_northeast (object *op, char *params)
 
int command_northwest (object *op, char *params)
 
int command_nowiz (object *op, char *params)
 
int command_orcknuckle (object *op, char *params)
 
int command_output_count (object *op, char *params)
 
int command_output_sync (object *op, char *params)
 
int command_overlay_reset (object *op, char *params)
 
int command_overlay_save (object *op, char *params)
 
int command_party (object *op, char *params)
 
int command_party_rejoin (object *op, char *params)
 
int command_passwd (object *pl, char *params)
 
int command_patch (object *op, char *params)
 
int command_peaceful (object *op, char *params)
 
int command_petmode (object *op, char *params)
 
int command_pickup (object *op, char *params)
 
int command_players (object *op, char *params)
 
int command_poke (object *op, char *params)
 
int command_possess (object *op, char *params)
 
int command_pout (object *op, char *params)
 
int command_prepare (object *op, char *params)
 
int command_printlos (object *op, char *params)
 
int command_puke (object *op, char *params)
 
int command_quit (object *op, char *params)
 
int command_remove (object *op, char *params)
 
int command_rename_item (object *op, char *params)
 
int command_reply (object *op, char *params)
 
int command_reset (object *op, char *params)
 
int command_resistances (object *op, char *params)
 
int command_rotateshoottype (object *op, char *params)
 
int command_rskill (object *pl, char *params)
 
int command_rules (object *op, char *params)
 
int command_run (object *op, char *params)
 
int command_run_stop (object *op, char *params)
 
int command_save (object *op, char *params)
 
int command_say (object *op, char *params)
 
int command_scream (object *op, char *params)
 
int command_search (object *op, char *params)
 
int command_search_items (object *op, char *params)
 
int command_setgod (object *op, char *params)
 
int command_shake (object *op, char *params)
 
int command_shiver (object *op, char *params)
 
int command_shout (object *op, char *params)
 
int command_showpets (object *op, char *params)
 
int command_shrug (object *op, char *params)
 
int command_shutdown (object *op, char *params)
 
int command_sigh (object *op, char *params)
 
int command_skills (object *op, char *params)
 
int command_slap (object *op, char *params)
 
int command_smile (object *op, char *params)
 
int command_smirk (object *op, char *params)
 
int command_snap (object *op, char *params)
 
int command_sneeze (object *op, char *params)
 
int command_snicker (object *op, char *params)
 
int command_sniff (object *op, char *params)
 
int command_snore (object *op, char *params)
 
int command_sound (object *op, char *params)
 
int command_south (object *op, char *params)
 
int command_southeast (object *op, char *params)
 
int command_southwest (object *op, char *params)
 
int command_speed (object *op, char *params)
 
int command_spit (object *op, char *params)
 
int command_ssdumptable (object *op, char *params)
 
int command_stack_clear (object *op, char *params)
 
int command_stack_list (object *op, char *params)
 
int command_stack_pop (object *op, char *params)
 
int command_stack_push (object *op, char *params)
 
int command_statistics (object *pl, char *params)
 
int command_stats (object *op, char *params)
 
int command_stay (object *op, char *params)
 
int command_strings (object *op, char *params)
 
int command_strut (object *op, char *params)
 
int command_style_map_info (object *op, char *params)
 
int command_sulk (object *op, char *params)
 
int command_summon (object *op, char *params)
 
int command_take (object *op, char *params)
 
int command_teleport (object *op, char *params)
 
int command_tell (object *op, char *params)
 
int command_thank (object *op, char *params)
 
int command_think (object *op, char *params)
 
int command_throw (object *op, char *params)
 
int command_time (object *op, char *params)
 
int command_title (object *op, char *params)
 
int command_toggle_shout (object *op, char *params)
 
int command_twiddle (object *op, char *params)
 
int command_unloadplugin (object *op, char *params)
 
int command_use (object *op, char *params)
 
int command_usekeys (object *op, char *params)
 
int command_uskill (object *pl, char *params)
 
int command_version (object *op, char *params)
 
int command_wave (object *op, char *params)
 
int command_west (object *op, char *params)
 
int command_whereabouts (object *op, char *params)
 
int command_whereami (object *op, char *params)
 
int command_whistle (object *op, char *params)
 
int command_who (object *op, char *params)
 
int command_wimpy (object *op, char *params)
 
int command_wink (object *op, char *params)
 
int command_wizcast (object *op, char *params)
 
int command_wizpass (object *op, char *params)
 
int command_yawn (object *op, char *params)
 
void communicate (object *op, const char *txt)
 
int compute_path (object *source, object *target, int default_dir)
 
void cone_drop (object *op)
 
int confirm_party_password (object *op)
 
void confirm_password (object *op)
 
void confuse_living (object *op, object *hitter, int dam)
 
void control_golem (object *op, int dir)
 
int coords_in_shop (mapstruct *map, int x, int y)
 
void counterspell (object *op, int dir)
 
int create_aura (object *op, object *caster, object *spell)
 
int create_bomb (object *op, object *caster, int dir, object *spell)
 
char * crypt_string (char *str, char *salt)
 
int cure_disease (object *sufferer, object *caster)
 
void current_map_info (object *op)
 
void current_region_info (object *op)
 
void dead_player (object *op)
 
void delete_character (const char *name)
 
int describe_shop (const object *op)
 
void destroy_object (object *op)
 
const char * determine_god (object *op)
 
archetypedetermine_holy_arch (const object *god, const char *type)
 
int dimension_door (object *op, object *caster, object *spob, int dir)
 
int dispel_rune (object *op, object *caster, object *spell, object *skill, int dir)
 
void display_high_score (object *op, int max, const char *match)
 
void display_motd (const object *op)
 
void display_who_entry (object *op, player *pl, const char *format)
 
objectdm_stack_peek (player *pl)
 
void dm_stack_pop (player *pl)
 
void dm_stack_push (player *pl, tag_t item)
 
void do_forget_spell (object *op, const char *spell)
 
int do_harvest (object *pl, int dir, object *skill)
 
void do_hidden_move (object *op)
 
void do_learn_spell (object *op, object *spell, int special_prayer)
 
int do_skill (object *op, object *part, object *skill, int dir, const char *string)
 
void do_some_living (object *op)
 
int do_wizard_dm (object *op, char *params, int silent)
 
void do_wizard_hide (object *op, int silent_dm)
 
void dragon_ability_gain (object *who, int atnr, int level)
 
void drain_rod_charge (object *rod)
 
void drain_wand_charge (object *wand)
 
void drop (object *op, object *tmp)
 
objectdrop_object (object *op, object *tmp, uint32 nrof)
 
void dump_spells (void)
 
void emergency_save (int flag)
 
void enter_exit (object *op, object *exit_ob)
 
void enter_player_savebed (object *op)
 
void examine (object *op, object *tmp)
 
void examine_monster (object *op, object *tmp)
 
int execute_event (object *op, int eventcode, object *activator, object *third, const char *message, int fix)
 
int execute_global_event (int eventcode,...)
 
int execute_newserver_command (object *pl, char *command)
 
void explode_bullet (object *op)
 
const objectfind_god (const char *name)
 
objectfind_key (object *pl, object *container, object *door)
 
objectfind_marked_object (object *op)
 
objectfind_mon_throw_ob (object *op)
 
objectfind_nearest_living_creature (object *npc)
 
playerfind_player (const char *plname)
 
playerfind_player_partial_name (const char *plname)
 
command_array_structfind_plugin_command (char *cmd, object *op)
 
racelinkfind_racelink (const char *name)
 
objectfind_random_spell_in_ob (object *ob, const char *skill)
 
objectfind_skill_by_name (object *who, const char *name)
 
objectfind_skill_by_number (object *who, int skillno)
 
objectfind_target_for_friendly_spell (object *op, int dir)
 
int find_traps (object *pl, object *skill)
 
void fire (object *op, int dir)
 
int fire_arch_from_position (object *op, object *caster, sint16 x, sint16 y, int dir, object *spell)
 
int fire_bolt (object *op, object *caster, int dir, object *spob, object *skill)
 
int fire_bow (object *op, object *arrow, int dir, int wc_mod, sint16 sx, sint16 sy)
 
int fire_bullet (object *op, object *caster, int dir, object *spob)
 
int fire_swarm (object *op, object *caster, object *spell, int dir)
 
void fix_auto_apply (mapstruct *m)
 
void fix_luck (void)
 
objectfix_stopped_arrow (object *op)
 
void fix_stopped_item (object *op, mapstruct *map, object *originator)
 
void fix_weight (void)
 
void flush_old_maps (void)
 
void follow_owner (object *ob, object *owner)
 
int forbid_play (void)
 
partylistform_party (object *op, const char *params)
 
int free_no_drop (object *op)
 
void free_server (void)
 
int friendly_fire (object *op, object *hitter)
 
objectget_dm_object (player *pl, char **params, int *from)
 
partylistget_firstparty (void)
 
void get_name (object *op)
 
objectget_nearest_player (object *mon)
 
void get_party_password (object *op, partylist *party)
 
void get_password (object *op)
 
int get_payment (object *pl, object *op)
 
objectget_pet_enemy (object *pet, rv_vector *rv)
 
void get_who_escape_code_value (char *return_val, int size, const char letter, player *pl)
 
void give_initial_items (object *pl, treasurelist *items)
 
void handle_apply_yield (object *tmp)
 
int handle_newcs_player (object *op)
 
int hide (object *op, object *skill)
 
int hideability (object *ob)
 
int hit_map (object *op, int dir, uint32 type, int full_hit)
 
int hit_player (object *op, int dam, object *hitter, uint32 type, int full_hit)
 
objecthit_with_arrow (object *op, object *victim)
 
int infect_object (object *victim, object *disease, int force)
 
void init (int argc, char **argv)
 
void init_commands (void)
 
void init_ob_methods (void)
 
void init_skills (void)
 
int initPlugins (void)
 
void inventory (object *op, object *inv)
 
int is_in_shop (object *ob)
 
int is_true_undead (object *op)
 
int jump (object *pl, int dir, object *skill)
 
void key_change_class (object *op, char key)
 
void key_confirm_quit (object *op, char key)
 
void key_roll_stat (object *op, char key)
 
void kill_player (object *op)
 
int learn_skill (object *pl, object *scroll)
 
void leave (player *pl, int draw_exit)
 
void legacy_animate_trigger (object *op)
 
void legacy_apply_container (object *op, object *sack)
 
void legacy_move_hole (object *op)
 
void legacy_remove_force (object *op)
 
int legal_range (object *op, int r)
 
void link_player_skills (object *op)
 
void list_players (object *op, region *reg, partylist *party)
 
objectlookup_spell_by_name (object *op, const char *spname)
 
int magic_wall (object *op, object *caster, int dir, object *spell_ob)
 
void make_visible (object *op)
 
int makes_invisible_to (object *pl, object *mon)
 
void malloc_info (object *op)
 
int manual_apply (object *op, object *tmp, int aflag)
 
void map_info (object *op, char *search)
 
void meditate (object *pl, object *skill)
 
int min_casting_level (const object *caster, const object *spell)
 
void monster_check_apply (object *mon, object *item)
 
int mood_change (object *op, object *caster, object *spell)
 
int move_disease (object *disease)
 
void move_firewall (object *op)
 
void move_golem (object *op)
 
int move_monster (object *op)
 
int move_ob (object *op, int dir, object *originator)
 
int move_object (object *op, int dir)
 
int move_player (object *op, int dir)
 
void move_player_attack (object *op, int dir)
 
void move_player_mover (object *op)
 
void move_symptom (object *symptom)
 
int move_to (object *op, int x, int y)
 
void npc_call_help (object *op)
 
void npc_say (object *npc, const char *cp)
 
void obsolete_parties (void)
 
int ok_to_put_more (mapstruct *m, sint16 x, sint16 y, object *op, uint32 immune_stop)
 
int onoff_value (const char *line)
 
int op_on_battleground (object *op, int *x, int *y, archetype **trophy)
 
void paralyze_living (object *op, object *hitter, int dam)
 
int path_to_player (object *mon, object *pl, unsigned mindiff)
 
int pay_for_amount (uint64 to_pay, object *pl)
 
int pay_for_item (object *op, object *pl)
 
int perceive_self (object *op)
 
void pet_move (object *ob)
 
int pick_lock (object *pl, int dir, object *skill)
 
void pick_up (object *op, object *alt)
 
void play_again (object *op)
 
int player_apply (object *pl, object *op, int aflag, int quiet)
 
void player_apply_below (object *pl)
 
int player_can_view (object *pl, object *op)
 
void player_unready_range_ob (player *pl, object *ob)
 
int playername_ok (const char *cp)
 
int players_on_map (mapstruct *m, int show_all)
 
void plugins_display_list (object *op)
 
crossfire_pluginplugins_find_plugin (const char *id)
 
int plugins_init_plugin (const char *libfile)
 
int plugins_remove_plugin (const char *id)
 
void polymorph (object *op, object *who, int level)
 
int pray (object *pl, object *skill)
 
void pray_at_altar (object *pl, object *altar, object *skill)
 
int probe (object *op, object *caster, object *spell_ob, int dir)
 
void process_events (void)
 
int process_object (object *op)
 
int push_ob (object *who, int dir, object *pusher)
 
void put_object_in_sack (object *op, object *sack, object *tmp, uint32 nrof)
 
uint64 query_cost (const object *tmp, object *who, int flag)
 
StringBufferquery_cost_string (const object *tmp, object *who, int flag, StringBuffer *buf)
 
uint64 query_money (const object *op)
 
void read_map_log (void)
 
void receive_party_password (object *op)
 
void receive_play_again (object *op, char key)
 
void receive_player_name (object *op)
 
void receive_player_password (object *op)
 
int recharge (object *op, object *caster, object *spell_ob)
 
void recursive_roll (object *op, int dir, object *pusher)
 
int reflwall (mapstruct *m, int x, int y, object *sp_op)
 
void regenerate_rod (object *rod)
 
void register_all_ob_types (void)
 
void remove_all_pets (void)
 
int remove_curse (object *op, object *caster, object *spell)
 
void remove_door (object *op)
 
void remove_locked_door (object *op)
 
void remove_party (partylist *target_party)
 
int remove_trap (object *op, object *skill)
 
void remove_unpaid_objects (object *op, object *env, int free_items)
 
void roll_again (object *op)
 
int roll_stat (void)
 
void roll_stats (object *op)
 
int sack_can_hold (const object *pl, const object *sack, const object *op, uint32 nrof)
 
int save_player (object *op, int flag)
 
void save_throw_object (object *op, uint32 type, object *originator)
 
void scroll_failure (object *op, int failure, int power)
 
void sell_item (object *op, object *pl)
 
void send_news (const object *op)
 
void send_party_message (object *op, char *msg)
 
void send_rules (const object *op)
 
int server_main (int argc, char **argv)
 
void set_darkness_map (mapstruct *m)
 
void set_map_timeout (mapstruct *oldmap)
 
int set_object_face_main (object *op)
 
void set_spell_skill (object *op, object *caster, object *spob, object *dest)
 
double shopkeeper_approval (const mapstruct *map, const object *player)
 
int should_arena_attack (object *pet, object *owner, object *target)
 
int should_director_abort (object *op, object *victim)
 
void show_skills (object *op, const char *search)
 
void shuffle_attack (object *op, int change_face)
 
int similar_direction (int a, int b)
 
int singing (object *pl, int dir, object *skill)
 
int skill_attack (object *tmp, object *pl, int dir, const char *string, object *skill)
 
int skill_ident (object *pl, object *skill)
 
int skill_throw (object *op, object *part, int dir, const char *params, object *skill)
 
int SP_level_dam_adjust (const object *caster, const object *spob)
 
int SP_level_duration_adjust (const object *caster, const object *spob)
 
int SP_level_range_adjust (const object *caster, const object *spob)
 
sint16 SP_level_spellpoint_cost (object *caster, object *spell, int flags)
 
void spell_effect (object *spob, int x, int y, mapstruct *map, object *originator)
 
void spell_failure (object *op, int failure, int power, object *skill)
 
int spell_find_dir (mapstruct *m, int x, int y, object *exclude)
 
void spring_trap (object *trap, object *victim)
 
int stand_in_light (object *op)
 
int stand_near_hostile (object *who)
 
void start_info (object *op)
 
int steal (object *op, int dir, object *skill)
 
objectstop_item (object *op)
 
void store_spell_expiry (object *spell)
 
int summon_golem (object *op, object *caster, int dir, object *spob)
 
int summon_hostile_monsters (object *op, int n, const char *monstername)
 
int summon_object (object *op, object *caster, object *spell_ob, int dir, const char *stringarg)
 
void swap_below_max (const char *except_level)
 
int swap_map (mapstruct *map)
 
int tailor_god_spell (object *spellop, object *caster)
 
int teleport (object *teleporter, uint8 tele_type, object *user)
 
void terminate_all_pets (object *owner)
 
void tick_the_clock (void)
 
int transfer_ob (object *op, int x, int y, int randomly, object *originator)
 
int transport_can_hold (const object *transport, const object *op, int nrof)
 
void trap_adjust (object *trap, int difficulty)
 
int trap_disarm (object *disarmer, object *trap, int risk, object *skill)
 
int trap_see (object *op, object *trap)
 
int trap_show (object *trap, object *where)
 
int use_alchemy (object *op)
 
int use_oratory (object *pl, int dir, object *skill)
 
int use_skill (object *op, const char *string)
 
int user_event (object *op, object *activator, object *third, const char *message, int fix)
 
int verify_player (const char *name, char *password)
 
void version (object *op)
 
int write_mark (object *op, object *spell, const char *msg)
 
int write_on_item (object *pl, const char *params, object *skill)
 
int write_rune (object *op, object *caster, object *spell, int dir, const char *runename)
 

Function Documentation

void add_player ( socket_struct ns)

Tries to add player on the connection passwd in ns.

Player object is created and put on the first map, rules/news/motd are sent.

Parameters
nsconnection.

Definition at line 383 of file player.c.

References add_friendly_object(), CLEAR_FLAG, display_motd(), socket_struct::faces_sent, fatal(), FLAG_FRIENDLY, get_name(), get_player(), socket_struct::inbuf, pl::ob, OUT_OF_MEMORY, send_news(), send_rules(), set_first_map(), pl::socket, and SockList_ResetRead().

Referenced by add_me_cmd().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int alchemy ( object op,
object caster,
object spell_ob 
)

Change items to gold nuggets. Only works for players.

Parameters
opwho is casting.
casterwhat is casting.
spell_obactual spell object.
Return values
0op isn't a player.
1op is a player.

Definition at line 2208 of file spell_effect.c.

References obj::above, alchemy_object(), obj::below, obj::contr, create_archetype(), obj::duration, F_TRUE, FLAG_ALIVE, FLAG_IS_CAULDRON, FLAG_NO_PICK, free_object(), get_map_flags(), GET_MAP_MOVE_BLOCK, GET_MAP_OB, obj::inv, large_value, socket_struct::look_position, obj::map, MOVE_WALK, P_NO_MAGIC, P_OUT_OF_MAP, place_alchemy_objects(), PLAYER, query_cost(), QUERY_FLAG, small_value, pl::socket, SP_level_dam_adjust(), SP_level_duration_adjust(), obj::type, obj::weight, obj::x, and obj::y.

Referenced by cast_spell().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int animate_weapon ( object op,
object caster,
object spell,
int  dir 
)

Generalization of staff_to_snake(). Makes a golem out of the caster's weapon. The golem is based on the archetype specified, modified by the caster's level and the attributes of the weapon. The weapon is inserted in the golem's inventory so that it falls to the ground when the golem dies. This code was very odd - code early on would only let players use the spell, yet the code wass full of player checks. I've presumed that the code that only let players use it was correct, and removed all the other player checks. MSW 2003-01-06

Parameters
opwho is casting.
casterwhat is casting.
spellactual spell object.
dircasting direction.
Return values
0spell failure.
1spell was successful.

Definition at line 2954 of file spell_effect.c.

References add_friendly_object(), add_string(), obj::anim_speed, obj::animation_id, obj::arch, arch_to_object(), AT_PHYSICAL, ATNR_BLIND, ATNR_CONFUSION, ATNR_DEATH, ATNR_DEPLETE, ATNR_FEAR, ATNR_PARALYZE, ATNR_PHYSICAL, ATNR_POISON, ATNR_SLOW, ATNR_TURN_UNDEAD, obj::attacktype, caster_level(), CLEAR_FLAG, archt::clone, liv::Con, obj::contr, control_golem(), obj::count, liv::dam, liv::Dex, obj::direction, draw_ext_info(), draw_ext_info_format(), obj::duration, esrv_update_item(), liv::exp, obj::face, find_free_spot(), find_marked_object(), fix_object(), FLAG_ANIMATE, FLAG_APPLIED, FLAG_FRIENDLY, FLAG_MONSTER, FLAG_REMOVED, FLAG_UNPAID, FLAG_USE_WEAPON, free_string(), freearr_x, freearr_y, get_map_flags(), GET_MAP_MOVE_BLOCK, get_split_ob(), GOLEM, pl::golem_count, liv::hp, insert_ob_in_map(), insert_ob_in_ob(), obj::last_anim, llevError, LOG(), obj::magic, obj::map, obj::materialname, MAX, MAX_BUF, liv::maxgrace, liv::maxhp, obj::move_type, MSG_TYPE_SPELL, MSG_TYPE_SPELL_ERROR, obj::name, archt::name, name_to_material(), NDI_BLACK, NDI_UNIQUE, obj::nrof, NROFATTACKS, obj::other_arch, P_OUT_OF_MAP, PLAYER, QUERY_FLAG, query_name(), obj::race, range_golem, pl::ranges, remove_ob(), obj::resist, _materialtype::save, SET_FLAG, set_owner(), set_spell_skill(), pl::shoottype, snprintf(), liv::sp, SP_level_dam_adjust(), SP_level_duration_adjust(), SP_level_range_adjust(), obj::speed, obj::speed_left, obj::state, obj::stats, liv::Str, obj::type, UPD_NROF, update_ob_speed(), liv::wc, WEAPON, obj::x, and obj::y.

Referenced by cast_spell().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void apply_builder_remove ( object pl,
int  dir 
)

Item remover.

Removes first buildable item, either under or above the floor

Parameters
plplayer removing an item.
dirdirection the player is trying to remove.

Definition at line 907 of file build_map.c.

References obj::above, BUTTON, CF_HANDLE, DETECTOR, DOOR, draw_ext_info(), draw_ext_info_format(), FLAG_IS_FLOOR, FLAG_IS_LINKED, FLOOR, free_object(), freearr_x, freearr_y, GATE, GET_MAP_OB, llevError, LOG(), MAGIC_EAR, obj::map, MAX_BUF, MSG_TYPE_APPLY, MSG_TYPE_APPLY_BUILD, archt::name, NDI_UNIQUE, mapdef::path, PEDESTAL, QUERY_FLAG, query_name(), remove_button_link(), remove_ob(), SIGN, TIMED_GATE, obj::type, WALL, obj::x, and obj::y.

Referenced by apply_map_builder().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void apply_changes_to_player ( object pl,
object change 
)

Applies (race) changes to a player.

Parameters
plobject to change.
changewhat kind of changes to apply. Should be of type CLASS.

Definition at line 1776 of file apply.c.

References obj::anim_speed, obj::anim_suffix, animate_object(), obj::animation_id, animations, obj::arch, obj::below, CHA, change_attr_value(), CLASS, CLEAR_FLAG, archt::clone, obj::contr, obj::face, obj::facing, FLAG_ANIMATE, FLAG_USE_WEAPON, GET_ANIM_ID, get_attr_value(), give_initial_items(), obj::inv, MAX_BUF, animations_struct::name, obj::name, NUM_STATS, pl::orig_stats, QUERY_FLAG, obj::randomitems, rndm(), set_attr_value(), SET_FLAG, snprintf(), obj::stats, try_find_animation(), and obj::type.

Referenced by player_changer_type_process().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int apply_container ( object op,
object sack 
)

Handle apply on containers. This is for containers that are applied by a player, whether in inventory or on the ground: eg, sacks, luggages, etc.

Moved to own function and added many features [Tero.Haatanen(at)lut.fi] This version is for client/server mode.

Reminder - there are three states for any container - closed (non applied), applied (not open, but objects that match get tossed into it), and open (applied flag set, and op->container points to the open container)

Parameters
opplayer.
sackcontainer the player is opening or closing.
Returns
1 if an object is apllied somehow or another, 0 if error/no apply
Author
Eneq(at)(csd.uu.se)

Definition at line 230 of file apply.c.

References CLEAR_FLAG, obj::container, CONTAINER, draw_ext_info_format(), obj::env, esrv_send_inventory(), esrv_send_item(), esrv_update_item(), EVENT_CLOSE, execute_event(), find_key(), FLAG_APPLIED, get_split_ob(), INS_NO_MERGE, insert_ob_in_map_at(), insert_ob_in_ob(), llevError, LOG(), obj::map, MAX_BUF, MOVE_ALL, obj::move_off, MSG_TYPE_APPLY, MSG_TYPE_APPLY_ERROR, MSG_TYPE_APPLY_SUCCESS, MSG_TYPE_APPLY_UNAPPLY, obj::name, NDI_UNIQUE, obj::nrof, PLAYER, QUERY_FLAG, query_name(), SCRIPT_FIX_ALL, SET_FLAG, set_object_face_main(), set_object_face_other(), obj::slaying, obj::type, UPD_FACE, UPD_FLAGS, obj::x, and obj::y.

Referenced by legacy_apply_container(), and loot_object().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void apply_map_builder ( object pl,
int  dir 
)

Global building function

This is the general map building function. Called when the player 'fires' a builder or remover object.

Parameters
plplayer building or removing.
dirbuilding direction.

Definition at line 978 of file build_map.c.

References obj::above, apply_builder_floor(), apply_builder_item(), apply_builder_remove(), apply_builder_wall(), apply_builder_window(), obj::arch, can_build_over(), obj::contr, decrease_ob, draw_ext_info(), find_archetype(), find_marked_object(), FLAG_IS_BUILDABLE, freearr_x, freearr_y, GET_MAP_OB, llevError, LOG(), obj::map, MAP_HEIGHT, MAP_WIDTH, MATERIAL, MSG_TYPE_APPLY, MSG_TYPE_APPLY_BUILD, archt::name, NDI_UNIQUE, object_create_arch(), mapdef::path, PLAYER, QUERY_FLAG, range_builder, pl::ranges, SET_FLAG, SIGN, obj::slaying, ST_BD_BUILD, ST_BD_REMOVE, ST_MAT_FLOOR, ST_MAT_ITEM, ST_MAT_WALL, ST_MAT_WINDOW, obj::subtype, obj::type, obj::x, and obj::y.

Referenced by fire().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int apply_special ( object who,
object op,
int  aflags 
)

Apply an object.

This function doesn't check for unpaid items, but check other restrictions.

Usage example: apply_special (who, op, AP_UNAPPLY | AP_IGNORE_CURSE)

Parameters
whoobject using op. It can be a monster.
opobject being used. Should be an equipment type item, eg, one which you put on and keep on for a while, and not something like a potion or scroll.
aflagscombination of AP_xxx flags.
Returns
1 if the action could not be completed, 0 on success. However, success is a matter of meaning - if the user passes the 'apply' flag to an object already applied, nothing is done, and 0 is returned.

Definition at line 1139 of file apply.c.

References AMULET, AP_APPLY, AP_BASIC_FLAGS, AP_IGNORE_CURSE, AP_NOPRINT, AP_PRINT, AP_UNAPPLY, ARMOUR, BOOTS, BOW, BRACERS, BUILDER, CAN_APPLY_NEVER, can_apply_object(), CAN_APPLY_RESTRICTION, CAN_APPLY_UNAPPLY_CHOICE, change_abil(), change_skill(), check_weapon_power(), obj::chosen_skill, CLOAK, obj::contr, draw_ext_info(), draw_ext_info_format(), obj::env, esrv_update_item(), liv::exp, find_skill_by_name(), fix_object(), FLAG_APPLIED, FLAG_BEEN_APPLIED, FLAG_CURSED, FLAG_DAMNED, FLAG_KNOWN_CURSED, FLAG_READY_BOW, FLAG_READY_RANGE, FLAG_READY_SKILL, FLAG_READY_WEAPON, get_ob_key_value(), get_split_ob(), GIRDLE, GLOVES, HELMET, HORN, liv::hp, insert_ob_in_ob(), obj::invisible, pl::item_power, obj::item_power, Settings::item_power_factor, obj::last_eat, obj::level, llevError, LOG(), MAX_BUF, MSG_TYPE_APPLY, MSG_TYPE_APPLY_BADBODY, MSG_TYPE_APPLY_CURSED, MSG_TYPE_APPLY_ERROR, MSG_TYPE_APPLY_PROHIBITION, MSG_TYPE_APPLY_SUCCESS, MSG_TYPE_APPLY_UNAPPLY, MSG_TYPE_VICTIM, MSG_TYPE_VICTIM_WAS_HIT, obj::name, NDI_UNIQUE, obj::nrof, Settings::personalized_blessings, PLAYER, QUERY_FLAG, query_name(), obj::race, random_roll(), range_bow, range_builder, range_misc, range_skill, pl::ranges, RING, ROD, SET_FLAG, settings, SHIELD, pl::shoottype, SKILL, obj::skill, SKILL_TOOL, obj::stats, obj::type, pl::unapply, unapply_always, unapply_for_ob(), unapply_never, unapply_nochoice, unapply_special(), UPD_FLAGS, UPD_NROF, UPD_WEIGHT, WAND, and WEAPON.

Referenced by adjust_skill_tool(), attack_hth(), change_skill(), drop_object(), find_throw_ob(), improve_armour(), improve_weapon(), legacy_ob_apply(), put_object_in_sack(), and stop_using_item().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int attack_ob ( object op,
object hitter 
)

Simple wrapper for attack_ob_simple(), will use hitter's values.

Parameters
opvictim.
hitterattacker.
Returns
dealt damage.

Definition at line 929 of file attack.c.

References attack_ob_simple(), liv::dam, obj::head, obj::stats, and liv::wc.

Referenced by do_skill_attack(), and move_golem().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int auto_apply ( object op)

Map was just loaded, handle op's initialisation.

Generates shop floor's item, and treasures.

Parameters
opobject to initialize.
Returns
1 if object was initialized, 0 else.

Definition at line 85 of file standalone.c.

References obj::below, CLEAR_FLAG, create_treasure(), mapdef::difficulty, obj::env, liv::exp, FLAG_AUTO_APPLY, FLAG_CURSED, FLAG_DAMNED, FLAG_IS_A_TEMPLATE, FLAG_UNPAID, free_object(), generate_treasure(), GT_ENVIRONMENT, HAS_RANDOM_ITEMS, liv::hp, identify(), insert_ob_in_map(), insert_ob_in_ob(), obj::inv, obj::map, MAX, QUERY_FLAG, obj::randomitems, remove_ob(), SET_FLAG, SHOP_FLOOR, obj::stats, TREASURE, obj::type, obj::x, and obj::y.

Referenced by do_auto_apply(), and fix_auto_apply().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void become_daemon ( void  )

Starts the server as a daemon.

Definition at line 72 of file daemon.c.

References getpid, and logfile.

Referenced by init().

+ Here is the caller graph for this function:

void become_follower ( object op,
const object new_god 
)

This function is called whenever a player has switched to a new god. It handles basically all the stat changes that happen to the player, including the removal of godgiven items (from the former cult).

Parameters
opplayer switching cults.
new_godnew god to worship.
Todo:
isn't there duplication with check_special_prayers() for spell removing?

Definition at line 502 of file gods.c.

References add_string(), ARMOUR, ATNR_COLD, ATNR_ELECTRICITY, ATNR_FIRE, ATNR_POISON, obj::below, BOOK, BOOTS, cast_magic_storm(), change_abil(), check_special_prayers(), CLEAR_FLAG, archt::clone, obj::contr, create_archetype(), determine_god(), draw_ext_info_format(), EXPERIENCE, find_god(), FLAG_APPLIED, FLAG_BLIND, FLAG_MAKE_INVIS, FLAG_REFL_MISSILE, FLAG_REFL_SPELL, FLAG_SEE_IN_DARK, FLAG_STARTEQUIP, FLAG_STEALTH, FLAG_UNDEAD, FLAG_USE_ARMOUR, FLAG_USE_SHIELD, FLAG_USE_WEAPON, FLAG_XRAYS, follower_remove_given_items(), liv::food, FORCE, free_object(), free_string(), get_archetype_by_type_subtype(), give_skill_by_name(), GLOVES, god_gives_present(), liv::grace, HELMET, liv::hp, obj::inv, obj::invisible, treasurestruct::item, treasureliststruct::items, obj::last_eat, obj::last_grace, obj::last_heal, obj::last_sp, obj::level, link_player_skills(), LOOSE_MANA, liv::luck, MSG_TYPE_ATTRIBUTE, MSG_TYPE_ATTRIBUTE_GOD, obj::name, NDI_NAVY, NDI_UNIQUE, treasurestruct::next, NROFATTACKS, obj::path_attuned, obj::path_denied, obj::path_repelled, player_unready_range_ob(), PREFER_LOW, present_in_ob_by_name(), QUERY_FLAG, obj::race, random_roll(), obj::randomitems, remove_ob(), obj::resist, SET_FLAG, SHIELD, SK_PRAYING, SKILL, obj::slaying, liv::sp, SPELL, SPELLBOOK, obj::stats, stop_using_item(), obj::subtype, obj::title, obj::type, update_priest_flag(), WEAPON, and worship_forbids_use().

Referenced by command_setgod(), and pray_at_altar().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void blind_living ( object op,
object hitter,
int  dam 
)

Blind a living thing.

Parameters
opvictim.
hitterwho is attacking.
damdamage to deal.

Definition at line 2276 of file attack.c.

References ATNR_BLIND, BLINDNESS, change_abil(), create_archetype(), draw_ext_info_format(), fix_object(), FLAG_APPLIED, FLAG_BLIND, liv::food, get_owner(), insert_ob_in_ob(), MAX_BUF, MSG_TYPE_ATTACK, MSG_TYPE_ATTACK_DID_HIT, NDI_UNIQUE, obj::owner, present_in_ob(), query_name(), obj::resist, SET_FLAG, obj::speed, and obj::stats.

Referenced by hit_with_one_attacktype(), and scroll_failure().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

sint64 calc_skill_exp ( object who,
object op,
object skill 
)

Calculates amount of experience can be gained for successfull use of a skill.

Here we take the view that a player must 'overcome an opponent' in order to gain experience. Examples include foes killed combat, finding/disarming a trap, stealing from somebeing, etc.

The gained experience is based primarily on the difference in levels, exp point value of vanquished foe, the relevent stats of the skill being used and modifications in the skills[] table.

For now, monsters and players will be treated differently. Below I give the algorithm for *PLAYER *experience gain. Monster exp gain is simpler. Monsters just get 10% of the exp of the opponent.

Players get a ratio, eg, opponent lvl / player level. This is then multiplied by various things. If simple exp is true, then this multiplier, include the level difference, is always 1. This revised method prevents some cases where there are big gaps in the amount you get just because you are now equal level vs lower level

Parameters
whoplayer/creature that used the skill.
opobject that was 'defeated'.
skillused skill. If none, it should just point back to who.
Returns
experience for the skill use.

Definition at line 599 of file skill_util.c.

References obj::arch, liv::Cha, archt::clone, mapdef::difficulty, liv::exp, FLAG_ALIVE, obj::level, llevDebug, LOG(), obj::magic, obj::map, MAX, obj::name, PLAYER, QUERY_FLAG, RUNE, settings, Settings::simple_exp, SKILL, obj::stats, TRAP, and obj::type.

Referenced by attempt_jump(), book_type_apply(), do_hidden_move(), do_skill_detect_curse(), do_skill_detect_magic(), do_skill_ident2(), find_traps(), hide(), kill_object(), pick_lock(), remove_trap(), scroll_type_apply(), singing(), spellbook_type_apply(), steal(), use_oratory(), and write_scroll().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int can_apply_object ( object who,
object op 
)

Checks to see if 'who' can apply object 'op'.

Parameters
wholiving thing trying to apply op.
opobject applied.
Returns
0 if apply can be done without anything special. Otherwise returns a bitmask of CAN_APPLY_xxx - potentially several of these may be set, but largely depends on circumstance - in the future, processing may be pruned once we know some status (eg, once CAN_APPLY_NEVER is set, do we really are what the other flags may be?) See include/define.h for detailed description of the meaning of these return values.

Definition at line 955 of file apply.c.

References obj::below, obj::body_info, obj::body_used, BOW, CAN_APPLY_NEVER, CAN_APPLY_RESTRICTION, CAN_APPLY_UNAPPLY, CAN_APPLY_UNAPPLY_CHOICE, CAN_APPLY_UNAPPLY_MULT, FABS, FLAG_APPLIED, FLAG_USE_ARMOUR, FLAG_USE_BOW, FLAG_USE_RANGE, FLAG_USE_RING, FLAG_USE_SHIELD, FLAG_USE_WEAPON, get_item_from_body_location(), HORN, obj::inv, IS_ARMOR, IS_SHIELD, IS_WEAPON, NUM_BODY_LOCATIONS, PLAYER, QUERY_FLAG, RING, ROD, SHIELD, obj::type, WAND, and WEAPON.

Referenced by apply_special(), and monster_check_apply().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int can_detect_enemy ( object op,
object enemy,
rv_vector rv 
)
int can_pay ( object pl)

Checks all unpaid items in op's inventory, adds up all the money they have, and checks that they can actually afford what they want to buy. Prints appropriate messages to the player.

Parameters
plplayer trying to bug.
Return values
1player could buy the items.
0some items can't be bought.

Definition at line 938 of file shop.c.

References coins, cost_string_from_value(), count_unpaid(), draw_ext_info(), find_archetype(), obj::inv, llevError, LOG(), make_list_like(), MAX_BUF, MSG_TYPE_SHOP, MSG_TYPE_SHOP_PAYMENT, NDI_UNIQUE, NUM_COINS, PLAYER, query_money(), snprintf(), stringbuffer_finish(), and obj::type.

Referenced by cfapi_player_can_pay(), and shop_mat_type_move_on().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int cast_bless ( object op,
object caster,
object spell_ob,
int  dir 
)

Improve statistics of some living object.

Parameters
opwho is casting.
casterwhat is casting.
spell_obactual spell object.
dircasting direction.
Return values
0spell failed.
1spell was successful.

Definition at line 1965 of file spell_effect.c.

References liv::ac, add_refcount(), add_string(), AT_PHYSICAL, ATNR_GODPOWER, obj::attacktype, obj::below, change_abil(), create_archetype(), determine_god(), draw_ext_info(), draw_ext_info_format(), obj::duration, find_god(), find_target_for_friendly_spell(), fix_object(), FLAG_APPLIED, FORCE, FORCE_CHANGE_ABILITY, FORCE_NAME, free_string(), insert_ob_in_ob(), obj::inv, MIN, MSG_TYPE_SPELL, MSG_TYPE_SPELL_ERROR, MSG_TYPE_SPELL_FAILURE, MSG_TYPE_SPELL_SUCCESS, MSG_TYPE_SPELL_TARGET, obj::name, obj::name_pl, NDI_UNIQUE, NROFATTACKS, obj::path_attuned, obj::race, obj::resist, SET_FLAG, obj::slaying, SP_level_duration_adjust(), obj::speed, obj::speed_left, obj::stats, obj::subtype, obj::type, and liv::wc.

Referenced by cast_spell().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int cast_cause_disease ( object op,
object caster,
object spell,
int  dir 
)

Let's try to infect something.

Parameters
opwho is casting.
casterwhat object is casting.
spellspell object to cast.
dircast direction.
Return values
0no one caught anything.
1at least one living was affected.

Definition at line 1310 of file spell_attack.c.

References obj::above, liv::ac, ARCH_DETECT_MAGIC, arch_to_object(), caster_level(), create_archetype(), liv::dam, draw_ext_info(), draw_ext_info_format(), liv::exp, obj::facing, FLAG_MONSTER, free_object(), freearr_x, freearr_y, get_map_flags(), GET_MAP_MOVE_BLOCK, GET_MAP_OB, obj::head, liv::hp, infect_object(), insert_ob_in_map(), obj::last_eat, obj::last_sp, obj::level, obj::magic, obj::map, liv::maxgrace, liv::maxhp, liv::maxsp, MOVE_FLY_LOW, MSG_TYPE_SPELL, MSG_TYPE_SPELL_FAILURE, MSG_TYPE_SPELL_SUCCESS, obj::name, NDI_UNIQUE, obj::other_arch, P_IS_ALIVE, P_OUT_OF_MAP, PLAYER, QUERY_FLAG, obj::range, set_owner(), set_spell_skill(), liv::sp, SP_level_dam_adjust(), SP_level_duration_adjust(), SP_level_range_adjust(), obj::stats, obj::type, liv::wc, obj::x, and obj::y.

Referenced by cast_spell().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int cast_change_ability ( object op,
object caster,
object spell_ob,
int  dir,
int  silent 
)

Cast some stat-improving spell.

Parameters
opwho is casting.
casterwhat is casting.
spell_obactual spell object.
dircasting direction.
silentif non zero, don't say when the spell is already is effect.
Return values
0spell failed.
1spell was successful.
Todo:
weird check on duration? since you'll never get there since a force would have been found?

Definition at line 1825 of file spell_effect.c.

References liv::ac, add_refcount(), obj::attacktype, obj::below, change_abil(), CLEAR_FLAG, create_archetype(), draw_ext_info(), draw_ext_info_format(), obj::duration, liv::exp, find_target_for_friendly_spell(), FLAG_APPLIED, FLAG_NO_FIX_PLAYER, FLAG_SEE_IN_DARK, FLAG_XRAYS, FORCE, FORCE_CHANGE_ABILITY, FORCE_NAME, free_string(), get_attr_value(), liv::hp, insert_ob_in_ob(), obj::inv, obj::move_type, MSG_TYPE_SPELL, MSG_TYPE_SPELL_ERROR, MSG_TYPE_SPELL_FAILURE, MSG_TYPE_SPELL_SUCCESS, obj::name, obj::name_pl, NDI_UNIQUE, no_gain_msgs, NROFATTACKS, NUM_STATS, PLAYER, QUERY_FLAG, obj::race, obj::resist, rndm(), set_attr_value(), SET_FLAG, SP_level_dam_adjust(), SP_level_duration_adjust(), obj::speed, obj::speed_left, obj::stats, store_spell_expiry(), obj::subtype, obj::type, and liv::wc.

Referenced by cast_spell(), and god_intervention().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int cast_change_map_lightlevel ( object op,
object caster,
object spell 
)

This changes the light level for the entire map.

Parameters
opwho is casting.
casterwhat is casting.
spellactual spell object.
Return values
0light not affected.
1light changed.

Definition at line 3183 of file spell_effect.c.

References change_map_light(), liv::dam, draw_ext_info(), obj::map, MSG_TYPE_SPELL, MSG_TYPE_SPELL_FAILURE, NDI_UNIQUE, and obj::stats.

Referenced by cast_spell().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int cast_cone ( object op,
object caster,
int  dir,
object spell 
)

Casts a cone spell.

Parameters
opperson firing the object.
casterobject casting the spell.
dirdirection to fire in.
spellspell that is being fired. It uses other_arch for the archetype to fire.
Return values
0couldn't cast.
1successful cast.

Definition at line 403 of file spell_attack.c.

References arch_to_object(), AT_FEAR, AT_GODPOWER, AT_HOLYWORD, AT_TURN_UNDEAD, obj::attacktype, caster_level(), liv::Cha, archt::clone, cone_drop(), obj::count, liv::dam, draw_ext_info(), obj::duration, fear_bonus, FLAG_UNDEAD, freearr_x, freearr_y, get_map_flags(), GET_MAP_MOVE_BLOCK, insert_ob_in_map(), obj::level, llevDebug, LOG(), obj::map, liv::maxhp, MOVE_FLY_LOW, obj::move_on, obj::move_type, MSG_TYPE_SPELL, MSG_TYPE_SPELL_ERROR, archt::name, NDI_UNIQUE, obj::other_arch, P_OUT_OF_MAP, PLAYER, QUERY_FLAG, obj::range, RUNE, set_owner(), set_spell_skill(), liv::sp, SP_level_dam_adjust(), SP_level_duration_adjust(), SP_level_range_adjust(), obj::stats, tailor_god_spell(), turn_bonus, obj::type, liv::Wis, obj::x, and obj::y.

Referenced by cast_spell(), cast_wonder(), prayer_failure(), and spell_failure().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int cast_consecrate ( object op,
object caster,
object spell 
)

A spell to make an altar your god's.

Parameters
opwho is casting.
casterwhat is casting.
spellactual spell object.
Return values
0no consecration happened.
1an altar waas consecrated.

Definition at line 2873 of file spell_effect.c.

References arch_to_object(), obj::below, caster_level(), determine_god(), draw_ext_info(), draw_ext_info_format(), find_archetype(), find_god(), FLAG_IS_FLOOR, HOLY_ALTAR, INS_BELOW_ORIGINATOR, insert_ob_in_map(), obj::level, llevError, LOG(), obj::map, MAX_BUF, MSG_TYPE_SPELL, MSG_TYPE_SPELL_ERROR, MSG_TYPE_SPELL_FAILURE, MSG_TYPE_SPELL_SUCCESS, obj::name, NDI_UNIQUE, QUERY_FLAG, remove_ob(), snprintf(), tolower, obj::type, obj::x, and obj::y.

Referenced by cast_spell().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int cast_create_food ( object op,
object caster,
object spell_ob,
int  dir,
const char *  stringarg 
)

Create food. Allows the choice of what sort of food object to make. If stringarg is NULL, it will create food dependent on level –PeterM

Parameters
opwho is casting.
casterwhat is casting.
spell_obactual spell object.
dircasting direction.
stringargoptional parameter specifying what kind of items to create.
Return values
0no food created.
foodwas created.

Definition at line 639 of file spell_effect.c.

References cast_create_obj(), archt::clone, copy_object(), draw_ext_info(), DRINK, find_archetype_by_object_type_name(), first_archetype, liv::food, FOOD, get_object(), MSG_TYPE_SPELL, MSG_TYPE_SPELL_FAILURE, NDI_UNIQUE, archt::next, obj::nrof, SP_level_duration_adjust(), obj::stats, obj::type, and obj::value.

Referenced by cast_spell().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int cast_create_missile ( object op,
object caster,
object spell,
int  dir,
const char *  stringarg 
)

Create a missile (nonmagic - magic +4). Will either create bolts or arrows based on whether a crossbow or bow is equiped. If neither, it defaults to arrows. Sets the plus based on the casters level. It is also settable with the invoke command. If the caster attempts to create missiles with too great a plus, the default is used. The # of arrows created also goes up with level, so if a 30th level mage wants LOTS of arrows, and doesn't care what the plus is he could create nonnmagic arrows, or even -1, etc...

Parameters
opwho is casting.
casterwhat is casting.
spellactual spell object.
dircasting direction.
stringargoptional parameter specifying what kind of items to create.
Return values
0no missile created.
missileswere created.

Definition at line 525 of file spell_effect.c.

References obj::below, BOW, cast_create_obj(), obj::count, create_archetype(), liv::dam, draw_ext_info_format(), obj::duration, find_archetype(), find_artifactlist(), FLAG_APPLIED, FLAG_IDENTIFIED, free_object(), give_artifact_abilities(), obj::inv, artifactstruct::item, artifactliststruct::items, llevDebug, LOG(), obj::magic, MSG_TYPE_SPELL, MSG_TYPE_SPELL_ERROR, obj::name, NDI_UNIQUE, artifactstruct::next, obj::nrof, pick_up(), PLAYER, QUERY_FLAG, obj::race, SET_FLAG, obj::slaying, SP_level_dam_adjust(), SP_level_duration_adjust(), obj::stats, strcasecmp(), obj::type, obj::value, and was_destroyed.

Referenced by cast_spell().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int cast_create_obj ( object op,
object new_op,
int  dir 
)

Creates object new_op in direction dir or if that is blocked, beneath the player (op). we pass 'caster', but don't use it for anything. This is really just a simple wrapper function .

Parameters
opwho is casting.
new_opobject to insert.
dirdirection to insert into. Can be 0.
Returns
direction that the object was actually placed in.

Definition at line 517 of file spell_util.c.

References draw_ext_info(), freearr_x, freearr_y, get_map_flags(), GET_MAP_MOVE_BLOCK, INS_BELOW_ORIGINATOR, insert_ob_in_map(), obj::map, MSG_TYPE_SPELL, MSG_TYPE_SPELL_INFO, NDI_UNIQUE, OB_TYPE_MOVE_BLOCK, P_OUT_OF_MAP, obj::x, and obj::y.

Referenced by cast_create_food(), cast_create_missile(), and cast_create_town_portal().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int cast_create_town_portal ( object op,
object caster,
object spell,
int  dir 
)

This function cast the spell of town portal for op.

The spell operates in two passes. During the first one a place is marked as a destination for the portal. During the second one, 2 portals are created, one in the position the player cast it and one in the destination place. The portal are synchronized and 2 forces are inserted in the player to destruct the portal next time player creates a new portal pair. This spell has a side effect that it allows people to meet each other in a permanent, private, appartements by making a town portal from it to the town or another public place. So, check if the map is unique and if so return an error

Code by Tchize (david.nosp@m..del.nosp@m.becq@.nosp@m.usa..nosp@m.net)

Parameters
opwho is casting.
casterwhat is casting.
spellactual spell object.
dircasting direction.
Return values
0spell was insuccessful for some reason.
1spell worked.

Definition at line 1122 of file spell_effect.c.

References obj::above, add_string(), arch_to_object(), cast_create_obj(), caster_level(), check_inv_recursive(), obj::contr, create_archetype(), Settings::create_home_portals, draw_ext_info(), EXIT_PATH, EXIT_X, EXIT_Y, find_archetype(), FREE_AND_COPY, free_object(), free_string(), insert_ob_in_map(), insert_ob_in_ob(), mapdef::last_reset_time, llevDebug, llevError, Settings::localdir, LOG(), obj::map, MAP_PLAYER_UNIQUE, obj::msg, MSG_TYPE_SPELL, MSG_TYPE_SPELL_ERROR, MSG_TYPE_SPELL_FAILURE, MSG_TYPE_SPELL_SUCCESS, obj::name, obj::name_pl, NDI_NAVY, NDI_UNIQUE, obj::other_arch, mapdef::path, present_arch(), obj::race, ready_map_name(), remove_ob(), settings, obj::slaying, snprintf(), pl::transport, obj::weapontype, obj::x, and obj::y.

Referenced by cast_spell().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int cast_curse ( object op,
object caster,
object spell_ob,
int  dir 
)

Curse an object, reducing its statistics.

Parameters
opwho is casting.
casterwhat object is casting.
spell_obspell object to cast.
dircast direction.
Return values
0curse had no effect.
1something was cursed.

Definition at line 914 of file spell_attack.c.

References liv::ac, add_refcount(), obj::below, change_abil(), create_archetype(), determine_god(), obj::direction, draw_ext_info(), draw_ext_info_format(), obj::duration, find_god(), fix_object(), FLAG_APPLIED, FORCE, FORCE_CHANGE_ABILITY, FORCE_NAME, free_string(), get_pointed_target(), insert_ob_in_ob(), obj::inv, obj::last_grace, MSG_TYPE_SPELL, MSG_TYPE_SPELL_FAILURE, MSG_TYPE_SPELL_SUCCESS, MSG_TYPE_VICTIM, MSG_TYPE_VICTIM_SPELL, obj::name, obj::name_pl, NDI_UNIQUE, obj::path_denied, obj::path_repelled, PLAYER, obj::race, obj::range, SET_FLAG, SP_level_duration_adjust(), obj::speed, obj::speed_left, SPELL_GRACE, obj::stats, obj::subtype, obj::type, and liv::wc.

Referenced by cast_spell().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int cast_destruction ( object op,
object caster,
object spell_ob 
)

Hit all monsters around the caster.

Parameters
opwho is casting.
casterwhat object is casting.
spell_obspell object to cast.
Returns
1.

Definition at line 819 of file spell_attack.c.

References obj::above, arch_to_object(), ATNR_MAGIC, obj::attacktype, change_skill(), liv::dam, obj::duration, find_skill_by_name(), FLAG_ALIVE, FLAG_FRIENDLY, get_map_flags(), GET_MAP_OB, obj::head, hit_player(), insert_ob_in_map(), make_object_glow(), obj::map, obj::other_arch, P_IS_ALIVE, P_OUT_OF_MAP, PLAYER, QUERY_FLAG, obj::range, obj::resist, obj::skill, SP_DESTRUCTION, SP_FAERY_FIRE, SP_level_dam_adjust(), SP_level_duration_adjust(), SP_level_range_adjust(), obj::stats, obj::subtype, obj::type, obj::x, and obj::y.

Referenced by cast_spell().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cast_dust ( object op,
object throw_ob,
int  dir 
)

Handles op throwing objects of type 'DUST'. This is much simpler in the new spell code - we basically just treat this as any other spell casting object.

Parameters
opobject throwing.
throw_obwhat to throw.
dirdirection to throw into.

Definition at line 3682 of file player.c.

References cast_spell(), draw_ext_info_format(), find_skill_by_name(), FLAG_REMOVED, free_object(), obj::inv, llevError, LOG(), MSG_TYPE_APPLY, MSG_TYPE_APPLY_SUCCESS, obj::name, NDI_UNIQUE, PLAYER, POTION, QUERY_FLAG, remove_ob(), obj::skill, and obj::type.

Referenced by do_throw().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int cast_earth_to_dust ( object op,
object caster,
object spell_ob 
)

Basically destroys earthwalls in the area.

Parameters
opwho is casting.
casterwhat is casting.
spell_obactual spell object.
Return values
0op isn't a player.
1op is a player.

Definition at line 882 of file spell_effect.c.

References obj::above, AT_PHYSICAL, FLAG_TEAR_DOWN, get_map_flags(), GET_MAP_MOVE_BLOCK, GET_MAP_OB, hit_player(), obj::map, P_OUT_OF_MAP, PLAYER, QUERY_FLAG, obj::range, SP_level_range_adjust(), obj::type, obj::x, and obj::y.

Referenced by cast_spell().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int cast_heal ( object op,
object caster,
object spell,
int  dir 
)

Heals something.

Parameters
opwho is casting.
casterwhat is casting.
spellactual spell object.
dircasting direction.
Todo:
check spurious cure_disease call (shouldn't the spell's level be sent?) and return check value (always 1).

Definition at line 1679 of file spell_effect.c.

References AT_BLIND, AT_CONFUSION, AT_DISEASE, AT_POISON, obj::attacktype, cure_disease(), liv::dam, draw_ext_info(), obj::duration, find_archetype(), find_target_for_friendly_spell(), liv::food, FORCE, liv::grace, liv::hp, obj::last_grace, obj::last_sp, liv::maxgrace, liv::maxhp, liv::maxsp, MSG_TYPE_SPELL, MSG_TYPE_SPELL_FAILURE, MSG_TYPE_SPELL_HEAL, NDI_UNIQUE, PREFER_HIGH, present_arch_in_ob(), present_in_ob_by_name(), random_roll(), liv::sp, and obj::stats.

Referenced by cast_spell(), and god_intervention().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int cast_identify ( object op,
object caster,
object spell 
)

Identifies objects in the players inventory/on the ground.

Parameters
opwho is casting.
casterwhat is casting.
spellactual spell object.
Return values
0nothing was identified.
1at least one object was identified.

Definition at line 2419 of file spell_effect.c.

References obj::above, obj::below, liv::dam, draw_ext_info(), draw_ext_info_format(), esrv_update_item(), FLAG_IDENTIFIED, GET_MAP_OB, identify(), obj::inv, obj::invisible, obj::map, MAX_BUF, obj::msg, MSG_TYPE_ITEM, MSG_TYPE_ITEM_INFO, MSG_TYPE_SPELL, MSG_TYPE_SPELL_FAILURE, NDI_UNIQUE, need_identify(), ob_describe(), PLAYER, QUERY_FLAG, SP_level_dam_adjust(), spell_effect(), obj::stats, obj::type, UPD_FLAGS, UPD_NAME, obj::x, and obj::y.

Referenced by cast_spell().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int cast_invisible ( object op,
object caster,
object spell_ob 
)

Makes the player or character invisible. Note the spells to 'stack', but perhaps in odd ways. the duration for all is cumulative. In terms of invis undead/normal invis, it is the last one cast that will determine if you are invisible to undead or normal monsters. For improved invis, if you cast it with a one of the others, you lose the improved part of it, and the above statement about undead/ normal applies.

Parameters
opwho is casting.
casterwhat is casting.
spell_obactual spell object.
Return values
0invisibility was already in action.
1op is now invisible.

Definition at line 821 of file spell_effect.c.

References obj::active_next, active_objects, add_refcount(), obj::contr, draw_ext_info(), obj::duration, obj::enemy, FLAG_MAKE_INVIS, FREE_AND_CLEAR_STR, pl::hidden, pl::invis_race, obj::invisible, makes_invisible_to(), MSG_TYPE_SPELL, MSG_TYPE_SPELL_FAILURE, MSG_TYPE_SPELL_SUCCESS, NDI_UNIQUE, PLAYER, QUERY_FLAG, obj::race, SP_level_duration_adjust(), pl::tmp_invis, obj::type, UP_OBJ_FACE, and update_object().

Referenced by cast_spell().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int cast_item_curse_or_curse ( object op,
object caster,
object spell_ob 
)

This alters player's marked item's cursed or blessed status, based on the spell_ob's fields.

Parameters
opplayer casting the spell.
casterwhat object was used to cast the spell.
spell_obspell itself.
Returns
1 if item was changed, 0 else.

Definition at line 2367 of file spell_effect.c.

References CLEAR_FLAG, draw_ext_info(), draw_ext_info_format(), esrv_update_item(), find_marked_object(), FLAG_BLESSED, FLAG_CURSED, FLAG_IDENTIFIED, FLAG_KNOWN_BLESSED, FLAG_KNOWN_CURSED, FLAG_STARTEQUIP, HUGE_BUF, MSG_TYPE_SPELL, MSG_TYPE_SPELL_FAILURE, MSG_TYPE_SPELL_SUCCESS, NDI_UNIQUE, QUERY_FLAG, query_short_name(), SET_FLAG, and UPD_FLAGS.

Referenced by cast_spell().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int cast_light ( object op,
object caster,
object spell,
int  dir 
)

Illuminates something on a map, or try to blind a living thing.

See the spells documentation file for why this is its own function.

Parameters
opwho is casting.
casterwhat object is casting.
spellspell object to cast.
dircast direction.
Return values
0no effect.
1lighting successful.

Definition at line 1235 of file spell_attack.c.

References obj::above, arch_to_object(), obj::attacktype, liv::dam, draw_ext_info(), obj::duration, FLAG_MONSTER, freearr_x, freearr_y, get_map_flags(), GET_MAP_MOVE_BLOCK, GET_MAP_OB, obj::head, hit_player(), insert_ob_in_map(), llevError, LOG(), obj::map, MAX_LIGHT_RADII, MSG_TYPE_SPELL, MSG_TYPE_SPELL_ERROR, MSG_TYPE_SPELL_FAILURE, NDI_UNIQUE, OB_TYPE_MOVE_BLOCK, obj::other_arch, P_IS_ALIVE, P_OUT_OF_MAP, QUERY_FLAG, obj::range, SP_level_dam_adjust(), SP_level_duration_adjust(), SP_level_range_adjust(), obj::stats, obj::x, and obj::y.

Referenced by cast_spell().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void cast_magic_storm ( object op,
object tmp,
int  lvl 
)

This is really used mostly for spell fumbles at the like.

Parameters
opwhat is casting this.
tmpobject to propogate.
lvlhow nasty should the propagation be.

Definition at line 55 of file spell_effect.c.

References obj::count, liv::dam, obj::duration, insert_ob_in_map(), obj::level, obj::map, liv::maxhp, obj::range, obj::stats, obj::x, and obj::y.

Referenced by alchemy_failure_effect(), become_follower(), god_examines_priest(), pray_at_altar(), prayer_failure(), and scroll_failure().

+ Here is the call graph for this function: