mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 09:50:34 +00:00
relaxed local orb generation rule in the Chaos Mode implemented in special cases too
This commit is contained in:
parent
623839be07
commit
c18efff9df
@ -231,7 +231,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
if(hrand(5000) < PT(100 + 2 * (kills[moPalace] + kills[moFatGuard] + kills[moVizier] + kills[moSkeleton]), 200) && notDippingFor(itPalace) &&
|
||||
c->wall != waOpenGate && !lookingForPrincess0)
|
||||
c->item = itPalace;
|
||||
if(items[itPalace] >= 10 && hrand(5000) < 16 && c->wall != waOpenGate && !inv::on && !peace::on)
|
||||
if(items[itPalace] >= treasureForLocal() && hrand(5000) < 16 && c->wall != waOpenGate && !inv::on && !peace::on)
|
||||
c->item = hrand(100) < 80 ? itOrbFrog : itOrbDiscord;
|
||||
if(hrand(5000) < 20*PRIZEMUL && c->wall != waOpenGate)
|
||||
placePrizeOrb(c);
|
||||
@ -1059,7 +1059,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
c->monst = moCultistLeader;
|
||||
else if(hrand(5000) < 250 && !peace::on)
|
||||
c->item = itGrimoire;
|
||||
else if(hrand(5000) < 10 && (chaosmode ? items[itGrimoire] >= 10 : -d > TEMPLE_EACH * 10) && !peace::on && !inv::on)
|
||||
else if(hrand(5000) < 10 && (chaosmode ? items[itGrimoire] >= treasureForLocal() : -d > TEMPLE_EACH * 10) && !peace::on && !inv::on)
|
||||
c->item = itOrbDragon;
|
||||
}
|
||||
}
|
||||
@ -1537,7 +1537,7 @@ void giantLandSwitch(cell *c, int d, cell *from) {
|
||||
c->item = itCoast;
|
||||
if(hrand(15000) < 10 + 2 * items[itCoast] + 2 * yendor::hardness())
|
||||
c->monst = moAlbatross;
|
||||
if(items[itCoast] >= 10 && hrand(10000) < 5 && !peace::on && !inv::on)
|
||||
if(items[itCoast] >= treasureForLocal() && hrand(10000) < 5 && !peace::on && !inv::on)
|
||||
c->item = itOrbAir;
|
||||
else placeLocalSpecial(c, 10000, 6, 5);
|
||||
buildPrizeMirror(c, 2000);
|
||||
|
@ -423,6 +423,11 @@ void placePrizeOrb(cell *c) {
|
||||
// printf("land: %s orb: %s\n", dnameof(l), dnameof(c->item));
|
||||
}
|
||||
|
||||
// 10 not in chaos, less in chaos
|
||||
int treasureForLocal() {
|
||||
return (chaosmode ? 1+hrand(10) : 10);
|
||||
}
|
||||
|
||||
void placeLocalOrbs(cell *c) {
|
||||
eLand l = c->land;
|
||||
if(l == laZebra && c->wall == waTrapdoor) return;
|
||||
@ -442,7 +447,7 @@ void placeLocalOrbs(cell *c) {
|
||||
ch = 0;
|
||||
if(tactic::trailer && ch < 5) ch = 0;
|
||||
int tc = items[treasureType(oi.l)] * landMultiplier(oi.l);
|
||||
int tcmin = (chaosmode ? 1+hrand(10) : 10);
|
||||
int tcmin = treasureForLocal();
|
||||
if(inv::on) {
|
||||
if(!(oi.flags & orbgenflags::OSM_LOCAL25))
|
||||
tc = 0;
|
||||
@ -465,7 +470,7 @@ void placeLocalOrbs(cell *c) {
|
||||
void placeLocalSpecial(cell *c, int outof, int loc=1, int priz=1) {
|
||||
if(peace::on || safety) return;
|
||||
int i = hrand(outof);
|
||||
if(i < loc && items[treasureType(c->land)] >= 10 && !inv::on)
|
||||
if(i < loc && items[treasureType(c->land)] >= treasureForLocal() && !inv::on)
|
||||
c->item = nativeOrbType(c->land);
|
||||
else if(i >= loc && i < loc + PRIZEMUL * priz)
|
||||
placePrizeOrb(c);
|
||||
|
Loading…
Reference in New Issue
Block a user