summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemprop.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-11-03 13:11:56 +0100
committerAdam Borowski <kilobyte@angband.pl>2009-11-03 14:02:48 +0100
commit7f8b6d85697774a182b3f40aca21e2286d5c32a3 (patch)
treebbd3e53fc328deb225a66fb3ae3008f3d261c918 /crawl-ref/source/itemprop.cc
parent120d0bec40c60b6a6080d4d8c3656896087c997d (diff)
downloadcrawl-ref-7f8b6d85697774a182b3f40aca21e2286d5c32a3.tar.gz
crawl-ref-7f8b6d85697774a182b3f40aca21e2286d5c32a3.zip
Cosmetic desc of gloves: 50% of them will be "gauntlets", 0% "bracers".
Diffstat (limited to 'crawl-ref/source/itemprop.cc')
-rw-r--r--crawl-ref/source/itemprop.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index eebf239bb2..eed9ac927d 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -893,6 +893,20 @@ void set_helmet_random_desc( item_def &item )
item.plus2 = random2(THELM_DESC_MAX_SOFT + 1);
}
+short get_gloves_desc( const item_def &item )
+{
+ ASSERT( item.base_type == OBJ_ARMOUR && item.sub_type == ARM_GLOVES );
+
+ return item.plus2;
+}
+
+void set_gloves_random_desc( item_def &item )
+{
+ ASSERT( item.base_type == OBJ_ARMOUR && item.sub_type == ARM_GLOVES );
+
+ item.plus2 = coinflip() ? TGLOV_DESC_GLOVES : TGLOV_DESC_GAUNTLETS;
+}
+
//
// Ego item functions:
//