From 7e99e3c55edf834ceaf523b68e6d39475b4981e9 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Fri, 13 Nov 2009 17:36:31 -0800 Subject: Give giant spiked clubs a nonzero acquirement weight They're the best weapon in the game for the races that can weild them, it makes no sense to exclude them from acquirements. Also give mundane items generated by acquirement enchantments and artifact status. --- crawl-ref/source/artefact.cc | 4 ++-- crawl-ref/source/artefact.h | 2 +- crawl-ref/source/effects.cc | 9 +++++++++ crawl-ref/source/itemprop.cc | 4 ++-- crawl-ref/source/makeitem.cc | 4 ++-- 5 files changed, 16 insertions(+), 7 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/artefact.cc b/crawl-ref/source/artefact.cc index 0ac8f3ac0c..ef9f992fc0 100644 --- a/crawl-ref/source/artefact.cc +++ b/crawl-ref/source/artefact.cc @@ -1894,7 +1894,7 @@ bool randart_is_bad( const item_def &item ) return randart_is_bad( item, proprt); } -bool make_item_randart( item_def &item ) +bool make_item_randart( item_def &item, bool force_mundane ) { if (item.base_type != OBJ_WEAPONS && item.base_type != OBJ_ARMOUR @@ -1921,7 +1921,7 @@ bool make_item_randart( item_def &item ) if (item.flags & ISFLAG_UNRANDART) return (false); - if (item_is_mundane(item) && !one_chance_in(5)) + if (item_is_mundane(item) && !one_chance_in(5) && !force_mundane) return (false); ASSERT(!item.props.exists(KNOWN_PROPS_KEY)); diff --git a/crawl-ref/source/artefact.h b/crawl-ref/source/artefact.h index 0ea8a971d6..16ee0dda3d 100644 --- a/crawl-ref/source/artefact.h +++ b/crawl-ref/source/artefact.h @@ -230,7 +230,7 @@ int artefact_known_wpn_property( const item_def &item, void artefact_wpn_learn_prop( item_def &item, artefact_prop_type prop ); bool artefact_wpn_known_prop( const item_def &item, artefact_prop_type prop ); -bool make_item_randart( item_def &item ); +bool make_item_randart( item_def &item, bool force_mundane = false ); bool make_item_unrandart( item_def &item, int unrand_index ); bool randart_is_bad( const item_def &item ); diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index cd100715d9..2f23cb2309 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -2225,6 +2225,15 @@ int acquirement_create_item(object_class_type class_wanted, break; } + // These can never get egos, and mundane versions are quite common, so + // guarantee artifact status. Rarity is a bit low to compensate. + if (thing.sub_type == WPN_GIANT_CLUB + || thing.sub_type == WPN_GIANT_SPIKED_CLUB) + { + if (!one_chance_in(25)) + make_item_randart(thing, true); + } + int plusmod = random2(4); if (agent == GOD_TROG) { diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index 20acaf45aa..fd192212c5 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -211,10 +211,10 @@ static weapon_def Weapon_prop[NUM_WEAPONS] = DAMV_CRUSHING, 10 }, { WPN_GIANT_CLUB, "giant club", 20, -6, 17, 330, 10, SK_MACES_FLAILS, HANDS_TWO, SIZE_BIG, MI_NONE, false, - DAMV_CRUSHING, 0 }, + DAMV_CRUSHING, 10 }, { WPN_GIANT_SPIKED_CLUB, "giant spiked club", 22, -7, 18, 350, 10, SK_MACES_FLAILS, HANDS_TWO, SIZE_BIG, MI_NONE, false, - DAMV_PIERCING | DAM_BLUDGEON, 0 }, + DAMV_PIERCING | DAM_BLUDGEON, 10 }, // Short Blades { WPN_KNIFE, "knife", 3, 5, 10, 10, 1, diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index 645685ac06..99843c71bd 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -1689,7 +1689,7 @@ static void _generate_weapon_item(item_def& item, bool allow_uniques, } else if ((force_good || is_demonic(item) || forced_ego || x_chance_in_y(51 + item_level, 200)) - && !item_is_mundane(item)) + && (!item_is_mundane(item) || force_good)) { // Make a better item (possibly ego). if (!no_brand) @@ -2370,7 +2370,7 @@ static void _generate_armour_item(item_def& item, bool allow_uniques, } else if ((force_good || forced_ego || item.sub_type == ARM_WIZARD_HAT || x_chance_in_y(51 + item_level, 250)) - && !item_is_mundane(item)) + && (!item_is_mundane(item) || force_good)) { // Make a good item... item.plus += random2(3); -- cgit v1.2.3-54-g00ecf