1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 17:10:36 +00:00

fixed a checkmate rule bug with Pikeman and (potentially killed) monster on the way

This commit is contained in:
Zeno Rogue 2018-08-01 12:40:44 +02:00
parent a50169e3d3
commit 1aafd72cd8

View File

@ -1249,7 +1249,7 @@ bool monstersnear(stalemate1& sm) {
if(c3->monst != moWitchSpeed && fast) continue; if(c3->monst != moWitchSpeed && fast) continue;
// cannot attack if the immediate cell is impassable (except flashwitches) // cannot attack if the immediate cell is impassable (except flashwitches)
if(c3->monst != moWitchFlash) { if(c3->monst != moWitchFlash) {
if(!passable(c2, c3, stalemate::isKilled(c2)?0:P_MONSTER)) continue; if(!passable(c2, c3, stalemate::isKilled(c2)?P_MONSTER:0)) continue;
if(isPlayerOn(c2) && items[itOrbFire]) continue; if(isPlayerOn(c2) && items[itOrbFire]) continue;
} }
// flashwitches cannot attack if it would kill another enemy // flashwitches cannot attack if it would kill another enemy