summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-14 18:19:16 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-14 18:19:16 +0000
commit8760aefa6b0c601891cb580f638a31696ec90107 (patch)
tree30d1f4c34cf1931d06d94c674341c3bba17f0299 /crawl-ref/source/spl-cast.cc
parent866686d5df24c38a2838f6f06ef9186b2c392a1c (diff)
downloadcrawl-ref-8760aefa6b0c601891cb580f638a31696ec90107.tar.gz
crawl-ref-8760aefa6b0c601891cb580f638a31696ec90107.zip
* Add a prompt when attacking monsters with an inappropriate weapon or
when attempting to use (controlled) berserk while wielding an inappropriate weapon. (FR 1956656) * Make monsters stop patrolling/travelling if they change levels (or are banished). * Disable the friendly pickup toggle for characters unable to use them. Currently, only worshippers of TSO and Beogh are capable of gaining allies that are permanent (not summoned), permanently friendly (not charmed) and intelligent enough to pick up stuff (no zombies). I don't know if you keep your friends if you leave TSO. If so, the toggle should be enabled while that is the case (i.e. if you're still worshipping a good god) * Re-order the wizmode commands in the help screen. They're now not listed strictly alphabetically anymore, but rather sorted into different categories that should make actually finding commands easier. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5819 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r--crawl-ref/source/spl-cast.cc24
1 files changed, 17 insertions, 7 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index a86681a523..e392966dc1 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -1753,31 +1753,38 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail)
// Transformations.
case SPELL_BLADE_HANDS:
- transform(powc, TRAN_BLADE_HANDS);
+ if (!transform(powc, TRAN_BLADE_HANDS))
+ canned_msg(MSG_SPELL_FIZZLES);
break;
case SPELL_SPIDER_FORM:
- transform(powc, TRAN_SPIDER);
+ if (!transform(powc, TRAN_SPIDER))
+ canned_msg(MSG_SPELL_FIZZLES);
break;
case SPELL_STATUE_FORM:
- transform(powc, TRAN_STATUE);
+ if (!transform(powc, TRAN_STATUE))
+ canned_msg(MSG_SPELL_FIZZLES);
break;
case SPELL_ICE_FORM:
- transform(powc, TRAN_ICE_BEAST);
+ if (!transform(powc, TRAN_ICE_BEAST))
+ canned_msg(MSG_SPELL_FIZZLES);
break;
case SPELL_DRAGON_FORM:
- transform(powc, TRAN_DRAGON);
+ if (!transform(powc, TRAN_DRAGON))
+ canned_msg(MSG_SPELL_FIZZLES);
break;
case SPELL_NECROMUTATION:
- transform(powc, TRAN_LICH);
+ if (!transform(powc, TRAN_LICH))
+ canned_msg(MSG_SPELL_FIZZLES);
break;
case SPELL_AIR_WALK:
- transform(powc, TRAN_AIR);
+ if (!transform(powc, TRAN_AIR))
+ canned_msg(MSG_SPELL_FIZZLES);
break;
case SPELL_ALTER_SELF:
@@ -1803,6 +1810,9 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail)
// General enhancement.
case SPELL_BERSERKER_RAGE:
+ if (!berserk_check_wielded_weapon())
+ return (SPRET_ABORT);
+
cast_berserk();
break;