diff options
author | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-01 10:10:02 -0600 |
---|---|---|
committer | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-01 10:10:59 -0600 |
commit | a0de356f3d007e58152f257212ed13d8b44fdfc0 (patch) | |
tree | f58fc43277e2f4fcb5f99ef57b51eeeef05a9905 /crawl-ref/source/mon-util.cc | |
parent | 7e8ebade4e8c0001439b89f333174f9443b74eb0 (diff) | |
download | crawl-ref-a0de356f3d007e58152f257212ed13d8b44fdfc0.tar.gz crawl-ref-a0de356f3d007e58152f257212ed13d8b44fdfc0.zip |
Move checks for a player or monster's being chaotic into another
convenience function in the actor interface.
Diffstat (limited to 'crawl-ref/source/mon-util.cc')
-rw-r--r-- | crawl-ref/source/mon-util.cc | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index dd7940fd58..630c80823a 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -546,28 +546,6 @@ bool mons_is_native_in_branch(const monsters *monster, } } -bool mons_is_chaotic(const monsters *mon) -{ - if (mon->type == MONS_UGLY_THING || mon->type == MONS_VERY_UGLY_THING) - return (true); - - if (mons_is_shapeshifter(mon)) - return (true); - - if (mon->has_spell(SPELL_POLYMORPH_OTHER)) - return (true); - - if (mon->has_attack_flavour(AF_MUTATE) - || mon->has_attack_flavour(AF_ROT) - || mon->has_attack_flavour(AF_CHAOS) - || mon->has_attack_flavour(AF_KLOWN)) - { - return (true); - } - - return (false); -} - bool mons_is_poisoner(const monsters *mon) { if (mons_corpse_effect(mon->type) == CE_POISONOUS) @@ -1722,15 +1700,15 @@ static const char *drac_colour_names[] = { "black", "mottled", "yellow", "green", "purple", "red", "white", "pale" }; -std::string draconian_colour_name(monster_type mtype) +std::string draconian_colour_name(monster_type mon_type) { COMPILE_CHECK(ARRAYSZ(drac_colour_names) == MONS_PALE_DRACONIAN - MONS_DRACONIAN, c1); - if (mtype < MONS_BLACK_DRACONIAN || mtype > MONS_PALE_DRACONIAN) + if (mon_type < MONS_BLACK_DRACONIAN || mon_type > MONS_PALE_DRACONIAN) return ("buggy"); - return (drac_colour_names[mtype - MONS_BLACK_DRACONIAN]); + return (drac_colour_names[mon_type - MONS_BLACK_DRACONIAN]); } monster_type draconian_colour_by_name(const std::string &name) |