From 60bbd0964c8b9d44b9a217cccba6d87de5656abe Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Wed, 7 Oct 2009 08:50:09 +0200 Subject: Enable monsters to drink potions of berserk rage. --- crawl-ref/source/beam.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'crawl-ref/source/beam.cc') diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index 5974d3433a..9983c00882 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -1394,6 +1394,7 @@ static beam_type _chaos_beam_flavour() 10, BEAM_SLOW, 10, BEAM_HASTE, 10, BEAM_MIGHT, + 10, BEAM_BERSERK, 10, BEAM_HEALING, 10, BEAM_PARALYSIS, 10, BEAM_CONFUSION, @@ -4826,6 +4827,7 @@ bool bolt::has_saving_throw() const { case BEAM_HASTE: case BEAM_MIGHT: + case BEAM_BERSERK: case BEAM_HEALING: case BEAM_INVISIBILITY: case BEAM_DISPEL_UNDEAD: @@ -5194,6 +5196,15 @@ mon_resist_type bolt::apply_enchantment_to_monster(monsters* mon) } return (MON_AFFECTED); + case BEAM_BERSERK: + if (!mon->has_ench(ENCH_BERSERK)) { + // currently from potion, hence voluntary + mon->go_berserk(true); + // can't return this from go_berserk, unfortunately + obvious_effect = mons_near(mon); + } + return (MON_AFFECTED); + case BEAM_HEALING: if (YOU_KILL(thrower)) { -- cgit v1.2.3-54-g00ecf