1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 14:37:16 +00:00

added more lands to the Random Pattern Mode

This commit is contained in:
Zeno Rogue 2018-02-13 13:36:50 +01:00
parent afd412f982
commit f436a2bc53
3 changed files with 82 additions and 46 deletions

View File

@ -1649,7 +1649,7 @@ vector<landtacinfo> land_tac = {
vector<eLand> randlands = {
laIce, laDesert, laCaves, laAlchemist, laGraveyard, laPower, laLivefjord, laZebra,
laRlyeh, laDryForest, laEmerald, laWineyard, laDeadCaves, laRedRock,
laOvergrown, laWildWest, laWarpCoast, laRuins
laOvergrown, laWildWest, laWarpCoast, laRuins, laBull, laDragon, laReptile, laDocks
};
geometryinfo ginf[gGUARD] = {

View File

@ -542,6 +542,13 @@ void giantLandSwitch(cell *c, int d, cell *from) {
case laReptile:
if(d == 9) {
if(randomPatternsMode) {
int ch = hrand(200);
if(RANDPAT) c->wall = waChasm;
else c->wall = ch < (50 + items[itDodeca] + yendor::hardness()) ? waReptile : waNone;
c->wparam = 1 + hrand(reptilemax());
}
else {
int i = zebra40(c);
if(i < 40) {
int cd = getCdata(c, 3);
@ -558,6 +565,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
c->wall = waReptile; c->wparam = 100;
}
}
}
if(d == 7 && c->wall != waChasm) {
bool nonchasm = false;
forCellEx(c2, c) if(c2->wall != waChasm) nonchasm = true;
@ -685,11 +693,16 @@ void giantLandSwitch(cell *c, int d, cell *from) {
case laDragon:
if(d == 9) {
if(randomPatternsMode) {
if(RANDPAT) c->wall = waChasm;
}
else {
int cd = getCdata(c, 3);
cd &= 31;
if(cd >= 6 && cd<12) c->wall = waChasm;
else if(hrand(1000) == 0) c->wall = waEternalFire;
}
}
ONEMPTY {
// 40 is the usual rate of dragon generation
int dchance = 40;
@ -1588,7 +1601,13 @@ void giantLandSwitch(cell *c, int d, cell *from) {
int ce = getCdata(c, 2);
ce &= 15;
if(cd >= 8 && ce >= 8) */
if(hrand(100) < 25)
if(randomPatternsMode) {
int i = (RANDPAT ? 1 : 0) + (RANDPATV(laHell) ? 2 : 0);
eWall w[4] = {waNone, waSmallTree, waBigTree, waStone};
c->wall = w[i];
}
else if(hrand(100) < 25)
c->wall = safety ? pick(waBigTree, waSmallTree) : pick(waStone, waBigTree, waSmallTree);
}
@ -1930,6 +1949,10 @@ void giantLandSwitch(cell *c, int d, cell *from) {
case laRuins: {
int kf = 10 + items[itRuins] + yendor::hardness();
if(d == 8) {
if(randomPatternsMode) {
c->wall = RANDPAT ? waRuinWall : waNone;
}
else {
if(out_ruin(c)) {
if(hrand(100) < 3)
c->wall = waRuinWall;
@ -1938,6 +1961,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
forCellEx(c2, c) if(out_ruin(c2))
c->wall = waRuinWall;
}
}
if(hrand(40000) < kf && !c->monst && !c->wall && !shmup::on) {
cell *c1 = c;
cell *c2 = createMov(c1, hrand(c1->type));
@ -1964,6 +1988,12 @@ void giantLandSwitch(cell *c, int d, cell *from) {
case laDocks: {
if(d == 8) {
if(randomPatternsMode) {
c->wall = RANDPAT ? waDock : waSea;
if(c->wall == waSea && RANDPATV(laEAir))
c->wall = waBoat;
}
else {
patterns::patterninfo si;
if(a38)
patterns::val38(c, si, patterns::SPF_DOCKS, patterns::PAT_COLORING);
@ -1980,7 +2010,12 @@ void giantLandSwitch(cell *c, int d, cell *from) {
}
}
}
}
if(d == 7 && !safety) {
if(randomPatternsMode) {
if(hrand(2000) < PT(30 + kills[moRatling] + kills[moCShark] + kills[moAlbatross] + kills[moPirate] + kills[moFireFairy], 100)) c->item = itDock;
}
else {
patterns::patterninfo si;
if(a38)
patterns::val38(c, si, patterns::SPF_DOCKS, patterns::PAT_COLORING);
@ -1988,6 +2023,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
si.id = hrand(20);
if(si.id == 16 && hrand(250) < PT(30 + kills[moRatling] + kills[moCShark] + kills[moAlbatross] + kills[moPirate] + kills[moFireFairy], 100))
c->item = itDock;
}
if(c->wall == waDock && hrand(6000) < 25 + items[itDock] + yendor::hardness())
c->monst = pick(moPirate, moRatling, moFireFairy);
if(c->wall == waSea && hrand(6000) < 25 + items[itDock] + yendor::hardness())

View File

@ -585,7 +585,7 @@ bool hyperstonesUnlocked() {
// 2 = always available, 1 = highscore required, 0 = never available
int isRandland(eLand l) {
if(l == laIce || l == laDesert || l == laCaves || l == laWildWest)
if(l == laIce || l == laDesert || l == laCaves || l == laWildWest || l == laDocks)
return 2;
for(eLand ll: randlands) if(l == ll) return 1;
return 0;
@ -665,7 +665,7 @@ eLand pickLandRPM(eLand old) {
eLand n = randlands[hrand(size(randlands))];
if(incompatible(n, old)) continue;
if(isRandland(n) == 2) return n;
if(hiitemsMax(treasureType(n)) < 10)
if(!autocheat && !cheater && hiitemsMax(treasureType(n)) < 10)
continue;
return n;
}