![]() |
#1 |
Swordsman
Join Date: May 2008
Location: Saratoga, California (in the midst of Silicon Valley)
Posts: 493
![]() |
sil 1.1.1: minor bug (?) with chest generation
So I was hacking the source as part of the "no-magic" challenge (to change things so that magic items are not generated), and I ran across something that looks to me like a bug.
In "choose_chest_contents" in file object2.c, a random number between 1 and 13 is generated to decide on the "theme" of the chest. The comments in the routine enumerate what each of the 13 numbers is supposed to mean. However, this value is passed un-changed into the routine make_object, and in that routine, the themes that were numbered 1 - 13 in choose_chest_contents are actually numbered 2 - 14, with the value 1 reserved to mean "not useless" (i.e. anything except skeletons). This means that occasionally chests do have un-themed-but-not-useless stuff (theme == 1), and chests never have the DROP_TYPE_JEWELRY theme (theme == 14). Now. it is of course possible that this was the intent, but it certainly doesn't look that way from the source. The simple hack-ish thing to do would be to add one to the value generated in choose_chest_contents (and to change the comments in that routine). The simplest thing to do would be to ignore it and declare it a feature. |
![]() |
![]() |
![]() |
#2 | |
Knight
Join Date: Jan 2009
Posts: 904
![]() |
Quote:
|
|
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
sil 1.1: minor bug with thrown weapons | bron | Sil | 1 | November 18, 2012 12:24 |
[3.3] Bug in cavern level generation | PowerWyrm | Development | 10 | July 30, 2011 05:19 |
Haha, chest in a chest | Nightmarjoo | AAR | 5 | January 22, 2010 04:49 |
r1415 bug - Item generation | Sirridan | Vanilla | 3 | June 1, 2009 09:23 |
3.1.0 Very minor bug | perost | Vanilla | 0 | January 9, 2009 22:48 |