diff options
Diffstat (limited to 'crawl-ref/source/randart.cc')
-rw-r--r-- | crawl-ref/source/randart.cc | 30 |
1 files changed, 13 insertions, 17 deletions
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; } |