1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-07 04:47:56 +00:00

crossbow:: piercing dragons

This commit is contained in:
Zeno Rogue
2023-10-29 07:57:05 +01:00
parent b2c8bb96d6
commit 1f6bee5701
3 changed files with 5 additions and 3 deletions

View File

@@ -157,7 +157,8 @@ EX bool canAttack(cell *c1, eMonster m1, cell *c2, eMonster m2, flagtype flags)
if(isWorm(m2) && m2 != moTentacleGhost && !isDragon(m2)) return false;
// dragon can't attack itself, or player who mounted it
if(c1 && c2 && isWorm(c1->monst) && isWorm(c2->monst) && wormhead(c1) == wormhead(c2)
cell *cp = (flags & AF_BOW) ? cwt.at : c1;
if(cp && c2 && isWorm(cp->monst) && isWorm(c2->monst) && wormhead(cp) == wormhead(c2)
&& m1 != moTentacleGhost && m2 != moTentacleGhost)
return false;