mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 18:00:34 +00:00
orb of Horns, and other cases caring about opposite cells, now work correctly in nonstandard geometries
This commit is contained in:
parent
03999b75ca
commit
fc23c64c5e
2
game.cpp
2
game.cpp
@ -5060,7 +5060,7 @@ void stabbingAttack(cell *mf, cell *mt, eMonster who, int bonuskill) {
|
|||||||
if(!c) continue;
|
if(!c) continue;
|
||||||
eMonster mm = c->monst;
|
eMonster mm = c->monst;
|
||||||
int flag = AF_APPROACH;
|
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(canAttack(mt,who,c,c->monst, flag)) {
|
||||||
if(attackMonster(c, flag | AF_MSG, who)) numlance++;
|
if(attackMonster(c, flag | AF_MSG, who)) numlance++;
|
||||||
produceGhost(c, mm, who);
|
produceGhost(c, mm, who);
|
||||||
|
Loading…
Reference in New Issue
Block a user