summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-selfench.cc
diff options
context:
space:
mode:
authorBrandon Kime <rbrandonkime@gmail.com>2014-02-26 23:26:40 -0500
committerShmuale Mark <shm.mark@gmail.com>2014-02-26 23:59:07 -0500
commitf72b609125d3c71604db03d1324edb7e6a97cb22 (patch)
treeab063f91dc26a444826f3dc7f6ffe559c5c6f160 /crawl-ref/source/spl-selfench.cc
parent2280caa48a5b2f66cd94ee90e71bad0e4d15836e (diff)
downloadcrawl-ref-f72b609125d3c71604db03d1324edb7e6a97cb22.tar.gz
crawl-ref-f72b609125d3c71604db03d1324edb7e6a97cb22.zip
Disable casting of Repel Missiles while wearing the Amulet of the Air.
This fixes #8181. Casting Rmsl while wearing the amulet does nothing but waste a turn. [Committer's note: cleaned up the code slightly.]
Diffstat (limited to 'crawl-ref/source/spl-selfench.cc')
-rw-r--r--crawl-ref/source/spl-selfench.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/spl-selfench.cc b/crawl-ref/source/spl-selfench.cc
index 7cb0a34a3d..b14888b22f 100644
--- a/crawl-ref/source/spl-selfench.cc
+++ b/crawl-ref/source/spl-selfench.cc
@@ -9,6 +9,7 @@
#include "externs.h"
#include "areas.h"
+#include "art-enum.h"
#include "env.h"
#include "godconduct.h"
#include "hints.h"
@@ -112,7 +113,8 @@ spret_type ice_armour(int pow, bool fail)
spret_type missile_prot(int pow, bool fail)
{
if (you.attribute[ATTR_REPEL_MISSILES]
- || you.attribute[ATTR_DEFLECT_MISSILES])
+ || you.attribute[ATTR_DEFLECT_MISSILES]
+ || player_equip_unrand(UNRAND_AIR))
{
mpr("You are already protected from missiles.");
return SPRET_ABORT;