fixed the special case when the checkmate rule did not work with mirrored mimics

This commit is contained in:
Zeno Rogue 2017-09-17 13:37:05 +02:00
parent 2090ec8c74
commit edc70be39e
1 changed files with 5 additions and 2 deletions

View File

@ -1169,9 +1169,12 @@ namespace mirror {
}
bool isKilledByMirror(cell *c) {
for(auto& m: mirrors)
if(cwpeek(m.second, 0) == c && canAttack(m.second.c, moMimic, c, c->monst, 0))
for(auto& m: mirrors) {
cell *c1 = cwpeek(m.second, 0);
if(inmirror(c1)) c1 = reflect(cellwalker(c1, 0, false)).c;
if(c1 == c && canAttack(m.second.c, moMimic, c, c->monst, 0))
return true;
}
return false;
}