summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-14 13:07:26 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-09-14 13:07:26 +0000
commit89e659fb4abacdcf2b16125993ab10c5eb954bad (patch)
tree28b1586924678a300d78b2e5ba03ebb6ddf741c8
parent3e17829c6b5d11b23fda59f0dd38b8aa88638f39 (diff)
downloadcrawl-ref-89e659fb4abacdcf2b16125993ab10c5eb954bad.tar.gz
crawl-ref-89e659fb4abacdcf2b16125993ab10c5eb954bad.zip
Really fix bats being able to open/close doors.
Likewise disallow closing doors while held in a net. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6922 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/acr.cc42
-rw-r--r--crawl-ref/source/dat/database/wpnnoise.txt13
-rw-r--r--crawl-ref/source/player.cc6
3 files changed, 36 insertions, 25 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 680b261bf9..41bed1e0ff 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -2004,26 +2004,10 @@ void process_command( command_type cmd )
break;
case CMD_DISPLAY_OVERMAP: display_overmap(); break;
- case CMD_GO_UPSTAIRS: _go_upstairs(); break;
- case CMD_GO_DOWNSTAIRS: _go_downstairs(); break;
-
- case CMD_OPEN_DOOR:
- if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
- {
- mpr("You can't open doors in your present form.");
- break;
- }
- _open_door(0, 0);
- break;
-
- case CMD_CLOSE_DOOR:
- if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
- {
- mpr("You can't open doors in your present form.");
- break;
- }
- _close_door(coord_def(0, 0));
- break;
+ case CMD_GO_UPSTAIRS: _go_upstairs(); break;
+ case CMD_GO_DOWNSTAIRS: _go_downstairs(); break;
+ case CMD_OPEN_DOOR: _open_door(0, 0); break;
+ case CMD_CLOSE_DOOR: _close_door(coord_def(0, 0)); break;
case CMD_DROP:
drop();
@@ -3490,6 +3474,12 @@ static int _check_adjacent(dungeon_feature_type feat, coord_def& delta)
// to be opened (eg if you type ctrl + dir).
static void _open_door(coord_def move, bool check_confused)
{
+ if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
+ {
+ mpr("You can't open doors in your present form.");
+ return;
+ }
+
if (you.attribute[ATTR_HELD])
{
free_self_from_net();
@@ -3665,6 +3655,18 @@ static void _open_door(coord_def move, bool check_confused)
static void _close_door(coord_def move)
{
+ if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
+ {
+ mpr("You can't close doors in your present form.");
+ return;
+ }
+
+ if (you.attribute[ATTR_HELD])
+ {
+ mpr("You can't close doors while held in a net.");
+ return;
+ }
+
dist door_move;
coord_def doorpos;
diff --git a/crawl-ref/source/dat/database/wpnnoise.txt b/crawl-ref/source/dat/database/wpnnoise.txt
index a578cf5f71..ada4b8808d 100644
--- a/crawl-ref/source/dat/database/wpnnoise.txt
+++ b/crawl-ref/source/dat/database/wpnnoise.txt
@@ -276,7 +276,9 @@ speaking
@The_weapon@ grumbles, "I guess an audience of one is better than none..."
-@The_weapon@ complains, "When we kill all of them, noone is listening!"
+@The_weapon@ complains, "If we kill all of them, no-one will be listening!"
+
+@The_weapon@ muses, "If you sing and nobody listens, are you really singing?"
@The_weapon@ brightly asks, "How about a duet?"
@@ -327,13 +329,18 @@ real_song
# folklore, confusing flowers and monsters
@The_weapon@ sings, "Where have all the monsters gone?"
+# Neil Diamond
@The_weapon@ sings, "Song sung blue, everybody knows one ..."
-#Abba
+# ABBA
@The_weapon@ sings, "Thank you for the music..."
+# Melanie
@The_weapon@ wails, "Look what they done to my song!"
+# folklore
+@The_weapon@ sings, "Old McDonald has a farm ..."
+
@The_weapon@ sings, "Pop! Goes the weasel."
# Beatles
@@ -341,8 +348,10 @@ real_song
@The_weapon@ sings, "Let it be, let it be..."
+# ?
@The_weapon@ sings, "Ain't no stopping us now ..."
+# drinking song
@The_weapon@ sings, "Ninety-nine potions of booze on the wall ..."
# Jingle Bells, misunderstood
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index ab1e3d668b..7dbdf0217e 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -685,9 +685,9 @@ bool you_tran_can_wear(int eq, bool check_mutation)
if (transform == TRAN_STATUE)
{
- if (eq == EQ_BODY_ARMOUR || eq == EQ_GLOVES || eq == EQ_SHIELD)
- return (false);
- return (true);
+ if (eq == EQ_WEAPON || eq == EQ_CLOAK || eq == EQ_HELMET)
+ return (true);
+ return (false);
}
return (true);