summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/newgame.cc25
1 files changed, 18 insertions, 7 deletions
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index b44d441a78..7e8fb62301 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -2379,18 +2379,29 @@ static bool _choose_weapon()
for (int i = 0; i < num_choices; i++)
startwep_restrictions[i] = _weapon_restriction(startwep[i]);
- if (Options.weapon != WPN_UNKNOWN && Options.weapon != WPN_RANDOM
- && (Options.weapon != WPN_UNARMED || claws_allowed))
+ if (Options.weapon == WPN_UNARMED && claws_allowed)
{
- if (Options.weapon == WPN_UNARMED)
- you.inv[0].quantity = 0; // no weapon
- else
- you.inv[0].sub_type = Options.weapon;
-
+ you.inv[0].quantity = 0; // no weapon
ng_weapon = Options.weapon;
return (true);
}
+ if (Options.weapon != WPN_UNKNOWN && Options.weapon != WPN_RANDOM
+ && Options.weapon != WPN_UNARMED)
+ {
+ // If Options.weapon is available, then use it.
+ for (int i = 0; i < num_choices; i++)
+ {
+ if (startwep[i] == Options.weapon
+ && startwep_restrictions[i] != CC_BANNED)
+ {
+ you.inv[0].sub_type = Options.weapon;
+ ng_weapon = Options.weapon;
+ return (true);
+ }
+ }
+ }
+
int keyin = 0;
if (!Options.random_pick && Options.weapon != WPN_RANDOM)
{