Array
(
[scriptVersion] => 7
[oeValues] => Array
(
[RngBuff1] => 250
[MissileHoming] => 1
[Upgrade] => Array
(
)
[targs1] => Array
(
)
[goldcost] => 50
[weapsOn] => 1
[dice1] => 1
[Missilespeed] => 1500
[file] => buildings\other\WyvernCage2\WyvernCage2.mdl
[atkType1] => siege
[modelScale] => 0.35
[weapTp1] => missile
[Missilearc] => 0.2
[acquire] => 950
[rangeN1] => 950
[upgrades] => Array
(
)
[cool1] => 1.3
[Ubertip] => This trap is used to capture beasts but it works on other stuff too.
[abilList] => Array
(
)
[Name] => Wooden Trap
[Missileart] => Abilities\Weapons\RexxarMissile\RexxarMissile.mdl
[Art] => ReplaceableTextures\CommandButtons\BTNCage.blp
[buildingShadow] => Array
(
)
[sides1] => 1
[auto] => Array
(
)
[dmgplus1] => 37
[bldtm] => 1
)
[settings] => Array
(
[author] => Boekie
[element] => iron
[authorDisplay] => |cff00CD00Boekie|r
[alpha] => 255
[balanceTip] => Array
(
)
[rarity] => uncommon
[version] => 1.0
[abil_factor] => 0.6
)
[effects] => Array
(
)
[dmgTable] => Array
(
)
[triggers] => Array
(
[0] => Array
(
[name] => Header
[code] => globals
endglobals
//@export
function trap takes Tower tower, real cooldown, real baseDamage, real damageAdd, real stunDuration, integer maxTargets returns nothing
local integer lvl = tower.getLevel()
local Iterate it = Iterate.overUnitsInRangeOfCaster(tower,TARGET_CREEPS,950)
local Unit next = it.nextRandom()
local integer numTargets = 0
loop
exitwhen next == 0
set numTargets = numTargets + 1
call cb_stun.applyOnlyTimed(tower, next, stunDuration)
call tower.doSpellDamage(next,baseDamage+lvl*damageAdd,tower.calcSpellCritNoBonus())
call SFXAtUnit("Abilities\\Spells\\Orc\\ReinforcedTrollBurrow\\ReinforcedTrollBurrowTarget.mdl",next.getUnit())
exitwhen numTargets >= maxTargets
set next = it.nextRandom()
endloop
if next != 0 then
call it.destroy()
endif
if numTargets > 0 then
call Event.getCurrentPeriodicEvent().enableAdvanced(cooldown - lvl*0.2, false) //Trapping successful; go into cooldown.
else
call Event.getCurrentPeriodicEvent().enableAdvanced(2, false) //Nothing trapped; go into a shorter cooldown.
endif
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
endfunction
[values] => Array
(
[icon] =>
[visible] => false
[name] =>
[short_explain] =>
[long_explain] =>
)
)
[1] => Array
(
[name] => Periodic
[code] => call trap(tower, 15, 70, 3, 0.5, 3)
[values] => Array
(
[icon] => ReplaceableTextures\CommandButtons\BTNUnholyArmor.blp
[visible] => true
[PERIODIC_period] => 2
[name] => Activate Trap
[short_explain] => Traps random creeps in range.
[long_explain] => Every |cffFFFF8015|r seconds this tower traps |cffFFFF803|r creeps in |cffFFFF80950|r range, dealing |cffFFFF8070|r spelldamage and stunning them for |cffFFFF800.5|r seconds.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+3|r spelldamage |n|cffFFFF80-0.2|r seconds cooldown
)
)
)
[abilities] => Array
(
)
[buffs] => Array
(
)
[units] => Array
(
)
[references] => Array
(
)
)