1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-16 02:09:59 +00:00

Orb of Luck improved

This commit is contained in:
Zeno Rogue 2021-05-22 01:40:55 +02:00
parent 5e33bd6db7
commit 49ba1a7fc4
3 changed files with 21 additions and 4 deletions

View File

@ -292,6 +292,10 @@ EX bool isPermanentFlying(eMonster m) {
return m == moAirElemental || isGhostAether(m); return m == moAirElemental || isGhostAether(m);
} }
EX bool isLuckyLand(eLand l) {
return among(l, laIce, laDesert, laDeadCaves, laOvergrown);
}
EX bool survivesFire(eMonster m) { EX bool survivesFire(eMonster m) {
return return
isGhostAether(m) || m == moWitchWinter || m == moWitchGhost || isGhostAether(m) || m == moWitchWinter || m == moWitchGhost ||

View File

@ -458,6 +458,19 @@ EX string generateHelpForItem(eItem it) {
"and sub-lands." "and sub-lands."
); );
if(it == itOrbLuck) {
help += XLAT("\n\nAdditionally, the probabilities of generating terrain features are subtly changed in the following lands:");
int cnt = 0;
for(int i=0; i<landtypes; i++) {
eLand land = eLand(i);
if(isLuckyLand(land)) {
help += XLAT(cnt ? ", %1" : " %1", land);
cnt++;
}
}
}
if(it == itBone) if(it == itBone)
help += XLAT( help += XLAT(
"\n\nIn the Orb Strategy Mode, each 25 Necromancer's Totems " "\n\nIn the Orb Strategy Mode, each 25 Necromancer's Totems "

View File

@ -947,7 +947,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
} }
} }
} }
if(c->wall == waIcewall && items[itDiamond] >= 5 && hrand(200) == 1) if(c->wall == waIcewall && items[itDiamond] >= 5 && hrand(items[itOrbLuck] ? 50 : 200) == 1)
c->wall = waBonfireOff; c->wall = waBonfireOff;
} }
if(d == 8 && BARLEV == 8) { if(d == 8 && BARLEV == 8) {
@ -1104,7 +1104,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
case laDeadCaves: case laDeadCaves:
if(fargen) { if(fargen) {
int die = (randomPatternsMode ? (RANDPAT?100:0) : hrand(100)); int die = (randomPatternsMode ? (RANDPAT?100:0) : hrand(100));
if(die<50) c->wall = waDeadwall; if(die<(items[itOrbLuck] ? 48 : 50)) c->wall = waDeadwall;
else if(die<55) c->wall = waDeadfloor2; else if(die<55) c->wall = waDeadfloor2;
else c->wall = waDeadfloor; else c->wall = waDeadfloor;
} }
@ -1233,7 +1233,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
c->wall = RANDPAT ? waNone : RANDPATV(laWineyard) ? waBigTree : waSmallTree; c->wall = RANDPAT ? waNone : RANDPATV(laWineyard) ? waBigTree : waSmallTree;
else else
c->wall = c->wall =
(hrand(50+items[itMutant]/2+yendor::hardness()) < 30) ? (hrand(100) < 50 ? waBigTree : waSmallTree) : waNone; (hrand(50+items[itMutant]/2+yendor::hardness()-(items[itOrbLuck]?10:0)) < 30) ? (hrand(100) < 50 ? waBigTree : waSmallTree) : waNone;
} }
if(d == 8) { if(d == 8) {
bool ok = c->landparam == 0; bool ok = c->landparam == 0;
@ -1835,7 +1835,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
} }
} }
if(hrand(300) == 1 && items[itSpice] >= 5) c->wall = waThumperOff; if(hrand(items[itOrbLuck] ? 100 : 300) == 1 && items[itSpice] >= 5) c->wall = waThumperOff;
} }
ONEMPTY { ONEMPTY {
if(hrand(5000) < PT(100 + 2 * (kills[moWorm] + kills[moDesertman]), 200) && notDippingFor(itSpice)) if(hrand(5000) < PT(100 + 2 * (kills[moWorm] + kills[moDesertman]), 200) && notDippingFor(itSpice))