diff --git a/1.6/1.6/Assemblies/ArachnaeSwarm.dll b/1.6/1.6/Assemblies/ArachnaeSwarm.dll index e2e49d2..bb89772 100644 Binary files a/1.6/1.6/Assemblies/ArachnaeSwarm.dll and b/1.6/1.6/Assemblies/ArachnaeSwarm.dll differ diff --git a/Source/ArachnaeSwarm/Abilities/PawnFlyer_TrackingCharge.cs b/Source/ArachnaeSwarm/Abilities/PawnFlyer_TrackingCharge.cs index 197e2be..378472c 100644 --- a/Source/ArachnaeSwarm/Abilities/PawnFlyer_TrackingCharge.cs +++ b/Source/ArachnaeSwarm/Abilities/PawnFlyer_TrackingCharge.cs @@ -127,14 +127,20 @@ namespace ArachnaeSwarm // --- AOE Damage Logic --- // Damage other hostiles in the path. - float aoeDamage = this.initialDamage + (((Vector3)StartVecInfo.GetValue(this) - this.DrawPos).magnitude * this.damagePerTile); - var aoeDinfo = new DamageInfo(this.collisionDamageDef, aoeDamage, 1f, -1, this.FlyingPawn); + float distanceTravelled = ((Vector3)StartVecInfo.GetValue(this) - this.DrawPos).magnitude; + float currentAOEDamage = this.initialDamage + (distanceTravelled * this.damagePerTile); + foreach (var thing in GenRadial.RadialDistinctThingsAround(this.Position, this.Map, 1.0f, false)) { if (thing != this.FlyingPawn && thing != this && thing != primaryTarget.Thing) { if (thing is Pawn pawn && !pawn.Downed && pawn.HostileTo(this.FlyingPawn)) { + // --- CRITICAL FIX --- + // Create a *new* DamageInfo object for each target. + // Reusing the same dinfo object causes its damage value to be modified (e.g., by armor), + // resulting in subsequent targets taking zero damage. + var aoeDinfo = new DamageInfo(this.collisionDamageDef, currentAOEDamage, 1f, -1, this.FlyingPawn); pawn.TakeDamage(aoeDinfo); } }