mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
reg3:: nice Zebra and Graveyard patterns
This commit is contained in:
parent
be90304f12
commit
7fd199dd49
23
landgen.cpp
23
landgen.cpp
@ -667,6 +667,29 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
#endif
|
||||
else if(arb::in() && arb::current.have_line)
|
||||
c->wall = arb::linespattern(c) ? waTrapdoor : waNone;
|
||||
else if(reg3::in_rule()) switch(geometry) {
|
||||
case gSpace534: {
|
||||
if(c->master->fieldval == 0) c->wall = waTrapdoor;
|
||||
forCellCM(c1, c) if(c1->master->fieldval == 0) c->wall = waTrapdoor;
|
||||
break;
|
||||
}
|
||||
case gSpace435: {
|
||||
for(int i=0; i<S7; i++) {
|
||||
cellwalker cw(c, i);
|
||||
for(int a=0; a<3; a++) {
|
||||
if(cw.at->master->fieldval == 0) c->wall = waTrapdoor;
|
||||
cw += wstep;
|
||||
cw += rev;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case gSpace535: {
|
||||
if((c->master->fieldval % 5) % 2 == 1) c->wall = waTrapdoor;
|
||||
break;
|
||||
}
|
||||
default: ;
|
||||
}
|
||||
else if(euclid && !arcm::in()) {
|
||||
auto co = euc2_coordinates(c);
|
||||
int y = co.second;
|
||||
|
4
reg3.cpp
4
reg3.cpp
@ -1226,8 +1226,6 @@ EX bool pseudohept(cell *c) {
|
||||
return abs(h[3]) > .99 || abs(h[0]) > .99 || abs(h[1]) > .99 || abs(h[2]) > .99;
|
||||
}
|
||||
// chessboard pattern in 534
|
||||
if(geometry == gSpace534)
|
||||
return c->master->distance & 1;
|
||||
if(geometry == gField534)
|
||||
return hr::celldistance(c, currentmap->gamestart()) & 1;
|
||||
if(geometry == gCrystal344 || geometry == gCrystal534 || geometry == gSeifertCover)
|
||||
@ -1235,6 +1233,8 @@ EX bool pseudohept(cell *c) {
|
||||
if(quotient) return false; /* added */
|
||||
auto mr = dynamic_cast<hrmap_reg3_rule*> (currentmap);
|
||||
if(mr) {
|
||||
if(geometry == gSpace535)
|
||||
return c->master->fieldval % 31 == 0;
|
||||
return c->master->fieldval == 0;
|
||||
}
|
||||
if(m && hyperbolic) {
|
||||
|
Loading…
Reference in New Issue
Block a user