1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-22 09:27:40 +00:00

parser:: lands_at function

This commit is contained in:
Zeno Rogue
2024-07-27 18:40:41 +02:00
parent 063dc65e3c
commit 2ffda6da75
2 changed files with 12 additions and 2 deletions

View File

@@ -284,7 +284,7 @@ EX bool required_for_hyperstones(eItem ttype) {
return true;
}
EX void countHyperstoneQuest(int& i1, int& i2) {
EX void count_at_level(int& i1, int& i2, int level) {
i1 = 0; i2 = 0;
generateLandList(isLandIngame);
for(eLand l: landlist) {
@@ -294,10 +294,14 @@ EX void countHyperstoneQuest(int& i1, int& i2) {
if(l == laMirrorOld && isLandIngame(laMirror)) continue;
eItem ttype = treasureType(l);
if(!required_for_hyperstones(ttype)) continue;
i2++; if(items[ttype] >= R10) i1++;
i2++; if(items[ttype] >= level) i1++;
}
}
EX void countHyperstoneQuest(int& i1, int& i2) {
count_at_level(i1, i2, R10);
}
EX bool hyperstonesUnlocked() {
int i1, i2;
if(ls::single() && isCrossroads(specialland)) return true;