mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-22 23:17:04 +00:00
fixed Orb of the Warp destroyed while refactoring
This commit is contained in:
parent
5b87088ade
commit
f507b7cf55
@ -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))) ;
|
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 &&
|
else if(good_for_wall(c) && c->land == laCrossroads4 && hrand(10000) < 7000 && c->land && !c->master->alt && !tactic::on && !racing::on &&
|
||||||
|
@ -63,7 +63,7 @@ LANDFLAGCHECK(generateAll, flag & LF_GENERATE_ALL)
|
|||||||
LANDFLAGCHECK(isIcyLand, flag & LF_ICY)
|
LANDFLAGCHECK(isIcyLand, flag & LF_ICY)
|
||||||
LANDFLAGCHECK(isGravityLand, flag & LF_GRAVITY)
|
LANDFLAGCHECK(isGravityLand, flag & LF_GRAVITY)
|
||||||
LANDFLAGCHECK(isEquidLand, flag & LF_EQUI)
|
LANDFLAGCHECK(isEquidLand, flag & LF_EQUI)
|
||||||
LANDFLAGCHECK(isWarped, flag & LF_WARPED)
|
LANDFLAGCHECK(isWarpedType, flag & LF_WARPED)
|
||||||
LANDFLAGCHECK(isCyclic, flag & LF_CYCLIC)
|
LANDFLAGCHECK(isCyclic, flag & LF_CYCLIC)
|
||||||
LANDFLAGCHECK(isTechnicalLand, flag & LF_TECHNICAL)
|
LANDFLAGCHECK(isTechnicalLand, flag & LF_TECHNICAL)
|
||||||
LANDFLAGCHECK(is_mirrorland, flag & LF_MIRROR)
|
LANDFLAGCHECK(is_mirrorland, flag & LF_MIRROR)
|
||||||
|
9
game.cpp
9
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) {
|
bool nonAdjacent(cell *c, cell *c2) {
|
||||||
if(isWarped(c) && isWarped(c2) && warptype(c) == warptype(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(doesFall(c)) return false;
|
||||||
else if((c->wall == waSea && c->land == laLivefjord))
|
else if((c->wall == waSea && c->land == laLivefjord))
|
||||||
c->wall = waNone;
|
c->wall = waNone;
|
||||||
else if((c->wall == waSea && isWarped(c->land)))
|
else if((c->wall == waSea && isWarpedType(c->land)))
|
||||||
c->wall = waNone;
|
c->wall = waNone;
|
||||||
else if(isGravityLand(c->land)) {
|
else if(isGravityLand(c->land)) {
|
||||||
if(m == moHexSnake)
|
if(m == moHexSnake)
|
||||||
@ -2113,7 +2116,7 @@ void killMonster(cell *c, eMonster who, flagtype deathflags) {
|
|||||||
|
|
||||||
if(isRatling(m) && c->wall == waBoat) {
|
if(isRatling(m) && c->wall == waBoat) {
|
||||||
bool avenge = false;
|
bool avenge = false;
|
||||||
for(int i=0; i<c->type; i++) if(!isWarped(c->move(i)->land))
|
for(int i=0; i<c->type; i++) if(!isWarpedType(c->move(i)->land))
|
||||||
avenge = true;
|
avenge = true;
|
||||||
if(avenge) { avengers += 2; }
|
if(avenge) { avengers += 2; }
|
||||||
}
|
}
|
||||||
@ -3093,7 +3096,7 @@ void bfs() {
|
|||||||
cell *c2 = c->move(i);
|
cell *c2 = c->move(i);
|
||||||
if(!c2) continue;
|
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(c2->land == laMirror) havewhat |= HF_MIRROR;
|
||||||
|
|
||||||
if((c->wall == waBoat || c->wall == waSea) &&
|
if((c->wall == waBoat || c->wall == waSea) &&
|
||||||
|
@ -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));
|
fcol = 0x0000C0 + int(32 * sintick(200, ((eubinary||c->master->alt) ? celldistAlt(c) : 0)*.75/M_PI));
|
||||||
else if(c->land == laLivefjord)
|
else if(c->land == laLivefjord)
|
||||||
fcol = 0x000080;
|
fcol = 0x000080;
|
||||||
else if(isWarped(c->land))
|
else if(isWarpedType(c->land))
|
||||||
fcol = 0x0000C0 + int((warptype(c)?30:-30) * sintick(600));
|
fcol = 0x0000C0 + int((warptype(c)?30:-30) * sintick(600));
|
||||||
else
|
else
|
||||||
fcol = wcol;
|
fcol = wcol;
|
||||||
@ -3400,7 +3400,7 @@ void setcolors(cell *c, color_t& wcol, color_t& fcol) {
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
if(isElemental(c->land)) fcol = linf[c->land].color;
|
if(isElemental(c->land)) fcol = linf[c->land].color;
|
||||||
if(isWarped(c->land)) {
|
if(isWarpedType(c->land)) {
|
||||||
fcol = warptype(c) ? 0x80C080 : 0xA06020;
|
fcol = warptype(c) ? 0x80C080 : 0xA06020;
|
||||||
if(c->wall == waSmallTree) wcol = 0x608000;
|
if(c->wall == waSmallTree) wcol = 0x608000;
|
||||||
}
|
}
|
||||||
@ -4605,7 +4605,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
|
|||||||
set_floor(shFloor);
|
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 j = (randompattern[c->land]/5) % 15;
|
||||||
int k = randompattern[c->land] % RPV_MODULO;
|
int k = randompattern[c->land] % RPV_MODULO;
|
||||||
int k7 = randompattern[c->land] % 7;
|
int k7 = randompattern[c->land] % 7;
|
||||||
|
2
help.cpp
2
help.cpp
@ -864,7 +864,7 @@ void describeMouseover() {
|
|||||||
if(rosedist(c) || c->land == laRose || c->wall == waRose)
|
if(rosedist(c) || c->land == laRose || c->wall == waRose)
|
||||||
appendHelp(string("\n\n") + rosedesc);
|
appendHelp(string("\n\n") + rosedesc);
|
||||||
|
|
||||||
if(isWarped(c) && !isWarped(c->land))
|
if(isWarped(c) && !isWarpedType(c->land))
|
||||||
out += ", warped";
|
out += ", warped";
|
||||||
|
|
||||||
if(isWarped(c)) {
|
if(isWarped(c)) {
|
||||||
|
2
hyper.h
2
hyper.h
@ -3074,7 +3074,7 @@ int cdist50(cell *c);
|
|||||||
bool polarb50(cell *c);
|
bool polarb50(cell *c);
|
||||||
|
|
||||||
bool isGravityLand(eLand l);
|
bool isGravityLand(eLand l);
|
||||||
bool isWarped(eLand l);
|
bool isWarpedType(eLand l);
|
||||||
bool isWarped(cell *c);
|
bool isWarped(cell *c);
|
||||||
|
|
||||||
struct hrmap {
|
struct hrmap {
|
||||||
|
@ -1727,7 +1727,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
|||||||
c->wall = waSmallTree;
|
c->wall = waSmallTree;
|
||||||
int q = 0;
|
int q = 0;
|
||||||
if(BITRUNCATED && !chaosmode && !weirdhyperbolic) for(int i=0; i<c->type; i++)
|
if(BITRUNCATED && !chaosmode && !weirdhyperbolic) for(int i=0; i<c->type; 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++;
|
q++;
|
||||||
if(q == 1) c->wall = waWarpGate;
|
if(q == 1) c->wall = waWarpGate;
|
||||||
}
|
}
|
||||||
@ -1736,7 +1736,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
|||||||
c->wall = waSea;
|
c->wall = waSea;
|
||||||
int q = 0;
|
int q = 0;
|
||||||
if(BITRUNCATED && !chaosmode) for(int i=0; i<c->type; i++)
|
if(BITRUNCATED && !chaosmode) for(int i=0; i<c->type; 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;
|
if(q == 1) c->wall = waWarpGate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -322,7 +322,7 @@ eLand getNewLand(eLand old) {
|
|||||||
if(old == laDragon && tortoise::seek() && hrand(100) < 50)
|
if(old == laDragon && tortoise::seek() && hrand(100) < 50)
|
||||||
return laTortoise;
|
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))
|
if(createOnSea(old))
|
||||||
return getNewSealand(old);
|
return getNewSealand(old);
|
||||||
@ -788,11 +788,11 @@ land_validity_t& land_validity(eLand l) {
|
|||||||
if(l == laWhirlpool && a4)
|
if(l == laWhirlpool && a4)
|
||||||
return dont_work;
|
return dont_work;
|
||||||
|
|
||||||
if(isWarped(l) && a4 && GOLDBERG)
|
if(isWarpedType(l) && a4 && GOLDBERG)
|
||||||
return dont_work;
|
return dont_work;
|
||||||
|
|
||||||
#if CAP_IRR
|
#if CAP_IRR
|
||||||
if((isWarped(l) || l == laDual) && IRREGULAR && !irr::bitruncations_performed)
|
if((isWarpedType(l) || l == laDual) && IRREGULAR && !irr::bitruncations_performed)
|
||||||
return dont_work;
|
return dont_work;
|
||||||
|
|
||||||
if(IRREGULAR && among(l, laPrairie, laMirror, laMirrorOld))
|
if(IRREGULAR && among(l, laPrairie, laMirror, laMirrorOld))
|
||||||
|
Loading…
Reference in New Issue
Block a user