mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-04-08 19:56:45 +00:00
fixed some issues with the generation of Land of Storms in other geometries
This commit is contained in:
parent
63869c6d33
commit
bc06f387fc
@ -1122,8 +1122,10 @@ void buildBigStuff(cell *c, cell *from) {
|
||||
heptagon *h = createAlternateMap(c, 2, hsA);
|
||||
if(h) clearing::bpdata[h].root = NULL;
|
||||
}
|
||||
|
||||
bool alts_okay = (S3 == 3 || (nonbitrunc && !gp::on));
|
||||
|
||||
if(c->land == laStorms && ctof(c) && hrand(2000) < 1000 && horo_ok() && !randomPatternsMode) {
|
||||
if(alts_okay && c->land == laStorms && ctof(c) && hrand(2000) < 1000 && horo_ok() && !randomPatternsMode) {
|
||||
heptagon *h = createAlternateMap(c, 2, hsA);
|
||||
if(h) h->alt->emeraldval = hrand(2);
|
||||
}
|
||||
|
18
landgen.cpp
18
landgen.cpp
@ -1144,7 +1144,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
break;
|
||||
|
||||
case laStorms: {
|
||||
bool randstorm = hyperbolic_not37 || gp::on || quotient == 2;
|
||||
bool randstorm = hyperbolic_not37 || gp::on || (quotient && geometry != gZebraQuotient);
|
||||
if(d == 9) {
|
||||
|
||||
if(torus) {
|
||||
@ -1223,11 +1223,19 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
if(c->mov[i] && c->mov[i]->land != laStorms && c->mov[i]->land != laNone)
|
||||
c->wall = waNone;
|
||||
}
|
||||
if(d == 8 && randstorm) {
|
||||
if(d == BARLEV && randstorm) {
|
||||
c->landparam = hrand(1000000);
|
||||
}
|
||||
if(d == 7 && randstorm) {
|
||||
forCellEx(c2, c) if(c2->landparam < c->landparam) setdist(c2, 7, c);
|
||||
if(d == BARLEV-1 && randstorm) {
|
||||
/* static int stormlevel, stormgroup;
|
||||
if(!stormlevel) stormgroup = 0;
|
||||
stormlevel++; stormgroup++; */
|
||||
forCellEx(c2, c) if(c2->land == laStorms && c2->mpdist >= BARLEV && c2->landparam > c->landparam) {
|
||||
setdist(c2, BARLEV-1, c);
|
||||
}
|
||||
/*
|
||||
stormlevel--;
|
||||
if(stormlevel == 0) printf("stormgroup = %4d (cellcount = %6d hcount = %6d)\n", stormgroup, cellcount, heptacount); */
|
||||
bool bad = false;
|
||||
forCellEx(c2, c) if(c2->land != laStorms) bad = true;
|
||||
if(!bad) {
|
||||
@ -1245,7 +1253,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
else if(wallsnow == 1 && slp == 0) {
|
||||
c->wall = waSandstone;
|
||||
}
|
||||
else if(slp == 1 && wallsnow == 0)
|
||||
else if(wallsnow)
|
||||
c->landparam = 1;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user