summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/describe.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-09 18:01:38 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-09 18:01:38 +0000
commitd108ecc79d0f633f43e6fa5f28f3f94c3d35adfd (patch)
tree92f16f898c3a0d8fb9a32c644a04673fb1ba0b79 /crawl-ref/source/describe.cc
parent575e3d6f27c6a06626479dd652a087a522ad008c (diff)
downloadcrawl-ref-d108ecc79d0f633f43e6fa5f28f3f94c3d35adfd.tar.gz
crawl-ref-d108ecc79d0f633f43e6fa5f28f3f94c3d35adfd.zip
Apply racial bonuses to *thrown* racial darts, so that the racial type
means something. Since only elves make hand crossbows, only they get any bonus from launched darts anyway. Tweak ammo descriptions accordingly. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3556 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r--crawl-ref/source/describe.cc31
1 files changed, 21 insertions, 10 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);
}