summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/describe.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2007-12-26 18:41:48 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2007-12-26 18:41:48 +0000
commit59faa69f1d507fd20b3174de2414d4d71461a5d9 (patch)
tree2923a98a02a1fc59689f7dc98042d42c52ec7cc4 /crawl-ref/source/describe.cc
parentba06b43178984f75b804f39732570b35e7900e7e (diff)
downloadcrawl-ref-59faa69f1d507fd20b3174de2414d4d71461a5d9.tar.gz
crawl-ref-59faa69f1d507fd20b3174de2414d4d71461a5d9.zip
Remove duplicate item descriptions hardcoded in describe.cc, and move
descriptions of too-large javelins and nets into items.txt. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3111 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r--crawl-ref/source/describe.cc62
1 files changed, 10 insertions, 52 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 4b8b91fb8a..7de3811582 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -1024,46 +1024,14 @@ static std::string describe_ammo( const item_def &item )
description.reserve(64);
- switch (item.sub_type)
+ if (item.sub_type == MI_THROWING_NET && (item.plus > 1 || item.plus < 0))
{
- case MI_STONE:
- description += "A stone. It can be thrown by hand "
- "or fired with a sling. ";
- break;
- case MI_ARROW:
- description += "An arrow, to be shot with a bow. ";
- break;
- case MI_NEEDLE:
- description += "A needle. It can be fired with a blowgun. ";
- break;
- case MI_BOLT:
- description += "A crossbow bolt. ";
- break;
- case MI_DART:
- description += "A small throwing weapon. "
- "It can also be fired from a hand crossbow.";
- break;
- case MI_LARGE_ROCK:
- description += "A rock, used by giants as a missile. ";
- break;
- case MI_SLING_BULLET:
- description += "A small heavy projectile made of lead. "
- "It can be fired from a sling.";
- break;
- case MI_JAVELIN:
- description += "A long, light polearm that can be thrown by hand. ";
- if (!is_throwable(item, you.body_size()))
- description += "Unfortunately, it is too long and awkward "
- "for you to use.";
- break;
- case MI_THROWING_NET:
- description += "A throwing net as used by gladiators. ";
- if (!is_throwable(item, you.body_size()))
- description += "Unfortunately, it is too large and awkward "
- "for you to use. ";
- if (item.plus < 0)
+ std::string how;
+
+ if (item.plus > 1)
+ how = "brand-new";
+ else if (item.plus < 0)
{
- std::string how;
if (item.plus > -3)
how = "a little worn";
else if (item.plus > -5)
@@ -1072,21 +1040,11 @@ static std::string describe_ammo( const item_def &item )
how = "damaged";
else
how = "heavily frayed";
-
- description += "It looks ";
- description += how;
- description += ".";
}
- else if (item.plus > 1)
- description += "The net looks brand-new!";
- break;
- case MI_NONE: // was eggplant
- description += "A purple vegetable. "
- "The presence of this object in the game indicates a bug. ";
- break;
- default:
- DEBUGSTR("Unknown ammo type");
- break;
+
+ description += "It looks ";
+ description += how;
+ description += ".";
}
if ( has_launcher(item) )