mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-14 05:57:37 +00:00
renamed 'truncated' to 'chamfered'
This commit is contained in:
48
landgen.cpp
48
landgen.cpp
@@ -175,7 +175,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
if(gs == 1)
|
||||
c->wall = waPalace;
|
||||
if(gs == 3)
|
||||
c->wall = nontruncated ? waOpenGate : waClosedGate;
|
||||
c->wall = nonchamfered ? waOpenGate : waClosedGate;
|
||||
if(gs == 4 && hrand(100) < 40)
|
||||
c->wall = waClosePlate;
|
||||
if(gs == 6)
|
||||
@@ -192,7 +192,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
bool lookingForPrincess = !euclid && c->master->alt && !princess::challenge;
|
||||
|
||||
bool pgate = false;
|
||||
if(nontruncated) {
|
||||
if(nonchamfered) {
|
||||
int i = fiftyval049(c);
|
||||
if(i >= 8 && i <= 14 && !polarb50(c)) pgate = true;
|
||||
}
|
||||
@@ -228,9 +228,9 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
}
|
||||
}
|
||||
}
|
||||
else if((hrand(100) < (lookingForPrincess ? (nontruncated ? 11 : 7) : 5) && cdist50(c)) ||
|
||||
else if((hrand(100) < (lookingForPrincess ? (nonchamfered ? 11 : 7) : 5) && cdist50(c)) ||
|
||||
(cdist50(c) == 0 && polarb50(c) && hrand(100) < 60)) {
|
||||
c->wall = hrand(100) < (lookingForPrincess ? (nontruncated ? 25 : 30):50) ? waClosePlate : waOpenPlate;
|
||||
c->wall = hrand(100) < (lookingForPrincess ? (nonchamfered ? 25 : 30):50) ? waClosePlate : waOpenPlate;
|
||||
}
|
||||
else if(hrand(100) < (lookingForPrincess ? 3 : 5))
|
||||
c->wall = waTrapdoor;
|
||||
@@ -245,9 +245,9 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
|
||||
if(princess::generating) {
|
||||
// no Opening Plates nearby
|
||||
if(d <= 7 && c->wall == waOpenPlate && !nontruncated)
|
||||
if(d <= 7 && c->wall == waOpenPlate && !nonchamfered)
|
||||
c->wall = waNone;
|
||||
if(d <= 7 && c->wall == waClosePlate && nontruncated)
|
||||
if(d <= 7 && c->wall == waClosePlate && nonchamfered)
|
||||
c->wall = waOpenPlate;
|
||||
// no monsters nearby
|
||||
if(d>0) c->monst = moNone;
|
||||
@@ -346,7 +346,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
c->wall = waCavewall;
|
||||
else c->wall = waCavefloor;
|
||||
}
|
||||
else if(nontruncated) {
|
||||
else if(nonchamfered) {
|
||||
if(polarb50(c))
|
||||
c->wall = waCavewall;
|
||||
else c->wall = waCavefloor;
|
||||
@@ -367,7 +367,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
c->monst = moSeep;
|
||||
|
||||
ONEMPTY {
|
||||
if(hrand(nontruncated?400:1000) < PT(100 + 2 * (kills[moMiner] + kills[moLancer] + kills[moFlailer]), 200) && notDippingFor(itEmerald)) {
|
||||
if(hrand(nonchamfered?400:1000) < PT(100 + 2 * (kills[moMiner] + kills[moLancer] + kills[moFlailer]), 200) && notDippingFor(itEmerald)) {
|
||||
// do not destroy walls!
|
||||
bool ok = true;
|
||||
for(int i=0; i<c->type; i++) if(c->mov[i]->wall == waCavewall) ok = false;
|
||||
@@ -966,7 +966,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
|
||||
case laHalloween:
|
||||
if(d == 9) {
|
||||
if(nontruncated) {
|
||||
if(nonchamfered) {
|
||||
int fv = c->master->fiftyval;
|
||||
if(fv == 1 || fv == 4 || fv == 2)
|
||||
c->wall = waChasm;
|
||||
@@ -1075,7 +1075,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
if(ctof(c)) {
|
||||
int id = c->master->fiftyval;
|
||||
if(id == 1) c->wall = waCharged;
|
||||
if(id == (elliptic && !nontruncated ? 3 : 9)) c->wall = waGrounded;
|
||||
if(id == (elliptic && !nonchamfered ? 3 : 9)) c->wall = waGrounded;
|
||||
}
|
||||
}
|
||||
else if(S7 == 4) {
|
||||
@@ -1097,7 +1097,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(nontruncated) {
|
||||
else if(nonchamfered) {
|
||||
int i = zebra40(c);
|
||||
if((i == 5 || i == 8) && hrand(100) < 20) c->wall = hrand(2) ? waCharged : waGrounded;
|
||||
else if(i == 15) c->wall = waSandstone;
|
||||
@@ -1221,7 +1221,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
|
||||
case laHell:
|
||||
if(d == 9) {
|
||||
if(hrand(1000) < (nontruncated ? 16 : 36) && celldist(c) >= 3) {
|
||||
if(hrand(1000) < (nonchamfered ? 16 : 36) && celldist(c) >= 3) {
|
||||
for(int i=0; i<c->type; i++) {
|
||||
cell *c2 = createMov(c, i);
|
||||
setdist(c2, d+1, c);
|
||||
@@ -1273,7 +1273,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
|
||||
case laHive:
|
||||
if(d == 9) {
|
||||
if(hrand(2000) < (chaosmode ? 1000 : nontruncated?200:2) && !safety)
|
||||
if(hrand(2000) < (chaosmode ? 1000 : nonchamfered?200:2) && !safety)
|
||||
hive::createBugArmy(c);
|
||||
if(hrand(2000) < 100 && !c->wall && !c->item && !c->monst) {
|
||||
int nww = 0;
|
||||
@@ -1493,14 +1493,14 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
if(d == 7 && c->wall == waNone)
|
||||
buildPrizeMirror(c, 1000);
|
||||
ONEMPTY {
|
||||
if(hrand((doCross && celldist(c) <= 5) ?450:16000) < 30+items[itRedGem]+yendor::hardness() && !pseudohept(c) && !c->monst && !c->wall && !(nontruncated && S3==4)) {
|
||||
if(hrand((doCross && celldist(c) <= 5) ?450:16000) < 30+items[itRedGem]+yendor::hardness() && !pseudohept(c) && !c->monst && !c->wall && !(nonchamfered && S3==4)) {
|
||||
int i = -1;
|
||||
for(int t=0; t<c->type; t++) if(c->mov[t]->mpdist > c->mpdist && !pseudohept(c->mov[t]))
|
||||
i = t;
|
||||
if(i != -1 && !peace::on)
|
||||
generateSnake(c, i);
|
||||
}
|
||||
else if(hrand(16000) < 50+items[itRedGem]+yendor::hardness() && (nontruncated?hrand(10)<3:!ishept(c)) && !c->monst)
|
||||
else if(hrand(16000) < 50+items[itRedGem]+yendor::hardness() && (nonchamfered?hrand(10)<3:!ishept(c)) && !c->monst)
|
||||
c->monst = moRedTroll,
|
||||
c->mondir = NODIR;
|
||||
}
|
||||
@@ -1530,7 +1530,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
if(hrand(1000) < 150 && celldist(c) >= 3 && !pseudohept(c))
|
||||
c->wall = waSmallTree;
|
||||
int q = 0;
|
||||
if(!nontruncated && !chaosmode) for(int i=0; i<c->type; i++)
|
||||
if(!nonchamfered && !chaosmode) for(int i=0; i<c->type; i++)
|
||||
if(c->mov[i] && !isWarped(c->mov[i]->land) && c->mov[i]->land != laCrossroads4)
|
||||
q++;
|
||||
if(q == 1) c->wall = waWarpGate;
|
||||
@@ -1539,7 +1539,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
if(c->land == laWarpSea) {
|
||||
c->wall = waSea;
|
||||
int q = 0;
|
||||
if(!nontruncated && !chaosmode) for(int i=0; i<c->type; i++)
|
||||
if(!nonchamfered && !chaosmode) for(int i=0; i<c->type; i++)
|
||||
if(c->mov[i] && !isWarped(c->mov[i]->land)) q++;
|
||||
if(q == 1) c->wall = waWarpGate;
|
||||
}
|
||||
@@ -1660,7 +1660,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
}
|
||||
else if(items[itHunting] < 10) {
|
||||
vector<cell*> next;
|
||||
forCellEx(c2, c) if(c2->mpdist > 7 && (nontruncated || !ctof(c2))) next.push_back(c2);
|
||||
forCellEx(c2, c) if(c2->mpdist > 7 && (nonchamfered || !ctof(c2))) next.push_back(c2);
|
||||
if(size(next)) {
|
||||
c->item = itHunting;
|
||||
cell *c3 = next[hrand(size(next))];
|
||||
@@ -1840,7 +1840,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
|
||||
case laMirrorOld:
|
||||
ONEMPTY {
|
||||
if((nontruncated?pseudohept(c):!ishept(c)) && hrand(5000) < 120 && (peace::on || notDippingFor(itShard)))
|
||||
if((nonchamfered?pseudohept(c):!ishept(c)) && hrand(5000) < 120 && (peace::on || notDippingFor(itShard)))
|
||||
c->wall = hrand(2) ? waMirror : waCloud;
|
||||
else if(ishept(c) && hrand(5000) < 10 * PRIZEMUL)
|
||||
placePrizeOrb(c);
|
||||
@@ -1853,7 +1853,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
|
||||
case laMirror:
|
||||
ONEMPTY {
|
||||
if((nontruncated?pseudohept(c):!ishept(c)) && hrand(1250) < 120 && (peace::on || notDippingFor(itShard)))
|
||||
if((nonchamfered?pseudohept(c):!ishept(c)) && hrand(1250) < 120 && (peace::on || notDippingFor(itShard)))
|
||||
c->wall = hrand(2) ? waMirror : waCloud;
|
||||
else if(ishept(c) && hrand(5000) < 10 * PRIZEMUL)
|
||||
placePrizeOrb(c);
|
||||
@@ -1954,7 +1954,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
else
|
||||
si.id = (zebra40(c)&2) ? 0 : zebra40(c) == 4 ? 8 : 1;
|
||||
c->wall = waSea;
|
||||
if(among(si.id, 0, 4, 16, nontruncated ? -1 : 24))
|
||||
if(among(si.id, 0, 4, 16, nonchamfered ? -1 : 24))
|
||||
c->wall = waDock;
|
||||
if(si.id == 8 && hrand(100) < 75) {
|
||||
c->wall = waBoat;
|
||||
@@ -2025,7 +2025,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
case laCrossroads5:
|
||||
if(c->wall == waTower) c->land = laCamelot;
|
||||
ONEMPTY {
|
||||
if(nontruncated && c->land == laCrossroads5 && hrand(100) < 60)
|
||||
if(nonchamfered && c->land == laCrossroads5 && hrand(100) < 60)
|
||||
c->wall = waBarrier;
|
||||
else if(!ctof(c) && !inv::on && items[itShard] >= 10 && hrand(8000) < 120*orbcrossfun(items[itShard]))
|
||||
c->wall = hrand(2) ? waMirror : waCloud;
|
||||
@@ -2237,7 +2237,7 @@ void setdist(cell *c, int d, cell *from) {
|
||||
|
||||
if(buggyGeneration) {
|
||||
if(d < BARLEV) for(int i=0; i<c->type; i++) {
|
||||
setdist(createMov(c, i), d+(nontruncated?2:1), c);
|
||||
setdist(createMov(c, i), d+(nonchamfered?2:1), c);
|
||||
}
|
||||
if(d >= BARLEV) c->item = itBuggy2;
|
||||
return;
|
||||
@@ -2322,7 +2322,7 @@ void setdist(cell *c, int d, cell *from) {
|
||||
placeLocalOrbs(c);
|
||||
}
|
||||
|
||||
if(nontruncated && c->wall == waMirrorWall && c->land == laMirror)
|
||||
if(nonchamfered && c->wall == waMirrorWall && c->land == laMirror)
|
||||
c->land = laMirrorWall; // , c->item = itPirate; // not really a proper bugfix
|
||||
|
||||
if(d == 7) playSeenSound(c);
|
||||
|
||||
Reference in New Issue
Block a user