diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-15 06:36:07 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-15 06:36:07 +0000 |
commit | 62cba73fa0b680b992c6c11ba59268617abd35ae (patch) | |
tree | 2895b3f5acd644d2579c5798c913207d0cf8cf33 /crawl-ref/source/monstuff.cc | |
parent | a1b82e6be0343a691d342b48dd9f9076ad53453a (diff) | |
download | crawl-ref-62cba73fa0b680b992c6c11ba59268617abd35ae.tar.gz crawl-ref-62cba73fa0b680b992c6c11ba59268617abd35ae.zip |
Some fixes for mermaid beholding:
* A mermaid stops beholding if it polymorphs into something else.
* If new walls are created, then Crawl stops the beholdment of any
mermaid that gets hidden by the new walls.
* Do paranoid sanity checking on beholders before each command with
check_beholders() and try to restore sanity if any bugs are
found (and give a diagnostics message if DEBUG is set).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2465 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r-- | crawl-ref/source/monstuff.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 98ccfbf0f0..f46c35fed0 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -1166,6 +1166,13 @@ bool monster_polymorph( monsters *monster, monster_type targetc, bool player_messaged = simple_monster_message(monster, str_polymon.c_str() ); + // Even if the monster transforms from one type that can behold the + // player into a different type which can also behold the player, + // the polymoprh disrupts the beholding process. Do this before + // changing monster->type, since unbeholding can only happen while + // monster is still a mermaid. + update_beholders(monster, true); + // the actual polymorphing: const int old_hp = monster->hit_points; const int old_hp_max = monster->max_hit_points; |