From c1af72fdb75f13811c69666f5a770e6d8fe6ee44 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Fri, 29 Jun 2007 15:38:10 +0000 Subject: 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 --- crawl-ref/source/cloud.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'crawl-ref/source/cloud.cc') 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. -- cgit v1.2.3-54-g00ecf