From ead665e3119c822e981d209aa70eb80f917cb5a4 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 3 Nov 2017 22:39:46 +0100 Subject: [PATCH] made Power and Palace work on big spheres, be random on other non-stdeuc geometries --- landgen.cpp | 26 ++++++++++++++++++-------- landlock.cpp | 2 +- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/landgen.cpp b/landgen.cpp index b1f2f871..7fe8ef8a 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -109,7 +109,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { case laPalace: // ------------------------------------------------------------- - if(weirdhyperbolic) { + if(weirdhyperbolic || torus || S7 < 5) { if(d == 9) { int i = hrand(100); if(i < 10) @@ -134,17 +134,18 @@ void giantLandSwitch(cell *c, int d, cell *from) { } if(d == 8 && sphere) { - if(getHemisphere(c,0) == 1) + int gs = getHemisphere(c,0); + if(gs == 1) c->wall = waPalace; - if(getHemisphere(c,0) == 3) + if(gs == 3) c->wall = nontruncated ? waOpenGate : waClosedGate; - if(getHemisphere(c,0) == 4 && hrand(100) < 40) + if(gs == 4 && hrand(100) < 40) c->wall = waClosePlate; - if(getHemisphere(c,0) == 6) + if(gs == 6) c->wall = waOpenPlate; - if(getHemisphere(c,0) == -3) + if(gs == -3) c->wall = pick(waClosePlate, waOpenPlate); - if(getHemisphere(c,0) == -6) + if(gs == -6) c->wall = waTrapdoor; } @@ -370,7 +371,16 @@ void giantLandSwitch(cell *c, int d, cell *from) { int v; if(randomPatternsMode) v = RANDPAT ? 24 : 0; - else if(torus) v=0; + else if(sphere) { + int gs = getHemisphere(c, 0); + if(gs == -3 || gs == -1 || gs == 1 || gs == 3) + v = 24; + else + v = 6; + } + else if(torus || weirdhyperbolic || quotient) { + v = hrand(100) < 25 ? 24 : 16; + } else if(euclid) { eucoord x, y; decodeMaster(c->master, x, y); diff --git a/landlock.cpp b/landlock.cpp index 1309dfad..47e7139a 100644 --- a/landlock.cpp +++ b/landlock.cpp @@ -1117,7 +1117,7 @@ int isLandValid(eLand l) { } // laPower and laEmerald and laPalace -> [partial] in quotients and weirdhyperbolic - if((l == laPower || l == laEmerald || l == laPalace) && !stdeuc && !(bigsphere && !elliptic)) + if((l == laPower || l == laEmerald || l == laPalace) && !stdeuc && !bigsphere) return 1; if(l == laDragon && !stdeuc)