|
|
#1 |
|
Swordsman
Join Date: May 2008
Location: Saratoga, California (in the midst of Silicon Valley)
Posts: 286
![]() |
*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 if (!cave_perma_bold(x,y)) which will skip over stairs as well as permanent walls, but not artifacts. |
|
|
|
|
|
#2 |
|
Knight
|
Totally off topic, but that is an AWESOME function name...
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 :( |
|
|
|
|
|
#3 |
|
Angband Devteam member
|
Many thanks for the fix. I've opened this as #1616, so it should be fixed for 3.4
__________________
"3.2 is way too easy. 3.3 is not much better, but it is a step to right direction." - Timo Pietila |
|
|
|
|
|
#4 |
|
Knight
Join Date: Aug 2009
Posts: 500
![]() |
Btw in FAangband destrucion does not affect stairs.
|
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| 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 |