diff options
-rw-r--r-- | crawl-ref/source/dat/database/randname.txt | 19 | ||||
-rw-r--r-- | crawl-ref/source/randart.cc | 30 |
2 files changed, 32 insertions, 17 deletions
diff --git a/crawl-ref/source/dat/database/randname.txt b/crawl-ref/source/dat/database/randname.txt index db5c80daf1..ebc90f9b01 100644 --- a/crawl-ref/source/dat/database/randname.txt +++ b/crawl-ref/source/dat/database/randname.txt @@ -479,6 +479,25 @@ of @politics_name_armour@ %%%% ###################################################### +# THE SHINING ONE (blessed weapons only) +###################################################### +The Shining One weapon + +w:200 +of The Shining One's @divine_esteem@ + +of @player_name@'s @valour_name@ + +w:100 +of The Shining One + +of @player_name@ + +w:100 +of @virtue_name@ + +%%%% +###################################################### # XOM weapon ###################################################### # Xom will basically allow everything diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc index 8d9ceb8f42..1f4fab9d76 100644 --- a/crawl-ref/source/randart.cc +++ b/crawl-ref/source/randart.cc @@ -1172,17 +1172,20 @@ static std::string get_artefact_type(const int type) } } -static bool pick_db_name(const int type) +static bool pick_db_name( const item_def &item ) { - switch (type) + if (is_blessed(item)) + return true; + + switch (item.base_type) { - case OBJ_WEAPONS: - case OBJ_ARMOUR: - return coinflip(); - case OBJ_JEWELLERY: - return one_chance_in(5); - default: - return 0; + case OBJ_WEAPONS: + case OBJ_ARMOUR: + return coinflip(); + case OBJ_JEWELLERY: + return one_chance_in(5); + default: + return false; } } @@ -1250,7 +1253,7 @@ std::string randart_name( const item_def &item ) return result; } - if (pick_db_name(item.base_type)) + if (pick_db_name(item)) { result += item_base_name(item) + " "; @@ -1287,13 +1290,6 @@ std::string randart_name( const item_def &item ) } } - if (is_blessed(item) && god_gift) - { - result = item_base_name(item) + " "; - std::string name = "of @player_name@"; - result += replace_name_parts(name, item); - } - return result; } |