1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

do not crash if no New Sealand is available

This commit is contained in:
Zeno Rogue 2024-03-27 16:54:13 +01:00
parent 57f6fb5f71
commit e032e619c0

View File

@ -387,7 +387,7 @@ EX eLand pickluck(eLand l1, eLand l2) {
} */
EX eLand getNewSealand(eLand old) {
while(true) {
for(int it=0; it<100; it++) {
eLand p = pick(laOcean, pick(laCaribbean, laLivefjord, laWarpSea, laKraken, laDocks));
if(p == laKraken && !landUnlocked(p)) continue;
if(p == laKraken && peace::on) continue;
@ -396,6 +396,7 @@ EX eLand getNewSealand(eLand old) {
if(!isLandIngame(p)) continue;
return p;
}
return old;
}
EX bool createOnSea(eLand old) {