1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

Mercury Rivers added when applicable

This commit is contained in:
Zeno Rogue 2017-11-03 21:12:59 +01:00
parent bc3003500d
commit 0c779f8067
2 changed files with 14 additions and 3 deletions

View File

@ -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);

View File

@ -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;
}
}