improved the wandering monsters on smallbounded Land of Power and Vineyard

This commit is contained in:
Zeno Rogue 2018-04-12 21:29:35 +02:00
parent adc192df46
commit e53fe5c05e
1 changed files with 20 additions and 0 deletions

View File

@ -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)