GhosTHunteR
New Member
- Reaction score
- 2
First of all I have to give credits to emjlr3 for his Random Dota Spells 2, which he had uploaded in the hive workshop.
Let me get straight to my point. I decided to use Berseker's Call and modify it. The thing is that I suck at JASS, not just suck, but a complete failure. I hope you can help me out with it.
That's the trigger and I want it working for the ability Mountain Taunt (that is cast by my hero) and Mountain Taunt Dummy that gives the buff. And ofcourse the buffs that are given on the enemies - Mountain Taunt (Attacker) and Mountain Taunt (Defender). The variables are the same Ber_Caster and Ber_Group.
I'll appreciate the help given and + rep!
P.S. There's another trigger in the berseker's call pack, but it was GUI and I worked it out.
Let me get straight to my point. I decided to use Berseker's Call and modify it. The thing is that I suck at JASS, not just suck, but a complete failure. I hope you can help me out with it.
JASS:
function Trig_Berserkers_Call_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 039;A003039;
endfunction
function Berserkers_Group takes nothing returns boolean
return GetBooleanAnd( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true, IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Berserkers_Call_Actions takes nothing returns nothing
local unit v
local location l = GetUnitLoc(GetTriggerUnit())
set udg_Ber_Caster = GetTriggerUnit()
call TriggerSleepAction( 0.20 )
set v = CreateUnit( GetOwningPlayer(udg_Ber_Caster), 039;n002039;, GetUnitX(udg_Ber_Caster), GetUnitY(udg_Ber_Caster), bj_UNIT_FACING )
call SetUnitAbilityLevelSwapped( 039;A004039;, v, GetUnitAbilityLevelSwapped(039;A003039;, udg_Ber_Caster) )
call IssueTargetOrder( v, "innerfire", udg_Ber_Caster )
call UnitApplyTimedLife( v, 039;BTLF039;, 1.00 )
call TriggerSleepAction( ( 1.00 + ( 0.50 * I2R(GetUnitAbilityLevelSwapped(039;A003039;, udg_Ber_Caster)) ) ) )
call RemoveLocation(l)
set udg_Ber_Caster = null
set l = null
set v = null
endfunction
//===========================================================================
function InitTrig_Berserkers_Call takes nothing returns nothing
set gg_trg_Berserkers_Call = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Berserkers_Call, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Berserkers_Call, Condition( function Trig_Berserkers_Call_Conditions ) )
call TriggerAddAction( gg_trg_Berserkers_Call, function Trig_Berserkers_Call_Actions )
endfunction
That's the trigger and I want it working for the ability Mountain Taunt (that is cast by my hero) and Mountain Taunt Dummy that gives the buff. And ofcourse the buffs that are given on the enemies - Mountain Taunt (Attacker) and Mountain Taunt (Defender). The variables are the same Ber_Caster and Ber_Group.
I'll appreciate the help given and + rep!
P.S. There's another trigger in the berseker's call pack, but it was GUI and I worked it out.