diff --git a/bigstuff.cpp b/bigstuff.cpp index ebf2ebc9..cc881460 100644 --- a/bigstuff.cpp +++ b/bigstuff.cpp @@ -970,15 +970,6 @@ int wallchance(cell *c, bool deepOcean) { 50; } -bool mouse_reachability_test(cell *c) { - if(c->pathdist != PINFD) - return true; - forCellEx(c2, c) - if(passable(c, c2, 0) && c2->mpdist < c->mpdist) - return mouse_reachability_test(c2); - return false; - } - bool horo_ok() { // do the horocycles work in the current geometry? // (they work in ALL hyperbolic geometries currently!) @@ -1139,7 +1130,7 @@ void buildBigStuff(cell *c, cell *from) { createAlternateMap(c, 2, hsA); if(c->land == laPalace && ctof(c) && !princess::generating && !shmup::on && multi::players == 1 && horo_ok() && !weirdhyperbolic && - (princess::forceMouse ? mouse_reachability_test(from) : + (princess::forceMouse ? canReachPlayer(from, moMouse) : (hrand(2000) < (peace::on ? 100 : 20))) && !c->master->alt && (princess::challenge || kills[moVizier] || peace::on) && !tactic::on && !yendor::on) { diff --git a/landgen.cpp b/landgen.cpp index 373f9db3..e6f1a2f8 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -383,7 +383,7 @@ void giantLandSwitch(cell *c, int d, cell *from) { c->monst = moVizier; c->hitpoints = palaceHP(); } - else if(princess::forceVizier && from->pathdist != PINFD) { + else if(princess::forceVizier && hrand(100) < 10 && canReachPlayer(c, moVizier)) { c->monst = moVizier; c->hitpoints = palaceHP(); princess::forceVizier = false; diff --git a/orbs.cpp b/orbs.cpp index 28808c1a..1c101395 100644 --- a/orbs.cpp +++ b/orbs.cpp @@ -1180,11 +1180,13 @@ eItem targetRangedOrb(cell *c, orbAction a) { } // (4a) colt - if(!shmup::on && items[itRevolver] && c->monst && canAttack(cwt.c, moPlayer, c, c->monst, AF_GUN) - && c->pathdist <= GUNRANGE && !monstersnearO(a, cwt.c, c, moPlayer, NULL, cwt.c)) { - if(!isCheck(a)) gun_attack(c); - return itRevolver; - } + if(!shmup::on && items[itRevolver] && c->monst && canAttack(cwt.c, moPlayer, c, c->monst, AF_GUN)) { + pathdata pd(moEagle); + if(c->pathdist <= GUNRANGE && !monstersnearO(a, cwt.c, c, moPlayer, NULL, cwt.c)) { + if(!isCheck(a)) gun_attack(c); + return itRevolver; + } + } // (5) psi blast (non-shmup variant) if(!shmup::on && items[itOrbPsi] && c->monst && (isDragon(c->monst) || !isWorm(c)) && c->monst != moShadow && c->monst != moKrakenH) {