summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/transfor.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-20 21:41:27 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-20 21:41:27 +0000
commitc2aad9d53735d0ac859227b27cd44733a28b31cf (patch)
tree0164ae65d718be73c0239ad174053a0c11216543 /crawl-ref/source/transfor.cc
parenta28741dd2b29142210f64325cb2cb87c806d3409 (diff)
downloadcrawl-ref-c2aad9d53735d0ac859227b27cd44733a28b31cf.tar.gz
crawl-ref-c2aad9d53735d0ac859227b27cd44733a28b31cf.zip
Fix 2824455: Blade Hands not counting as slicing when wearing melded
gloves. Fix 2824494: Transformation check not taking into account special armour properties when trying to prevent fatal stat loss. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10361 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/transfor.cc')
-rw-r--r--crawl-ref/source/transfor.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc
index ab26332359..e7113fd964 100644
--- a/crawl-ref/source/transfor.cc
+++ b/crawl-ref/source/transfor.cc
@@ -59,8 +59,10 @@ bool transform_allows_wearing_item(const item_def& item,
// Everything but bats can wear all jewellery; bats and pigs can
// only wear amulets.
if ((transform == TRAN_BAT || transform == TRAN_PIG)
- && !jewellery_is_amulet(item))
+ && !jewellery_is_amulet(item))
+ {
rc = false;
+ }
}
else
{
@@ -334,7 +336,6 @@ static bool _check_for_cursed_equipment(const std::set<equipment_type> &remove,
return (true);
}
}
-
return (false);
}
@@ -402,6 +403,15 @@ bool check_transformation_stat_loss(const std::set<equipment_type> &remove,
default: break;
}
}
+ else if (item.base_type == OBJ_ARMOUR)
+ {
+ switch (get_armour_ego_type( item ))
+ {
+ case SPARM_STRENGTH: prop_str += 3; break;
+ case SPARM_DEXTERITY: prop_dex += 3; break;
+ case SPARM_INTELLIGENCE: prop_int += 3; break;
+ }
+ }
if (is_artefact(item))
{