diff --git a/barriers.cpp b/barriers.cpp index dc806ef4..bf72b42e 100644 --- a/barriers.cpp +++ b/barriers.cpp @@ -60,7 +60,7 @@ bool checkBarriersBack(cellwalker bb, int q, bool cross) { // warp coasts use a different algorithm when has_nice_dual() is on bool warped_version(eLand l1, eLand l2) { - return has_nice_dual() && (l1 == laWarpCoast || l1 == laWarpSea || l2 == laWarpSea || l2 == laWarpCoast); + return (has_nice_dual() && (l1 == laWarpCoast || l1 == laWarpSea || l2 == laWarpSea || l2 == laWarpCoast)) || ((S3==4) && !nonbitrunc); } bool checkBarriersNowall(cellwalker bb, int q, int dir, eLand l1=laNone, eLand l2=laNone) { @@ -742,7 +742,7 @@ bool buildBarrierNowall(cell *c, eLand l2, bool force) { for(int j=0; jtype; j++) swap(ds[j], ds[hrand(j+1)]); for(int i=0; itype; i++) { - int d = ds[i]; + int d = (S3>3 && nonbitrunc) ? (2+(i&1)) : ds[i]; /* if(warpv && gp::on) { d = hrand(c->type); */ if(warpv && c->mov[d] && c->mov[d]->mpdist < c->mpdist) continue; diff --git a/bigstuff.cpp b/bigstuff.cpp index f8257ad5..78e035f4 100644 --- a/bigstuff.cpp +++ b/bigstuff.cpp @@ -444,7 +444,7 @@ void buildEquidistant(cell *c) { c->landparam = 50; return; } */ - if(geometry) return; + if(sphere || euclid) return; eLand b = c->land; if(chaosmode && !inmirror(b)) return; if(!b) { @@ -1305,7 +1305,7 @@ void moreBigStuff(cell *c) { if(c->land == laOcean || c->land == laWhirlpool) { bool fullwhirlpool = false; - if(tactic::on && tactic::lasttactic == laWhirlpool) + if(tactic::on && specialland == laWhirlpool) fullwhirlpool = true; if(yendor::on && yendor::clev().l == laWhirlpool) fullwhirlpool = true; diff --git a/game.cpp b/game.cpp index 7e59d83a..b8eefb41 100644 --- a/game.cpp +++ b/game.cpp @@ -6083,7 +6083,7 @@ void activateSafety(eLand l) { if(l == laClearing) l = laOvergrown; if(l == laWhirlpool) l = laOcean; if(l == laCrossroads5) l = laCrossroads2; // could not fit! - if(l == laCamelot && !(tactic::on && tactic::lasttactic == laCamelot)) + if(l == laCamelot && !(tactic::on && specialland == laCamelot)) l = laCrossroads; firstland = l; safetyland = l; diff --git a/hyper.h b/hyper.h index 531f4d6d..0c08a51f 100644 --- a/hyper.h +++ b/hyper.h @@ -2307,7 +2307,6 @@ int getHemisphere(cell *c, int which); namespace tactic { extern bool on; extern bool trailer; - extern eLand lasttactic; } namespace yendor { diff --git a/landgen.cpp b/landgen.cpp index 16701b22..fe6456e6 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -2087,7 +2087,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { c->wall = hrand(2) ? waMirror : waCloud; else if(!ctof(c) && hyperstonesUnlocked() && hrand(8000) < 100 && !gp::on) c->wall = hrand(2) ? waMirror : waCloud; - else if(!ctof(c) && tactic::on && isCrossroads(tactic::lasttactic) && hrand(8000) < 120 && !gp::on) + else if(!ctof(c) && tactic::on && isCrossroads(specialland) && hrand(8000) < 120 && !gp::on) c->wall = hrand(2) ? waMirror : waCloud; else if(c->land == laCrossroads4 && hrand(24000) < 10 && tactic::on) c->wall = waRose; diff --git a/landlock.cpp b/landlock.cpp index e2d2445d..a85455fa 100644 --- a/landlock.cpp +++ b/landlock.cpp @@ -582,7 +582,7 @@ void countHyperstoneQuest(int& i1, int& i2) { bool hyperstonesUnlocked() { int i1, i2; - if(tactic::on && isCrossroads(tactic::lasttactic) && !tactic::trailer) return true; + if(tactic::on && isCrossroads(specialland) && !tactic::trailer) return true; countHyperstoneQuest(i1, i2); return i1 == i2; } @@ -756,7 +756,7 @@ eLand getNewLand(eLand old) { if(old == laEWater && lchance(old)) return hrand(2) ? laEEarth : laEAir; if(old == laEFire && lchance(old)) return hrand(2) ? laEEarth : laEAir; - if(tactic::on && !(tactic::trailer && old == firstland)) return firstland; + if(tactic::on && !(tactic::trailer && old == specialland)) return specialland; if(weirdhyperbolic && specialland != old) return specialland; if(yendor::on && (yendor::clev().flags & YF_WALLS)) { diff --git a/orbgen.cpp b/orbgen.cpp index 28700e71..2aa0dadc 100644 --- a/orbgen.cpp +++ b/orbgen.cpp @@ -518,8 +518,8 @@ void placeCrossroadOrbs(cell *c) { else continue; } - if(tactic::on) { - if(isCrossroads(tactic::lasttactic) && (oi.flags & orbgenflags::NO_TACTIC)) + if(tactic::on && isCrossroads(specialland)) { + if(oi.flags & orbgenflags::NO_TACTIC) continue; else mintreas = 0; } diff --git a/system.cpp b/system.cpp index 9e81bb5a..1d06e2a3 100644 --- a/system.cpp +++ b/system.cpp @@ -87,9 +87,11 @@ void initgame() { firstland = safetyland; } - if(peace::on) firstland = specialland; - - if(tactic::on && geometry) specialland = firstland; + bool use_special_land = + !safety && + (peace::on || tactic::on || geometry || gp::on); + + if(use_special_land) firstland = specialland; if(firstland == laNone || firstland == laBarrier) firstland = laCrossroads; @@ -99,17 +101,16 @@ void initgame() { if(firstland == laHauntedWall) firstland = laGraveyard; if(firstland == laMercuryRiver) firstland = laTerracotta; if(firstland == laMountain && !tactic::on) firstland = laJungle; - if(isGravityLand(firstland) && !tactic::on) firstland = weirdhyperbolic ? laCrossroads4 : laCrossroads; + if((isGravityLand(firstland) && !isCyclic(firstland)) || firstland == laOcean) + firstland = weirdhyperbolic ? laCrossroads4 : laCrossroads; cwt.c = currentmap->gamestart(); cwt.spin = 0; cwt.mirrored = false; - cwt.c->land = ((geometry || gp::on) && !safety) ? specialland : firstland; + cwt.c->land = firstland; chaosAchieved = false; if(firstland == laElementalWall) cwt.c->land = randomElementalLand(); - if((tactic::on || weirdhyperbolic) && (isGravityLand(firstland) || firstland == laOcean) && firstland != laMountain) - cwt.c->land = weirdhyperbolic ? laCrossroads4 : nonbitrunc ? laCrossroads : laCrossroads2; createMov(cwt.c, 0); setdist(cwt.c, BARLEV, NULL); @@ -141,7 +142,6 @@ void initgame() { if(tactic::on && tactic::trailer) items[treasureType(firstland)] = trailer_cash0; - tactic::lasttactic = firstland; yendor::lastchallenge = yendor::challenge; yendor::init(2); @@ -776,16 +776,16 @@ void saveStats(bool emergency = false) { int xcode = modecode(); if(tactic::on) { - int score = items[treasureType(tactic::lasttactic)]; + int score = items[treasureType(specialland)]; if(score) { int c = - anticheat::certify(dnameof(tactic::lasttactic), turncount, t, (int) timerstart, + anticheat::certify(dnameof(specialland), turncount, t, (int) timerstart, xcode*999 + tactic::id + 256 * score); fprintf(f, "TACTICS %s %d %d %d %d %d %d %d %d date: %s\n", VER, - tactic::id, tactic::lasttactic, score, turncount, t, int(timerstart), + tactic::id, specialland, score, turncount, t, int(timerstart), c, xcode, buf); - tactic::record(tactic::lasttactic, score); + tactic::record(specialland, score); anticheat::nextid(tactic::id, VER, c); } } diff --git a/yendor.cpp b/yendor.cpp index 458fb4a3..04951f4d 100644 --- a/yendor.cpp +++ b/yendor.cpp @@ -680,7 +680,7 @@ namespace tactic { int xr = vid.xres / 64; - if(on) record(firstland, items[treasureType(firstland)]); + if(on) record(specialland, items[treasureType(specialland)]); int xc = modecode(); @@ -725,7 +725,7 @@ namespace tactic { dialog::displayPageButtons(3, true); uploadScore(); - if(on) unrecord(firstland); + if(on) unrecord(specialland); if(getcstat >= 1000 && getcstat < 1000 + size(landlist)) { int ld = landlist[getcstat-1000]; @@ -741,7 +741,7 @@ namespace tactic { keyhandler = [] (int sym, int uni) { if(uni >= 1000 && uni < 1000 + size(landlist)) { - firstland = specialland = landlist[uni - 1000]; + specialland = landlist[uni - 1000]; restartGame(tactic::on ? 0 : rg::tactic); } else if(uni == '0') {