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/monstuff.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/monstuff.cc')
-rw-r--r-- | crawl-ref/source/monstuff.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 4ca9b40d29..7a7280f265 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -4994,6 +4994,7 @@ static void mons_in_cloud(monsters *monster) break; // to damage routine at end {dlb} case CLOUD_STEAM: + { // couldn't be bothered coding for armour of res fire // what of whether it is wearing steam dragon armour? {dlb} @@ -5005,13 +5006,15 @@ static void mons_in_cloud(monsters *monster) if (mons_res_fire(monster) > 0) return; - hurted += (random2(6) * 10) / speed; + const int steam_base_damage = steam_cloud_damage(env.cloud[wc]); + hurted += (random2avg(steam_base_damage, 2) * 10) / speed; if (mons_res_fire(monster) < 0) - hurted += (random2(6) * 10) / speed; + hurted += (random2(steam_base_damage / 2 + 1) * 10) / speed; hurted -= random2(1 + monster->ac); break; // to damage routine at end {dlb} + } case CLOUD_MIASMA: simple_monster_message(monster, " is engulfed in a dark miasma!"); @@ -5049,6 +5052,11 @@ static void mons_in_cloud(monsters *monster) hurted = 0; else if (hurted > 0) { +#ifdef DEBUG_DIAGNOSTICS + mprf(MSGCH_DIAGNOSTICS, "%s takes %d damage from cloud.", + monster->name(DESC_CAP_THE).c_str(), + hurted); +#endif hurt_monster(monster, hurted); if (monster->hit_points < 1) |