diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-10-04 10:08:24 +0200 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-10-07 08:40:36 +0200 |
commit | dcbbee03550116ef26720ccabf543efb15b965a6 (patch) | |
tree | 5dda9bf174022463a5a451846a5f0fdac070519f /crawl-ref/source/beam.cc | |
parent | bca0a29a7910c1ee917e90084e308eef70e121e8 (diff) | |
download | crawl-ref-dcbbee03550116ef26720ccabf543efb15b965a6.tar.gz crawl-ref-dcbbee03550116ef26720ccabf543efb15b965a6.zip |
Enable monsters to drink potions of might.
This adds new beam and enchantment types, so probably breaks
save compatibility.
Diffstat (limited to 'crawl-ref/source/beam.cc')
-rw-r--r-- | crawl-ref/source/beam.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index b02b0cd372..5974d3433a 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -1393,6 +1393,7 @@ static beam_type _chaos_beam_flavour() 10, BEAM_NAPALM, 10, BEAM_SLOW, 10, BEAM_HASTE, + 10, BEAM_MIGHT, 10, BEAM_HEALING, 10, BEAM_PARALYSIS, 10, BEAM_CONFUSION, @@ -4824,6 +4825,7 @@ bool bolt::has_saving_throw() const switch (flavour) { case BEAM_HASTE: + case BEAM_MIGHT: case BEAM_HEALING: case BEAM_INVISIBILITY: case BEAM_DISPEL_UNDEAD: @@ -5180,6 +5182,18 @@ mon_resist_type bolt::apply_enchantment_to_monster(monsters* mon) } return (MON_AFFECTED); + case BEAM_MIGHT: + if (!mon->has_ench(ENCH_MIGHT) + && !mons_is_stationary(mon) + && mon->add_ench(ENCH_MIGHT)) + { + if (simple_monster_message(mon, " seems to grow stronger.")) + { + obvious_effect = true; + } + } + return (MON_AFFECTED); + case BEAM_HEALING: if (YOU_KILL(thrower)) { @@ -5967,6 +5981,7 @@ std::string beam_type_name(beam_type type) case BEAM_CHAOS: return("chaos"); case BEAM_SLOW: return("slow"); case BEAM_HASTE: return("haste"); + case BEAM_MIGHT: return("might"); case BEAM_HEALING: return("healing"); case BEAM_PARALYSIS: return("paralysis"); case BEAM_CONFUSION: return("confusion"); |