summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-util.h
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2011-11-02 12:37:38 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2011-11-02 12:42:33 +1000
commitad0ae35fa24fb02e0c9adc147b790b1b348414a7 (patch)
tree9d5410ced0438c640b67b5beca483de769e09d26 /crawl-ref/source/spl-util.h
parent3f11d06fc561fc0b134012a40c3714710a910710 (diff)
downloadcrawl-ref-ad0ae35fa24fb02e0c9adc147b790b1b348414a7.tar.gz
crawl-ref-ad0ae35fa24fb02e0c9adc147b790b1b348414a7.zip
Allow specification of cloud exclusion radius, also via Lua; cloud traps.
All new clouds are created with an exclusion radius of -1, which means that they will not create an exclusion. That's the default, and is what is provided to all functions which create clouds. Specifying any non -1 value will result in the coud not being considered "temporary", and view.cc will create an exclusion for that cloud. By default, the excluson radius of damaging clouds created by vaults is 1 (set by lm_fog.lua). You can specify any radius that you'd like, and it'll use that. For steam clouds, it will change the radius to zero if the radius is at the default 1; otherwise, it will use whatever radius to have specified. This might have some unwanted effects: any clouds which are loaded from an old save file will all be considered temporary, so until they properly decay, they won't be considered for exclusion. This will be tempoary until the next wave of clouds is created. Finally, this fixes cloud traps: they'll no longer create exclusions. Hooray!
Diffstat (limited to 'crawl-ref/source/spl-util.h')
-rw-r--r--crawl-ref/source/spl-util.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/spl-util.h b/crawl-ref/source/spl-util.h
index 2a96745002..3d4abf83ce 100644
--- a/crawl-ref/source/spl-util.h
+++ b/crawl-ref/source/spl-util.h
@@ -98,7 +98,7 @@ typedef int cell_func(coord_def where, int pow, int aux, actor *agent);
typedef int monster_func(monster* mon, int pow);
typedef int cloud_func(coord_def where, int pow, int spreadrate,
cloud_type type, const actor* agent, int colour,
- std::string name, std::string tile);
+ std::string name, std::string tile, int excl_rad = -1);
int apply_area_visible(cell_func cf, int power,
bool pass_through_trans = false, actor *agent = NULL,
@@ -127,7 +127,8 @@ void apply_area_cloud(cloud_func func, const coord_def& where,
int pow, int number, cloud_type ctype,
const actor *agent,
int spread_rate = -1, int colour = -1,
- std::string name = "", std::string tile = "");
+ std::string name = "", std::string tile = "",
+ int excl_rad = -1);
bool spell_direction(dist &spelld, bolt &pbolt,
targeting_type restrict = DIR_NONE,