diff --git a/game.cpp b/game.cpp index 7ca4136a..44fa21c4 100644 --- a/game.cpp +++ b/game.cpp @@ -1038,8 +1038,6 @@ bool outlawNearby(cell *c, int dist) { return false; } -// int monstersnear(cell *c, cell *nocount = NULL, eMonster who = moPlayer, cell *pushto = NULL) { - namespace stalemate { bool anyKilled() { for(int i=0; iitem == itOrbAether && c->wall == waBoat); } -int monstersnear(stalemate1& sm) { +bool monstersnear(stalemate1& sm) { cell *c = sm.moveto; bool eaten = false; - if(hardcore && sm.who == moPlayer) return 0; + if(hardcore && sm.who == moPlayer) return false; int res = 0; bool fast = false; @@ -1156,12 +1154,12 @@ int monstersnear(stalemate1& sm) { if(sm.who == moPlayer && res && markOrb2(itOrbDomination) && c->monst) res = 0; - return res; + return !!res; } namespace multi { bool aftermove; } -int monstersnear2(); +bool monstersnear2(); int lastkills; @@ -1194,9 +1192,9 @@ bool swordConflict(const stalemate1& sm1, const stalemate1& sm2) { return false; } -int monstersnear2() { +bool monstersnear2() { multi::cpid++; - int b = 0; + bool b = false; bool recorduse[ittypes]; for(int i=0; i 8) - { b = 1; which = moAirball; } + { b = true; which = moAirball; } } for(int i=0; !b && i x7(stalemate::who, who); - int b; + bool b; if(who == moPlayer && c->wall == waBigStatue) { eWall w = comefrom->wall; c->wall = waNone; diff --git a/orbs.cpp b/orbs.cpp index e8dcb27e..8681181b 100644 --- a/orbs.cpp +++ b/orbs.cpp @@ -882,12 +882,12 @@ void useOrbOfDragon(cell *c) { checkmoveO(); } -int monstersnearO(orbAction a, cell *c, cell *nocount, eMonster who, cell *pushto, cell *comefrom) { +bool monstersnearO(orbAction a, cell *c, cell *nocount, eMonster who, cell *pushto, cell *comefrom) { // printf("[a = %d] ", a); - if(shmup::on) return 0; + if(shmup::on) return false; if(a == roCheck && multi::players > 1) - return 1; - else if(a == roMultiCheck) return 0; + return true; + else if(a == roMultiCheck) return false; else return monstersnear(c, nocount, who, pushto, comefrom); }