Why some rooms are lit/unlit

G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Hi all,

Was just wondering if anything affects whether some rooms are lit and
others are unlit? In the past I have normally found that most rooms are
lit, but since Ive been trying my next conduct chalange, illiterate
athiest (which is going alright, fighting through hell at the moment),
a lot of the rooms generated are unlit! Is this affected by luck
(which, since Im not able to sacrifice and, may lead to my luck being
lower than normal,in a normal game its normally always maxed out)?

Thanks,

Mark
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

"Marky Mark" <mdmota@yahoo.com.au> writes:
> Hi all,
>
> Was just wondering if anything affects whether some rooms are lit and
> others are unlit? In the past I have normally found that most rooms are
> lit, but since Ive been trying my next conduct chalange, illiterate
> athiest (which is going alright, fighting through hell at the moment),
> a lot of the rooms generated are unlit! Is this affected by luck
> (which, since Im not able to sacrifice and, may lead to my luck being
> lower than normal,in a normal game its normally always maxed out)?

The chance of a given room in a room-and-corridor level being lit
(assuming it hasn't been prespecified for a special level or special
room) depends solely on your depth: (10/DL+1)*(76/77). (So even on the
shallower levels, there's a 1/77 chance per room of its being dark.)

Randomly-generated special levels such as the Mines caverns have,
where unspecified, a 50% chance of being lit.

--
: Dylan O'Donnell http://www.spod-central.org/~psmith/ :
: "Zabadak, karakakora kakarakak, / Zabadak, shai shai skagalak." :
: -- Dave Dee, Dozy, Beaky, Mick & Tich, "Zabadak" :
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Rast wrote:

> The relevant bit from sp_lev.c is
> rlit = (rnd(1+abs(depth(&u.uz))) < 11 && rn2(77)) ? TRUE : FALSE;

Isn't <boolean>?TRUE:FALSE; a little redundant, or am I missing something?

--
Benjamin Lewis

Although the moon is smaller than the earth, it is farther away.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Dylan O'Donnell wrote on 17 May 2005 10:14:32 +0100:

> The chance of a given room in a room-and-corridor level being lit
> (assuming it hasn't been prespecified for a special level or special
> room) depends solely on your depth: (10/DL+1)*(76/77). (So even on the
> shallower levels, there's a 1/77 chance per room of its being dark.)

I think it would be more clear to say "76/77 for DL1 through DL9, and
10/(DL+1)*(76/77) for DL 10 and below"


The relevant bit from sp_lev.c is
rlit = (rnd(1+abs(depth(&u.uz))) < 11 && rn2(77)) ? TRUE : FALSE;



--
"Sometimes I stand by the door and look into the darkness. Then I
am reminded how dearly I cherish my boredom, and what a precious
commodity is so much misery." -- Jack Vance
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Janis Papanagnou wrote:

> Benjamin Lewis wrote:
>> Rast wrote:
>>
>>> The relevant bit from sp_lev.c is
>>> rlit = (rnd(1+abs(depth(&u.uz))) < 11 && rn2(77)) ? TRUE : FALSE;
>> Isn't <boolean>?TRUE:FALSE; a little redundant, or am I missing
>> something?
>
> Depending on the values defined for the literals TRUE and FALSE... ;-)

Heh.

> But for all sane definitions of the boolean constants you're of course
> right. Though in some cases the explicit assignment is more expressive
> (not the semantics, which is the same, but concerning legibility).

Hmm. In this case, I find this expression just as difficult to decipher
with or without the extraneous ?TRUE:FALSE :)

--
Benjamin Lewis

Although the moon is smaller than the earth, it is farther away.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

> Was just wondering if anything affects whether some rooms are lit and
> others are unlit? In the past I have normally found that most rooms are
> lit, but since Ive been trying my next conduct chalange, illiterate
> athiest (which is going alright, fighting through hell at the moment),
> a lot of the rooms generated are unlit! Is this affected by luck
> (which, since Im not able to sacrifice and, may lead to my luck being
> lower than normal,in a normal game its normally always maxed out)?

There's a possibility to max your luck even with an illiterate atheist:
Guebj vqragvsvrq inyhnoyr trzf ng pbnyvtarq havpbef.
Lbh pna vqragvsl sebz guebarf naq/be ol ratenivat jvgu gur trzf. Inyhnoyr (uneq)
trzf nyjnlf ratenir vagb gur sybbe.

Greetings,
Benjamin
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Benjamin Schieder <blindcoder@scavenger.homeip.net> writes:

> > Was just wondering if anything affects whether some rooms are lit and
> > others are unlit? In the past I have normally found that most rooms are
> > lit, but since Ive been trying my next conduct chalange, illiterate
> > athiest (which is going alright, fighting through hell at the moment),
> > a lot of the rooms generated are unlit! Is this affected by luck
> > (which, since Im not able to sacrifice and, may lead to my luck being
> > lower than normal,in a normal game its normally always maxed out)?
>
> There's a possibility to max your luck even with an illiterate atheist:
> Guebj vqragvsvrq inyhnoyr trzf ng pbnyvtarq havpbef.
> Lbh pna vqragvsl sebz guebarf naq/be ol ratenivat jvgu gur trzf.
> Inyhnoyr (uneq) trzf nyjnlf ratenir vagb gur sybbe.

Guerr erznexf. Svefg, gur ynggre zrgubq qbrf abg vqragvsl gur
trz 'va tnzr', ohg nyybjf jung V jbhyq pnyy zrgn-vqragvsvpngvba
(v.r., lbh, gur cynlre, xabjf, ohg gur tnzr qbrfa'g xabj lbh xabj),
fb gur havpbea jvyy (naq pna'g) pner nobhg zrgn-vqragvsvpngvba.
Frpbaq, vg vf abg arprffnel gb unir gur trz vqragvsvrq, nygubhtu
guvf vapernfrf gur yhpx obahf gb +3; rira whfg anzvat vg fbzrubj
trgf lbh n yhpx obahf bs +2. Guveq, guebjvat anzrq trzf ng havpbeaf
vf na rssrpgvir zrnaf bs vqragvslvat inyhnoyr fbsg trzf, fvapr
gur havpbea vf abg vagrerfgrq va anzrq tynff.

Best,
Jakob
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

Benjamin Lewis wrote:
> Rast wrote:
>
>>The relevant bit from sp_lev.c is
>>rlit = (rnd(1+abs(depth(&u.uz))) < 11 && rn2(77)) ? TRUE : FALSE;
>
> Isn't <boolean>?TRUE:FALSE; a little redundant, or am I missing something?

Depending on the values defined for the literals TRUE and FALSE... ;-)

But for all sane definitions of the boolean constants you're of course
right. Though in some cases the explicit assignment is more expressive
(not the semantics, which is the same, but concerning legibility).

Janis