You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
voidCheckMissileCol(Missile &missile, DamageType damageType, int minDamage, int maxDamage, bool isDamageShifted, Point position, bool dontDeleteOnCollision)
475
+
boolCheckCanHitOnlyWalking(const Missile &missile, const ActorPosition &position, Direction wallDir)
476
+
{
477
+
Point other = missile.position.tile + wallDir;
478
+
if (missile.position.tile == position.tile && other == position.future)
479
+
returntrue;
480
+
if (missile.position.tile == position.future && other == position.tile)
481
+
returntrue;
482
+
returnfalse;
483
+
}
484
+
485
+
voidCheckMissileCol(Missile &missile, DamageType damageType, int minDamage, int maxDamage, bool isDamageShifted, Point position, bool dontDeleteOnCollision, std::optional<Direction> onlyHitWalking = {})
476
486
{
477
487
if (!InDungeonBounds(position))
478
488
return;
@@ -481,7 +491,7 @@ void CheckMissileCol(Missile &missile, DamageType damageType, int minDamage, int
481
491
int mid = dMonster[position.x][position.y];
482
492
if (mid != 0) {
483
493
Monster &monster = Monsters[std::abs(mid) - 1];
484
-
if (mid > 0 || monster.mode == MonsterMode::Petrified) {
if (missile._micaster != TARGET_BOTH && !missile.IsTrap()) {
510
520
if (missile._micaster == TARGET_MONSTERS) {
511
521
if (player->getId() != missile._misource)
@@ -758,6 +768,7 @@ bool TryGrowWall(int id, MissileID type, Point position, Direction growDirection
758
768
Displacement travelled = Displacement(Right(Right(growDirection))).worldToNormalScreen() * 30; // Move the wall to the edge to the next tile, but not over it
0 commit comments