From e53fe5c05e20889499697de663fd7c4dc125e2a3 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 12 Apr 2018 21:29:35 +0200 Subject: [PATCH] improved the wandering monsters on smallbounded Land of Power and Vineyard --- monstergen.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/monstergen.cpp b/monstergen.cpp index f77afd10..2d113f18 100644 --- a/monstergen.cpp +++ b/monstergen.cpp @@ -315,6 +315,15 @@ void wandering() { if(hrand(5) == 0) { // spawn treasure } + + if(smallbounded && hrand(100) < 2) { + auto& ac = currentmap->allcells(); + cell *c1 = ac[hrand(size(ac))]; + if(c1->wall == waVinePlant && !c1->monst) { + c1->monst = moVineSpirit; + c1->stuntime = 3; + } + } } while(first7 < size(dcal)) { @@ -372,6 +381,12 @@ void wandering() { continue; } + else if(smallbounded && c->wall == waVinePlant && !c->monst && wchance(items[treasureType(c->land)], 10) && canReachPlayer(c, moSlime)) { + c->monst = moVineSpirit; + playSeenSound(c); + continue; + } + else if(c->wall == waCTree && !c->monst && wchance(items[itPirate], 15) && canReachPlayer(c, moSlime)) { c->monst = moParrot; playSeenSound(c); @@ -446,6 +461,11 @@ void wandering() { break; } + else if(smallbounded && c->land == laPower && !c->monst) { + if(wchance(items[itPower], 10)) + c->monst = eMonster(moWitch + hrand(NUMWITCH)); + } + else if(c->monst || c->pathdist == PINFD) break; else if(c->land == laClearing && wchance(items[itMutant2], 150) && items[itMutant2] >= 15 && !c->monst && c->type == 7)