Working on projectiles2
This commit is contained in:
@@ -542,8 +542,10 @@ public partial class DungeonSimulation
|
||||
{
|
||||
foreach (var mob in Mobs.Values.Where(m => m.IsAlive))
|
||||
{
|
||||
if (Distance(projectile.X, projectile.Y, mob.X, mob.Y) < 20)
|
||||
float distance = Distance(projectile.X, projectile.Y, mob.X, mob.Y);
|
||||
if (distance < 20)
|
||||
{
|
||||
Console.WriteLine($"[Projectile {projectile.Id}] HIT mob {mob.Id} at distance {distance:F1}! Damage: {projectile.Damage}");
|
||||
// Get player instance for damage calculation
|
||||
PlayerInstance? sourcePlayer = null;
|
||||
if (Players.TryGetValue(projectile.SourcePlayerId, out var playerInst))
|
||||
|
||||
Reference in New Issue
Block a user