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

patched chaos now uses cheatdest_list

This commit is contained in:
Zeno Rogue 2023-03-24 23:17:43 +01:00
parent d3da7dddc9
commit 1e68511d46

View File

@ -2832,11 +2832,15 @@ EX void setland_randomwalk(cell *c) {
}
}
EX eLand random_land() {
return hrand_elt(isize(cheatdest_list) ? cheatdest_list : currentlands);
}
EX void set_land_for_geometry(cell *c) {
if(!c->land && isize(currentlands)) {
if(land_structure == lsTotalChaos) {
setland(c, currentlands[hrand(isize(currentlands))]);
setland(c, random_land());
return;
}
/* note: Nil patched chaos done in setLandNil */
@ -2847,7 +2851,7 @@ EX void set_land_for_geometry(cell *c) {
break;
again: ;
}
if(!c2->land) setland(c2, currentlands[hrand(isize(currentlands))]);
if(!c2->land) setland(c2, random_land());
c->land = c2->land;
return;
}
@ -2857,7 +2861,7 @@ EX void set_land_for_geometry(cell *c) {
c2 = c->master->cmove(0)->cmove(0)->cmove(1)->cmove(1)->c7;
else
c2 = c->master->cmove(0)->cmove(0)->cmove(0)->cmove(0)->cmove(0)->cmove(1)->cmove(1)->cmove(1)->cmove(1)->cmove(1)->c7;
if(!c2->land) setland(c2, currentlands[hrand(isize(currentlands))]);
if(!c2->land) setland(c2, random_land());
c->land = c2->land;
return;
}