1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-10-31 19:36:16 +00:00

no Dragons in the herds, Worms only a few steps

This commit is contained in:
Zeno Rogue 2018-03-24 16:24:08 +01:00
parent e24ae3f717
commit 2ea4b1df04
2 changed files with 9 additions and 2 deletions

View File

@ -2665,7 +2665,7 @@ namespace prairie {
if(barrierhept(c3)) return btspin(fieldval(c3).first, c3->bardir)+1; if(barrierhept(c3)) return btspin(fieldval(c3).first, c3->bardir)+1;
return 0; return 0;
} }
void spread(cell *c, cell *from) { void spread(cell *c, cell *from) {
int rd; int rd;
@ -2747,6 +2747,11 @@ namespace prairie {
#define RLOW (sphere?(nonbitrunc?7:6):nonbitrunc?4:2) #define RLOW (sphere?(nonbitrunc?7:6):nonbitrunc?4:2)
#define RHIGH (sphere?(nonbitrunc?8:9):nonbitrunc?11:13) #define RHIGH (sphere?(nonbitrunc?8:9):nonbitrunc?11:13)
bool no_worms(cell *c) {
int rv = c->LHU.fi.rval;
return rv > RLOW+1 && rv < RHIGH-1;
}
bool isriver(cell *c) { bool isriver(cell *c) {
return c->land == laPrairie && c->LHU.fi.rval <= RHIGH && c->LHU.fi.rval >= RLOW; return c->land == laPrairie && c->LHU.fi.rval <= RHIGH && c->LHU.fi.rval >= RLOW;
} }

View File

@ -794,6 +794,8 @@ bool passable_for(eMonster m, cell *w, cell *from, flagtype extra) {
return false; return false;
return passable(w, from, extra); return passable(w, from, extra);
} }
if(m == moDragonHead && prairie::isriver(w))
return false;
if(isShark(m)) if(isShark(m))
return sharkpassable(w, from); return sharkpassable(w, from);
if(isSlimeMover(m)) if(isSlimeMover(m))
@ -2779,7 +2781,7 @@ void computePathdist(eMonster param) {
if(qb >= qtarg) { if(qb >= qtarg) {
if(param == moTortoise && nogoSlow(c, c2)) continue; if(param == moTortoise && nogoSlow(c, c2)) continue;
if(param == moIvyRoot && strictlyAgainstGravity(c, c2, false, MF_IVY)) continue; if(param == moIvyRoot && strictlyAgainstGravity(c, c2, false, MF_IVY)) continue;
if(param == moWorm && (cellUnstable(c) || cellEdgeUnstable(c))) continue; if(param == moWorm && (cellUnstable(c) || cellEdgeUnstable(c) || prairie::no_worms(c))) continue;
if(items[itOrbLava] && c2->cpdist <= 5 && pseudohept(c) && makeflame(c2, 1, true)) if(items[itOrbLava] && c2->cpdist <= 5 && pseudohept(c) && makeflame(c2, 1, true))
continue; continue;
} }