no more barrows on the boundary of Burial
This commit is contained in:
parent
c6a63f121e
commit
31daa605f2
17
landgen.cpp
17
landgen.cpp
|
@ -480,14 +480,26 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
|||
case laBurial:
|
||||
if(d == 9) {
|
||||
if(hrand(5000) < 25 && celldist(c) >= 5 && !safety) {
|
||||
bool goodland = true;
|
||||
cell *c2 = createMov(c, hrand(c->type));
|
||||
for(auto cx: {c, c2})
|
||||
forCellCM(c3,cx) {
|
||||
if(c3->land != laNone && c3->land != laBurial)
|
||||
goodland = false;
|
||||
if(c3->bardir != NODIR && c3->bardir != NOBARRIERS)
|
||||
goodland = false;
|
||||
}
|
||||
if(goodland) {
|
||||
c->item = itBarrow;
|
||||
c->landparam = 2 + hrand(2);
|
||||
c->wall = waBarrowDig;
|
||||
forCellCM(c2, c) c2->wall = waBarrowWall, c2->item = itNone;
|
||||
cell *c2 = createMov(c, hrand(c->type));
|
||||
forCellCM(c3, c)
|
||||
c3->wall = waBarrowWall, c3->item = itNone,
|
||||
c3->bardir = NOBARRIERS;
|
||||
c2->wall = waBarrowDig;
|
||||
forCellCM(c3, c2) {
|
||||
if(c3 == c || isNeighbor(c3, c)) continue;
|
||||
c3->bardir = NOBARRIERS;
|
||||
bool adj = false;
|
||||
forCellEx(c4, c)
|
||||
if(c4 != c2 && isNeighborCM(c3, c4)) adj = true;
|
||||
|
@ -498,6 +510,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ONEMPTY if(!peace::on) {
|
||||
if(hrand(15000) < 5 + 3 * items[itBarrow] + 4 * yendor::hardness())
|
||||
c->monst = moDraugr;
|
||||
|
|
Loading…
Reference in New Issue