mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 09:50:34 +00:00
new lands:: land/monster nativity/treasure rules
This commit is contained in:
parent
8a414d1768
commit
acdb9d2219
@ -287,7 +287,8 @@ int itemclass(eItem i) {
|
||||
i == itGreenGrass || i == itBull ||
|
||||
i == itLavaLily || i == itHunting ||
|
||||
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;
|
||||
if(i == itSavedPrincess || i == itStrongWind || i == itWarning || i == itBuggy || i == itBuggy2)
|
||||
|
11
help.cpp
11
help.cpp
@ -548,6 +548,7 @@ string generateHelpForLand(eLand l) {
|
||||
#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 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 ||
|
||||
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, 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 == laBull) TREQ(R90)
|
||||
|
48
landlock.cpp
48
landlock.cpp
@ -17,7 +17,6 @@ bool nodisplay(eMonster m) {
|
||||
// returns: 2 = treasure increaser, 1 = just appears, 0 = does not appear
|
||||
int isNative(eLand l, eMonster m) {
|
||||
switch(l) {
|
||||
case laBrownian: ;
|
||||
case laIce:
|
||||
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 :
|
||||
isIvy(m) ? 1 : 0;
|
||||
|
||||
case laWestWall:
|
||||
return among(m, moWestHawk, moFallingDog) ? 2 : 0;
|
||||
|
||||
case laBrownian:
|
||||
return among(m, moBrownBug, moAcidBird) ? 2 : 0;
|
||||
|
||||
case laMagnetic:
|
||||
return isMagneticPole(m) ? 2 : 0;
|
||||
}
|
||||
@ -361,7 +366,7 @@ bool isCoastal(eLand l) {
|
||||
}
|
||||
|
||||
bool isPureSealand(eLand l) {
|
||||
return l == laCaribbean || l == laKraken;
|
||||
return l == laCaribbean || l == laKraken || l == laBrownian;
|
||||
}
|
||||
|
||||
bool isElemental(eLand l) {
|
||||
@ -431,6 +436,14 @@ bool landUnlockedRPM(eLand n) {
|
||||
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) {
|
||||
if(randomPatternsMode) {
|
||||
return landUnlockedRPM(l);
|
||||
@ -446,7 +459,6 @@ bool landUnlocked(eLand l) {
|
||||
case laWildWest: case laHalloween:
|
||||
return false;
|
||||
|
||||
case laBrownian:
|
||||
case laIce: case laJungle: case laCaves: case laDesert:
|
||||
case laMotion: case laCrossroads: case laAlchemist:
|
||||
return true;
|
||||
@ -577,6 +589,15 @@ bool landUnlocked(eLand l) {
|
||||
|
||||
case laRuins:
|
||||
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:
|
||||
return false; // not implemented
|
||||
@ -850,7 +871,10 @@ eLand getNewLand(eLand old) {
|
||||
tab[cnt++] = laPalace;
|
||||
if(old == laDragon && items[itElixir] >= U10) LIKELY tab[cnt++] = laReptile;
|
||||
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) {
|
||||
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++] = laSwitch;
|
||||
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;
|
||||
}
|
||||
@ -889,8 +915,9 @@ eLand getNewLand(eLand old) {
|
||||
tab[cnt++] = laTemple;
|
||||
if(old == laCrossroads || old == laCrossroads2) tab[cnt++] = laOcean;
|
||||
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;
|
||||
if(old == laVariant) LIKELY tab[cnt++] = laEmerald;
|
||||
if(items[itWindstone] >= U5 && items[itDiamond] >= U5) {
|
||||
tab[cnt++] = laBlizzard;
|
||||
if(old == laIce || old == laCocytus || old == laWhirlwind)
|
||||
@ -913,6 +940,16 @@ eLand getNewLand(eLand old) {
|
||||
}
|
||||
if(old == laRedRock) LIKELY tab[cnt++] = laDesert;
|
||||
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) {
|
||||
@ -932,6 +969,7 @@ eLand getNewLand(eLand old) {
|
||||
if(tkills() >= R100) {
|
||||
tab[cnt++] = laGraveyard;
|
||||
if(gold() >= R60) tab[cnt++] = laHive;
|
||||
if(old == laVariant) LIKELY tab[cnt++] = laGraveyard;
|
||||
}
|
||||
|
||||
if(killtypes() >= R20) {
|
||||
|
Loading…
Reference in New Issue
Block a user