[ToME 1.5.9] Normal heart remains after corruption.

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
BugReporter
Higher
Posts: 62
Joined: Wed Jun 06, 2018 10:53 am

[ToME 1.5.9] Normal heart remains after corruption.

#1 Post by BugReporter »

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: 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,
}
Attachments
mark_placement.jpg
mark_placement.jpg (94.03 KiB) Viewed 2289 times
double_heart.jpg
double_heart.jpg (27.12 KiB) Viewed 2289 times

Achievement:BugFound
Cornac
Posts: 32
Joined: Fri Nov 07, 2014 6:07 am

Re: [ToME 1.5.9] Normal heart remains after corruption.

#2 Post by Achievement:BugFound »

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).

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: [ToME 1.5.9] Normal heart remains after corruption.

#3 Post by HousePet »

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:
My feedback meter decays into coding. Give me feedback and I make mods.

GlassGo
Uruivellas
Posts: 732
Joined: Wed Nov 06, 2013 1:21 pm
Location: From Russia with atchoum!

Re: [ToME 1.5.9] Normal heart remains after corruption.

#4 Post by GlassGo »

Stil exist in 1.7b1
English isn't my native language.

GlassGo
Uruivellas
Posts: 732
Joined: Wed Nov 06, 2013 1:21 pm
Location: From Russia with atchoum!

Re: [ToME 1.5.9] Normal heart remains after corruption.

#5 Post by GlassGo »

Actually I could add to it - after I corrupted the Sandworm Quen Heart at the altar, Celia's Heart missed form my inventory.
Just noticed that.
So that's probably the reason.

PS OK, so it's any random item.
English isn't my native language.

Post Reply