1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-18 11:19:59 +00:00

made Power and Palace work on big spheres, be random on other non-stdeuc geometries

This commit is contained in:
Zeno Rogue 2017-11-03 22:39:46 +01:00
parent afa50f744e
commit ead665e311
2 changed files with 19 additions and 9 deletions

View File

@ -109,7 +109,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
case laPalace: // ------------------------------------------------------------- case laPalace: // -------------------------------------------------------------
if(weirdhyperbolic) { if(weirdhyperbolic || torus || S7 < 5) {
if(d == 9) { if(d == 9) {
int i = hrand(100); int i = hrand(100);
if(i < 10) if(i < 10)
@ -134,17 +134,18 @@ void giantLandSwitch(cell *c, int d, cell *from) {
} }
if(d == 8 && sphere) { if(d == 8 && sphere) {
if(getHemisphere(c,0) == 1) int gs = getHemisphere(c,0);
if(gs == 1)
c->wall = waPalace; c->wall = waPalace;
if(getHemisphere(c,0) == 3) if(gs == 3)
c->wall = nontruncated ? waOpenGate : waClosedGate; c->wall = nontruncated ? waOpenGate : waClosedGate;
if(getHemisphere(c,0) == 4 && hrand(100) < 40) if(gs == 4 && hrand(100) < 40)
c->wall = waClosePlate; c->wall = waClosePlate;
if(getHemisphere(c,0) == 6) if(gs == 6)
c->wall = waOpenPlate; c->wall = waOpenPlate;
if(getHemisphere(c,0) == -3) if(gs == -3)
c->wall = pick(waClosePlate, waOpenPlate); c->wall = pick(waClosePlate, waOpenPlate);
if(getHemisphere(c,0) == -6) if(gs == -6)
c->wall = waTrapdoor; c->wall = waTrapdoor;
} }
@ -370,7 +371,16 @@ void giantLandSwitch(cell *c, int d, cell *from) {
int v; int v;
if(randomPatternsMode) if(randomPatternsMode)
v = RANDPAT ? 24 : 0; 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) { else if(euclid) {
eucoord x, y; eucoord x, y;
decodeMaster(c->master, x, y); decodeMaster(c->master, x, y);

View File

@ -1117,7 +1117,7 @@ int isLandValid(eLand l) {
} }
// laPower and laEmerald and laPalace -> [partial] in quotients and weirdhyperbolic // 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; return 1;
if(l == laDragon && !stdeuc) if(l == laDragon && !stdeuc)