Firestorm Cell v1
200
|
ID: 421
Family ID:
Author: Ashbringer
Rarity: uncommon
Element: fire
Attack Type: Magic
Attack Range: 900
Attack CD: 1.3
Damage: 106-106
Abil. Factor: 0.4
Status: Approved
|
Firestorm
Attacks have a 12% chance to apply 3 charges of Firestorm to the target. Each second, a charge will be spent, dealing 100 spell damage to enemies in 300 range. If the target already has charges, the charges will accumulate and a charge will be consumed instantly. On death all remaining firestorm charges get consumed at once. Level Bonus: +0.4% chance +3 damage |
Download
Toggle Triggers Header globals
BuffType ashbringer_firestorm_buff
endglobals
function ashbringer_firestorm_damage takes Tower tower, Unit creep returns nothing
call Effect.createScaled("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl", creep.getX(), creep.getY(), 0, 0, 0.4).destroy()
call tower.doSpellDamageAoEUnit(creep, 300, 100 + (3 * tower.getLevel()), tower.calcSpellCritNoBonus(), 0.0)
endfunction
function ashbringer_firestorm_periodic takes Buff b returns nothing
local Tower tower = b.getCaster()
local Unit target = b.getBuffedUnit()
set b.userInt = b.userInt - 1
if b.userInt <= 0 then
call b.removeBuff() //need to do it in this order, because the damage can kill the buff carrier, and removing buff after the carrier is dead causes double free
endif
call ashbringer_firestorm_damage(tower, target)
endfunction
function ashbringer_firestorm_setint takes Buff b returns nothing
set b.userInt = b.getPower()
endfunction
function firestorm takes Buff b returns nothing
local Tower tower = b.getCaster()
local Creep creep = b.getBuffedUnit()
call Effect.createScaled("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl", creep.getX(), creep.getY(), 0, 0, 0.6).destroy()
call tower.doSpellDamageAoEUnit(creep, 300, b.getPower()* (100 + (3 * tower.getLevel())), tower.calcSpellCritNoBonus(), 0.0)
endfunction
//Do not remove or rename this function!
//Put your initialization tasks here, this function will be called on map init
private function init takes nothing returns nothing
set ashbringer_firestorm_buff = BuffType.create(1000,0,false)
call ashbringer_firestorm_buff.setBuffIcon('@@0@@')
call ashbringer_firestorm_buff.addEventOnCreate(EventHandler.ashbringer_firestorm_setint)
call ashbringer_firestorm_buff.addPeriodicEvent(EventHandler.ashbringer_firestorm_periodic,1)
call ashbringer_firestorm_buff.addEventOnDeath(EventHandler.firestorm)
endfunction
On Attack
ONATTACK_chance: 0.12
ONATTACK_chanceLevelAdd: 0.004
function onAttack takes Tower tower returns nothing
local Unit creep = Event.getTarget()
local Buff b
local integer i
set b = creep.getBuffOfType(ashbringer_firestorm_buff)
if ( b != 0 ) then
call ashbringer_firestorm_damage(tower, creep)
set i = b.getPower() + 2
call b.setPower(i)
set b.userInt = i
else
set i = 3
call ashbringer_firestorm_buff.applyCustomPower(tower, creep, i, i)
endif
endfunction
|
Description:
Latest Upload Comment: