diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-04 17:24:52 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-04 17:24:52 +0000 |
commit | cdab703a671fabd21a015d23a5dc8a3ed5e10b36 (patch) | |
tree | 8fb64601c35b90df902bddf7f3bb63db807a393e /crawl-ref/source/item_use.cc | |
parent | ba7c629689d1042cf8cb4d94de535025154bc0ea (diff) | |
download | crawl-ref-cdab703a671fabd21a015d23a5dc8a3ed5e10b36.tar.gz crawl-ref-cdab703a671fabd21a015d23a5dc8a3ed5e10b36.zip |
Allow racial javelins. Javelins can now be elven and orcish, since
dwarves don't make polearms, and are made so 25% of the time, the same
as for spears. Since they have no associated launcher, the usual
bonuses for throwing racial gear apply to them, in spite of their being
missiles thrown by hand. Also, disable branded javelins for now, as
branding for thrown missiles in general isn't implemented.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2997 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 5fbaf7423c..98f9377224 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -2079,7 +2079,8 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, // all weapons that use 'throwing' go here.. if (wepClass == OBJ_WEAPONS || (wepClass == OBJ_MISSILES - && (wepType == MI_STONE || wepType == MI_LARGE_ROCK))) + && (wepType == MI_STONE || wepType == MI_LARGE_ROCK + || wepType == MI_JAVELIN))) { // elves with elven weapons if (get_equip_race(item) == ISFLAG_ELVEN @@ -2106,6 +2107,17 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, break; } } + else if (wepClass == OBJ_MISSILES) + { + switch (wepType) + { + case MI_JAVELIN: + baseHit += 1; + break; + default: + break; + } + } exHitBonus = you.skills[SK_THROWING] * 2; @@ -2152,8 +2164,6 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, break; case MI_JAVELIN: // Javelins use throwing skill. - baseHit = 1; - baseDam = property( item, PWPN_DAMAGE ); exHitBonus += skill_bump(SK_THROWING); exDamBonus += you.skills[SK_THROWING] * 3 / 5; |