Working on projectiles5

This commit is contained in:
dingo
2026-01-18 16:47:43 -05:00
parent 1e366ff4d4
commit 3ee6c87eb9
+2 -2
View File
@@ -555,7 +555,7 @@ public partial class DungeonSimulation
Console.WriteLine($"[Projectile {projectile.Id}] Pos: ({projectile.X:F1}, {projectile.Y:F1}), Mob {mob.Id} Pos: ({mob.X:F1}, {mob.Y:F1}), Distance: {distance:F1}");
}
if (distance < 20)
if (distance < 50) // Increased from 20 to account for projectile speed (15px/tick movement)
{
Console.WriteLine($"[Projectile {projectile.Id}] HIT mob {mob.Id} at distance {distance:F1}! Damage: {projectile.Damage}");
// Get player instance for damage calculation
@@ -632,7 +632,7 @@ public partial class DungeonSimulation
{
foreach (var player in Players.Values.Where(p => p.IsAlive))
{
if (Distance(projectile.X, projectile.Y, player.X, player.Y) < 20)
if (Distance(projectile.X, projectile.Y, player.X, player.Y) < 50) // Increased from 20 to account for projectile speed
{
// Hit!
if (projectile.AoeRadius > 0)