Skip to content

Commit

Permalink
Fix Solace torpedo damage
Browse files Browse the repository at this point in the history
In #5725 the number of child projectiles were accidentally increased from 2 to 3 resulting in increased total damage (6k rather than 4k). The damage is now properly split between child projectiles as well. To compensate the original damage was multiplied by the number of child projectiles.
  • Loading branch information
Tagada14 committed Nov 9, 2024
1 parent 5ae907e commit c3c6647
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,14 @@ AANTorpedoCluster01 = ClassProjectile(ATorpedoCluster) {
OnEnterWater = function(self)
ATorpedoClusterOnEnterWater(self)

-- create child projectiles
local bp = self.Blueprint.Physics
local numProjectiles = bp.Fragments
for i = 0, numProjectiles do

-- split damage over each child
self.DamageData.DamageAmount = self.DamageData.DamageAmount / numProjectiles

-- create child projectiles
for i = 0, (numProjectiles - 1) do
proj = self:CreateChildProjectile(bp.FragmentId)
proj.DamageData = self.DamageData
end
Expand Down
2 changes: 1 addition & 1 deletion units/XAA0306/XAA0306_unit.bp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ UnitBlueprint{
AutoInitiateAttackCommand = true,
BallisticArc = "RULEUBA_None",
CollideFriendly = false,
Damage = 400,
Damage = 800,
DamageType = "Normal",
DisplayName = "Torpedo Cluster",
FireTargetLayerCapsTable = {
Expand Down

0 comments on commit c3c6647

Please sign in to comment.