From d4065da159cb407f1680de9f03596cd397ded525 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Mon, 28 May 2007 11:28:11 +0000 Subject: Added new orc entries and vaults (Lemuel). Added support to the map designer for specifying the monster-type for zombies, skeletons, simulacra and spectral things. Also allow specifying the number of heads for hydras ("12-headed hydra"). Fixed lexer rule bug (IDENTIFIER). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1490 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/mapdef.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/mapdef.h') diff --git a/crawl-ref/source/mapdef.h b/crawl-ref/source/mapdef.h index 1f6cc05fa4..6b951237a7 100644 --- a/crawl-ref/source/mapdef.h +++ b/crawl-ref/source/mapdef.h @@ -176,14 +176,17 @@ private: struct mons_spec { - int mid; + int mid; + int monnum; // The zombified monster for zombies, or head + // count for hydras. int genweight, mlevel; bool fix_mons; bool generate_awake; - mons_spec(int id = RANDOM_MONSTER, int gw = 10, int ml = 0, + mons_spec(int id = RANDOM_MONSTER, int num = 250, + int gw = 10, int ml = 0, bool _fixmons = false, bool awaken = false) - : mid(id), genweight(gw), mlevel(ml), fix_mons(_fixmons), + : mid(id), monnum(num), genweight(gw), mlevel(ml), fix_mons(_fixmons), generate_awake(awaken) { } @@ -223,7 +226,11 @@ private: }; private: - int mons_by_name(std::string name) const; + mons_spec mons_by_name(std::string name) const; + void get_zombie_type(std::string s, mons_spec &spec) const; + mons_spec get_hydra_spec(const std::string &name) const; + mons_spec get_zombified_monster(const std::string &name, + monster_type zomb) const; mons_spec_slot parse_mons_spec(std::string spec); mons_spec pick_monster(mons_spec_slot &slot); int fix_demon(int id) const; -- cgit v1.2.3-54-g00ecf