summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-24 09:39:19 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-24 09:39:19 +0000
commit89c4ddb91d7daef57c274e73747e3e3a82ea278b (patch)
treec464170eeee9c12c2d6b7c76cf5a0636737a826d /crawl-ref
parent88f39158b03ace701eaa40a65004a754416b93ae (diff)
downloadcrawl-ref-89c4ddb91d7daef57c274e73747e3e3a82ea278b.tar.gz
crawl-ref-89c4ddb91d7daef57c274e73747e3e3a82ea278b.zip
[1818732] Merfolk hunters start with a knife.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2533 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/newgame.cc20
1 files changed, 18 insertions, 2 deletions
diff --git a/crawl-ref/source/newgame.cc b/crawl-ref/source/newgame.cc
index 4de80c5991..d1f9adb491 100644
--- a/crawl-ref/source/newgame.cc
+++ b/crawl-ref/source/newgame.cc
@@ -2535,6 +2535,19 @@ static void newgame_make_item(int slot, equipment_type eqslot,
int sub_type, int qty = 1,
int plus = 0, int plus2 = 0)
{
+ if (slot == -1)
+ {
+ for (int i = 0; i < ENDOFPACK; ++i)
+ {
+ if (!is_valid_item(you.inv[i]))
+ {
+ slot = i;
+ break;
+ }
+ }
+ ASSERT(slot != -1);
+ }
+
item_def &item(you.inv[slot]);
item.base_type = base;
item.sub_type = sub_type;
@@ -3868,9 +3881,9 @@ bool give_items_skills()
}
if (you.species == SP_MERFOLK)
- // Merfolk are spear hunters -- clobber bow, give six javelins
- // possibly allow choice between javelin and net
{
+ // Merfolk are spear hunters -- clobber bow, give six javelins
+ // possibly allow choice between javelin and net
you.inv[1] = you.inv[2];
you.equip[EQ_BODY_ARMOUR] = 1;
newgame_make_item(2, EQ_NONE, OBJ_MISSILES, MI_JAVELIN, 6);
@@ -3925,6 +3938,9 @@ bool give_items_skills()
you.skills[SK_POLEARMS] = 2;
you.skills[SK_DODGING] = 2;
you.skills[SK_THROWING] += 3;
+
+ // And a hunting knife.
+ newgame_make_item(-1, EQ_NONE, OBJ_WEAPONS, WPN_KNIFE);
break;
default: