diff options
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/describe.cc | 31 | ||||
-rw-r--r-- | crawl-ref/source/item_use.cc | 9 |
2 files changed, 25 insertions, 15 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 4894e4d5d5..15912b4f37 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -1060,34 +1060,45 @@ static std::string describe_ammo( const item_def &item ) if (get_equip_race(item) != ISFLAG_NO_RACE) { + bool can_launch = has_launcher(item); + bool can_throw = is_throwable(item); + description += "$"; if (need_new_line) description += "$"; - if ( has_launcher(item) ) - { - description += "It is more effective in conjunction with "; - description += racial_description_string(item); - description += "launchers."; - } - else + if (can_throw) { switch ( get_equip_race(item) ) { case ISFLAG_DWARVEN: description += - "It is most deadly when thrown by dwarves."; + "It is more deadly when thrown by dwarves"; break; case ISFLAG_ELVEN: description += - "It is most deadly when thrown by elves."; + "It is more deadly when thrown by elves"; break; case ISFLAG_ORCISH: description += - "It is most deadly when thrown by orcs."; + "It is more deadly when thrown by orcs"; break; } } + + if (can_throw && !can_launch) + description += "."; + else if (!can_throw && can_launch) + description += "It "; + else if (can_throw && can_launch) + description += ", and it "; + + if (can_launch) + { + description += "is more effective in conjunction with "; + description += racial_description_string(item); + description += "launchers."; + } } return (description); } diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 98e5d90162..cd897e8cb3 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -2294,7 +2294,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, if (wepClass == OBJ_WEAPONS || (wepClass == OBJ_MISSILES && (wepType == MI_STONE || wepType == MI_LARGE_ROCK - || wepType == MI_JAVELIN))) + || wepType == MI_DART || wepType == MI_JAVELIN))) { // elves with elven weapons if (get_equip_race(item) == ISFLAG_ELVEN @@ -2327,6 +2327,9 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, { switch (wepType) { + case MI_DART: + baseHit += 2; + break; case MI_JAVELIN: baseHit += 1; break; @@ -2366,10 +2369,6 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus, baseHit = 1; break; case MI_DART: - // give an appropriate 'tohit' & damage - baseHit = 2; - baseDam = property( item, PWPN_DAMAGE ); - exHitBonus = you.skills[SK_DARTS] * 2; exHitBonus += (you.skills[SK_THROWING] * 2) / 3; exDamBonus = you.skills[SK_DARTS] / 3; |