diff --git a/barriers.cpp b/barriers.cpp index e3595d96..9aa41ab2 100644 --- a/barriers.cpp +++ b/barriers.cpp @@ -616,13 +616,19 @@ EX void extendBarrier(cell *c) { } if(buildBarrier6(cw, 2)) return; } - + if(land_structure == lsCursedWalls && c->barleft != laMirror && c->barright != laMirror && hrand(100) < 80 && !among(laCrossroads2, c->barleft, c->barright)) { cellwalker cw(c, c->bardir); cw = cw + wstep + 3 + wstep - 1; if(buildBarrier6(cw, c->barright, c->barleft)) return; } + if(among(laCrossroads6, c->barleft, c->barright) && hrand(100) < 80) { + cellwalker cw(c, c->bardir); + cw = cw + wstep + 3 + wstep - 1; + if(buildBarrier6(cw, c->barright, c->barleft)) return; + } + if(barrier_cross(c->barleft, c->barright) || (firstmirror && hrand(100) < 60)) { cellwalker cw(c, c->bardir); @@ -839,7 +845,12 @@ EX bool buildBarrier6(cellwalker cw, eLand m0, eLand m1) { setland((b[d+1]-2).cpeek(), m1); setland((b[d+1]+2).cpeek(), m0); } - if(hrand(100) < curse_percentage) { + int cp = curse_percentage; + if(m0 == laCrossroads6 || m1 == laCrossroads6) { + cp = 25; + if(m0 == laCursed || m1 == laCursed) cp = 100; + } + if(hrand(100) < cp) { setland(cw.at, laCursed); cw.at->wall = waRubble; cw.at->monst = moHexer; diff --git a/bigstuff.cpp b/bigstuff.cpp index df6b8498..25abc04a 100644 --- a/bigstuff.cpp +++ b/bigstuff.cpp @@ -1564,6 +1564,7 @@ EX int wallchance(cell *c, bool deepOcean) { l == laCrossroads2 ? 10000 : l == laCrossroads5 ? 10000 : l == laCrossroads4 ? 5000 : + l == laCrossroads6 ? 5000 : (l == laMirror && !yendor::generating) ? 2500 : tactic::on ? 0 : racing::on ? 0 : diff --git a/celldrawer.cpp b/celldrawer.cpp index 119ad1b3..f576b4a6 100644 --- a/celldrawer.cpp +++ b/celldrawer.cpp @@ -183,7 +183,7 @@ void celldrawer::setcolors() { // floor colors for all the lands else switch(c->land) { case laBurial: case laTrollheim: case laBarrier: case laOceanWall: - case laCrossroads2: case laCrossroads3: case laCrossroads4: case laCrossroads5: + case laCrossroads2: case laCrossroads3: case laCrossroads4: case laCrossroads5: case laCrossroads6: case laRose: case laPower: case laWildWest: case laHalloween: case laRedRock: case laDragon: case laStorms: case laTerracotta: case laMercuryRiver: case laDesert: case laKraken: case laDocks: diff --git a/content.cpp b/content.cpp index d2045ea3..102a006b 100644 --- a/content.cpp +++ b/content.cpp @@ -1186,7 +1186,7 @@ LAND( 0xFFFF00, "Land of Power", laPower, ZERO, itPower, RESERVED, LAND( 0xD0D0D0, "Camelot", laCamelot, ZERO | LF_CYCLIC, itHolyGrail, RESERVED, camelothelp ) NATIVE((m == moKnight || m == moHedge || m == moFlailer || m == moLancer) ? 1 : 0) - REQ(ITEMS(itEmerald, U5) ACCONLY3(laCrossroads, laCrossroads3, laCrossroads4)) + REQ(ITEMS(itEmerald, U5) ACCONLY4(laCrossroads, laCrossroads3, laCrossroads4, laCrossroads6)) LAND( 0xD000D0, "Temple of Cthulhu", laTemple, ZERO | LF_CYCLIC, itGrimoire, RESERVED, templehelp ) NATIVE((m == moTentacle || m == moCultist || m == moPyroCultist || m == moCultistLeader) ? 1 : 0) @@ -1452,6 +1452,10 @@ LAND( 0xC000C0, "Crossroads V", laCrossroads5, ZERO, itHyperstone, RESERVED, "Ex NATIVE(0) REQ(GOLD(R300)) +LAND( 0x7030A0, "Crossroads VI", laCrossroads6, ZERO, itHyperstone, RESERVED, "A cursed Crossroads layout.\n") + NATIVE(0) + REQ(ITEMS(itCursed, 5)) + LAND( 0xC0C0C0, "Cellular Automaton", laCA, ZERO | LF_TECHNICAL, itNone, RESERVED, cadesc) NATIVE(0) REQ(ALWAYS) @@ -1796,6 +1800,8 @@ MONSTER( '*', 0, "vertex", moRogueviz, ZERO | CF_TECHNICAL, RESERVED, moN #undef ACCONLY #undef ACCONLY2 #undef ACCONLY3 +#undef ACCONLY4 +#undef ACCONLY5 #undef ACCONLYF #undef IFINGAME #undef INMODE diff --git a/help.cpp b/help.cpp index 02e10f57..fb99625a 100644 --- a/help.cpp +++ b/help.cpp @@ -753,6 +753,8 @@ void add_reqs(eLand l, string& s) { #define ACCONLY(z) s += XLAT("Accessible only from %the1.\n", z); #define ACCONLY2(z,x) s += XLAT("Accessible only from %the1 or %the2.\n", z, x); #define ACCONLY3(z,y,x) s += XLAT("Accessible only from %the1, %2, or %3.\n", z, y, x); + #define ACCONLY4(z1,z2,z3,z4) s += XLAT("Accessible only from %the1, %2, %3, or %4.\n", z1, z2, z3, z4); + #define ACCONLY5(z1,z2,z3,z4,z5) s += XLAT("Accessible only from %the1, %2, %3, %4, or %5.\n", z1, z2, z3, z4, z5); #define ACCONLYF(z) s += XLAT("Accessible only from %the1 (until finished).\n", z); #define IFINGAME(land, ok, fallback) if(isLandIngame(land)) { ok } else { s += XLAT("Alternative rule when %the1 is not in the game:\n", land); fallback } #include "content.cpp" diff --git a/landgen.cpp b/landgen.cpp index 39e303fa..4336db5c 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -2519,6 +2519,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) { case laCrossroads3: case laCrossroads4: case laCrossroads5: + case laCrossroads6: if(c->wall == waTower) c->land = laCamelot; ONEMPTY { if(!BITRUNCATED && c->land == laCrossroads5 && hrand(100) < 60) diff --git a/landlock.cpp b/landlock.cpp index 3d667e3c..0752c362 100644 --- a/landlock.cpp +++ b/landlock.cpp @@ -53,8 +53,7 @@ EX int landMultiplier(eLand l) { } EX bool isCrossroads(eLand l) { - return l == laCrossroads || l == laCrossroads2 || l == laCrossroads3 || - l == laCrossroads4 || l == laCrossroads5; + return among(l, laCrossroads, laCrossroads2, laCrossroads3, laCrossroads4, laCrossroads5, laCrossroads6); } EX bool bearsCamelot(eLand l) { @@ -264,6 +263,8 @@ EX bool landUnlocked(eLand l) { #define ACCONLY(x) #define ACCONLY2(x,y) #define ACCONLY3(x,y,z) + #define ACCONLY4(a,b,c,d) + #define ACCONLY5(a,b,c,d,e) #define ACCONLYF(x) #define IFINGAME(land, ok, fallback) if(isLandIngame(land)) { ok } else { fallback } #define INMODE(x) if(x) return true; @@ -565,7 +566,7 @@ EX eLand getNewLand(eLand old) { laDeadCaves, laRedRock, laVariant, laHell, laCocytus, laPower, laBull, laTerracotta, laRose, laGraveyard, laHive, laDragon, laTrollheim, laWet, laFrog, laEclectic, laCursed, laDice, - laCrossroads5, + laCrossroads5, laCrossroads6 }) if(landUnlocked(l)) tab[cnt++] = l; @@ -588,6 +589,7 @@ EX eLand getNewLand(eLand old) { {laDesert, laRedRock, 5, 5}, {laFrog, laReptile, 2, 2}, {laFrog, laSwitch, 2, 2}, {laFrog, laZebra, 2, 2}, {laEclectic, laStorms, 3, 3}, {laEclectic, laIce, 3, 3}, {laEclectic, laPalace, 3, 3}, {laEclectic, laDeadCaves, 3, 3}, + {laCursed, laCrossroads6, 1, 1}, {laEFire, laDragon, 5, 5}, {laEWater, laLivefjord, 5, 5}, {laEEarth, laDeadCaves, 5, 5}, {laEAir, laWhirlwind, 5, 5}, }) { @@ -735,7 +737,7 @@ EX vector land_over = { laPrairie, laBull, laTerracotta, laRose, laElementalWall, laTrollheim, laHell, laCrossroads3, laCocytus, laPower, laCrossroads4, - laCrossroads5, + laCrossroads5, laCrossroads6, // EXTRA laWildWest, laHalloween, laDual, laSnakeNest, laMagnetic, laCA, laAsteroids };