Attached Files |
0001-Make-troves-asking-for-the-horn-of-Geryon-take-it-fr.patch [^] (3,393 bytes) 2014-12-21 07:38 [Show Content] [Hide Content]From bc698d8091fac015e8677d8a1616c29ddaaef150 Mon Sep 17 00:00:00 2001
From: Chris Oelmueller <chris.oelmueller@gmail.com>
Date: Wed, 17 Dec 2014 15:17:11 +0100
Subject: Make troves asking for the horn of Geryon take it from players
With the somewhat recent changes to the horn (0.14-a0-1887-g5c01cd8 and
0.14-a0-2885-ge2f36c2 in particular) bringing it much closer to an
ordinary item than to the like of runes of Zot, this might be better.
The implementation in-code however most certainly is not better at this
point. Perhaps somebody would like to make that a bit prettier.
---
crawl-ref/source/dat/dlua/lm_trove.lua | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/crawl-ref/source/dat/dlua/lm_trove.lua b/crawl-ref/source/dat/dlua/lm_trove.lua
index 8f8632b..6f318e6 100644
--- a/crawl-ref/source/dat/dlua/lm_trove.lua
+++ b/crawl-ref/source/dat/dlua/lm_trove.lua
@@ -82,7 +82,8 @@ function TroveMarker:fdesc_long (marker)
local toll = get_toll(self.props)
if toll.item then
- if toll.item.base_type == "miscellaneous" then
+ if (toll.item.base_type == "miscellaneous"
+ and toll.item.sub_type ~= "horn of Geryon") then
state = "This portal requires the presence of " ..
self:item_name() .. " to function."
else
@@ -104,7 +105,8 @@ end
function TroveMarker:overview_note (marker)
local toll = get_toll(self.props)
if toll.item then
- if toll.item.base_type == "miscellaneous" then
+ if (toll.item.base_type == "miscellaneous"
+ and toll.item.sub_type ~= "horn of Geryon") then
return "show " .. self:item_name(false)
else
return "give " .. self:item_name(false)
@@ -519,8 +521,9 @@ function TroveMarker:check_item_veto(marker, pname)
local item = get_toll(self.props).item
-- The message is slightly different for items that aren't actually taken by
- -- the trove (currently the horn of Geryon and the runes).
- if item.base_type == "miscellaneous" then
+ -- the trove (runes, currently).
+ if (item.base_type == "miscellaneous"
+ and item.sub_type ~= "horn of Geryon") then
if not crawl.yesno("This trove requires the presence of "
.. self:item_name() .. " to function. Show it the item"
.. self:plural() .. "?", true, "n") then
@@ -553,8 +556,9 @@ function TroveMarker:check_item_veto(marker, pname)
local acceptable_items = self:search_for_item(marker, pname, items.inventory())
if #acceptable_items == 0 then
- -- Give a different message for the horn of Geryon here, too.
- if item.base_type == "miscellaneous" then
+ -- Give a different message for items that are not taken away.
+ if (item.base_type == "miscellaneous"
+ and item.sub_type ~= "horn of Geryon") then
crawl.mpr("You don't have " .. self:item_name() .. " with you.")
else
crawl.mpr("You don't have the item" .. self:plural() ..
@@ -576,7 +580,8 @@ function TroveMarker:check_item_veto(marker, pname)
end
-- Open the portal and maybe consume the item.
- if item.base_type == "miscellaneous" then
+ if (item.base_type == "miscellaneous"
+ and item.sub_type ~= "horn of Geryon") then
crawl.mpr("The portal draws power from the presence of the item" ..
self:plural() .. " and buzzes to life!")
self:note_payed(titem, false)
--
2.2.0
|