Description |
When acid corrodes armour, the resulting message is misleading.
If you are wearing +2 gloves and are hit, the message is:
"The acid corrodes your +1 pair of gloves!"
The text implies the gloves were +1 and now no longer are, which is not the case.
The simplest change, rather than pre-generate the sentence or re-order the acid application would be to alter the sentence:
"The corrosion reduces your armour to a +1 pair of gloves."
While it is longer, the sentence is properly informative. I removed mention of "acid" as the prior sentence usually refers directly to acid, making its mention redundant. |
Attached Files |
fix_0007097.patch [^] (1,457 bytes) 2013-07-17 19:59 [Show Content] [Hide Content]From f5c82364aac23ff2622dda4b396f35d3d72a3fb1 Mon Sep 17 00:00:00 2001
From: Captain Haddock <slade118118+dcss@gmail.com>
Date: Wed, 17 Jul 2013 18:50:08 +0100
Subject: [PATCH] Changes the corrosion message to give the previous state of
the corroded item too.
For example, "The acid corrodes your +0 robe" is now "The acid corrodes your +1 robe into a +0 robe"
Previously the corrosion message was misleading because it implied the +0 was old state, rather than the new state.
To remove this ambiguity, both the old and current state are displayed in the notification.
---
crawl-ref/source/items.cc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 60dedd4..82d0f1e 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -4136,6 +4136,8 @@ void corrode_item(item_def &item, actor *holder)
how_rusty--;
+ const string old_descr = string(item.name(DESC_YOUR));
+
if (item.base_type == OBJ_WEAPONS)
item.plus2 = how_rusty;
else
@@ -4143,7 +4145,9 @@ void corrode_item(item_def &item, actor *holder)
if (holder && holder->is_player())
{
- mprf("The acid corrodes %s!", item.name(DESC_YOUR).c_str());
+ mprf("The acid corrodes %s into %s!",
+ old_descr.c_str(),
+ item.name(DESC_A).c_str());
xom_is_stimulated(50);
if (item.base_type == OBJ_ARMOUR)
--
1.8.3.3
correct_fix_0007097.patch [^] (1,361 bytes) 2013-07-17 21:13 [Show Content] [Hide Content]From 80342ed0f994c4e0b8578101b0af31d7d5c33e85 Mon Sep 17 00:00:00 2001
From: Captain Haddock <slade1118118+dcss@gmail.com>
Date: Wed, 17 Jul 2013 20:04:54 +0100
Subject: [PATCH] Corrosion msg now uses correct enchantment level
The corrosion message displays current enchantment level rather than old
enchantment level.
e.g When a jelly corrodes your +1 robe to a +0 robe, you see
"The acid corrodes your +1 robe" instead of "The acid corrodes your +0"
---
crawl-ref/source/items.cc | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 60dedd4..c5bee99 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -4134,13 +4134,6 @@ void corrode_item(item_def &item, actor *holder)
return;
}
- how_rusty--;
-
- if (item.base_type == OBJ_WEAPONS)
- item.plus2 = how_rusty;
- else
- item.plus = how_rusty;
-
if (holder && holder->is_player())
{
mprf("The acid corrodes %s!", item.name(DESC_YOUR).c_str());
@@ -4166,4 +4159,11 @@ void corrode_item(item_def &item, actor *holder)
item.name(DESC_PLAIN).c_str());
}
}
+
+ how_rusty--;
+
+ if (item.base_type == OBJ_WEAPONS)
+ item.plus2 = how_rusty;
+ else
+ item.plus = how_rusty;
}
1.8.3.3
|