Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser.
Triggers
Change+Sweep.w3x
Variables
core
Change
Name
Type
is_array
initial_value
//TESH.scrollpos=0
//TESH.alwaysfold=0
//Change by EvilNico aka Mellon http://vk.com/mellstorm, http://xdep.ru, http://rusdota.ru
//===========================================================================
function Change_Condition takes nothing returns boolean
return ( GetRandomInt(1, 100) <= 35 ) and GetUnitAbilityLevel(GetAttacker(), 'AOcr') > 0 and IsUnitType(GetTriggerUnit(), UNIT_TYPE_STRUCTURE) != true
endfunction
function Change_Actions takes nothing returns nothing
local texttag g
local real r
local trigger t = CreateTrigger()
local unit w = GetAttacker()
local unit u = GetTriggerUnit()
local effect e = AddSpecialEffectTarget("war3mapImported\\Sweep.mdx",w,"weapon")
call SetUnitAnimation(w, "slam")
call PlaySoundOnUnitBJ(gg_snd_HeroBladeMasterYesAttack3, 70, w)
set r = I2R(50 * R2I(GetUnitAbilityLevelSwapped('AOcr', w)))
set g = CreateTextTagUnitBJ ("+" + I2S(R2I(r))+"Attack!",w,0, 9.00, 2.00, 80.00, 100.00, 0)
call SetTextTagVelocityBJ(g,50,90)
call UnitDamageTargetBJ(w,u,r,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL)
call TriggerSleepAction(1)
call DestroyEffect(e)
call DestroyTrigger(t)
call TriggerSleepAction(0.5)
call DestroyTextTag(g)
set w = null
set u = null
set e = null
endfunction
//===========================================================================
function InitTrig_Change takes nothing returns nothing
set gg_trg_Change = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Change, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Change, Condition( function Change_Condition ) )
call TriggerAddAction( gg_trg_Change, function Change_Actions )
endfunction
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.