1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 01:00:25 +00:00

fixed selecting gravity/ocean as the starting land

This commit is contained in:
Zeno Rogue 2021-12-13 22:30:26 +01:00
parent abec39422c
commit 217d4a770d
2 changed files with 12 additions and 1 deletions

View File

@ -417,6 +417,11 @@ EX eLand getNewLand(eLand old) {
if(tactic::on) return specialland;
if(specialland != old && easy_to_find_specialland) return specialland;
if(specialland != old && easy_specialland) {
easy_specialland--;
return specialland;
}
if(yendor::on && (yendor::clev().flags & YF_WALLS)) {
if(old != yendor::clev().l) return yendor::clev().l;
else if(old == laOcean) return pick(laLivefjord, laCaribbean);

View File

@ -150,6 +150,8 @@ EX hookset<void()> hooks_post_initgame;
EX bool ineligible_starting_land;
EX int easy_specialland;
/** \brief initialize the game */
EX void initgame() {
DEBBI(DF_INIT, ("initGame"));
@ -181,6 +183,8 @@ EX void initgame() {
if(firstland == laNone || firstland == laBarrier)
firstland = laCrossroads;
easy_specialland = 0;
if(firstland == laOceanWall) firstland = laOcean;
if(firstland == laHauntedWall) firstland = laGraveyard;
if(firstland == laHaunted && !tactic::on) firstland = laGraveyard;
@ -188,8 +192,10 @@ EX void initgame() {
if(firstland == laMountain && !tactic::on) firstland = laJungle;
if(firstland == laPrincessQuest) firstland = laPalace;
if(firstland == laMemory) firstland = laIce;
if((isGravityLand(firstland) && !isCyclic(firstland)) || (firstland == laOcean && !safety && !yendor::on))
if((isGravityLand(firstland) && !isCyclic(firstland)) || (firstland == laOcean && !safety && !yendor::on)) {
firstland = weirdhyperbolic ? laCrossroads4 : laCrossroads;
easy_specialland = 3;
}
clear_euland(firstland);