Array
(
    [scriptVersion] => 7
    [oeValues] => Array
        (
            [Ubertip] => The dagger oozes out deadly green poison.
            [Art] => ReplaceableTextures\CommandButtons\BTNEnvenomedSpear.blp
            [abilList] => Array
                (
                )

            [Name] => Dagger of Bane
        )

    [settings] => Array
        (
            [balanceTip] => Array
                (
                )

            [goldcost] => 700
            [author] => F12ight
            [authorDisplay] => |cff00bfffF12ight|r
            [version] => 1.0
            [rarity] => unique
        )

    [dmgTable] => Array
        (
        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => Header
                    [code] => globals
    BuffType fright_poison_dagger_buff
endglobals

function dealDamage takes Buff b returns nothing
    local Tower tower = b.getCaster()
    if tower == b.userInt then
        call tower.doSpellDamage(b.getBuffedUnit(),tower.getCurrentAttackDamageBase()*0.15,tower.getProp_SpellCritDamage())
    else
        call b.removeBuff()
    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
    set fright_poison_dagger_buff = BuffType.create(4.01,0,false)   // + 0.01 seconds is a dirty hack to make damage tick 4 times with 100% duration
    call fright_poison_dagger_buff.setBuffIcon('@@0@@')
    call fright_poison_dagger_buff.addPeriodicEvent(EventHandler.dealDamage,1)
endfunction
                    [values] => Array
                        (
                            [explain] => 
                            [visible] => false
                            [goldcost] => 0
                            [name] => 
                        )

                )

            [1] => Array
                (
                    [name] => On Damage
                    [code] => local Buff P
    local Unit u
    if Event.isMainTarget() then
        set u = Event.getTarget()
        set P = u.getBuffOfType( fright_poison_dagger_buff )
        if P != 0 then
            call fright_poison_dagger_buff.apply(itm.getCarrier(), Event.getTarget(), 0)
        else
            set fright_poison_dagger_buff.apply(itm.getCarrier(), Event.getTarget(), 0).userInt = itm.getCarrier()
        endif
    endif
                    [values] => Array
                        (
                            [explain] => Applies a deadly poison on damage to the main target of the attack. Each second the poison deals |cffFFFF8015%|r of the tower's base damage as spell damage to the target. The spell damage is always critical. Lasts |cffFFFF804|r seconds.
                            [ONDAMAGE_chance] => 1.0
                            [visible] => true
                            [goldcost] => 700
                            [name] => Deadly Poison
                            [ONDAMAGE_chanceLevelAdd] => 0.0
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
            [0] => Array
                (
                    [id] => @@0@@
                    [derivedFrom] => Bpsd
                    [oeValues] => Array
                        (
                            [Targetattach] => chest
                            [Buffubertip] => This unit is afflicted with dealy poison; it will take damage over time.
                            [Targetattachcount] => 1
                            [TargetArt] => Abilities\Spells\Other\AcidBomb\BottleImpact.mdl
                            [Bufftip] => Deadly Poison
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNEnvenomedSpear.blp
                        )

                )

        )

    [units] => Array
        (
        )

    [references] => Array
        (
        )

)