mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-22 23:17:04 +00:00
CAP_COMPLEX2 first
This commit is contained in:
parent
c5a771c888
commit
31037574f5
@ -1156,8 +1156,10 @@ void buildBigStuff(cell *c, cell *from) {
|
||||
hrand(2000) < (PURE ? 500 : 1000) && !tactic::on && !racing::on && !yendor::on)))
|
||||
createAlternateMap(c, 2, hsA);
|
||||
|
||||
#if CAP_COMPLEX2
|
||||
if(c->land == laOcean && deepOcean && !generatingEquidistant && hrand(10000) < 20 && no_barriers_in_radius(c, 2) && hyperbolic && !quotient && !tactic::on)
|
||||
brownian::init_further(c);
|
||||
#endif
|
||||
|
||||
if(c->land == laCaribbean && horo_ok() && ctof(c) && !c->master->alt)
|
||||
createAlternateMap(c, 2, hsA);
|
||||
|
@ -257,7 +257,9 @@ void initConfig() {
|
||||
savecolortable(p.second, s0+"canvas"+p.first);
|
||||
savecolortable(distcolors, "distance");
|
||||
savecolortable(minecolors, "mines");
|
||||
#if CAP_COMPLEX2
|
||||
savecolortable(brownian::colors, "color:brown");
|
||||
#endif
|
||||
|
||||
for(int i=0; i<motypes; i++)
|
||||
addsaver(minf[i].color, "color:monster:" + its(i));
|
||||
@ -1651,8 +1653,10 @@ void show_color_dialog() {
|
||||
dialog::openColorDialog(iinf[c->item].color);
|
||||
else if(c->wall)
|
||||
dialog::openColorDialog(winf[c->wall == waMineMine ? waMineUnknown : c->wall].color);
|
||||
#if CAP_COMPLEX2
|
||||
else if(c->land == laBrownian)
|
||||
dialog::openColorDialog(brownian::get_color_edit(c->landparam));
|
||||
#endif
|
||||
else
|
||||
dialog::openColorDialog(floorcolors[c->land]);
|
||||
dialog::colorAlpha = false;
|
||||
|
2
game.cpp
2
game.cpp
@ -6179,8 +6179,10 @@ void movemonsters() {
|
||||
if(havewhat & HF_WHIRLPOOL) whirlpool::move();
|
||||
DEBT("whirlwind");
|
||||
if(havewhat & HF_WHIRLWIND) whirlwind::move();
|
||||
#if CAP_COMPLEX2
|
||||
DEBT("westwall");
|
||||
if(havewhat & HF_WESTWALL) westwall::move();
|
||||
#endif
|
||||
for(int i=0; i<numplayers(); i++) if(playerpos(i)->item == itOrbSafety) return;
|
||||
DEBT("river");
|
||||
if(havewhat & HF_RIVER) prairie::move();
|
||||
|
@ -2861,6 +2861,7 @@ void setcolors(cell *c, color_t& wcol, color_t& fcol) {
|
||||
case laAlchemist:
|
||||
fcol = floorcolors[c->land]; break;
|
||||
|
||||
#if CAP_COMPLEX2
|
||||
case laVariant: {
|
||||
int b = getBits(c);
|
||||
fcol = 0x404040;
|
||||
@ -2873,6 +2874,7 @@ void setcolors(cell *c, color_t& wcol, color_t& fcol) {
|
||||
wcol = 0x202020;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
case laRuins:
|
||||
fcol = pseudohept(c) ? 0xC0E0C0 : 0x40A040;
|
||||
@ -3586,8 +3588,10 @@ int getSnakelevColor(cell *c, int i, int last, int fd, color_t wcol) {
|
||||
col = 0xD0D0D0-i*0x101010;
|
||||
else if(c->land == laSnakeNest)
|
||||
return darkena(nestcolors[pattern_threecolor(c)] * (5 + i) / 4, 0, 0xFF);
|
||||
#if CAP_COMPLEX2
|
||||
else if(c->land == laBrownian)
|
||||
col = brownian::get_color(c->landparam % brownian::level + (i+1) * brownian::level);
|
||||
#endif
|
||||
else if(i == last-1)
|
||||
col = wcol;
|
||||
else
|
||||
|
@ -1131,12 +1131,14 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
break;
|
||||
|
||||
case laWestWall:
|
||||
#if CAP_COMPLEX2
|
||||
if(d == 9)
|
||||
westwall::switchTreasure(c);
|
||||
ONEMPTY {
|
||||
if(hrand(6000) < 5 + items[itWest] + yendor::hardness())
|
||||
c->monst = hrand(100) < 20 ? moWestHawk : moFallingDog;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
case laWhirlwind:
|
||||
@ -2278,6 +2280,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
break;
|
||||
|
||||
case laVariant: {
|
||||
#if CAP_COMPLEX2
|
||||
int b = getBits(c);
|
||||
if(d == 9) {
|
||||
int treasure_rate = 2;
|
||||
@ -2293,6 +2296,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
c->wall = waNone;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
case laNone:
|
||||
@ -2513,7 +2517,9 @@ void setdist(cell *c, int d, cell *from) {
|
||||
buildEquidistant(c);
|
||||
}
|
||||
|
||||
#if CAP_COMPLEX2
|
||||
if(d < BARLEV) brownian::apply_futures(c);
|
||||
#endif
|
||||
|
||||
giantLandSwitch(c, d, from);
|
||||
|
||||
|
@ -413,6 +413,7 @@ void wandering() {
|
||||
continue;
|
||||
}
|
||||
|
||||
#if CAP_COMPLEX2
|
||||
else if(c->land == laBrownian && wchance(items[itBrownian], 75)) {
|
||||
c->monst = moAcidBird;
|
||||
continue;
|
||||
@ -426,6 +427,7 @@ void wandering() {
|
||||
}
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
else if(c->wall == waSea && !c->monst) {
|
||||
if(c->land == laCaribbean && wchance(items[itPirate], 15) && canReachPlayer(c, moPirate)) {
|
||||
|
@ -1300,6 +1300,7 @@ void oceanCurrents(transmatrix& nat, monster *m, int delta) {
|
||||
bool airCurrents(transmatrix& nat, monster *m, int delta) {
|
||||
bool carried = false;
|
||||
cell *c = m->base;
|
||||
#if CAP_COMPLEX2
|
||||
if(c->land == laWestWall) {
|
||||
cell *c2 = ts::left_of(c, westwall::coastvalEdge1);
|
||||
|
||||
@ -1318,6 +1319,7 @@ bool airCurrents(transmatrix& nat, monster *m, int delta) {
|
||||
carried = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if(c->land == laWhirlwind) {
|
||||
whirlwind::calcdirs(c);
|
||||
for(int i=0; i<whirlwind::qdirs; i++) {
|
||||
@ -3168,7 +3170,9 @@ void turn(int delta) {
|
||||
heat::processfires();
|
||||
if(havewhat&HF_WHIRLPOOL) whirlpool::move();
|
||||
if(havewhat&HF_WHIRLWIND) whirlwind::move();
|
||||
#if CAP_COMPLEX2
|
||||
if(havewhat & HF_WESTWALL) westwall::move();
|
||||
#endif
|
||||
buildRosemap();
|
||||
if(havewhat&HF_RIVER) prairie::move();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user