mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-13 14:42:50 +00:00
factored elementalXY
This commit is contained in:
parent
4d66505b66
commit
6bd4d748f0
28
bigstuff.cpp
28
bigstuff.cpp
@ -822,16 +822,7 @@ void setLandQuotient(cell *c) {
|
|||||||
if(specialland == laWestWall) c->land = laCrossroads4;
|
if(specialland == laWestWall) c->land = laCrossroads4;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setLandSphere(cell *c) {
|
void elementalXY(cell *c, int x, int y, bool make_wall) {
|
||||||
setland(c, specialland);
|
|
||||||
if(specialland == laWarpCoast)
|
|
||||||
setland(c, getHemisphere(c, 0) > 0 ? laWarpCoast : laWarpSea);
|
|
||||||
if(specialland == laWestWall) c->land = laCrossroads4;
|
|
||||||
if(specialland == laClearing)
|
|
||||||
c->land = laClearing;
|
|
||||||
if(specialland == laElementalWall) {
|
|
||||||
int x = getHemisphere(c, 1);
|
|
||||||
int y = getHemisphere(c, 2);
|
|
||||||
if(x > 0 && y > 0) setland(c, laEFire);
|
if(x > 0 && y > 0) setland(c, laEFire);
|
||||||
else if(x > 0 && y < 0) setland(c, laEAir);
|
else if(x > 0 && y < 0) setland(c, laEAir);
|
||||||
else if(x < 0 && y < 0) setland(c, laEWater);
|
else if(x < 0 && y < 0) setland(c, laEWater);
|
||||||
@ -844,9 +835,24 @@ void setLandSphere(cell *c) {
|
|||||||
c->land = laElementalWall, c->barleft = laEEarth, c->barright = laEFire;
|
c->land = laElementalWall, c->barleft = laEEarth, c->barright = laEFire;
|
||||||
else if(y < 0)
|
else if(y < 0)
|
||||||
c->land = laElementalWall, c->barleft = laEAir, c->barright = laEWater;
|
c->land = laElementalWall, c->barleft = laEAir, c->barright = laEWater;
|
||||||
if(c->land == laElementalWall && (c->type != 6 || GOLDBERG))
|
if(x == 0 && y == 0)
|
||||||
|
c->land = laElementalWall, c->wall = waBarrier;
|
||||||
|
else if(c->land == laElementalWall && make_wall)
|
||||||
c->wall = getElementalWall(hrand(2) ? c->barleft : c->barright);
|
c->wall = getElementalWall(hrand(2) ? c->barleft : c->barright);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setLandSphere(cell *c) {
|
||||||
|
setland(c, specialland);
|
||||||
|
if(specialland == laWarpCoast)
|
||||||
|
setland(c, getHemisphere(c, 0) > 0 ? laWarpCoast : laWarpSea);
|
||||||
|
if(specialland == laWestWall) c->land = laCrossroads4;
|
||||||
|
if(specialland == laClearing)
|
||||||
|
c->land = laClearing;
|
||||||
|
if(specialland == laElementalWall) {
|
||||||
|
int x = getHemisphere(c, 1);
|
||||||
|
int y = getHemisphere(c, 2);
|
||||||
|
elementalXY(c, x, y, (c->type != 6 || GOLDBERG));
|
||||||
|
}
|
||||||
if(!euwrap)
|
if(!euwrap)
|
||||||
if(specialland == laCrossroads || specialland == laCrossroads2 || specialland == laCrossroads3 || specialland == laTerracotta) {
|
if(specialland == laCrossroads || specialland == laCrossroads2 || specialland == laCrossroads3 || specialland == laTerracotta) {
|
||||||
int x = getHemisphere(c, 1);
|
int x = getHemisphere(c, 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user