mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 17:10:36 +00:00
improved the Land of Storms in geometries
This commit is contained in:
parent
1d2adc3a0a
commit
3504307cfb
35
landgen.cpp
35
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,17 +1009,44 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
}
|
||||
}
|
||||
else if(sphere) {
|
||||
if(c->type != 6) {
|
||||
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) {
|
||||
int i = zebra40(c);
|
||||
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);
|
||||
|
14
landlock.cpp
14
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;
|
||||
}
|
||||
|
||||
|
@ -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<cell*>& 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++)
|
||||
|
Loading…
Reference in New Issue
Block a user