summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/acr.cc
diff options
context:
space:
mode:
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())