|February 3, 2012, 23:27||#1|
Join Date: May 2008
Location: Saratoga, California (in the midst of Silicon Valley)
*Destruction* deletes stairs
Several months ago I ran across an ugly feature: reading a *destruction* scroll will delete most things; unfortunately for me "most things" includes stairs. Doubly unfortunate for me, I discovered this on level 99 of an ironman game after killing Sauron, which made it kinda hard to go down to level 100 (see http://angband.oook.cz/forum/showthread.php?t=4839 if you care).
At the time, I promised to write some code to fix the problem, but of course, I never did. I have now (finally) looked into the problem. My original proposal was to add some chrome to convert the stairs into rubble, and then back to stairs once they were dug out. This looks to be a lot harder than I gave it credit for. The FEAT_* definitions in defines.h do not have any gaps in them where something could be slipped in, and the source code has at least a couple of instances of constructs like: "if (cave_feat[y][x] >= FEAT_WALL_EXTRA)" which makes adding new entries at the end somewhat problematic.
So I now propose using the simple fix of changing destroy_area in spells2.c to just skip over stairs. And in the course of investigating this, I now see where the bug slipped in: right now, destroy_area checks to see if it should skip a space by using the test "cave_isperm", whereas is older sources, this test was done using "cave_valid_bold". I am fairly certain that this was changed in order to make *destruct* effective at destroying artifacts, so that people could not use the hack of *destructing* a vault and then picking through the remains. But it has the unfortunate and probably unexpected side effect of also allowing the destruction of stairs.
The fix appears to be simple: in spells2.c:destroy_area, instead of
if (!cave_isperm(cave, y, x))
just instead use
which will skip over stairs as well as permanent walls, but not artifacts.
|February 4, 2012, 00:37||#2|
There's more to life than just creating. There's PROcreating. And for men who are unable to do so naturally, we have the Apple iSperm.
You read the scroll labeled NOBIMUS UPSCOTI...
You are surrounded by a stasis field!
The tengu tries to teleport, but fails!
Last edited by ekolis; February 4, 2012 at 00:38. Reason: broken quote tags :(
|February 4, 2012, 10:07||#3|
Angband Devteam member
Many thanks for the fix. I've opened this as #1616, so it should be fixed for 3.4
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
|Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)|
|Thread||Thread Starter||Forum||Replies||Last Post|
|*Destruction* deletes stairs||bron||Vanilla||7||August 27, 2011 04:44|
|Connected stairs - something to consider||Antoine||Development||17||May 14, 2011 08:51|
|Rods of detect traps and stairs/doors||Timo Pietilš||Development||13||March 10, 2011 04:38|
|Playing with 'restricted' stairs||fizzix||AAR||0||July 20, 2010 00:12|
|[O] Levels are generated with no stairs at all||Therem Harth||Variants||3||June 28, 2010 23:08|