mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-03-22 04:49:44 +00:00
instead of nonbitrunc, gp::on and irr::on, there is one variable, variation
This commit is contained in:
48
complex.cpp
48
complex.cpp
@@ -767,7 +767,7 @@ namespace clearing {
|
||||
}
|
||||
int d = celldistAlt(c);
|
||||
|
||||
if(nonbitrunc) {
|
||||
if(PURE) {
|
||||
for(int i=0; i<S7; i++) {
|
||||
cell *c2 = createMov(c, i);
|
||||
if(!pseudohept(c2) && celldistAlt(c2) == d-1)
|
||||
@@ -821,7 +821,7 @@ namespace clearing {
|
||||
void generate(cell *c) {
|
||||
if(buggyplant) return;
|
||||
if(sphere) return;
|
||||
if(gp::on || irr::on) return;
|
||||
if(NONSTDVAR) return;
|
||||
if(quotient) return;
|
||||
|
||||
if(euclid) {
|
||||
@@ -1057,7 +1057,7 @@ namespace whirlpool {
|
||||
namespace mirror {
|
||||
|
||||
bool build(cell *c) {
|
||||
if(gp::on) {
|
||||
if(GOLDBERG) {
|
||||
if(c == c->master->c7) {
|
||||
c->wall = ((gp::param.second == 0 || gp::param.first == gp::param.second) && hrand(2)) ? waMirror : waCloud;
|
||||
return true;
|
||||
@@ -1068,7 +1068,7 @@ namespace mirror {
|
||||
c->wall = hrand(2) ? waMirror : waCloud;
|
||||
return true;
|
||||
}
|
||||
if(binarytiling || irr::on) {
|
||||
if(binarytiling || IRREGULAR) {
|
||||
// mirrors not supported
|
||||
if(is_mirrorland(c)) {
|
||||
c->item = itShard;
|
||||
@@ -1076,7 +1076,7 @@ namespace mirror {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if(nonbitrunc?pseudohept(c):!ishept(c)) {
|
||||
if(PURE?pseudohept(c):!ishept(c)) {
|
||||
c->wall = hrand(2) ? waMirror : waCloud;
|
||||
return true;
|
||||
}
|
||||
@@ -1183,7 +1183,7 @@ namespace mirror {
|
||||
cw.mirrored = !cw.mirrored;
|
||||
cell *c = cw.at;
|
||||
|
||||
if(gp::on) {
|
||||
if(GOLDBERG) {
|
||||
for(int i=0; i<cw.at->type; i++) {
|
||||
heptspin hs(cw.at->master, cw.spin, cw.mirrored);
|
||||
hs = hs + i + wstep + i - (gp::param.first == gp::param.second ? 1 : 0);
|
||||
@@ -1204,7 +1204,7 @@ namespace mirror {
|
||||
create_archimedean(cw, cpid, false);
|
||||
return;
|
||||
}
|
||||
if(gp::on && !(S7 & 1)) {
|
||||
if(GOLDBERG && !(S7 & 1)) {
|
||||
for(int i=0; i<cw.at->type; i++) {
|
||||
heptspin hs(cw.at->master, cw.spin, cw.mirrored);
|
||||
hs = hs + i + wstep + 1 + wstep + 1 + (S7/2) - i + 1;
|
||||
@@ -1212,7 +1212,7 @@ namespace mirror {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(gp::on && (S7 & 1)) {
|
||||
if(GOLDBERG && (S7 & 1)) {
|
||||
for(int i=0; i<cw.at->type; i++) {
|
||||
heptspin hs(cw.at->master, cw.spin, cw.mirrored);
|
||||
hs = hs + i + wstep + (S7/2) + wstep - 2 + wstep + (S7/2) - i;
|
||||
@@ -1220,17 +1220,17 @@ namespace mirror {
|
||||
}
|
||||
return;
|
||||
}
|
||||
if(nonbitrunc && !(S7 & 1)) {
|
||||
if(PURE && !(S7 & 1)) {
|
||||
for(int i=0; i<cw.at->type; i++)
|
||||
createMirror(cw + i + wstep + 1 + wstep + 1 + (S7/2) - i, cpid);
|
||||
return;
|
||||
}
|
||||
if(nonbitrunc && (S7 & 1) && (S3 == 4)) {
|
||||
if(PURE && (S7 & 1) && (S3 == 4)) {
|
||||
for(int i=0; i<cw.at->type; i++)
|
||||
createMirror(cw + i + wstep + 1 + wstep - (S7/2) + wstep - (S7/2) - i, cpid);
|
||||
return;
|
||||
}
|
||||
if(nonbitrunc && (S7 & 1)) {
|
||||
if(PURE && (S7 & 1)) {
|
||||
for(int i=0; i<cw.at->type; i++)
|
||||
createMirror(cw + i + wstep + (S7/2) + wstep - 2 + wstep + (S7/2) - i, cpid);
|
||||
return;
|
||||
@@ -1416,9 +1416,9 @@ namespace mirror {
|
||||
v.push_back(1);
|
||||
stepcount++; if(stepcount > 10000) { printf("failhep\n"); return cw; }
|
||||
}
|
||||
if(nonbitrunc && (cw+wstep).at == cwcopy.at)
|
||||
if(PURE && (cw+wstep).at == cwcopy.at)
|
||||
v.pop_back();
|
||||
if(nonbitrunc && (cw+3+wstep).at->land == laMirrored && (cw+2+wstep).at->land == laMirrorWall) {
|
||||
if(PURE && (cw+3+wstep).at->land == laMirrored && (cw+2+wstep).at->land == laMirrorWall) {
|
||||
cw += wmirror;
|
||||
auto p = traceback(v, cw);
|
||||
if(p.first) return p.second;
|
||||
@@ -1921,7 +1921,7 @@ namespace heat {
|
||||
cell *c = playerpos(i);
|
||||
if(!c) continue;
|
||||
double xrate = (c->land == laCocytus && shmup::on) ? rate/3 : rate;
|
||||
if(nonbitrunc) xrate *= 1.7;
|
||||
if(PURE) xrate *= 1.7; // todo-variation
|
||||
if(!shmup::on) xrate /= FIX94;
|
||||
if(isIcyLand(c))
|
||||
HEAT(c) += (markOrb(itOrbWinter) ? -1.2 : 1.2) * xrate;
|
||||
@@ -1936,7 +1936,7 @@ namespace heat {
|
||||
for(int i=0; i<dcs; i++) {
|
||||
cell *c = allcells[i];
|
||||
double xrate = (c->land == laCocytus && shmup::on) ? 1/3. : 1;
|
||||
if(nonbitrunc) xrate *= 1.7;
|
||||
if(PURE) xrate *= 1.7; // todo-variation
|
||||
if(!shmup::on) xrate /= FIX94;
|
||||
if(c->cpdist > gr && !doall) break;
|
||||
|
||||
@@ -2623,7 +2623,7 @@ namespace sword {
|
||||
}
|
||||
|
||||
void shuffle(int i) {
|
||||
sword::angle[i] = euclid ? S7*hrand(6) : nonbitrunc ? 3*hrand(S14)+1 : hrand(S42);
|
||||
sword::angle[i] = euclid ? S7*hrand(6) : PURE ? 3*hrand(S14)+1 : hrand(S42);
|
||||
}
|
||||
|
||||
void reset() {
|
||||
@@ -2808,7 +2808,7 @@ namespace prairie {
|
||||
c->LHU.fi.rval = (y&15);
|
||||
}
|
||||
else if(sphere) {
|
||||
c->LHU.fi.rval = celldistance(c, cwt.at) + 8 - (nonbitrunc ? 2 : 3);
|
||||
c->LHU.fi.rval = celldistance(c, cwt.at) + 8 - (PURE ? 2 : 3);
|
||||
}
|
||||
else if(weirdhyperbolic) {
|
||||
c->LHU.fi.rval = max(celldist(c), 15);
|
||||
@@ -2870,8 +2870,8 @@ namespace prairie {
|
||||
}
|
||||
}
|
||||
|
||||
#define RLOW (sphere?(nonbitrunc?7:6):nonbitrunc?4:2)
|
||||
#define RHIGH (sphere?(nonbitrunc?8:9):nonbitrunc?11:13)
|
||||
#define RLOW (sphere?(PURE?7:6):PURE?4:2)
|
||||
#define RHIGH (sphere?(PURE?8:9):PURE?11:13)
|
||||
|
||||
bool no_worms(cell *c) {
|
||||
int rv = c->LHU.fi.rval;
|
||||
@@ -3036,7 +3036,7 @@ namespace prairie {
|
||||
else if(!enter && isriver(cwt.at)) enter = cwt.at;
|
||||
if(isize(tchoices)) {
|
||||
if(lasttreasure && lasttreasure->item == itGreenGrass) {
|
||||
if(celldistance(lasttreasure, cwt.at) >= (nonbitrunc ? 7 : 10)) {
|
||||
if(celldistance(lasttreasure, cwt.at) >= (PURE ? 7 : 10)) {
|
||||
lasttreasure->item = itNone;
|
||||
forCellEx(c2, lasttreasure) if(c2->item == itGreenGrass) c2->item = itNone;
|
||||
}
|
||||
@@ -3199,14 +3199,14 @@ namespace windmap {
|
||||
// cw.spin = 0;
|
||||
neighbors.emplace_back();
|
||||
auto &v = neighbors.back();
|
||||
if((gp::on || irr::on) && !sphere)
|
||||
if(sphere && STDVAR)
|
||||
for(int l=0; l<cw.at->type; l++) v.push_back(getId(cw+l+wstep));
|
||||
else
|
||||
for(int l=0; l<S7; l++) {
|
||||
heptspin hs(cw.at->master, cw.spin);
|
||||
hs = hs + l + wstep;
|
||||
v.push_back(getId(cellwalker(hs.at->c7, hs.spin)));
|
||||
}
|
||||
else
|
||||
for(int l=0; l<cw.at->type; l++) v.push_back(getId(cw+l+wstep));
|
||||
}
|
||||
|
||||
int N = isize(samples);
|
||||
@@ -3463,7 +3463,7 @@ namespace halloween {
|
||||
else if(CHANCE(5) && itr >= 60) {
|
||||
dragoncount++;
|
||||
}
|
||||
else if(dragoncount && !nonbitrunc && !mcount) {
|
||||
else if(dragoncount && BITRUNCATED && !mcount) {
|
||||
bool fill = false;
|
||||
for(int i=0; i<4; i++)
|
||||
if(!dragoncells[i] || dragoncells[i]->monst)
|
||||
|
||||
Reference in New Issue
Block a user