summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/transfor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/transfor.cc')
-rw-r--r--crawl-ref/source/transfor.cc20
1 files changed, 19 insertions, 1 deletions
diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc
index 43fea5e51e..f7731bd1e2 100644
--- a/crawl-ref/source/transfor.cc
+++ b/crawl-ref/source/transfor.cc
@@ -252,11 +252,20 @@ static bool _check_for_cursed_equipment(const std::set<equipment_type> &remove,
if (you.equip[e] == -1)
continue;
- if (item_cursed( you.inv[ you.equip[e] ]))
+ const item_def item = you.inv[ you.equip[e] ];
+ if (item_cursed(item))
{
if (e != EQ_WEAPON && _tran_may_meld_cursed(trans))
continue;
+ // Wielding a cursed non-weapon/non-staff won't hinder
+ // transformations.
+ if (e == EQ_WEAPON && item.base_type != OBJ_WEAPONS
+ && item.base_type != OBJ_STAVES)
+ {
+ continue;
+ }
+
if (!quiet)
{
mpr( "Your cursed equipment won't allow you to complete the "
@@ -309,6 +318,15 @@ bool check_transformation_stat_loss(const std::set<equipment_type> &remove,
if (you.equip[e] == -1)
continue;
+ // Wielding a stat-boosting non-weapon/non-staff won't hinder
+ // transformations.
+ if (e == EQ_WEAPON)
+ {
+ const item_def item = you.inv[ you.equip[e] ];
+ if (item.base_type != OBJ_WEAPONS && item.base_type != OBJ_STAVES)
+ continue;
+ }
+
item_def item = you.inv[you.equip[e]];
if (item.base_type == OBJ_JEWELLERY)
{