diff options
Diffstat (limited to 'crawl-ref/source/artefact.cc')
-rw-r--r-- | crawl-ref/source/artefact.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/artefact.cc b/crawl-ref/source/artefact.cc index 007a799cfe..a8648bf4d2 100644 --- a/crawl-ref/source/artefact.cc +++ b/crawl-ref/source/artefact.cc @@ -780,7 +780,7 @@ void static _get_randart_properties(const item_def &item, proprt[ARTP_BRAND] = SPWPN_NORMAL; // XXX: Only allow reaping brand on bows. This may change. - if (atype != WPN_BOW && atype != WPN_LONGBOW + if (atype != WPN_BOW && atype != WPN_LONGBOW && proprt[ARTP_BRAND] == SPWPN_REAPING) { proprt[ARTP_BRAND] = SPWPN_NORMAL; @@ -1947,11 +1947,12 @@ bool make_item_randart( item_def &item, bool force_mundane ) god_type god_gift; (void) origin_is_god_gift(item, &god_gift); + int randart_tries = 500; do { item.special = (random_int() & RANDART_SEED_MASK); // Now that we found something, initialise the props array. - if (!_init_artefact_properties(item)) + if (--randart_tries <= 0 || !_init_artefact_properties(item)) { // Something went wrong that no amount of changing // item.special will fix. |