00001 /* 00002 * File: traps.h 00003 * Summary: Traps related functions. 00004 * Written by: Linley Henzell 00005 */ 00006 00007 #ifndef TRAPS_H 00008 #define TRAPS_H 00009 00010 #include "enum.h" 00011 #include "externs.h" 00012 00013 struct bolt; 00014 class monster; 00015 struct trap_def; 00016 00017 void disarm_trap(const coord_def& where); 00018 void remove_net_from(monster* mon); 00019 void free_self_from_net(void); 00020 00021 void handle_traps(trap_type trt, int i, bool trap_known); 00022 int get_trapping_net(const coord_def& where, bool trapped = true); 00023 void monster_caught_in_net(monster* mon, bolt &pbolt); 00024 bool player_caught_in_net(); 00025 void clear_trapping_net(); 00026 void check_net_will_hold_monster(monster* mon); 00027 std::vector<coord_def> find_golubria_on_level(); 00028 00029 dungeon_feature_type trap_category(trap_type type); 00030 00031 int reveal_traps(const int range); 00032 void destroy_trap(const coord_def& pos); 00033 trap_def* find_trap(const coord_def& where); 00034 trap_type get_trap_type(const coord_def& where); 00035 const char *trap_name_at(const coord_def& c); 00036 00037 trap_type random_trap(); 00038 trap_type random_trap(dungeon_feature_type feat); 00039 00040 bool is_valid_shaft_level(const level_id &place = level_id::current()); 00041 bool shaft_known(int depth, bool randomly_placed); 00042 level_id generic_shaft_dest(coord_def pos, bool known); 00043 void handle_items_on_shaft(const coord_def& where, bool open_shaft); 00044 00045 int num_traps_for_place(int level_number = -1, 00046 const level_id &place = level_id::current()); 00047 trap_type random_trap_for_place(int level_number = -1, 00048 const level_id &place = level_id::current()); 00049 00050 trap_type random_trap_slime(int level_number = -1); 00051 00052 int traps_zero_number(int level_number = -1); 00053 00054 int count_traps(trap_type ttyp); 00055 #endif