Void Drake v1
2000
|
ID: 196
Family ID:
Author: Chronos
Rarity: rare
Element: darkness
Attack Type: Essence
Attack Range: 1000
Attack CD: 1.35
Damage: 3633-3965
Abil. Factor: 1.4
Status: Approved
|
Specials:
-50% exp gain (-6%/lvl) +4% attackspeed/lvl +12% damage/lvl
Silence
Units damaged by this tower are silenced for 1.25 seconds. Bosses are silenced only for 1/3 of the normal duration. Level Bonus: +0.07 seconds duration
Void
Every second, this unit loses 1% of its experience. This tower will not lose levels in this way. Replacing a tower with this tower will reset the experience to 0 unless the replaced tower is of this tower's family. When this tower is upgraded or replaced to Void Dragon, it loses experience equal to 50% of its current experience. Level Bonus: +0.02% periodical experience lost +1% upgrade experience lost |
Download
Toggle Triggers Header globals
//@export
real array Chronos_voidLevelExp
endglobals
//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
local integer i = 1
local real f = 1.0
loop //calculate exp needed for levels
exitwhen i > 25
set Chronos_voidLevelExp[i] = Chronos_voidLevelExp[i-1] + Game.EXP_BASE_VALUE * f
set i = i + 1
set f = f * Game.EXP_LEVEL_FACTOR
endloop
endfunction
On Damage
ONDAMAGE_chance: 1
ONDAMAGE_chanceLevelAdd: 0
function onDamage takes Tower tower returns nothing
local real silenceDuration = 1.25 + 0.07 * tower.getLevel()
local Unit creep = Event.getTarget()
if creep.getSize() == SIZE_BOSS then
set silenceDuration = silenceDuration / 3
endif
call cb_silence.applyOnlyTimed(tower, Event.getTarget(), silenceDuration)
endfunction
On Tower Creation function onCreate takes Tower tower returns nothing
if Event.getPrecedingTower().getFamily() != tower.getFamily() then
call tower.removeExpFlat(tower.getExp())
endif
endfunction
Periodic
PERIODIC_period: 1
function periodic takes Tower tower returns nothing
local integer level = tower.getLevel()
local real exp = tower.getExp()
local real expRemoved = exp * (0.01+0.0002*level)
if expRemoved >= (exp - Chronos_voidLevelExp[level]) then
set expRemoved = (exp - Chronos_voidLevelExp[level]) - 0.01
endif
if (expRemoved) >= 0.1 and level != 25 then
call tower.removeExpFlat(expRemoved)
endif
endfunction
|
Description:
Latest Upload Comment: