diff --git a/attack.cpp b/attack.cpp index d43150d6..f69e0cc5 100644 --- a/attack.cpp +++ b/attack.cpp @@ -105,7 +105,7 @@ EX bool canAttack(cell *c1, eMonster m1, cell *c2, eMonster m2, flagtype flags) if(m1 == moArrowTrap && arrow_stuns(m2)) return true; - if(among(m2, moAnimatedDie, moAngryDie) && !(flags & (AF_MAGIC | AF_CRUSH))) return false; + if(isDie(m2) && !(flags & (AF_MAGIC | AF_CRUSH))) return false; if(among(m2, moAltDemon, moHexDemon, moPair, moCrusher, moNorthPole, moSouthPole, moMonk) && !(flags & (AF_EAT | AF_MAGIC | AF_BULL | AF_CRUSH))) return false; diff --git a/celldrawer.cpp b/celldrawer.cpp index c85f51bf..a015e841 100644 --- a/celldrawer.cpp +++ b/celldrawer.cpp @@ -1601,7 +1601,7 @@ void celldrawer::draw_features() { poly_outline = OUTLINE_DEFAULT; } - else if(among(c->wall, waRichDie, waHappyDie)) { + else if(isDie(c->wall)) { color_t col = darkena(winf[c->wall].color, 0, 0xFF); ld footphase; diff --git a/complex2.cpp b/complex2.cpp index 08fe9451..9333ec27 100644 --- a/complex2.cpp +++ b/complex2.cpp @@ -1120,7 +1120,7 @@ EX namespace dice { } EX bool on(cell *c) { - return among(c->wall, waRichDie, waHappyDie) || among(c->monst, moAnimatedDie, moAngryDie); + return isDie(c->wall) || isDie(c->monst); } EX void roll(movei mi) { diff --git a/game.cpp b/game.cpp index 433c7b47..8d1177b9 100644 --- a/game.cpp +++ b/game.cpp @@ -379,7 +379,7 @@ EX void pushThumper(const movei& mi) { cto->wall = waCrateOnTarget; th->wall = waCrateTarget; } - else if(among(w, waRichDie, waHappyDie)) { + else if(isDie(w)) { th->wall = waNone; cto->wall = w; dice::roll(mi); diff --git a/graph.cpp b/graph.cpp index 17bb0518..c32e7744 100644 --- a/graph.cpp +++ b/graph.cpp @@ -2886,7 +2886,7 @@ EX bool drawMonster(const shiftmatrix& Vparam, int ct, cell *c, color_t col, col // golems, knights, and hyperbugs don't face the player (mondir-controlled) // also whatever in the lineview mode, and whatever in the quotient geometry - else if(among(c->monst, moAnimatedDie, moAngryDie)) { + else if(isDie(c->monst)) { transmatrix U = inverse_shift(Vparam, Vs); U = rgpushxto0(tC0(U)); die_target = Vparam; diff --git a/monstermove.cpp b/monstermove.cpp index aa6caf7e..8d104f84 100644 --- a/monstermove.cpp +++ b/monstermove.cpp @@ -103,7 +103,7 @@ EX void moveEffect(const movei& mi, eMonster m) { tortoise::move_baby(cf, ct); } - if(among(m, moAnimatedDie, moAngryDie) && mi.proper()) + if(isDie(m) && mi.proper()) dice::roll(mi); } @@ -1157,7 +1157,7 @@ EX void groupmove2(const movei& mi, eMonster movtype, flagtype mf) { onpath(from, 0); - if(among(mi.t->monst, moAnimatedDie, moAngryDie)) { + if(isDie(mi.t->monst)) { /* other dice will not pathfind through the original cell */ /* this makes it easier for the player to roll dice correctly */ onpath(c, 0); diff --git a/passable.cpp b/passable.cpp index b5b9276c..07c9f5b6 100644 --- a/passable.cpp +++ b/passable.cpp @@ -544,7 +544,7 @@ EX bool passable_for(eMonster m, cell *w, cell *from, flagtype extra) { if(extra & P_ONPLAYER) { if(isPlayerOn(w)) return true; } - if(from && among(from->monst, moAnimatedDie, moAngryDie)) { + if(from && isDie(from->monst)) { bool ok = false; for(int i=0; itype; i++) { if(from->move(i) != w) continue; diff --git a/shmup.cpp b/shmup.cpp index 238c49bb..ae8e11aa 100644 --- a/shmup.cpp +++ b/shmup.cpp @@ -2462,7 +2462,7 @@ void activateMonstersAt(cell *c) { } if(c->monst && isMimic(c->monst)) c->monst = moNone; // mimics are awakened by awakenMimics - if(c->monst && !isIvy(c) && !isWorm(c) && !isMutantIvy(c) && !isKraken(c->monst) && c->monst != moPrincess && c->monst != moHunterGuard && !among(c->monst, moAnimatedDie, moAngryDie)) { + if(c->monst && !isIvy(c) && !isWorm(c) && !isMutantIvy(c) && !isKraken(c->monst) && c->monst != moPrincess && c->monst != moHunterGuard && !isDie(c->monst)) { // awaken as a monster monster *enemy = new monster; enemy->at = Id;