From f5ce15870a0d4ae042a704065df4d0cdbbda0506 Mon Sep 17 00:00:00 2001 From: haranp Date: Wed, 11 Feb 2009 20:36:46 +0000 Subject: 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 --- crawl-ref/source/item_use.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/item_use.cc') 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); -- cgit v1.2.3-54-g00ecf