summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-info.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-01-20 13:54:52 -0700
committerSteve Melenchuk <smelenchuk@gmail.com>2014-01-21 22:10:12 -0700
commit678a640e4d1a09fe20801ab98f5db7a3e7226021 (patch)
tree8ef473eea97d18324c85941cf685065883282570 /crawl-ref/source/mon-info.cc
parentf689adf1dc107d7b5265ffbe1199680f43a98833 (diff)
downloadcrawl-ref-678a640e4d1a09fe20801ab98f5db7a3e7226021.tar.gz
crawl-ref-678a640e4d1a09fe20801ab98f5db7a3e7226021.zip
Demonspawn enemies: underlying base/non-base monster work.
See: https://crawl.develz.org/wiki/doku.php?id=user:hangedman#faceted_classed_demonspawn_for_pan for explanations. This includes a move of the demonspawn glyph to '6'; this is intended to make the glyphs for each of the enemies unique, which wouldn't really be possible with the overloaded '@' glyph. A lot of the functionality that varies for base demonspawn is present, including attack flavours and spininess; the base monsters differ slightly to reflect this. The nonbase enemies are all currently identical; further, nothing places anywhere yet. Differentiation to come in following commits.
Diffstat (limited to 'crawl-ref/source/mon-info.cc')
-rw-r--r--crawl-ref/source/mon-info.cc27
1 files changed, 25 insertions, 2 deletions
diff --git a/crawl-ref/source/mon-info.cc b/crawl-ref/source/mon-info.cc
index 8710c523a0..af4aae88d4 100644
--- a/crawl-ref/source/mon-info.cc
+++ b/crawl-ref/source/mon-info.cc
@@ -329,7 +329,9 @@ monster_info::monster_info(monster_type p_type, monster_type p_base_type)
type = p_type;
base_type = p_base_type;
- draco_type = mons_genus(type) == MONS_DRACONIAN ? MONS_DRACONIAN : type;
+ draco_type = mons_genus(type) == MONS_DRACONIAN ? MONS_DRACONIAN :
+ mons_genus(type) == MONS_DEMONSPAWN ? MONS_DEMONSPAWN
+ : type;
number = 0;
colour = mons_class_colour(type);
@@ -441,7 +443,10 @@ monster_info::monster_info(const monster* m, int milev)
}
draco_type =
- mons_genus(type) == MONS_DRACONIAN ? ::draco_subspecies(m) : type;
+ (mons_genus(type) == MONS_DRACONIAN
+ || mons_genus(type) == MONS_DEMONSPAWN)
+ ? ::draco_or_demonspawn_subspecies(m)
+ : type;
if (!mons_can_display_wounds(m)
|| !mons_class_can_display_wounds(type))
@@ -860,6 +865,15 @@ string monster_info::_core_name() const
s = draconian_colour_name(base_type) + " " + s;
break;
+ case MONS_DEMONSPAWN_BLOOD_SAINT:
+ case MONS_DEMONSPAWN_CHAOS_CHAMPION:
+ case MONS_DEMONSPAWN_WARMONGER:
+ case MONS_DEMONSPAWN_CORRUPTER:
+ case MONS_DEMONSPAWN_BLACK_SUN:
+ if (base_type != MONS_NO_MONSTER)
+ s = demonspawn_base_name(base_type) + " " + s;
+ break;
+
case MONS_DANCING_WEAPON:
case MONS_SPECTRAL_WEAPON:
if (inv[MSLOT_WEAPON].get())
@@ -1139,6 +1153,15 @@ bool monster_info::less_than(const monster_info& m1, const monster_info& m2,
return false;
}
+ // Treat base demonspawn identically, as with draconians.
+ if (!zombified && m1.type >= MONS_FIRST_BASE_DEMONSPAWN
+ && m1.type <= MONS_LAST_BASE_DEMONSPAWN
+ && m2.type >= MONS_FIRST_BASE_DEMONSPAWN
+ && m2.type <= MONS_LAST_BASE_DEMONSPAWN)
+ {
+ return false;
+ }
+
int diff_delta = mons_avg_hp(m1.type) - mons_avg_hp(m2.type);
// By descending difficulty