- Joined
- Jun 26, 2020
- Messages
- 1,921
Hello, this is the first time I'm using this function, and its not working, I tried to change the damage of an ability based in Cluster Rockets and is not changing, I'm sure that everything is ok, can you tell me what's wrong please?
The ability in the object editor
The raw values
Lua:
OnMapInit(function ()
local Spell = FourCC('A024')
local StrDmgFactor = 0.15
local AgiDmgFactor = 0.15
local IntDmgFactor = 0.15
local AttackFactor = 0.5
RegisterSpellEffectEvent(Spell, function ()
local caster = GetSpellAbilityUnit()
-- Calculating the damage
local damage = GetAttributeDamage(caster, StrDmgFactor, AgiDmgFactor, IntDmgFactor) +
GetAvarageAttack(caster) * AttackFactor
-- --
BlzSetAbilityRealLevelField(BlzGetUnitAbility(caster, Spell), ABILITY_RLF_DAMAGE_AMOUNT_NCS1, 0, damage/12)
end)
end)
The raw values