summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/delay.cc8
-rw-r--r--crawl-ref/source/describe.cc7
-rw-r--r--crawl-ref/source/items.cc19
3 files changed, 27 insertions, 7 deletions
diff --git a/crawl-ref/source/delay.cc b/crawl-ref/source/delay.cc
index a90afe48ca..bc9c19376b 100644
--- a/crawl-ref/source/delay.cc
+++ b/crawl-ref/source/delay.cc
@@ -1339,10 +1339,10 @@ void armour_wear_effects(const int item_slot)
item_def &arm = you.inv[item_slot];
const bool was_known = item_type_known(arm);
- if (is_random_artefact(arm))
- arm.flags |= ISFLAG_NOTED_ID;
set_ident_flags(arm, ISFLAG_EQ_ARMOUR_MASK);
+ if (is_random_artefact(arm))
+ arm.flags |= ISFLAG_NOTED_ID;
const equipment_type eq_slot = get_armour_slot(arm);
const bool melded = (arm.link == you.equip[eq_slot]);
@@ -1352,10 +1352,6 @@ void armour_wear_effects(const int item_slot)
{
if (Options.autoinscribe_randarts && is_random_artefact( arm ))
add_autoinscription( arm, randart_auto_inscription(arm));
-
- // Make a note of it.
- take_note(Note(NOTE_ID_ITEM, 0, 0, arm.name(DESC_NOCAP_A).c_str(),
- origin_desc(arm).c_str()));
}
if (!melded)
mprf("You finish putting on %s.", arm.name(DESC_NOCAP_YOUR).c_str());
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index 821000775d..5b7460b743 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -439,7 +439,12 @@ void add_autoinscription( item_def &item, std::string ainscrip)
_trim_randart_inscrip(item);
if (!item.inscription.empty())
- item.inscription += ", ";
+ {
+ if (ends_with(item.inscription, ","))
+ item.inscription += " ";
+ else
+ item.inscription += ", ";
+ }
item.inscription += ainscrip;
}
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index f92a14d34f..0e79a1af7b 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -1587,6 +1587,13 @@ int move_item_to_player( int obj, int quant_got, bool quiet )
_check_note_item(mitm[obj]);
+ const bool floor_god_gift
+ = mitm[obj].inscription.find("god gift")
+ != std::string::npos;
+ const bool inv_god_gift
+ = you.inv[m].inscription.find("god gift")
+ != std::string::npos;
+
// If the object on the ground is inscribed, but not
// the one in inventory, then the inventory object
// picks up the other's inscription.
@@ -1596,6 +1603,18 @@ int move_item_to_player( int obj, int quant_got, bool quiet )
you.inv[m].inscription = mitm[obj].inscription;
}
+ // Remove god gift inscription unless both items have it.
+ if (floor_god_gift && !inv_god_gift
+ || inv_god_gift && !floor_god_gift)
+ {
+ you.inv[m].inscription
+ = replace_all(you.inv[m].inscription,
+ "god gift, ", "");
+ you.inv[m].inscription
+ = replace_all(you.inv[m].inscription,
+ "god gift", "");
+ }
+
if (is_blood_potion(mitm[obj]))
pick_up_blood_potions_stack(mitm[obj], quant_got);