diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-08 20:15:03 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-12-08 20:15:03 +0000 |
commit | 8cbb227becdc172839b901aedf972022dc73118d (patch) | |
tree | 0bd26e8356d53ebe455ae21bdc391e7adb79beb9 /crawl-ref/source/transfor.cc | |
parent | 504342b26a04cf2e33cb49b61d721ee483f5c68b (diff) | |
download | crawl-ref-8cbb227becdc172839b901aedf972022dc73118d.tar.gz crawl-ref-8cbb227becdc172839b901aedf972022dc73118d.zip |
Apply a bunch of trunk commits, mostly by Haran, namely:
6766 (partly), 6834 (partly), 6867, 6892, 6903, 6906, 6908, 6909,
6927, 6928, 6929, 6943, 6945, 6946
* Message/description tweaks.
* Fix enchanting hides not updating AC.
* Fix incorrect score calculation.
* All 't' commands now take a turn.
* Don't prompt when swapping into dangerous terrain.
* Fix backwards stealth check.
* Fix off-by-1 error when selecting starting weapon.
* Lichform discards holy wrath weapons.
* Reinitialise zap counter for recharged wands, mention charges.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@7786 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, 22 insertions, 10 deletions
diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc index af37ccf225..3da96206e3 100644 --- a/crawl-ref/source/transfor.cc +++ b/crawl-ref/source/transfor.cc @@ -67,6 +67,10 @@ static void _init_equipment_removal(std::set<equipment_type> &rem_stuff, } break; + case TRAN_LICH: + rem_stuff.clear(); + break; + case TRAN_BLADE_HANDS: rem_stuff.erase(EQ_CLOAK); rem_stuff.erase(EQ_HELMET); @@ -337,7 +341,7 @@ bool transform(int pow, transformation_type which_trans, bool quiet) } // We drop everything except jewellery by default. - equipment_type default_rem[] = { + const equipment_type default_rem[] = { EQ_WEAPON, EQ_CLOAK, EQ_HELMET, EQ_GLOVES, EQ_BOOTS, EQ_SHIELD, EQ_BODY_ARMOUR }; @@ -433,11 +437,6 @@ bool transform(int pow, transformation_type which_trans, bool quiet) return (true); case TRAN_BLADE_HANDS: - rem_stuff.erase(EQ_CLOAK); - rem_stuff.erase(EQ_HELMET); - rem_stuff.erase(EQ_BOOTS); - rem_stuff.erase(EQ_BODY_ARMOUR); - if (check_for_cursed_equipment( rem_stuff )) return (false); @@ -533,10 +532,9 @@ bool transform(int pow, transformation_type which_trans, bool quiet) return (true); case TRAN_LICH: - // Don't need to remove anything. - - // also AC +3, cold +1, neg +3, pois +1, is_undead, res magic +50, + // AC +3, cold +1, neg +3, pois +1, is_undead, res magic +50, // spec_death +1, and drain attack (if empty-handed) + if (you.duration[DUR_DEATHS_DOOR]) { if (!quiet) @@ -548,8 +546,23 @@ bool transform(int pow, transformation_type which_trans, bool quiet) return (false); } + // Remove holy wrath weapons if necessary. + if (you.weapon() + && get_weapon_brand(*you.weapon()) == SPWPN_HOLY_WRATH) + { + rem_stuff.insert(EQ_WEAPON); + } + + if (check_for_cursed_equipment(rem_stuff, quiet)) + return (false); + + if (check_transformation_stat_loss(rem_stuff, quiet)) + return (false); + mpr("Your body is suffused with negative energy!"); + remove_equipment(rem_stuff); + // undead cannot regenerate -- bwr if (you.duration[DUR_REGENERATION]) { @@ -560,7 +573,6 @@ bool transform(int pow, transformation_type which_trans, bool quiet) // silently removed since undead automatically resist poison -- bwr you.duration[DUR_RESIST_POISON] = 0; - // no remove_equip you.attribute[ATTR_TRANSFORMATION] = TRAN_LICH; you.duration[DUR_TRANSFORMATION] = 20 + random2(pow) + random2(pow); |