From 2ea4b1df04d7e8f3f6ddc261f178b7edf5ad1908 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 24 Mar 2018 16:24:08 +0100 Subject: [PATCH] no Dragons in the herds, Worms only a few steps --- complex.cpp | 7 ++++++- game.cpp | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/complex.cpp b/complex.cpp index ce84db87..c10460ae 100644 --- a/complex.cpp +++ b/complex.cpp @@ -2665,7 +2665,7 @@ namespace prairie { if(barrierhept(c3)) return btspin(fieldval(c3).first, c3->bardir)+1; return 0; } - + void spread(cell *c, cell *from) { int rd; @@ -2747,6 +2747,11 @@ namespace prairie { #define RLOW (sphere?(nonbitrunc?7:6):nonbitrunc?4:2) #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) { return c->land == laPrairie && c->LHU.fi.rval <= RHIGH && c->LHU.fi.rval >= RLOW; } diff --git a/game.cpp b/game.cpp index 05ee1886..fbc7132a 100644 --- a/game.cpp +++ b/game.cpp @@ -794,6 +794,8 @@ bool passable_for(eMonster m, cell *w, cell *from, flagtype extra) { return false; return passable(w, from, extra); } + if(m == moDragonHead && prairie::isriver(w)) + return false; if(isShark(m)) return sharkpassable(w, from); if(isSlimeMover(m)) @@ -2779,7 +2781,7 @@ void computePathdist(eMonster param) { if(qb >= qtarg) { if(param == moTortoise && nogoSlow(c, c2)) 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)) continue; }