mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-02 12:19:18 +00:00
removed some more incorrect instances of pathdist
This commit is contained in:
parent
c6412511f5
commit
ed8ff63ce4
11
bigstuff.cpp
11
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) {
|
||||
|
@ -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;
|
||||
|
6
orbs.cpp
6
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(!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) {
|
||||
|
Loading…
Reference in New Issue
Block a user