diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-16 17:12:00 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-04-16 17:12:00 +0000 |
commit | fc2d149b397d8efe4077001a160799d01e1d3fe9 (patch) | |
tree | 82ee9874dd57ad8deafcd042dfb7deb1973f7bfa /crawl-ref/source/randart.cc | |
parent | 54a744df62043fdc9eea179d42baa9b15281f346 (diff) | |
download | crawl-ref-fc2d149b397d8efe4077001a160799d01e1d3fe9.tar.gz crawl-ref-fc2d149b397d8efe4077001a160799d01e1d3fe9.zip |
Clean up TSO's weapon blessing, and give all blessed weapons the title
"of [player name]". The randartization isn't working as expected, so,
until it can be fixed, give the blessed blades random properties for
now, just like other artefacts.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4260 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/randart.cc')
-rw-r--r-- | crawl-ref/source/randart.cc | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc index 8e613cc299..57927f6863 100644 --- a/crawl-ref/source/randart.cc +++ b/crawl-ref/source/randart.cc @@ -1237,7 +1237,14 @@ std::string randart_name( const item_def &item ) if (pick_db_name(item.base_type)) { result += item_base_name(item) + " "; - std::string name = getRandNameString(lookup); + + std::string name; + + // special case for blessed artefact weapons, since they're unique + if (is_blessed(item)) + name = "of @player_name@"; + else + name = getRandNameString(lookup); if (name.empty() && god_gift) // if nothing found, try god name alone { @@ -1645,7 +1652,7 @@ bool randart_is_bad( const item_def &item ) return randart_is_bad( item, proprt); } -bool make_item_randart( item_def &item, bool randomise ) +bool make_item_randart( item_def &item ) { if (item.base_type != OBJ_WEAPONS && item.base_type != OBJ_ARMOUR @@ -1669,14 +1676,11 @@ bool make_item_randart( item_def &item, bool randomise ) item.flags |= ISFLAG_RANDART; - if (randomise) + do { - do - { - item.special = (random_int() & RANDART_SEED_MASK); - } - while (randart_is_bad( item )); + item.special = (random_int() & RANDART_SEED_MASK); } + while (randart_is_bad( item )); return (true); } |