mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 18:00:34 +00:00
crystal:: more lands
This commit is contained in:
parent
aa34ed80c8
commit
9e3e4cf7a5
25
crystal.cpp
25
crystal.cpp
@ -361,6 +361,7 @@ struct hrmap_crystal : hrmap {
|
|||||||
map<heptagon*, coord> hcoords;
|
map<heptagon*, coord> hcoords;
|
||||||
map<coord, heptagon*> heptagon_at;
|
map<coord, heptagon*> heptagon_at;
|
||||||
map<int, eLand> landmemo;
|
map<int, eLand> landmemo;
|
||||||
|
map<coord, eLand> landmemo4;
|
||||||
unordered_map<cell*, unordered_map<cell*, int>> distmemo;
|
unordered_map<cell*, unordered_map<cell*, int>> distmemo;
|
||||||
map<cell*, ldcoord> sgc;
|
map<cell*, ldcoord> sgc;
|
||||||
cell *camelot_center;
|
cell *camelot_center;
|
||||||
@ -854,13 +855,33 @@ void set_land(cell *c) {
|
|||||||
auto co1 = roundcoord(co * 60);
|
auto co1 = roundcoord(co * 60);
|
||||||
int cv = co1[0];
|
int cv = co1[0];
|
||||||
|
|
||||||
if(specialland == laCrossroads) {
|
if(chaosmode) {
|
||||||
|
setland(c, getCLand(gdiv(cv, 60)));
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(specialland == laCrossroads) {
|
||||||
eLand l1 = getCLand(gdiv(cv, 360));
|
eLand l1 = getCLand(gdiv(cv, 360));
|
||||||
eLand l2 = getCLand(gdiv(cv+59, 360));
|
eLand l2 = getCLand(gdiv(cv+59, 360));
|
||||||
if(l1 != l2) setland(c, laBarrier);
|
if(l1 != l2) setland(c, laBarrier);
|
||||||
else setland(c, l1);
|
else setland(c, l1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if(specialland == laCrossroads2) {
|
||||||
|
setland(c, getCLand(dist_alt(c)/4));
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(specialland == laCrossroads3) {
|
||||||
|
coord cx = roundcoord(co / 8);
|
||||||
|
auto& l = m->landmemo4[cx];
|
||||||
|
if(l == laNone) l = getNewLand(laBarrier);
|
||||||
|
setland(c, l);
|
||||||
|
println(hlog, "l = ", dnameof(l));
|
||||||
|
}
|
||||||
|
|
||||||
|
else if(specialland == laCrossroads4) {
|
||||||
|
setland(c, getCLand(gdiv(cv, 360)));
|
||||||
|
}
|
||||||
|
|
||||||
if(specialland == laCamelot) {
|
if(specialland == laCamelot) {
|
||||||
setland(c, laCrossroads);
|
setland(c, laCrossroads);
|
||||||
buildCamelot(c);
|
buildCamelot(c);
|
||||||
@ -872,7 +893,7 @@ void set_land(cell *c) {
|
|||||||
c->wall = waMercury;
|
c->wall = waMercury;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(among(specialland, laOcean, laIvoryTower, laDungeon)) {
|
if(among(specialland, laOcean, laIvoryTower, laDungeon, laEndorian)) {
|
||||||
int v = dist_alt(c);
|
int v = dist_alt(c);
|
||||||
if(v == 0)
|
if(v == 0)
|
||||||
c->land = laCrossroads4;
|
c->land = laCrossroads4;
|
||||||
|
2
game.cpp
2
game.cpp
@ -6942,7 +6942,7 @@ bool in_full_game() {
|
|||||||
if(chaosmode) return true;
|
if(chaosmode) return true;
|
||||||
if(geometry == gEuclid && isCrossroads(specialland)) return true;
|
if(geometry == gEuclid && isCrossroads(specialland)) return true;
|
||||||
if(weirdhyperbolic && specialland == laCrossroads4) return true;
|
if(weirdhyperbolic && specialland == laCrossroads4) return true;
|
||||||
if(geometry == gCrystal && specialland == laCrossroads) return true;
|
if(geometry == gCrystal && isCrossroads(specialland)) return true;
|
||||||
if(geometry == gNormal && !NONSTDVAR) return true;
|
if(geometry == gNormal && !NONSTDVAR) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -762,7 +762,7 @@ eLand getNewLand(eLand old) {
|
|||||||
if(old == laEFire && lchance(old)) return hrand(2) ? laEEarth : laEAir;
|
if(old == laEFire && lchance(old)) return hrand(2) ? laEEarth : laEAir;
|
||||||
|
|
||||||
if(tactic::on && !(tactic::trailer && old == specialland)) return specialland;
|
if(tactic::on && !(tactic::trailer && old == specialland)) return specialland;
|
||||||
if(weirdhyperbolic && specialland != old && specialland != laCrossroads4 && !chaosmode) return specialland;
|
if(weirdhyperbolic && specialland != old && specialland != laCrossroads4 && !chaosmode && old != laBarrier) return specialland;
|
||||||
|
|
||||||
if(yendor::on && (yendor::clev().flags & YF_WALLS)) {
|
if(yendor::on && (yendor::clev().flags & YF_WALLS)) {
|
||||||
if(old != yendor::clev().l) return yendor::clev().l;
|
if(old != yendor::clev().l) return yendor::clev().l;
|
||||||
@ -1103,6 +1103,11 @@ land_validity_t& land_validity(eLand l) {
|
|||||||
if(isCyclic(l)) return not_implemented;
|
if(isCyclic(l)) return not_implemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(geometry == gCrystal) {
|
||||||
|
if(l == laCamelot) return interesting;
|
||||||
|
if(isCrossroads(l)) return full_game;
|
||||||
|
}
|
||||||
|
|
||||||
// Random Pattern allowed only in some specific lands
|
// Random Pattern allowed only in some specific lands
|
||||||
if(randomPatternsMode && !isRandland(l))
|
if(randomPatternsMode && !isRandland(l))
|
||||||
return no_randpattern_version;
|
return no_randpattern_version;
|
||||||
|
Loading…
Reference in New Issue
Block a user