1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-26 23:23:18 +00:00

fixed Crossroads in ls::single, also enabled Crossroads V

This commit is contained in:
Zeno Rogue 2021-04-23 19:45:50 +02:00
parent f3b359940e
commit e960b82e17
6 changed files with 41 additions and 10 deletions

View File

@ -326,6 +326,8 @@ EX void extendCR5(cell *c) {
eLand nland = forbidden; eLand nland = forbidden;
for(int i=0; i<10 && (nland == forbidden || nland == forbidden2); i++) for(int i=0; i<10 && (nland == forbidden || nland == forbidden2); i++)
nland = getNewLand(laCrossroads5); nland = getNewLand(laCrossroads5);
if(ls::single() && specialland == laCrossroads5)
nland = laCrossroads5;
cw.at->barleft = forbidden2 = nland; cw.at->barleft = forbidden2 = nland;
landcount[nland]++; landcount[nland]++;
extendBarrier(cw.at); extendBarrier(cw.at);
@ -731,7 +733,10 @@ EX void buildCrossroads2(cell *c) {
oldleft = false; oldleft = false;
c->landparam = h; c->landparam = h;
buildBarrierStrong(c, i, oldleft); if(ls::single())
buildBarrierStrong(c, i, oldleft, specialland);
else
buildBarrierStrong(c, i, oldleft);
c->landparam = h; c->landparam = h;
extendBarrier(c); extendBarrier(c);
} }

View File

@ -1461,9 +1461,36 @@ EX void build_walls(cell *c, cell *from) {
buildBarrier(c, bd, laTerracotta); buildBarrier(c, bd, laTerracotta);
return; return;
} }
if(ctof(c) && ls::single() && specialland == laCrossroads && hrand(I10000) < 5000) {
int bd = 2 + hrand(2) * 3;
buildBarrier(c, bd, laCrossroads);
return;
}
if(ctof(c) && ls::single() && specialland == laCrossroads3) {
int bd = 2 + hrand(2) * 3;
buildBarrier(c, bd, laCrossroads3);
return;
}
if(ctof(c) && ls::single() && specialland == laCrossroads5) {
int bd = 2 + hrand(2) * 3;
buildBarrier(c, bd, laCrossroads5);
return;
}
if(ctof(c) && ls::single() && specialland == laCrossroads2 && false) {
int bd = 2 + hrand(2) * 3;
buildBarrier(c, bd, laCrossroads2);
return;
}
} }
if(ls::single()) return; if(c->land == laCrossroads2 && BITRUNCATED)
buildCrossroads2(c);
else if(ls::single()) return;
if(geometry == gNormal && celldist(c) < 3 && !GOLDBERG) { if(geometry == gNormal && celldist(c) < 3 && !GOLDBERG) {
if(top_land && c == cwt.at->master->move(3)->c7) { if(top_land && c == cwt.at->master->move(3)->c7) {
@ -1518,9 +1545,6 @@ EX void build_walls(cell *c, cell *from) {
else if(!nice_walls_available()) ; // non-Nowall barriers not implemented yet in weird hyperbolic else if(!nice_walls_available()) ; // non-Nowall barriers not implemented yet in weird hyperbolic
else if(c->land == laCrossroads2 && BITRUNCATED)
buildCrossroads2(c);
#if CAP_FIELD #if CAP_FIELD
else if(c->land == laPrairie && c->LHU.fi.walldist == 0 && !euclid && ls::nice_walls()) { else if(c->land == laPrairie && c->LHU.fi.walldist == 0 && !euclid && ls::nice_walls()) {
for(int bd=0; bd<7; bd++) { for(int bd=0; bd<7; bd++) {

View File

@ -691,7 +691,7 @@ EX vector<landtacinfo> land_tac = {
{laElementalWall, 10, 1}, {laTrollheim, 5, 2}, {laElementalWall, 10, 1}, {laTrollheim, 5, 2},
{laPrairie, 5, 2}, {laBull, 5, 2}, {laTerracotta, 10, 1}, {laPrairie, 5, 2}, {laBull, 5, 2}, {laTerracotta, 10, 1},
{laCrossroads, 10, 1}, {laCrossroads2, 10, 1}, {laCrossroads3, 10, 1}, {laCrossroads4, 10, 1}, {laCrossroads, 10, 1}, {laCrossroads2, 10, 1}, {laCrossroads3, 10, 1}, {laCrossroads4, 10, 1}, {laCrossroads5, 5, 2},
{laCamelot, 1, 100}, {laCamelot, 1, 100},
{laWildWest, 10, 1}, {laWildWest, 10, 1},

View File

@ -2461,7 +2461,10 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
else { else {
if(hyperstonesUnlocked() && hrand(25000) < min(PT(tkills(), 2000), 5000) && notDippingFor(itHyperstone)) if(hyperstonesUnlocked() && hrand(25000) < min(PT(tkills(), 2000), 5000) && notDippingFor(itHyperstone))
c->item = itHyperstone; c->item = itHyperstone;
if(hrand_monster(4000) < items[itHyperstone] && !c->monst) { int freq = 4000;
if(ls::single() && specialland == laCrossroads5)
freq = 250;
if(hrand_monster(freq) < items[itHyperstone] && !c->monst) {
// only interesting monsters here! // only interesting monsters here!
eMonster cm = crossroadsMonster(); eMonster cm = crossroadsMonster();
if(cm == moIvyRoot) buildIvy(c, 0, c->type); if(cm == moIvyRoot) buildIvy(c, 0, c->type);

View File

@ -231,7 +231,7 @@ EX void countHyperstoneQuest(int& i1, int& i2) {
EX bool hyperstonesUnlocked() { EX bool hyperstonesUnlocked() {
int i1, i2; int i1, i2;
if(tactic::on && isCrossroads(specialland)) return true; if(ls::single() && isCrossroads(specialland)) return true;
countHyperstoneQuest(i1, i2); countHyperstoneQuest(i1, i2);
return i1 == i2; return i1 == i2;
} }
@ -878,7 +878,7 @@ EX land_validity_t& land_validity(eLand l) {
return not_in_chaos; return not_in_chaos;
// standard, non-PTM specific // standard, non-PTM specific
if(l == laCrossroads5 && tactic::on) if(l == laCrossroads5 && old_daily_id < 999 && tactic::on)
return not_in_ptm; return not_in_ptm;
// standard non-PTM non-chaos specific // standard non-PTM non-chaos specific

View File

@ -180,7 +180,6 @@ EX void initgame() {
if(firstland == laNone || firstland == laBarrier) if(firstland == laNone || firstland == laBarrier)
firstland = laCrossroads; firstland = laCrossroads;
if(firstland == laCrossroads5 && !tactic::on) firstland = laCrossroads2; // could not fit!
if(firstland == laOceanWall) firstland = laOcean; if(firstland == laOceanWall) firstland = laOcean;
if(firstland == laHauntedWall) firstland = laGraveyard; if(firstland == laHauntedWall) firstland = laGraveyard;
if(firstland == laMercuryRiver) firstland = laTerracotta; if(firstland == laMercuryRiver) firstland = laTerracotta;