1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-20 04:09:59 +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;
for(int i=0; i<10 && (nland == forbidden || nland == forbidden2); i++)
nland = getNewLand(laCrossroads5);
if(ls::single() && specialland == laCrossroads5)
nland = laCrossroads5;
cw.at->barleft = forbidden2 = nland;
landcount[nland]++;
extendBarrier(cw.at);
@ -731,7 +733,10 @@ EX void buildCrossroads2(cell *c) {
oldleft = false;
c->landparam = h;
buildBarrierStrong(c, i, oldleft);
if(ls::single())
buildBarrierStrong(c, i, oldleft, specialland);
else
buildBarrierStrong(c, i, oldleft);
c->landparam = h;
extendBarrier(c);
}

View File

@ -1461,9 +1461,36 @@ EX void build_walls(cell *c, cell *from) {
buildBarrier(c, bd, laTerracotta);
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(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(c->land == laCrossroads2 && BITRUNCATED)
buildCrossroads2(c);
#if CAP_FIELD
else if(c->land == laPrairie && c->LHU.fi.walldist == 0 && !euclid && ls::nice_walls()) {
for(int bd=0; bd<7; bd++) {

View File

@ -691,7 +691,7 @@ EX vector<landtacinfo> land_tac = {
{laElementalWall, 10, 1}, {laTrollheim, 5, 2},
{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},
{laWildWest, 10, 1},

View File

@ -2461,7 +2461,10 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
else {
if(hyperstonesUnlocked() && hrand(25000) < min(PT(tkills(), 2000), 5000) && notDippingFor(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!
eMonster cm = crossroadsMonster();
if(cm == moIvyRoot) buildIvy(c, 0, c->type);

View File

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

View File

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