summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-08-05 17:41:29 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-08-05 17:41:29 +0000
commiteb331955f2f8adeea2b360cdad1c4dc73c009fad (patch)
tree1cb0fc8001b372e207d39d223dae1457636a6376 /crawl-ref/source
parent8080c40c74b2c963470456010ba1b256f3c6f6c6 (diff)
downloadcrawl-ref-eb331955f2f8adeea2b360cdad1c4dc73c009fad.tar.gz
crawl-ref-eb331955f2f8adeea2b360cdad1c4dc73c009fad.zip
Give Sonja curare needles, and make distortion more likely (but not
guaranteed). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10491 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/makeitem.cc32
1 files changed, 22 insertions, 10 deletions
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index 9635480465..2fa2200023 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -3723,7 +3723,7 @@ static item_make_species_type _give_weapon(monsters *mon, int level,
if (!melee_only)
{
item.base_type = OBJ_WEAPONS;
- item.sub_type = WPN_BLOWGUN;
+ item.sub_type = WPN_BLOWGUN;
item_race = MAKE_ITEM_NO_RACE;
break;
}
@@ -3732,9 +3732,10 @@ static item_make_species_type _give_weapon(monsters *mon, int level,
item.base_type = OBJ_WEAPONS;
item.sub_type = coinflip() ? WPN_DAGGER : WPN_SHORT_SWORD;
set_item_ego_type(item, OBJ_WEAPONS,
- random_choose(SPWPN_VENOM, SPWPN_DRAINING,
- SPWPN_VAMPIRICISM, SPWPN_DISTORTION,
- SPWPN_NORMAL, -1));
+ random_choose_weighted(3, SPWPN_DISTORTION,
+ 2, SPWPN_VENOM,
+ 1, SPWPN_DRAINING,
+ 0));
break;
case MONS_EUSTACHIO:
@@ -3857,17 +3858,27 @@ static void _give_ammo(monsters *mon, int level,
if (xitt == MI_NEEDLE)
{
- set_item_ego_type(mitm[thing_created], OBJ_MISSILES,
- _got_curare_roll(level) ? SPMSL_CURARE
- : SPMSL_POISONED);
+ if (mon->type == MONS_SONJA)
+ {
+ set_item_ego_type(mitm[thing_created], OBJ_MISSILES,
+ SPMSL_CURARE);
+
+ mitm[thing_created].quantity = random_range(4, 10);
+ }
+ else
+ {
+ set_item_ego_type(mitm[thing_created], OBJ_MISSILES,
+ _got_curare_roll(level) ? SPMSL_CURARE
+ : SPMSL_POISONED);
- if (get_ammo_brand( mitm[thing_created] ) == SPMSL_CURARE)
- mitm[thing_created].quantity = random_range(2, 8);
+ if (get_ammo_brand( mitm[thing_created] ) == SPMSL_CURARE)
+ mitm[thing_created].quantity = random_range(2, 8);
+ }
}
else
{
// Sanity check to avoid useless brands.
- const int bow_brand = get_weapon_brand(*launcher);
+ const int bow_brand = get_weapon_brand(*launcher);
const int ammo_brand = get_ammo_brand(mitm[thing_created]);
if (ammo_brand != SPMSL_NORMAL
&& (bow_brand == SPWPN_FLAME || bow_brand == SPWPN_FROST))
@@ -4371,6 +4382,7 @@ void give_item(int mid, int level_number, bool mons_summoned)
const item_make_species_type item_race = _give_weapon(mons, level_number);
_give_ammo(mons, level_number, item_race, mons_summoned);
+
give_armour(mons, 1 + level_number / 2);
give_shield(mons, 1 + level_number / 2);
}