mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-06-18 03:09:59 +00:00
ghosts prioritize attacking players over attacking allies
This commit is contained in:
parent
fe42b5e2ef
commit
9fbe770db9
|
@ -1528,7 +1528,7 @@ EX void moveghosts() {
|
||||||
|
|
||||||
vector<int> mdir;
|
vector<int> mdir;
|
||||||
|
|
||||||
for(int j=0; j<c->type; j++)
|
for(int p: {0, 1}) for(int j=0; j<c->type; j++) if(p == 1 || (c->move(j) && isPlayerOn(c->move(j))))
|
||||||
if(c->move(j) && canAttack(c, c->monst, c->move(j), c->move(j)->monst, AF_GETPLAYER | AF_ONLY_FBUG)) {
|
if(c->move(j) && canAttack(c, c->monst, c->move(j), c->move(j)->monst, AF_GETPLAYER | AF_ONLY_FBUG)) {
|
||||||
// XLATC ghost/greater shark
|
// XLATC ghost/greater shark
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user