summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/decks.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-02 18:49:18 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-03-02 18:49:18 +0000
commit3ef70e6dea67553bc7f0748e57434b8fa8dc82cf (patch)
treecb1012bc18bf933615b2433dd85dfcb24c3ba668 /crawl-ref/source/decks.cc
parent02f124467ef2c4f86de56628fa0ce76f77bc126c (diff)
downloadcrawl-ref-3ef70e6dea67553bc7f0748e57434b8fa8dc82cf.tar.gz
crawl-ref-3ef70e6dea67553bc7f0748e57434b8fa8dc82cf.zip
Use monsters::mindex() in a few more places.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9314 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/decks.cc')
-rw-r--r--crawl-ref/source/decks.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/crawl-ref/source/decks.cc b/crawl-ref/source/decks.cc
index f3a1e29f0c..bf4da0ac89 100644
--- a/crawl-ref/source/decks.cc
+++ b/crawl-ref/source/decks.cc
@@ -1375,9 +1375,7 @@ static void _swap_monster_card(int power, deck_rarity_type rarity)
// Don't choose yourself unless there are no monsters nearby.
monsters *mon_to_swap = choose_random_nearby_monster(0);
if (!mon_to_swap)
- {
mpr("You spin around.");
- }
else
{
monsters& mon(*mon_to_swap);
@@ -1401,8 +1399,7 @@ static void _swap_monster_card(int power, deck_rarity_type rarity)
mon.moveto(you.pos());
// Plunk it down.
- mgrd(mon.pos()) = monster_index(mon_to_swap);
-
+ mgrd(mon.pos()) = mon_to_swap->mindex();
if (you_caught)
{