diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-05 13:33:29 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-05 13:33:29 +0000 |
commit | ff2f267821153758bcd691e73b1b409c62f0c4e0 (patch) | |
tree | 11f18df98aad81ddfa9798dafd67eceb3b4ed510 /crawl-ref/source/debug.cc | |
parent | 3423bbab5a0f024eeafffe6b8260c8c088647db1 (diff) | |
download | crawl-ref-ff2f267821153758bcd691e73b1b409c62f0c4e0.tar.gz crawl-ref-ff2f267821153758bcd691e73b1b409c62f0c4e0.zip |
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
Diffstat (limited to 'crawl-ref/source/debug.cc')
-rw-r--r-- | crawl-ref/source/debug.cc | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc index 25c355d1be..6ab2eb2a63 100644 --- a/crawl-ref/source/debug.cc +++ b/crawl-ref/source/debug.cc @@ -394,9 +394,12 @@ void create_spec_monster(void) if (mon == -1) canned_msg( MSG_OK ); else - create_monster( mon, 0, BEH_SLEEP, - you.x_pos, you.y_pos, MHITNOT, MONS_PROGRAM_BUG, - true ); + { + create_monster( + mgen_data::sleeper_at( + static_cast<monster_type>(mon), + you.pos())); + } } // end create_spec_monster() #endif @@ -435,7 +438,7 @@ void create_spec_monster_name(int x, int y) mons_spec mspec = mlist.get_monster(0); if (!force_place && mspec.mid != -1) { - coord_def place = find_newmons_square(mspec.mid, x, y); + coord_def place = find_newmons_square(mspec.mid, coord_def(x, y)); if (in_bounds(place)) { x = place.x; @@ -1431,13 +1434,16 @@ void stethoscope(int mwh) // print stats and other info mprf(MSGCH_DIAGNOSTICS, "HD=%d (%lu) HP=%d/%d AC=%d EV=%d MR=%d SP=%d " - "energy=%d num=%d flags=%04lx", + "energy=%d%s%s num=%d flags=%04lx", menv[i].hit_dice, menv[i].experience, menv[i].hit_points, menv[i].max_hit_points, menv[i].ac, menv[i].ev, mons_resist_magic( &menv[i] ), menv[i].speed, menv[i].speed_increment, + menv[i].base_monster != MONS_PROGRAM_BUG ? " base=" : "", + menv[i].base_monster != MONS_PROGRAM_BUG ? + get_monster_data(menv[i].base_monster)->name : "", menv[i].number, menv[i].flags ); // print behaviour information @@ -2516,8 +2522,10 @@ void error_message_to_player(void) static int create_fsim_monster(int mtype, int hp) { const int mi = - create_monster( mtype, 0, BEH_HOSTILE, you.x_pos, you.y_pos, - MHITNOT, MONS_PROGRAM_BUG ); + create_monster( + mgen_data::hostile_at( + static_cast<monster_type>(mtype), + you.pos() ) ); if (mi == -1) return (mi); |