1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-30 15:39:54 +00:00

fine-tuning the Hyperstone Quest in OSM

This commit is contained in:
Zeno Rogue 2017-08-14 21:13:06 +02:00
parent be42734180
commit 1de906200b
2 changed files with 61 additions and 5 deletions

View File

@ -261,6 +261,14 @@ string generateHelpForItem(eItem it) {
"You can gain further Orbs of the Mirror by collecting 2, 4, 8..."
);
if(it == itPower)
help += XLAT(
"\n\nThe amount of Orbs obtained by using Orbs of Mirroring is "
"multiplied by sqrt(1+p/20), where p is the number of Powerstones "
"collected. This also affects the mirrorings which happened before "
"collecting the Powerstones."
);
if(it == itOrbLuck)
help += XLAT(
"\n\nIn the Orb Strategy Mode, the Orb of Luck also "
@ -430,6 +438,13 @@ string generateHelpForLand(eLand l) {
l == laReptile || l == laIvoryTower)
TREQ(R30)
if(l == laPower && inv::on)
help += XLAT(
"\n\nThe amount of Orbs obtained by using Orbs of Mirroring is "
"multiplied by sqrt(1+p/20), where p is the number of Powerstones "
"collected. This also affects the mirrorings which happened before "
"collecting the Powerstones."
);
if(isCoastal(l))
s += XLAT("Coastal region -- connects inland and aquatic regions.\n");

View File

@ -17,7 +17,33 @@ namespace inv {
static const int MIRRORED = 1000;
static const int TESTMIRRORED = 900;
int mirrorqty(eItem orb) {
struct lateextraorb {
eItem treasure;
eItem orb;
int at;
};
vector<lateextraorb> lateextraorbs = {
{itPower, itOrbFlash},
{itPower, itOrbSpeed},
{itPower, itOrbAether},
{itPower, itOrbWinter},
{itTrollEgg, itOrbFish},
{itTrollEgg, itOrbStunning},
{itTrollEgg, itOrbLuck},
{itTrollEgg, itOrbLife},
{itTrollEgg, itOrbDigging},
{itTrollEgg, itOrbSpace},
{itFulgurite, itOrbLightning},
{itWindstone, itOrbSpeed},
{itDragon, itOrbDragon},
{itSlime, itOrbFlash},
{itDodeca, itOrbShield}
};
int mirrorqty0(eItem orb) {
if(shmup::on && isShmupLifeOrb(orb))
return 3;
if(orb == itOrbWater) return 10;
@ -55,6 +81,10 @@ namespace inv {
return 3;
}
int mirrorqty(eItem orb) {
return int(mirrorqty0(orb) * sqrt(1.000001+items[itPower]/20.));
}
struct nextinfo { int min, real, max; };
nextinfo next[ittypes];
@ -138,7 +168,11 @@ namespace inv {
void compute() {
for(int i=0; i<ittypes; i++) remaining[i] = -usedup[i];
for(int i=0; i<ittypes; i++) if(usedup[i] >= TESTMIRRORED) remaining[i] += MIRRORED;
for(int i=0; i<ittypes; i++) if(usedup[i] >= TESTMIRRORED) {
remaining[i] += MIRRORED;
remaining[i] -= mirrorqty0(eItem(i));
remaining[i] += mirrorqty(eItem(i));
}
sirand(rseed);
@ -183,6 +217,11 @@ namespace inv {
gainRandomOrbs(elementalOrbs, itElemental, 12, 0);
gainRandomOrbs(demonicOrbs, itHell, 20, 100);
for(auto& it: lateextraorbs) {
it.at = 10 + irand(41);
if(items[it.treasure] >= it.at) remaining[it.orb]++;
}
if(items[itOrbLove] && !items[itSavedPrincess]) items[itSavedPrincess] = 1;
int& r = remaining[itGreenStone];
@ -190,7 +229,7 @@ namespace inv {
if(items[itBone] >= 0) {
for(int i=0; i<ittypes; i++) if(i != itGreenStone) {
r += usedup[i];
if(usedup[i] >= TESTMIRRORED) r -= (MIRRORED - mirrorqty(eItem(i)));
if(usedup[i] >= TESTMIRRORED) r -= (MIRRORED - mirrorqty0(eItem(i)));
}
}
@ -350,6 +389,8 @@ namespace inv {
if(isIn(which, offensiveOrbs)) extras += extraline(itBone, its(items[itBone]/25*25+25) + "?");
if(isIn(which, elementalOrbs)) extras += extraline(itElemental, its(items[itBone]/20*20+20) + "?");
if(isIn(which, demonicOrbs)) extras += extraline(itHell, its(max(125, items[itHell]/25*25+25)) + "?");
for(auto& a: lateextraorbs) if(a.orb == which)
extras += extraline(a.treasure, items[a.treasure] >= a.at ? (its(a.at)+"!") : "10-50");
if(extras != "")
displaystr(vid.xres/2, vid.fsize*5, 2, vid.fsize, XLAT("Extras:")+extras, icol, 8);
@ -358,7 +399,7 @@ namespace inv {
if(remaining[which] != 1 || usedup[which]) {
string s = XLAT("Number of uses left: %1", its(remaining[which]));
int us = usedup[which];
if(us >= TESTMIRRORED) s += XLAT(" (mirrored)"), us = us - MIRRORED + mirrorqty(which);
if(us >= TESTMIRRORED) s += XLAT(" (mirrored)"), us = us - MIRRORED + mirrorqty0(which);
if(us) s += XLAT(" (used %1 times)", its(us));
displaystr(vid.xres/2, vid.yres - vid.fsize*6, 2, vid.fsize, s, icol, 8);
}
@ -412,7 +453,7 @@ namespace inv {
else if(remaining[orb] > 0) {
usedup[itOrbMirror]++;
usedup[orb] += MIRRORED;
usedup[orb] -= mirrorqty(orb);
usedup[orb] -= mirrorqty0(orb);
addMessage(XLAT("You mirror %the1.", orb));
mirroring = false;
}