summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makeitem.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-07 14:23:40 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-07 14:23:40 +0000
commitccb9171b5884a80787b98b1845f5a8e8e6275165 (patch)
treed1bbb778a06886d85d6a155b4b7aef750f04e5aa /crawl-ref/source/makeitem.cc
parentbdc37d28a47c51a60bf740ae42b8cbd4ea4398ee (diff)
downloadcrawl-ref-ccb9171b5884a80787b98b1845f5a8e8e6275165.tar.gz
crawl-ref-ccb9171b5884a80787b98b1845f5a8e8e6275165.zip
Fix potions of decay created by mummy curse sometimes being inscribed.
Change inscription prompt to work as intended by David, after all. :) Make manuals use a reading counter (plus2) that is initialized with 3 + random2(15). Once it reaches 0, the manual crumbles to dust. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6443 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/makeitem.cc')
-rw-r--r--crawl-ref/source/makeitem.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index d9a177a2e7..9897f63201 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -2453,7 +2453,7 @@ static void _generate_book_item(item_def& item, int force_type,
if (one_chance_in(10))
item.special += random2(8) * 10;
- if ( force_type != OBJ_RANDOM )
+ if (force_type != OBJ_RANDOM)
item.sub_type = force_type;
else
{
@@ -2500,6 +2500,8 @@ static void _generate_book_item(item_def& item, int force_type,
if (item.plus == SK_UNUSED_1)
item.plus = SK_UNARMED_COMBAT;
}
+ // Set number of reads possible before it "crumbles to dust".
+ item.plus2 = 3 + random2(15);
}
}
@@ -2895,8 +2897,7 @@ static bool _weapon_is_visibly_special(const item_def &item)
return (true);
if ((item.plus || item.plus2)
- && (one_chance_in(3)
- || get_equip_race(item) && one_chance_in(7)))
+ && (one_chance_in(3) || get_equip_race(item) && one_chance_in(7)))
{
return (true);
}
@@ -3458,9 +3459,7 @@ static item_make_species_type _give_weapon(monsters *mon, int level,
set_item_ego_type( item, OBJ_WEAPONS, SPWPN_HOLY_WRATH );
}
else
- {
item.sub_type = WPN_LONG_SWORD;
- }
item.plus = 1 + random2(3);
item.plus2 = 1 + random2(3);