diff --git a/landlock.cpp b/landlock.cpp index 0810cbee..a4063fcf 100644 --- a/landlock.cpp +++ b/landlock.cpp @@ -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; diff --git a/util.cpp b/util.cpp index ada5f08b..2f160eb1 100644 --- a/util.cpp +++ b/util.cpp @@ -367,6 +367,12 @@ cld exp_parser::parse(int prio) { res = texture::get_txp(real(val), imag(val), int(real(extra_params["p"]) + .5)-1); } #endif + else if(eat("lands_at(")) { + int score = iparse(0); + force_eat(")"); + int i1, i2; count_at_level(i1, i2, score); + return i1; + } else if(next() == '(') at++, res = parsepar(); else { string number = next_token();