summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-12 16:55:43 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-12 16:55:43 +0000
commit659553d325a49df4870dcfa18af7f9bece5cbf16 (patch)
treea91a34276297d5e773cad2beb02b71aba63e5c1f /crawl-ref/source/monstuff.cc
parentdae63e7aa1492355fa025d4a18f638ea9cc59553 (diff)
downloadcrawl-ref-659553d325a49df4870dcfa18af7f9bece5cbf16.tar.gz
crawl-ref-659553d325a49df4870dcfa18af7f9bece5cbf16.zip
* 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
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 5ebb2b2ee9..c5948c9bef 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -1123,9 +1123,11 @@ int monster_die(monsters *monster, killer_type killer,
// Take note!
if (!mons_reset && !crawl_state.arena && MONST_INTERESTING(monster))
+ {
take_note(Note(NOTE_KILL_MONSTER,
monster->type, mons_friendly(monster),
monster->name(DESC_NOCAP_A, true).c_str()));
+ }
// From time to time Trog gives you a little bonus
if (killer == KILL_YOU && you.duration[DUR_BERSERKER])
@@ -1737,6 +1739,10 @@ int monster_die(monsters *monster, killer_type killer,
"as it dies; that was a shifter!");
}
+ // If we kill an invisible monster reactivate autopickup.
+ if (mons_near(monster) && !player_monster_visible(monster))
+ autotoggle_autopickup(false);
+
crawl_state.dec_mon_acting(monster);
monster_cleanup(monster);
@@ -1970,7 +1976,9 @@ bool monster_polymorph(monsters *monster, monster_type targetc,
return simple_monster_message(monster, " looks momentarily different.");
// Messaging.
- bool can_see = you.can_see(monster);
+ bool can_see = you.can_see(monster);
+ bool can_see_new = !mons_class_flag(targetc, M_INVIS) || player_see_invis();
+
// If old monster is visible to the player, and is interesting,
// then note why the interesting monster went away.
@@ -1991,7 +1999,7 @@ bool monster_polymorph(monsters *monster, monster_type targetc,
else
str_polymon = " evaporates and reforms as ";
- if (!can_see)
+ if (!can_see_new)
str_polymon += "something you cannot see!";
else
{
@@ -2088,6 +2096,7 @@ bool monster_polymorph(monsters *monster, monster_type targetc,
if (!player_messaged && you.can_see(monster))
{
mprf("%s appears out of thin air!", monster->name(DESC_CAP_A).c_str());
+ autotoggle_autopickup(false);
player_messaged = true;
}