summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells4.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-07 20:56:57 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-07 20:56:57 +0000
commit61aa2965b3dbd9f20ea7cedcb85d143ccf5c4e7d (patch)
treeeb4e12a6c13caec0594e7618a386c8e416a80a92 /crawl-ref/source/spells4.cc
parent0f8343ac425faa15cc6bb912c6282d0fe97d46fd (diff)
downloadcrawl-ref-61aa2965b3dbd9f20ea7cedcb85d143ccf5c4e7d.tar.gz
crawl-ref-61aa2965b3dbd9f20ea7cedcb85d143ccf5c4e7d.zip
Consolidate the routines to remove the player's condensation shield into
one function. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7403 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells4.cc')
-rw-r--r--crawl-ref/source/spells4.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/crawl-ref/source/spells4.cc b/crawl-ref/source/spells4.cc
index bf66ec1c74..670a9eb99f 100644
--- a/crawl-ref/source/spells4.cc
+++ b/crawl-ref/source/spells4.cc
@@ -2381,6 +2381,13 @@ bool cast_sandblast(int pow, bolt &beam)
return (success);
}
+void remove_condensation_shield()
+{
+ mpr("Your icy shield dissipates!", MSGCH_DURATION);
+ you.duration[DUR_CONDENSATION_SHIELD] = 0;
+ you.redraw_armour_class = true;
+}
+
void cast_condensation_shield(int pow)
{
if (you.shield() || you.duration[DUR_FIRE_SHIELD])
@@ -2395,16 +2402,13 @@ void cast_condensation_shield(int pow)
else
{
mpr("A crackling disc of dense vapour forms in the air!");
- you.redraw_armour_class = true;
-
you.duration[DUR_CONDENSATION_SHIELD] = 10 + roll_dice(2, pow / 5);
+ you.redraw_armour_class = true;
}
if (you.duration[DUR_CONDENSATION_SHIELD] > 30)
you.duration[DUR_CONDENSATION_SHIELD] = 30;
}
-
- return;
}
void remove_divine_shield()
@@ -2424,7 +2428,8 @@ void cast_divine_shield()
if (!you.duration[DUR_DIVINE_SHIELD])
{
you.redraw_armour_class = true;
- if (you.shield() || you.duration[DUR_FIRE_SHIELD]
+ if (you.shield()
+ || you.duration[DUR_FIRE_SHIELD]
|| you.duration[DUR_CONDENSATION_SHIELD])
{
mprf("Your shield is strengthened by %s's divine power.",