diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-03-02 22:17:50 -0700 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-03-03 10:00:33 -0700 |
commit | 620cfe93cabe77ec160466b90e62bc1ea4fdcfad (patch) | |
tree | 351f94110ab785fb84e66869f122bc2b1dc8ac76 /crawl-ref/source/delay.cc | |
parent | 18227662ff0e53f2b66bb332b56cff90e91058df (diff) | |
download | crawl-ref-620cfe93cabe77ec160466b90e62bc1ea4fdcfad.tar.gz crawl-ref-620cfe93cabe77ec160466b90e62bc1ea4fdcfad.zip |
Zin warns the player of shapeshifters.
Since you can use Recite to pick them out anyway, we might as well just
straight up tell the player.
Diffstat (limited to 'crawl-ref/source/delay.cc')
-rw-r--r-- | crawl-ref/source/delay.cc | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc index ba88caf6af..bb3ba8ca4f 100644 --- a/crawl-ref/source/delay.cc +++ b/crawl-ref/source/delay.cc @@ -1623,7 +1623,25 @@ static inline bool _monster_warning(activity_interrupt_type ai, ash_id_monster_equipment(const_cast<monster* >(mon)); bool ash_id = mon->props.exists("ash_id") && mon->props["ash_id"]; - string ash_warning; + bool zin_id = false; + string god_warning; + + if (you_worship(GOD_ZIN) + && mon->is_shapeshifter() + && !(mon->flags & MF_KNOWN_SHIFTER)) + { + ASSERT(!ash_id); + zin_id = true; + (const_cast<monster *>(mon))->props["zin_id"] = true; + discover_shifter(const_cast<monster *>(mon)); + god_warning = "Zin warns you: " + + uppercase_first(mon->pronoun(PRONOUN_SUBJECTIVE)) + + " is a foul "; + if (mon->has_ench(ENCH_GLOWING_SHAPESHIFTER)) + god_warning += "glowing "; + god_warning += "shapeshifter."; + } + monster_info mi(mon); @@ -1635,9 +1653,9 @@ static inline bool _monster_warning(activity_interrupt_type ai, if (!mweap.empty()) { if (ash_id) - ash_warning = "Ashenzari warns you:"; + god_warning = "Ashenzari warns you:"; - (ash_id ? ash_warning : text) += + (ash_id ? god_warning : text) += " " + uppercase_first(mon->pronoun(PRONOUN_SUBJECTIVE)) + " is" + mweap + "."; } @@ -1647,8 +1665,12 @@ static inline bool _monster_warning(activity_interrupt_type ai, else { mprf(MSGCH_WARN, "%s", text.c_str()); - if (ash_id) - mprf(MSGCH_GOD, "%s", ash_warning.c_str()); + if (ash_id || zin_id) + mprf(MSGCH_GOD, "%s", god_warning.c_str()); +#ifndef USE_TILE_LOCAL + if (zin_id) + update_monster_pane(); +#endif } const_cast<monster* >(mon)->seen_context = SC_JUST_SEEN; } |