diff --git a/environment.cpp b/environment.cpp index f0717bef..5ee36983 100644 --- a/environment.cpp +++ b/environment.cpp @@ -346,7 +346,7 @@ EX void bfs() { c2->item = itNone; c2->landparam |= 2; c2->landparam &= ~1; - if(!c2->monst) c2->monst = moBomberbird; + if(!c2->monst) c2->monst = moBomberbird, c2->stuntime = 0; } if(c2->item == itBarrow && c2->cpdist == distlimit && c2->wall != waBarrowDig) { diff --git a/items.cpp b/items.cpp index d482f58d..4717fa12 100644 --- a/items.cpp +++ b/items.cpp @@ -166,10 +166,12 @@ EX bool collectItem(cell *c2, bool telekinesis IS(false)) { else if(c2->item == itOrbLife) { playSound(c2, "pickup-orb"); // TODO summon placeGolem(cwt.at, c2, moGolem); + if(cwt.at->monst == moGolem) cwt.at->stuntime = 0; } else if(c2->item == itOrbFriend) { playSound(c2, "pickup-orb"); // TODO summon placeGolem(cwt.at, c2, moTameBomberbird); + if(cwt.at->monst == moTameBomberbird) cwt.at->stuntime = 0; } #if CAP_TOUR else if(tour::on && (c2->item == itOrbSafety || c2->item == itOrbRecall)) { diff --git a/landgen.cpp b/landgen.cpp index 64dd7564..04589114 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -253,6 +253,8 @@ EX void gen_eclectic_monster(cell *c) { cell *c1 = c; c1->monst = moPair; c2->monst = moPair; + c1->stuntime = 0; + c2->stuntime = 0; c1->mondir = neighborId(c1, c2); c2->mondir = neighborId(c2, c1); } @@ -911,6 +913,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) { c->item = itTrollEgg; forCellCM(c2, c) forCellCM(c3, c2) { c3->monst = pickTroll(c); + c3->stuntime = 0; c2->item = itTrollEgg; } } @@ -1696,6 +1699,7 @@ EX void giantLandSwitch(cell *c, int d, cell *from) { forCellIdEx(c2, i, c) { c2->monst = moKrakenT; c2->hitpoints = 1; + c2->stuntime = 0; c2->mondir = c->c.spin(i); } if(!peace::on) playSound(c, "seen-kraken"); @@ -2050,7 +2054,9 @@ EX void giantLandSwitch(cell *c, int d, cell *from) { c->item = itHunting; auto& p = next[hrand(isize(next))]; p.first->monst = moHunterGuard; + p.first->stuntime = 0; p.second->monst = moHunterGuard; + p.second->stuntime = 0; } } else if(items[itHunting] < 10) { @@ -2069,8 +2075,10 @@ EX void giantLandSwitch(cell *c, int d, cell *from) { cell *dog2 = dogcells[hrand(isize(dogcells))]; if(valence() != 3 || isNeighbor(dog1, dog2)) { dog1->monst = moHunterGuard; + dog1->stuntime = 0; dog1->landparam = 0; dog2->monst = moHunterGuard; + dog2->stuntime = 0; dog2->landparam = 1; break; } @@ -2078,7 +2086,9 @@ EX void giantLandSwitch(cell *c, int d, cell *from) { } else if(isize(dogcells)) { c->item = itHunting; - dogcells[hrand(isize(dogcells))]->monst = moHunterGuard; + cell *dog = dogcells[hrand(isize(dogcells))]; + dog->monst = moHunterGuard; + dog->stuntime = 0; } } } @@ -2339,6 +2349,8 @@ EX void giantLandSwitch(cell *c, int d, cell *from) { if(c2->monst || c2->wall) return; c1->monst = moPair; c2->monst = moPair; + c1->stuntime = 0; + c2->stuntime = 0; c1->mondir = neighborId(c1, c2); c2->mondir = neighborId(c2, c1); } @@ -3016,6 +3028,8 @@ EX void setdist(cell *c, int d, cell *from) { if(d < BARLEV) brownian::apply_futures(c); #endif + if(!c->monst) c->stuntime = 0; + giantLandSwitch(c, d, from); if(d == min(reduced_barlev, 9)) moreBigStuff(c); diff --git a/monstergen.cpp b/monstergen.cpp index 1393ece1..e50cda61 100644 --- a/monstergen.cpp +++ b/monstergen.cpp @@ -527,10 +527,12 @@ EX void wandering() { forCellCM(c3, c2) if(c3->monst || c3->wall != waSea) goto notfound; c2->monst = moKrakenH; + c2->stuntime = 0; playSeenSound(c2); for(int i=0; itype; i++) { c2->move(i)->monst = moKrakenT; c2->move(i)->hitpoints = 1; + c2->move(i)->stuntime = 0; c2->move(i)->mondir = c2->c.spin(i); } goto found; diff --git a/orbs.cpp b/orbs.cpp index bf33c3cc..03881b2c 100644 --- a/orbs.cpp +++ b/orbs.cpp @@ -602,6 +602,7 @@ EX void teleportTo(cell *dest) { playSound(dest, "other-teleport"); if(dest->monst) { cwt.at->monst = dest->monst; + cwt.at->stuntime = dest->stuntime; dest->monst = moNone; } @@ -1074,6 +1075,7 @@ void poly_attack(cell *dest) { void placeIllusion(cell *c) { c->monst = moIllusion; + c->stuntime = 0; useupOrb(itOrbIllusion, 5); addMessage(XLAT("You create an Illusion!")); bfs();