diff --git a/landgen.cpp b/landgen.cpp index 2c50c2b7..b51f4984 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -985,7 +985,11 @@ void giantLandSwitch(cell *c, int d, cell *from) { case laStorms: if(d == 9) { - if(torus) ; + if(torus) { + int pid = decodeId(c->master); + if(pid == 381/3) c->wall = waCharged; + if(pid == 381*2/3) c->wall = waGrounded; + } else if(euclid) { eucoord x, y; decodeMaster(c->master, x, y); @@ -1005,10 +1009,30 @@ void giantLandSwitch(cell *c, int d, cell *from) { } } else if(sphere) { - if(c->type != 6) { - int id = c->master->fiftyval; - if(id == 1) c->wall = waCharged; - if(id == (elliptic && !nontruncated ? 3 : 9)) c->wall = waGrounded; + if(S7 == 5) { + if(ctof(c)) { + int id = c->master->fiftyval; + if(id == 1) c->wall = waCharged; + if(id == (elliptic && !nontruncated ? 3 : 9)) c->wall = waGrounded; + } + } + else if(S7 == 4) { + if(ctof(c)) { + int id = c->master->fiftyval; + if(id == 1) c->wall = waCharged; + if(id == 3) c->wall = waGrounded; + } + } + else if(S7 == 3) { + if(ctof(c)) { + int id = c->master->fiftyval; + if(id == 1) c->wall = waCharged; + } + else { + c->wall = waGrounded; + forCellEx(c2, c) if(ctof(c2) && c2->master->fiftyval == 1) + c->wall = waNone; + } } } else if(nontruncated) { @@ -1016,6 +1040,13 @@ void giantLandSwitch(cell *c, int d, cell *from) { if((i == 5 || i == 8) && hrand(100) < 20) c->wall = hrand(2) ? waCharged : waGrounded; else if(i == 15) c->wall = waSandstone; } + else if(S3 > 3) { + int z = zebra40(c); + int i = z; + int b = 0; + while(i) { if(i&1) b++; i>>=1; } + if(ctof(c) && (b&1) && hrand(100) < 20) c->wall = (z&2) ? waCharged : waGrounded; + } else { int i = zebra40(c); if(c->wall); diff --git a/landlock.cpp b/landlock.cpp index 6fbdf393..4a455597 100644 --- a/landlock.cpp +++ b/landlock.cpp @@ -973,6 +973,17 @@ int isLandValid(eLand l) { if(l == laStorms && quotient == 2) return 0; + // pattern not implemented + if(l == laStorms && S7 == 8) + return 1; + + // not enough space + if(l == laStorms && nontruncated && elliptic) + return 0; + + if(l == laStorms && nontruncated && S3 == 3) + return 0; + // available only in weird geometries if(l == laMirrorOld && !geometry) return 0; @@ -1147,6 +1158,9 @@ int isLandValid(eLand l) { if(l == laHalloween || l == laDual) return 3; + if(l == laStorms && torus) + return 3; + return 2; } diff --git a/monstergen.cpp b/monstergen.cpp index 72c0b88f..2ec319b3 100644 --- a/monstergen.cpp +++ b/monstergen.cpp @@ -321,6 +321,13 @@ void wandering() { cell *c = dcal[i]; if(inmirror(c)) continue; + if(specialland == laStorms) { + // place the sandstone wall completely randomly (but not on the player) + vector& ac = currentmap->allcells(); + c = ac[hrand(size(ac))]; + if(isPlayerOn(c)) continue; + } + if(smallbounded && !c->item && hrand(5) == 0 && c->land != laHalloween) { if(passable(c, NULL, 0) || specialland == laKraken) { if(!haveOrbPower() && specialland != laHell) for(int it=0; it<1000 && !c->item; it++)