Thief Apprentice v1
65
ID:
108
Family ID:
Author:
i_mOck_death
Rarity:
uncommon
Element:
darkness
Attack Type:
Physical
Attack Range:
800
Attack CD:
1.5
Damage:
103-103
Abil. Factor:
.925
Status:
Approved

Description:

Trained in the shadows, the thief is an expert in finding gold.

Latest Upload Comment:

Restored from 1.10
Specials:
-10% dmg to undead (+0.4%/lvl)
+0.5% bounty collected/lvl
+5% item chance (+0.2%/lvl)
+5% item quality (+0.2%/lvl)
Steal
Every time the thief damages a creep there is a 10% chance he steals 0.3 gold.

Level Bonus:
+0.012 gold
+0.4% chance
Download

Toggle Triggers

Header

    globals
        //@export
        ProjectileType mOck_steal
        //@export
        MultiboardValues mOck_thief_multiboard
    endglobals
    function steal takes Projectile p,Unit creep returns nothing
          local Tower tower= p.getCaster()
          local real goldGranted = (tower.userInt+(tower.getLevel()*tower.userInt*.04))/10
          call tower.getOwner().giveGold(goldGranted,tower.getUnit(),false,true)
          set tower.userReal = tower.userReal + goldGranted
    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 mOck_steal = ProjectileType.createInterpolate("Abilities\\Weapons\\WardenMissile\\WardenMissile.mdl",1000)
          call mOck_steal.setEventOnInterpolationFinished(ProjectileTargetEvent.steal)
          
          set mOck_thief_multiboard = MultiboardValues.create(1)
          call mOck_thief_multiboard.setKey(0,"Gold Stolen")
    endfunction

On Damage

ONDAMAGE_chance: .1 ONDAMAGE_chanceLevelAdd: 0.004
function onDamage takes Tower tower returns nothing
    call Projectile.createLinearInterpolationFromUnitToUnit(mOck_steal,tower,0,0,Event.getTarget(),tower,0,true)
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    set tower.userReal = 0.0 
    set tower.userInt = 3
    call AddUnitAnimationProperties(tower.getUnit(), "stand alternate", false)
endfunction

On Tower Details

function onTowerDetails takes Tower tower returns MultiboardValues
    call mOck_thief_multiboard.setValue(0,I2S(R2I(tower.userReal)))
    return mOck_thief_multiboard
endfunction