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;
|
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() {
|
bool horo_ok() {
|
||||||
// do the horocycles work in the current geometry?
|
// do the horocycles work in the current geometry?
|
||||||
// (they work in ALL hyperbolic geometries currently!)
|
// (they work in ALL hyperbolic geometries currently!)
|
||||||
@ -1139,7 +1130,7 @@ void buildBigStuff(cell *c, cell *from) {
|
|||||||
createAlternateMap(c, 2, hsA);
|
createAlternateMap(c, 2, hsA);
|
||||||
|
|
||||||
if(c->land == laPalace && ctof(c) && !princess::generating && !shmup::on && multi::players == 1 && horo_ok() && !weirdhyperbolic &&
|
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))) &&
|
(hrand(2000) < (peace::on ? 100 : 20))) &&
|
||||||
!c->master->alt &&
|
!c->master->alt &&
|
||||||
(princess::challenge || kills[moVizier] || peace::on) && !tactic::on && !yendor::on) {
|
(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->monst = moVizier;
|
||||||
c->hitpoints = palaceHP();
|
c->hitpoints = palaceHP();
|
||||||
}
|
}
|
||||||
else if(princess::forceVizier && from->pathdist != PINFD) {
|
else if(princess::forceVizier && hrand(100) < 10 && canReachPlayer(c, moVizier)) {
|
||||||
c->monst = moVizier;
|
c->monst = moVizier;
|
||||||
c->hitpoints = palaceHP();
|
c->hitpoints = palaceHP();
|
||||||
princess::forceVizier = false;
|
princess::forceVizier = false;
|
||||||
|
10
orbs.cpp
10
orbs.cpp
@ -1180,10 +1180,12 @@ eItem targetRangedOrb(cell *c, orbAction a) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// (4a) colt
|
// (4a) colt
|
||||||
if(!shmup::on && items[itRevolver] && c->monst && canAttack(cwt.c, moPlayer, c, c->monst, AF_GUN)
|
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)) {
|
pathdata pd(moEagle);
|
||||||
if(!isCheck(a)) gun_attack(c);
|
if(c->pathdist <= GUNRANGE && !monstersnearO(a, cwt.c, c, moPlayer, NULL, cwt.c)) {
|
||||||
return itRevolver;
|
if(!isCheck(a)) gun_attack(c);
|
||||||
|
return itRevolver;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// (5) psi blast (non-shmup variant)
|
// (5) psi blast (non-shmup variant)
|
||||||
|
Loading…
Reference in New Issue
Block a user