diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-03 19:12:35 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-03 19:12:35 +0000 |
commit | f965ee9d68e6b4d674897117f1711b1d439b3689 (patch) | |
tree | 76dee79218cb856a4d0dc83892172830c9e5e99e /crawl-ref/source/transfor.cc | |
parent | a6ba15c18bfc465daecb5390ad73f0a0f3df940b (diff) | |
download | crawl-ref-f965ee9d68e6b4d674897117f1711b1d439b3689.tar.gz crawl-ref-f965ee9d68e6b4d674897117f1711b1d439b3689.zip |
Fix 2483722: EQ_ALL_ARMOUR not skipping melded armour.
Fix 2483708: Transformations regarding wielded non-weapons as meldable.
Fix 2483528: Disallow randart book names like "Sif Muna's Lost Book of
Boris"
Fix 2483332: Silly logic error that only offered fully recharged wands
for recharging
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8175 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/transfor.cc')
-rw-r--r-- | crawl-ref/source/transfor.cc | 20 |
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) { |