Attached Files |
necklace_crash.png [^] (86,603 bytes) 2015-02-21 12:03
9497-macabre-finger.patch [^] (3,794 bytes) 2015-03-03 19:11 [Show Content] [Hide Content]From d5d8d7186d4da499604ed79c34744ef360ae376d Mon Sep 17 00:00:00 2001
From: "Edgar A. Bering IV" <trizor@gmail.com>
Date: Mon, 2 Mar 2015 21:33:39 -0600
Subject: [PATCH 1/2] Removing the macabre finger with a ring on it is no
longer super fast
Previous code would call remove_ring which should not be called recursively,
as it adjusts you.time_taken every time it is called. Now we fail (loudly)
if a player tries to remove the necklace while it has a ring on it. This
is less elegant interface-wise, but doing the right thing otherwise would
be a larger refactor.
---
crawl-ref/source/item_use.cc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 9bcb83b..ecafdcd 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -1548,8 +1548,7 @@ bool remove_ring(int slot, bool announce)
return false;
}
else if (hand_used == EQ_AMULET
- && you.equip[EQ_RING_AMULET] != -1
- && !remove_ring(you.equip[EQ_RING_AMULET], announce))
+ && you.equip[EQ_RING_AMULET] != -1)
{
// This can be removed in the future if more ring amulets are added.
ASSERT(player_equip_unrand(UNRAND_FINGER_AMULET));
--
1.9.3 (Apple Git-50)
From 29ea15be306f3f810b1e06cc4bc691509831d8c6 Mon Sep 17 00:00:00 2001
From: "Edgar A. Bering IV" <trizor@gmail.com>
Date: Mon, 2 Mar 2015 21:20:21 -0600
Subject: [PATCH 2/2] The macabre finger can dig in your pockets even when you
can't.
This fixes 9497, probably other weird things that happened with the
macabre finger and forms that meld rings but not ammulets. Specifically:
- No longer meld a ring on the amulet when melding only rings
- Permit switching rings on the end of the amulet when in such a transform.
This is a tiny buff to the amulet's interaction with some specific forms.
I'm tempted to ammend this with some updated flavour text for the amulet
suggesting just how creepy the described behavior is.
---
crawl-ref/source/item_use.cc | 5 +++--
crawl-ref/source/transform.cc | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index ecafdcd..b367385 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -1307,6 +1307,7 @@ static equipment_type _choose_ring_slot()
static bool _puton_item(int item_slot, bool prompt_slot)
{
item_def& item = you.inv[item_slot];
+ const bool is_amulet = jewellery_is_amulet(item);
for (int eq = EQ_LEFT_RING; eq < NUM_EQUIP; eq++)
if (item_slot == you.equip[eq])
@@ -1333,14 +1334,14 @@ static bool _puton_item(int item_slot, bool prompt_slot)
return false;
}
- if (!you_tran_can_wear(item))
+ if (!you_tran_can_wear(item)
+ && (is_amulet || !you_can_wear(EQ_RING_AMULET)))
{
mpr("You can't wear that in your present form.");
return false;
}
const vector<equipment_type> ring_types = _current_ring_types();
- const bool is_amulet = jewellery_is_amulet(item);
if (!is_amulet) // i.e. it's a ring
{
diff --git a/crawl-ref/source/transform.cc b/crawl-ref/source/transform.cc
index 09318cd..36527af 100644
--- a/crawl-ref/source/transform.cc
+++ b/crawl-ref/source/transform.cc
@@ -1237,7 +1237,8 @@ _init_equipment_removal(transformation_type form)
const item_def *pitem = you.slot_item(eq, true);
if (pitem && (get_form(form)->blocked_slots & SLOTF(i)
- || !get_form(form)->can_wear_item(*pitem)))
+ || (i != EQ_RING_AMULET
+ && !get_form(form)->can_wear_item(*pitem))))
{
result.insert(eq);
}
--
1.9.3 (Apple Git-50)
|