summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/wiz-mon.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-06-06 17:09:20 -0400
committerNeil Moore <neil@s-z.org>2014-06-06 17:39:52 -0400
commit54466c95002b97e488250560afb95a1c2c2e9192 (patch)
treecdfa13f81bcf81ec3cc6d28b55802860a8849d54 /crawl-ref/source/wiz-mon.cc
parent3520d719e690955e733bd8fb21f5db400e038fe4 (diff)
downloadcrawl-ref-54466c95002b97e488250560afb95a1c2c2e9192.tar.gz
crawl-ref-54466c95002b97e488250560afb95a1c2c2e9192.zip
Show summoner in wizmode xD.
Diffstat (limited to 'crawl-ref/source/wiz-mon.cc')
-rw-r--r--crawl-ref/source/wiz-mon.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/crawl-ref/source/wiz-mon.cc b/crawl-ref/source/wiz-mon.cc
index 34a26bddf7..7b646f821d 100644
--- a/crawl-ref/source/wiz-mon.cc
+++ b/crawl-ref/source/wiz-mon.cc
@@ -607,9 +607,10 @@ void debug_stethoscope(int mon)
const habitat_type hab = mons_habitat(&mons);
COMPILE_CHECK(ARRAYSZ(ht_names) == NUM_HABITATS);
+ const actor * const summoner = actor_by_mid(mons.summoner);
mprf(MSGCH_DIAGNOSTICS,
"hab=%s beh=%s(%d) foe=%s(%d) mem=%d target=(%d,%d) "
- "firing_pos=(%d,%d) patrol_point=(%d,%d) god=%s",
+ "firing_pos=(%d,%d) patrol_point=(%d,%d) god=%s%s",
(hab >= 0 && hab < NUM_HABITATS) ? ht_names[hab] : "INVALID",
mons.asleep() ? "sleep"
: mons_is_wandering(&mons) ? "wander"
@@ -630,7 +631,11 @@ void debug_stethoscope(int mon)
mons.target.x, mons.target.y,
mons.firing_pos.x, mons.firing_pos.y,
mons.patrol_point.x, mons.patrol_point.y,
- god_name(mons.god).c_str());
+ god_name(mons.god).c_str(),
+ (summoner ? make_stringf(" summoner=%s(%d)",
+ summoner->name(DESC_PLAIN, true).c_str(),
+ summoner->mindex()).c_str()
+ : ""));
// Print resistances.
mprf(MSGCH_DIAGNOSTICS, "resist: fire=%d cold=%d elec=%d pois=%d neg=%d "