summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/cloud.h
blob: 9a8ad4b582a08954cc84ec634c35f735276f81ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
 * @file
 * @brief Functions related to clouds.
**/

#ifndef CLOUD_H
#define CLOUD_H

#include "externs.h"

cloud_type random_smoke_type();

cloud_type cloud_type_at(const coord_def &pos);

void delete_cloud(int cloud);
void delete_cloud_at(coord_def p);
void move_cloud(int cloud, const coord_def& newpos);
void move_cloud_to(coord_def src, coord_def dest);
void swap_clouds(coord_def p1, coord_def p2);

void check_place_cloud(cloud_type cl_type, const coord_def& p, int lifetime,
                       const actor *agent, int spread_rate = -1,
                       int colour = -1,
                       string name = "", string tile = "",
                       int excl_rad = -1);
void place_cloud(cloud_type cl_type, const coord_def& ctarget,
                 int cl_range, const actor *agent,
                 int spread_rate = -1, int colour = -1, string name = "",
                 string tile = "", int excl_rad = -1);

void manage_clouds();

bool is_opaque_cloud(int cloud_idx);

int max_cloud_damage(cloud_type cl_type, int power = -1);
int actor_apply_cloud(actor *act);

string cloud_name_at_index(int cloudno);
string cloud_type_name(cloud_type type, bool terse = true);
int get_cloud_colour(int cloudno);
coord_def get_cloud_originator(const coord_def& pos);

bool actor_cloud_immune(const actor *act, const cloud_struct &cloud);
bool is_damaging_cloud(cloud_type type, bool temp = false);
bool is_harmless_cloud(cloud_type type);
bool in_what_cloud(cloud_type type);

bool mons_avoids_cloud(const monster* mons, int cloud_num,
                       bool placement = false);

void remove_tornado_clouds(mid_t whose);

void run_cloud_spreaders(int dur);

#endif