Forest Protectress v1
2900
|
ID: 386
Family ID:
Author: cedi
Rarity: unique
Element: nature
Attack Type: Physical
Attack Range: 900
Attack CD: 2.2
Damage: 2896-2896
Abil. Factor: 0.35
Status: Approved
|
Specials:
+6% damage/lvl
Protectress's Wrath
Each attack has a [seconds since last attack x 5]% chance to deal an extra 50% attack damage to all units in 250 range around the target. The maximum chance is 75%. Slows all damaged units by 50% for 1.5 seconds. Increased attackspeed decreases time needed to gain a charge. Level Bonus: +2% damage +0.04 seconds
Meld with the Forest
The Protectress gains 18% additional attack damage for each second she doesn't attack. There is a maximum of 12 seconds. On attack the bonus disappears. Increased attackspeed decreases the time needed to gain a charge. Level Bonus: +1% damage per second
Strike the Unprepared
Increases the attack critical chance of towers in 175 range by 0.25% for each 1% hp the attacked creep has left. Level Bonus: +0.01% attack crit chance |
Download
Toggle Triggers Header globals
BuffType BT
BuffType AURA
endglobals
function startAura takes Buff B returns nothing
set B.userReal = 0.0
endfunction
function attack takes Buff B returns nothing
local Tower T = B.getBuffedUnit()
local Unit U = Event.getTarget()
local real r = GetUnitState( U.getUnit(), UNIT_STATE_LIFE ) / GetUnitState( U.getUnit(), UNIT_STATE_MAX_LIFE )
set r = r * ( 0.25 + B.getCaster().getLevel() * 0.01 )
call T.modifyProperty( MOD_ATK_CRIT_CHANCE, -B.userReal )
call T.modifyProperty( MOD_ATK_CRIT_CHANCE, r )
set B.userReal = r
endfunction
function end takes Buff B returns nothing
call B.getBuffedUnit().modifyProperty( MOD_ATK_CRIT_CHANCE, -B.userReal )
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 m = Modifier.create()
set BT = BuffType.create( 1.5, 0.04, true )
call m.addModification( MOD_MOVESPEED, -0.50, 0.00 )
call BT.setBuffIcon( '@@0@@' )
call BT.setBuffModifier( m )
set AURA = BuffType.createAuraEffectType( true )
call AURA.setBuffIcon( '@@1@@' )
call AURA.addEventOnCreate( startAura )
call AURA.addEventOnAttack( attack, 1.0, 0.0 )
call AURA.addEventOnCleanup( end )
endfunction
On Damage
ONDAMAGE_chance: 1.0
ONDAMAGE_chanceLevelAdd: 0.0
function onDamage takes Tower tower returns nothing
local Iterate I
local Unit U
if ( tower.calcChance( 0.05 * tower.userInt ) ) then
set I = Iterate.overUnitsInRangeOfUnit( tower, TARGET_TYPE_CREEPS, Event.getTarget(), 250.00 )
call SFXAtUnit( "Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl", Event.getTarget().getUnit() )
call tower.doAttackDamageAoEUnit( Event.getTarget(), 250.00, tower.getCurrentAttackDamageWithBonus() * ( 0.5 + 0.02 * tower.getLevel() ), tower.calcAttackMulticrit(0,0,0), 0.00 )
loop
set U = I.next()
exitwhen U == 0
call BT.apply( tower, Event.getTarget(), tower.getLevel() )
endloop
endif
call SetUnitVertexColor( tower.getUnit(), 255, 255, 255, 255 )
call tower.modifyProperty( MOD_DAMAGE_ADD_PERC, -tower.userReal2 )
set tower.userReal2 = 0.00
set tower.userInt = 0
endfunction
On Tower Creation function onCreate takes Tower tower returns nothing
set tower.userInt = 0
set tower.userReal2 = 0.00
endfunction
Periodic
PERIODIC_period: 1.00
function periodic takes Tower tower returns nothing
local integer i = tower.getLevel()
local PeriodicEvent P = Event.getCurrentPeriodicEvent()
local real r = tower.getCurrentAttackspeed() / 2.2
if tower.userInt < 12 then
set tower.userInt = tower.userInt + 1
call SetUnitVertexColor( tower.getUnit(), 255, 255, 255, 255 - 15 * tower.userInt )
call tower.modifyProperty( MOD_DAMAGE_ADD_PERC, 0.18 + i * 0.01 )
set tower.userReal2 = tower.userReal2 + 0.18 + i * 0.01
endif
call P.enableAdvanced( r, false )
endfunction
Tower Aura
AURA_powerAdd: 1
AURA_auraEffect: AURA
AURA_levelAdd: 1
AURA_power: 0
AURA_targetType: TARGET_TYPE_TOWERS
AURA_targetSelf: true
AURA_level: 0
AURA_auraRange: 175
|
Description:
Latest Upload Comment: