diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-03-24 22:14:04 -0600 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-03-24 22:15:59 -0600 |
commit | 5545dd3c9da8ca792446d5919cf671cceba4c2f0 (patch) | |
tree | 90d1b8d9f71e6e32458d56d1ce81eb0ccdad1d22 /crawl-ref/source/art-func.h | |
parent | 0c216963e85338c522b0fe3d58b008a9683de8aa (diff) | |
download | crawl-ref-5545dd3c9da8ca792446d5919cf671cceba4c2f0.tar.gz crawl-ref-5545dd3c9da8ca792446d5919cf671cceba4c2f0.zip |
Fix arc blade discharge behaviour.
The "new" behaviour is what was intended all along, yet never somehow
made it into the final version of that commit.
Using cast_discharge was using to strange behaviour (especially when
monsters, e.g. Nikola, were using it).
Diffstat (limited to 'crawl-ref/source/art-func.h')
-rw-r--r-- | crawl-ref/source/art-func.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/crawl-ref/source/art-func.h b/crawl-ref/source/art-func.h index 860223919f..c2b41efc40 100644 --- a/crawl-ref/source/art-func.h +++ b/crawl-ref/source/art-func.h @@ -978,7 +978,18 @@ static void _ARC_BLADE_melee_effects(item_def* weapon, actor* attacker, int dam) { if (!mondied && one_chance_in(3)) - cast_discharge(75 + random2avg(75, 2), false); + { + if (discharge_monsters(defender->pos(), + 75 + random2avg(75, 2), + 0, + attacker) == 0) + { + if (you.can_see(attacker)) + mpr("The arc blade crackles."); + else + mpr("You hear the crackle of electricity."); + } + } } /////////////////////////////////////////////////// |