diff --git a/Game/Dungeon/DungeonSimulation.cs b/Game/Dungeon/DungeonSimulation.cs index 919e8a2..76906f4 100644 --- a/Game/Dungeon/DungeonSimulation.cs +++ b/Game/Dungeon/DungeonSimulation.cs @@ -468,10 +468,14 @@ public partial class DungeonSimulation { int damage = ability.BaseDamage; string damageTypeKey = ability.DamageTypeKey ?? "physical"; - + + Console.WriteLine($"[MobAttack] Mob {mob.Id} ({mob.Name}) attacking with {ability.Name}: BaseDamage={damage}, Stats.PhysicalDamage={mob.Stats.PhysicalDamage}, Stats.MagicDamage={mob.Stats.MagicDamage}"); + var result = CombatCalculator.CalculateMobToPlayerDamage( mob, target, damageTypeKey, damage, target.Resistances); - + + Console.WriteLine($"[MobAttack] After calculation: FinalDamage={result.FinalDamage}, Player Armor={target.Armor}, Player Endurance={target.Endurance}"); + ApplyDamageToPlayer(mob, target, result.FinalDamage, damageTypeKey, result.WasResisted, result.WasWeakness); // Cleave hits other nearby players