Page 1 of 1
[b41] Volcano overlaid with Earth Wall
Posted: Mon Aug 06, 2012 10:28 am
by grayswandir
I put down a volcano, and then the adventurer I was fighting put down an earth wall on top of it. Once the earth wall went away, the terrain reverted to volcano. Didn't keep attacking, though, which is good.
Re: [b41] Volcano overlaid with Earth Wall
Posted: Thu Aug 09, 2012 6:36 pm
by grayswandir
You could probably do a quick fix like so.
In the volcano talent:
Code: Select all
local oe = game.level.map(x, y, Map.TERRAIN)
if not oe or oe.is_volcano then return end
local e = Object.new{
old_feat = oe,
You can just add
Code: Select all
if oe.old_feat then oe = oe.old_feat end
So if you're overriding a temporary effect, it replaces it with the original when it expires.
Re: [b41] Volcano overlaid with Earth Wall
Posted: Thu Aug 09, 2012 6:48 pm
by edge2054
This works for the above instance to an extent. I tested in the ambush and the stairs would reappear like I'd expect but as soon as I moved off them they would again revert to the original terrain tile.
Another issue though is say in the ambush, if you're standing on a changed tile when the stairs spawn, the stairs will be gone when it reverts back to the old_feature.
Re: [b41] Volcano overlaid with Earth Wall
Posted: Thu Aug 09, 2012 7:15 pm
by edge2054
Alright...
I'm thinking stairs should get an on_added_to_level call and check all objects, traps, and terrain on the grid for a temporary field and remove any terrain that has it.
I think the current effects (volcano, earth wall, worm hole, etc. etc. etc.) should all have a no change flag so only one of these effects can be on a grid. Stairs should also get a no_change flag. It would prevent players from using such effects on stairs but I think the only time this will be a real issue is with traps or holes forming in earth walls but it's better then the alternative (which is a game breaking bug that's been around for awhile).
Thoughts?