1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-03 11:17:56 +00:00

wandering monsters

This commit is contained in:
Zeno Rogue
2020-02-29 03:52:50 +01:00
parent 03dcd5fa17
commit 421d04e98e
2 changed files with 59 additions and 28 deletions

View File

@@ -457,7 +457,22 @@ EX void wandering() {
continue;
}
#endif
else if(c->land == laFrog && !c->monst && wchance(items[itFrog], 25)) {
eMonster m = pick(moFrog, moPhaser, moVaulter);
if(canReachPlayer(c, m)) {
c->monst = m;
playSeenSound(c);
continue;
}
}
else if(c->land == laWet && among(c->wall, waDeepWater, waShallow) && !c->monst && wchance(items[itWet], 15) && canReachPlayer(c, moShark)) {
c->monst = hrand(100) < 10 ? moRusalka : moPike;
playSeenSound(c);
continue;
}
else if(c->wall == waSea && !c->monst) {
if(c->land == laCaribbean && wchance(items[itPirate], 15) && canReachPlayer(c, moPirate)) {
c->monst = moCShark;
@@ -659,6 +674,10 @@ EX void wandering() {
c->hitpoints = 3;
}
else if(c->land == laEclectic && wchance(items[itEclectic], 20)) {
gen_eclectic_monster(c);
}
else if(c->land == laCaribbean && wchance(items[itPirate], 30))
c->monst = moPirate;