diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-27 13:49:29 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-07-27 13:49:29 +0000 |
commit | 79e6e3e6e43630107435eda023bf721123f80687 (patch) | |
tree | 6a9499f0b005eeafde68a032723c652e2fc3960f /crawl-ref | |
parent | 1d255b7b1ec01d6685a1f57c5583a8a362bc98c0 (diff) | |
download | crawl-ref-79e6e3e6e43630107435eda023bf721123f80687.tar.gz crawl-ref-79e6e3e6e43630107435eda023bf721123f80687.zip |
Apply trunk r10429 to 0.5.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.5@10430 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/fight.cc | 12 | ||||
-rw-r--r-- | crawl-ref/source/xom.cc | 3 |
2 files changed, 9 insertions, 6 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 7a6fa64142..7bce7d2313 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -2302,6 +2302,8 @@ void melee_attack::chaos_affects_defender() { const bool mon = defender->atype() == ACT_MONSTER; const bool immune = mon && mons_immune_magic(defender_as_monster()); + const bool is_natural = mon && mons_holiness(defender_as_monster()) + == MH_NATURAL; const bool is_shifter = mon && mons_is_shapeshifter(defender_as_monster()); const bool can_clone = mon && !mons_is_holy(defender_as_monster()) && mons_clonable(defender_as_monster(), true); @@ -2309,11 +2311,11 @@ void melee_attack::chaos_affects_defender() && !immune); const bool can_rage = defender->can_go_berserk(); - int clone_chance = can_clone ? 1 : 0; - int poly_chance = can_poly ? 1 : 0; - int poly_up_chance = can_poly && mon ? 1 : 0; - int shifter_chance = can_poly && mon ? 1 : 0; - int rage_chance = can_rage ? 10 : 0; + int clone_chance = can_clone ? 1 : 0; + int poly_chance = can_poly ? 1 : 0; + int poly_up_chance = can_poly && mon ? 1 : 0; + int shifter_chance = can_poly && is_natural && mon ? 1 : 0; + int rage_chance = can_rage ? 10 : 0; int miscast_chance = 10; // Already a shifter? diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc index 39533c4d4f..8a6433e8a4 100644 --- a/crawl-ref/source/xom.cc +++ b/crawl-ref/source/xom.cc @@ -1306,7 +1306,8 @@ static bool _xom_polymorph_nearby_monster(bool helpful) bool see_old = you.can_see(mon); std::string old_name = mon->full_name(DESC_PLAIN); - if (one_chance_in(8) && !mons_is_shapeshifter(mon)) + if (one_chance_in(8) && !mons_is_shapeshifter(mon) + && mons_holiness(mon) == MH_NATURAL) { mon->add_ench(one_chance_in(3) ? ENCH_GLOWING_SHAPESHIFTER : ENCH_SHAPESHIFTER); |