summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/describe.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-19 11:35:34 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-19 11:35:34 +0000
commitb0b4d7e1fbb9efed46a590a0045ad270fa409305 (patch)
tree92d454732f1a9d891aa445e3346979a65e1450f7 /crawl-ref/source/describe.cc
parent811db79a78d57a056981f56879af1dcc5e3c6eea (diff)
downloadcrawl-ref-b0b4d7e1fbb9efed46a590a0045ad270fa409305.tar.gz
crawl-ref-b0b4d7e1fbb9efed46a590a0045ad270fa409305.zip
Don't add rF+/rC- to the autoinscriptions of randart rings of fire
(and vice versa for ice), since that's already what their base type does. Should the code ever be changed to allow them to get additional levels of resistance or susceptibility, the check is only done for the base stats (+1 and -1, respectively). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4362 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/describe.cc')
-rw-r--r--crawl-ref/source/describe.cc21
1 files changed, 19 insertions, 2 deletions
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 622d9a83a7..7a1bde8feb 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -226,7 +226,7 @@ static std::vector<std::string> _randart_propnames( const item_def& item )
{ "rN", RAP_NEGATIVE_ENERGY, 1 },
{ "MR", RAP_MAGIC, 2 },
- // Positive, quantative attributes
+ // Quantitative attributes
{ "AC", RAP_AC, 0 },
{ "EV", RAP_EVASION, 0 },
{ "Str", RAP_STRENGTH, 0 },
@@ -235,7 +235,7 @@ static std::vector<std::string> _randart_propnames( const item_def& item )
{ "Acc", RAP_ACCURACY, 0 },
{ "Dam", RAP_DAMAGE, 0 },
- // Positive, qualitative attributes
+ // Qualitative attributes
{ "MP", RAP_MAGICAL_POWER, 0 },
{ "SInv", RAP_EYESIGHT, 2 },
{ "Stlth", RAP_STEALTH, 2 } // handled specially
@@ -276,6 +276,23 @@ static std::vector<std::string> _randart_propnames( const item_def& item )
if (known_proprt(propanns[i].prop))
{
const int val = proprt[propanns[i].prop];
+
+ if (item.base_type == OBJ_JEWELLERY)
+ {
+ if (item.sub_type == RING_FIRE
+ && (propanns[i].prop == RAP_FIRE && val == 1
+ || propanns[i].prop == RAP_COLD && val == -1))
+ {
+ continue;
+ }
+ if (item.sub_type == RING_ICE
+ && (propanns[i].prop == RAP_COLD && val == 1
+ || propanns[i].prop == RAP_FIRE && val == -1))
+ {
+ continue;
+ }
+ }
+
std::ostringstream work;
switch ( propanns[i].spell_out )
{