summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/randart.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-20 12:24:06 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-20 12:24:06 +0000
commit9fb0ff3699fbf27f4efb1f95971202b4e6f6b552 (patch)
tree18afafadf43fe5090dce263f1a1f8bb7e3424cf9 /crawl-ref/source/randart.cc
parent30a70203bafbec37e9720b511d51d5a4144d9fa9 (diff)
downloadcrawl-ref-9fb0ff3699fbf27f4efb1f95971202b4e6f6b552.tar.gz
crawl-ref-9fb0ff3699fbf27f4efb1f95971202b4e6f6b552.zip
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
Diffstat (limited to 'crawl-ref/source/randart.cc')
-rw-r--r--crawl-ref/source/randart.cc9
1 files changed, 7 insertions, 2 deletions
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,