mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-09 07:30:09 +00:00
better pseudohept in INVERSE tilings
This commit is contained in:
parent
e762da439c
commit
1b3aecc10c
@ -1446,6 +1446,12 @@ EX namespace gp {
|
|||||||
|
|
||||||
hrmap_inverse* inv_map() { return (hrmap_inverse*)currentmap; }
|
hrmap_inverse* inv_map() { return (hrmap_inverse*)currentmap; }
|
||||||
|
|
||||||
|
EX bool inverse_pseudohept(cell *c) {
|
||||||
|
cell *c1 = inv_map()->mapping[c];
|
||||||
|
if(!c1) return false;
|
||||||
|
return UIU(pseudohept(c1));
|
||||||
|
}
|
||||||
|
|
||||||
EX hrmap* get_underlying_map() { return inv_map()->underlying_map; }
|
EX hrmap* get_underlying_map() { return inv_map()->underlying_map; }
|
||||||
EX cell* get_mapped(cell *c) { return inv_map()->get_mapped(c, 0); }
|
EX cell* get_mapped(cell *c) { return inv_map()->get_mapped(c, 0); }
|
||||||
EX int untruncated_shift(cell *c) { return inv_map()->shift[c]; }
|
EX int untruncated_shift(cell *c) { return inv_map()->shift[c]; }
|
||||||
|
@ -1238,7 +1238,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
|||||||
if(fargen) {
|
if(fargen) {
|
||||||
if(hrand(500) < 15)
|
if(hrand(500) < 15)
|
||||||
createArrowTrapAt(c, laTerracotta);
|
createArrowTrapAt(c, laTerracotta);
|
||||||
if(pseudohept(c) && hrand(100) < 40 && c->wall == waNone && !racing::on) {
|
if(pseudohept_r(c) && hrand(100) < 40 && c->wall == waNone && !racing::on) {
|
||||||
c->wall = waTerraWarrior;
|
c->wall = waTerraWarrior;
|
||||||
c->wparam = terracotta::randterra ? 0 : 3 + hrand(3);
|
c->wparam = terracotta::randterra ? 0 : 3 + hrand(3);
|
||||||
if(hrand(100) < items[itTerra]-10)
|
if(hrand(100) < items[itTerra]-10)
|
||||||
@ -1521,7 +1521,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
|||||||
if(fargen) {
|
if(fargen) {
|
||||||
if(randomPatternsMode)
|
if(randomPatternsMode)
|
||||||
c->wall = RANDPAT ? ((RANDPATV(laCrossroads) || RANDPATV(laCrossroads2)) ? waAncientGrave : waFreshGrave) : waNone;
|
c->wall = RANDPAT ? ((RANDPATV(laCrossroads) || RANDPATV(laCrossroads2)) ? waAncientGrave : waFreshGrave) : waNone;
|
||||||
else if(pseudohept(c))
|
else if(pseudohept_r(c))
|
||||||
c->wall = hrand(5) ? waAncientGrave : waFreshGrave;
|
c->wall = hrand(5) ? waAncientGrave : waFreshGrave;
|
||||||
}
|
}
|
||||||
ONEMPTY {
|
ONEMPTY {
|
||||||
@ -1554,7 +1554,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
|||||||
c->move(i)->wall = waNone;
|
c->move(i)->wall = waNone;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(pseudohept(c) && hrand(2)) c->wall = waColumn;
|
if(pseudohept_r(c) && hrand(2)) c->wall = waColumn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ONEMPTY {
|
ONEMPTY {
|
||||||
@ -2273,7 +2273,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) {
|
|||||||
c->monst = moMonkey;
|
c->monst = moMonkey;
|
||||||
else if(hrand_monster(80000) < 5 + items[itRuby] + yendor::hardness())
|
else if(hrand_monster(80000) < 5 + items[itRuby] + yendor::hardness())
|
||||||
c->monst = moEagle;
|
c->monst = moEagle;
|
||||||
else if(pseudohept(c) && c != currentmap->gamestart() && hrand_monster(4000) < 300 + items[itRuby] && !c->monst) {
|
else if(pseudohept_r(c) && c != currentmap->gamestart() && hrand_monster(4000) < 300 + items[itRuby] && !c->monst) {
|
||||||
int hardchance = items[itRuby] + yendor::hardness();
|
int hardchance = items[itRuby] + yendor::hardness();
|
||||||
if(hardchance > 25) hardchance = 25;
|
if(hardchance > 25) hardchance = 25;
|
||||||
bool hardivy = hrand(100) < hardchance;
|
bool hardivy = hrand(100) < hardchance;
|
||||||
|
@ -1493,7 +1493,7 @@ EX bool pseudohept(cell *c) {
|
|||||||
#endif
|
#endif
|
||||||
if(arb::in()) return arb::pseudohept(c);
|
if(arb::in()) return arb::pseudohept(c);
|
||||||
#if CAP_GP
|
#if CAP_GP
|
||||||
if(INVERSE) return false;
|
if(INVERSE) return gp::inverse_pseudohept(c);
|
||||||
if(GOLDBERG && gp_threecolor() == 2)
|
if(GOLDBERG && gp_threecolor() == 2)
|
||||||
return gp::pseudohept_val(c) == 0;
|
return gp::pseudohept_val(c) == 0;
|
||||||
if(GOLDBERG && gp_threecolor() == 1 && (S7&1) && (S3 == 3))
|
if(GOLDBERG && gp_threecolor() == 1 && (S7&1) && (S3 == 3))
|
||||||
@ -1502,6 +1502,13 @@ EX bool pseudohept(cell *c) {
|
|||||||
return pattern_threecolor(c) == 0;
|
return pattern_threecolor(c) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** like pseudohept, but return randomly if no pseudohept is available */
|
||||||
|
EX bool pseudohept_r(cell *c) {
|
||||||
|
if(UNTRUNCATED || UNRECTIFIED)
|
||||||
|
return hrand(100) < 20;
|
||||||
|
return pseudohept(c);
|
||||||
|
}
|
||||||
|
|
||||||
// while Krakens movement is usually restricted to non-pseudohept cells,
|
// while Krakens movement is usually restricted to non-pseudohept cells,
|
||||||
// there is one special case when this does not work (because non-pseudohept cells have varying degrees)
|
// there is one special case when this does not work (because non-pseudohept cells have varying degrees)
|
||||||
EX bool kraken_pseudohept(cell *c) {
|
EX bool kraken_pseudohept(cell *c) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user