Soul Collectors Cloak v6
1000
lvl: 28
ID:
184
Author:
cedi
Rarity:
unique
Status:
Approved

Description:

This cloak has the special ability to absorb the souls of units that are killed by the user of the cloak.
Soul Power
Each time the user of this cloak kills a unit, its dps is increased by 10. There is a maximum of 4000 bonus dps. The extra damage is bound to the item.
Download

Toggle Triggers

Header

goldcost: 0
            globals
        MultiboardValues cedi_dpsCloakMB
    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
        set cedi_dpsCloakMB = MultiboardValues.create(1)
        call cedi_dpsCloakMB.setKey(0,"DPS Gained")
    endfunction
        

On Item Creation

goldcost: 0
function onCreate takes Item itm returns nothing
            
set itm.userInt = 0
        
endfunction

On Item Drop

goldcost: 0
function onDrop takes Item itm returns nothing
            
call itm.getCarrier().modifyProperty(MOD_DPS_ADD, -itm.userInt)
        
endfunction

On Item Pickup

goldcost: 0
function onPickup  takes Item itm returns nothing
            
call itm.getCarrier().modifyProperty(MOD_DPS_ADD, itm.userInt)
        
endfunction

On Kill

goldcost: 1000
function onKill takes Item itm returns nothing
            
if itm.userInt < 4000 then
        call itm.getCarrier().modifyProperty(MOD_DPS_ADD, 10)
        set itm.userInt = itm.userInt + 10
    endif
        
endfunction

On Tower Details

goldcost: 0
function onTowerDetails takes Item itm returns MultiboardValues
            
call cedi_dpsCloakMB.setValue(0, I2S(itm.userInt))
    return cedi_dpsCloakMB
        
endfunction
Magnetic Field v1
1000
lvl: 40
ID:
197
Author:
DaveMatthews
Rarity:
rare
Status:
Approved

Description:

Increases buff duration and reduces debuff duration of nearby towers.
Magnetic Field - Aura
Grants +10% buff duration and -15% debuff duration to all towers within 200 range.
Download

Toggle Triggers

Header

goldcost: 500
    globals
    BuffType dave_magnetic
    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()
    set dave_magnetic = BuffType.createAuraEffectType(true)
    call m.addModification(MOD_DEBUFF_DURATION,-0.15,0)
    call m.addModification(MOD_BUFF_DURATION,0.1,0)
    call dave_magnetic.setBuffModifier(m)
    call dave_magnetic.setBuffIcon('@@0@@')
    endfunction

Tower Aura

AURA_levelAdd: 0 AURA_targetType: TARGET_TYPE_TOWERS AURA_auraRange: 200 AURA_powerAdd: 0 AURA_targetSelf: true goldcost: 500 AURA_auraEffect: dave_magnetic AURA_power: 1 AURA_level: 1
Even More Magical Hammer v1
1000
lvl: 28
ID:
201
Author:
cedi
Rarity:
unique
Status:
Approved

Description:

The professional version.
Even More Magical Weapon
Every 5th instance of spell damage is a critical hit.
Download

Toggle Triggers

Header

goldcost: 1000
    globals
        BuffType Hammer_Mark
        BuffType Hammer_Aura
    endglobals
    
    function Mark_Setup takes Buff B returns nothing
        set B.userInt = 5
        set B.userInt2 = 5
        set B.userInt3 = 5
        
        set B.userReal = 50
        set B.userReal2 = 50
        set B.userReal3 = 50
    endfunction
    
    function Hammer_Aura_Trig takes Buff B returns nothing
        local Tower T = Event.getTarget()
        local integer lvl
        if Event.isSpellDamage() then
            //Has attacker the mark buff?
            set B = T.getBuffOfType( Hammer_Mark )
            if B != 0 then
                set lvl = B.getLevel()
            
                //Attacking tower carries a hammer
                //Hammer 1
                set B.userInt = B.userInt - 1
                if B.userInt <= 0 then
                    set B.userInt = 5
                    call T.addSpellCrit()
                endif
                
                //Hammer 2
                if lvl >= 2 then
                    set B.userInt2 = B.userInt2 - 1
                    if B.userInt2 <= 0 then
                        set B.userInt2 = 5
                        call T.addSpellCrit()
                    endif
                else
                    //Only 1 hammer
                    return
                endif
                
                //Hammer 3
                if lvl >= 3 then
                    set B.userInt3 = B.userInt3 - 1
                    if B.userInt3 <= 0 then
                        set B.userInt3 = 5
                        call T.addSpellCrit()
                    endif
                else
                    //Only 2 hammer
                    return
                endif
                
                //Hammer 4
                if lvl >= 4 then
                    set B.userReal = B.userReal - 10
                    if B.userReal < 5 then //Because real are realy not accurate at all.
                        set B.userReal = 50
                        call T.addSpellCrit()
                    endif
                else
                    //Only 3 hammer
                    return
                endif
                
                //Hammer 5
                if lvl >= 5 then
                    set B.userReal2 = B.userReal2 - 10
                    if B.userReal2 < 5 then //Because real are realy not accurate at all.
                        set B.userReal2 = 50
                        call T.addSpellCrit()
                    endif
                else
                    //Only 4 hammer
                    return
                endif
                
                //Hammer 6
                if lvl >= 6 then
                    set B.userReal3 = B.userReal3 - 10
                    if B.userReal3 < 5 then //Because real are realy not accurate at all.
                        set B.userReal3 = 50
                        call T.addSpellCrit()
                    endif
                endif
            endif
        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 Hammer_Mark = BuffType.create( -1, 0, true )
        call Hammer_Mark.setBuffIcon( '@@0@@' )
        call Hammer_Mark.addEventOnCreate( Mark_Setup )
        
        set Hammer_Aura = BuffType.create( -1, 0, false )
        call Hammer_Aura.setBuffIcon( '@@1@@' )
        call Hammer_Aura.addEventOnDamaged( Hammer_Aura_Trig, 1.0, 0.0 )
    endfunction

On Item Drop

goldcost: 0
function onDrop takes Item itm returns nothing
    local Tower T = itm.getCarrier()
    local Buff B = T.getBuffOfType( Hammer_Mark )
    
    if B != 0 then
        //First hammer on tower
        if B.getLevel() == 1 then
            call B.removeBuff() //Only one hammer was on the tower.
        else
            call B.setLevel( B.getLevel() - 1 )
        endif
    else
        //No buff, although there is still a hammer on the tower! Shit happened!
    endif
endfunction

On Item Pickup

goldcost: 0
function onPickup  takes Item itm returns nothing
    local Tower T = itm.getCarrier()
    local Buff B = T.getBuffOfType( Hammer_Mark )
    
    if B == 0 then
        //First hammer on tower
        call Hammer_Mark.apply( T, T, 1 )
    else
        //Already a hammer on the tower
        call B.setLevel( B.getLevel() + 1 )
    endif
endfunction

On Unit Comes In Range

goldcost: 0 UNITINRANGE_targetType: TARGET_TYPE_CREEPS UNITINRANGE_range: 2000
function onUnitInRange takes Item itm returns nothing
    local Unit U = Event.getTarget()
    if U.getBuffOfType( Hammer_Aura ) == 0 then
        call Hammer_Aura.apply( itm.getCarrier(), U, 0 )
    endif
endfunction
Bloody Key v1
1000
lvl: 40
ID:
228
Author:
Finger of Destiny
Rarity:
rare
Status:
Approved

Description:

It echoes grand wars of the past.
Specials:
-70% exp gain
-70% bounty collected
Bestial Rage - Aura
Grants 12% bonus damage against orc and humanoid creeps and also increases dps by 100 for all towers in 200 AoE.

Level Bonus:
+0.24% to orcs and humanoids
+6 dps
Download

Toggle Triggers

Header

goldcost: 0
    globals
    
    BuffType human_aura
    
    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()  
    set human_aura = BuffType.createAuraEffectType(true)  
    call m.addModification(MOD_DMG_TO_HUMANOID,0.12,0.0024)
    call m.addModification(MOD_DMG_TO_ORC,0.12,0.0024)
    call m.addModification(MOD_DPS_ADD,100,6)
    call human_aura.setBuffModifier(m)  
    call human_aura.setStackingGroup("human_aura")  
    call human_aura.setBuffIcon('@@0@@') 
    endfunction

Tower Aura

AURA_powerAdd: 1 AURA_targetSelf: true AURA_auraEffect: human_aura goldcost: 1000 AURA_levelAdd: 1 AURA_power: 0 AURA_level: 0 AURA_targetType: TARGET_TYPE_TOWERS AURA_auraRange: 200
Old Hunter v1
1000
lvl: 40
ID:
242
Author:
Guennter
Rarity:
rare
Status:
Approved

Description:

"I will teach you, what hunting is like!"
Old Hunter
After each kill, the carrier transfers 1 flat experience to up to 5 random towers in 500 range. The carrier must be at least level 5 to trigger this ability.
Download

Toggle Triggers

On Kill

goldcost: 1000
function onKill takes Item itm returns nothing
    local Tower tower = itm.getCarrier() 
    local Tower next
    local Iterate in_range
    local integer count
    
    // test if tower is minimum lvl 5
    if tower.getLevel() >= 5 then
        // test, if there are towers in range
        set in_range = Iterate.overUnitsInRangeOfCaster(tower, TARGET_TOWERS, 500)
        set count = IMinBJ(5, in_range.count())
        if count > 0 then 
            call tower.removeExpFlat(count)
            loop
                set next = in_range.nextRandom()
                exitwhen next == 0
                call next.addExpFlat(1)
                call SFXAtUnit("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl", next.getUnit())
                set count = count - 1
                exitwhen count == 0
            endloop
            if next != 0 then
                call in_range.destroy()
            endif
        else
            call in_range.destroy()
        endif
    endif   
endfunction
Soul Collector's Scythe v1
1000
lvl: 28
ID:
252
Author:
hokkei
Rarity:
unique
Status:
Approved

Description:

This scythe absorbs the souls of units slain by its wielder.
Soul Power
After each kill, the scythe's critical strike damage is increased by x0.005. Maximum of x3 bonus crit. The bonus is bound to the item.
Download

Toggle Triggers

Header

goldcost: 0
    globals
        MultiboardValues hokkei_critbonusMB
    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
        set hokkei_critbonusMB = MultiboardValues.create(1)
        call hokkei_critbonusMB.setKey(0,"Crit Bonus")
    endfunction

On Item Creation

goldcost: 0
function onCreate takes Item itm returns nothing
    set itm.userReal = 0
endfunction

On Item Drop

goldcost: 0
function onDrop takes Item itm returns nothing
    call itm.getCarrier().modifyProperty(MOD_ATK_CRIT_DAMAGE, -itm.userReal)
endfunction

On Item Pickup

goldcost: 0
function onPickup  takes Item itm returns nothing
    call itm.getCarrier().modifyProperty(MOD_ATK_CRIT_DAMAGE, itm.userReal)
endfunction

On Kill

goldcost: 1000
function onKill takes Item itm returns nothing
    if itm.userReal < 3 then
        call itm.getCarrier().modifyProperty(MOD_ATK_CRIT_DAMAGE, 0.005)
        set itm.userReal = itm.userReal + 0.005
    endif
endfunction

On Tower Details

goldcost: 0
function onTowerDetails takes Item itm returns MultiboardValues
    call hokkei_critbonusMB.setValue(0, "x" + R2S(itm.userReal))
    return hokkei_critbonusMB
endfunction
Granite Hammer v1
1000
lvl: 40
ID:
262
Author:
Boekie
Rarity:
rare
Status:
Approved

Description:

This hammer is heavy, but when it hits it's devastating.
Heavy Weapon
Every 5th attack is a critical hit.
Download

Toggle Triggers

On Attack

goldcost: 1000 ONATTACK_chance: 1.0 ONATTACK_chanceLevelAdd: 0.0
function onAttack takes Item itm returns nothing
local Tower tower = itm.getCarrier() 
set itm.userInt = itm.userInt +1
if itm.userInt == 5 then
call tower.addAttackCrit() 
set itm.userInt = 0
endif
endfunction

On Item Pickup

goldcost: 0
function onPickup  takes Item itm returns nothing
set itm.userInt = 1 
endfunction