diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-29 15:38:10 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-06-29 15:38:10 +0000 |
commit | c1af72fdb75f13811c69666f5a770e6d8fe6ee44 (patch) | |
tree | f6ac017f289277f48244f673f3f1267a24348d79 /crawl-ref/source/cloud.cc | |
parent | 9b19c10cdc05253f2393ca6c5873a94f54d34596 (diff) | |
download | crawl-ref-c1af72fdb75f13811c69666f5a770e6d8fe6ee44.tar.gz crawl-ref-c1af72fdb75f13811c69666f5a770e6d8fe6ee44.zip |
Steam clouds now do damage proportional to their density (experimental).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1691 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/cloud.cc')
-rw-r--r-- | crawl-ref/source/cloud.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/cloud.cc b/crawl-ref/source/cloud.cc index 27329fe0c6..c0eacdde5a 100644 --- a/crawl-ref/source/cloud.cc +++ b/crawl-ref/source/cloud.cc @@ -191,6 +191,18 @@ void check_place_cloud( cloud_type cl_type, int x, int y, int lifetime, place_cloud( cl_type, x, y, lifetime, whose ); } +int steam_cloud_damage(const cloud_struct &cloud) +{ + int decay = cloud.decay; + if (decay > 60) + decay = 60; + else if (decay < 10) + decay = 10; + + // Damage in range 3 - 16. + return ((decay * 13 + 20) / 50); +} + // Places a cloud with the given stats. May delete old clouds to // make way if there are too many on level. Will overwrite an old // cloud under some circumstances. |