summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells1.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/spells1.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/spells1.cc')
-rw-r--r--crawl-ref/source/spells1.cc23
1 files changed, 8 insertions, 15 deletions
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index aa10be5b51..b26296c2de 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -182,11 +182,8 @@ int blink(int pow, bool high_level_controlled_blink, bool wizard_blink)
contaminate_player( 1, true );
}
- if (you.duration[DUR_CONDENSATION_SHIELD] > 0 && !wizard_blink)
- {
- you.duration[DUR_CONDENSATION_SHIELD] = 0;
- you.redraw_armour_class = true;
- }
+ if (!wizard_blink && you.duration[DUR_CONDENSATION_SHIELD] > 0)
+ remove_condensation_shield();
}
crawl_state.cancel_cmd_again();
@@ -197,8 +194,8 @@ int blink(int pow, bool high_level_controlled_blink, bool wizard_blink)
void random_blink(bool allow_partial_control, bool override_abyss)
{
+ bool success = false;
coord_def target;
- bool succ = false;
if (scan_randarts(RAP_PREVENT_TELEPORTATION))
mpr("You feel a weird sense of stasis.");
@@ -222,10 +219,9 @@ void random_blink(bool allow_partial_control, bool override_abyss)
{
mpr("You may select the general direction of your translocation.");
cast_semi_controlled_blink(100);
- succ = true;
+ success = true;
}
#endif
-
else
{
mpr("You blink.");
@@ -233,22 +229,19 @@ void random_blink(bool allow_partial_control, bool override_abyss)
// No longer held in net.
clear_trapping_net();
- succ = true;
+ success = true;
you.moveto(target);
if (you.level_type == LEVEL_ABYSS)
{
- abyss_teleport( false );
+ abyss_teleport(false);
if (you.pet_target != MHITYOU)
you.pet_target = MHITNOT;
}
}
- if (succ && you.duration[DUR_CONDENSATION_SHIELD] > 0)
- {
- you.duration[DUR_CONDENSATION_SHIELD] = 0;
- you.redraw_armour_class = true;
- }
+ if (success && you.duration[DUR_CONDENSATION_SHIELD] > 0)
+ remove_condensation_shield();
}
bool fireball(int pow, bolt &beam)