1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-08-30 17:27:57 +00:00

Frogs implemented

This commit is contained in:
Zeno Rogue
2020-02-26 01:37:02 +01:00
parent 73bd3c7369
commit 7e75c28fc1
4 changed files with 33 additions and 0 deletions

View File

@@ -448,7 +448,12 @@ EX bool notNearItem(cell *c) {
return true;
}
EX bool isNeighbor1(cell *f, cell *w) {
return !f || f == w || isNeighbor(f, w);
}
EX bool passable_for(eMonster m, cell *w, cell *from, flagtype extra) {
cell *dummy;
if(w->monst && !(extra & P_MONSTER) && !isPlayerOn(w))
return false;
if(m == moWolf) {
@@ -524,6 +529,12 @@ EX bool passable_for(eMonster m, cell *w, cell *from, flagtype extra) {
}
return !pseudohept(w) && passable(w, from, extra);
}
if(m == moFrog)
return (!from || from == w) ? passable(w, from, extra) : check_jump(from, w, extra, dummy) == 3;
if(m == moPhaser)
return isNeighbor1(from, w) ? passable(w, from, extra) : check_phase(from, w, extra, dummy) == 3;
if(m == moVaulter)
return isNeighbor1(from, w) ? passable(w, from, extra) : check_vault(from, w, extra, dummy) == 6;
if(m == moAltDemon) {
if(extra & P_ONPLAYER) {
if(isPlayerOn(w)) return true;