Array
(
    [scriptVersion] => 8
    [oeValues] => Array
        (
            [Ubertip] => Array
                (
                )

            [Art] => ReplaceableTextures\CommandButtons\BTNScrollOfProtection.blp
            [abilList] => Array
                (
                )

            [Name] => Scroll of Clarity
        )

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

            [goldcost] => 500
            [author] => Ashbringer
            [authorDisplay] => |cffFF6600Ashbringer|r
            [version] => 1.0
            [rarity] => rare
        )

    [dmgTable] => Array
        (
        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => On Item Creation
                    [code] => call itm.setCharges(10)
    //The item will use the userInt for charges, cause charges are bugged.
    set itm.userInt=10
                    [values] => Array
                        (
                            [explain] => 
                            [visible] => false
                            [goldcost] => 0
                            [name] => 
                        )

                )

            [1] => Array
                (
                    [name] => Header
                    [code] => globals
        BuffType ash_scroll_mana
    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 Modifier m = Modifier.create() 
        call m.addModification(MOD_MANA_REGEN_PERC,0.2,0) 
        set ash_scroll_mana = BuffType.create(0.0,0.0,true) //0.0 time since I will apply it custom timed 
        call ash_scroll_mana.setBuffModifier(m)  
        call ash_scroll_mana.setBuffIcon('@@0@@')  
	endfunction
                    [values] => Array
                        (
                            [explain] => 
                            [visible] => false
                            [goldcost] => 0
                            [name] => 
                        )

                )

            [2] => Array
                (
                    [name] => Periodic
                    [code] => set itm.userInt = itm.userInt + 3
    if itm.userInt >= 11 then
        set itm.userInt = 10
    endif   
       
    call itm.setCharges(itm.userInt)  
    call TriggerSleepAction(0.1)  
    call itm.setCharges(itm.userInt)
                    [values] => Array
                        (
                            [explain] => Regenerates |cffFFFF803|r charges every |cffFFFF8040|r seconds up to a maximum of |cffFFFF8010|r charges.
                            [visible] => true
                            [goldcost] => 0
                            [PERIODIC_period] => 40
                            [name] => Recharge
                        )

                )

            [3] => Array
                (
                    [name] => Autocast
                    [code] => local Tower tower=itm.getCarrier()
    local integer lvl = tower.getLevel()
    local Iterate it
    local Unit next
    if itm.userInt > 0  then
        set it = Iterate.overUnitsInRangeOfCaster(tower, TARGET_TOWERS, 350)
        loop
                set next = it.next()
                call ash_scroll_mana.applyCustomTimed(tower,next,lvl*2,4.0)
                exitwhen next == 0
        endloop
        set itm.userInt=itm.userInt-1    
    endif
        
    call itm.setCharges(itm.userInt)  
    call TriggerSleepAction(0.1)  
    call itm.setCharges(itm.userInt)
                    [values] => Array
                        (
                            [explain] => Upon activation, towers in |cffFFFF80350|r range receive |cffFFFF8020%|r bonus mana regeneration for |cffFFFF804|r seconds. Costs |cffFFFF801|r charge.
                            [AUTOCAST_cooldown] => 4
                            [AUTOCAST_autoRange] => 1000
                            [AUTOCAST_manacost] => 0
                            [goldcost] => 500
                            [AUTOCAST_range] => 0
                            [AUTOCAST_targetType] => 0
                            [AUTOCAST_numBuffsBeforeIdle] => 0
                            [caster_art] => Abilities\Spells\Items\AIim\AIimTarget.mdl
                            [target_art] => 
                            [AUTOCAST_autocastType] => AC_TYPE_OFFENSIVE_IMMEDIATE
                            [AUTOCAST_buffType] => 0
                            [AUTOCAST_isExtended] => false
                            [name] => Mana Boost
                            [AUTOCAST_targetSelf] => false
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
            [0] => Array
                (
                    [id] => @@0@@
                    [derivedFrom] => Binf
                    [oeValues] => Array
                        (
                            [Targetattach] => origin
                            [Buffubertip] => Increased mana regeneration.
                            [TargetArt] => Abilities\Spells\Other\ANrl\ANrlTarget.mdl
                            [Bufftip] => Clarity
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNScrollOfProtection.blp
                        )

                )

        )

    [units] => Array
        (
        )

    [references] => Array
        (
        )

)