Hello ppl.
I'm working on a spell, but it needs to be a triggered DoT. But I'm not good at making jass. Could someone add the DoT effect to this?
Atm its dealing instant Intelligence of hero in damage. But it has to do HeroLevel * 30 damage over 9 seconds too. It doesn't matter if it is damage per second or damage per 3 seconds. As long as it damages HeroLevel * 30 over 9 seconds.
I would really appreciate it, because if you'll do this for me I can use it for other spells in future too.
Here's the spell:
Curse of Death.
Deals Intelligence * 1 death damage to the target and an other Level * 30 death damage over 9 seconds. The target's chance to miss is reduced by 10% for the duration. (miss effect is from Curse, which is the spell that's being triggered)
PS. Don't watch the call UnitDamageTargetEx. It's for a damage detection system so I can make spells and melee attacks crittable with different crit chances. Just use UnitDamageTarget(...) or however you're going to do it, I will change it a bit to UnitDamageTargetEx.
I'm working on a spell, but it needs to be a triggered DoT. But I'm not good at making jass. Could someone add the DoT effect to this?
Atm its dealing instant Intelligence of hero in damage. But it has to do HeroLevel * 30 damage over 9 seconds too. It doesn't matter if it is damage per second or damage per 3 seconds. As long as it damages HeroLevel * 30 over 9 seconds.
I would really appreciate it, because if you'll do this for me I can use it for other spells in future too.
Here's the spell:
Curse of Death.
Deals Intelligence * 1 death damage to the target and an other Level * 30 death damage over 9 seconds. The target's chance to miss is reduced by 10% for the duration. (miss effect is from Curse, which is the spell that's being triggered)
JASS:
function Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00R' ) ) then
return false
endif
return true
endfunction
function Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local unit t = GetSpellTargetUnit()
local real d = I2R(GetHeroInt(u, true))
local real dd = I2R(GetHeroLevel(u))
call UnitDamageTargetEx(u, t, d, ATTACK_TYPE_HERO, DAMAGE_TYPE_EXTRA, false)
endfunction
//===========================================================================
function InitTrig_Curse_of_Death takes nothing returns nothing
set gg_trg_Curse_of_Death = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Curse_of_Death, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Curse_of_Death, Condition( function Conditions ) )
call TriggerAddAction( gg_trg_Curse_of_Death, function Actions )
endfunction
PS. Don't watch the call UnitDamageTargetEx. It's for a damage detection system so I can make spells and melee attacks crittable with different crit chances. Just use UnitDamageTarget(...) or however you're going to do it, I will change it a bit to UnitDamageTargetEx.