1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-01-11 18:00:34 +00:00

improved Camelot, Temple; fixed Whirlpool

This commit is contained in:
Zeno Rogue 2017-10-30 10:29:15 +01:00
parent d2fc8b41ba
commit 055307712a
3 changed files with 21 additions and 8 deletions

View File

@ -421,6 +421,10 @@ bool checkInTree(cell *c, int maxv) {
void buildEquidistant(cell *c) { void buildEquidistant(cell *c) {
if(!c) return; if(!c) return;
if(c->landparam) return; if(c->landparam) return;
if(weirdhyperbolic) {
c->landparam = 50;
return;
}
if(geometry) return; if(geometry) return;
eLand b = c->land; eLand b = c->land;
if(chaosmode && !inmirror(b)) return; if(chaosmode && !inmirror(b)) return;
@ -876,6 +880,7 @@ void buildBigStuff(cell *c, cell *from) {
} }
if(generatingEquidistant) deepOcean = false; if(generatingEquidistant) deepOcean = false;
if(weirdhyperbolic && c->land == laOcean) deepOcean = true;
// buildgreatwalls // buildgreatwalls
@ -1094,14 +1099,22 @@ void moreBigStuff(cell *c) {
if(!euclid) generateAlts(c->master); if(!euclid) generateAlts(c->master);
preventbarriers(c); preventbarriers(c);
if(d == 10) { if(d == 10) {
if(pseudohept(c)) buildCamelotWall(c); if(weirdhyperbolic ? hrand(100) < 50 : pseudohept(c)) buildCamelotWall(c);
else { else {
if(!euclid) for(int i=0; i<S7; i++) generateAlts(c->master->move[i]); if(!euclid) for(int i=0; i<S7; i++) generateAlts(c->master->move[i]);
int q = 0; int q = 0;
for(int t=0; t<S6; t++) { if(weirdhyperbolic) {
for(int t=0; t<c->type; t++) createMov(c, t);
q = hrand(100);
if(q < 10) q = 0;
else if(q < 50) q = 1;
}
else {
for(int t=0; t<c->type; t++) {
createMov(c, t); createMov(c, t);
if(celldistAltRelative(c->mov[t]) == 10 && !pseudohept(c->mov[t])) q++; if(celldistAltRelative(c->mov[t]) == 10 && !pseudohept(c->mov[t])) q++;
} }
}
if(q == 1) buildCamelotWall(c); if(q == 1) buildCamelotWall(c);
// towers of Camelot // towers of Camelot
if(q == 0 && !purehepta) { if(q == 0 && !purehepta) {
@ -1163,12 +1176,12 @@ void moreBigStuff(cell *c) {
c->land = laTemple, c->wall = waNone, c->monst = moNone, c->item = itNone; c->land = laTemple, c->wall = waNone, c->monst = moNone, c->item = itNone;
} }
if(d % TEMPLE_EACH==0) { if(d % TEMPLE_EACH==0) {
if(pseudohept(c)) if((weirdhyperbolic && purehepta) ? hrand(100) < 50 : pseudohept(c))
c->wall = waColumn; c->wall = waColumn;
else { else {
if(!euclid) for(int i=0; i<S7; i++) generateAlts(c->master->move[i]); if(!euclid) for(int i=0; i<S7; i++) generateAlts(c->master->move[i]);
int q = 0; int q = 0;
for(int t=0; t<6; t++) { for(int t=0; t<c->type; t++) {
createMov(c, t); createMov(c, t);
if(celldistAlt(c->mov[t]) % TEMPLE_EACH == 0 && !ishept(c->mov[t])) q++; if(celldistAlt(c->mov[t]) % TEMPLE_EACH == 0 && !ishept(c->mov[t])) q++;
} }

View File

@ -1625,7 +1625,7 @@ eLand land_sph[LAND_SPH] = {
#define LAND_OCT 36 #define LAND_OCT 36
eLand land_oct[LAND_OCT] = { eLand land_oct[LAND_OCT] = {
laWarpCoast, laIce, laDesert, laCaves, laJungle, laAlchemist, laWarpCoast, laIce, laDesert, laCaves, laJungle, laAlchemist,
laGraveyard, laRlyeh, laHell, laCocytus, laMotion, laGraveyard, laTemple, laHell, laCocytus, laMotion,
laDryForest, laDeadCaves, laRedRock, laMinefield, laLivefjord, laDryForest, laDeadCaves, laRedRock, laMinefield, laLivefjord,
laStorms, laOvergrown, laRose, laKraken, laBurial, laStorms, laOvergrown, laRose, laKraken, laBurial,
laTrollheim, laBull, laHunting, laTrollheim, laBull, laHunting,

View File

@ -898,7 +898,7 @@ namespace whirlpool {
if(i == c->type) return NULL; if(i == c->type) return NULL;
if(d>d2) next = -next; if(d>d2) next = -next;
for(int j=1; j<c->type; j++) { for(int j=1; j<c->type; j++) {
cell *c2 = c->mov[(i+420+next*j) % c->type]; cell *c2 = c->mov[(i+MODFIXER+next*j) % c->type];
if(celldistAlt(c2) == d) return c2; if(celldistAlt(c2) == d) return c2;
} }
return NULL; return NULL;