From 659553d325a49df4870dcfa18af7f9bece5cbf16 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sun, 12 Apr 2009 16:55:43 +0000 Subject: * Automate all the notetaking I always do when testing Xom. NOTE_DEBUG_XOM might be a tiny bit technical or spoily, but at the same time I like the results and think this flag could actually be turned into an option to autonote all Xom effects, so I've left it on in this commit, in case someone else is playtesting Xom. * Fix a monster polymorphing into an (invisible) unseen horror naming it. * Reactivate autopickup if you kill an invisible monster or see an invisible monster become visible. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9598 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/transfor.cc | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/transfor.cc') diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc index 35aa8c5f1d..3eb69e744c 100644 --- a/crawl-ref/source/transfor.cc +++ b/crawl-ref/source/transfor.cc @@ -30,6 +30,7 @@ REVISION("$Rev$"); #include "state.h" #include "stuff.h" #include "traps.h" +#include "xom.h" static void _extra_hp(int amount_extra); @@ -153,7 +154,7 @@ static void _unwear_equipment_slot(equipment_type eqslot) } static void _remove_equipment(const std::set& removed, - bool meld = true) + bool meld = true, bool mutation = false) { // Meld items into you in (reverse) order. (std::set is a sorted container) std::set::const_iterator iter; @@ -172,7 +173,16 @@ static void _remove_equipment(const std::set& removed, _unwear_equipment_slot(e); if (unequip) + { you.equip[e] = -1; + + if (mutation) + { + // A mutation made us not only lose an equipment slot + // but actually removed a worn item: Funny! + xom_is_stimulated(is_artefact(*equip) ? 255 : 128); + } + } } } @@ -261,11 +271,11 @@ void unmeld_one_equip(equipment_type eq) _unmeld_equipment(e); } -void remove_one_equip(equipment_type eq, bool meld) +void remove_one_equip(equipment_type eq, bool meld, bool mutation) { std::set r; r.insert(eq); - _remove_equipment(r, meld); + _remove_equipment(r, meld, mutation); } static bool _tran_may_meld_cursed(int transformation) -- cgit v1.2.3-54-g00ecf