1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 01:20:37 +00:00

fixed a bug with arrow traps not killing anything (and possibly some other cases)

This commit is contained in:
Zeno Rogue 2018-06-24 01:18:39 +02:00
parent f0e07c4b15
commit 92aba5c95b

View File

@ -1019,7 +1019,7 @@ bool canAttack(cell *c1, eMonster m1, cell *c2, eMonster m2, flagtype flags) {
if(!(flags & (AF_MAGIC | AF_SWORD_INTO | AF_HORNS | AF_CRUSH))) return false; if(!(flags & (AF_MAGIC | AF_SWORD_INTO | AF_HORNS | AF_CRUSH))) return false;
if(!(flags & (AF_GUN | AF_SWORD | AF_SWORD_INTO | AF_MAGIC))) if(!(flags & (AF_GUN | AF_SWORD | AF_SWORD_INTO | AF_MAGIC)))
if(!logical_adjacent(c1, m1, c2)) return false; if(c1 != c2 && !logical_adjacent(c1, m1, c2)) return false;
if(!(flags & (AF_LANCE | AF_STAB | AF_BACK | AF_APPROACH | AF_GUN | AF_MAGIC))) if(!(flags & (AF_LANCE | AF_STAB | AF_BACK | AF_APPROACH | AF_GUN | AF_MAGIC)))
if(c1 && c2 && againstRose(c1, c2) && !ignoresSmell(m1)) if(c1 && c2 && againstRose(c1, c2) && !ignoresSmell(m1))