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

orb of Horns, and other cases caring about opposite cells, now work correctly in nonstandard geometries

This commit is contained in:
Zeno Rogue 2018-06-12 16:04:33 +02:00
parent 03999b75ca
commit fc23c64c5e

View File

@ -5060,7 +5060,7 @@ void stabbingAttack(cell *mf, cell *mt, eMonster who, int bonuskill) {
if(!c) continue;
eMonster mm = c->monst;
int flag = AF_APPROACH;
if(angledist(mt, backdir, t) >= 3) flag |= AF_HORNS;
if(angledist(mt, backdir, t) >= S7/2) flag |= AF_HORNS;
if(canAttack(mt,who,c,c->monst, flag)) {
if(attackMonster(c, flag | AF_MSG, who)) numlance++;
produceGhost(c, mm, who);