diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-26 03:05:13 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-26 03:05:13 +0000 |
commit | d16ed1201876132b39d151da6877de997da67912 (patch) | |
tree | 30e5d1df643776b9486d0dd0ea0ef123da68e003 /crawl-ref/source/xom.cc | |
parent | 537e2fe2876ff141f926d946f1c9ed2fba85c714 (diff) | |
download | crawl-ref-d16ed1201876132b39d151da6877de997da67912.tar.gz crawl-ref-d16ed1201876132b39d151da6877de997da67912.zip |
Generalize the routines to determine whether you or a monster can mutate
or mutate safely by moving them to the actor interface.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4650 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/xom.cc')
-rw-r--r-- | crawl-ref/source/xom.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index e0e457765b..0c64e935c6 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -416,7 +416,7 @@ bool there_are_monsters_nearby() static bool choose_mutatable_monster(const monsters* mon) { - return (mon->alive() && mons_holiness(mon) == MH_NATURAL + return (mon->alive() && mon->can_safely_mutate() && !mons_is_submerged(mon)); } @@ -626,7 +626,7 @@ static bool xom_is_good(int sever) } else if (random2(sever) <= 9) { - if (!can_safely_mutate()) + if (!you.can_safely_mutate()) goto try_again; god_speaks(GOD_XOM, _get_xom_speech("good mutations")); @@ -758,7 +758,7 @@ static bool xom_is_bad(int sever) } else if (random2(sever) <= 6) { - if (!can_safely_mutate()) + if (!you.can_safely_mutate()) goto try_again; god_speaks(GOD_XOM, _get_xom_speech("random mutations")); |