mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-16 22:57:38 +00:00
changed chamfered to bitruncated
This commit is contained in:
48
landgen.cpp
48
landgen.cpp
@@ -186,7 +186,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
if(gs == 1)
|
||||
c->wall = waPalace;
|
||||
if(gs == 3)
|
||||
c->wall = nonchamfered ? waOpenGate : waClosedGate;
|
||||
c->wall = nonbitrunc ? waOpenGate : waClosedGate;
|
||||
if(gs == 4 && hrand(100) < 40)
|
||||
c->wall = waClosePlate;
|
||||
if(gs == 6)
|
||||
@@ -203,7 +203,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
bool lookingForPrincess = !euclid && c->master->alt && !princess::challenge;
|
||||
|
||||
bool pgate = false;
|
||||
if(nonchamfered) {
|
||||
if(nonbitrunc) {
|
||||
int i = fiftyval049(c);
|
||||
if(i >= 8 && i <= 14 && !polarb50(c)) pgate = true;
|
||||
}
|
||||
@@ -239,9 +239,9 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
}
|
||||
}
|
||||
}
|
||||
else if((hrand(100) < (lookingForPrincess ? (nonchamfered ? 11 : 7) : 5) && cdist50(c)) ||
|
||||
else if((hrand(100) < (lookingForPrincess ? (nonbitrunc ? 11 : 7) : 5) && cdist50(c)) ||
|
||||
(cdist50(c) == 0 && polarb50(c) && hrand(100) < 60)) {
|
||||
c->wall = hrand(100) < (lookingForPrincess ? (nonchamfered ? 25 : 30):50) ? waClosePlate : waOpenPlate;
|
||||
c->wall = hrand(100) < (lookingForPrincess ? (nonbitrunc ? 25 : 30):50) ? waClosePlate : waOpenPlate;
|
||||
}
|
||||
else if(hrand(100) < (lookingForPrincess ? 3 : 5))
|
||||
c->wall = waTrapdoor;
|
||||
@@ -256,9 +256,9 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
|
||||
if(princess::generating) {
|
||||
// no Opening Plates nearby
|
||||
if(d <= 7 && c->wall == waOpenPlate && !nonchamfered)
|
||||
if(d <= 7 && c->wall == waOpenPlate && !nonbitrunc)
|
||||
c->wall = waNone;
|
||||
if(d <= 7 && c->wall == waClosePlate && nonchamfered)
|
||||
if(d <= 7 && c->wall == waClosePlate && nonbitrunc)
|
||||
c->wall = waOpenPlate;
|
||||
// no monsters nearby
|
||||
if(d>0) c->monst = moNone;
|
||||
@@ -357,7 +357,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
c->wall = waCavewall;
|
||||
else c->wall = waCavefloor;
|
||||
}
|
||||
else if(nonchamfered) {
|
||||
else if(nonbitrunc) {
|
||||
if(polarb50(c))
|
||||
c->wall = waCavewall;
|
||||
else c->wall = waCavefloor;
|
||||
@@ -378,7 +378,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
c->monst = moSeep;
|
||||
|
||||
ONEMPTY {
|
||||
if(hrand(nonchamfered?400:1000) < PT(100 + 2 * (kills[moMiner] + kills[moLancer] + kills[moFlailer]), 200) && notDippingFor(itEmerald)) {
|
||||
if(hrand(nonbitrunc?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;
|
||||
@@ -977,7 +977,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
|
||||
case laHalloween:
|
||||
if(d == 9) {
|
||||
if(nonchamfered) {
|
||||
if(nonbitrunc) {
|
||||
int fv = c->master->fiftyval;
|
||||
if(fv == 1 || fv == 4 || fv == 2)
|
||||
c->wall = waChasm;
|
||||
@@ -1086,7 +1086,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 && !nonchamfered ? 3 : 9)) c->wall = waGrounded;
|
||||
if(id == (elliptic && !nonbitrunc ? 3 : 9)) c->wall = waGrounded;
|
||||
}
|
||||
}
|
||||
else if(S7 == 4) {
|
||||
@@ -1108,7 +1108,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(nonchamfered) {
|
||||
else if(nonbitrunc) {
|
||||
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;
|
||||
@@ -1232,7 +1232,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
|
||||
case laHell:
|
||||
if(d == 9) {
|
||||
if(hrand(1000) < (nonchamfered ? 16 : 36) && celldist(c) >= 3) {
|
||||
if(hrand(1000) < (nonbitrunc ? 16 : 36) && celldist(c) >= 3) {
|
||||
for(int i=0; i<c->type; i++) {
|
||||
cell *c2 = createMov(c, i);
|
||||
setdist(c2, d+1, c);
|
||||
@@ -1284,7 +1284,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
|
||||
case laHive:
|
||||
if(d == 9) {
|
||||
if(hrand(2000) < (chaosmode ? 1000 : nonchamfered?200:2) && !safety)
|
||||
if(hrand(2000) < (chaosmode ? 1000 : nonbitrunc?200:2) && !safety)
|
||||
hive::createBugArmy(c);
|
||||
if(hrand(2000) < 100 && !c->wall && !c->item && !c->monst) {
|
||||
int nww = 0;
|
||||
@@ -1504,14 +1504,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 && !(nonchamfered && S3==4)) {
|
||||
if(hrand((doCross && celldist(c) <= 5) ?450:16000) < 30+items[itRedGem]+yendor::hardness() && !pseudohept(c) && !c->monst && !c->wall && !(nonbitrunc && 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() && (nonchamfered?hrand(10)<3:!ishept(c)) && !c->monst)
|
||||
else if(hrand(16000) < 50+items[itRedGem]+yendor::hardness() && (nonbitrunc?hrand(10)<3:!ishept(c)) && !c->monst)
|
||||
c->monst = moRedTroll,
|
||||
c->mondir = NODIR;
|
||||
}
|
||||
@@ -1541,7 +1541,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(!nonchamfered && !chaosmode) for(int i=0; i<c->type; i++)
|
||||
if(!nonbitrunc && !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;
|
||||
@@ -1550,7 +1550,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
if(c->land == laWarpSea) {
|
||||
c->wall = waSea;
|
||||
int q = 0;
|
||||
if(!nonchamfered && !chaosmode) for(int i=0; i<c->type; i++)
|
||||
if(!nonbitrunc && !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;
|
||||
}
|
||||
@@ -1671,7 +1671,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
}
|
||||
else if(items[itHunting] < 10) {
|
||||
vector<cell*> next;
|
||||
forCellEx(c2, c) if(c2->mpdist > 7 && (nonchamfered || !ctof(c2))) next.push_back(c2);
|
||||
forCellEx(c2, c) if(c2->mpdist > 7 && (nonbitrunc || !ctof(c2))) next.push_back(c2);
|
||||
if(size(next)) {
|
||||
c->item = itHunting;
|
||||
cell *c3 = next[hrand(size(next))];
|
||||
@@ -1851,7 +1851,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
|
||||
case laMirrorOld:
|
||||
ONEMPTY {
|
||||
if((nonchamfered?pseudohept(c):!ishept(c)) && hrand(5000) < 120 && (peace::on || notDippingFor(itShard)))
|
||||
if((nonbitrunc?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);
|
||||
@@ -1864,7 +1864,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
|
||||
case laMirror:
|
||||
ONEMPTY {
|
||||
if((nonchamfered?pseudohept(c):!ishept(c)) && hrand(1250) < 120 && (peace::on || notDippingFor(itShard)))
|
||||
if((nonbitrunc?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);
|
||||
@@ -1968,7 +1968,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, nonchamfered ? -1 : 24))
|
||||
if(among(si.id, 0, 4, 16, nonbitrunc ? -1 : 24))
|
||||
c->wall = waDock;
|
||||
if(si.id == 8 && hrand(100) < 75) {
|
||||
c->wall = waBoat;
|
||||
@@ -2039,7 +2039,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
case laCrossroads5:
|
||||
if(c->wall == waTower) c->land = laCamelot;
|
||||
ONEMPTY {
|
||||
if(nonchamfered && c->land == laCrossroads5 && hrand(100) < 60)
|
||||
if(nonbitrunc && 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;
|
||||
@@ -2251,7 +2251,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+(nonchamfered?2:1), c);
|
||||
setdist(createMov(c, i), d+(nonbitrunc?2:1), c);
|
||||
}
|
||||
if(d >= BARLEV) c->item = itBuggy2;
|
||||
return;
|
||||
@@ -2336,7 +2336,7 @@ void setdist(cell *c, int d, cell *from) {
|
||||
placeLocalOrbs(c);
|
||||
}
|
||||
|
||||
if(nonchamfered && c->wall == waMirrorWall && c->land == laMirror)
|
||||
if(nonbitrunc && 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