- Joined
- Feb 11, 2011
- Messages
- 1,860
Hello guys,
I would like to know how to make this spell MUI.
This is based off the Frost Nova spell. Only the targeted unit is damaged directly by the nova. After 0.5 seconds, all enemies within 200 range of the target are targeted by a frost bolt.
Thanks for any help.
I would like to know how to make this spell MUI.
JASS:
scope FrostNova initializer InitTrigger
globals
private unit TriggerUnit = null
private unit TargetUnit = null
private unit FilterUnit = null
private group g = CreateGroup()
endglobals
private function Group_Conditions takes nothing returns boolean
set FilterUnit = GetFilterUnit()
if (IsUnit(FilterUnit, TargetUnit) == false) and (IsPlayerEnemy(GetOwningPlayer(TriggerUnit), GetOwningPlayer(FilterUnit)) == true) and (IsUnitType(FilterUnit, UNIT_TYPE_DEAD) == false) then
set bj_lastCreatedUnit = CreateUnit(GetOwningPlayer(TriggerUnit), 'h003', GetUnitX(TargetUnit), GetUnitY(TargetUnit), bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit, 'A02T')
call RemoveGuardPosition(bj_lastCreatedUnit)
call SetUnitAbilityLevel(bj_lastCreatedUnit, 'A02T', GetUnitAbilityLevel(TriggerUnit, 'A02G'))
call IssueTargetOrder(bj_lastCreatedUnit, "thunderbolt", FilterUnit)
call UnitApplyTimedLife(bj_lastCreatedUnit, 'BTLF', 2)
call GroupRemoveUnit(g, FilterUnit)
endif
return false
endfunction
private function Timer_Actions takes nothing returns nothing
call GroupEnumUnitsInRange(g, GetUnitX(TargetUnit), GetUnitY(TargetUnit), 200, Condition(function Group_Conditions))
endfunction
private function Actions takes nothing returns nothing
local timer t = CreateTimer()
call TimerStart(t, 0.5, false, function Timer_Actions)
set t = null
endfunction
private function Conditions takes nothing returns boolean
if (GetSpellAbilityId() == 'A02G') then
set TriggerUnit = GetTriggerUnit()
set TargetUnit = GetSpellTargetUnit()
call Actions()
endif
return false
endfunction
private function InitTrigger takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t, Condition(function Conditions))
set t = null
endfunction
endscope
Frost NovaBlasts a target with ice, damaging it. After 0.5 seconds, the ice explodes, sending shards to all enemies within 200 range, stunning them for 3 seconds and dealing minor damage. Original target does not get hit by an ice shard.
Level 1: 75 target damage; 65 ice shard damage
Level 2: 125 target damage; 105 ice shard damage
Level 3: 175 target damage; 145 ice shard damage
Level 4: 225 target damage; 185 ice shard damage
Level 5: 275 target damage; 225 ice shard damage
Thanks for any help.