summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-book.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/spl-book.cc')
-rw-r--r--crawl-ref/source/spl-book.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc
index 99fcc53130..8c8d671160 100644
--- a/crawl-ref/source/spl-book.cc
+++ b/crawl-ref/source/spl-book.cc
@@ -1495,14 +1495,19 @@ int staff_spell( int staff )
return (-1);
}
- // All checks passed, we can cast the spell
- if (your_spells(spell, powc, false) == SPRET_ABORT)
+ const int flags = get_spell_flags(spell);
+ // Labyrinths block divinations.
+ if (you.level_type == LEVEL_LABYRINTH
+ && testbits(flags, SPFLAG_MAPPING))
+ {
+ mpr("Something interferes with your magic!");
+ }
+ // All checks passed, we can cast the spell
+ else if (your_spells(spell, powc, false) == SPRET_ABORT)
return (-1);
make_hungry( food, true );
-
istaff.plus -= mana;
-
you.wield_change = true;
you.turn_is_over = true;