diff options
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/beam.cc | 24 | ||||
-rw-r--r-- | crawl-ref/source/food.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/monstuff.cc | 10 |
3 files changed, 31 insertions, 6 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 567b6c26e9..fd8d0fc2a9 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -3714,12 +3714,28 @@ void bolt::affect_player_enchantment() break; } - mpr("Pain shoots through your body!"); - if (aux_source.empty()) aux_source = "by nerve-wracking pain"; - internal_ouch(damage.roll()); + if (name.find("agony") != std::string::npos) + { + if (you.res_negative_energy()) // Agony has no effect with rN. + { + mpr("You are unaffected."); + break; + } + + mpr("Your body is wracked with pain!"); + + // On the player, Agony acts like single-target torment. + internal_ouch(std::max(0, you.hp / 2 - 1)); + } + else + { + mpr("Pain shoots through your body!"); + + internal_ouch(damage.roll()); + } obvious_effect = true; break; @@ -5056,7 +5072,7 @@ int bolt::range_used_on_hit(const actor* victim) const used = 1; // Assume we didn't hit, after all. - if (is_tracer && used == BEAM_STOP) + if (is_tracer && beam_source == NON_MONSTER && used == BEAM_STOP) return 1; if (in_explosion_phase) diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index f6b33c0e36..caaad7cf26 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -571,8 +571,7 @@ bool butchery(int which_corpse) if (butcher_tool == -1 && gloved_butcher) removed_gloves = true; - - if (you.equip[EQ_WEAPON] != butcher_tool) + else if (you.equip[EQ_WEAPON] != butcher_tool) wpn_switch = true; } diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index f23f6b7c09..6d568b174f 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -2110,6 +2110,7 @@ bool monster_polymorph(monsters *monster, monster_type targetc, mon_enchant neutral = monster->get_ench(ENCH_NEUTRAL); mon_enchant shifter = monster->get_ench(ENCH_GLOWING_SHAPESHIFTER, ENCH_SHAPESHIFTER); + mon_enchant sub = monster->get_ench(ENCH_SUBMERGED); mon_enchant summon = monster->get_ench(ENCH_SUMMON); mon_enchant tp = monster->get_ench(ENCH_TP); @@ -2147,9 +2148,18 @@ bool monster_polymorph(monsters *monster, monster_type targetc, monster->add_ench(charm); monster->add_ench(neutral); monster->add_ench(shifter); + monster->add_ench(sub); monster->add_ench(summon); monster->add_ench(tp); + // Allows for handling of submerged monsters which polymorph into + // monsters that can't submerge on this square. + if (monster->has_ench(ENCH_SUBMERGED) + && !monster_can_submerge(monster, grd(monster->pos()))) + { + monster->del_ench(ENCH_SUBMERGED); + } + monster->ench_countdown = old_ench_countdown; if (mons_class_flag(monster->type, M_INVIS)) |