summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-27 15:00:36 -0600
committerDavid Lawrence Ramsey <dolorous@users.sourceforge.net>2009-11-27 15:00:36 -0600
commit61f557c4c288f2c3131f1b4f200d9c4d39b41d5f (patch)
tree2bc48a2301519aa3ba10062c796a58019ae5512e /crawl-ref/source/item_use.cc
parent3d40a67ac3ab0c88281c527abbf5e0d8fad57e95 (diff)
downloadcrawl-ref-61f557c4c288f2c3131f1b4f200d9c4d39b41d5f.tar.gz
crawl-ref-61f557c4c288f2c3131f1b4f200d9c4d39b41d5f.zip
Add formatting fixes.
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc38
1 files changed, 28 insertions, 10 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 5570b17bc3..6642fd5d52 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -2663,7 +2663,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
case SK_SLINGS:
{
// Slings are really easy to learn because they're not
- // really all that good, and it's harder to get ammo anyways.
+ // really all that good, and it's harder to get ammo anyway.
exercise(SK_SLINGS, 1 + random2avg(3, 2));
// Sling bullets are designed for slinging and easier to aim.
@@ -2687,8 +2687,9 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
lnchDamBonus = std::min(0, lnchDamBonus);
break;
}
- // Blowguns take a _very_ steady hand; a lot of the bonus
- // comes from dexterity. (Dex bonus here as well as below).
+
+ // Blowguns take a _very_ steady hand; a lot of the bonus
+ // comes from dexterity. (Dex bonus here as well as below.)
case SK_DARTS:
baseHit -= 2;
exercise(SK_DARTS, (coinflip()? 2 : 1));
@@ -2922,6 +2923,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
if (you.can_throw_large_rocks())
baseHit = 1;
break;
+
case MI_DART:
exHitBonus = you.skills[SK_DARTS] * 2;
exHitBonus += (you.skills[SK_THROWING] * 2) / 3;
@@ -2931,6 +2933,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
// exercise skills
exercise(SK_DARTS, 1 + random2avg(3, 2));
break;
+
case MI_JAVELIN:
// Javelins use throwing skill.
exHitBonus += skill_bump(SK_THROWING);
@@ -2946,6 +2949,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
// Javelins train throwing quickly.
exercise(SK_THROWING, 1 + coinflip());
break;
+
case MI_THROWING_NET:
// Nets use throwing skill. They don't do any damage!
baseDam = 0;
@@ -3115,7 +3119,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
bow_brand == SPWPN_CHAOS || ammo_brand_known);
}
- if (ammo_brand == SPMSL_REAPING || bow_brand == SPWPN_REAPING)
+ if (bow_brand == SPWPN_REAPING || ammo_brand == SPMSL_REAPING)
{
did_god_conduct(DID_NECROMANCY, 2,
bow_brand == SPWPN_REAPING || ammo_brand_known);
@@ -3188,6 +3192,7 @@ bool thrown_object_destroyed(item_def *item, const coord_def& where,
int brand = get_ammo_brand(*item);
if (brand == SPMSL_CHAOS || brand == SPMSL_DISPERSAL)
return (true);
+
// [dshaligram] Removed influence of Throwing on ammo preservation.
// The effect is nigh impossible to perceive.
switch (item->sub_type)
@@ -3195,19 +3200,32 @@ bool thrown_object_destroyed(item_def *item, const coord_def& where,
case MI_NEEDLE:
chance = (brand == SPMSL_CURARE ? 3 : 6);
break;
+
case MI_SLING_BULLET:
- case MI_STONE: chance = 4; break;
- case MI_DART: chance = 3; break;
- case MI_ARROW: chance = 4; break;
- case MI_BOLT: chance = 4; break;
- case MI_JAVELIN: chance = 10; break;
- case MI_THROWING_NET: break; // Doesn't get destroyed by throwing.
+ case MI_STONE:
+ case MI_ARROW:
+ case MI_BOLT:
+ chance = 4;
+ break;
+
+ case MI_DART:
+ chance = 3;
+ break;
+
+ case MI_JAVELIN:
+ chance = 10;
+ break;
+
+ case MI_THROWING_NET:
+ // Doesn't get destroyed by throwing.
+ break;
case MI_LARGE_ROCK:
default:
chance = 25;
break;
}
+
if (brand == SPMSL_STEEL)
chance *= 10;
if (brand == SPMSL_FLAME)