From 9fb0ff3699fbf27f4efb1f95971202b4e6f6b552 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Sun, 20 Apr 2008 12:24:06 +0000 Subject: Allow true randarts to occasionally recurse themselves. If the curse property is chosen, there's a 33% chance of allowing recursing with equal chances for values = [1..5]. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4407 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/randart.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/randart.cc') diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc index 5a0309c1b0..63ceabbeac 100644 --- a/crawl-ref/source/randart.cc +++ b/crawl-ref/source/randart.cc @@ -51,7 +51,7 @@ static bool _god_fits_artefact(const god_type which_god, const item_def &item) return (false); else if (is_good_god(which_god) && (brand == SPWPN_DRAINING || brand == SPWPN_PAIN || brand == SPWPN_VAMPIRICISM) - || randart_wpn_property( item, RAP_CURSED )) + || randart_wpn_property( item, RAP_CURSED ) != 0) { return (false); } @@ -1122,7 +1122,12 @@ void randart_wpn_properties( const item_def &item, power_level += randart_add_one_property(item, proprt); if ((power_level < 2 && one_chance_in(5)) || one_chance_in(30)) - proprt[RAP_CURSED] = 1; + { + if (one_chance_in(4)) + proprt[RAP_CURSED] = 1 + random2(5); + else + proprt[RAP_CURSED] = -1; + } } void randart_wpn_properties( const item_def &item, -- cgit v1.2.3-54-g00ecf