1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-31 14:02:59 +00:00

added dragon dismounting easier

This commit is contained in:
Zeno Rogue
2018-02-27 23:43:21 +01:00
parent 6a9453f8c9
commit e45fb6bb20
4 changed files with 43 additions and 35 deletions

View File

@@ -137,13 +137,20 @@ bool isFriendlyOrPlayer(eMonster m) {
return isFriendly(m) || m == moPlayer;
}
bool isFriendly(cell *c) {
if(items[itOrbDomination] && c->monst && c->monst != moTentacleGhost) {
for(int i=0; i<numplayers(); i++)
if(sameMonster(c, playerpos(i)))
bool isMounted(cell *c) {
if(c && c->monst && c->monst != moTentacleGhost) {
for(int i=0; i<numplayers(); i++) {
if(playerpos(i)->monst && sameMonster(c, playerpos(i)))
return true;
if(lastmountpos[i] && lastmountpos[i]->monst && sameMonster(c, lastmountpos[i]))
return true;
}
}
return isFriendly(c->monst);
return false;
}
bool isFriendly(cell *c) {
return isMounted(c) || isFriendly(c->monst);
}
bool isBug(eMonster m) {