From ff2f267821153758bcd691e73b1b409c62f0c4e0 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Mon, 5 May 2008 13:33:29 +0000 Subject: Cleaned up monster generation functions, separate monster zombie type from monster number. May be buggy. Allow hydra zombies (they currently do not get the right number of heads). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4872 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/effects.cc | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'crawl-ref/source/effects.cc') diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index e5cf28d11c..b68dda8cd7 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -2232,8 +2232,8 @@ static void hell_effects() if (summon_instead) { - create_monster( which_beastie, 0, BEH_HOSTILE, you.x_pos, - you.y_pos, MHITYOU, MONS_PROGRAM_BUG ); + create_monster( + mgen_data( which_beastie, BEH_HOSTILE, 0, you.pos(), MHITYOU )); } else { @@ -2250,18 +2250,14 @@ static void hell_effects() // try to summon at least one and up to five random monsters {dlb} if (one_chance_in(3)) { - create_monster( RANDOM_MONSTER, 0, BEH_HOSTILE, - you.x_pos, you.y_pos, MHITYOU, MONS_PROGRAM_BUG ); + mgen_data mg; + mg.pos = you.pos(); + mg.foe = MHITYOU; + create_monster(mg); for (int i = 0; i < 4; i++) - { if (one_chance_in(3)) - { - create_monster( RANDOM_MONSTER, 0, BEH_HOSTILE, - you.x_pos, you.y_pos, MHITYOU, - MONS_PROGRAM_BUG ); - } - } + create_monster(mg); } } -- cgit v1.2.3-54-g00ecf