OnImpact = function(self, targetType, targetEntity)
if targetType == 'Unit' then
TransferUnitsOwnership({targetEntity}, self:GetArmy(), true)
self:Destroy()
else
--OverchargeProjectile.OnImpact(self, targetType, targetEntity)
APRoundCap.OnImpact(self, targetType, targetEntity)
end
end,
Statistics: Posted by DDDX — 09 Nov 2019, 23:08
Statistics: Posted by Exotic_Retard — 09 Nov 2019, 17:57
Statistics: Posted by DDDX — 05 Nov 2019, 21:42
Statistics: Posted by DDDX — 03 Nov 2019, 17:23
Statistics: Posted by DDDX — 03 Nov 2019, 00:47
OverCharge = Class(TDFOverchargeWeapon) {
--give us a % chance of mind control of the target instead of damaging it
OnImpact = function(self, TargetType, TargetEntity)
--first let's exclude OP units
if not EntityCategoryContains(categories.COMMAND + categories.BOSS + categories.OMEGA, TargetEntity) then
local mcChance = 1
local mcChance2 = 1
mcChance = math.random(1, 5) --20% chance of success
mcChance2 = math.random(1, 2) --50% chance of success to further reduce getting experimentals
if mcChance == 2 then --we got a winner!!!!!
if EntityCategoryContains(categories.EXPERIMENTAL) then --the target is an experimental, go for the second filter
if mcChance2 == 2 then --we got a winner again!!!
--(target gets mind controlled)
else
TDFOverchargeWeapon.OnImpact(self, TargetType, TargetEntity)
end
else
--(target gets mind controlled)
end
else
TDFOverchargeWeapon.OnImpact(self, TargetType, TargetEntity)
end
else --apply damage as usual
TDFOverchargeWeapon.OnImpact(self, TargetType, TargetEntity)
end
end,
},
Statistics: Posted by DDDX — 02 Nov 2019, 01:23