summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/godcompanions.cc
diff options
context:
space:
mode:
authorDracoOmega <draco_omega@live.com>2013-03-06 00:28:04 -0330
committerDracoOmega <draco_omega@live.com>2013-03-06 01:20:20 -0330
commit37b8440318fc9dea9791e04a90593765f0371e03 (patch)
tree34b59a713070e77ffc52f631dce5b8502a53a991 /crawl-ref/source/godcompanions.cc
parent6777ac41de40957e04ed8670e4551284dc62344c (diff)
downloadcrawl-ref-37b8440318fc9dea9791e04a90593765f0371e03.tar.gz
crawl-ref-37b8440318fc9dea9791e04a90593765f0371e03.zip
Add a wizmode command to list Yred/Beogh followers
Diffstat (limited to 'crawl-ref/source/godcompanions.cc')
-rw-r--r--crawl-ref/source/godcompanions.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/crawl-ref/source/godcompanions.cc b/crawl-ref/source/godcompanions.cc
index 1a5ae0f101..f306f2f74f 100644
--- a/crawl-ref/source/godcompanions.cc
+++ b/crawl-ref/source/godcompanions.cc
@@ -16,6 +16,7 @@
#include "mon-util.h"
#include "religion.h"
#include "stuff.h"
+#include "branch.h"
map<mid_t, companion> companion_list;
@@ -163,3 +164,21 @@ bool companion_is_elsewhere(mid_t mid)
return false;
}
+
+void wizard_list_companions()
+{
+ if (companion_list.size() == 0)
+ {
+ mpr("You have no companions.");
+ return;
+ }
+
+ for (map<mid_t, companion>::iterator i = companion_list.begin();
+ i != companion_list.end(); ++i )
+ {
+ companion* comp = &i->second;
+ monster* mon = &comp->mons.mons;
+ mprf("%s (%d)(%s:%d)", mon->name(DESC_PLAIN, true).c_str(),
+ mon->mid, branches[comp->level.branch].abbrevname, comp->level.depth);
+ }
+}