diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-24 13:19:24 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-24 13:19:24 +0000 |
commit | 35129e9e324fd6464cb8799edfca960881a0dd09 (patch) | |
tree | 24eff7f35548be23e04afcdd6462f0580bd0c287 /crawl-ref/source/spl-book.cc | |
parent | c19b2fdd21ba70ded0b4f42a8c7d018108d2d70d (diff) | |
download | crawl-ref-35129e9e324fd6464cb8799edfca960881a0dd09.tar.gz crawl-ref-35129e9e324fd6464cb8799edfca960881a0dd09.zip |
[1757174] Disallow mapping in labyrinths.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2536 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-book.cc')
-rw-r--r-- | crawl-ref/source/spl-book.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc index 70b194e551..3e4383ce88 100644 --- a/crawl-ref/source/spl-book.cc +++ b/crawl-ref/source/spl-book.cc @@ -1499,17 +1499,22 @@ 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) { crawl_state.zero_turns_taken(); return (-1); } make_hungry( food, true ); - istaff.plus -= mana; - you.wield_change = true; you.turn_is_over = true; |