diff options
author | Eino Keskitalo <evktalo@users.sourceforge.net> | 2009-11-07 16:30:52 +0200 |
---|---|---|
committer | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-07 23:21:21 -0600 |
commit | 1c0a611a9e00fc789a8e71f1423e48bec7dd5020 (patch) | |
tree | b73d3be502e13ec1bb56e89e5382fd14f71a74ba /crawl-ref/source/monster.cc | |
parent | ee4d8d69cdded564187651f879b618a4fc2538f9 (diff) | |
download | crawl-ref-1c0a611a9e00fc789a8e71f1423e48bec7dd5020.tar.gz crawl-ref-1c0a611a9e00fc789a8e71f1423e48bec7dd5020.zip |
Merge from chaotic_experiment branch:
Replace mons_is_shapeshifter(const monsters *m) in mon-util.cc with is_shapeshifter() in monster.cc
Diffstat (limited to 'crawl-ref/source/monster.cc')
-rw-r--r-- | crawl-ref/source/monster.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index 4e79eb6a30..2c3a549479 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -2209,7 +2209,7 @@ static std::string _str_monam(const monsters& mon, description_level_type desc, } } - if ((mon.flags & MF_KNOWN_MIMIC) && mons_is_shapeshifter(&mon)) + if ((mon.flags & MF_KNOWN_MIMIC) && mon.is_shapeshifter()) { // If momentarily in original form, don't display "shaped // shifter". @@ -2952,7 +2952,7 @@ bool monsters::is_chaotic() const if (type == MONS_UGLY_THING || type == MONS_VERY_UGLY_THING) return (true); - if (mons_is_shapeshifter(this)) + if (is_shapeshifter()) return (true); // Assume that all unknown gods (GOD_NAMELESS) are not chaotic. @@ -2976,6 +2976,11 @@ bool monsters::is_chaotic() const return (false); } +bool monsters::is_shapeshifter() const +{ + return (has_ench(ENCH_GLOWING_SHAPESHIFTER, ENCH_SHAPESHIFTER)); +} + int monsters::res_fire() const { const mon_resist_def res = get_mons_resists(this); |