summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/acr.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-02 18:45:25 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-02 18:45:25 +0000
commit606e14406ef0ae5f12dccad44b6f0f0b3433f013 (patch)
treed6be863eabf8d180145dafcc439f1753222966b0 /crawl-ref/source/acr.cc
parent84a922b5d5d8ca1d70f1ecc74d489e34b7ef4b80 (diff)
downloadcrawl-ref-606e14406ef0ae5f12dccad44b6f0f0b3433f013.tar.gz
crawl-ref-606e14406ef0ae5f12dccad44b6f0f0b3433f013.zip
Restrictions during bat form. Disallowed a number of actions.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1958 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r--crawl-ref/source/acr.cc41
1 files changed, 25 insertions, 16 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index d36672a62a..7d4c2f91b3 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -1241,8 +1241,7 @@ void process_command( command_type cmd )
case CMD_THROW:
if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
{
- mpr("You can't throw anything in your present form!");
- flush_input_buffer( FLUSH_ON_FAILURE );
+ canned_msg(MSG_PRESENT_FORM);
break;
}
if (Options.tutorial_left)
@@ -1253,8 +1252,7 @@ void process_command( command_type cmd )
case CMD_FIRE:
if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
{
- mpr("You can't fire anything in your present form!");
- flush_input_buffer( FLUSH_ON_FAILURE );
+ canned_msg(MSG_PRESENT_FORM);
break;
}
if (Options.tutorial_left)
@@ -1278,8 +1276,7 @@ void process_command( command_type cmd )
case CMD_REMOVE_JEWELLERY:
if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
{
- mpr("You can't do that in your present form!");
- flush_input_buffer( FLUSH_ON_FAILURE );
+ canned_msg(MSG_PRESENT_FORM);
break;
}
remove_ring();
@@ -1288,8 +1285,7 @@ void process_command( command_type cmd )
case CMD_WEAR_JEWELLERY:
if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
{
- mpr("You can't do that in your present form!");
- flush_input_buffer( FLUSH_ON_FAILURE );
+ canned_msg(MSG_PRESENT_FORM);
break;
}
puton_ring(-1, false);
@@ -1300,11 +1296,21 @@ void process_command( command_type cmd )
break;
case CMD_MEMORISE_SPELL:
+ if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
+ {
+ canned_msg(MSG_PRESENT_FORM);
+ break;
+ }
if (!learn_spell())
flush_input_buffer( FLUSH_ON_FAILURE );
break;
case CMD_ZAP_WAND:
+ if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
+ {
+ canned_msg(MSG_PRESENT_FORM);
+ break;
+ }
zap_wand();
break;
@@ -1346,6 +1352,11 @@ void process_command( command_type cmd )
break;
case CMD_READ:
+ if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
+ {
+ canned_msg(MSG_PRESENT_FORM);
+ break;
+ }
read_scroll();
break;
@@ -1361,21 +1372,19 @@ void process_command( command_type cmd )
break;
case CMD_CAST_SPELL:
- /* randart wpns */
- if (scan_randarts(RAP_PREVENT_SPELLCASTING))
+ if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
{
- mpr("Something interferes with your magic!");
- flush_input_buffer( FLUSH_ON_FAILURE );
+ canned_msg(MSG_PRESENT_FORM);
break;
}
-/*
- if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
+ /* randart wpns */
+ if (scan_randarts(RAP_PREVENT_SPELLCASTING))
{
- mpr("You can't cast spells in your present form!");
+ mpr("Something interferes with your magic!");
flush_input_buffer( FLUSH_ON_FAILURE );
break;
}
-*/
+
if (Options.tutorial_left)
Options.tut_spell_counter++;
if (!cast_a_spell())