File fight.c


Included Files


Preprocessor definitions

#define IS_WEAPON( type )

Type struct dam_weapon_type

struct dam_weapon_type
struct dam_weapon_type 
   { 
     const char* to_room; 
     const char* to_char; 
     const char* to_victim; 
   } 

Global Variable combat_list

struct char_data* combat_list
Visible in:  fight.c
   handler.c
Used in: extract_char_final()handler.c
  perform_violence()fight.c
  set_fighting()fight.c
  stop_fighting()fight.c

Global Variable next_combat_list

struct char_data* next_combat_list
Visible in:  fight.c
Used in: perform_violence()fight.c
  stop_fighting()fight.c

Global Variable attack_hit_text

struct attack_hit_type attack_hit_text[]
Visible in:  act.wizard.c
   fight.c
Used in: dam_message()fight.c
  do_stat_character()act.wizard.c

External Variables

mob_index
extern struct index_data* mob_index
Defined in: db.c

world
extern struct room_data* world
Defined in: db.c

fight_messages
extern struct message_list fight_messages[60]
Defined in: db.c

object_list
extern struct obj_data* object_list
Defined in: db.c

pk_allowed
extern int pk_allowed
Defined in: config.c

max_exp_gain
extern int max_exp_gain
Defined in: config.c

max_exp_loss
extern int max_exp_loss
Defined in: config.c

max_npc_corpse_time
extern int max_npc_corpse_time
Defined in: config.c

max_pc_corpse_time
extern int max_pc_corpse_time
Defined in: config.c


Global Function appear()

void appear ( struct char_data* ch )
Prototyped in: fight.c
Calls: act()comm.c
  affect_from_char()handler.c
  affected_by_spell()handler.c
Called by: damage()fight.c
  do_visible()act.other.c
  perform_immort_vis()act.wizard.c

Global Function change_alignment()

void change_alignment ( struct char_data* ch, struct char_data* victim )
Prototyped in: fight.c
Called by: perform_group_gain()fight.c
  solo_gain()fight.c

Global Function check_killer()

void check_killer ( struct char_data* ch, struct char_data* vict )
Prototyped in: fight.c
Calls: mudlog()utils.c
  send_to_char()comm.c
  sprintf()
Called by: damage()fight.c
  do_hit()act.offensive.c
  set_fighting()fight.c
References Variables: worlddb.c

Global Function compute_armor_class()

int compute_armor_class ( struct char_data* ch )
Prototyped in: fight.c
Calls: MAX()utils.c
Called by: do_kick()act.offensive.c
  do_score()act.informative.c
  hit()fight.c
  spell_identify()spells.c
References Variables: dex_appconstants.c

Global Function dam_message()

void dam_message ( int dam, struct char_data* ch, struct char_data* victim, int w_type )
Prototyped in: fight.c
Calls: act()comm.c
  basic_mud_log()utils.c
  replace_string()fight.c
  send_to_char()comm.c
Called by: damage()fight.c
References Variables: attack_hit_textfight.c
  dummy_mobdb.c

Global Function damage()

int damage ( struct char_data* ch, struct char_data* victim, int dam, int attacktype )
Prototyped in: handler.h
Calls: MAX()utils.c
  MIN()utils.c
  act()comm.c
  appear()fight.c
  basic_mud_log()utils.c
  char_from_room()handler.c
  char_to_room()handler.c
  check_killer()fight.c
  dam_message()fight.c
  die()fight.c
  do_flee()act.offensive.c
  forget()mobact.c
  gain_exp()limits.c
  group_gain()fight.c
  mudlog()utils.c
  ok_damage_shopkeeper()shop.c
  remember()mobact.c
  send_to_char()comm.c
  set_fighting()fight.c
  skill_message()fight.c
  solo_gain()fight.c
  stop_fighting()fight.c
  stop_follower()utils.c
  update_pos()fight.c
  sprintf()
Called by: do_backstab()act.offensive.c
  do_bash()act.offensive.c
  do_kick()act.offensive.c
  hit()fight.c
  mag_damage()magic.c
  point_update()limits.c
References Variables: buf2db.c
  dummy_mobdb.c
  pk_allowedconfig.c
  top_of_worlddb.c
  worlddb.c

Global Function death_cry()

void death_cry ( struct char_data* ch )
Prototyped in: fight.c
Calls: act()comm.c
  send_to_room()comm.c
Called by: do_simple_move()act.movement.c
  raw_kill()fight.c
References Variables: worlddb.c

Global Function die()

void die ( struct char_data* ch )
Prototyped in: fight.c
Calls: gain_exp()limits.c
  raw_kill()fight.c
Called by: damage()fight.c
  do_quit()act.other.c

Global Function group_gain()

void group_gain ( struct char_data* ch, struct char_data* victim )
Prototyped in: fight.c
Calls: MAX()utils.c
  MIN()utils.c
  perform_group_gain()fight.c
Called by: damage()fight.c
References Variables: max_exp_lossconfig.c

Global Function hit()

void hit ( struct char_data* ch, struct char_data* victim, int type )
Prototyped in: handler.h
Calls: MAX()utils.c
  backstab_mult()class.c
  compute_armor_class()fight.c
  damage()fight.c
  dice()utils.c
  number()utils.c
  stop_fighting()fight.c
  thaco()class.c
Called by: banzaii()castle.c
  cityguard()spec_procs.c
  do_assist()act.offensive.c
  do_backstab()act.offensive.c
  do_cast()spell_parser.c
  do_hit()act.offensive.c
  do_steal()act.other.c
  hunt_victim()graph.c
  mobile_activity()mobact.c
  perform_violence()fight.c
References Variables: str_appconstants.c

Global Function load_messages()

void load_messages ( void )
Prototyped in: fight.c
Calls: basic_mud_log()utils.c
  fread_action()act.social.c
  __errno_location(), abort(), calloc(), exit(), fclose(), feof(), fgets(), fopen(), perror(), sscanf(), strerror()
Called by: boot_db()db.c
References Variables: fight_messagesdb.c

Global Function make_corpse()

void make_corpse ( struct char_data* ch )
Prototyped in: fight.c
Calls: create_money()handler.c
  create_obj()db.c
  obj_to_obj()handler.c
  obj_to_room()handler.c
  object_list_new_owner()handler.c
  str_dup()utils.c
  unequip_char()handler.c
  sprintf()
Called by: raw_kill()fight.c
References Variables: buf2db.c
  max_npc_corpse_timeconfig.c
  max_pc_corpse_timeconfig.c

Global Function perform_group_gain()

void perform_group_gain ( struct char_data* ch, int base, struct char_data* victim )
Prototyped in: fight.c
Calls: MAX()utils.c
  MIN()utils.c
  change_alignment()fight.c
  gain_exp()limits.c
  send_to_char()comm.c
  sprintf()
Called by: group_gain()fight.c
References Variables: buf2db.c
  max_exp_gainconfig.c

Global Function perform_violence()

void perform_violence ( void )
Prototyped in: fight.c
Calls: act()comm.c
  hit()fight.c
  send_to_char()comm.c
  stop_fighting()fight.c
Called by: heartbeat()comm.c
References Variables: combat_listfight.c
  mob_indexdb.c
  next_combat_listfight.c

Global Function raw_kill()

void raw_kill ( struct char_data* ch )
Prototyped in: fight.c
Calls: affect_remove()handler.c
  death_cry()fight.c
  extract_char()handler.c
  make_corpse()fight.c
  stop_fighting()fight.c
Called by: die()fight.c
  do_kill()act.offensive.c

Global Function replace_string()

char* replace_string ( const char* str, const char* weapon_singular, const char* weapon_plural )
Prototyped in: fight.c
Called by: dam_message()fight.c

Global Function set_fighting()

void set_fighting ( struct char_data* ch, struct char_data* vict )
Prototyped in: handler.h
Calls: affect_from_char()handler.c
  check_killer()fight.c
  core_dump_real()utils.c
Called by: damage()fight.c
  do_npc_rescue()castle.c
  do_rescue()act.offensive.c
References Variables: combat_listfight.c
  pk_allowedconfig.c

Global Function skill_message()

int skill_message ( int dam, struct char_data* ch, struct char_data* vict, int attacktype )
Prototyped in: handler.h
Calls: act()comm.c
  basic_mud_log()utils.c
  dice()utils.c
  send_to_char()comm.c
Called by: damage()fight.c
  do_cast()spell_parser.c
References Variables: dummy_mobdb.c
  fight_messagesdb.c

Global Function solo_gain()

void solo_gain ( struct char_data* ch, struct char_data* victim )
Prototyped in: fight.c
Calls: MAX()utils.c
  MIN()utils.c
  change_alignment()fight.c
  gain_exp()limits.c
  send_to_char()comm.c
  sprintf()
Called by: damage()fight.c
References Variables: buf2db.c
  max_exp_gainconfig.c

Global Function stop_fighting()

void stop_fighting ( struct char_data* ch )
Prototyped in: handler.h
Calls: update_pos()fight.c
Called by: char_from_room()handler.c
  char_to_room()handler.c
  check_idling()limits.c
  damage()fight.c
  do_npc_rescue()castle.c
  do_rescue()act.offensive.c
  extract_char_final()handler.c
  hit()fight.c
  perform_violence()fight.c
  raw_kill()fight.c
References Variables: combat_listfight.c
  next_combat_listfight.c

Global Function update_pos()

void update_pos ( struct char_data* victim )
Prototyped in: utils.h
Called by: damage()fight.c
  do_restore()act.wizard.c
  mag_points()magic.c
  point_update()limits.c
  stop_fighting()fight.c