summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/describe.cc21
-rw-r--r--crawl-ref/source/randart.cc8
2 files changed, 27 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 )
{
diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc
index 5e87296e72..8bd5d2f35a 100644
--- a/crawl-ref/source/randart.cc
+++ b/crawl-ref/source/randart.cc
@@ -1048,22 +1048,30 @@ void randart_wpn_properties( const item_def &item,
if (aclass == OBJ_JEWELLERY
&& (atype == RING_PROTECTION_FROM_FIRE || atype == RING_FIRE
|| atype == RING_ICE))
+ {
break; // already does this or something
+ }
if (aclass == OBJ_ARMOUR
&& (atype == ARM_DRAGON_ARMOUR || atype == ARM_ICE_DRAGON_ARMOUR
|| atype == ARM_GOLD_DRAGON_ARMOUR))
+ {
break;
+ }
proprt[RAP_FIRE] = -1;
break;
case 6: // susceptible to cold
if (aclass == OBJ_JEWELLERY
&& (atype == RING_PROTECTION_FROM_COLD || atype == RING_FIRE
|| atype == RING_ICE))
+ {
break; // already does this or something
+ }
if (aclass == OBJ_ARMOUR
&& (atype == ARM_DRAGON_ARMOUR || atype == ARM_ICE_DRAGON_ARMOUR
|| atype == ARM_GOLD_DRAGON_ARMOUR))
+ {
break;
+ }
proprt[RAP_COLD] = -1;
break;
case 7: // speed metabolism