diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-16 16:04:02 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-16 16:04:02 +0000 |
commit | 54a744df62043fdc9eea179d42baa9b15281f346 (patch) | |
tree | 894835600610d1e189fea635ec33ecb77a2173de /crawl-ref/source/randart.cc | |
parent | 173858bc3514e1de1c406400ff9b1f2261cea836 (diff) | |
download | crawl-ref-54a744df62043fdc9eea179d42baa9b15281f346.tar.gz crawl-ref-54a744df62043fdc9eea179d42baa9b15281f346.zip |
Disallow the Staff of Wucad Mu as a Trog gift.
And another of those code cleanups.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4259 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/randart.cc')
-rw-r--r-- | crawl-ref/source/randart.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc index 635873953d..8e613cc299 100644 --- a/crawl-ref/source/randart.cc +++ b/crawl-ref/source/randart.cc @@ -200,9 +200,11 @@ static std::string replace_name_parts(const std::string name_in, which_god = god_gift; else { - do { + do + { which_god = static_cast<god_type>(random2(NUM_GODS)); - } while (!god_fits_artefact(which_god, item)); + } + while (!god_fits_artefact(which_god, item)); } name = replace_all(name, "@god_name@", god_name(which_god, false)); @@ -1672,7 +1674,8 @@ bool make_item_randart( item_def &item, bool randomise ) do { item.special = (random_int() & RANDART_SEED_MASK); - } while (randart_is_bad( item )); + } + while (randart_is_bad( item )); } return (true); |