summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-27 11:02:30 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-27 11:02:30 +0000
commit9af67278ee0f7e7e2d6a030fe55372408691d70e (patch)
tree45c3a6cc52b8096bced5f2f71ab605be70480d82 /crawl-ref/source
parentcfc594a6e4f1779b6bdc1eb649c5a399ad4a399d (diff)
downloadcrawl-ref-9af67278ee0f7e7e2d6a030fe55372408691d70e.tar.gz
crawl-ref-9af67278ee0f7e7e2d6a030fe55372408691d70e.zip
[2538766]: grammar when getting wield warnings on artefacts.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8813 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/itemname.cc5
-rw-r--r--crawl-ref/source/skills2.cc12
2 files changed, 12 insertions, 5 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index 354c8b54f5..b6cbb48e9d 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -90,9 +90,6 @@ std::string item_def::name(description_level_type descrip,
if (descrip == DESC_NONE)
return ("");
- const bool is_artefact = (is_fixed_artefact( *this )
- || (is_random_artefact( *this )));
-
std::ostringstream buff;
const std::string auxname = this->name_aux(descrip, terse, ident,
@@ -151,7 +148,7 @@ std::string item_def::name(description_level_type descrip,
|| (ident || item_type_known( *this ))
&& (this->base_type == OBJ_MISCELLANY
&& this->sub_type == MISC_HORN_OF_GERYON
- || is_artefact))
+ || is_artefact(*this)))
{
// Artefacts always get "the" unless we just want the plain name.
switch (descrip)
diff --git a/crawl-ref/source/skills2.cc b/crawl-ref/source/skills2.cc
index df8a11a05e..43e2be7226 100644
--- a/crawl-ref/source/skills2.cc
+++ b/crawl-ref/source/skills2.cc
@@ -2253,7 +2253,17 @@ void wield_warning(bool newWeapon)
if (effective_stat_bonus() > -4)
return;
- std::string msg = (newWeapon ? "this " : "your ") + wep.name(DESC_BASENAME);
+ std::string msg;
+
+ // We know if it's an artefact because we just wielded
+ // it, so no information leak.
+ if (is_artefact(wep))
+ msg = "the";
+ else if (newWeapon)
+ msg = "this";
+ else
+ msg = "your";
+ msg += " " + wep.name(DESC_BASENAME);
const char* mstr = msg.c_str();
if (you.strength < you.dex)