File fight.c


Included Files

  • #include "conf.h"
  • #include "sysdep.h"
  • #include <stdio.h>
  • #include <ctype.h>
  • #include <stdlib.h>
  • #include <string.h>
  • #include <sys/types.h>
  • #include <unistd.h>
  • #include <limits.h>
  • #include <sys/time.h>
  • #include <assert.h>
  • #include "structs.h"
  • #include "utils.h"
  • #include "comm.h"
  • #include "handler.h"
  • #include "interpreter.h"
  • #include "db.h"
  • #include "spells.h"
  • #include "screen.h"

  • Preprocessor definitions

    #define IS_WEAPON( type )

    Type struct dam_weapon_type

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

    Global Variable combat_list

    void* combat_list
    Visible in:
  • fight.c
  • handler.c
  • Used in:
  • extract_char() : handler.c
  • perform_violence() : fight.c
  • set_fighting() : fight.c
  • stop_fighting() : fight.c

  • Global Variable next_combat_list

    void* 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

    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
  • auto_save
    extern int auto_save

    Defined in:
  • config.c
  • max_exp_gain
    extern int max_exp_gain

    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
  • thaco
    extern int thaco[4][34]

    Defined in:
  • class.c
  • str_app
    extern struct str_app_type str_app[]

    Defined in:
  • constants.c
  • dex_app
    extern struct dex_app_type dex_app[]

    Defined in:
  • constants.c
  • mob_index
    extern struct index_data* mob_index

    Defined in:
  • db.c

  • Global Function appear()

    void appear ( struct char_data* ch )
    Calls:
  • act() : comm.c
  • affect_from_char() : handler.c
  • affected_by_spell() : handler.c
  • Called by:
  • damage() : fight.c

  • Global Function change_alignment()

    void change_alignment ( struct char_data* ch, struct char_data* victim )
    Called by:
  • damage() : fight.c
  • perform_group_gain() : fight.c

  • Global Function check_killer()

    void check_killer ( struct char_data* ch, struct char_data* vict )
    Calls:
  • mudlog() : utils.c
  • send_to_char() : comm.c
  • sprintf()
  • Called by:
  • damage() : fight.c
  • set_fighting() : fight.c
  • References Variables:
  • world : db.c

  • Global Function dam_message()

    void dam_message ( int dam, struct char_data* ch, struct char_data* victim, int w_type )
    Calls:
  • act() : comm.c
  • replace_string() : fight.c
  • send_to_char() : comm.c
  • Called by:
  • damage() : fight.c
  • References Variables:
  • attack_hit_text : fight.c

  • Global Function damage()

    void 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
  • change_alignment() : fight.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
  • hit() : fight.c
  • mudlog() : utils.c
  • number() : utils.c
  • ok_damage_shopkeeper() : shop.c
  • remember() : mobact.c
  • send_to_char() : comm.c
  • set_fighting() : fight.c
  • skill_message() : 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:
  • max_exp_gain : config.c
  • pk_allowed : config.c
  • world : db.c
  • buf

  • Global Function death_cry()

    void death_cry ( struct char_data* ch )
    Calls:
  • act() : comm.c
  • Called by:
  • do_simple_move() : act.movement.c
  • raw_kill() : fight.c
  • References Variables:
  • world : db.c

  • Global Function die()

    void die ( struct char_data* ch )
    Calls:
  • gain_exp() : limits.c
  • raw_kill() : fight.c
  • Called by:
  • damage() : fight.c

  • Global Function group_gain()

    void group_gain ( struct char_data* ch, struct char_data* victim )
    Calls:
  • MAX() : utils.c
  • perform_group_gain() : fight.c
  • Called by:
  • damage() : fight.c

  • Global Function hit()

    void hit ( struct char_data* ch, struct char_data* victim, int type )
    Prototyped in:
  • handler.h
  • Calls:
  • MAX() : utils.c
  • damage() : fight.c
  • dice() : utils.c
  • number() : utils.c
  • stop_fighting() : fight.c
  • Called by:
  • banzaii() : castle.c
  • cityguard() : spec_procs.c
  • damage() : fight.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:
  • dex_app : constants.c
  • str_app : constants.c
  • thaco : class.c

  • Global Function load_messages()

    void load_messages ( void )
    Calls:
  • fread_action() : act.social.c
  • __gnu_calloc(), abort(), exit(), fclose(), feof(), fgets(), fopen(), fprintf(), perror(), sprintf(), sscanf()
  • Called by:
  • boot_db() : db.c
  • References Variables:
  • fight_messages : db.c
  • buf

  • Global Function make_corpse()

    void make_corpse ( struct char_data* ch )
    Calls:
  • 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:
  • max_npc_corpse_time : config.c
  • max_pc_corpse_time : config.c
  • buf

  • Global Function perform_group_gain()

    void perform_group_gain ( struct char_data* ch, int base, struct char_data* victim )
    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:
  • max_exp_gain : config.c
  • buf

  • Global Function perform_violence()

    void perform_violence ( void )
    Calls:
  • act() : comm.c
  • hit() : fight.c
  • send_to_char() : comm.c
  • stop_fighting() : fight.c
  • Called by:
  • heartbeat() : comm.c
  • References Variables:
  • combat_list : fight.c
  • mob_index : db.c
  • next_combat_list : fight.c

  • Global Function raw_kill()

    void raw_kill ( struct char_data* ch )
    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 ( char* str, char* weapon_singular, char* weapon_plural )
    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
  • __eprintf()
  • Called by:
  • damage() : fight.c
  • do_npc_rescue() : castle.c
  • do_rescue() : act.offensive.c
  • References Variables:
  • combat_list : fight.c
  • pk_allowed : config.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
  • dice() : utils.c
  • send_to_char() : comm.c
  • Called by:
  • damage() : fight.c
  • do_cast() : spell_parser.c
  • References Variables:
  • fight_messages : db.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
  • check_idling() : limits.c
  • damage() : fight.c
  • do_flee() : act.offensive.c
  • do_npc_rescue() : castle.c
  • do_rescue() : act.offensive.c
  • extract_char() : handler.c
  • hit() : fight.c
  • perform_violence() : fight.c
  • raw_kill() : fight.c
  • References Variables:
  • combat_list : fight.c
  • next_combat_list : fight.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
  • point_update() : limits.c
  • stop_fighting() : fight.c