summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-01 18:27:31 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-01 18:27:31 +0000
commit1fcb6aa13880495afd0c26e28f9c62d8d99397e0 (patch)
tree6eedc8b39d99bd5517f5e8e96966ad1c8c2e8181
parent09e315464c74857bb772aa18b63f7f1746e33e3e (diff)
downloadcrawl-ref-1fcb6aa13880495afd0c26e28f9c62d8d99397e0.tar.gz
crawl-ref-1fcb6aa13880495afd0c26e28f9c62d8d99397e0.zip
Wanderers could start with items equipped in the wrong slots, fixed.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2287 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/newgame.cc19
1 files changed, 12 insertions, 7 deletions
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index be6ac4648b..3a88d2a863 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -2472,29 +2472,34 @@ static void give_random_secondary_armour( int slot )
switch (random2(4))
{
case 0:
- you.inv[ slot ].sub_type = ARM_BOOTS;
- you.equip[EQ_BOOTS] = slot;
if (you_can_wear(EQ_BOOTS))
+ {
+ you.inv[ slot ].sub_type = ARM_BOOTS;
+ you.equip[EQ_BOOTS] = slot;
break;
+ }
// else fall through
case 1:
- you.inv[ slot ].sub_type = ARM_HELMET;
- you.equip[EQ_HELMET] = slot;
if (you_can_wear(EQ_HELMET))
+ {
+ you.inv[ slot ].sub_type = ARM_HELMET;
+ you.equip[EQ_HELMET] = slot;
break;
+ }
// else fall through
case 2:
- you.inv[ slot ].sub_type = ARM_GLOVES;
- you.equip[EQ_GLOVES] = slot;
if (you_can_wear(EQ_GLOVES))
+ {
+ you.inv[ slot ].sub_type = ARM_GLOVES;
+ you.equip[EQ_GLOVES] = slot;
break;
+ }
// else fall through
case 3: // anyone can wear this
you.inv[ slot ].sub_type = ARM_CLOAK;
you.equip[EQ_CLOAK] = slot;
break;
}
-
}
// Returns true if a "good" weapon is given