00001
00002
00003
00004
00005
00006
00007 #ifndef MISC_H
00008 #define MISC_H
00009
00010 #include "externs.h"
00011 #include "mapmark.h"
00012
00013 struct bolt;
00014 class dist;
00015 struct activity_interrupt_data;
00016
00017 bool go_berserk(bool intentional, bool potion = false);
00018 void search_around(bool only_adjacent = false);
00019
00020 void emergency_untransform();
00021 void merfolk_start_swimming(bool step = false);
00022 void merfolk_stop_swimming();
00023 void trackers_init_new_level(bool transit);
00024 int get_max_corpse_chunks(int mons_class);
00025 void turn_corpse_into_skeleton(item_def &item);
00026 void turn_corpse_into_chunks(item_def &item, bool bloodspatter = true,
00027 bool make_hide = true);
00028 void turn_corpse_into_skeleton_and_chunks(item_def &item);
00029
00030 void init_stack_blood_potions(item_def &stack, int age = -1);
00031 void maybe_coagulate_blood_potions_floor(int obj);
00032 bool maybe_coagulate_blood_potions_inv(item_def &blood);
00033 int remove_oldest_blood_potion(item_def &stack);
00034 void remove_newest_blood_potion(item_def &stack, int quant = -1);
00035 void merge_blood_potion_stacks(item_def &source, item_def &dest, int quant);
00036
00037 bool check_blood_corpses_on_ground();
00038 bool can_bottle_blood_from_corpse(int mons_class);
00039 int num_blood_potions_from_corpse(int mons_class, int chunk_type = -1);
00040 void turn_corpse_into_blood_potions (item_def &item);
00041 void turn_corpse_into_skeleton_and_blood_potions(item_def &item);
00042 void split_potions_into_decay(int obj, int amount, bool need_msg = true);
00043
00044 void bleed_onto_floor(const coord_def& where, monster_type mon, int damage,
00045 bool spatter = false, bool smell_alert = true);
00046 void blood_spray(const coord_def& where, monster_type mon, int level);
00047 void generate_random_blood_spatter_on_level(
00048 const map_mask *susceptible_area = NULL);
00049
00050
00051 bool maybe_bloodify_square(const coord_def& where);
00052
00053 std::string weird_glowing_colour();
00054
00055 std::string weird_writing();
00056
00057 std::string weird_smell();
00058
00059 std::string weird_sound();
00060
00061 bool mons_can_hurt_player(const monster* mon, const bool want_move = false);
00062 bool mons_is_safe(const monster* mon, const bool want_move = false,
00063 const bool consider_user_options = true);
00064
00065 std::vector<monster* > get_nearby_monsters(bool want_move = false,
00066 bool just_check = false,
00067 bool dangerous_only = false,
00068 bool consider_user_options = true,
00069 bool require_visible = true,
00070 int range = -1);
00071
00072 bool i_feel_safe(bool announce = false, bool want_move = false,
00073 bool just_monsters = false, int range = -1);
00074
00075 bool there_are_monsters_nearby(bool dangerous_only = false,
00076 bool require_visible = true,
00077 bool consider_user_options = false);
00078
00079 void timeout_tombs(int duration);
00080
00081 int count_malign_gateways ();
00082 std::vector<map_malign_gateway_marker*> get_malign_gateways ();
00083 void timeout_malign_gateways(int duration);
00084
00085 void setup_environment_effects();
00086
00087
00088 void run_environment_effects();
00089
00090 int str_to_shoptype(const std::string &s);
00091
00092 bool player_in_a_dangerous_place(bool *invis = NULL);
00093 void bring_to_safety();
00094 void revive();
00095
00096 coord_def pick_adjacent_free_square(const coord_def& p);
00097
00098 int speed_to_duration(int speed);
00099
00100 bool scramble(void);
00101
00102 bool interrupt_cmd_repeat(activity_interrupt_type ai,
00103 const activity_interrupt_data &at);
00104
00105 void reveal_secret_door(const coord_def& p);
00106
00107 std::string your_hand(bool plural);
00108
00109 bool stop_attack_prompt(const monster* mon, bool beam_attack,
00110 coord_def beam_target, bool autohit_first = false);
00111
00112 bool is_orckind(const actor *act);
00113
00114 bool is_dragonkind(const actor *act);
00115 void swap_with_monster(monster* mon_to_swap);
00116
00117 void maybe_id_ring_TC();
00118
00119 void entered_malign_portal(actor* act);
00120 #endif