summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2007-12-17 18:06:30 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2007-12-17 18:06:30 +0000
commitbba53aa20f744f794b7cb43f9e37e49c1f70ad95 (patch)
tree25aa3527cd0b3220cecf2d76625dce7037e55a30
parent11c39299bac0186d5bbcc538e316d78605778893 (diff)
downloadcrawl-ref-bba53aa20f744f794b7cb43f9e37e49c1f70ad95.tar.gz
crawl-ref-bba53aa20f744f794b7cb43f9e37e49c1f70ad95.zip
Fix another problem related to [1831343]. Kobolds and big kobolds now
get their darts in give_ammo() instead of give_weapon(). One side effect of fixing this is that it is now possible for kobolds and big kobolds to get both a melee weapon and darts. Since both darts and the melee weapons that kobolds and big kobolds can get are relatively weak, I also think this is okay for now. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3087 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/makeitem.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index 3dd64606e3..f5b77c8b68 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -2996,13 +2996,6 @@ static item_make_species_type give_weapon(monsters *mon, int level,
(temp_rand > 0) ? WPN_SHORT_SWORD // 40%
: WPN_CLUB); // 20%
}
- else if (random2(5) < 2) // give darts
- {
- item_race = MAKE_ITEM_NO_RACE;
- item.base_type = OBJ_MISSILES;
- item.sub_type = MI_DART;
- iquan = 1 + random2(5);
- }
else
return (item_race);
break;
@@ -3666,6 +3659,17 @@ static void give_ammo(monsters *mon, int level,
int qty = 0;
switch (mon->type)
{
+ case MONS_KOBOLD:
+ case MONS_BIG_KOBOLD:
+ if (random2(5) < 2)
+ {
+ item_race = MAKE_ITEM_NO_RACE;
+ weap_class = OBJ_MISSILES;
+ weap_type = MI_DART;
+ qty = 1 + random2(5);
+ }
+ break;
+
case MONS_ORC_WARRIOR:
if (one_chance_in(
you.where_are_you == BRANCH_ORCISH_MINES? 9 : 20))