From 0c779f8067316cebe68d0376adbb4f3c6f241f1a Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 3 Nov 2017 21:12:59 +0100 Subject: [PATCH] Mercury Rivers added when applicable --- bigstuff.cpp | 15 +++++++++++++-- cell.cpp | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/bigstuff.cpp b/bigstuff.cpp index 8f6344af..c080761e 100644 --- a/bigstuff.cpp +++ b/bigstuff.cpp @@ -712,9 +712,12 @@ void setLandSphere(cell *c) { if(c->land == laElementalWall && c->type != 6) c->wall = getElementalWall(hrand(2) ? c->barleft : c->barright); } - if(specialland == laCrossroads || specialland == laCrossroads2 || specialland == laCrossroads3) { + if(!torus) + if(specialland == laCrossroads || specialland == laCrossroads2 || specialland == laCrossroads3 || specialland == laTerracotta) { int x = getHemisphere(c, 1); - if(x == 0 || (specialland == laCrossroads3 && getHemisphere(c, 2) == 0)) + if(x == 0 && specialland == laTerracotta) + setland(c, laMercuryRiver), c->wall = waMercury; + else if(x == 0 || (specialland == laCrossroads3 && getHemisphere(c, 2) == 0)) setland(c, laBarrier), c->wall = waBarrier; else setland(c, specialland); if(specialland == laCrossroads3 && c->type != 6 && c->master->fiftyval == 1) @@ -772,6 +775,14 @@ void setLandEuclid(cell *c) { decodeMaster(c->master, x, y); setland(c, getEuclidLand(y+2*x)); } + if(specialland == laTerracotta) { + eucoord x, y; + decodeMaster(c->master, x, y); + if((y+2*x) % 16 == 1) { + setland(c, laMercuryRiver); + c->wall = waMercury; + } + } if(specialland == laCrossroads4) { eucoord x, y; decodeMaster(c->master, x, y); diff --git a/cell.cpp b/cell.cpp index cf1f9a22..2723e413 100644 --- a/cell.cpp +++ b/cell.cpp @@ -1516,7 +1516,7 @@ int getHemisphere(cell *c, int which) { else { int score = 0; for(int i=0; i<6; i+=2) - score += getHemisphere(c->mov[i], which); + score += getHemisphere(c->mov[i], which) * (c->mirror(i) ? -1 : 1); return score/3; } }