diff --git a/bigstuff.cpp b/bigstuff.cpp index 566563ac..fc820c80 100644 --- a/bigstuff.cpp +++ b/bigstuff.cpp @@ -1219,7 +1219,7 @@ void buildBigStuff(cell *c, cell *from) { } } - else if(good_for_wall(c) && isWarped(c->land) && hrand(10000) < 3000 && c->land && + else if(good_for_wall(c) && isWarpedType(c->land) && hrand(10000) < 3000 && c->land && buildBarrierNowall(c, eLand(c->land ^ laWarpSea ^ laWarpCoast))) ; else if(good_for_wall(c) && c->land == laCrossroads4 && hrand(10000) < 7000 && c->land && !c->master->alt && !tactic::on && !racing::on && diff --git a/flags.cpp b/flags.cpp index 660d3cd6..176c4535 100644 --- a/flags.cpp +++ b/flags.cpp @@ -63,7 +63,7 @@ LANDFLAGCHECK(generateAll, flag & LF_GENERATE_ALL) LANDFLAGCHECK(isIcyLand, flag & LF_ICY) LANDFLAGCHECK(isGravityLand, flag & LF_GRAVITY) LANDFLAGCHECK(isEquidLand, flag & LF_EQUI) -LANDFLAGCHECK(isWarped, flag & LF_WARPED) +LANDFLAGCHECK(isWarpedType, flag & LF_WARPED) LANDFLAGCHECK(isCyclic, flag & LF_CYCLIC) LANDFLAGCHECK(isTechnicalLand, flag & LF_TECHNICAL) LANDFLAGCHECK(is_mirrorland, flag & LF_MIRROR) diff --git a/game.cpp b/game.cpp index 1cf23cbf..01758420 100644 --- a/game.cpp +++ b/game.cpp @@ -455,6 +455,9 @@ eGravity get_move_gravity(cell *c, cell *c2) { } } +bool isWarped(cell *c) { + return isWarpedType(c->land) || (!inmirrororwall(c->land) && (items[itOrb37] && c->cpdist <= 4)); + } bool nonAdjacent(cell *c, cell *c2) { if(isWarped(c) && isWarped(c2) && warptype(c) == warptype(c2)) { @@ -1791,7 +1794,7 @@ bool snakepile(cell *c, eMonster m) { else if(doesFall(c)) return false; else if((c->wall == waSea && c->land == laLivefjord)) c->wall = waNone; - else if((c->wall == waSea && isWarped(c->land))) + else if((c->wall == waSea && isWarpedType(c->land))) c->wall = waNone; else if(isGravityLand(c->land)) { if(m == moHexSnake) @@ -2113,7 +2116,7 @@ void killMonster(cell *c, eMonster who, flagtype deathflags) { if(isRatling(m) && c->wall == waBoat) { bool avenge = false; - for(int i=0; itype; i++) if(!isWarped(c->move(i)->land)) + for(int i=0; itype; i++) if(!isWarpedType(c->move(i)->land)) avenge = true; if(avenge) { avengers += 2; } } @@ -3093,7 +3096,7 @@ void bfs() { cell *c2 = c->move(i); if(!c2) continue; - if(isWarped(c2->land)) havewhat |= HF_WARP; + if(isWarpedType(c2->land)) havewhat |= HF_WARP; if(c2->land == laMirror) havewhat |= HF_MIRROR; if((c->wall == waBoat || c->wall == waSea) && diff --git a/graph.cpp b/graph.cpp index 952f784a..1cf47713 100644 --- a/graph.cpp +++ b/graph.cpp @@ -3085,7 +3085,7 @@ void setcolors(cell *c, color_t& wcol, color_t& fcol) { fcol = 0x0000C0 + int(32 * sintick(200, ((eubinary||c->master->alt) ? celldistAlt(c) : 0)*.75/M_PI)); else if(c->land == laLivefjord) fcol = 0x000080; - else if(isWarped(c->land)) + else if(isWarpedType(c->land)) fcol = 0x0000C0 + int((warptype(c)?30:-30) * sintick(600)); else fcol = wcol; @@ -3400,7 +3400,7 @@ void setcolors(cell *c, color_t& wcol, color_t& fcol) { default: if(isElemental(c->land)) fcol = linf[c->land].color; - if(isWarped(c->land)) { + if(isWarpedType(c->land)) { fcol = warptype(c) ? 0x80C080 : 0xA06020; if(c->wall == waSmallTree) wcol = 0x608000; } @@ -4605,7 +4605,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) { set_floor(shFloor); } - else if(randomPatternsMode && c->land != laBarrier && !isWarped(c->land)) { + else if(randomPatternsMode && c->land != laBarrier && !isWarpedType(c->land)) { int j = (randompattern[c->land]/5) % 15; int k = randompattern[c->land] % RPV_MODULO; int k7 = randompattern[c->land] % 7; diff --git a/help.cpp b/help.cpp index 7fa913bb..848bac02 100644 --- a/help.cpp +++ b/help.cpp @@ -864,7 +864,7 @@ void describeMouseover() { if(rosedist(c) || c->land == laRose || c->wall == waRose) appendHelp(string("\n\n") + rosedesc); - if(isWarped(c) && !isWarped(c->land)) + if(isWarped(c) && !isWarpedType(c->land)) out += ", warped"; if(isWarped(c)) { diff --git a/hyper.h b/hyper.h index 7fb559c8..9e18e97b 100644 --- a/hyper.h +++ b/hyper.h @@ -3074,7 +3074,7 @@ int cdist50(cell *c); bool polarb50(cell *c); bool isGravityLand(eLand l); -bool isWarped(eLand l); +bool isWarpedType(eLand l); bool isWarped(cell *c); struct hrmap { diff --git a/landgen.cpp b/landgen.cpp index ebb44e7e..275d24f1 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -1727,7 +1727,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { c->wall = waSmallTree; int q = 0; if(BITRUNCATED && !chaosmode && !weirdhyperbolic) for(int i=0; itype; i++) - if(c->move(i) && !isWarped(c->move(i)->land) && c->move(i)->land != laCrossroads4) + if(c->move(i) && !isWarpedType(c->move(i)->land) && c->move(i)->land != laCrossroads4) q++; if(q == 1) c->wall = waWarpGate; } @@ -1736,7 +1736,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { c->wall = waSea; int q = 0; if(BITRUNCATED && !chaosmode) for(int i=0; itype; i++) - if(c->move(i) && !isWarped(c->move(i)->land)) q++; + if(c->move(i) && !isWarpedType(c->move(i)->land)) q++; if(q == 1) c->wall = waWarpGate; } } diff --git a/landlock.cpp b/landlock.cpp index 3edad23a..9116f005 100644 --- a/landlock.cpp +++ b/landlock.cpp @@ -322,7 +322,7 @@ eLand getNewLand(eLand old) { if(old == laDragon && tortoise::seek() && hrand(100) < 50) return laTortoise; - if(isWarped(old) && (hrand(100) < 25) && chaosmode) return eLand(old ^ laWarpCoast ^ laWarpSea); + if(isWarpedType(old) && (hrand(100) < 25) && chaosmode) return eLand(old ^ laWarpCoast ^ laWarpSea); if(createOnSea(old)) return getNewSealand(old); @@ -788,11 +788,11 @@ land_validity_t& land_validity(eLand l) { if(l == laWhirlpool && a4) return dont_work; - if(isWarped(l) && a4 && GOLDBERG) + if(isWarpedType(l) && a4 && GOLDBERG) return dont_work; #if CAP_IRR - if((isWarped(l) || l == laDual) && IRREGULAR && !irr::bitruncations_performed) + if((isWarpedType(l) || l == laDual) && IRREGULAR && !irr::bitruncations_performed) return dont_work; if(IRREGULAR && among(l, laPrairie, laMirror, laMirrorOld))