📄 merc.h
字号:
DECLARE_DO_FUN( do_slist );
DECLARE_DO_FUN( do_slookup );
DECLARE_DO_FUN( do_sneak );
DECLARE_DO_FUN( do_snoop );
DECLARE_DO_FUN( do_socials );
DECLARE_DO_FUN( do_south );
DECLARE_DO_FUN( do_spells );
DECLARE_DO_FUN( do_split );
DECLARE_DO_FUN( do_sset );
DECLARE_DO_FUN( do_stand );
DECLARE_DO_FUN( do_steal );
DECLARE_DO_FUN( do_switch );
DECLARE_DO_FUN( do_tell );
DECLARE_DO_FUN( do_time );
DECLARE_DO_FUN( do_title );
DECLARE_DO_FUN( do_train );
DECLARE_DO_FUN( do_transfer );
DECLARE_DO_FUN( do_trust );
DECLARE_DO_FUN( do_typo );
DECLARE_DO_FUN( do_unlock );
DECLARE_DO_FUN( do_up );
DECLARE_DO_FUN( do_users );
DECLARE_DO_FUN( do_value );
DECLARE_DO_FUN( do_visible );
DECLARE_DO_FUN( do_wake );
DECLARE_DO_FUN( do_wear );
DECLARE_DO_FUN( do_weather );
DECLARE_DO_FUN( do_west );
DECLARE_DO_FUN( do_where );
DECLARE_DO_FUN( do_who );
DECLARE_DO_FUN( do_wimpy );
DECLARE_DO_FUN( do_wizhelp );
DECLARE_DO_FUN( do_wizify );
DECLARE_DO_FUN( do_wizlist );
DECLARE_DO_FUN( do_wizlock );
DECLARE_DO_FUN( do_yell );
DECLARE_DO_FUN( do_zap );
/*
* Spell functions.
* Defined in magic.c.
*/
DECLARE_SPELL_FUN( spell_null );
DECLARE_SPELL_FUN( spell_acid_blast );
DECLARE_SPELL_FUN( spell_armor );
DECLARE_SPELL_FUN( spell_bless );
DECLARE_SPELL_FUN( spell_blindness );
DECLARE_SPELL_FUN( spell_burning_hands );
DECLARE_SPELL_FUN( spell_call_lightning );
DECLARE_SPELL_FUN( spell_cause_critical );
DECLARE_SPELL_FUN( spell_cause_light );
DECLARE_SPELL_FUN( spell_cause_serious );
DECLARE_SPELL_FUN( spell_change_sex );
DECLARE_SPELL_FUN( spell_charm_person );
DECLARE_SPELL_FUN( spell_chill_touch );
DECLARE_SPELL_FUN( spell_colour_spray );
DECLARE_SPELL_FUN( spell_continual_light );
DECLARE_SPELL_FUN( spell_control_weather );
DECLARE_SPELL_FUN( spell_create_food );
DECLARE_SPELL_FUN( spell_create_spring );
DECLARE_SPELL_FUN( spell_create_water );
DECLARE_SPELL_FUN( spell_cure_blindness );
DECLARE_SPELL_FUN( spell_cure_critical );
DECLARE_SPELL_FUN( spell_cure_light );
DECLARE_SPELL_FUN( spell_cure_poison );
DECLARE_SPELL_FUN( spell_cure_serious );
DECLARE_SPELL_FUN( spell_curse );
DECLARE_SPELL_FUN( spell_detect_evil );
DECLARE_SPELL_FUN( spell_detect_hidden );
DECLARE_SPELL_FUN( spell_detect_invis );
DECLARE_SPELL_FUN( spell_detect_magic );
DECLARE_SPELL_FUN( spell_detect_poison );
DECLARE_SPELL_FUN( spell_dispel_evil );
DECLARE_SPELL_FUN( spell_dispel_magic );
DECLARE_SPELL_FUN( spell_earthquake );
DECLARE_SPELL_FUN( spell_enchant_weapon );
DECLARE_SPELL_FUN( spell_energy_drain );
DECLARE_SPELL_FUN( spell_faerie_fire );
DECLARE_SPELL_FUN( spell_faerie_fog );
DECLARE_SPELL_FUN( spell_fireball );
DECLARE_SPELL_FUN( spell_flamestrike );
DECLARE_SPELL_FUN( spell_fly );
DECLARE_SPELL_FUN( spell_gate );
DECLARE_SPELL_FUN( spell_general_purpose );
DECLARE_SPELL_FUN( spell_giant_strength );
DECLARE_SPELL_FUN( spell_harm );
DECLARE_SPELL_FUN( spell_heal );
DECLARE_SPELL_FUN( spell_high_explosive );
DECLARE_SPELL_FUN( spell_identify );
DECLARE_SPELL_FUN( spell_infravision );
DECLARE_SPELL_FUN( spell_invis );
DECLARE_SPELL_FUN( spell_know_alignment );
DECLARE_SPELL_FUN( spell_lightning_bolt );
DECLARE_SPELL_FUN( spell_locate_object );
DECLARE_SPELL_FUN( spell_magic_missile );
DECLARE_SPELL_FUN( spell_make_purse ); // @@@
DECLARE_SPELL_FUN( spell_mass_invis );
DECLARE_SPELL_FUN( spell_pass_door );
DECLARE_SPELL_FUN( spell_poison );
DECLARE_SPELL_FUN( spell_protection );
DECLARE_SPELL_FUN( spell_refresh );
DECLARE_SPELL_FUN( spell_remove_curse );
DECLARE_SPELL_FUN( spell_sanctuary );
DECLARE_SPELL_FUN( spell_shocking_grasp );
DECLARE_SPELL_FUN( spell_shield );
DECLARE_SPELL_FUN( spell_sleep );
DECLARE_SPELL_FUN( spell_stone_skin );
DECLARE_SPELL_FUN( spell_summon );
DECLARE_SPELL_FUN( spell_teleport );
DECLARE_SPELL_FUN( spell_ventriloquate );
DECLARE_SPELL_FUN( spell_weaken );
DECLARE_SPELL_FUN( spell_word_of_recall );
DECLARE_SPELL_FUN( spell_acid_breath );
DECLARE_SPELL_FUN( spell_fire_breath );
DECLARE_SPELL_FUN( spell_frost_breath );
DECLARE_SPELL_FUN( spell_gas_breath );
DECLARE_SPELL_FUN( spell_lightning_breath );
// TFC spell functions
DECLARE_SPELL_FUN( spell_animate_dead );
/*
* Psi spell_functions, in magic.c.
*/
DECLARE_SPELL_FUN( spell_adrenaline_control);
DECLARE_SPELL_FUN( spell_agitation );
DECLARE_SPELL_FUN( spell_aura_sight );
DECLARE_SPELL_FUN( spell_awe );
DECLARE_SPELL_FUN( spell_ballistic_attack );
DECLARE_SPELL_FUN( spell_biofeedback );
DECLARE_SPELL_FUN( spell_cell_adjustment );
DECLARE_SPELL_FUN( spell_combat_mind );
DECLARE_SPELL_FUN( spell_complete_healing );
DECLARE_SPELL_FUN( spell_control_flames );
DECLARE_SPELL_FUN( spell_create_sound );
DECLARE_SPELL_FUN( spell_death_field );
DECLARE_SPELL_FUN( spell_detonate );
DECLARE_SPELL_FUN( spell_disintegrate );
DECLARE_SPELL_FUN( spell_displacement );
DECLARE_SPELL_FUN( spell_domination );
DECLARE_SPELL_FUN( spell_ectoplasmic_form );
DECLARE_SPELL_FUN( spell_ego_whip );
DECLARE_SPELL_FUN( spell_energy_containment);
DECLARE_SPELL_FUN( spell_enhance_armor );
DECLARE_SPELL_FUN( spell_enhanced_strength );
DECLARE_SPELL_FUN( spell_flesh_armor );
DECLARE_SPELL_FUN( spell_inertial_barrier );
DECLARE_SPELL_FUN( spell_inflict_pain );
DECLARE_SPELL_FUN( spell_intellect_fortress);
DECLARE_SPELL_FUN( spell_lend_health );
DECLARE_SPELL_FUN( spell_levitation );
DECLARE_SPELL_FUN( spell_mental_barrier );
DECLARE_SPELL_FUN( spell_mind_thrust );
DECLARE_SPELL_FUN( spell_project_force );
DECLARE_SPELL_FUN( spell_psionic_blast );
DECLARE_SPELL_FUN( spell_psychic_crush );
DECLARE_SPELL_FUN( spell_psychic_drain );
DECLARE_SPELL_FUN( spell_psychic_healing );
DECLARE_SPELL_FUN( spell_share_strength );
DECLARE_SPELL_FUN( spell_thought_shield );
DECLARE_SPELL_FUN( spell_ultrablast );
/*
* OS-dependent declarations.
* These are all very standard library functions,
* but some systems have incomplete or non-ansi header files.
*/
#if defined(_AIX)
char * crypt args( ( const char *key, const char *salt ) );
#endif
#if defined(apollo)
int atoi args( ( const char *string ) );
void * calloc args( ( unsigned nelem, size_t size ) );
char * crypt args( ( const char *key, const char *salt ) );
#endif
#if defined(hpux)
char * crypt args( ( const char *key, const char *salt ) );
#endif
#if defined(linux)
char * crypt args( ( const char *key, const char *salt ) );
#endif
#if defined(macintosh)
#define NOCRYPT
#if defined(unix)
#undef unix
#endif
#endif
#if defined(MIPS_OS)
char * crypt args( ( const char *key, const char *salt ) );
#endif
#if defined(MSDOS)
#define NOCRYPT
#if defined(unix)
#undef unix
#endif
#endif
#if defined(NeXT)
char * crypt args( ( const char *key, const char *salt ) );
#endif
#if defined(sequent)
char * crypt args( ( const char *key, const char *salt ) );
int fclose args( ( FILE *stream ) );
int fprintf args( ( FILE *stream, const char *format, ... ) );
int fread args( ( void *ptr, int size, int n, FILE *stream ) );
int fseek args( ( FILE *stream, long offset, int ptrname ) );
void perror args( ( const char *s ) );
int ungetc args( ( int c, FILE *stream ) );
#endif
#if defined(sun)
char * crypt args( ( const char *key, const char *salt ) );
int fclose args( ( FILE *stream ) );
int fprintf args( ( FILE *stream, const char *format, ... ) );
int fread args( ( void *ptr, int size, int n, FILE *stream ) );
int fseek args( ( FILE *stream, long offset, int ptrname ) );
void perror args( ( const char *s ) );
int ungetc args( ( int c, FILE *stream ) );
#endif
#if defined(ultrix)
char * crypt args( ( const char *key, const char *salt ) );
#endif
/*
* The crypt(3) function is not available on some operating systems.
* In particular, the U.S. Government prohibits its export from the
* United States to foreign countries.
* Turn on NOCRYPT to keep passwords in plain text.
*/
#if defined(NOCRYPT)
#define crypt(s1, s2) (s1)
#endif
/*
* Data files used by the server.
*
* AREA_LIST contains a list of areas to boot.
* All files are read in completely at bootup.
* Most output files (bug, idea, typo, shutdown) are append-only.
*
* The NULL_FILE is held open so that we have a stream handle in reserve,
* so players can go ahead and telnet to all the other descriptors.
* Then we close it whenever we need to open a file (e.g. a save file).
*/
//#if defined(macintosh)
//#define PLAYER_DIR "" /* Player files */
//#define NULL_FILE "proto.are" /* To reserve one stream */
//#define MOB_DIR "" /* MOBProg files */
//#endif
//#if defined(MSDOS)
#define PLAYER_DIR "" /* Player files */
#define NULL_FILE "nul" /* To reserve one stream */
#define MOB_DIR "" /* MOBProg files */
//#endif
//#if defined(unix)
//#define PLAYER_DIR "../player/" /* Player files */
//#define NULL_FILE "/dev/null" /* To reserve one stream */
//#define MOB_DIR "MOBProgs/" /* MOBProg files */
//#endif
//#if defined(linux)
//#define PLAYER_DIR "../player/" /* Player files */
//#define NULL_FILE "/dev/null" /* To reserve one stream */
//#define MOB_DIR "MOBProgs/" /* MOBProg files */
//#endif
#define AREA_LIST "area.lst" /* List of areas */
#define BUG_FILE "bugs.txt" /* For 'bug' and bug( ) */
#define IDEA_FILE "ideas.txt" /* For 'idea' */
#define TYPO_FILE "typos.txt" /* For 'typo' */
#define NOTE_FILE "notes.txt" /* For 'notes' */
#define SHUTDOWN_FILE "shutdown.txt" /* For 'shutdown' */
/*
* Our function prototypes.
* One big lump ... this is every function in Merc.
*/
#define CD CHAR_DATA
#define MID MOB_INDEX_DATA
#define OD OBJ_DATA
#define OID OBJ_INDEX_DATA
#define RID ROOM_INDEX_DATA
#define SF SPEC_FUN
/* act_comm.c */
void add_follower args( ( CHAR_DATA *ch, CHAR_DATA *master ) );
void stop_follower args( ( CHAR_DATA *ch ) );
void die_follower args( ( CHAR_DATA *ch ) );
bool is_same_group args( ( CHAR_DATA *ach, CHAR_DATA *bch ) );
bool is_note_to args( ( CHAR_DATA *ch, NOTE_DATA *pnote ) );
/* act_info.c */
void set_title args( ( CHAR_DATA *ch, char *title ) );
/* act_move.c */
void move_char args( ( CHAR_DATA *ch, int door ) );
/* act_obj.c */
/* act_wiz.c */
ROOM_INDEX_DATA * find_location args( ( CHAR_DATA *ch, char *arg ) );
/* comm.c */
void close_socket args( ( DESCRIPTOR_DATA *dclose ) );
void write_to_buffer args( ( DESCRIPTOR_DATA *d, const char *txt,
int length ) );
void send_to_char args( ( const char *txt, CHAR_DATA *ch ) );
void show_string args( ( DESCRIPTOR_DATA *d, char *input ) );
void act args( ( const char *format, CHAR_DATA *ch,
const void *arg1, const void *arg2, int type ) );
/* db.c */
void boot_db args( ( void ) );
void area_update args( ( void ) );
CD * create_mobile args( ( MOB_INDEX_DATA *pMobIndex ) );
OD * create_object args( ( OBJ_INDEX_DATA *pObjIndex, int level ) );
void clear_char args( ( CHAR_DATA *ch ) );
void free_char args( ( CHAR_DATA *ch ) );
char * get_extra_descr args( ( const char *name, EXTRA_DESCR_DATA *ed ) );
MID * get_mob_index args( ( int vnum ) );
OID * get_obj_index args( ( int vnum ) );
RID * get_room_index args( ( int vnum ) );
char fread_letter args( ( FILE *fp ) );
int fread_number args( ( FILE *fp ) );
char * fread_string args( ( FILE *fp ) );
void fread_to_eol args( ( FILE *fp ) );
char * fread_word args( ( FILE *fp ) );
void * alloc_mem args( ( int sMem ) );
void * alloc_perm args( ( int sMem ) );
void free_mem args( ( void *pMem, int sMem ) );
char * str_dup args( ( const char *str ) );
void free_string args( ( char *pstr ) );
int number_fuzzy args( ( int number ) );
int number_range args( ( int from, int to ) );
int number_percent args( ( void ) );
int number_door args( ( void ) );
int number_bits args( ( int width ) );
int number_mm args( ( void ) );
int dice args( ( int number, int size ) );
int interpolate args( ( int level, int value_00, int value_32 ) );
void smash_tilde args( ( char *str ) );
bool str_cmp args( ( const char *astr, const char *bstr ) );
bool str_prefix args( ( const char *astr, const char *bstr ) );
bool str_infix args( ( const char *astr, const char *bstr ) );
bool str_suffix args( ( const char *astr, const char *bstr ) );
char * capitalize args( ( const char *str ) );
void append_file args( ( CHAR_DATA *ch, char *file, char *str ) );
void bug args( ( const char *str, int param ) );
void log_string args( ( const char *str ) );
void tail_chain args( ( void ) );
/* fight.c */
void violence_update args( ( void ) );
void multi_hit args( ( CHAR_DATA *ch, CHAR_DATA *victim, int dt ) );
void damage args( ( CHAR_DATA *ch, CHAR_DATA *victim, int dam,
int dt ) );
void update_pos args( ( CHAR_DATA *victim ) );
void stop_fighting args( ( CHAR_DATA *ch, bool fBoth ) );
void death_cry args( ( CHAR_DATA *ch ) );
void raw_kill args( ( CHAR_DATA *victim ) );
/* handler.c */
int get_trust args( ( CHAR_DATA *ch ) );
int get_age args( ( CHAR_DATA *ch ) );
int get_curr_str args( ( CHAR_DATA *ch ) );
int get_curr_int args( ( CHAR_DATA *ch ) );
int get_curr_wis args( ( CHAR_DATA *ch ) );
int get_curr_dex args( ( CHAR_DATA *ch ) );
int get_curr_con args( ( CHAR_DATA *ch ) );
int can_carry_n args( ( CHAR_DATA *ch ) );
int can_carry_w args( ( CHAR_DATA *ch ) );
bool is_name args( ( const char *str, char *namelist ) );
void affect_to_char args( ( CHAR_DATA *ch, AFFECT_DATA *paf ) );
void affect_remove args( ( CHAR_DATA *ch, AFFECT_DATA *paf ) );
void affect_strip args( ( CHAR_DATA *ch, int sn ) );
bool is_affected args( ( CHAR_DATA *ch, int sn ) );
void affect_join args( ( CHAR_DATA *ch, AFFECT_DATA *paf ) );
void char_from_room args( ( CHAR_DATA *ch ) );
void char_to_room args( ( CHAR_DATA *ch, ROOM_INDEX_DATA *pRoomIndex ) );
void obj_to_char args( ( OBJ_DATA *obj, CHAR_DATA *ch ) );
void obj_from_char args( ( OBJ_DATA *obj ) );
int apply_ac args( ( OBJ_DATA *obj, int iWear ) );
OD * get_eq_char args( ( CHAR_DATA *ch, int iWear ) );
void equip_char args( ( CHAR_DATA *ch, OBJ_DATA *obj, int iWear ) );
void unequip_char args( ( CHAR_DATA *ch, OBJ_DATA *obj ) );
int count_obj_list args( ( OBJ_INDEX_DATA *obj, OBJ_DATA *list ) );
void obj_from_room args( ( OBJ_DATA *obj ) );
void obj_to_room args( ( OBJ_DATA *obj, ROOM_INDEX_DATA *pRoomIndex ) );
void obj_to_obj args( ( OBJ_DATA *obj, OBJ_DATA *obj_to ) );
void obj_from_obj args( ( OBJ_DATA *obj ) );
void extract_obj args( ( OBJ_DATA *obj ) );
void extract_char args( ( CHAR_DATA *ch, bool fPull ) );
CD * get_char_room args( ( CHAR_DATA *ch, char *argument ) );
CD * get_char_world args( ( CHAR_DATA *ch, char *argument ) );
OD * get_obj_type args( ( OBJ_INDEX_DATA *pObjIndexData ) );
OD * get_obj_list args( ( CHAR_DATA *ch, char *argument,
OBJ_DATA *list ) );
OD * get_obj_carry args( ( CHAR_DATA *ch, char *argument ) );
OD * get_obj_wear args( ( CHAR_DATA *ch, char *argument ) );
OD * get_obj_here args( ( CHAR_DATA *ch, char *argument ) );
OD * get_obj_world args( ( CHAR_DATA *ch, char *argument ) );
OD * create_money args( ( int amount ) );
int get_obj_number args( ( OBJ_DATA *obj ) );
int get_obj_weight args( ( OBJ_DATA *obj ) );
bool room_is_dark args( ( ROOM_INDEX_DATA *pRoomIndex ) );
bool room_is_private args( ( ROOM_INDEX_DATA *pRoomIndex ) );
bool can_see args( ( CHAR_DATA *ch, CHAR_DATA *victim ) );
bool can_see_obj args( ( CHAR_DATA *ch, OBJ_DATA *obj ) );
bool can_drop_obj args( ( CHAR_DATA *ch, OBJ_DATA *obj ) );
char * item_type_name args( ( OBJ_DATA *obj ) );
char * affect_loc_name args( ( int location ) );
char * affect_bit_name args( ( int vector ) );
char * extra_bit_name args( ( int extra_flags ) );
/* interp.c */
void interpret args( ( CHAR_DATA *ch, char *argument ) );
bool is_number args( ( char *arg ) );
int number_argument args( ( char *argument, char *arg ) );
char * one_argument args( ( char *argument, char *arg_first ) );
bool IS_SWITCHED args( ( CHAR_DATA *ch ) );
/* magic.c */
int skill_lookup args( ( const char *name ) );
int slot_lookup args( ( int slot ) );
bool saves_spell args( ( int level, CHAR_DATA *victim ) );
void obj_cast_spell args( ( int sn, int level, CHAR_DATA *ch,
CHAR_DATA *victim, OBJ_DATA *obj ) );
/* mob_prog.c */
#ifdef DUNNO_STRSTR
char * strstr args( (const char *s1, const char *s2 ) );
#endif
void mprog_wordlist_check args( ( char * arg, CHAR_DATA *mob,
CHAR_DATA* actor, OBJ_DATA* object, void* vo, int type ) );
void mprog_percent_check args( ( CHAR_DATA *mob,
CHAR_DATA* actor, OBJ_DATA* object, void* vo, int type ) );
void mprog_act_trigger args( ( char* buf, CHAR_DATA* mob,
CHAR_DATA* ch, OBJ_DATA* obj, void* vo ) );
void mprog_bribe_trigger args( ( CHAR_DATA* mob, CHAR_DATA* ch,
int amount ) );
void mprog_entry_trigger args( ( CHAR_DATA* mob ) );
void mprog_give_trigger args( ( CHAR_DATA* mob, CHAR_DATA* ch,
OBJ_DATA* obj ) );
void mprog_greet_trigger args( ( CHAR_DATA* mob ) );
void mprog_fight_trigger args( ( CHAR_DATA* mob, CHAR_DATA* ch ) );
void mprog_hitprcnt_trigger args( ( CHAR_DATA* mob, CHAR_DATA* ch ) );
void mprog_death_trigger args( ( CHAR_DATA* mob ) );
void mprog_random_trigger args( ( CHAR_DATA* mob ) );
void mprog_speech_trigger args( ( char* txt, CHAR_DATA* mob ) );
/* save.c */
void save_char_obj args( ( CHAR_DATA *ch ) );
bool load_char_obj args( ( DESCRIPTOR_DATA *d, char *name ) );
/* special.c */
SF * spec_lookup args( ( const char *name ) );
/* update.c */
void advance_level args( ( CHAR_DATA *ch ) );
void gain_exp args( ( CHAR_DATA *ch, int gain ) );
void gain_condition args( ( CHAR_DATA *ch, int iCond, int value ) );
void update_handler args( ( void ) );
#undef CD
#undef MID
#undef OD
#undef OID
#undef RID
#undef SF
// @@@
int SpinTheMessageLoop();
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -