diff options
author | Jude Brown <bookofjude@users.sourceforge.net> | 2009-11-27 22:44:12 +1000 |
---|---|---|
committer | Jude Brown <bookofjude@users.sourceforge.net> | 2009-11-27 22:44:12 +1000 |
commit | b5068662183d41698414e728f64579bf3544cbaa (patch) | |
tree | 563664592e63eac18637cf5aab8c4d7426a76b93 /crawl-ref/source/mapdef.cc | |
parent | 1f6a372b1d013ce9068bee8c175fb7c11c28de5e (diff) | |
download | crawl-ref-b5068662183d41698414e728f64579bf3544cbaa.tar.gz crawl-ref-b5068662183d41698414e728f64579bf3544cbaa.zip |
New tags for monster specs: "hd" and "hp". (kilobyte)
Both values override the default class values. Placing "rat hd:20" will
generate a rat with a hit dice of 20, while placing "rat hp:20" will set
its hp to 20.
Diffstat (limited to 'crawl-ref/source/mapdef.cc')
-rw-r--r-- | crawl-ref/source/mapdef.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc index 93310d481c..407eaf9a6f 100644 --- a/crawl-ref/source/mapdef.cc +++ b/crawl-ref/source/mapdef.cc @@ -2575,6 +2575,14 @@ mons_list::mons_spec_slot mons_list::parse_mons_spec(std::string spec) if (mspec.mlevel == TAG_UNFOUND) mspec.mlevel = 0; + mspec.hd = strip_number_tag(mon_str, "hd:"); + if (mspec.hd == TAG_UNFOUND) + mspec.hd = 0; + + mspec.hp = strip_number_tag(mon_str, "hp:"); + if (mspec.hp == TAG_UNFOUND) + mspec.hp = 0; + std::string colour = strip_tag_prefix(mon_str, "col:"); if (!colour.empty()) { |