Heart of the Sandworm Queen remains in character's inventory after corruption.
Actual result.
The corrupted heart appears in character's inventory along with its normal version.
Expected result.
Only corrupted heart in character's inventory after corruption.
Steps to reproduce.
N/A.
Game version.
1.5.9 for windows from ToME site.
Comment.
There was only one heart obtained after defeating the Queen. After auto-explore the character was somewhere around position "1". Grand Corruptor was in "2". Actions were something like: Noggin Knocker -> Kill Shot -> Grand Corruptor moves to "3" -> Kneecapper (pinned) -> Swift Shot and normal shots until he fell in "3" (I don't think he used any spell before dying). After resting the character moves to "3" to pick up the loot. A message appeared about Scorpion's Tail and a dialog about corruption (accepted corruption). In character's inventory there were two hearts: 1 corrupted, 1 normal. Then auto-explore moved the character to "2" and another dialog about corruption appeared (accepted corruption).
Before I get there again I can only speculate about what happened. Maybe because the red circle tile "3" was occupied by an item (Scorpion's Tail) or lore window that appeared after picking that item up prevented the game from removing the normal heart correctly.
Edit. Some new info. It works for any item you auto pick up. You lose one item instead of the normal heart. After more testing it appears that the game stores the position of the heart when you step on the tile. Any item that can be auto picked up gets added to the inventory. This can change (and in most cases it does) the position of the heart in the inventory. Only then you get a chance to select corruption (the heart's inventory position the game obtained before doesn't update) and it'll remove whatever item happens to be in the position previously occupied by the heart. Probably an update of the inventory position of the heart can help. Needs more testing.
..\data\zones\mark-spellblaze\grids.lua
Code: Select all
newEntity{ base = "ALTAR",
define_as = "ALTAR_CORRUPT",
on_move = function(self, x, y, who)
if not who.player then return end
local o, item, inven = who:findInAllInventoriesBy("define_as", "SANDQUEEN_HEART")
if not o then return end
require("engine.ui.Dialog"):yesnoPopup("Heart of the Sandworm Queen", "The altar seems to react to the heart. You feel you could corrupt it here.", function(ret)
if ret then return end
local o = game.zone:makeEntityByName(game.level, "object", "CORRUPTED_SANDQUEEN_HEART", true)
if o then
--!Update the heart's position.
local empty, item, inven = who:findInAllInventoriesBy("define_as", "SANDQUEEN_HEART")
who:removeObject(inven, item, true)
o:identify(true)
who:addObject(who.INVEN_INVEN, o)
who:sortInven(who.INVEN_INVEN)
game.log("#GREEN#You put the heart on the altar. The heart shrivels and shakes, vibrating with new corrupt forces.")
end
end, "Cancel", "Corrupt", nil, true)
end,
}