1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-27 23:53:18 +00:00

added Domination to Snake Nest; set some data

This commit is contained in:
Zeno Rogue 2017-12-21 16:35:19 +01:00
parent 5fd524fa62
commit d5bca73757
8 changed files with 30 additions and 20 deletions

View File

@ -275,7 +275,7 @@ int itemclass(eItem i) {
i == itSlime || i == itAmethyst || i == itDodeca || i == itSlime || i == itAmethyst || i == itDodeca ||
i == itGreenGrass || i == itBull || i == itGreenGrass || i == itBull ||
i == itLavaLily || i == itHunting || i == itLavaLily || i == itHunting ||
i == itBlizzard || i == itTerra || i == itGlowCrystal i == itBlizzard || i == itTerra || i == itGlowCrystal || i == itSnake
) )
return IC_TREASURE; return IC_TREASURE;
if(i == itSavedPrincess || i == itStrongWind || i == itWarning) if(i == itSavedPrincess || i == itStrongWind || i == itWarning)

View File

@ -572,8 +572,8 @@ string generateHelpForLand(eLand l) {
s += XLAT("Unavailable in the multiplayer mode.\n"); s += XLAT("Unavailable in the multiplayer mode.\n");
} }
if(noChaos(l)) /* if(noChaos(l))
s += XLAT("Unavailable in the Chaos mode.\n"); s += XLAT("Unavailable in the Chaos mode.\n"); */
if(l == laWildWest) if(l == laWildWest)
s += XLAT("Bonus land, available only in some special modes.\n"); s += XLAT("Bonus land, available only in some special modes.\n");

View File

@ -2286,6 +2286,7 @@ void runGeometryExperiments();
extern vector<eLand> landlist; extern vector<eLand> landlist;
template<class T> void generateLandList(T t); template<class T> void generateLandList(T t);
int isLandValid(eLand l); int isLandValid(eLand l);
bool isLandValid2(eLand l);
bool inmirrororwall(eLand l); bool inmirrororwall(eLand l);
extern bool holdmouse; extern bool holdmouse;

View File

@ -325,9 +325,11 @@ namespace inv {
gainOrbs(itHunting, itOrbSide3); gainOrbs(itHunting, itOrbSide3);
gainOrbs(itBlizzard, itOrbWinter); gainOrbs(itBlizzard, itOrbWinter);
gainOrbs(itTerra, itOrbSide1); gainOrbs(itTerra, itOrbSide1);
for(auto& it: lateextraorbs) gainLate(it.treasure, it.orb); for(auto& it: lateextraorbs) gainLate(it.treasure, it.orb);
gainOrbs(itGlowCrystal, itOrbSide2);
if(items[itOrbLove] && !items[itSavedPrincess]) items[itSavedPrincess] = 1; if(items[itOrbLove] && !items[itSavedPrincess]) items[itSavedPrincess] = 1;
int& r = remaining[itGreenStone]; int& r = remaining[itGreenStone];

View File

@ -403,7 +403,7 @@ bool landUnlocked(eLand l) {
case laStorms: case laWhirlwind: case laStorms: case laWhirlwind:
return gold() >= R60; return gold() >= R60;
case laWildWest: case laHalloween: case laDual: case laSnakeNest: case laWildWest: case laHalloween:
return false; return false;
case laIce: case laJungle: case laCaves: case laDesert: case laIce: case laJungle: case laCaves: case laDesert:
@ -525,6 +525,10 @@ bool landUnlocked(eLand l) {
case laCrossroads5: case laCrossroads5:
return gold() >= R300; return gold() >= R300;
case laDual:
case laSnakeNest:
return gold() >= R90;
} }
return false; return false;
} }
@ -647,13 +651,13 @@ eLand pickluck(eLand l1, eLand l2) {
#define LIKELY for(int u=0; u<5; u++) #define LIKELY for(int u=0; u<5; u++)
#define LIKELY2 for(int u=0; u<2; u++) #define LIKELY2 for(int u=0; u<2; u++)
bool noChaos(eLand l) { /* bool noChaos(eLand l) {
if(l == laOcean || l == laTemple) return false; if(l == laOcean || l == laTemple) return false;
return return
isCrossroads(l) || isCyclic(l) || isHaunted(l) || isCrossroads(l) || isCyclic(l) || isHaunted(l) ||
l == laCaribbean || isGravityLand(l) || l == laPrincessQuest || l == laCaribbean || isGravityLand(l) || l == laPrincessQuest ||
l == laPrairie || l == laHalloween; l == laPrairie || l == laHalloween;
} } */
eLand getNewSealand(eLand old) { eLand getNewSealand(eLand old) {
while(true) { while(true) {
@ -662,7 +666,7 @@ eLand getNewSealand(eLand old) {
if(p == laKraken && peace::on) continue; if(p == laKraken && peace::on) continue;
if(incompatible(old, p)) continue; if(incompatible(old, p)) continue;
if(p == old) continue; if(p == old) continue;
if(chaosmode && noChaos(p)) continue; if(!isLandValid2(p)) continue;
return p; return p;
} }
} }
@ -693,7 +697,7 @@ eLand getNewLand(eLand old) {
eLand n = eLand(hrand(landtypes)); eLand n = eLand(hrand(landtypes));
if(n == old) continue; if(n == old) continue;
if(incompatible(n,old)) continue; if(incompatible(n,old)) continue;
if(noChaos(n)) continue; if(!isLandValid2(n)) continue;
if(n == laElementalWall || isTechnicalLand(n)) continue; if(n == laElementalWall || isTechnicalLand(n)) continue;
if(n == laWildWest) continue; if(n == laWildWest) continue;
if(isElemental(n) && hrand(100) >= 25) continue; if(isElemental(n) && hrand(100) >= 25) continue;
@ -854,6 +858,7 @@ eLand getNewLand(eLand old) {
tab[cnt++] = laTerracotta; tab[cnt++] = laTerracotta;
tab[cnt++] = laRose; tab[cnt++] = laRose;
if(chaosmode && geometry) tab[cnt++] = laDual; if(chaosmode && geometry) tab[cnt++] = laDual;
if(chaosmode && geosupport_threecolor()) tab[cnt++] = laSnakeNest;
} }
if(gold() >= R300) if(gold() >= R300)
@ -917,7 +922,7 @@ eLand getNewLand(eLand old) {
// for(int i=0; i<20; i++) tab[cnt++] = laCrossroads; // for(int i=0; i<20; i++) tab[cnt++] = laCrossroads;
eLand n = old; eLand n = old;
while(incompatible(n, old) || (chaosmode && noChaos(n))) n = tab[hrand(cnt)]; while(incompatible(n, old) || !isLandValid2(n)) n = tab[hrand(cnt)];
return n; return n;
} }
@ -940,7 +945,7 @@ vector<eLand> land_over = {
laHell, laCrossroads3, laCocytus, laPower, laCrossroads4, laHell, laCrossroads3, laCocytus, laPower, laCrossroads4,
laCrossroads5, laCrossroads5,
// EXTRA // EXTRA
laWildWest, laHalloween, laDual, laCA laWildWest, laHalloween, laDual, laSnakeNest, laCA
}; };
vector<eLand> landlist; vector<eLand> landlist;
@ -1014,6 +1019,9 @@ int isLandValid(eLand l) {
if(l == laDual && nontruncated) if(l == laDual && nontruncated)
return 0; return 0;
if(l == laHaunted && chaosmode)
return 0;
// standard, non-PTM specific // standard, non-PTM specific
if(l == laCrossroads5 && tactic::on) if(l == laCrossroads5 && tactic::on)
return 0; return 0;
@ -1185,12 +1193,16 @@ int isLandValid(eLand l) {
if(l == laHalloween || l == laDual) if(l == laHalloween || l == laDual)
return 3; return 3;
if(l == laSnakeNest)
return geosupport_threecolor() ? 3 : 0;
if(l == laStorms && torus) if(l == laStorms && torus)
return 3; return 3;
return 2; return 2;
} }
bool isLandValid2(eLand l) { return isLandValid(l) >= 2; }
/* /*
int checkLands() { int checkLands() {
for(int i=0; i<landtypes; i++) { for(int i=0; i<landtypes; i++) {

View File

@ -37,7 +37,7 @@ void showOverview() {
bool pages; bool pages;
generateLandList(isLandValid); generateLandList(isLandValid2);
if(dialog::infix != "") { if(dialog::infix != "") {
vector<eLand> filtered; vector<eLand> filtered;
@ -76,7 +76,6 @@ void showOverview() {
int i0 = 56 + vid.fsize + i * vf; int i0 = 56 + vid.fsize + i * vf;
int col; int col;
if(landUnlocked(l)) col = linf[l].color; else col = 0x404040; if(landUnlocked(l)) col = linf[l].color; else col = 0x404040;
if(chaosmode && noChaos(l)) col = 0x400000;
if(l == curland) if(l == curland)
displayfrZ(1, i0, 1, vf-4, "*", forecolor, 0); displayfrZ(1, i0, 1, vf-4, "*", forecolor, 0);
if(displayfrZ(xr*1, i0, 1, vf-4, XLAT1(linf[l].name), col, 0)) if(displayfrZ(xr*1, i0, 1, vf-4, XLAT1(linf[l].name), col, 0))
@ -87,7 +86,6 @@ void showOverview() {
else if(lv >= 10) col = 0x00D500; else if(lv >= 10) col = 0x00D500;
else if(items[it]) col = 0xC0C0C0; else if(items[it]) col = 0xC0C0C0;
else col = BLACKISH; else col = BLACKISH;
if(chaosmode && noChaos(l)) col = REDDISH;
int c8 = (vf+2)/3; int c8 = (vf+2)/3;
if(displayfrZ(xr*24-c8*6, i0, 1, vf-4, its(items[it]), col, 16)) if(displayfrZ(xr*24-c8*6, i0, 1, vf-4, its(items[it]), col, 16))
getcstat = 2000+it; getcstat = 2000+it;
@ -95,7 +93,6 @@ void showOverview() {
if(displayfrZ(xr*24, i0, 1, vf-4, its(hiitems[modecode()][it]), col, 16)) if(displayfrZ(xr*24, i0, 1, vf-4, its(hiitems[modecode()][it]), col, 16))
getcstat = 2000+it; getcstat = 2000+it;
if(items[it]) col = iinf[it].color; else col = BLACKISH; if(items[it]) col = iinf[it].color; else col = BLACKISH;
if(chaosmode && noChaos(l)) col = REDDISH;
if(displayfrZ(xr*24+c8*4, i0, 1, vf-4, s0 + iinf[it].glyph, col, 16)) if(displayfrZ(xr*24+c8*4, i0, 1, vf-4, s0 + iinf[it].glyph, col, 16))
getcstat = 2000+it; getcstat = 2000+it;
if(displayfrZ(xr*24+c8*5, i0, 1, vf-4, XLAT1(iinf[it].name), col, 0)) if(displayfrZ(xr*24+c8*5, i0, 1, vf-4, XLAT1(iinf[it].name), col, 0))
@ -103,7 +100,6 @@ void showOverview() {
eItem io = nativeOrbType(l); eItem io = nativeOrbType(l);
if(io == itShard) { if(io == itShard) {
if(items[it] >= 10) col = winf[waMirror].color; else col = BLACKISH; if(items[it] >= 10) col = winf[waMirror].color; else col = BLACKISH;
if(chaosmode && noChaos(l)) col = REDDISH;
if(displayfrZ(xr*46, i0, 1, vf-4, XLAT1(winf[waMirror].name), col, 0)) if(displayfrZ(xr*46, i0, 1, vf-4, XLAT1(winf[waMirror].name), col, 0))
getcstat = 3000+waMirror; getcstat = 3000+waMirror;
if(getcstat == 3000+waMirror) if(getcstat == 3000+waMirror)
@ -114,11 +110,9 @@ void showOverview() {
if(lv >= 25) col = 0xFFD500; if(lv >= 25) col = 0xFFD500;
else if(lv >= 10) col = 0xC0C0C0; else if(lv >= 10) col = 0xC0C0C0;
else col = BLACKISH; else col = BLACKISH;
if(chaosmode && noChaos(l)) col = REDDISH;
if(displayfrZ(xr*46-c8*4, i0, 1, vf-4, its(items[io]), col, 16)) if(displayfrZ(xr*46-c8*4, i0, 1, vf-4, its(items[io]), col, 16))
getcstat = 2000+io; getcstat = 2000+io;
if(lv >= 10) col = iinf[io].color; else col = BLACKISH; if(lv >= 10) col = iinf[io].color; else col = BLACKISH;
if(chaosmode && noChaos(l)) col = REDDISH;
if(displayfrZ(xr*46-c8, i0, 1, vf-4, s0 + iinf[io].glyph, col, 16)) if(displayfrZ(xr*46-c8, i0, 1, vf-4, s0 + iinf[io].glyph, col, 16))
getcstat = 2000+io; getcstat = 2000+io;
if(displayfrZ(xr*46, i0, 1, vf-4, XLAT1(iinf[io].name), col, 0)) if(displayfrZ(xr*46, i0, 1, vf-4, XLAT1(iinf[io].name), col, 0))

View File

@ -1,4 +1,4 @@
#define ORBLINES 62 #define ORBLINES 63
// orbgen flags // orbgen flags
@ -107,6 +107,7 @@ const orbinfo orbinfos[ORBLINES] = {
{orbgenflags::S_NATIVE, laBlizzard, 0, 2000, itOrbWinter}, {orbgenflags::S_NATIVE, laBlizzard, 0, 2000, itOrbWinter},
{orbgenflags::S_NATIVE, laTerracotta, 800, 2500, itOrbSide1}, {orbgenflags::S_NATIVE, laTerracotta, 800, 2500, itOrbSide1},
{orbgenflags::S_NATIVE, laDual, 600, 2500, itOrbSide2}, {orbgenflags::S_NATIVE, laDual, 600, 2500, itOrbSide2},
{orbgenflags::S_GUEST, laSnakeNest, 2000, 0, itOrbDomination},
{orbgenflags::S_NATIVE, laWhirlpool, 0, 2000, itOrbWater}, // needs to be last {orbgenflags::S_NATIVE, laWhirlpool, 0, 2000, itOrbWater}, // needs to be last
}; };

View File

@ -647,7 +647,7 @@ namespace tactic {
{ {
dynamicval<bool> t(tactic::on, true); dynamicval<bool> t(tactic::on, true);
generateLandList(isLandValid); generateLandList(isLandValid2);
} }
int nl = size(landlist); int nl = size(landlist);