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

            [Art] => ReplaceableTextures\CommandButtons\BTNSerpentWard.blp
            [dmgplus1] => 3643
            [bldtm] => 1
            [goldcost] => 3250
            [unitSound] => Blacksmith
            [sides1] => 1
            [acquire] => 800
            [upgrades] => Array
                (
                )

            [Upgrade] => Array
                (
                )

            [Name] => Flametongue Totem
            [weapTp1] => missile
            [file] => .mdl
            [MissileHoming] => 1
            [uberSplat] => YTDC
            [Missilespeed] => 1600
            [Missileart] => Abilities\Spells\Human\FlameStrike\FlameStrikeEmbers.mdl
            [dice1] => 1
            [RngBuff1] => 250
            [modelScale] => 0.1
            [rangeN1] => 800
            [atkType1] => pierce
            [cool1] => 3
            [Ubertip] => Its fire is generous with allies and unforgiving with everything else.
            [scaleBull] => 0
            [abilList] => Array
                (
                )

            [buildingShadow] => Array
                (
                )

            [targs1] => Array
                (
                )

            [weapsOn] => 1
        )

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

            [abil_factor] => 0.25
            [author] => Ashbringer
            [alpha] => 255
            [authorDisplay] => |cffff6600Ashbringer|r
            [version] => 1.0
            [element] => fire
            [rarity] => unique
        )

    [effects] => Array
        (
            [0] => Array
                (
                    [x] => 1.16817
                    [y] => -0.190388
                    [z] => -19.2
                    [scale] => 0.15
                    [rot] => 2.3562
                    [file] => Doodads\Cityscape\Structures\City_ColumnDouble\City_ColumnDouble.mdl
                    [red] => 65
                    [green] => 45
                    [blue] => 45
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [1] => Array
                (
                    [x] => 0.748423
                    [y] => 1.30688
                    [z] => -19.2
                    [scale] => 0.15
                    [rot] => 3.92699
                    [file] => Doodads\Cityscape\Structures\City_ColumnDouble\City_ColumnDouble.mdl
                    [red] => 65
                    [green] => 45
                    [blue] => 45
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [2] => Array
                (
                    [x] => -0.155609
                    [y] => -0.132763
                    [z] => 0
                    [scale] => 0.55
                    [rot] => 0
                    [file] => Doodads\Cityscape\Structures\City_LowWall_TallEndCap\City_LowWall_TallEndCap.mdl
                    [red] => 65
                    [green] => 45
                    [blue] => 45
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [3] => Array
                (
                    [x] => -0.0443398
                    [y] => 0.0170278
                    [z] => -19.2
                    [scale] => 1.65
                    [rot] => 0
                    [file] => Abilities\Spells\Human\FlameStrike\FlameStrikeEmbers.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [4] => Array
                (
                    [x] => -32.0807
                    [y] => -31.4613
                    [z] => 0
                    [scale] => 0.37
                    [rot] => 0
                    [file] => Doodads\Cityscape\Structures\City_LowWall_TallEndCapWithoutLantern\City_LowWall_TallEndCapWithoutLantern.mdl
                    [red] => 55
                    [green] => 35
                    [blue] => 35
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [5] => Array
                (
                    [x] => 0.0642175
                    [y] => 0.248771
                    [z] => -19.2
                    [scale] => 1.55
                    [rot] => 1.79769
                    [file] => war3mapImported\GeneralAuraTargetWhite.mdl
                    [red] => 255
                    [green] => 55
                    [blue] => 1
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [6] => Array
                (
                    [x] => 32.337
                    [y] => -31.929
                    [z] => 0
                    [scale] => 0.37
                    [rot] => 0
                    [file] => Doodads\Cityscape\Structures\City_LowWall_TallEndCapWithoutLantern\City_LowWall_TallEndCapWithoutLantern.mdl
                    [red] => 55
                    [green] => 35
                    [blue] => 35
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [7] => Array
                (
                    [x] => 30.4961
                    [y] => 29.9626
                    [z] => 0
                    [scale] => 0.37
                    [rot] => 0
                    [file] => Doodads\Cityscape\Structures\City_LowWall_TallEndCapWithoutLantern\City_LowWall_TallEndCapWithoutLantern.mdl
                    [red] => 55
                    [green] => 35
                    [blue] => 35
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [8] => Array
                (
                    [x] => 22.5755
                    [y] => 21.9693
                    [z] => 0
                    [scale] => 0.26
                    [rot] => 5.49779
                    [file] => Doodads\Cityscape\Structures\CityLowWall90\CityLowWall90.mdl
                    [red] => 65
                    [green] => 45
                    [blue] => 45
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [9] => Array
                (
                    [x] => -21.8754
                    [y] => -23.3473
                    [z] => 0
                    [scale] => 0.26
                    [rot] => 5.49779
                    [file] => Doodads\Cityscape\Structures\CityLowWall90\CityLowWall90.mdl
                    [red] => 65
                    [green] => 45
                    [blue] => 45
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [10] => Array
                (
                    [x] => -22.6961
                    [y] => 22.2427
                    [z] => 0
                    [scale] => 0.26
                    [rot] => 3.92699
                    [file] => Doodads\Cityscape\Structures\CityLowWall90\CityLowWall90.mdl
                    [red] => 65
                    [green] => 45
                    [blue] => 45
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [11] => Array
                (
                    [x] => 22.6204
                    [y] => -22.2082
                    [z] => 0
                    [scale] => 0.26
                    [rot] => 3.92699
                    [file] => Doodads\Cityscape\Structures\CityLowWall90\CityLowWall90.mdl
                    [red] => 65
                    [green] => 45
                    [blue] => 45
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [12] => Array
                (
                    [x] => -30.8065
                    [y] => 31.8316
                    [z] => 0
                    [scale] => 0.37
                    [rot] => 0
                    [file] => Doodads\Cityscape\Structures\City_LowWall_TallEndCapWithoutLantern\City_LowWall_TallEndCapWithoutLantern.mdl
                    [red] => 55
                    [green] => 35
                    [blue] => 35
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [13] => Array
                (
                    [x] => -0.0806804
                    [y] => -0.00801738
                    [z] => 0
                    [scale] => 1.1
                    [rot] => 2.42601
                    [file] => Environment\LargeBuildingFire\LargeBuildingFire2.mdl
                    [red] => 255
                    [green] => 255
                    [blue] => 255
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [14] => Array
                (
                    [x] => -0.117049
                    [y] => -0.201224
                    [z] => 70.4
                    [scale] => 0.35
                    [rot] => 0
                    [file] => Doodads\Cityscape\Structures\City_LowWall_TallEndCap\City_LowWall_TallEndCap.mdl
                    [red] => 65
                    [green] => 45
                    [blue] => 45
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [15] => Array
                (
                    [x] => -0.0452391
                    [y] => 0.153317
                    [z] => 32
                    [scale] => 1
                    [rot] => 1.79769
                    [file] => war3mapImported\GeneralAuraTargetWhite.mdl
                    [red] => 255
                    [green] => 55
                    [blue] => 1
                    [alpha] => 255
                    [pitch] => 0
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

            [16] => Array
                (
                    [x] => -0.173762
                    [y] => 41.7693
                    [z] => 153.6
                    [scale] => 0.75
                    [rot] => 1.5708
                    [file] => war3mapImported\GlowingRunes8_np.mdl
                    [red] => 255
                    [green] => 155
                    [blue] => 155
                    [alpha] => 255
                    [pitch] => -4.71
                    [advanced] => false
                    [animation] => Array
                        (
                        )

                    [aniSpeed] => 50
                    [pcolor] => 255
                )

        )

    [dmgTable] => Array
        (
        )

    [triggers] => Array
        (
            [0] => Array
                (
                    [name] => On Level Up
                    [code] => call tower.refreshAuras()
                    [values] => Array
                        (
                            [visible] => false
                            [icon] => 
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

            [1] => Array
                (
                    [name] => Header
                    [code] => globals
        BuffType ashbringer_flametongue_buff
        //@import
        MultiboardValues ashbringer_totem_affinity
    endglobals
    
    function ashbringer_flametongue_oncreate takes Buff b returns nothing
        local Tower tower = b.getCaster()
        local Tower target = b.getBuffedUnit()
        
        if target.getElement() == Element.FIRE then
            set tower.userInt = tower.userInt + 2
        endif
        set b.userReal = 0.05 + (tower.getLevel() * 0.002) + (tower.userInt * 0.002)
    endfunction
    
    function ashbringer_flametongue_oncleanup takes Buff b returns nothing
        local Tower tower = b.getCaster()
        local Tower target = b.getBuffedUnit()
        
        if target.getElement() == Element.FIRE then
            set tower.userInt = tower.userInt - 2
        endif
    endfunction
    
    function ashbringer_flametongue_onrefresh takes Buff b returns nothing
        local Tower tower = b.getCaster()
        
        call b.setPower(tower.getLevel() + tower.userInt)
        set b.userReal = 0.05 + (tower.getLevel() * 0.002) + (tower.userInt * 0.002)
    endfunction
    
    function ashbringer_flametongue_ondamage takes Buff b returns nothing
        local Tower tower = b.getBuffedUnit()
        
        call tower.doSpellDamage(Event.getTarget(), tower.getCurrentAttackDamageWithBonus() * b.userReal, tower.calcSpellCritNoBonus())
    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
        local Modifier mod = Modifier.create()
        
        set ashbringer_flametongue_buff = BuffType.createAuraEffectType(true)
        call ashbringer_flametongue_buff.setBuffIcon('@@0@@')
        call mod.addModification(MOD_SPELL_DAMAGE_DEALT, 0.125, 0.005)
        call ashbringer_flametongue_buff.setBuffModifier(mod)
        call ashbringer_flametongue_buff.addEventOnCreate(EventHandler.ashbringer_flametongue_oncreate)
        call ashbringer_flametongue_buff.addEventOnCleanup(EventHandler.ashbringer_flametongue_oncleanup)
        call ashbringer_flametongue_buff.setEventOnRefresh(EventHandler.ashbringer_flametongue_onrefresh)
        call ashbringer_flametongue_buff.addEventOnDamage(EventHandler.ashbringer_flametongue_ondamage, 1.0, 0.0)
    endfunction
                    [values] => Array
                        (
                            [visible] => true
                            [icon] => ReplaceableTextures\CommandButtons\BTNFlameShock.blp
                            [name] => Call of Fire
                            [short_explain] => The strength of Flametongue Aura is increased for each |cFFFF5300Fire|r tower it affects.
                            [long_explain] => The effective level of Flametongue Aura is increased by |cffFFFF802|r for each |cFFFF5300Fire|r tower it affects.
                        )

                )

            [2] => Array
                (
                    [name] => On Tower Details
                    [code] => call ashbringer_totem_affinity.setValue(0, I2S(tower.userInt)) 
    return ashbringer_totem_affinity
                    [values] => Array
                        (
                            [0] => Array
                                (
                                    [_value] => 0
                                    [typ] => string
                                )

                        )

                )

            [3] => Array
                (
                    [name] => Tower Aura
                    [code] => Array
                        (
                        )

                    [values] => Array
                        (
                            [AURA_powerAdd] => 1
                            [visible] => true
                            [AURA_auraEffect] => ashbringer_flametongue_buff
                            [AURA_levelAdd] => 1
                            [AURA_power] => 0
                            [icon] => ReplaceableTextures\CommandButtons\BTNSerpentWard.blp
                            [AURA_targetType] => TARGET_TYPE_TOWERS
                            [long_explain] => Increases the spell damage of towers in |cffFFFF80200|r range by |cffFFFF8012.5%|r and causes attacks to deal |cffFFFF805%|r of attack damage as additional spell damage on hit.|n|nDoes not affect this tower.|n|n|cffFF8000Level Bonus:|r|n|cffFFFF80+0.5%|r spell damage|n|cffFFFF80+0.2%|r attack damage as spell damage
                            [AURA_targetSelf] => false
                            [name] => Flametongue Aura
                            [AURA_level] => 0
                            [short_explain] => Increases the spell damage of nearby towers and causes their attack hits to do additional spell damage based on attack damage.
                            [AURA_auraRange] => 200
                        )

                )

            [4] => Array
                (
                    [name] => Periodic
                    [code] => if tower.userInt != tower.userInt2 then
        set tower.userInt2 = tower.userInt
        call tower.refreshAuras()
    endif
                    [values] => Array
                        (
                            [visible] => false
                            [PERIODIC_period] => 5
                            [icon] => 
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

            [5] => Array
                (
                    [name] => On Tower Creation
                    [code] => set tower.userInt = 0
    set tower.userInt2 = 0
                    [values] => Array
                        (
                            [visible] => false
                            [icon] => 
                            [name] => 
                            [short_explain] => 
                            [long_explain] => 
                        )

                )

        )

    [abilities] => Array
        (
        )

    [buffs] => Array
        (
            [0] => Array
                (
                    [id] => @@0@@
                    [derivedFrom] => Binf
                    [oeValues] => Array
                        (
                            [Targetattach] => Array
                                (
                                )

                            [Buffubertip] => Increased spell damage and attacks do additional spell damage.
                            [TargetArt] => Array
                                (
                                )

                            [Bufftip] => Flametongue Aura
                            [Buffart] => ReplaceableTextures\CommandButtons\BTNSerpentWard.blp
                        )

                )

        )

    [units] => Array
        (
        )

    [references] => Array
        (
            [0] => Array
                (
                    [export] => false
                    [category] => global
                    [typ] => MultiboardValues
                    [name] => ashbringer_totem_affinity
                )

        )

    [lightning] => Array
        (
        )

)