1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-01-11 18:00:34 +00:00

new lands:: land/monster nativity/treasure rules

This commit is contained in:
Zeno Rogue 2018-12-23 17:43:08 +01:00
parent 8a414d1768
commit acdb9d2219
3 changed files with 56 additions and 6 deletions

View File

@ -287,7 +287,8 @@ int itemclass(eItem i) {
i == itGreenGrass || i == itBull || i == itGreenGrass || i == itBull ||
i == itLavaLily || i == itHunting || i == itLavaLily || i == itHunting ||
i == itBlizzard || i == itTerra || i == itGlowCrystal || i == itSnake || i == itBlizzard || i == itTerra || i == itGlowCrystal || i == itSnake ||
i == itDock || i == itRuins || i == itSwitch || i == itMagnet i == itDock || i == itRuins || i == itSwitch || i == itMagnet ||
among(i, itWest, itVarTreasure, itBrownian)
) )
return IC_TREASURE; return IC_TREASURE;
if(i == itSavedPrincess || i == itStrongWind || i == itWarning || i == itBuggy || i == itBuggy2) if(i == itSavedPrincess || i == itStrongWind || i == itWarning || i == itBuggy || i == itBuggy2)

View File

@ -548,6 +548,7 @@ string generateHelpForLand(eLand l) {
#define ACCONLYF(z) s += XLAT("Accessible only from %the1 (until finished).\n", z); #define ACCONLYF(z) s += XLAT("Accessible only from %the1 (until finished).\n", z);
#define TREQ(z) { s += XLAT("Treasure required: %1 $$$.\n", its(z)); buteol(s, gold(), z); } #define TREQ(z) { s += XLAT("Treasure required: %1 $$$.\n", its(z)); buteol(s, gold(), z); }
#define TREQ2(z,x) { s += XLAT("Treasure required: %1 x %2.\n", its(z), x); buteol(s, items[x], z); } #define TREQ2(z,x) { s += XLAT("Treasure required: %1 x %2.\n", its(z), x); buteol(s, items[x], z); }
#define TREQ3(z,x) { int now = 0; string t = ""; for(eItem i: x) { if(t!="") t += " + "; t += XLATN(iinf[i].name); now += items[i]; } s += XLAT("Treasure required: %1 x %2.\n", its(z), t); buteol(s, now, z); }
if(l == laMirror || l == laMinefield || l == laPalace || if(l == laMirror || l == laMinefield || l == laPalace ||
l == laOcean || l == laLivefjord || l == laZebra || l == laWarpCoast || l == laWarpSea || l == laOcean || l == laLivefjord || l == laZebra || l == laWarpCoast || l == laWarpSea ||
@ -597,6 +598,16 @@ string generateHelpForLand(eLand l) {
if(l == laBlizzard) TREQ2(U5, itDiamond) if(l == laBlizzard) TREQ2(U5, itDiamond)
if(l == laBlizzard) TREQ2(U5, itWindstone) if(l == laBlizzard) TREQ2(U5, itWindstone)
if(l == laWestWall) TREQ2(U5, itIvory)
if(l == laWestWall) TREQ2(U5, itFeather)
if(l == laBrownian) TREQ(R30)
if(l == laVariant) {
const auto lst = vector<eItem>{itRuins, itEmerald, itBone};
TREQ3(variant_unlock_value(), lst)
}
if(l == laPrairie) TREQ(R90) if(l == laPrairie) TREQ(R90)
if(l == laBull) TREQ(R90) if(l == laBull) TREQ(R90)

View File

@ -17,7 +17,6 @@ bool nodisplay(eMonster m) {
// returns: 2 = treasure increaser, 1 = just appears, 0 = does not appear // returns: 2 = treasure increaser, 1 = just appears, 0 = does not appear
int isNative(eLand l, eMonster m) { int isNative(eLand l, eMonster m) {
switch(l) { switch(l) {
case laBrownian: ;
case laIce: case laIce:
return (m == moWolf || m == moWolfMoved || m == moYeti) ? 2 : 0; return (m == moWolf || m == moWolfMoved || m == moYeti) ? 2 : 0;
@ -229,6 +228,12 @@ int isNative(eLand l, eMonster m) {
among(m, moMonk, moCrusher, moSkeleton, moHedge, moLancer, moFlailer, moCultist, moPyroCultist, moNecromancer, moGhost, moZombie, moRatling) ? 1 : among(m, moMonk, moCrusher, moSkeleton, moHedge, moLancer, moFlailer, moCultist, moPyroCultist, moNecromancer, moGhost, moZombie, moRatling) ? 1 :
isIvy(m) ? 1 : 0; isIvy(m) ? 1 : 0;
case laWestWall:
return among(m, moWestHawk, moFallingDog) ? 2 : 0;
case laBrownian:
return among(m, moBrownBug, moAcidBird) ? 2 : 0;
case laMagnetic: case laMagnetic:
return isMagneticPole(m) ? 2 : 0; return isMagneticPole(m) ? 2 : 0;
} }
@ -361,7 +366,7 @@ bool isCoastal(eLand l) {
} }
bool isPureSealand(eLand l) { bool isPureSealand(eLand l) {
return l == laCaribbean || l == laKraken; return l == laCaribbean || l == laKraken || l == laBrownian;
} }
bool isElemental(eLand l) { bool isElemental(eLand l) {
@ -431,6 +436,14 @@ bool landUnlockedRPM(eLand n) {
return false; return false;
} }
int variant_unlock() {
return items[itRuins] + items[itEmerald] + items[itBone];
}
int variant_unlock_value() {
return inv::on ? 75 : 30;
}
bool landUnlocked(eLand l) { bool landUnlocked(eLand l) {
if(randomPatternsMode) { if(randomPatternsMode) {
return landUnlockedRPM(l); return landUnlockedRPM(l);
@ -446,7 +459,6 @@ bool landUnlocked(eLand l) {
case laWildWest: case laHalloween: case laWildWest: case laHalloween:
return false; return false;
case laBrownian:
case laIce: case laJungle: case laCaves: case laDesert: case laIce: case laJungle: case laCaves: case laDesert:
case laMotion: case laCrossroads: case laAlchemist: case laMotion: case laCrossroads: case laAlchemist:
return true; return true;
@ -577,6 +589,15 @@ bool landUnlocked(eLand l) {
case laRuins: case laRuins:
return kills[moSkeleton]; return kills[moSkeleton];
case laBrownian:
return gold() >= R30;
case laWestWall:
return items[itFeather] >= 5 && items[itIvory] >= 5;
case laVariant:
return variant_unlock() >= variant_unlock_value();
case laMagnetic: case laMagnetic:
return false; // not implemented return false; // not implemented
@ -850,7 +871,10 @@ eLand getNewLand(eLand old) {
tab[cnt++] = laPalace; tab[cnt++] = laPalace;
if(old == laDragon && items[itElixir] >= U10) LIKELY tab[cnt++] = laReptile; if(old == laDragon && items[itElixir] >= U10) LIKELY tab[cnt++] = laReptile;
if(kills[moVizier]) tab[cnt++] = laEmerald; if(kills[moVizier]) tab[cnt++] = laEmerald;
if(kills[moSkeleton]) tab[cnt++] = laRuins; if(kills[moSkeleton]) {
tab[cnt++] = laRuins;
if(old == laVariant) LIKELY tab[cnt++] = laRuins;
}
if(items[itFeather] >= U10) { if(items[itFeather] >= U10) {
tab[cnt++] = laZebra; tab[cnt++] = laZebra;
if(old == laMotion || old == laHunting) LIKELY2 tab[cnt++] = laZebra; if(old == laMotion || old == laHunting) LIKELY2 tab[cnt++] = laZebra;
@ -863,6 +887,8 @@ eLand getNewLand(eLand old) {
if(items[itElixir] >= U10) tab[cnt++] = laReptile; if(items[itElixir] >= U10) tab[cnt++] = laReptile;
if(items[itElixir] >= U10) tab[cnt++] = laSwitch; if(items[itElixir] >= U10) tab[cnt++] = laSwitch;
if(items[itIvory] >= U10 && !generatingEquidistant) tab[cnt++] = laEndorian; if(items[itIvory] >= U10 && !generatingEquidistant) tab[cnt++] = laEndorian;
if(items[itIvory] >= U5 && !generatingEquidistant && items[itFeather] >= U5)
tab[cnt++] = laWestWall;
if(items[itKraken] >= U10) tab[cnt++] = laBurial; if(items[itKraken] >= U10) tab[cnt++] = laBurial;
} }
@ -889,8 +915,9 @@ eLand getNewLand(eLand old) {
tab[cnt++] = laTemple; tab[cnt++] = laTemple;
if(old == laCrossroads || old == laCrossroads2) tab[cnt++] = laOcean; if(old == laCrossroads || old == laCrossroads2) tab[cnt++] = laOcean;
if(old == laOcean) tab[cnt++] = laCrossroads; if(old == laOcean) tab[cnt++] = laCrossroads;
if(items[itGold] >= U5 && items[itFernFlower] >= U5 && !kills[moVizier]) if(items[itGold] >= U5 && items[itFernFlower] >= U5 && !kills[moVizier])
tab[cnt++] = laEmerald; tab[cnt++] = laEmerald;
if(old == laVariant) LIKELY tab[cnt++] = laEmerald;
if(items[itWindstone] >= U5 && items[itDiamond] >= U5) { if(items[itWindstone] >= U5 && items[itDiamond] >= U5) {
tab[cnt++] = laBlizzard; tab[cnt++] = laBlizzard;
if(old == laIce || old == laCocytus || old == laWhirlwind) if(old == laIce || old == laCocytus || old == laWhirlwind)
@ -913,6 +940,16 @@ eLand getNewLand(eLand old) {
} }
if(old == laRedRock) LIKELY tab[cnt++] = laDesert; if(old == laRedRock) LIKELY tab[cnt++] = laDesert;
if(old == laOvergrown) LIKELY tab[cnt++] = laJungle; if(old == laOvergrown) LIKELY tab[cnt++] = laJungle;
if(items[itIvory] >= U5 && !generatingEquidistant && items[itFeather] >= U5)
tab[cnt++] = laWestWall;
if(variant_unlock() >= variant_unlock_value()) {
tab[cnt++] = laVariant;
if(old == laRuins) LIKELY tab[cnt++] = laVariant;
if(old == laGraveyard) LIKELY tab[cnt++] = laVariant;
if(old == laEmerald) LIKELY tab[cnt++] = laVariant;
}
} }
if(gold() >= R90) { if(gold() >= R90) {
@ -932,6 +969,7 @@ eLand getNewLand(eLand old) {
if(tkills() >= R100) { if(tkills() >= R100) {
tab[cnt++] = laGraveyard; tab[cnt++] = laGraveyard;
if(gold() >= R60) tab[cnt++] = laHive; if(gold() >= R60) tab[cnt++] = laHive;
if(old == laVariant) LIKELY tab[cnt++] = laGraveyard;
} }
if(killtypes() >= R20) { if(killtypes() >= R20) {