[1.7.6] No water purification in Valley of the Moon

Make all T-Engine/ToME 4 bug reports here

Moderator: Moderator

Post Reply
Message
Author
Zizzo
Sher'Tul Godslayer
Posts: 2521
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

[1.7.6] No water purification in Valley of the Moon

#1 Post by Zizzo »

[sound F/X: source diving] Aha! I knew I wasn't imagining it. The first time I completed the Valley of the Moon quest (lo these many years ago…), I remember that all the poisoned water in the Valley was purified as soon as Limmir finished his ritual. Nowadays, though, that doesn't happen. It looks like the code is still trying to do so (cf. ritual_end() in the Lost Knowledge quest):

Code: Select all

	-- Update water
	local water = game.zone:makeEntityByName(game.level, "terrain", "DEEP_WATER")
	for x = 0, game.level.map.w - 1 do for y = 0, game.level.map.h - 1 do
		local g = game.level.map(x, y, engine.Map.TERRAIN)
		if g and g.define_as == "POISON_DEEP_WATER" then
			game.level.map(x, y, engine.Map.TERRAIN, water)
		end
	end end
No idea offhand why it isn't working.
"Blessed are the yeeks, for they shall inherit Arda..."

Zizzo
Sher'Tul Godslayer
Posts: 2521
Joined: Thu Jan 23, 2003 8:13 pm
Location: A shallow water area south of Bree
Contact:

Re: [1.7.6] No water purification in Valley of the Moon

#2 Post by Zizzo »

Zizzo wrote: Wed Jul 19, 2023 11:41 pm No idea offhand why it isn't working.
[sound F/X: testing] Found it: turns out the poison water tiles we need to change aren't internally named POISON_DEEP_WATER, as the above code is expecting, but POISON_DEEP_WATER1 thru POISON_DEEP_WATER6 — apparently a side effect of the game's fancy tile handling. For now, I've whipped up an addon that papers over the bug.
"Blessed are the yeeks, for they shall inherit Arda..."

Post Reply