diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-10 19:47:57 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-03-10 19:47:57 +0000 |
commit | b627c9873fff58bc7cb6a163180ad931101fe6fe (patch) | |
tree | 4eb3afbb3d244c663022de37337343082864e88d /crawl-ref/source/transfor.cc | |
parent | c90dec78aa011780278f0a695f2e6e0a2e4c2bf8 (diff) | |
download | crawl-ref-b627c9873fff58bc7cb6a163180ad931101fe6fe.tar.gz crawl-ref-b627c9873fff58bc7cb6a163180ad931101fe6fe.zip |
Implement FR 1897310: auto-travel through clouds if you are (semi)permanently
immune to them, i.e. your equipment and/or mutations confer resistance at the
necessary level.
Implement FR 1872840: When transforming, only remove clothes you cannot wear
when transformed. Also fix some inconsistencies in what you could keep wearing
and what you could put on while transformed.
And a few more monspeak/wpnnoise replacements.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3588 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/transfor.cc')
-rw-r--r-- | crawl-ref/source/transfor.cc | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc index e2802498ae..3bdb081fe8 100644 --- a/crawl-ref/source/transfor.cc +++ b/crawl-ref/source/transfor.cc @@ -36,17 +36,6 @@ void extra_hp(int amount_extra); bool remove_equipment(std::set<equipment_type> removed) { - // if we're removing body armour, the cloak will come off as well -- bwr - if ( removed.find(EQ_BODY_ARMOUR) != removed.end() && - you.equip[EQ_BODY_ARMOUR] != -1 ) - removed.insert(EQ_CLOAK); - - // if we're removing gloves, the weapon will come off as well -- bwr - // but this makes Statue Form odd -- haranp - if ( removed.find(EQ_GLOVES) != removed.end() && - you.equip[EQ_GLOVES] != -1 ) - removed.insert(EQ_WEAPON); - if ( removed.find(EQ_WEAPON) != removed.end() && you.equip[EQ_WEAPON] != -1) { @@ -192,6 +181,13 @@ bool transform(int pow, transformation_type which_trans) switch (which_trans) { case TRAN_SPIDER: // also AC +3, ev +3, fast_run + // spiders CAN wear soft helmets + if ( you.equip[EQ_HELMET] == -1 + || !is_hard_helmet(you.inv[you.equip[EQ_HELMET]])) + { + rem_stuff.erase(EQ_HELMET); + } + if (check_for_cursed_equipment( rem_stuff )) return (false); @@ -212,6 +208,13 @@ bool transform(int pow, transformation_type which_trans) return (true); case TRAN_BAT: + // bats CAN wear soft helmets + if ( you.equip[EQ_HELMET] == -1 + || !is_hard_helmet(you.inv[you.equip[EQ_HELMET]])) + { + rem_stuff.erase(EQ_HELMET); + } + // high ev, low ac, high speed if (check_for_cursed_equipment( rem_stuff )) return false; @@ -238,6 +241,12 @@ bool transform(int pow, transformation_type which_trans) case TRAN_ICE_BEAST: // also AC +3, cold +3, fire -1, pois +1 rem_stuff.erase(EQ_CLOAK); + // ice beasts CAN wear soft helmets + if ( you.equip[EQ_HELMET] == -1 + || !is_hard_helmet(you.inv[you.equip[EQ_HELMET]])) + { + rem_stuff.erase(EQ_HELMET); + } if (check_for_cursed_equipment( rem_stuff )) return false; @@ -284,7 +293,6 @@ bool transform(int pow, transformation_type which_trans) rem_stuff.erase(EQ_WEAPON); // can still hold a weapon rem_stuff.erase(EQ_CLOAK); rem_stuff.erase(EQ_HELMET); - rem_stuff.erase(EQ_BOOTS); if (check_for_cursed_equipment( rem_stuff )) return false; |