diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-07 20:56:57 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-11-07 20:56:57 +0000 |
commit | 61aa2965b3dbd9f20ea7cedcb85d143ccf5c4e7d (patch) | |
tree | eb4e12a6c13caec0594e7618a386c8e416a80a92 /crawl-ref/source/ouch.cc | |
parent | 0f8343ac425faa15cc6bb912c6282d0fe97d46fd (diff) | |
download | crawl-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/ouch.cc')
-rw-r--r-- | crawl-ref/source/ouch.cc | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 1d3a209196..f38eca7e9b 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -56,6 +56,7 @@ #include "religion.h" #include "shopping.h" #include "skills2.h" +#include "spells4.h" #include "state.h" #include "stuff.h" #include "tutorial.h" @@ -81,11 +82,7 @@ int check_your_resists(int hurted, beam_type flavour) || flavour == BEAM_HELLFIRE || flavour == BEAM_FRAG) { if (you.duration[DUR_CONDENSATION_SHIELD] > 0) - { - mpr( "Your icy shield dissipates!", MSGCH_DURATION ); - you.duration[DUR_CONDENSATION_SHIELD] = 0; - you.redraw_armour_class = true; - } + remove_condensation_shield(); } switch (flavour) @@ -601,14 +598,10 @@ void expose_player_to_element(beam_type flavour, int strength) || flavour == BEAM_STEAM) { if (you.duration[DUR_CONDENSATION_SHIELD] > 0) - { - mprf(MSGCH_DURATION, "Your icy shield dissipates!"); - you.duration[DUR_CONDENSATION_SHIELD] = 0; - you.redraw_armour_class = true; - } + remove_condensation_shield(); } - if (strength) + if (strength > 0) _expose_invent_to_element( flavour, strength ); } |