1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-29 19:40:35 +00:00

sword attacks reflect in mirrors

This commit is contained in:
Zeno Rogue 2022-06-17 10:27:02 +02:00
parent 9ae7bb3d7b
commit 7a7a982b33

View File

@ -2834,7 +2834,9 @@ EX namespace sword {
if(s<0) s += sword_angles * 2; if(s<0) s += sword_angles * 2;
s *= t; s *= t;
s /= (sword_angles * 2); s /= (sword_angles * 2);
return c->move(s); auto c1 = c->move(s);
if(inmirror(c1)) c1 = mirror::reflect(c1).at;
return c1;
} }
EX cell *pos(cell *c, const sworddir& sd, bool rev) { EX cell *pos(cell *c, const sworddir& sd, bool rev) {