Teacher v1
70
ID:
427
Family ID:
Author:
Deikorim / Limfa
Rarity:
uncommon
Element:
astral
Attack Type:
Elemental
Attack Range:
900
Attack CD:
1.5
Damage:
86-90
Status:
Approved

Description:

Teacher teaches you to attack!
Specials:
+20% exp gain
Knowledge
When the teacher attacks there's a 10% chance a random tower in 600 range will learn from her, gaining 1 experience. 

Level Bonus:
+0.6% chance
Download

Toggle Triggers

Header

    globals
        //@export
        ProjectileType knowledge_green
        //@export
        ProjectileType knowledge_blue
        //@export
        ProjectileType knowledge_red
        //@export
        MultiboardValues limfa_teacherboard
    endglobals
    
    function hit takes Projectile p, Unit result returns nothing
        local Tower t = p.getCaster()
        if result.getUID() == p.userInt then
            call result.addExp(p.userReal)
            if Tower(p.userInt2).getUID() == t.getUID() then
                set t.userReal2 = t.userReal2 + p.userReal * result.getProp_ExpReceived()
            endif
        endif
    endfunction 
    
    //@export
    function teacher_attack takes Tower tower, real xp returns nothing
        local Iterate inRange
        local Unit result
        local ProjectileType pt
        local Projectile p
        local integer i
        
        
        if tower.calcChance(0.10+0.006*tower.getLevel()) then
            set inRange = Iterate.overUnitsInRangeOfCaster(tower,TARGET_TOWERS,600)
            set result = inRange.nextRandom()
            if result == tower then
                set result = inRange.nextRandom()
            endif
            
            if result != 0 then
                set i = GetRandomInt(1,3)
                if i == 1 then
                    set pt = knowledge_green
                elseif i == 2 then
                    set pt = knowledge_red
                elseif i == 3 then
                    set pt = knowledge_blue
                endif
                set p = Projectile.createFromUnitToUnit(pt, tower, 1.0, 1.0, tower, result, true, false, true)
                call p.setScale(0.7)
                set p.userReal = xp
                set p.userInt = result.getUID()
                set p.userInt2 = tower.getUID()
                call inRange.destroy()
            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 limfa_teacherboard = MultiboardValues.create(1)
        call limfa_teacherboard.setKey(0,"Xp Granted")
        set knowledge_green = ProjectileType.create( "Objects\\InventoryItems\\tomeGreen\\tomeGreen.mdl", 20.0, 450.00 ) 
        call knowledge_green.enableFreeRotation()
        call knowledge_green.disableExplodeOnHit()
        call knowledge_green.enableHoming( ProjectileTargetEvent.hit, 0 )
        set knowledge_blue = ProjectileType.create( "Objects\\InventoryItems\\tomeBlue\\tomeBlue.mdl", 20.0, 450.00 ) 
        call knowledge_blue.enableFreeRotation()
        call knowledge_blue.disableExplodeOnHit()
        call knowledge_blue.enableHoming( ProjectileTargetEvent.hit, 0 )
        set knowledge_red = ProjectileType.create( "Objects\\InventoryItems\\tomeRed\\tomeRed.mdl", 20.0, 450.00 ) 
        call knowledge_red.enableFreeRotation()
        call knowledge_red.disableExplodeOnHit()
        call knowledge_red.enableHoming( ProjectileTargetEvent.hit, 0 )

    endfunction

On Attack

ONATTACK_chance: 1.0 ONATTACK_chanceLevelAdd: 0.0
function onAttack takes Tower tower returns nothing
    call teacher_attack(tower,1)
    call SetUnitAnimationByIndex(tower.getUnit(), 3)
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    local Tower preceding = Event.getPrecedingTower()
    if (preceding.getFamily() == tower.getFamily()) then
        set tower.userReal2 = preceding.userReal2
    else
        set tower.userReal2 = 0
    endif
endfunction

On Tower Details

goldcost: 0
function onTowerDetails takes Tower tower returns MultiboardValues
    call limfa_teacherboard.setValue(0, formatFloat(tower.userReal2,1))
    return limfa_teacherboard
endfunction
Clever Teacher v1
180
ID:
428
Family ID:
Author:
Deikorim / Limfa
Rarity:
uncommon
Element:
astral
Attack Type:
Elemental
Attack Range:
900
Attack CD:
1.5
Damage:
225-229
Status:
Approved

Description:

Teacher teaches you to attack!
Specials:
+35% exp gain
Knowledge
When the teacher attacks there's a 10% chance a random tower in 600 range will learn from her, gaining 1.3 experience. 

Level Bonus:
+0.6% chance
Download

Toggle Triggers

Header

    globals
        //@import
        ProjectileType knowledge_green
        //@import
        ProjectileType knowledge_blue
        //@import
        ProjectileType knowledge_red
        //@import
        MultiboardValues limfa_teacherboard
    endglobals
    //@import
    function teacher_attack takes Tower t, real xp returns nothing
    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
    endfunction

On Attack

ONATTACK_chance: 1.0 ONATTACK_chanceLevelAdd: 0.0
function onAttack takes Tower tower returns nothing
    call teacher_attack(tower,1.3)
    call SetUnitAnimationByIndex(tower.getUnit(), 3)
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    local Tower preceding = Event.getPrecedingTower()
    if (preceding.getFamily() == tower.getFamily()) then
        set tower.userReal2 = preceding.userReal2
    else
        set tower.userReal2 = 0
    endif
endfunction

On Tower Details

goldcost: 0
function onTowerDetails takes Tower tower returns MultiboardValues
        call limfa_teacherboard.setValue(0, formatFloat(tower.userReal2,1))
        return limfa_teacherboard
endfunction
Learned Teacher v1
350
ID:
429
Family ID:
Author:
Deikorim / Limfa
Rarity:
uncommon
Element:
astral
Attack Type:
Elemental
Attack Range:
900
Attack CD:
1.5
Damage:
439-443
Status:
Approved

Description:

Teacher teaches you to attack!
Specials:
+45% exp gain
Knowledge
When the teacher attacks there's a 10% chance a random tower in 600 range will learn from her, gaining 1.5 experience. 

Level Bonus:
+0.6% chance
Download

Toggle Triggers

Header

    globals
        //@import
        ProjectileType knowledge_green
        //@import
        ProjectileType knowledge_blue
        //@import
        ProjectileType knowledge_red
        //@import
        MultiboardValues limfa_teacherboard
    endglobals
    //@import
    function teacher_attack takes Tower t, real xp returns nothing
    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
    endfunction

On Attack

ONATTACK_chance: 1.0 ONATTACK_chanceLevelAdd: 0.0
function onAttack takes Tower tower returns nothing
    call teacher_attack(tower,1.5)
    call SetUnitAnimationByIndex(tower.getUnit(), 3)
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    local Tower preceding = Event.getPrecedingTower()
    if (preceding.getFamily() == tower.getFamily()) then
        set tower.userReal2 = preceding.userReal2
    else
        set tower.userReal2 = 0
    endif
endfunction

On Tower Details

goldcost: 0
function onTowerDetails takes Tower tower returns MultiboardValues
    call limfa_teacherboard.setValue(0, formatFloat(tower.userReal2,1))
    return limfa_teacherboard
endfunction
Studied Teacher v1
850
ID:
430
Family ID:
Author:
Deikorim / limfa
Rarity:
uncommon
Element:
astral
Attack Type:
Elemental
Attack Range:
900
Attack CD:
1.5
Damage:
1070-1074
Status:
Approved

Description:

Teacher teaches you to attack!
Specials:
+60% exp gain
Knowledge
When the teacher attacks there's a 10% chance a random tower in 600 range will learn from her, gaining 1.8 experience. 

Level Bonus:
+0.6% chance
Download

Toggle Triggers

Header

    globals
        //@import
        ProjectileType knowledge_green
        //@import
        ProjectileType knowledge_blue
        //@import
        ProjectileType knowledge_red
        //@import
        MultiboardValues limfa_teacherboard
    endglobals
    //@import
    function teacher_attack takes Tower t, real xp returns nothing
    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
    endfunction

On Attack

ONATTACK_chance: 1.0 ONATTACK_chanceLevelAdd: 0.0
function onAttack takes Tower tower returns nothing
    call teacher_attack(tower,1.8)
    call SetUnitAnimationByIndex(tower.getUnit(), 3)
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    local Tower preceding = Event.getPrecedingTower()
    if (preceding.getFamily() == tower.getFamily()) then
        set tower.userReal2 = preceding.userReal2
    else
        set tower.userReal2 = 0
    endif
endfunction

On Tower Details

goldcost: 0
function onTowerDetails takes Tower tower returns MultiboardValues
    call limfa_teacherboard.setValue(0, formatFloat(tower.userReal2,1))
    return limfa_teacherboard
endfunction
Doctorated Teacher v1
1600
ID:
431
Family ID:
Author:
Deikorim / limfa
Rarity:
uncommon
Element:
astral
Attack Type:
Elemental
Attack Range:
900
Attack CD:
1.5
Damage:
2016-2020
Status:
Approved

Description:

Teacher teaches you to attack!
Specials:
+70% exp gain
Knowledge
When the teacher attacks there's a 10% chance a random tower in 600 range will learn from her, gaining 2 experience. 

Level Bonus:
+0.6% chance
Download

Toggle Triggers

Header

    globals
        //@import
        ProjectileType knowledge_green
        //@import
        ProjectileType knowledge_blue
        //@import
        ProjectileType knowledge_red
        //@import
        MultiboardValues limfa_teacherboard
    endglobals
    //@import
    function teacher_attack takes Tower t, real xp returns nothing
    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
    endfunction

On Attack

ONATTACK_chance: 1.0 ONATTACK_chanceLevelAdd: 0.0
function onAttack takes Tower tower returns nothing
    call teacher_attack(tower,2)
    call SetUnitAnimationByIndex(tower.getUnit(), 3)
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    local Tower preceding = Event.getPrecedingTower()
    if (preceding.getFamily() == tower.getFamily()) then
        set tower.userReal2 = preceding.userReal2
    else
        set tower.userReal2 = 0
    endif
endfunction

On Tower Details

goldcost: 0
function onTowerDetails takes Tower tower returns MultiboardValues
    call limfa_teacherboard.setValue(0, formatFloat(tower.userReal2,1))
    return limfa_teacherboard
endfunction
All-Knowing Teacher v1
2500
ID:
432
Family ID:
Author:
Deikorim / limfa
Rarity:
uncommon
Element:
astral
Attack Type:
Elemental
Attack Range:
900
Attack CD:
1.5
Damage:
3151-3155
Status:
Approved

Description:

Teacher teaches you to attack!
Specials:
+80% exp gain
Knowledge
When the teacher attacks there's a 10% chance a random tower in 600 range will learn from her, gaining 2.2 experience. 

Level Bonus:
+0.6% chance
Download

Toggle Triggers

Header

    globals
        //@import
        ProjectileType knowledge_green
        //@import
        ProjectileType knowledge_blue
        //@import
        ProjectileType knowledge_red
        //@import
        MultiboardValues limfa_teacherboard
    endglobals
    //@import
    function teacher_attack takes Tower t, real xp returns nothing
    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
    endfunction

On Attack

ONATTACK_chance: 1.0 ONATTACK_chanceLevelAdd: 0.0
function onAttack takes Tower tower returns nothing
    call teacher_attack(tower,2.2)
    call SetUnitAnimationByIndex(tower.getUnit(), 3)
endfunction

On Tower Creation

function onCreate takes Tower tower returns nothing
    local Tower preceding = Event.getPrecedingTower()
    if (preceding.getFamily() == tower.getFamily()) then
        set tower.userReal2 = preceding.userReal2
    else
        set tower.userReal2 = 0
    endif
endfunction

On Tower Details

goldcost: 0
function onTowerDetails takes Tower tower returns MultiboardValues
    call limfa_teacherboard.setValue(0, formatFloat(tower.userReal2,1))
    return limfa_teacherboard
endfunction