summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-11 20:36:46 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-11 20:36:46 +0000
commitf5ce15870a0d4ae042a704065df4d0cdbbda0506 (patch)
tree3b8b31a38729b64be106930df581aef7197c6202 /crawl-ref/source/item_use.cc
parent50a255f8eaad1124e731f6fb1de417baaa133a80 (diff)
downloadcrawl-ref-f5ce15870a0d4ae042a704065df4d0cdbbda0506.tar.gz
crawl-ref-f5ce15870a0d4ae042a704065df4d0cdbbda0506.zip
Fix [2586695]: you can no longer throw items (including via Portal
Projectile) if you can't wield weapons. Don't allow base-shape breath attacks when shapechanged, except for Nagas in spider form. Fix [2589913]: melded shields counted for heavy armour penalties. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9026 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index f6bbc3fe26..f813fc121d 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -1475,7 +1475,16 @@ static bool _fire_validate_item(int slot, std::string &err)
// Returns true if warning is given.
static bool _fire_warn_if_impossible()
{
- if (you.attribute[ATTR_TRANSFORMATION] == TRAN_BAT)
+ // FIXME: merge this into transform_can_equip_slot()
+ const int trans = you.attribute[ATTR_TRANSFORMATION];
+ // If you can't wield it, you can't throw it.
+ if (trans == TRAN_SPIDER
+ || trans == TRAN_BLADE_HANDS
+ || trans == TRAN_ICE_BEAST
+ || trans == TRAN_DRAGON
+ || trans == TRAN_SERPENT_OF_HELL
+ || trans == TRAN_AIR
+ || trans == TRAN_BAT)
{
canned_msg(MSG_PRESENT_FORM);
return (true);