Pendant of Mana Supremacy v1
1672
lvl: 49

ID:

216

Author:

cedi

Rarity:

unique

Status:

Approved

Description:

Even if this item isn't really valuable it is still very rare.

Latest Upload Comment:

Restored from 1.10
Magical Greed
When the carrier of this item casts a spell it has a 20% chance to replenish 15% of it's mana. This ability has 10 seconds cooldown.

Level Bonus:
+0.6% mana replenish
Specials:
Specials:
-38% attackspeed (+1%/lvl)
+100% mana regen (+1%/lvl)
Download

Toggle Triggers

On Item Creation

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

On Spell Cast

goldcost: 1500
function onSpellCast takes Item itm returns nothing
    local Tower T = itm.getCarrier()
    local unit t = T.getUnit()
    
    if not ( Event.getAutocastType().getManacost() > 0.45 ) then
        //No cheating
        return
    endif
    
    if itm.userInt / 25 + 10.0 <= Game.getGameTime() / 25 then
    
        if T.calcChance( 0.2 ) then
            call SetUnitState( t, UNIT_STATE_MANA, GetUnitState( t, UNIT_STATE_MANA ) + GetUnitState( t, UNIT_STATE_MAX_MANA ) * ( 0.15 + T.getLevel() * 0.006 ) )
            call DestroyEffect( AddSpecialEffect( "Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCasterOverhead.mdl", GetUnitX( t ), GetUnitY( t ) ) )
            set itm.userInt = Game.getGameTime()
        endif
    endif
    set t = null
endfunction