summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/art-func.h
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-03-24 22:14:04 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2014-03-24 22:15:59 -0600
commit5545dd3c9da8ca792446d5919cf671cceba4c2f0 (patch)
tree90d1b8d9f71e6e32458d56d1ce81eb0ccdad1d22 /crawl-ref/source/art-func.h
parent0c216963e85338c522b0fe3d58b008a9683de8aa (diff)
downloadcrawl-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.h13
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.");
+ }
+ }
}
///////////////////////////////////////////////////