diff options
author | Chris Campbell <chriscampbell89@gmail.com> | 2014-03-18 22:39:14 +0000 |
---|---|---|
committer | Chris Campbell <chriscampbell89@gmail.com> | 2014-03-18 23:29:50 +0000 |
commit | 4f4ed03cb62e042ee39acb281c3d5b0ec3c40c78 (patch) | |
tree | 79d625440daccf90a445e7bae530cbe598000936 /crawl-ref/source/mon-project.cc | |
parent | 7c2a7eb1ad522bf04378cd0db93ad7c1a44f17f8 (diff) | |
download | crawl-ref-4f4ed03cb62e042ee39acb281c3d5b0ec3c40c78.tar.gz crawl-ref-4f4ed03cb62e042ee39acb281c3d5b0ec3c40c78.zip |
Make IOODs fizzle instead of exploding when colliding with low distance
Orbs that have only travelled one square will just dissipate. Should
prevent accidental self-explosion with the spell or the Orb card.
Diffstat (limited to 'crawl-ref/source/mon-project.cc')
-rw-r--r-- | crawl-ref/source/mon-project.cc | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/crawl-ref/source/mon-project.cc b/crawl-ref/source/mon-project.cc index b1f8bca618..2f787f2169 100644 --- a/crawl-ref/source/mon-project.cc +++ b/crawl-ref/source/mon-project.cc @@ -407,16 +407,37 @@ move_again: if (mons && iood && mons_is_projectile(victim->type)) { - if (mon.observable()) + // Weak orbs just fizzle instead of exploding. + if (mons->props["iood_distance"].get_int() < 2 + || mon.props["iood_distance"].get_int() < 2) { - mpr("The orbs collide in a blinding explosion!"); - noisy(40, pos); + if (mons->props["iood_distance"].get_int() < 2) + { + if (you.see_cell(pos)) + mpr("The orb fizzles."); + monster_die(mons, KILL_DISMISSED, NON_MONSTER); + } + + // Return, if the acting orb fizzled. + if (mon.props["iood_distance"].get_int() < 2) + { + if (you.see_cell(pos)) + mpr("The orb fizzles."); + monster_die(&mon, KILL_DISMISSED, NON_MONSTER); + return true; + } } else - noisy(40, pos, "You hear a loud magical explosion!"); - monster_die(mons, KILL_DISMISSED, NON_MONSTER); - _iood_hit(mon, pos, true); - return true; + { + if (mon.observable()) + mpr("The orbs collide in a blinding explosion!"); + else + mpr("You hear a loud magical explosion!"); + noisy(40, pos); + monster_die(mons, KILL_DISMISSED, NON_MONSTER); + _iood_hit(mon, pos, true); + return true; + } } if (mons && mons_is_boulder(&mon) && mons_is_boulder(mons)) |