1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-14 13:57:38 +00:00
This commit is contained in:
Zeno Rogue
2021-08-04 20:22:52 +02:00
16 changed files with 60 additions and 35 deletions

View File

@@ -48,7 +48,7 @@ EX bool notDippingForExtra(eItem i, eItem x) {
int v = items[i] - min(items[x], currentLocalTreasure);
if(v <= 10) return true;
if(v >= 20) return false;
return v >= hrand(10) + 10;
return v < hrand(10) + 10;
}
void buildRedWall(cell *c, int gemchance) {
@@ -253,6 +253,8 @@ EX void gen_eclectic_monster(cell *c) {
cell *c1 = c;
c1->monst = moPair;
c2->monst = moPair;
c1->stuntime = 0;
c2->stuntime = 0;
c1->mondir = neighborId(c1, c2);
c2->mondir = neighborId(c2, c1);
}
@@ -911,6 +913,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
c->item = itTrollEgg;
forCellCM(c2, c) forCellCM(c3, c2) {
c3->monst = pickTroll(c);
c3->stuntime = 0;
c2->item = itTrollEgg;
}
}
@@ -1198,11 +1201,11 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
createArrowTrapAt(c, laTerracotta);
if(pseudohept(c) && hrand(100) < 40 && c->wall == waNone && !racing::on) {
c->wall = waTerraWarrior;
c->landparam = terracotta::randterra ? 0 : 3 + hrand(3);
c->wparam = terracotta::randterra ? 0 : 3 + hrand(3);
if(hrand(100) < items[itTerra]-10)
c->landparam--;
c->wparam--;
if(hrand(100) < items[itTerra]-10)
c->landparam--;
c->wparam--;
}
}
if(d == 7) {
@@ -1696,6 +1699,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
forCellIdEx(c2, i, c) {
c2->monst = moKrakenT;
c2->hitpoints = 1;
c2->stuntime = 0;
c2->mondir = c->c.spin(i);
}
if(!peace::on) playSound(c, "seen-kraken");
@@ -2050,7 +2054,9 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
c->item = itHunting;
auto& p = next[hrand(isize(next))];
p.first->monst = moHunterGuard;
p.first->stuntime = 0;
p.second->monst = moHunterGuard;
p.second->stuntime = 0;
}
}
else if(items[itHunting] < 10) {
@@ -2069,8 +2075,10 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
cell *dog2 = dogcells[hrand(isize(dogcells))];
if(valence() != 3 || isNeighbor(dog1, dog2)) {
dog1->monst = moHunterGuard;
dog1->stuntime = 0;
dog1->landparam = 0;
dog2->monst = moHunterGuard;
dog2->stuntime = 0;
dog2->landparam = 1;
break;
}
@@ -2078,7 +2086,9 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
}
else if(isize(dogcells)) {
c->item = itHunting;
dogcells[hrand(isize(dogcells))]->monst = moHunterGuard;
cell *dog = dogcells[hrand(isize(dogcells))];
dog->monst = moHunterGuard;
dog->stuntime = 0;
}
}
}
@@ -2339,6 +2349,8 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
if(c2->monst || c2->wall) return;
c1->monst = moPair;
c2->monst = moPair;
c1->stuntime = 0;
c2->stuntime = 0;
c1->mondir = neighborId(c1, c2);
c2->mondir = neighborId(c2, c1);
}
@@ -3016,6 +3028,8 @@ EX void setdist(cell *c, int d, cell *from) {
if(d < BARLEV) brownian::apply_futures(c);
#endif
if(!c->monst) c->stuntime = 0;
giantLandSwitch(c, d, from);
if(d == min(reduced_barlev, 9)) moreBigStuff(c);