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-09-13 21:20:59 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-09-13 21:20:59 +0000
commit72d421a98654a1d73704397dfd9a4be3177289d0 (patch)
tree5a0428dd04f392344d89aa99ee4247413d384de3 /crawl-ref/source/transfor.cc
parent280d409759be7af8b54366f07ccba17348ea24f9 (diff)
downloadcrawl-ref-72d421a98654a1d73704397dfd9a4be3177289d0.tar.gz
crawl-ref-72d421a98654a1d73704397dfd9a4be3177289d0.zip
A bug fix commit! (I didn't do one of these in a while...)
* 2856912: being turned into a pig while berserk complaining about being "too berserk" when unequipping the weapon * 2849963: shields working even when melded * 2845355: melded equipment not being affected by remove curse * 2836148: disallow toggle_with_I if you've got a spell on 'I' git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10671 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/transfor.cc')
-rw-r--r--crawl-ref/source/transfor.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc
index dac21e32aa..3f4f2534d1 100644
--- a/crawl-ref/source/transfor.cc
+++ b/crawl-ref/source/transfor.cc
@@ -68,7 +68,7 @@ bool transform_allows_wearing_item(const item_def& item,
{
// It's not jewellery, and it's worn, so it must be armour.
const equipment_type eqslot = get_armour_slot(item);
- const bool is_soft_helmet = is_helmet(item) && !is_hard_helmet(item);
+ const bool is_soft_helmet = is_helmet(item) && !is_hard_helmet(item);
switch (transform)
{
@@ -147,7 +147,7 @@ static void _unwear_equipment_slot(equipment_type eqslot)
if (eqslot == EQ_WEAPON)
{
- unwield_item();
+ unwield_item(!you.duration[DUR_BERSERKER]);
canned_msg(MSG_EMPTY_HANDED);
you.attribute[ATTR_WEAPON_SWAP_INTERRUPTED] = slot + 1;
}
@@ -611,8 +611,11 @@ bool transform(int pow, transformation_type which_trans, bool force,
std::set<equipment_type> rem_stuff = _init_equipment_removal(which_trans);
- if (_check_for_cursed_equipment(rem_stuff, which_trans, force) && which_trans!=TRAN_PIG)
+ if (which_trans != TRAN_PIG
+ && _check_for_cursed_equipment(rem_stuff, which_trans, force))
+ {
return (_abort_or_fizzle(just_check));
+ }
int str = 0, dex = 0, symbol = '@', colour = LIGHTGREY, xhp = 0, dur = 0;
const char* tran_name = "buggy";