summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/godcompanions.cc
diff options
context:
space:
mode:
authorDracoOmega <draco_omega@live.com>2013-03-05 22:27:10 -0330
committerDracoOmega <draco_omega@live.com>2013-03-06 01:38:15 -0330
commit4bf3e34638f76458d700f1ccb80cb851c7a5e3bb (patch)
treecdf6f7bcda1aa6f1d306506b5fe277754e767e89 /crawl-ref/source/godcompanions.cc
parent52967696eaa300f69245996ab913b58d595f19f5 (diff)
downloadcrawl-ref-4bf3e34638f76458d700f1ccb80cb851c7a5e3bb.tar.gz
crawl-ref-4bf3e34638f76458d700f1ccb80cb851c7a5e3bb.zip
Recall allies in rough order of HD (with random jitter)
Fully random ordering had several problems when the player had a large number of allies, many of which were mostly worthless. Raising a bunch of green rat skeletons shouldn't make a Yred worshipper's effective recall power noticeably weaker, for example, nor should a Beogh follower gaining a large number of plain orcs to accompany their warlords.
Diffstat (limited to 'crawl-ref/source/godcompanions.cc')
-rw-r--r--crawl-ref/source/godcompanions.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/godcompanions.cc b/crawl-ref/source/godcompanions.cc
index fcb638c770..f37de807ff 100644
--- a/crawl-ref/source/godcompanions.cc
+++ b/crawl-ref/source/godcompanions.cc
@@ -88,7 +88,7 @@ void update_companions()
}
}
-void populate_offlevel_recall_list()
+void populate_offlevel_recall_list(vector<pair<mid_t, int> > &recall_list)
{
for (map<mid_t, companion>::iterator i = companion_list.begin();
i != companion_list.end(); ++i )
@@ -101,7 +101,8 @@ void populate_offlevel_recall_list()
if (comp->level.branch == BRANCH_ABYSS)
continue;
- you.recall_list.push_back(mid);
+ pair<mid_t, int> p = make_pair(mid, comp->mons.mons.hit_dice);
+ recall_list.push_back(p);
}
}
}