Make REINCARNATION unconditional.

There is a lot of code affected by this, and Pat Rankin correctly
observes that it would be better to store roguelike as a level flag
rather than just using Is_rogue_level. A note for the future.
This commit is contained in:
Sean Hunt
2015-02-13 23:46:47 -05:00
committed by Pasi Kallinen
parent bb647dc33c
commit ffd201495c
42 changed files with 38 additions and 273 deletions

View File

@@ -400,11 +400,9 @@ register int type;
levl[x][y].doormask = (shdoor ? D_ISOPEN : D_NODOOR);
#endif
#ifdef REINCARNATION
/* also done in roguecorr(); doing it here first prevents
making mimics in place of trapped doors on rogue level */
if (Is_rogue_level(&u.uz)) levl[x][y].doormask = D_NODOOR;
#endif
if(levl[x][y].doormask & D_TRAPPED) {
struct monst *mtmp;
@@ -627,11 +625,7 @@ makelevel()
register s_level *slev = Is_special(&u.uz);
/* check for special levels */
#ifdef REINCARNATION
if (slev && !Is_rogue_level(&u.uz))
#else
if (slev)
#endif
{
makemaz(slev->proto);
return;
@@ -663,12 +657,10 @@ makelevel()
/* otherwise, fall through - it's a "regular" level. */
#ifdef REINCARNATION
if (Is_rogue_level(&u.uz)) {
makeroguerooms();
makerogueghost();
} else
#endif
makerooms();
sort_rooms();
@@ -694,9 +686,7 @@ makelevel()
branchp = Is_branchlev(&u.uz); /* possible dungeon branch */
room_threshold = branchp ? 4 : 3; /* minimum number of rooms needed
to allow a random special room */
#ifdef REINCARNATION
if (Is_rogue_level(&u.uz)) goto skip0;
#endif
makecorridors();
make_niches();
@@ -753,9 +743,7 @@ makelevel()
!(mvitals[PM_COCKATRICE].mvflags & G_GONE)) mkroom(COCKNEST);
}
#ifdef REINCARNATION
skip0:
#endif
/* Place multi-dungeon branch. */
place_branch(branchp, 0, 0);
@@ -784,9 +772,7 @@ skip0:
mktrap(0,0,croom,(coord*)0);
if (!goldseen && !rn2(3))
(void) mkgold(0L, somex(croom), somey(croom));
#ifdef REINCARNATION
if(Is_rogue_level(&u.uz)) goto skip_nonrogue;
#endif
if(!rn2(10)) mkfount(0,croom);
if(!rn2(60)) mksink(croom);
if(!rn2(60)) mkaltar(croom);
@@ -822,9 +808,7 @@ skip0:
}
}
#ifdef REINCARNATION
skip_nonrogue:
#endif
if(!rn2(3)) {
(void) mkobj_at(0, somex(croom), somey(croom), TRUE);
tryct = 0;
@@ -863,9 +847,7 @@ mineralize()
/* determine if it is even allowed;
almost all special levels are excluded */
if (In_hell(&u.uz) || In_V_tower(&u.uz) ||
#ifdef REINCARNATION
Is_rogue_level(&u.uz) ||
#endif
level.flags.arboreal ||
((sp = Is_special(&u.uz)) != 0 && !Is_oracle_level(&u.uz)
&& (!In_mines(&u.uz) || sp->flags.town)
@@ -983,10 +965,8 @@ register struct mkroom *croom;
if ((int) levl[lowx][lowy].roomno == roomno || croom->irregular)
return;
#ifdef SPECIALIZATION
# ifdef REINCARNATION
if (Is_rogue_level(&u.uz))
do_ordinary = TRUE; /* vision routine helper */
# endif
if ((rtype != OROOM) || do_ordinary)
#endif
{
@@ -1207,7 +1187,6 @@ coord *tm;
if (num > 0 && num < TRAPNUM) {
kind = num;
#ifdef REINCARNATION
} else if (Is_rogue_level(&u.uz)) {
switch (rn2(7)) {
default: kind = BEAR_TRAP; break; /* 0 */
@@ -1218,7 +1197,6 @@ coord *tm;
case 5: kind = SLP_GAS_TRAP; break;
case 6: kind = RUST_TRAP; break;
}
#endif
} else if (Inhell && !rn2(5)) {
/* bias the frequency of fire traps in Gehennom */
kind = FIRE_TRAP;