empiremud/cnf/
empiremud/doc/
empiremud/lib/boards/
empiremud/lib/etc/
empiremud/lib/misc/
empiremud/lib/plralias/F-J/
empiremud/lib/plralias/K-O/
empiremud/lib/plralias/P-T/
empiremud/lib/plralias/U-Z/
empiremud/lib/plrobjs/
empiremud/lib/plrobjs/F-J/
empiremud/lib/plrobjs/K-O/
empiremud/lib/plrobjs/P-T/
empiremud/lib/plrobjs/U-Z/
empiremud/lib/world/
empiremud/lib/world/mob/
empiremud/lib/world/obj/
empiremud/log/
/* ************************************************************************
*   File: handler.h                                      EmpireMUD AD 1.0 *
*  Usage: header file: prototypes of handling and utility functions       *
*                                                                         *
*  All rights reserved.  See license.doc for complete information.        *
*                                                                         *
*  Code base by Paul Clarke.  EmpireMUD Project, a tbgMUD Production.     *
*  Based upon CircleMUD 3.0, beta patch level 17, by Jeremy Elson.        *
*                                                                         *
*  Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University *
*  CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.               *
************************************************************************ */

/* handling the affected-structures */
void affect_total(Creature ch);
void affect_modify(Creature ch, byte loc, sh_int mod, bitvector_t bitv, bitvector_t disc_bit, bool add);
void affect_to_char(Creature ch, struct affected_type *af);
void affect_remove(Creature ch, struct affected_type *af);
void affect_from_char(Creature ch, int type);
bool affected_by_spell(Creature ch, int type);
void affect_join(Creature ch, struct affected_type *af,bool add_dur, bool avg_dur, bool add_mod, bool avg_mod);

/* room affects */
void affect_to_room(room_rnum room, struct affected_type *af);
void affect_remove_room(room_rnum room, struct affected_type *af);
void affect_from_room(room_rnum room, int type);
bool room_affected_by_spell(room_rnum room, int type);

/* morphs */
void perform_morph(Creature ch, ubyte form);
extern int get_morph_attack_type(Creature ch);
extern int MORPH_FLAGGED(Creature ch, int flag);

/* utility */
int isname(char *str, char *namelist);
char *fname(const char *namelist);
int get_number(char **name);
extern int parse_direction(char *dir);

/* ******** objects *********** */

void obj_to_char(Object object, Creature ch);
void obj_from_char(Object object);

void equip_char(Creature ch, Object obj, int pos);
Object unequip_char(Creature ch, int pos);

Object get_obj_in_list(char *name, Object list);
Object get_obj_in_list_num(int num, Object list);
Object get_obj(char *name);
Object get_obj_num(obj_rnum nr);

void obj_to_room(Object object, room_rnum room);
void obj_from_room(Object object);
void obj_to_obj(Object obj, Object obj_to);
void obj_from_obj(Object obj);
void object_list_new_owner(Object list, Creature ch);

void extract_obj(Object obj);

extern struct special_procedure_table obj_spec[];
extern int find_obj_special_by_number(int number);
extern int find_obj_spec_by_function(SPECIAL(*func));
extern int find_obj_look_spec_by_function(LOOK_SPECIAL(*func));
extern int find_mob_look_spec_by_function(LOOK_SPECIAL(*func));

/* ******* characters ********* */

Creature get_char_room(char *name, room_rnum room);
Creature get_char_num(mob_rnum nr);
Creature get_char(char *name);

extern int att_max(Creature ch);
extern int disc_max(Creature ch);

void char_from_room(Creature ch);
void char_to_room(Creature ch, room_rnum room);
void extract_char(Creature ch);

extern struct special_procedure_table mob_spec[];
extern int find_mob_special_by_number(int number);
extern int find_mob_spec_by_function(SPECIAL(*func));

/* find if character can see */
Creature get_char_room_vis(Creature ch, char *name);
Creature get_player_vis(Creature ch, char *name, int inroom);

Creature get_char_vis(Creature ch, char *name, int where);
Object get_obj_in_list_vis(Creature ch, char *name, 
Object list);
Object get_obj_vis(Creature ch, char *name);
Object get_object_in_equip_vis(Creature ch, char *arg, Object equipment[], int *j);

void add_lore(Creature ch, int type, long value);

void appear(Creature ch);

/* find all dots */
int	find_all_dots(char *arg);

#define FIND_INDIV	0
#define FIND_ALL	1
#define FIND_ALLDOT	2


/* Generic Find */

int	generic_find(char *arg, bitvector_t bitvector, Creature ch, Creature *tar_ch, Object *tar_obj);

#define FIND_CHAR_ROOM		(1 << 0)
#define FIND_CHAR_WORLD		(1 << 1)
#define FIND_OBJ_INV		(1 << 2)
#define FIND_OBJ_ROOM		(1 << 3)
#define FIND_OBJ_WORLD		(1 << 4)
#define FIND_OBJ_EQUIP		(1 << 5)
#define FIND_NO_DARK		(1 << 6)


/* prototypes from crash save system */
int Crash_delete_file(char *name);
int Crash_delete_crashfile(Creature ch);
int Crash_clean_file(char *name);
void Crash_listrent(Creature ch, char *name);
int Crash_load(Creature ch, int log);
void Crash_crashsave(Creature ch);
void Crash_save_all(void);

/* prototypes from fight.c */
void set_fighting(Creature ch, Creature victim, byte mode);
void stop_fighting(Creature ch);
void stop_follower(Creature ch);
int hit(Creature ch, Creature victim);
int damage(Creature ch, Creature victim, int dam, int attacktype, byte damtype);
int skill_message(int dam, Creature ch, Creature vict, int attacktype);
void perform_dismount(Creature ch);
void perform_mount(Creature ch, Creature mount);
void update_pos(Creature victim);
extern int count_bits(bitvector_t bits);

/* prototypes from skills.c */
extern char *morph_string(Creature ch, byte type);

/* prototypes from handler.c */
void gain_experience(Creature ch, int amt);