summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-05 16:07:07 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-05 16:07:07 +0000
commit22d0bf1834360c8c1776f96049da60aad15c14b9 (patch)
treeff751c3edafd2953c425d0e92377ce789fe1b155 /crawl-ref/source/fight.cc
parent145d7c3d25b824f6919f196e756aea250dfc405a (diff)
downloadcrawl-ref-22d0bf1834360c8c1776f96049da60aad15c14b9.tar.gz
crawl-ref-22d0bf1834360c8c1776f96049da60aad15c14b9.zip
Experimental nerf of Confusing Touch: it now does a monster magic resistance
check (against your Confusing Touch casting power at the time of hitting the monster, not at the time of casting the spell.) Balancing input sought. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1759 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 16bf66e41e..317a2e4889 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -1722,11 +1722,16 @@ bool melee_attack::apply_damage_brand()
emit_nodmg_hit_message();
- // declaring these just to pass to the enchant function
- bolt beam_temp;
- beam_temp.flavour = BEAM_CONFUSION;
-
- mons_ench_f2( def, beam_temp );
+ // FIXME Currently Confusing Touch is the *only* way to get
+ // here. Generalise.
+ const int pow = calc_spell_power(SPELL_CONFUSING_TOUCH, true, false);
+ if (!check_mons_resist_magic(def, pow))
+ {
+ // declaring these just to pass to the enchant function
+ bolt beam_temp;
+ beam_temp.flavour = BEAM_CONFUSION;
+ mons_ench_f2( def, beam_temp );
+ }
you.duration[DUR_CONFUSING_TOUCH] -= random2(20);