summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/attack.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-04-28 22:31:55 -0600
committerSteve Melenchuk <smelenchuk@gmail.com>2014-04-28 22:31:55 -0600
commit05377e05db167e0930e5aed317b269b717cc08ef (patch)
tree3fabc80be4d11697d526666e0aa60ec2f63df4cd /crawl-ref/source/attack.cc
parentf0d8313a57775a19a39dd8052f3b4b27fc2aa612 (diff)
downloadcrawl-ref-05377e05db167e0930e5aed317b269b717cc08ef.tar.gz
crawl-ref-05377e05db167e0930e5aed317b269b717cc08ef.zip
Make ranged attacks play a bit nicer with fsim.
Report accuracy correctly; don't let some effects like blood splatter and distortion trigger (as with old melee attacks).
Diffstat (limited to 'crawl-ref/source/attack.cc')
-rw-r--r--crawl-ref/source/attack.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/attack.cc b/crawl-ref/source/attack.cc
index 4dff6152a8..9cad104e6f 100644
--- a/crawl-ref/source/attack.cc
+++ b/crawl-ref/source/attack.cc
@@ -60,7 +60,7 @@ attack::attack(actor *attk, actor *defn)
attacker_body_armour_penalty(0), attacker_shield_penalty(0),
attacker_armour_tohit_penalty(0), attacker_shield_tohit_penalty(0),
defender_shield(NULL), miscast_level(-1), miscast_type(SPTYP_NONE),
- miscast_target(NULL), fake_chaos_attack(false),
+ miscast_target(NULL), fake_chaos_attack(false), simu(false),
aux_source(""), kill_type(KILLED_BY_MONSTER)
{
// No effective code should execute, we'll call init_attack again from
@@ -87,7 +87,8 @@ bool attack::handle_phase_damaged()
if (defender->can_bleed()
&& !defender->is_summoned()
&& !defender->submerged()
- && in_bounds(defender->pos()))
+ && in_bounds(defender->pos())
+ && !simu)
{
int blood = modify_blood_amount(damage_done, attacker->damage_type());
if (blood > defender->stat_hp())
@@ -516,8 +517,8 @@ bool attack::distortion_affects_defender()
return false;
}
-// if (simu)
-// return false;
+ if (simu)
+ return false;
if (one_chance_in(3))
{