diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-20 21:41:27 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-20 21:41:27 +0000 |
commit | c2aad9d53735d0ac859227b27cd44733a28b31cf (patch) | |
tree | 0164ae65d718be73c0239ad174053a0c11216543 /crawl-ref | |
parent | a28741dd2b29142210f64325cb2cb87c806d3409 (diff) | |
download | crawl-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')
-rw-r--r-- | crawl-ref/source/fight.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 11 | ||||
-rw-r--r-- | crawl-ref/source/transfor.cc | 14 |
3 files changed, 15 insertions, 12 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index d024e025a7..7f22a6d48d 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -3707,7 +3707,7 @@ int melee_attack::player_to_hit(bool random_factor) your_to_hit += maybe_random2(you.dex, random_factor); } - switch ( you.attribute[ATTR_TRANSFORMATION] ) + switch (you.attribute[ATTR_TRANSFORMATION]) { case TRAN_SPIDER: your_to_hit += maybe_random2(10, random_factor); diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index a6b06e0e04..b4d8ab8131 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -6345,18 +6345,11 @@ int player::damage_type(int) const int wpn = equip[ EQ_WEAPON ]; if (wpn != -1) - { return (get_vorpal_type(inv[wpn])); - } - else if (equip[EQ_GLOVES] == -1 - && attribute[ATTR_TRANSFORMATION] == TRAN_BLADE_HANDS) - { + else if (attribute[ATTR_TRANSFORMATION] == TRAN_BLADE_HANDS) return (DVORP_SLICING); - } else if (has_usable_claws()) - { return (DVORP_CLAWING); - } return (DVORP_CRUSHING); } @@ -6368,7 +6361,7 @@ int player::damage_brand(int) if (wpn != -1) { - if ( !is_range_weapon(inv[wpn]) ) + if (!is_range_weapon(inv[wpn])) ret = get_weapon_brand( inv[wpn] ); } else if (duration[DUR_CONFUSING_TOUCH]) 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)) { |