1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-09-29 06:20:41 +00:00

more space for orbs in OSM, fixed some bugs

This commit is contained in:
Zeno Rogue 2017-10-10 15:00:38 +02:00
parent 9214bdb714
commit 11d2acb022
2 changed files with 20 additions and 13 deletions

View File

@ -111,7 +111,7 @@ namespace inv {
if(it == itHolyGrail) { if(it == itHolyGrail) {
remaining[itOrbIllusion] += qty; remaining[itOrbIllusion] += qty;
if(it == itOrbIllusion) { if(it == itOrbIllusion) {
orbinfoline += XLAT("Unlocked by: %1 in %2", it, laNone); orbinfoline += XLAT("Unlocked by: %1 in %2", it, landof(it));
orbinfoline += XLAT(" (next at %1)", its(qty+1)); orbinfoline += XLAT(" (next at %1)", its(qty+1));
} }
} }
@ -124,7 +124,7 @@ namespace inv {
extra += extraline(it, "10"); extra += extraline(it, "10");
} }
else { else {
orbinfoline += XLAT("Unlocked by: %1 in %2", it, laNone); orbinfoline += XLAT("Unlocked by: %1 in %2", it, landof(it));
orbinfoline += XLAT(" (next at %1)", its(10)); orbinfoline += XLAT(" (next at %1)", its(10));
} }
} }
@ -149,12 +149,14 @@ namespace inv {
if(it == itHyperstone) { if(it == itHyperstone) {
extra += extraline(it, its(last+maxstep)); extra += extraline(it, its(last+maxstep));
} }
orbinfoline += XLAT("Unlocked by: %1 in %2", it, laCrossroads); else {
orbinfoline += XLAT("Unlocked by: %1 in %2", it, landof(it));
if(maxstep == 1) if(maxstep == 1)
orbinfoline += XLAT(" (next at %1)", its(last+1)); orbinfoline += XLAT(" (next at %1)", its(last+1));
else else
orbinfoline += XLAT(" (next at %1 to %2)", its(last+1), its(last + maxstep)); orbinfoline += XLAT(" (next at %1 to %2)", its(last+1), its(last + maxstep));
} }
}
nextfound = true; nextfound = true;
} }
if(xnext <= qty) remaining[o]++; if(xnext <= qty) remaining[o]++;
@ -274,7 +276,7 @@ namespace inv {
gainOrbs(itHell, itOrbYendor); gainOrbs(itHell, itOrbYendor);
gainOrbs(itStatue, itOrbTeleport); gainOrbs(itStatue, itOrbTeleport);
gainOrbs(itFeather, itOrbSafety); gainOrbs(itFeather, itOrbSafety);
gainOrbs(itSapphire, itOrbWinter); gainOrbs(itSapphire, itOrbMorph);
gainOrbs(itFernFlower, itOrbThorns); gainOrbs(itFernFlower, itOrbThorns);
gainOrbs(itWine, itOrbAether); gainOrbs(itWine, itOrbAether);
gainOrbs(itSilver, itOrbDigging); gainOrbs(itSilver, itOrbDigging);
@ -319,10 +321,10 @@ namespace inv {
gainRandomOrbs(offensiveOrbs, itBone, 25, 0); gainRandomOrbs(offensiveOrbs, itBone, 25, 0);
gainRandomOrbs(elementalOrbs, itElemental, 12, 0); gainRandomOrbs(elementalOrbs, itElemental, 12, 0);
gainRandomOrbs(demonicOrbs, itHell, 20, 100); gainRandomOrbs(demonicOrbs, itHell, 20, 100);
gainOrbs(itOrbLava, itLavaLily); gainOrbs(itLavaLily, itOrbLava);
gainOrbs(itOrbSide3, itHunting); gainOrbs(itHunting, itOrbSide3);
gainOrbs(itOrbWinter, itBlizzard); gainOrbs(itBlizzard, itOrbWinter);
gainOrbs(itOrbSide1, itTerra); gainOrbs(itTerra, itOrbSide1);
for(auto& it: lateextraorbs) gainLate(it.treasure, it.orb); for(auto& it: lateextraorbs) gainLate(it.treasure, it.orb);
@ -434,7 +436,7 @@ namespace inv {
cmode = sm::CENTER; cmode = sm::CENTER;
orbcoord.clear(); orbcoord.clear();
for(int y=-3; y<=3; y++) for(int x=-4; x<=4; x++) if(x+y<=4 && x+y >= -4 && (x||y)) for(int y=-3; y<=3; y++) for(int x=-5; x<=5; x++) if(x+y<=5 && x+y >= -5 && (x||y))
orbcoord.emplace_back(x,y); orbcoord.emplace_back(x,y);
sort(orbcoord.begin(), orbcoord.end(), [](pxy p1, pxy p2) { sort(orbcoord.begin(), orbcoord.end(), [](pxy p1, pxy p2) {
return sq(p1) < sq(p2); }); return sq(p1) < sq(p2); });

View File

@ -296,6 +296,11 @@ eItem treasureType(eLand l) {
return itNone; return itNone;
} }
eLand landof(eItem it) {
for(int i=0; i<landtypes; i++) if(treasureType(eLand(i)) == it) return eLand(i);
return laNone;
}
bool isSealand(eLand l) { bool isSealand(eLand l) {
return l == laOcean || l == laCaribbean || l == laWhirlpool || l == laLivefjord || return l == laOcean || l == laCaribbean || l == laWhirlpool || l == laLivefjord ||
l == laOceanWall || l == laWarpSea || l == laKraken; l == laOceanWall || l == laWarpSea || l == laKraken;