mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-04-21 02:03:16 +00:00
started the 'Brownian' land
This commit is contained in:
parent
81e7dfcad0
commit
4aa73c560c
@ -1417,6 +1417,7 @@ walltype winf[walltypes] = {
|
||||
{ '=', 0x804000, "dock", "A dock."},
|
||||
{ '^', 0xFF8000, "burning dock", "A burning dock."},
|
||||
{ '#', 0xE04030, "ruin wall", ruindesc},
|
||||
{ '#', 0xA04060, "Brownian generator", NODESC}
|
||||
};
|
||||
|
||||
// --- land types ---
|
||||
@ -1613,6 +1614,7 @@ const landtype linf[landtypes] = {
|
||||
"somehow. In the meantime, its memory has been cleared, since the 'remove faraway cells from the memory'"
|
||||
" option was on."
|
||||
},
|
||||
{ 0xA04060, "Brownian", NODESCYET}
|
||||
};
|
||||
|
||||
vector<landtacinfo> land_tac = {
|
||||
|
@ -120,7 +120,7 @@ enum eItem {
|
||||
itOrbPhasing, itOrbMagnetism, itOrbSlaying
|
||||
};
|
||||
|
||||
static const int walltypes = 108;
|
||||
static const int walltypes = 109;
|
||||
|
||||
struct walltype {
|
||||
char glyph;
|
||||
@ -161,10 +161,10 @@ enum eWall { waNone, waIcewall, waBarrier, waFloorA, waFloorB, waCavewall, waCav
|
||||
waTempBridgeBlocked,
|
||||
waTerraWarrior, waBubble,
|
||||
waArrowTrap, waMercury, waMagma,
|
||||
waDock, waBurningDock, waRuinWall
|
||||
waDock, waBurningDock, waRuinWall, waBrownian
|
||||
};
|
||||
|
||||
static const int landtypes = 84;
|
||||
static const int landtypes = 85;
|
||||
|
||||
struct landtype {
|
||||
int color;
|
||||
@ -191,7 +191,7 @@ enum eLand { laNone, laBarrier, laCrossroads, laDesert, laIce, laCaves, laJungle
|
||||
laMirrorOld,
|
||||
laVolcano, laBlizzard, laHunting, laTerracotta, laMercuryRiver,
|
||||
laDual, laSnakeNest, laDocks, laRuins, laMagnetic,
|
||||
laSwitch, laMemory
|
||||
laSwitch, laMemory, laBrownian
|
||||
};
|
||||
|
||||
enum eGeometry {gNormal, gEuclid, gSphere, gElliptic, gQuotient, gQuotient2, gTorus, gOctagon, g45, g46, g47, gSmallSphere, gTinySphere, gEuclidSquare, gSmallElliptic, gGUARD};
|
||||
|
@ -2656,6 +2656,10 @@ void setcolors(cell *c, int& wcol, int &fcol) {
|
||||
case laWineyard: fcol = 0x006000; break;
|
||||
case laLivefjord: fcol = 0x306030; break;
|
||||
|
||||
case laBrownian:
|
||||
fcol = wcol = gradient(0x002000, 0xFFFFFF, 0, c->landparam, 20);
|
||||
break;
|
||||
|
||||
case laVolcano: {
|
||||
int id = lavatide(c, -1)/4;
|
||||
if(c->wall == waMagma) {
|
||||
|
36
landgen.cpp
36
landgen.cpp
@ -106,6 +106,35 @@ eMonster genRuinMonster(cell *c) {
|
||||
return m;
|
||||
}
|
||||
|
||||
void start_brownian(cell *c, int d) {
|
||||
while(true) {
|
||||
if(c->wall == waBrownian) c->wall = waNone;
|
||||
c->landparam++;
|
||||
// snakepile(c, moRedTroll);
|
||||
// c->wall = waSea;
|
||||
c->bardir = NOBARRIERS;
|
||||
if(d == 0) {
|
||||
if(c->mpdist >= BARLEV) {
|
||||
c->wall = waBrownian;
|
||||
return;
|
||||
}
|
||||
start_brownian(c, 1);
|
||||
d = 1;
|
||||
continue;
|
||||
}
|
||||
int q = 0;
|
||||
cell *good = NULL;
|
||||
forCellCM(c2, c)
|
||||
if(c2->mpdist > 7 && (c2->land == laBrownian || c2->land == laNone)) {
|
||||
q++;
|
||||
if(q==1 || hrand(q) == 0) good = c2;
|
||||
}
|
||||
if(!q) break;
|
||||
d++; if(d == 7) d = 0;
|
||||
c = good;
|
||||
}
|
||||
}
|
||||
|
||||
// the giant switch generating most of the lands...
|
||||
|
||||
void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
@ -2113,6 +2142,11 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
}
|
||||
break;
|
||||
|
||||
case laBrownian:
|
||||
if(c->wall == waBrownian || (d == 9 && hrand(10000) < 5))
|
||||
start_brownian(c, 0);
|
||||
break;
|
||||
|
||||
case laMirrored:
|
||||
case laMirrorWall:
|
||||
case laMirrorWall2:
|
||||
@ -2258,7 +2292,7 @@ void repairLandgen(cell *c) {
|
||||
if(c->wall == waIcewall && c->land != laIce && c->land != laCocytus && c->land != laBlizzard)
|
||||
c->wall = waNone;
|
||||
|
||||
if(c->wall == waRed3 && c->land != laRedRock && c->land != laSnakeNest)
|
||||
if(c->wall == waRed3 && c->land != laRedRock && c->land != laSnakeNest && c->land != laBrownian)
|
||||
c->wall = waNone;
|
||||
|
||||
if(c->item == itRedGem && c->land != laRedRock)
|
||||
|
Loading…
x
Reference in New Issue
Block a user