ToME: the Tales of Maj'Eyal
http://forums.te4.org/

[ToME 1.5.9] Normal heart remains after corruption.
http://forums.te4.org/viewtopic.php?f=42&t=49017
Page 1 of 1

Author:  BugReporter [ Thu Jun 07, 2018 5:51 pm ]
Post subject:  [ToME 1.5.9] Normal heart remains after corruption.

Short description.
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:
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,
}


Attachments:
mark_placement.jpg
mark_placement.jpg [ 94.03 KiB | Viewed 983 times ]
double_heart.jpg
double_heart.jpg [ 27.12 KiB | Viewed 983 times ]

Author:  Achievement:BugFound [ Sat Aug 03, 2019 11:27 pm ]
Post subject:  Re: [ToME 1.5.9] Normal heart remains after corruption.

I was able to get this bug too (in a different, actually older, version).

Here is what happened.

I used Rush from a distance away on the Grand Corruptor. I stopped exactly on the Altar (I guess).
He immediately used Fearscape. The dialogue for "do you wish to corrupt" came up. I chose yes.
However, the dialogue message about "You put the heart on the altar" did *not* appear.

I defeated him, auto-picked up items (as per the original post), and then re-stepped on the Altar.
I don't remember exactly, but the Message Log now has two messages for "You put the heart on the altar" at this point
(I likely stepped on it twice, the second time after consuming the first heart).

Author:  HousePet [ Sun Aug 04, 2019 1:07 am ]
Post subject:  Re: [ToME 1.5.9] Normal heart remains after corruption.

Might need to replace the magical marks on the ground with an actual Altar that you have to bump into to activate.
Someone poke Rexo for an Altar of Corruption. :wink:

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/