1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

The powers you get for Orb of Yendor are now consistent with useless/dangerous/forbidden rules

This commit is contained in:
Zeno Rogue 2020-04-02 13:21:51 +02:00
parent 0d00c70ed6
commit 8eba146750

View File

@ -758,20 +758,29 @@ EX namespace yendor {
if(yendor::yi[i].path[0] == c2)
changes.value_set(yendor::yi[i].foundOrb, true);
// Shielding always, so that we know that it protects!
for(int i=0; i<4; i++) switch(hrand(13)) {
case 0: items[itOrbSpeed] += 31; break;
case 1: items[itOrbLightning] += 78; break;
case 2: items[itOrbFlash] += 78; break;
case 3: items[itOrbTime] += 78; break;
case 4: items[itOrbWinter] += 151; break;
case 5: items[itOrbDigging] += 151; break;
case 6: items[itOrbTeleport] += 151; break;
case 7: items[itOrbThorns] += 151; break;
case 8: items[itOrbInvis] += 151; break;
case 9: items[itOrbPsi] += 151; break;
case 10: items[itOrbAether] += 151; break;
case 11: items[itOrbFire] += 151; break;
case 12: items[itOrbSpace] += 78; break;
int powers = 0;
for(int i=0; i<1000 && powers < 4; i++) {
vector< pair<eItem, int> > choices = {
{itOrbSpeed, 31},
{itOrbLightning, 78},
{itOrbFlash, 78},
{itOrbTime, 78},
{itOrbWinter, 151},
{itOrbDigging, 151},
{itOrbTeleport, 151},
{itOrbThorns, 151},
{itOrbInvis, 151},
{itOrbPsi, 151},
{itOrbAether, 151},
{itOrbFire, 151},
{itOrbSpace, 78}
};
auto p = hrand_elt(choices);
auto orb = p.first;
if(items[orb] && i < 500) continue;
if(among(getOLR(orb, getPrizeLand()), olrDangerous, olrUseless, olrForbidden)) continue;
items[orb] += p.second;
powers++;
}
items[itOrbYendor]++;
items[itKey]--;