diff options
author | Chris Campbell <chriscampbell89@gmail.com> | 2014-02-09 17:39:19 +0000 |
---|---|---|
committer | Chris Campbell <chriscampbell89@gmail.com> | 2014-02-09 19:37:44 +0000 |
commit | 2b0288b017874b531edc7170ef78c41c9fceec94 (patch) | |
tree | 2843344ad1094f8ee2b8289bfb07fcb89f902070 /crawl-ref/source/effects.cc | |
parent | 2294cc43dd8b4ea7e92c0ebc61ceb1f27b411394 (diff) | |
download | crawl-ref-2b0288b017874b531edc7170ef78c41c9fceec94.tar.gz crawl-ref-2b0288b017874b531edc7170ef78c41c9fceec94.zip |
Don't arc electricity when attacking with an elec weapon in water
The main thing it did was cause annoying prompts when you could hit
yourself or an ally with the arc. It was rarely relevant other than that,
and just made elec brand a bit more complicated unnecessarily.
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r-- | crawl-ref/source/effects.cc | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 4d9c90c55b..cf0ac150eb 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -337,62 +337,6 @@ int torment(actor *attacker, int taux, const coord_def& where) return r; } -static bool _conduct_electricity_affects_actor(const bolt& beam, - const actor* victim) -{ - return victim->alive() && victim->res_elec() <= 0 - && victim->ground_level(); -} - -static bool _conduct_electricity_damage(bolt &beam, actor* victim, - int &dmg, string &dmg_msg) -{ - dmg = (10 + random2(15)) / 2; - return false; -} - -static bool _conduct_electricity_aoe(bolt& beam, const coord_def& target) -{ - if (feat_is_water(grd(target))) - return true; - - return false; -} - -void conduct_electricity(coord_def where, actor *attacker) -{ - bolt beam; - - beam.flavour = BEAM_ELECTRICITY; - beam.glyph = dchar_glyph(DCHAR_FIRED_BURST); - beam.damage = dice_def(1, 15); - beam.target = where; - beam.name = "electric current"; - beam.hit_verb = "shocks"; - beam.colour = ETC_ELECTRICITY; - beam.aux_source = "arcing electricity"; - beam.ex_size = 1; - beam.is_explosion = true; - beam.effect_known = true; - beam.affects_items = false; - beam.aoe_funcs.push_back(_conduct_electricity_aoe); - beam.damage_funcs.push_back(_conduct_electricity_damage); - beam.affect_func = _conduct_electricity_affects_actor; - - if (attacker && attacker->is_player()) - { - beam.thrower = KILL_YOU; - beam.beam_source = NON_MONSTER; - } - else - { - beam.thrower = KILL_MON; - beam.beam_source = attacker ? attacker->mindex() : MHITNOT; - } - - beam.explode(false, true); -} - void cleansing_flame(int pow, int caster, coord_def where, actor *attacker) { |