mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-29 21:13:00 +00:00
fixed Friendly Ghosts
This commit is contained in:
@@ -1466,7 +1466,7 @@ EX void moveghosts() {
|
||||
int goodmoves = 0;
|
||||
|
||||
for(int k=0; k<c->type; k++) if(c->move(k) && c->move(k)->cpdist < c->cpdist)
|
||||
if(ghostmove(c->monst, c->move(k), c) && !isPlayerOn(c->move(k)))
|
||||
if(ghostmove(c->monst, c->move(k), c, 0) && !isPlayerOn(c->move(k)))
|
||||
goodmoves++;
|
||||
|
||||
movesofgood.grow(goodmoves).push_back(c);
|
||||
@@ -1491,7 +1491,7 @@ EX void moveghosts() {
|
||||
}
|
||||
|
||||
for(int k=0; k<c->type; k++) if(c->move(k) && c->move(k)->cpdist < c->cpdist)
|
||||
if(ghostmove(c->monst, c->move(k), c))
|
||||
if(ghostmove(c->monst, c->move(k), c, 0))
|
||||
mdir.push_back(k);
|
||||
if(mdir.empty()) continue;
|
||||
int d = hrand_elt(mdir);
|
||||
|
||||
Reference in New Issue
Block a user