summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makeitem.cc
diff options
context:
space:
mode:
authorwheals <shm.mark@gmail.com>2014-01-07 20:03:19 -0500
committerChris Campbell <chriscampbell89@gmail.com>2014-01-12 12:36:29 +0000
commit711b1061bd840c1edcac50f83397be21d2671fe6 (patch)
tree42af8b4d4f85f2b920d39a69b41715573491cd8e /crawl-ref/source/makeitem.cc
parent13f5ae3d6da441bbd9e8551020ffe156535ab4ff (diff)
downloadcrawl-ref-711b1061bd840c1edcac50f83397be21d2671fe6.tar.gz
crawl-ref-711b1061bd840c1edcac50f83397be21d2671fe6.zip
Reweight hat brands.
3/8 MR, 1/4 SInv, 1/4 Int+3, 1/8 spirit shield. Also fix a few other things related to cap removal.
Diffstat (limited to 'crawl-ref/source/makeitem.cc')
-rw-r--r--crawl-ref/source/makeitem.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index d38c73d9a5..7c76210b90 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -2220,8 +2220,11 @@ static special_armour_type _determine_armour_ego(const item_def& item,
case ARM_HAT:
if (coinflip())
{
- rc = random_choose(SPARM_MAGIC_RESISTANCE, SPARM_INTELLIGENCE,
- SPARM_SPIRIT_SHIELD, -1);
+ rc = random_choose_weighted(3, SPARM_MAGIC_RESISTANCE,
+ 2, SPARM_INTELLIGENCE,
+ 2, SPARM_SEE_INVISIBLE,
+ 1, SPARM_SPIRIT_SHIELD,
+ 0);
}
break;
@@ -2370,7 +2373,11 @@ bool is_armour_brand_ok(int type, int brand, bool strict)
|| !strict;
case SPARM_SPIRIT_SHIELD:
- return type == ARM_HAT || slot == EQ_SHIELD || !strict;
+ return type == ARM_HAT ||
+#if TAG_MAJOR_VERSION == 34
+ type == ARM_CAP ||
+#endif
+ slot == EQ_SHIELD || !strict;
case NUM_SPECIAL_ARMOURS:
case NUM_REAL_SPECIAL_ARMOURS:
die("invalid armour brand");