From 6ad2ff13db0746d82faad381d54127e6c8958190 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Tue, 3 Jul 2007 18:45:58 +0000 Subject: Fixed debug fight simulator. Dialed javelin base damage down a notch. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1733 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/item_use.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/item_use.cc') diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index b2877bda6c..febacf4c5a 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -1394,7 +1394,7 @@ static int dex_adjust_thrown_tohit(int hit) // // Return value is only relevant if dummy_target is non-NULL, and returns // true if dummy_target is hit. -bool throw_it(struct bolt &pbolt, int throw_2, bool teleport, int acc_bonus) +bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus) { struct dist thr; char shoot_skill = 0; @@ -2030,7 +2030,8 @@ bool throw_it(struct bolt &pbolt, int throw_2, bool teleport, int acc_bonus) } // Add in bonus (only from Portaled Projectile for now) - pbolt.hit += acc_bonus; + if (acc_bonus != DEBUG_COOKIE) + pbolt.hit += acc_bonus; scale_dice( pbolt.damage ); @@ -2060,7 +2061,8 @@ bool throw_it(struct bolt &pbolt, int throw_2, bool teleport, int acc_bonus) { // Violating encapsulation somewhat...oh well. hit = (affect( pbolt, pbolt.target_x, pbolt.target_y ) != 0); - beam_drop_object( pbolt, &item, pbolt.target_x, pbolt.target_y ); + if (acc_bonus != DEBUG_COOKIE) + beam_drop_object( pbolt, &item, pbolt.target_x, pbolt.target_y ); } else { -- cgit v1.2.3-54-g00ecf