From f375ac498a1587b97edb5193698a0af621c2244b Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 12 Apr 2018 11:00:51 +0200 Subject: [PATCH] Zebra, Palace, Power, and Vineyard are now OK in gp --- game.cpp | 2 +- landgen.cpp | 12 ++++++++++-- landlock.cpp | 6 ------ pattern2.cpp | 4 ++++ 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/game.cpp b/game.cpp index 0313d9ec..97278081 100644 --- a/game.cpp +++ b/game.cpp @@ -3166,7 +3166,7 @@ void toggleGates(cell *ct, eWall type) { if(type == waClosePlate && nonbitrunc && !gp::on) toggleGates(ct, type, 2); else - toggleGates(ct, type, 3); + toggleGates(ct, type, gp::on ? gp::dist_3() : 3); if(numgates && type == waClosePlate) playSound(ct, "closegate"); if(numgates && type == waOpenPlate) diff --git a/landgen.cpp b/landgen.cpp index c30b4579..251c6267 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -164,7 +164,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { case laPalace: // ------------------------------------------------------------- - if(weirdhyperbolic || torus || S7 < 5) { + if(hyperbolic_not37 || torus || S7 < 5) { if(d == 9) { int i = hrand(100); if(i < 10) @@ -213,6 +213,14 @@ void giantLandSwitch(cell *c, int d, cell *from) { if(nonbitrunc) { int i = fiftyval049(c); if(i >= 8 && i <= 14 && !polarb50(c)) pgate = true; + if(gp::on) { + bool good = false; + forCellEx(c2, c) { + int i2 = fiftyval049(c2); + if((i2 < 8) && polarb50(c2)) good = true; + } + pgate = pgate && good; + } } if(pgate) { @@ -425,7 +433,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { else v = 6; } - else if(torus || weirdhyperbolic || quotient) { + else if(torus || hyperbolic_not37 || quotient) { v = hrand(100) < 25 ? 24 : 16; } else if(euclid) { diff --git a/landlock.cpp b/landlock.cpp index 1c2cd885..85450a09 100644 --- a/landlock.cpp +++ b/landlock.cpp @@ -1215,9 +1215,6 @@ int isLandValid(eLand l) { if((l == laPower || l == laEmerald || l == laPalace) && !stdeuc && !bigsphere) return 1; - if((l == laPower || l == laEmerald || l == laPalace) && gp::on) - return 1; - if(l == laDragon && !stdeuc) return 1; @@ -1253,9 +1250,6 @@ int isLandValid(eLand l) { if(l == laZebra && !(stdeuc || (a4 && nonbitrunc) || a46 || quotient == 1)) return 0; - if(l == laZebra && gp::on) - return 1; - if(l == laCrossroads3 && euclid) return 1; // because it is not accurate diff --git a/pattern2.cpp b/pattern2.cpp index 3f549c9f..16a2e030 100644 --- a/pattern2.cpp +++ b/pattern2.cpp @@ -128,6 +128,7 @@ int land50(cell *c) { int polara50(cell *c) { if(c->type != 6) return polara50(fiftyval(c)); else if(sphere || euclid || S7>7 || S6>6) return 0; + else if(gp::on) return polara50(fiftyval(c->master->c7)); else { if(cdist50(createMov(c,0)) < 3) return polara50(createMov(c,0)); if(cdist50(createMov(c,2)) < 3) return polara50(createMov(c,2)); @@ -140,6 +141,7 @@ int polarb50(cell *c) { if(euclid) return true; if(c->type != 6) return polarb50(fiftyval(c)); else if(sphere || euclid || S7>7 || S6>6) return true; + else if(gp::on) return polarb50(fiftyval(c->master->c7)); else { if(cdist50(createMov(c,0)) < 3) return polarb50(createMov(c,0)); if(cdist50(createMov(c,2)) < 3) return polarb50(createMov(c,2)); @@ -248,6 +250,7 @@ int zebra40(cell *c) { else return 4+(v-4)/2; } else if(ctof(c)) return (c->master->zebraval/10); + else if(gp::on) return zebra40(c->master->c7); else if(a4) { int ws = dir_bitrunc457(c); if(ws < 0) return -ws; @@ -298,6 +301,7 @@ int zebra40(cell *c) { int zebra3(cell *c) { if(c->type != 6) return (c->master->zebraval/10)/4; else if(sphere || S7>7 || S6>6) return 0; + else if(gp::on) return zebra40(c->master->c7); else { int ii[3]; ii[0] = (c->mov[0]->master->zebraval/10)/4;