mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-06-12 03:14:07 +00:00
fixed the special case when the checkmate rule did not work with mirrored mimics
This commit is contained in:
parent
2090ec8c74
commit
edc70be39e
@ -1169,9 +1169,12 @@ namespace mirror {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool isKilledByMirror(cell *c) {
|
bool isKilledByMirror(cell *c) {
|
||||||
for(auto& m: mirrors)
|
for(auto& m: mirrors) {
|
||||||
if(cwpeek(m.second, 0) == c && canAttack(m.second.c, moMimic, c, c->monst, 0))
|
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 true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user