- Joined
- Nov 3, 2004
- Messages
- 79
JASS:
function Trig_Nova_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A000' ) ) then
return false
endif
return true
endfunction
function Trig_Nova_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local real MaxRange = 900.00
local real StartRange = 0.00
local real RangeJumps = 50.00
local effect NovaEffect
local string EffectPreBase
local real Arrounder
local location NovaPoint
set NovaPoint = (GetUnitLoc(caster))
set EffectPreBase = "Abilities\\Spells\\Other\\ImmolationRed\\ImmolationRedDamage.mdl"
loop
exitwhen StartRange == MaxRange
call TriggerSleepAction(0.01)
loop
exitwhen Arrounder == 360.00
call TriggerSleepAction(0.01)
set Arrounder = Arrounder + 12.00
call DestroyEffect(NovaEffect)
call AddSpecialEffectLocBJ( PolarProjectionBJ(NovaPoint, StartRange, Arrounder), EffectPreBase )
set NovaEffect = GetLastCreatedEffectBJ()
endloop
set StartRange = StartRange + RangeJumps
endloop
call RemoveLocation(NovaPoint)
set Arrounder = 0.00
set caster = null
endfunction
//===========================================================================
function InitTrig_Nova takes nothing returns nothing
set gg_trg_Nova = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Nova, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Nova, Condition( function Trig_Nova_Conditions ) )
call TriggerAddAction( gg_trg_Nova, function Trig_Nova_Actions )
endfunction