Crossfire Server, Trunk
|
Go to the source code of this file.
Functions | |
int | account_change_password (const char *account_name, const char *current_password, const char *new_password) |
void | account_char_add (Account_Chars *chars, player *pl) |
void | account_char_free (Account_Chars *chars) |
Account_Chars * | account_char_load (const char *account_name) |
void | account_char_remove (Account_Chars *chars, const char *pl_name) |
void | account_char_save (Account_Chars *chars) |
int | account_check_string (const char *str) |
const char * | account_exists (const char *account_name) |
const char * | account_get_account_for_char (const char *charname) |
linked_char * | account_get_additional_chars (const char *account_name, const Account_Chars *chars, int *count) |
char ** | account_get_players_for_account (const char *account_name) |
int | account_is_logged_in (const char *name) |
int | account_link (const char *account_name, const char *player_name) |
int | account_login (const char *account_name, const char *account_password) |
void | account_logout (const char *account_name) |
int | account_new (const char *account_name, const char *account_password) |
int | account_remove_player (const char *account_name, const char *player_name) |
void | accounts_clear (void) |
void | accounts_load (void) |
void | accounts_save (void) |
player * | add_player (socket_struct *ns, int flags) |
void | add_server_collect_hooks () |
int | alchemy (object *op, object *caster, object *spell_ob) |
int | animate_weapon (object *op, object *caster, object *spell, int dir) |
int | apply_auto (object *op) |
void | apply_auto_fix (mapstruct *m) |
void | apply_builder_remove (object *pl, int dir) |
int | apply_by_living (object *pl, object *op, int aflag, int quiet) |
void | apply_by_living_below (object *pl) |
int | apply_can_apply_object (const object *who, const object *op) |
void | apply_changes_to_player (object *pl, object *change, int limit_stats) |
int | apply_check_weapon_power (const object *who, int improves) |
int | apply_container (object *op, object *sack, int aflags) |
void | apply_handle_yield (object *tmp) |
int | apply_manual (object *op, object *tmp, int aflag) |
void | apply_map_builder (object *pl, int dir) |
int | apply_race_and_class (object *op, archetype *race, archetype *opclass, living *stats) |
int | apply_special (object *who, object *op, int aflags) |
int | attack_ob (object *op, object *hitter) |
int | become_follower (object *op, const object *new_god) |
void | blind_living (object *op, object *hitter, int dam) |
int64_t | calc_skill_exp (const object *who, const object *op, const object *skill) |
bool | can_follow (object *op, player *other) |
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 *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 | 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_bless (object *op, 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) |
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) |
void | change_object (object *op) |
int | change_skill (object *who, object *new_skill, int flag) |
void | check_active_maps (void) |
void | check_bullet (object *op) |
void | check_login (object *op, const char *password) |
int | check_name (player *me, const char *name) |
bool | check_password (const char *typed, const char *crypted) |
void | check_physically_infect (object *victim, object *hitter) |
int | check_pick (object *op) |
int | check_race_and_class (living *stats, archetype *race, archetype *opclass) |
void | check_spell_expiry (object *spell) |
object * | check_spell_known (object *op, const char *name) |
int | checkbanned (const char *login, const char *host) |
void | clean_tmp_files (void) |
void | cleanup (void) |
void | cleanupPlugins (void) |
void | clear_skill (object *who) |
void | close_modules () |
void | command_abil (object *op, const char *params) |
void | command_accountpasswd (object *op, const char *params) |
void | command_accuse (object *op, const char *params) |
void | command_addexp (object *op, const char *params) |
void | command_afk (object *op, const char *params) |
void | command_apply (object *op, const char *params) |
void | command_applymode (object *op, const char *params) |
void | command_archs (object *op, const char *params) |
void | command_arrest (object *op, const char *params) |
void | command_banish (object *op, const char *params) |
void | command_beg (object *op, const char *params) |
void | command_bleed (object *op, const char *params) |
void | command_blush (object *op, const char *params) |
void | command_body (object *op, const char *params) |
void | command_bounce (object *op, const char *params) |
void | command_bow (object *op, const char *params) |
void | command_bowmode (object *op, const char *params) |
void | command_brace (object *op, const char *params) |
void | command_burp (object *op, const char *params) |
void | command_cackle (object *op, const char *params) |
void | command_cast (object *op, const char *params) |
void | command_cast_spell (object *op, const char *params, int cast_now) |
void | command_chat (object *op, const char *params) |
void | command_chuckle (object *op, const char *params) |
void | command_clap (object *op, const char *params) |
void | command_cointoss (object *op, const char *params) |
void | command_cough (object *op, const char *params) |
void | command_create (object *op, const char *params) |
void | command_cringe (object *op, const char *params) |
void | command_cry (object *op, const char *params) |
void | command_dance (object *op, const char *params) |
void | command_debug (object *op, const char *params) |
void | command_delete (object *op, const char *params) |
void | command_diff (object *op, const char *params) |
void | command_disarm (object *op, const char *params) |
void | command_dm (object *op, const char *params) |
void | command_dmhide (object *op, const char *params) |
void | command_dmtell (object *op, const char *params) |
void | command_drop (object *op, const char *params) |
void | command_dropall (object *op, const char *params) |
void | command_dump (object *op, const char *params) |
void | command_dumpabove (object *op, const char *params) |
void | command_dumpallarchetypes (object *op, const char *params) |
void | command_dumpallmaps (object *op, const char *params) |
void | command_dumpallobjects (object *op, const char *params) |
void | command_dumpbelow (object *op, const char *params) |
void | command_dumpfriendlyobjects (object *op, const char *params) |
void | command_dumpmap (object *op, const char *params) |
void | command_east (object *op, const char *params) |
void | command_empty (object *op, const char *params) |
void | command_examine (object *op, const char *params) |
void | command_execute (object *pl, char *command) |
void | command_face (object *op, const char *params) |
void | command_fire (object *op, const char *params) |
void | command_fire_stop (object *op, const char *params) |
void | command_fix_me (object *op, const char *params) |
void | command_flip (object *op, const char *params) |
void | command_follow (object *op, const char *params) |
void | command_forget_spell (object *op, const char *params) |
void | command_free (object *op, const char *params) |
void | command_freeze (object *op, const char *params) |
void | command_frown (object *op, const char *params) |
void | command_gasp (object *op, const char *params) |
void | command_giggle (object *op, const char *params) |
void | command_glare (object *op, const char *params) |
void | command_goto (object *op, const char *params) |
void | command_grin (object *op, const char *params) |
void | command_groan (object *op, const char *params) |
void | command_growl (object *op, const char *params) |
void | command_gsay (object *op, const char *params) |
void | command_help (object *op, const char *params) |
void | command_hiccup (object *op, const char *params) |
void | command_hide (object *op, const char *params) |
void | command_hiscore (object *op, const char *params) |
void | command_hug (object *op, const char *params) |
void | command_insert_into (object *op, const char *params) |
void | command_inventory (object *op, const char *params) |
void | command_invisible (object *op, const char *params) |
void | command_invoke (object *op, const char *params) |
void | command_kick (object *op, const char *params) |
void | command_kill_pets (object *op, const char *params) |
void | command_kiss (object *op, const char *params) |
void | command_knowledge (object *pl, const char *params) |
void | command_language (object *op, const char *params) |
void | command_laugh (object *op, const char *params) |
void | command_learn_special_prayer (object *op, const char *params) |
void | command_learn_spell (object *op, const char *params) |
void | command_lick (object *op, const char *params) |
void | command_list (object *pl, bool is_dm) |
void | command_listen (object *op, const char *params) |
void | command_listplugins (object *op, const char *params) |
void | command_loadplugin (object *op, const char *params) |
void | command_loadtest (object *op, const char *params) |
void | command_lock_item (object *op, const char *params) |
void | command_malloc (object *op, const char *params) |
void | command_mapinfo (object *op, const char *params) |
void | command_maps (object *op, const char *params) |
void | command_mark (object *op, const char *params) |
void | command_me (object *op, const char *params) |
void | command_mon_aggr (object *op, const char *params) |
void | command_motd (object *op, const char *params) |
void | command_news (object *op, const char *params) |
void | command_nod (object *op, const char *params) |
void | command_north (object *op, const char *params) |
void | command_northeast (object *op, const char *params) |
void | command_northwest (object *op, const char *params) |
void | command_nowiz (object *op, const char *params) |
void | command_orcknuckle (object *op, const char *params) |
void | command_overlay_reset (object *op, const char *params) |
void | command_overlay_save (object *op, const char *params) |
void | command_party (object *op, const char *params) |
void | command_party_rejoin (object *op, const char *params) |
void | command_passwd (object *pl, const char *params) |
void | command_patch (object *op, const char *params) |
void | command_peaceful (object *op, const char *params) |
void | command_petmode (object *op, const char *params) |
void | command_pickup (object *op, const char *params) |
void | command_players (object *op, const char *params) |
void | command_poke (object *op, const char *params) |
void | command_possess (object *op, const char *params) |
void | command_pout (object *op, const char *params) |
void | command_printlos (object *op, const char *params) |
void | command_puke (object *op, const char *params) |
void | command_purge_quest (object *op, const char *param) |
void | command_purge_quest_definitions (object *op, const char *param) |
void | command_quest (object *op, const char *params) |
void | command_quit (object *op, const char *params) |
void | command_recollect (object *op, const char *params) |
command_registration | command_register (const char *name, uint8_t type, command_function func, float time) |
command_registration | command_register_extra (const char *name, const char *extra, uint8_t type, command_function_extra func, float time) |
void | command_remove (object *op, const char *params) |
void | command_rename_item (object *op, const char *params) |
void | command_reply (object *op, const char *params) |
void | command_reset (object *op, const char *params) |
void | command_resistances (object *op, const char *params) |
void | command_rotateshoottype (object *op, const char *params) |
void | command_rskill (object *pl, const char *params) |
void | command_rules (object *op, const char *params) |
void | command_run (object *op, const char *params) |
void | command_run_stop (object *op, const char *params) |
void | command_save (object *op, const char *params) |
void | command_say (object *op, const char *params) |
void | command_scream (object *op, const char *params) |
void | command_search (object *op, const char *params) |
void | command_search_items (object *op, const char *params) |
void | command_setgod (object *op, const char *params) |
void | command_settings (object *op, const char *ignored) |
void | command_shake (object *op, const char *params) |
void | command_shiver (object *op, const char *params) |
void | command_shout (object *op, const char *params) |
void | command_showpets (object *op, const char *params) |
void | command_shrug (object *op, const char *params) |
void | command_shutdown (object *op, const char *params) |
void | command_sigh (object *op, const char *params) |
void | command_skills (object *op, const char *params) |
void | command_slap (object *op, const char *params) |
void | command_smile (object *op, const char *params) |
void | command_smirk (object *op, const char *params) |
void | command_snap (object *op, const char *params) |
void | command_sneeze (object *op, const char *params) |
void | command_snicker (object *op, const char *params) |
void | command_sniff (object *op, const char *params) |
void | command_snore (object *op, const char *params) |
void | command_sound (object *op, const char *params) |
void | command_south (object *op, const char *params) |
void | command_southeast (object *op, const char *params) |
void | command_southwest (object *op, const char *params) |
void | command_speed (object *op, const char *params) |
void | command_spit (object *op, const char *params) |
void | command_ssdumptable (object *op, const char *params) |
void | command_stack_clear (object *op, const char *params) |
void | command_stack_list (object *op, const char *params) |
void | command_stack_pop (object *op, const char *params) |
void | command_stack_push (object *op, const char *params) |
void | command_statistics (object *pl, const char *params) |
void | command_stats (object *op, const char *params) |
void | command_stay (object *op, const char *params) |
void | command_strings (object *op, const char *params) |
void | command_strut (object *op, const char *params) |
void | command_style_map_info (object *op, const char *params) |
void | command_sulk (object *op, const char *params) |
void | command_summon (object *op, const char *params) |
void | command_take (object *op, const char *params) |
void | command_teleport (object *op, const char *params) |
void | command_tell (object *op, const char *params) |
void | command_thank (object *op, const char *params) |
void | command_think (object *op, const char *params) |
void | command_throw (object *op, const char *params) |
void | command_time (object *op, const char *params) |
void | command_title (object *op, const char *params) |
void | command_toggle_shout (object *op, const char *params) |
void | command_twiddle (object *op, const char *params) |
void | command_unarmed_skill (object *op, const char *params) |
void | command_unloadplugin (object *op, const char *params) |
void | command_unregister (command_registration command) |
void | command_use (object *op, const char *params) |
void | command_usekeys (object *op, const char *params) |
void | command_uskill (object *pl, const char *params) |
void | command_version (object *op, const char *params) |
void | command_wave (object *op, const char *params) |
void | command_west (object *op, const char *params) |
void | command_whereabouts (object *op, const char *params) |
void | command_whereami (object *op, const char *params) |
void | command_whistle (object *op, const char *params) |
void | command_who (object *op, const char *params) |
void | command_wimpy (object *op, const char *params) |
void | command_wink (object *op, const char *params) |
void | command_wizcast (object *op, const char *params) |
void | command_wizpass (object *op, const char *params) |
void | command_yawn (object *op, const char *params) |
void | commands_clear () |
void | commands_init (void) |
void | cone_drop (object *op) |
void | confirm_password (object *op) |
void | confuse_living (object *op, object *hitter, int dam) |
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) |
int | cure_disease (object *sufferer, object *caster, sstring skill) |
void | dead_player (object *op) |
void | delete_character (const char *name) |
void | destroy_object (object *op) |
int | detect_curse_on_item (object *pl, object *tmp, object *skill) |
int | detect_magic_on_item (object *pl, object *tmp, object *skill) |
const char * | determine_god (object *op) |
archetype * | determine_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 *skill, int dir) |
void | display_motd (const object *op) |
void | do_dump (object *who, object *what) |
void | do_forget_spell (object *op, const char *spell) |
void | do_goto (object *op, const char *name, int x, int y) |
void | 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) |
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) |
object * | drop_object (object *op, object *tmp, uint32_t nrof) |
void | dump_quests (void) |
void | dump_races (void) |
void | dump_spells (void) |
void | emergency_save (int flag) |
void | enter_exit (object *op, object *exit_ob) |
void | enter_player_maplevel (object *op) |
void | enter_player_savebed (object *op) |
void | examine (object *op, object *tmp) |
void | examine_monster (object *op, object *tmp, int level) |
void | explode_bullet (object *op) |
int | face_player (object *op, int dir) |
object * | find_applied_skill_by_name (const object *op, const char *name) |
object * | find_key (object *pl, object *container, object *door) |
object * | find_marked_object (object *op) |
player * | find_player (const char *plname) |
player * | find_player_options (const char *plname, int options, const mapstruct *map) |
player * | find_player_partial_name (const char *plname) |
player * | find_player_socket (const socket_struct *ns) |
object * | find_random_spell_in_ob (object *ob, const char *skill) |
object * | find_skill_by_name (object *who, const char *name) |
object * | find_skill_by_number (object *who, int skillno) |
object * | find_target_for_friendly_spell (object *op, int dir) |
int | find_traps (object *pl, object *skill) |
void | finish_races () |
void | fire (object *op, int dir) |
int | fire_arch_from_position (object *op, object *caster, int16_t x, int16_t y, int dir, object *spell) |
int | fire_bolt (object *op, object *caster, int dir, object *spob) |
int | fire_bow (object *op, object *arrow, int dir, int wc_mod, int16_t sx, int16_t sy) |
int | fire_swarm (object *op, object *caster, object *spell, int dir) |
void | fix_luck (void) |
object * | fix_stopped_arrow (object *op) |
void | fix_stopped_item (object *op, mapstruct *map, object *originator) |
void | fix_weight (void) |
void | flush_old_maps (void) |
int | forbid_play (void) |
void | free_knowledge (void) |
int | free_no_drop (object *op) |
void | free_quest (void) |
void | free_quest_definitions (void) |
void | free_races (void) |
void | free_server (void) |
int | friendly_fire (object *op, object *hitter) |
void | get_attack_message_for_attack_type (int dam, uint8_t atm_type, const char *victim_name, char *buf1, char *buf2) |
void | get_name (object *op) |
object * | get_nearest_criminal (object *mon) |
object * | get_nearest_player (object *mon) |
int | get_party_password (object *op, partylist *party) |
void | get_password (object *op) |
player * | get_player (player *p) |
const char * | get_reply_text_own (reply_type rt) |
void | give_initial_items (object *pl, treasurelist *items) |
int | handle_newcs_player (object *op) |
int | hide (object *op, object *skill) |
int | hideability (object *ob) |
void | hiscore_check (object *op, int quiet) |
void | hiscore_display (object *op, int max, const char *match) |
void | hiscore_init (void) |
int | hit_map (object *op, int dir, uint32_t type, int full_hit) |
int | hit_player (object *op, int dam, object *hitter, uint32_t type, int full_hit) |
object * | hit_with_arrow (object *op, object *victim) |
int | identify_object_with_skill (object *tmp, object *pl, object *skill, int print_on_success) |
int | infect_object (object *victim, object *disease, int force) |
void | init (int argc, char **argv) |
void | init_ob_methods (void) |
void | init_signals () |
void | init_skills (void) |
void | initPlugins (void) |
void | inventory (object *op, object *inv) |
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, const object *killer) |
void | knowledge_add_probe_monster (object *op, object *mon) |
void | knowledge_first_player_save (player *pl) |
void | knowledge_give (player *pl, const char *marker, const object *book) |
void | knowledge_item_can_be_used_alchemy (object *op, const object *item) |
int | knowledge_player_knows (const player *pl, const char *knowledge) |
void | knowledge_process_incremental (void) |
void | knowledge_read (player *pl, object *book) |
void | knowledge_send_info (socket_struct *ns) |
void | knowledge_send_known (player *pl) |
int | learn_skill (object *pl, object *scroll) |
void | leave (player *pl, int draw_exit) |
void | legacy_animate_trigger (object *op) |
void | legacy_move_hole (object *op) |
void | legacy_remove_force (object *op) |
int | legal_range (object *op, int r) |
void | list_players (object *op, region *reg, partylist *party) |
void | load_races (BufferReader *reader, const char *filename) |
object * | lookup_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) |
bool | map_can_reset (const mapstruct *map, long current_time) |
void | meditate (object *pl, object *skill) |
int | min_casting_level (const object *caster, const object *spell) |
int | monster_can_detect_enemy (object *op, object *enemy, rv_vector *rv) |
int | monster_can_see_enemy (object *op, object *enemy) |
void | monster_check_apply_all (object *monster) |
void | monster_check_doors (object *op, mapstruct *m, int x, int y) |
void | monster_check_earthwalls (object *op, mapstruct *m, int x, int y) |
object * | monster_check_enemy (object *npc, rv_vector *rv) |
void | monster_communicate (object *op, const char *txt) |
int | monster_compute_path (object *source, object *target, int default_dir) |
void | monster_do_living (object *op) |
void | monster_do_say (const mapstruct *map, const char *message) |
object * | monster_find_nearest_enemy (object *npc, object *owner) |
object * | monster_find_throw_ob (object *op) |
int | monster_move (object *op) |
void | monster_npc_call_help (object *op) |
void | monster_npc_say (object *npc, const char *cp) |
int | monster_stand_in_light (object *op) |
int | mood_change (object *op, object *caster, object *spell) |
int | move_disease (object *disease) |
void | move_firewall (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) |
char const * | newhash (char const *password) |
int | object_teleport (object *op, mapstruct *map, int x, int y) |
int | ok_to_put_more (mapstruct *m, int16_t x, int16_t y, object *op, uint32_t immune_stop) |
int | op_on_battleground (object *op, int *x, int *y, archetype **trophy) |
void | paralyze_living (object *op, int dam) |
int | party_confirm_password (const partylist *party, const char *password) |
partylist * | party_find (const char *partyname) |
partylist * | party_form (object *op, const char *partyname) |
partylist * | party_get_first (void) |
const char * | party_get_leader (const partylist *party) |
partylist * | party_get_next (const partylist *party) |
const char * | party_get_password (const partylist *party) |
void | party_join (object *op, partylist *party) |
void | party_leave (object *op) |
void | party_obsolete_parties (void) |
void | party_remove (partylist *party) |
void | party_send_message (object *op, const char *message) |
void | party_set_password (partylist *party, const char *password) |
int | path_to_player (object *mon, object *pl, unsigned mindiff) |
int | perceive_self (object *op) |
void | pets_attempt_follow (object *for_owner, int force) |
void | pets_control_golem (object *op, int dir) |
void | pets_follow_owner (object *ob, object *owner) |
object * | pets_get_enemy (object *pet, rv_vector *rv) |
void | pets_move (object *ob) |
void | pets_move_golem (object *op) |
int | pets_should_arena_attack (object *pet, object *owner, object *target) |
int | pets_summon_golem (object *op, object *caster, int dir, object *spob) |
int | pets_summon_object (object *op, object *caster, object *spell_ob, int dir, const char *stringarg) |
void | pets_terminate_all (object *owner) |
int | pick_lock (object *pl, int dir, object *skill) |
void | pick_up (object *op, object *alt) |
void | play_again (object *op) |
int | player_arrest (object *who) |
bool | player_can_find (object *op, object *ob) |
int | player_can_view (object *pl, object *op) |
SockList * | player_get_delayed_buffer (player *pl) |
void | player_set_state (player *pl, uint8_t state) |
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) |
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, int level) |
void | process_events (void) |
void | 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_t nrof) |
void | quest_first_player_save (player *pl) |
int | quest_get_player_state (player *pl, sstring quest_code) |
void | quest_load_definitions (void) |
void | quest_send_initial_states (player *pl) |
void | quest_set_player_state (player *pl, sstring quest_code, int state) |
void | quest_start (player *pl, sstring quest_code, int state) |
int | quest_was_completed (player *pl, sstring quest_code) |
object * | races_get_random_monster (const char *race, int level) |
void | read_map_log (void) |
void | receive_party_password (object *op, const char *password) |
void | receive_play_again (object *op, char key) |
void | receive_player_name (object *op, const char *name) |
void | receive_player_password (object *op, const char *password) |
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) |
int | remove_curse (object *op, object *caster, object *spell) |
void | remove_door (object *op) |
void | remove_locked_door (object *op) |
int | remove_trap (object *op, object *skill) |
void | remove_unpaid_objects (object *op, object *env, int free_items) |
void | rod_adjust (object *rod) |
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_t nrof) |
int | save_player (object *op, int flag) |
void | save_throw_object (object *op, uint32_t type, object *originator) |
void | scroll_failure (object *op, int failure, int power) |
void | send_news (const object *op) |
void | send_rules (const object *op) |
void | server_main (int argc, char *argv[]) |
void | set_darkness_map (mapstruct *m) |
void | set_first_map (object *op) |
void | set_map_timeout (mapstruct *oldmap) |
int | set_object_face_main (object *op) |
void | set_player_socket (player *p, socket_struct *ns) |
void | set_spell_skill (object *op, object *caster, object *spob, object *dest) |
int | should_director_abort (const object *op, const object *victim) |
void | show_skills (object *op, const char *search) |
void | shuffle_attack (object *op) |
int | singing (object *pl, int dir, object *skill) |
void | 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, object *skill) |
int | slow_living_by (object *op, const int speed_penalty) |
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) |
int16_t | SP_level_spellpoint_cost (object *caster, object *spell, int flags) |
int | SP_level_wc_adjust (const object *caster, const object *spob) |
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_near_hostile (object *who) |
int | steal (object *op, int dir, object *skill) |
object * | stop_item (object *op) |
void | store_spell_expiry (object *spell) |
int | summon_hostile_monsters (object *op, int n, const char *monstername) |
int | swap_map (mapstruct *map) |
int | tailor_god_spell (object *spellop, object *caster) |
int | teleport (object *teleporter, uint8_t tele_type, object *user) |
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) |
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 | verify_player (const char *name, char *password) |
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) |
int account_change_password | ( | const char * | account_name, |
const char * | current_password, | ||
const char * | new_password | ||
) |
Change an account password. It does error checking, but the caller might want to do checking before getting here.
account_name | account name we are changing |
current_password | current password for the account or NULL. This is the unencrypted password (password as entered by user). If NULL, the current password is not checked, suitable for resetting lost passwords. |
new_password | new password to set, unencrypted. |
0 | password changed successfully. |
1 | account name, old or new password has invalid character. |
2 | account does not exist. |
3 | current password is invalid. |
Definition at line 628 of file account.cpp.
References curse_on_apply::ac, account_check_string(), accounts, check_password(), newhash(), strcasecmp(), and strdup_local.
Referenced by account_password(), and command_accountpasswd().
void account_char_add | ( | Account_Chars * | chars, |
player * | pl | ||
) |
This adds a player to the list of accounts. We check to see if the player has already been added to this account - if so, we just update the infromation. Note that all strings are filled in, even if that may just be a blank field. This simplifies a lot of the code instead of having to deal with NULL values. Note that this routine is also used to update existing entries - if the character already exists, we update it, otherwise it is added.
chars | Existing list of characters for account. May be NULL. |
pl | Player structure to add |
Definition at line 207 of file account_char.cpp.
References add_string(), Account_Char::character_class, Account_Chars::chars, Account_Char::face, free_string(), Account_Char::isDead, Account_Char::level, Account_Char::map, Account_Char::name, Account_Char::party, altar_valkyrie::pl, and Account_Char::race.
Referenced by save_player(), and START_TEST().
void account_char_free | ( | Account_Chars * | chars | ) |
This frees all data associated with the character information.
chars | Data to free. The caller should make sure it no longer uses any data in this list. |
Definition at line 345 of file account_char.cpp.
References Account_Chars::account_name, Account_Chars::chars, chars_loaded, free_string(), and Account_Chars::ref_count.
Referenced by account_add_player_cmd(), free_newsocket(), init_connection(), key_confirm_quit(), kill_player_permadeath(), make_perma_dead(), send_account_players(), set_player_socket(), START_TEST(), and unmake_perma_dead().
Account_Chars* account_char_load | ( | const char * | account_name | ) |
For a given account name, load the character information and return it. It is the responsibility of the caller to call account_char_free() on the returned value to free it.
account_name | Name of the account. The name should be validated before this routine is called (eg, passed checks for legitimate characters and logged in) |
Definition at line 135 of file account_char.cpp.
References curse_on_apply::ac, account_char_load_from_file(), add_string(), chars_loaded, and Account_Chars::ref_count.
Referenced by account_add_player_cmd(), make_perma_dead(), send_account_players(), START_TEST(), and unmake_perma_dead().
void account_char_remove | ( | Account_Chars * | chars, |
const char * | pl_name | ||
) |
This removes a character on this account. This is typically used when a character has been deleted, and not for general cleanup
chars | Existing list of characters for account. |
pl_name | The name of the character |
Definition at line 313 of file account_char.cpp.
References Account_Char::character_class, Account_Chars::chars, Account_Char::face, free_string(), Account_Char::map, Account_Char::name, Account_Char::party, and Account_Char::race.
void account_char_save | ( | Account_Chars * | chars | ) |
Saves the character information for the given account.
chars | previously loaded/generated list of character information for this account. |
Definition at line 158 of file account_char.cpp.
References curse_on_apply::ac, ACCOUNT_DIR, Account_Chars::account_name, Account_Chars::chars, Settings::localdir, MAX_BUF, of_close(), of_open(), and settings.
Referenced by account_add_player_cmd(), free_newsocket(), key_confirm_quit(), kill_player_permadeath(), make_perma_dead(), save_player(), START_TEST(), and unmake_perma_dead().
int account_check_string | ( | const char * | str | ) |
Checks a string to make sure it does not have any invalid characters. We are fairly permissive on character here. String must start with alphanumeric String must not contain :;/'[ String can not end if a space This string will get used for file/directory names, but so long as as characters are not included that are not illegal, one can still manipulate the file/directory by putting it in quotes. If one starts to block all characters that may get interperted by shells, a large number of characters now get blocked (|*]()!, etc), and deciding which should be allowed and not just becomes a judgement call, so easier to just allow all and have the user put it in quotes.
str | string to check |
Definition at line 361 of file account.cpp.
References MAX_NAME, and make_face_from_files::str.
Referenced by account_change_password(), account_new(), account_new_cmd(), account_password(), create_player_cmd(), and START_TEST().
const char* account_exists | ( | const char * | account_name | ) |
Checks the existing accounts, and see if this account exists. This can also be used to get the official name for the account (eg, as user first entered, so Mark instead of mARk)
account_name | account name we are looking for. |
Definition at line 297 of file account.cpp.
References curse_on_apply::ac, accounts, and strcasecmp().
Referenced by account_login_cmd(), account_new(), account_new_cmd(), and START_TEST().
const char* account_get_account_for_char | ( | const char * | charname | ) |
This looks at all the accounts and sees if charname is associated with any of them.
charname | character name to check for. |
Definition at line 580 of file account.cpp.
References curse_on_apply::ac, accounts, and guildjoin::charname.
Referenced by account_add_player_cmd(), and save_player().
linked_char* account_get_additional_chars | ( | const char * | account_name, |
const Account_Chars * | chars, | ||
int * | count | ||
) |
Get a list of character names linked to the specified account which are not listed in chars.
account_name | account name. | |
chars | known character names. | |
[out] | count | will be incremented by the number of items returned. Not initialized before use. |
Definition at line 551 of file account.cpp.
References curse_on_apply::ac, accounts, char_in_list(), Account_Chars::chars, linked_char::name, linked_char::next, and strcasecmp().
Referenced by send_account_players().
char** account_get_players_for_account | ( | const char * | account_name | ) |
Returns an array of strings for the characters on this account - the array is null terminated. In fact, it just returns the ac->character_names.
account_name | name of the account to get the players for. |
Definition at line 520 of file account.cpp.
References curse_on_apply::ac, accounts, and strcasecmp().
Referenced by account_play_cmd(), and START_TEST().
int account_is_logged_in | ( | const char * | name | ) |
This checkes if an account is logged in. It is mainly used because some operations should not be done on logged in accounts (keeping everything synchronized is harder.)
name | name to look for. |
Definition at line 605 of file account.cpp.
References accounts_logged_in, and give::name.
Referenced by account_add_player_cmd().
int account_link | ( | const char * | account_name, |
const char * | player_name | ||
) |
Adds a player name to an account. Player corresponds to the names used in the pl object, not the person sitting at the computer. This function presumes that the caller has done the work to verify that the player does in fact exist, and does any related work to update the player. What this function does is simply update the account structure.
account_name | name of the account we are adding this player to. |
player_name | name of this player. |
0 | player name added successfully. |
1 | could not find account of that name. |
Definition at line 445 of file account.cpp.
References curse_on_apply::ac, accounts, ensure_available_characters(), strcasecmp(), and strdup_local.
Referenced by account_add_player_cmd(), save_player(), and START_TEST().
int account_login | ( | const char * | account_name, |
const char * | account_password | ||
) |
Check if the given account exists, and whether the password is correct.
Note - if we do get a match, we update the last_login value - it is presumed that if someone knows the right accountname/password, that the account is effectively getting logged in.
account_name | account name we are looking for. |
account_password | password for the account. This is the unencrypted password (password as entered by user) |
Definition at line 319 of file account.cpp.
References curse_on_apply::ac, account_password(), accounts, accounts_logged_in, check_password(), and strcasecmp().
Referenced by account_login_cmd().
void account_logout | ( | const char * | account_name | ) |
Remove 'account_name' from the list of logged in accounts.
Definition at line 338 of file account.cpp.
References accounts_logged_in.
Referenced by free_newsocket().
int account_new | ( | const char * | account_name, |
const char * | account_password | ||
) |
Adds an account. It does error checking, but the caller might want to do checking before getting here.
account_name | account name we are adding |
account_password | password for the account. This is the unencrypted password (password as entered by user) |
0 | account added successfully. |
1 | name or password has invalid character. |
2 | account already exists. |
Definition at line 400 of file account.cpp.
References curse_on_apply::ac, account_alloc(), account_check_string(), account_exists(), account_password(), accounts, accounts_loaded, newhash(), and strdup_local.
Referenced by account_new_cmd(), and START_TEST().
int account_remove_player | ( | const char * | account_name, |
const char * | player_name | ||
) |
Removes a player name from an account. Player corresponds to the names used in the pl object, not the person sitting at the computer. This function presumes that the caller has done the work to verify that the player does in fact exist, and does any related work to update the player. What this function does is simply update the account structure.
account_name | name of the account we are removing this player from. |
player_name | name of this player. |
0 | player name removed successfully. |
1 | could not find account of that name. |
2 | player of this name not on account. |
Definition at line 475 of file account.cpp.
References curse_on_apply::ac, accounts, push::match, and strcasecmp().
Referenced by account_add_player_cmd(), key_confirm_quit(), kill_player_permadeath(), and START_TEST().
void accounts_clear | ( | void | ) |
This is used purely by the test harness - by clearing the accounts, it can then verify that the data is added is loaded back into memory properly. As such, we don't worry about memory cleanup, etc.
Definition at line 153 of file account.cpp.
References accounts, and accounts_loaded.
Referenced by START_TEST().
void accounts_load | ( | void | ) |
This loads all the account entries into memory. It is presumed to only be called once during the program startup.
Definition at line 162 of file account.cpp.
References curse_on_apply::ac, account_alloc(), ACCOUNT_FILE, accounts, accounts_loaded, buf, bufferreader_destroy(), bufferreader_init_from_file(), bufferreader_next_line(), ensure_available_characters(), llevError, llevInfo, Settings::localdir, LOG(), MAX_BUF, NUM_ACCOUNT_FIELDS, settings, split_string(), strdup_local, and Ice::tmp.
Referenced by init(), and START_TEST().
void accounts_save | ( | void | ) |
Save all the account information. Since the data is stored in a flat file, if an update is needed for an account, the only way to save updates is to save all the data - there isn't an easy way to just add another player name for an account.
Definition at line 256 of file account.cpp.
References curse_on_apply::ac, ACCOUNT_FILE, account_write_entry(), accounts, accounts_loaded, Settings::localdir, MAX_BUF, of_close(), of_open(), and settings.
Referenced by account_new_cmd(), cleanup(), do_specials(), and START_TEST().
player* add_player | ( | socket_struct * | ns, |
int | flags | ||
) |
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.
ns | connection. |
flags | flag values are define in player.h: ADD_PLAYER_NEW - If set, go right to new character creation - used in case of new account code. We don't display motd and other bits in this case either. ADD_PLAYER_NO_MAP - Do not set up map information - used in character login method >2 where we do not use the same starting map. |
Definition at line 460 of file player.cpp.
References add_friendly_object(), ADD_PLAYER_NEW, ADD_PLAYER_NO_MAP, ADD_PLAYER_NO_STATS_ROLL, CLEAR_FLAG, display_motd(), FLAG_FRIENDLY, flags, get_name(), get_player(), Ns_Avail, player::ob, player_set_state(), roll_again(), send_news(), send_rules(), set_first_map(), set_player_socket(), ST_ROLL_STAT, and socket_struct::status.
Referenced by add_me_cmd(), create_player_cmd(), and START_TEST().
void add_server_collect_hooks | ( | ) |
Definition at line 1069 of file init.cpp.
References Settings::add_hook(), load_materials(), load_races(), and settings.
Referenced by init(), and ResourcesManager::load().
Change items to gold nuggets. Only works for players.
op | who is casting. |
caster | what is casting. |
spell_ob | actual spell object. |
0 | op isn't a player. |
1 | op is a player. |
Definition at line 2304 of file spell_effect.cpp.
References alchemy_object(), object::duration, FLAG_ALIVE, FLAG_IS_CAULDRON, FLAG_NO_PICK, FOR_INV_FINISH, FOR_INV_PREPARE, FOR_MAP_FINISH, FOR_MAP_PREPARE, get_map_flags(), GET_MAP_MOVE_BLOCK, MOVE_WALK, give::op, P_NO_MAGIC, P_OUT_OF_MAP, place_alchemy_objects(), PLAYER, QUERY_FLAG, SP_level_dam_adjust(), SP_level_duration_adjust(), Ice::tmp, diamondslots::x, and diamondslots::y.
Referenced by cast_spell().
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 was 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
op | who is casting. |
caster | what is casting. |
spell | actual spell object. |
dir | casting direction. |
0 | spell failure. |
1 | spell was successful. |
Definition at line 3063 of file spell_effect.cpp.
References disinfect::a, add_friendly_object(), add_string(), object::anim_speed, object::animation, object::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, buf, caster_level(), CLEAR_FLAG, archetype::clone, living::Con, living::dam, living::Dex, draw_ext_info(), draw_ext_info_format(), object::duration, esrv_update_item(), object::face, 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, GOLEM, make_face_from_files::int, object::last_anim, llevError, LOG(), m, object::magic, MAX, MAX_BUF, living::maxgrace, object::move_type, MSG_TYPE_SPELL, MSG_TYPE_SPELL_ERROR, object::name, archetype::name, name_to_material(), NDI_BLACK, NDI_UNIQUE, object::nrof, NROFATTACKS, object_find_free_spot(), object_insert_in_map_at(), object_insert_in_ob(), object_remove(), object_set_owner(), object_split(), object_update_speed(), give::op, object::other_arch, P_OUT_OF_MAP, pets_control_golem(), PLAYER, QUERY_FLAG, query_name(), object::race, range_golem, materialtype_t::save, SET_FLAG, set_spell_skill(), living::sp, SP_level_dam_adjust(), SP_level_duration_adjust(), SP_level_range_adjust(), object::state, object::stats, living::Str, Ice::tmp, object::type, UPD_NROF, WEAPON, diamondslots::x, and diamondslots::y.
Referenced by cast_spell().
int apply_auto | ( | object * | op | ) |
Map was just loaded, handle op's initialization.
Generates shop floor's item, and treasures.
op | object to initialize. |
Definition at line 211 of file main.cpp.
References BOOK, CLEAR_FLAG, create_treasure(), FLAG_AUTO_APPLY, FLAG_BLESSED, FLAG_CURSED, FLAG_DAMNED, FLAG_IDENTIFIED, FLAG_IS_A_TEMPLATE, FLAG_KNOWN_MAGICAL, FLAG_UNPAID, FOR_INV_FINISH, FOR_INV_PREPARE, FREE_OBJ_NO_DESTROY_CALLBACK, generate_treasure(), GT_ENVIRONMENT, GT_ONLY_GOOD, HAS_RANDOM_ITEMS, identify(), is_magical(), MAX, object_free(), object_free_drop_inventory(), object_insert_in_map_at(), object_insert_in_ob(), object_remove(), give::op, QUERY_FLAG, SET_FLAG, SHOP_FLOOR, Ice::tmp, and TREASURE.
Referenced by apply_auto_fix(), auto_apply_fix_inventory(), and do_auto_apply().
void apply_auto_fix | ( | mapstruct * | m | ) |
Go through the entire map (only the first time when an original map is loaded) and performs special actions for certain objects (most initialization of chests and creation of treasures and stuff). Calls apply_auto() if appropriate.
m | map to fix. |
Those are dummy functions defined to resolve all symboles. Added as part of glue cleaning. Ryo 2005-07-15
Definition at line 258 of file main.cpp.
References apply_auto(), auto_apply_fix_inventory(), check_trigger(), CLASS, CONTAINER, create_treasure(), FLAG_AUTO_APPLY, FLAG_IS_LINKED, FLAG_MONSTER, FOR_MAP_FINISH, FOR_MAP_PREPARE, GET_MAP_OB, HAS_RANDOM_ITEMS, HEAD, m, MAP_HEIGHT, MAP_WIDTH, monster_check_apply_all(), object_update_speed(), PLAYER, PLAYER_CHANGER, QUERY_FLAG, SPELL, TIMED_GATE, Ice::tmp, TREASURE, TRIGGER_BUTTON, TRIGGER_PEDESTAL, nlohmann::detail::void(), diamondslots::x, and diamondslots::y.
Referenced by enter_unique_map(), generate_random_map(), mapfile_load(), and START_TEST().
void apply_builder_remove | ( | object * | pl, |
int | dir | ||
) |
Item remover.
Removes first buildable item, either under or above the floor
pl | player removing an item. |
dir | direction the player is trying to remove. |
Definition at line 890 of file build_map.cpp.
References BUTTON, CF_HANDLE, DETECTOR, DOOR, draw_ext_info(), draw_ext_info_format(), FLAG_IS_FLOOR, FLAG_IS_LINKED, FLOOR, freearr_x, freearr_y, GATE, GET_MAP_OB, say::item, llevError, LOG(), MAGIC_EAR, MAX_BUF, MSG_TYPE_APPLY, MSG_TYPE_APPLY_BUILD, give::name, NDI_UNIQUE, object_free_drop_inventory(), object_remove(), PEDESTAL, altar_valkyrie::pl, QUERY_FLAG, query_name(), remove_button_link(), SIGN, TIMED_GATE, WALL, diamondslots::x, and diamondslots::y.
Referenced by apply_map_builder().
Living thing is applying an object.
pl | object causing op to be applied. |
op | object being applied. |
aflag | special (always apply/unapply) flags. Nothing is done with them in this function - they are passed to apply_special(). |
quiet | if 1, suppresses the "don't know how to apply" and "you must get it first" messages as needed by apply_by_living_below(). There can still be "but you are floating high above the ground" messages. |
Definition at line 637 of file apply.cpp.
References apply_anim_suffix(), apply_manual(), draw_ext_info(), draw_ext_info_format(), FLAG_WAS_WIZ, FLAG_WIZ, MAX_BUF, METHOD_ERROR, METHOD_OK, METHOD_SILENT_ERROR, METHOD_UNHANDLED, MOVE_FLYING, MSG_TYPE_APPLY, MSG_TYPE_APPLY_ERROR, give::name, NDI_UNIQUE, object_free(), object_remove(), give::op, altar_valkyrie::pl, play_sound_map(), PLAYER, QUERY_FLAG, query_name(), SOUND_TYPE_ITEM, and Ice::tmp.
Referenced by apply_by_living_below(), apply_cmd(), and command_apply().
void apply_by_living_below | ( | object * | pl | ) |
Attempt to apply the object 'below' the player. If the player has an open container, we use that for below, otherwise we use the ground.
pl | player. |
Definition at line 695 of file apply.cpp.
References apply_by_living(), FLAG_IS_FLOOR, banquet::floors, FOR_OB_AND_BELOW_FINISH, FOR_OB_AND_BELOW_PREPARE, METHOD_OK, ob_apply(), altar_valkyrie::pl, QUERY_FLAG, Ice::tmp, and TRANSPORT.
Referenced by cfapi_object_apply_below(), command_apply(), and knowledge_alchemy_attempt().
Checks to see if 'who' can apply object 'op'.
who | living thing trying to apply op. |
op | object applied. |
Definition at line 1016 of file apply.cpp.
References object::body_info, BOW, CAN_APPLY_NEVER, CAN_APPLY_RESTRICTION, CAN_APPLY_UNAPPLY, CAN_APPLY_UNAPPLY_CHOICE, CAN_APPLY_UNAPPLY_MULT, FABS, FLAG_USE_ARMOUR, FLAG_USE_BOW, FLAG_USE_RANGE, FLAG_USE_RING, FLAG_USE_SHIELD, FLAG_USE_WEAPON, get_item_from_body_location(), IS_ARMOR, IS_SHIELD, IS_WEAPON, NUM_BODY_LOCATIONS, object_find_by_type_applied(), give::op, PLAYER, QUERY_FLAG, RING, ROD, SHIELD, Ice::tmp, WAND, WEAPON, and autojail::who.
Referenced by apply_check_apply_restrictions(), and monster_check_apply().
Applies (race) changes to a player.
pl | object to change. |
change | what kind of changes to apply. Should be of type CLASS. |
limit_stats | uses the AC_PLAYER_STAT defines from define.h: AC_PLAYER_STAT_LIMIT: Limit stats to racial maximum AC_PLAYER_STAT_NO_CHANGE: Do not make any stat adjustments |
Definition at line 1672 of file apply.cpp.
References AC_PLAYER_STAT_LIMIT, AC_PLAYER_STAT_NO_CHANGE, animate::anim, object::anim_suffix, animate_object(), buf, change_attr_value(), CHARISMA, CLASS, CLEAR_FLAG, object::face, FLAG_ANIMATE, FLAG_USE_WEAPON, FORCE, GET_ANIM, get_attr_value(), give_initial_items(), MAX_BUF, NUM_STATS, object_find_by_name(), object_present_in_ob_by_name(), altar_valkyrie::pl, QUERY_FLAG, object::randomitems, rndm(), set_attr_value(), SET_FLAG, object::stats, try_find_animation(), and object::type.
Referenced by apply_race_and_class(), and player_changer_type_process().
int apply_check_weapon_power | ( | const object * | who, |
int | improves | ||
) |
This checks to see of the player (who) is sufficient level to use a weapon with improves improvements (typically last_eat). We take an int here instead of the object so that the improvement code can pass along the increased value to see if the object is usable. we return 1 (true) if the player can use the weapon. See ../types/weapon_improver/weapon_improver.c
who | living to check |
improves | improvement level. |
Definition at line 1131 of file apply.cpp.
References autojail::who.
Referenced by apply_special(), and improve_weapon().
Handle apply on containers. This is for containers that are applied by a player, whether in inventory or on the ground: eg, sacks, luggage, 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)
op | player. |
sack | container the player is opening or closing. |
aflags | combination of Flags for apply_special(). flags. |
Definition at line 222 of file apply.cpp.
References AP_APPLY, AP_NULL, AP_OPEN, AP_UNAPPLY, CLEAR_FLAG, CONTAINER, draw_ext_info_format(), object::env, esrv_send_inventory(), esrv_send_item(), esrv_update_item(), EVENT_CLOSE, events_execute_object_event(), find_key(), FLAG_APPLIED, object::head, INS_NO_MERGE, llevError, LOG(), object::map, MAX_BUF, object::more, MOVE_ALL, object::move_off, MSG_TYPE_APPLY, MSG_TYPE_APPLY_ERROR, MSG_TYPE_APPLY_SUCCESS, MSG_TYPE_APPLY_UNAPPLY, object::name, NDI_UNIQUE, object::nrof, object_insert_in_map_at(), object_insert_in_ob(), object_split(), object_was_destroyed, give::op, PLAYER, QUERY_FLAG, query_name(), SCRIPT_FIX_ALL, SET_FLAG, set_object_face_main(), set_object_face_other(), object::slaying, Ice::tmp, object::type, UPD_FACE, UPD_FLAGS, object::x, and object::y.
Referenced by container_type_move_on(), legacy_ob_apply(), and loot_object().
void apply_handle_yield | ( | object * | tmp | ) |
This checks whether the object has a "on_use_yield" field, and if so generated and drops matching item.
tmp | item that was applied. |
Definition at line 122 of file apply.cpp.
References create_archetype(), drop(), INS_BELOW_ORIGINATOR, object_get_value(), object_insert_in_map_at(), object_insert_in_ob(), and Ice::tmp.
Referenced by food_type_apply(), poison_type_apply(), and potion_type_apply().
Main apply handler.
Checks for unpaid items before applying.
op | object causing tmp to be applied. |
tmp | object being applied. |
aflag | special (always apply/unapply) flags. Nothing is done with them in this function - they are passed to apply_special(). |
Definition at line 597 of file apply.cpp.
References apply_check_race_restrictions(), draw_ext_info(), FLAG_APPLIED, FLAG_UNPAID, HEAD, METHOD_SILENT_ERROR, MSG_TYPE_APPLY, MSG_TYPE_APPLY_ERROR, NDI_UNIQUE, ob_apply(), give::op, play_sound_player_only(), PLAYER, QUERY_FLAG, SOUND_TYPE_ITEM, and Ice::tmp.
Referenced by apply_by_living(), cfapi_object_apply(), give_initial_items(), lightable_type_apply(), monster_apply_below(), monster_check_apply(), monster_use_scroll(), polymorph_living(), transmute_item_to_flower(), and write_scroll().
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.
pl | player building or removing. |
dir | building direction. |
Definition at line 960 of file build_map.cpp.
References apply_builder_floor(), apply_builder_item(), apply_builder_remove(), apply_builder_wall(), apply_builder_window(), create-tower::builder, can_build_over(), draw_ext_info(), find_archetype(), find_marked_object(), FLAG_IS_BUILDABLE, FLAG_UNPAID, FOR_OB_AND_ABOVE_FINISH, FOR_OB_AND_ABOVE_PREPARE, freearr_x, freearr_y, GET_MAP_OB, IS_PLAYER(), llevError, LOG(), MAP_HEIGHT, MAP_WIDTH, MATERIAL, MSG_TYPE_APPLY, MSG_TYPE_APPLY_BUILD, NDI_UNIQUE, object_create_arch(), object_decrease_nrof_by_one, altar_valkyrie::pl, QUERY_FLAG, range_builder, SET_FLAG, SIGN, object::slaying, ST_BD_BUILD, ST_BD_REMOVE, ST_MAT_FLOOR, ST_MAT_ITEM, ST_MAT_WALL, ST_MAT_WINDOW, object::subtype, Ice::tmp, object::type, diamondslots::x, and diamondslots::y.
Referenced by fire().
This is somewhat like key_change_class() above, except we know the race to change to, but we still basically need to do the same work (apply bonuses, update archetype, etc.)
op | Player object |
race | race to use - caller should do sanity checking that this is a valid race. |
opclass | class to use - like race, caller should do sanity checking. |
stats | If set, use these stats for the character, do not apply new ones. Note: It is required that the caller only use valid stat values (generated by check_race_and_class() for example), as this function will not do checking on the stats. |
Definition at line 1479 of file player.cpp.
References AC_PLAYER_STAT_NO_CHANGE, add_statbonus(), add_string(), allowed_class(), apply_changes_to_player(), buf, CLEAR_FLAG, archetype::clone, create_treasure(), esrv_add_spells(), esrv_new_player(), esrv_send_inventory(), esrv_update_item(), EVENT_BORN, EVENT_LOGIN, events_execute_global_event(), find_treasurelist(), fix_object(), FLAG_WIZ, free_string(), get_attr_value(), give_initial_items(), commongive::inv, link_player_skills(), Settings::localdir, make_path_to_file(), MAX_BUF, give::name, NUM_STATS, object_copy(), object_free(), object_remove(), object_set_msg(), object_update(), give::op, Settings::playerdir, pticks, SET_ANIMATION, set_attr_value(), settings, strlcpy(), UP_OBJ_FACE, and UPD_FACE.
Referenced by create_player_cmd(), and START_TEST().
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)
who | object using op. It can be a monster. |
op | object 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. |
aflags | combination of AP_xxx flags. |
Definition at line 1156 of file apply.cpp.
References AMULET, AP_APPLY, AP_BASIC_FLAGS, AP_IGNORE_CURSE, AP_NOPRINT, AP_UNAPPLY, apply_check_apply_restrictions(), apply_check_item_power(), apply_check_owner(), apply_check_personalized_blessings(), apply_check_weapon_power(), apply_update_ranged_skill(), ARMOUR, BOOTS, BOW, BRACERS, BUILDER, change_abil(), change_skill(), CLOAK, draw_ext_info(), draw_ext_info_format(), esrv_update_item(), 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, GIRDLE, GLOVES, HELMET, llevError, LOG(), MAX_BUF, MSG_TYPE_APPLY, MSG_TYPE_APPLY_CURSED, MSG_TYPE_APPLY_ERROR, MSG_TYPE_APPLY_SUCCESS, MSG_TYPE_APPLY_UNAPPLY, NDI_UNIQUE, object_insert_in_ob(), object_split(), give::op, PLAYER, QUERY_FLAG, query_name(), range_bow, range_builder, range_misc, RING, ROD, SET_FLAG, SHIELD, SKILL, SKILL_TOOL, Ice::tmp, unapply_special(), UPD_FLAGS, UPD_NAME, UPD_NROF, UPD_WEIGHT, nlohmann::detail::void(), WAND, WEAPON, and autojail::who.
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().
Simple wrapper for attack_ob_simple(), will use hitter's values.
op | victim. |
hitter | attacker. |
Definition at line 937 of file attack.cpp.
References attack_ob_simple(), HEAD, death_message::hitter, and give::op.
Referenced by do_skill_attack(), CRECombatSimulator::fight(), monsterFight(), and pets_move_golem().
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). Handles race restrictions on god, and will punish player if needed.
op | player switching cults. |
new_god | new god to worship. |
Definition at line 413 of file gods.cpp.
References add_string(), ARMOUR, ATNR_COLD, ATNR_ELECTRICITY, ATNR_FIRE, ATNR_POISON, BOOK, BOOTS, cast_magic_storm(), change_abil(), CLEAR_FLAG, create_archetype(), determine_god(), draw_ext_info_format(), 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(), living::food, FOR_INV_FINISH, FOR_INV_PREPARE, FORCE, free_string(), get_archetype_by_type_subtype(), give_skill_by_name(), GLOVES, god_gives_present(), living::grace, HELMET, living::hp, treasurelist::items, object::last_eat, object::last_grace, object::last_heal, object::last_sp, object::level, link_player_skills(), LOOSE_MANA, living::luck, MSG_TYPE_ATTRIBUTE, MSG_TYPE_ATTRIBUTE_GOD, object::name, NDI_NAVY, NDI_UNIQUE, treasure::next, NROFATTACKS, object_find_by_type_subtype(), object_free_drop_inventory(), object_present_in_ob_by_name(), object_remove(), give::op, object::path_attuned, object::path_denied, object::path_repelled, player_unready_range_ob(), PREFER_LOW, QUERY_FLAG, random_roll(), object::randomitems, remove_special_prayers(), object::resist, SET_FLAG, SHIELD, SK_PRAYING, SKILL, object::slaying, living::sp, SPELL, SPELLBOOK, object::stats, stop_using_item(), object::title, Ice::tmp, update_priest_flag(), nlohmann::detail::void(), WEAPON, and worship_forbids_use().
Referenced by command_setgod(), and pray_at_altar().
Blind a living thing.
op | victim. |
hitter | who is attacking. |
dam | damage to deal. |
Definition at line 2353 of file attack.cpp.
References ATNR_BLIND, BLINDNESS, change_abil(), create_archetype(), draw_ext_info_format(), fix_object(), FLAG_APPLIED, FLAG_BLIND, death_message::hitter, MAX_BUF, MSG_TYPE_ATTACK, MSG_TYPE_ATTACK_DID_HIT, NDI_UNIQUE, object_get_owner(), object_insert_in_ob(), object_present_in_ob(), give::op, query_name(), SET_FLAG, Ice::tmp, and reputation::victim.
Referenced by hit_with_one_attacktype(), and scroll_failure().
Calculates amount of experience can be gained for successful 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 relevant 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
Note that the experience is calculated for one "instance" of op, whatever its count.
who | player/creature that used the skill. |
op | object that was 'defeated'. |
skill | used skill. If none, it should just point back to who or be NULL. |
Definition at line 667 of file skill_util.cpp.
References object::arch, archetype::clone, living::exp, FLAG_ALIVE, object::level, llevDebug, LOG(), MAX, give::op, PLAYER, QUERY_FLAG, RUNE, settings, Settings::simple_exp, SKILL, object::stats, TRAP, object::type, autojail::value, and autojail::who.
Referenced by book_type_apply(), detect_curse_on_item(), detect_magic_on_item(), do_hidden_move(), find_traps(), hide(), identify_object_with_skill(), kill_object(), pick_lock(), remove_trap(), scroll_type_apply(), singing(), spellbook_type_apply(), steal(), use_oratory(), and write_scroll().
Definition at line 2762 of file c_wiz.cpp.
References object::contr, player::ob, give::op, and player::party.
Referenced by command_follow().
Improve statistics of some living object.
op | who is casting. |
caster | what is casting. |
spell_ob | actual spell object. |
dir | casting direction. |
0 | spell failed. |
1 | spell was successful. |
Definition at line 2048 of file spell_effect.cpp.
References living::ac, add_refcount(), add_string(), arch_to_object(), AT_PHYSICAL, ATNR_GODPOWER, object::attacktype, change_abil(), create_archetype(), determine_god(), draw_ext_info(), draw_ext_info_format(), object::duration, find_god(), find_target_for_friendly_spell(), FLAG_APPLIED, FOR_INV_FINISH, FOR_INV_PREPARE, dragon_attune::force, FORCE, FORCE_CHANGE_ABILITY, FORCE_NAME, free_string(), INS_ON_TOP, MIN, MSG_TYPE_SPELL, MSG_TYPE_SPELL_ERROR, MSG_TYPE_SPELL_FAILURE, MSG_TYPE_SPELL_SUCCESS, MSG_TYPE_SPELL_TARGET, object::name, NDI_UNIQUE, NROFATTACKS, object_insert_in_map_at(), object_insert_in_ob(), give::op, object::other_arch, object::path_attuned, object::race, object::resist, SET_FLAG, object::slaying, SP_level_duration_adjust(), object::stats, store_spell_expiry(), Ice::tmp, and living::wc.
Referenced by cast_spell().
Let's try to infect something.
op | who is casting. |
caster | what object is casting. |
spell | spell object to cast. |
dir | cast direction. |
0 | no one caught anything. |
1 | at least one living was affected. |
Definition at line 1207 of file spell_attack.cpp.
References living::ac, ARCH_DETECT_MAGIC, arch_to_object(), caster_level(), create_archetype(), living::dam, draw_ext_info(), draw_ext_info_format(), living::exp, FLAG_MONSTER, FOR_MAP_FINISH, FOR_MAP_PREPARE, freearr_x, freearr_y, get_map_flags(), GET_MAP_MOVE_BLOCK, HEAD, living::hp, infect_object(), object::last_eat, object::last_sp, object::level, m, object::magic, object::map, living::maxgrace, living::maxhp, living::maxsp, MOVE_FLY_LOW, MSG_TYPE_SPELL, MSG_TYPE_SPELL_FAILURE, MSG_TYPE_SPELL_SUCCESS, object::name, NDI_UNIQUE, object_free_drop_inventory(), object_insert_in_map_at(), object_set_owner(), give::op, object::other_arch, P_IS_ALIVE, P_OUT_OF_MAP, PLAYER, QUERY_FLAG, object::range, set_spell_skill(), living::sp, SP_level_dam_adjust(), SP_level_duration_adjust(), SP_level_range_adjust(), object::stats, object::type, living::wc, diamondslots::x, and diamondslots::y.
Referenced by cast_spell().
Cast some stat-improving spell.
op | who is casting. |
caster | what is casting. |
spell_ob | actual spell object. |
dir | casting direction. |
silent | if non zero, don't say when the spell is already is effect. |
0 | spell failed. |
1 | spell was successful. |
Definition at line 1900 of file spell_effect.cpp.
References living::ac, add_refcount(), arch_to_object(), object::attacktype, change_abil(), CLEAR_FLAG, create_archetype(), draw_ext_info(), draw_ext_info_format(), object::duration, living::exp, find_target_for_friendly_spell(), FLAG_APPLIED, FLAG_NO_FIX_PLAYER, FLAG_SEE_IN_DARK, FLAG_XRAYS, FOR_INV_FINISH, FOR_INV_PREPARE, dragon_attune::force, FORCE, FORCE_CHANGE_ABILITY, FORCE_NAME, free_string(), get_attr_value(), living::hp, INS_ON_TOP, object::move_type, MSG_TYPE_SPELL, MSG_TYPE_SPELL_ERROR, MSG_TYPE_SPELL_FAILURE, MSG_TYPE_SPELL_SUCCESS, object::name, NDI_UNIQUE, no_gain_msgs, NROFATTACKS, NUM_STATS, object_insert_in_map_at(), object_insert_in_ob(), give::op, object::other_arch, PLAYER, QUERY_FLAG, object::race, object::resist, rndm(), set_attr_value(), SET_FLAG, SP_level_dam_adjust(), SP_level_duration_adjust(), object::stats, store_spell_expiry(), Ice::tmp, and living::wc.
Referenced by cast_spell(), and god_intervention().
This changes the light level for the entire map.
op | who is casting. |
spell | actual spell object. |
0 | light not affected. |
1 | light changed. |
Definition at line 3293 of file spell_effect.cpp.
References change_map_light(), living::dam, draw_ext_info(), MSG_TYPE_SPELL, MSG_TYPE_SPELL_FAILURE, NDI_UNIQUE, give::op, and object::stats.
Referenced by cast_spell().
Casts a cone spell.
op | person firing the object. |
caster | object casting the spell. |
dir | direction to fire in. |
spell | spell that is being fired. It uses other_arch for the archetype to fire. |
0 | couldn't cast. |
1 | successful cast. |
Definition at line 297 of file spell_attack.cpp.
References arch_to_object(), AT_FEAR, AT_GODPOWER, AT_HOLYWORD, AT_TURN_UNDEAD, object::attacktype, caster_level(), living::Cha, archetype::clone, cone_drop(), living::dam, draw_ext_info(), object::duration, FLAG_UNDEAD, freearr_x, freearr_y, get_fear_bonus(), get_map_flags(), GET_MAP_MOVE_BLOCK, get_turn_bonus(), object::level, llevDebug, LOG(), m, MOVE_FLY_LOW, object::move_type, MSG_TYPE_SPELL, MSG_TYPE_SPELL_ERROR, archetype::name, NDI_UNIQUE, object_insert_in_map_at(), object_set_owner(), give::op, object::other_arch, P_OUT_OF_MAP, PLAYER, QUERY_FLAG, object::range, RUNE, set_spell_skill(), SP_level_dam_adjust(), SP_level_duration_adjust(), SP_level_range_adjust(), object::stats, tailor_god_spell(), Ice::tmp, object::type, living::Wis, diamondslots::x, and diamondslots::y.
Referenced by cast_spell(), cast_wonder(), prayer_failure(), and spell_failure().
A spell to make an altar your god's.
op | who is casting. |
caster | what is casting. |
spell | actual spell object. |
0 | no consecration happened. |
1 | an altar waas consecrated. |
Definition at line 2985 of file spell_effect.cpp.
References arch_to_object(), buf, caster_level(), determine_god(), draw_ext_info(), draw_ext_info_format(), find_god(), FLAG_IS_BUILDABLE, FLAG_IS_FLOOR, FOR_BELOW_FINISH, FOR_BELOW_PREPARE, HOLY_ALTAR, INS_BELOW_ORIGINATOR, object::level, llevError, LOG(), MAX_BUF, MSG_TYPE_SPELL, MSG_TYPE_SPELL_ERROR, MSG_TYPE_SPELL_FAILURE, MSG_TYPE_SPELL_SUCCESS, object::name, NDI_UNIQUE, object_insert_in_map_at(), object_remove(), give::op, QUERY_FLAG, SET_FLAG, Ice::tmp, tolower, and try_find_archetype().
Referenced by cast_spell().
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
op | who is casting. |
caster | what is casting. |
spell_ob | actual spell object. |
dir | casting direction. |
stringarg | optional parameter specifying what kind of items to create. |
0 | no food created. |
food | was created. |
Definition at line 627 of file spell_effect.cpp.
References archetypes_for_each(), cast_create_obj(), archetype::clone, draw_ext_info(), DRINK, find_archetype_by_object_type_name(), living::food, FOOD, food_choice, food_each(), food_value_choice, identify(), is_identified(), MSG_TYPE_SPELL, MSG_TYPE_SPELL_FAILURE, NDI_UNIQUE, object::nrof, object_copy(), object_new(), give::op, SP_level_duration_adjust(), object::stats, and object::value.
Referenced by cast_spell().
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...
op | who is casting. |
caster | what is casting. |
spell | actual spell object. |
dir | casting direction. |
stringarg | optional parameter specifying what kind of items to create. |
0 | no missile created. |
missiles | were created. |
Definition at line 493 of file spell_effect.cpp.
References BOW, cast_create_obj(), object::count, create_archetype(), living::dam, draw_ext_info_format(), object::duration, find_artifactlist(), FLAG_IDENTIFIED, FREE_OBJ_NO_DESTROY_CALLBACK, give_artifact_abilities(), artifact::item, artifactlist::items, llevDebug, LOG(), object::magic, MSG_TYPE_SPELL, MSG_TYPE_SPELL_ERROR, NDI_UNIQUE, object::nrof, object_find_by_type_applied(), object_free(), object_was_destroyed, give::op, pick_up(), PLAYER, SET_FLAG, object::slaying, SP_level_dam_adjust(), SP_level_duration_adjust(), object::stats, CFweardisguise::tag, Ice::tmp, try_find_archetype(), object::type, and object::value.
Referenced by cast_spell().
Creates object new_op in direction dir or if that is blocked, beneath the player (op). This is really just a simple wrapper function .
op | who is casting. |
new_op | object to insert. |
dir | direction to insert into. Can be 0 to insert below. |
Definition at line 494 of file spell_util.cpp.
References draw_ext_info(), freearr_x, freearr_y, get_map_flags(), GET_MAP_MOVE_BLOCK, INS_BELOW_ORIGINATOR, m, MSG_TYPE_SPELL, MSG_TYPE_SPELL_INFO, NDI_UNIQUE, OB_TYPE_MOVE_BLOCK, object_insert_in_map_at(), give::op, and P_OUT_OF_MAP.
Referenced by cast_create_food(), cast_create_missile(), cast_create_town_portal(), and cast_spell().
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, apartments 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) .del becq@ usa. net
op | who is casting. |
caster | what is casting. |
spell | actual spell object. |
0 | spell was insuccessful for some reason. |
1 | spell worked. |
Definition at line 1241 of file spell_effect.cpp.
References add_string(), ARCH_PORTAL_FAILED, cast_create_obj(), caster_level(), create_archetype(), Settings::create_home_portals, draw_ext_info(), EXIT_PATH, EXIT_X, EXIT_Y, dragon_attune::force, FREE_AND_COPY, mapstruct::last_reset_time, llevError, Settings::localdir, LOG(), MAP_PLAYER_UNIQUE, MSG_TYPE_SPELL, MSG_TYPE_SPELL_ERROR, MSG_TYPE_SPELL_FAILURE, MSG_TYPE_SPELL_SUCCESS, object::name, object::name_pl, NDI_NAVY, NDI_UNIQUE, object_free(), object_insert_in_map_at(), object_insert_in_ob(), object_remove(), object_set_msg(), give::op, object::race, ready_map_name(), settings, object::slaying, Ice::tmp, town_portal_destroy_existing(), town_portal_find_force(), diamondslots::x, and diamondslots::y.
Referenced by cast_spell().
Curse an object, reducing its statistics.
op | who is casting. |
caster | what object is casting. |
spell_ob | spell object to cast. |
dir | cast direction. |
0 | curse had no effect. |
1 | something was cursed. |
Definition at line 800 of file spell_attack.cpp.
References living::ac, add_refcount(), arch_to_object(), change_abil(), create_archetype(), determine_god(), draw_ext_info(), draw_ext_info_format(), object::duration, find_god(), fix_object(), FLAG_APPLIED, FOR_INV_FINISH, FOR_INV_PREPARE, dragon_attune::force, FORCE, FORCE_CHANGE_ABILITY, FORCE_NAME, free_string(), get_pointed_target(), INS_ON_TOP, commongive::inv, object::last_grace, MSG_TYPE_SPELL, MSG_TYPE_SPELL_FAILURE, MSG_TYPE_SPELL_SUCCESS, MSG_TYPE_VICTIM, MSG_TYPE_VICTIM_SPELL, object::name, NDI_UNIQUE, object_insert_in_map_at(), object_insert_in_ob(), give::op, object::other_arch, object::path_denied, object::path_repelled, PLAYER, object::race, object::range, SET_FLAG, SP_level_duration_adjust(), SPELL_GRACE, object::stats, Ice::tmp, and living::wc.
Referenced by cast_spell().
Hit all monsters around the caster.
op | who is casting. |
caster | what object is casting. |
spell_ob | spell object to cast. |
Definition at line 707 of file spell_attack.cpp.
References arch_to_object(), ATNR_MAGIC, object::attacktype, change_skill(), living::dam, object::duration, find_skill_by_name(), FLAG_ALIVE, FLAG_FRIENDLY, FOR_MAP_FINISH, FOR_MAP_PREPARE, get_map_flags(), HEAD, hit_player(), commongive::inv, m, make_object_glow(), object_insert_in_map_at(), give::op, object::other_arch, P_IS_ALIVE, P_OUT_OF_MAP, PLAYER, QUERY_FLAG, object::range, object::skill, SP_DESTRUCTION, SP_FAERY_FIRE, SP_level_dam_adjust(), SP_level_duration_adjust(), SP_level_range_adjust(), object::stats, object::subtype, and Ice::tmp.
Referenced by cast_spell().