- Joined
- May 3, 2008
- Messages
- 3,154
JASS:
function Electric_Chain_Conditions takes nothing returns boolean
return (GetUnitAbilityLevel(GetAttacker(),'B612')>0) and (IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetAttacker()))==true)
endfunction
function Electric_Chain_Actions takes nothing returns nothing
local unit attacker=GetAttacker()
local unit attacked=GetTriggerUnit()
local unit lastcreated
local real x1=GetUnitX(attacker)
local real y1=GetUnitY(attacker)
local real facing=GetUnitFacing(attacker)
local effect sfx
local integer hid = GetHandleId(attacker)
if LoadInteger(udg_Hash, hid, 0)==9-GetUnitAbilityLevel(attacker,'A626') then
set sfx=AddSpecialEffectTarget("Abilities\\Spells\\Orc\\LightningShield\\LightningShieldTarget.mdl",attacker,("weapon" + "left"))
call SaveEffectHandle(udg_Hash,hid,0,sfx)
call SaveInteger(udg_Hash, hid, 0, LoadInteger(udg_Hash, hid, 0)+1)
else
if LoadInteger(udg_Hash, hid, 0)==10-GetUnitAbilityLevel(attacker,'A626') then
call SaveInteger(udg_Hash, hid, 0, 0)
set lastcreated=CreateUnit(GetOwningPlayer(attacker),'h60W',x1,y1,facing)
call UnitAddAbility(lastcreated,'A61X')
call SetUnitAbilityLevel(lastcreated,'A61X',GetUnitAbilityLevel(attacker,'A626'))
call IssueTargetOrder(lastcreated,"chainlightning",attacked)
call UnitApplyTimedLife(lastcreated,'BTLF',0.50)
set sfx=LoadEffectHandle(udg_Hash,hid,0)
call DestroyEffect(sfx)
else
call SaveInteger(udg_Hash, hid, 0, LoadInteger(udg_Hash, hid, 0)+1)
endif
endif
set attacker=null
set attacked=null
set lastcreated=null
set sfx=null
endfunction
//===========================================================================
constant function GSEC takes nothing returns boolean
return true
endfunction
function InitTrig_Electric_Chain takes nothing returns nothing
local trigger T=CreateTrigger()
local integer TI=0
local filterfunc FF=Filter(function GSEC)
loop
exitwhen (TI>=bj_MAX_PLAYER_SLOTS)
call TriggerRegisterPlayerUnitEvent(T,Player(TI),EVENT_PLAYER_UNIT_ATTACKED,FF)
set TI=TI+1
endloop
call DestroyBoolExpr(FF)
call DestroyFilter(FF)
set udg_Hash=InitHashtable()
call TriggerAddAction(T,function Electric_Chain_Actions)
call TriggerAddCondition(T,Condition(function Electric_Chain_Conditions))
set FF=null
set T=null
endfunction
-
Lightning Strike1
-
Events
-
Unit - A unit Begins casting an ability
-
-
Conditions
-
(Ability being cast) Equal to Lightning Strike (Prophet)
-
-
Actions
-
Set LS_TempPoint[1] = (Position of (Triggering unit))
-
Set LS_TempPoint[2] = (Target point of ability being cast)
-
Set LS_TempPoint[3] = (LS_TempPoint[2] offset by 400.00 towards (Angle from LS_TempPoint[2] to LS_TempPoint[1]) degrees)
-
Unit - Create 1 Dummy 2 (Lightning Strike) for (Owner of (Triggering unit)) at LS_TempPoint[2] facing Default building facing degrees
-
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
-
Unit - Make (Last created unit) Explode on death
-
Set LS_Dummy = (Last created unit)
-
For each (Integer LS_GeneralInteger) from 1 to 3, do (Actions)
-
Loop - Actions
-
Unit - Create 1 Dummy 1 (Lightning Strike) for (Owner of (Triggering unit)) at LS_TempPoint[3] facing Default building facing degrees
-
Unit - Order (Last created unit) to Special Archimonde - Finger Of Death LS_Dummy
-
Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
-
Unit - Make (Last created unit) Explode on death
-
-
-
Special Effect - Create a special effect at LS_TempPoint[2] using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
-
Special Effect - Destroy (Last created special effect)
-
Special Effect - Create a special effect at LS_TempPoint[2] using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
-
Special Effect - Destroy (Last created special effect)
-
Set LS_Groups[1] = (Units within 250.00 of LS_TempPoint[2] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of
-
Unit Group - Pick every unit in LS_Groups[1] and do (Actions)
-
Loop - Actions
-
Unit - Cause (Triggering unit) to damage (Picked unit), dealing (500.00 x (Real((Level of Lightning Strike (Prophet) for (Triggering unit))))) damage of attack type Spells and damage type Normal
-
-------- Knockback System --------
-
Set KBA_Caster = (Triggering unit)
-
Set KBA_TargetUnit = (Picked unit)
-
Set KBA_StartingPosition = (Target point of ability being cast)
-
Set KBA_Level = (Level of (Ability being cast) for (Triggering unit))
-
Set KBA_Speed = 9.00
-
Set KBA_DistancePerLevel = 300.00
-
Set KBA_SpecialEffects[1] = Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
-
Set KBA_SpecialEffects[2] = Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
-
Set KBA_DestroyTrees = True
-
Trigger - Run Cast A Knockback <gen> (checking conditions)
-
-------- End System --------
-
-
-
Custom script: call RemoveLocation (udg_LS_TempPoint[1])
-
Custom script: call RemoveLocation (udg_LS_TempPoint[2])
-
Custom script: call RemoveLocation (udg_LS_TempPoint[3])
-
Custom script: call DestroyGroup (udg_LS_Groups[1])
-
-
JASS:
function Trig_Lightning_Strike1_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A621' ) ) then
return false
endif
return true
endfunction
function Trig_Lightning_Strike1_Func013002003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Lightning_Strike1_Func013002003002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_MAGIC_IMMUNE) == false )
endfunction
function Trig_Lightning_Strike1_Func013002003002002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Lightning_Strike1_Func013002003002002002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Lightning_Strike1_Func013002003002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Lightning_Strike1_Func013002003002002001(), Trig_Lightning_Strike1_Func013002003002002002() )
endfunction
function Trig_Lightning_Strike1_Func013002003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Lightning_Strike1_Func013002003002001(), Trig_Lightning_Strike1_Func013002003002002() )
endfunction
function Trig_Lightning_Strike1_Func013002003 takes nothing returns boolean
return GetBooleanAnd( Trig_Lightning_Strike1_Func013002003001(), Trig_Lightning_Strike1_Func013002003002() )
endfunction
function Trig_Lightning_Strike1_Func014A takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), ( 500.00 * I2R(GetUnitAbilityLevelSwapped('A621', GetTriggerUnit())) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
// Knockback System
set udg_KBA_Caster = GetTriggerUnit()
set udg_KBA_TargetUnit = GetEnumUnit()
set udg_KBA_StartingPosition = GetSpellTargetLoc()
set udg_KBA_Level = GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetTriggerUnit())
set udg_KBA_Speed = 9.00
set udg_KBA_DistancePerLevel = 300.00
set udg_KBA_SpecialEffects[1] = "Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl"
set udg_KBA_SpecialEffects[2] = "Abilities\\Weapons\\FarseerMissile\\FarseerMissile.mdl"
set udg_KBA_DestroyTrees = true
call ConditionalTriggerExecute( gg_trg_Cast_A_Knockback )
// End System
endfunction
function Trig_Lightning_Strike1_Actions takes nothing returns nothing
set udg_LS_TempPoint[1] = GetUnitLoc(GetTriggerUnit())
set udg_LS_TempPoint[2] = GetSpellTargetLoc()
set udg_LS_TempPoint[3] = PolarProjectionBJ(udg_LS_TempPoint[2], 400.00, AngleBetweenPoints(udg_LS_TempPoint[2], udg_LS_TempPoint[1]))
call CreateNUnitsAtLoc( 1, 'e603', GetOwningPlayer(GetTriggerUnit()), udg_LS_TempPoint[2], bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 0.50, 'BTLF', GetLastCreatedUnit() )
call SetUnitExplodedBJ( GetLastCreatedUnit(), true )
set udg_LS_Dummy = GetLastCreatedUnit()
set udg_LS_GeneralInteger = 1
loop
exitwhen udg_LS_GeneralInteger > 3
call CreateNUnitsAtLoc( 1, 'e602', GetOwningPlayer(GetTriggerUnit()), udg_LS_TempPoint[3], bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "fingerofdeath", udg_LS_Dummy )
call UnitApplyTimedLifeBJ( 0.50, 'BTLF', GetLastCreatedUnit() )
call SetUnitExplodedBJ( GetLastCreatedUnit(), true )
set udg_LS_GeneralInteger = udg_LS_GeneralInteger + 1
endloop
call AddSpecialEffectLocBJ( udg_LS_TempPoint[2], "Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call AddSpecialEffectLocBJ( udg_LS_TempPoint[2], "Abilities\\Weapons\\FarseerMissile\\FarseerMissile.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
set udg_LS_Groups[1] = GetUnitsInRangeOfLocMatching(250.00, udg_LS_TempPoint[2], Condition(function Trig_Lightning_Strike1_Func013002003))
call ForGroupBJ( udg_LS_Groups[1], function Trig_Lightning_Strike1_Func014A )
call RemoveLocation (udg_LS_TempPoint[1])
call RemoveLocation (udg_LS_TempPoint[2])
call RemoveLocation (udg_LS_TempPoint[3])
call DestroyGroup (udg_LS_Groups[1])
endfunction
//===========================================================================
function InitTrig_Lightning_Strike1 takes nothing returns nothing
set gg_trg_Lightning_Strike1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Lightning_Strike1, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Lightning_Strike1, Condition( function Trig_Lightning_Strike1_Conditions ) )
call TriggerAddAction( gg_trg_Lightning_Strike1, function Trig_Lightning_Strike1_Actions )
endfunction
JASS:
function Lightning_Strike_JASS_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A621'
endfunction
function Lightning_Strike_Actions_Filter takes nothing returns boolean
return (IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false) and (IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false) and (GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE) <=0) and (IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))==true)
endfunction
function Lightning_Strike_JASS_Actions takes nothing returns nothing
local unit caster=GetTriggerUnit()
local unit dummy
local unit lastcreated
local integer LS
local real x1=GetUnitX(caster)
local real y1=GetUnitY(caster)
local real x2=GetSpellTargetX()
local real y2=GetSpellTargetY()
local real facing=GetUnitFacing(caster)
local effect sfx
local group g = CreateGroup()
set dummy=CreateUnit(GetOwningPlayer(caster),'e603',x2,y2,facing )
call UnitApplyTimedLife (dummy, 'BTLF', 0.50)
call SetUnitExploded( dummy, true )
set LS = 1
loop
exitwhen LS > 3
set lastcreated=CreateUnit(GetOwningPlayer(caster),'e602',x2,y2,facing )
call IssueTargetOrder( lastcreated, "fingerofdeath", dummy )
call UnitApplyTimedLife( lastcreated, 'BTLF', 0.50 )
call SetUnitExploded( lastcreated, true )
set LS = LS + 1
endloop
set sfx =AddSpecialEffect ("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl", x2,y2)
call DestroyEffect(sfx)
set sfx = AddSpecialEffect ("Abilities\\Weapons\\FarseerMissile\\FarseerMissile.mdl", x2,y2)
call DestroyEffect(sfx)
call GroupEnumUnitsInRange(g,x2,y2,250.00,Condition(function Lightning_Strike_Actions_Filter ))
set caster=null
set dummy=null
set lastcreated=null
set sfx=null
set g=null
endfunction
//===========================================================================
constant function GSLS takes nothing returns boolean
return true
endfunction
function InitTrig_Lightning_Strike takes nothing returns nothing
local trigger T=CreateTrigger()
local integer TI=0
local filterfunc FF=Filter(function GSLS)
loop
exitwhen (TI>=bj_MAX_PLAYER_SLOTS)
call TriggerRegisterPlayerUnitEvent(T,Player(TI),EVENT_PLAYER_UNIT_SPELL_EFFECT,FF)
set TI=TI+1
endloop
call DestroyBoolExpr(FF)
call DestroyFilter(FF)
call TriggerAddAction(T,function Lightning_Strike_JASS_Actions)
call TriggerAddCondition(T,Condition(function Lightning_Strike_JASS_Conditions))
set FF=null
set T=null
endfunction
-
Holy Exorcism 1
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Holy Exorcism (Holy Knight)
-
-
Actions
-
Set HE_castpt = (Position of (Triggering unit))
-
Set HE_real2 = (Facing of (Triggering unit))
-
Set HE_ang = (HE_real2 - 180.00)
-
For each (Integer Holy_Exorcism) from 1 to 3, do (Actions)
-
Loop - Actions
-
Set HE_tmppt1 = (HE_castpt offset by 150.00 towards (HE_ang + 90.00) degrees)
-
Set HE_tmppt2 = (HE_tmppt1 offset by 1000.00 towards HE_real2 degrees)
-
Unit - Create 1 Dummy (Holy Exorcism) for (Owner of (Triggering unit)) at HE_tmppt1 facing HE_real2 degrees
-
Special Effect - Create a special effect at HE_tmppt1 using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
-
Set HE_real = ((Distance between HE_tmppt1 and HE_tmppt2) / 1000.00)
-
Unit - Add a HE_real second Generic expiration timer to (Last created unit)
-
Set HE_ang = (HE_ang + 90.00)
-
Custom script: call RemoveLocation(udg_HE_tmppt1)
-
Custom script: call RemoveLocation(udg_HE_tmppt2)
-
-
-
Set HE_ang = 0.00
-
Trigger - Turn on Holy Exorcism 2 <gen>
-
-
-
Holy Exorcism 2
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
Set HE_dummygrp = (Units of type Dummy (Holy Exorcism))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Number of units in HE_dummygrp) Greater than 0
-
-
Then - Actions
-
Unit Group - Pick every unit in HE_dummygrp and do (Actions)
-
Loop - Actions
-
Set HE_real = (Facing of (Picked unit))
-
Set HE_tmppt1 = (Position of (Picked unit))
-
Set HE_tmppt2 = (HE_tmppt1 offset by 25.00 towards HE_real degrees)
-
Special Effect - Create a special effect at HE_tmppt2 using Abilities\Spells\Human\Slow\SlowCaster.mdl
-
Special Effect - Destroy (Last created special effect)
-
Unit - Move (Picked unit) instantly to HE_tmppt2
-
Custom script: call RemoveLocation(udg_HE_tmppt1)
-
Custom script: call RemoveLocation(udg_HE_tmppt2)
-
-
-
-
Else - Actions
-
Trigger - Turn off (This trigger)
-
-
-
Custom script: call DestroyGroup(udg_HE_dummygrp)
-
-
-
Holy Exorcism 3
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
(Unit-type of (Triggering unit)) Equal to Dummy (Holy Exorcism)
-
-
Actions
-
Set HE_tmppt1 = (Position of (Triggering unit))
-
Set HE_real = 50.00
-
Special Effect - Create a special effect at HE_tmppt1 using Abilities\Spells\Undead\ReplenishHealth\ReplenishHealthCasterOverhead.mdl
-
Special Effect - Destroy (Last created special effect)
-
Special Effect - Create a special effect at HE_tmppt1 using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units within 200.00 of HE_tmppt1 matching ((((Matching unit) belongs to an ally of (Owner of (Triggering unit))) Equal to True) or ((Owner of (Matching unit)) Equal to (Owner of (Triggering unit))))) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Unit-type of (Picked unit)) Not equal to (Unit-type of (Triggering unit))
-
-
Then - Actions
-
Set HE_tmppt2 = (Position of (Picked unit))
-
Special Effect - Create a special effect at HE_tmppt2 using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + 50.00)
-
Custom script: call RemoveLocation(udg_HE_tmppt2)
-
-
Else - Actions
-
-
-
-
Unit - Remove (Triggering unit) from the game
-
Custom script: call RemoveLocation(udg_HE_tmppt1)
-
-
JASS:
function Trig_Holy_Exorcism_1_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A63C' ) ) then
return false
endif
return true
endfunction
function Trig_Holy_Exorcism_1_Actions takes nothing returns nothing
set udg_HE_castpt = GetUnitLoc(GetTriggerUnit())
set udg_HE_real2 = GetUnitFacing(GetTriggerUnit())
set udg_HE_ang = ( udg_HE_real2 - 180.00 )
set udg_Holy_Exorcism = 1
loop
exitwhen udg_Holy_Exorcism > 3
set udg_HE_tmppt1 = PolarProjectionBJ(udg_HE_castpt, 150.00, ( udg_HE_ang + 90.00 ))
set udg_HE_tmppt2 = PolarProjectionBJ(udg_HE_tmppt1, 1000.00, udg_HE_real2)
call CreateNUnitsAtLoc( 1, 'n60Q', GetOwningPlayer(GetTriggerUnit()), udg_HE_tmppt1, udg_HE_real2 )
call AddSpecialEffectLocBJ( udg_HE_tmppt1, "Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl" )
set udg_HE_real = ( DistanceBetweenPoints(udg_HE_tmppt1, udg_HE_tmppt2) / 1000.00 )
call UnitApplyTimedLifeBJ( udg_HE_real, 'BTLF', GetLastCreatedUnit() )
set udg_HE_ang = ( udg_HE_ang + 90.00 )
call RemoveLocation(udg_HE_tmppt1)
call RemoveLocation(udg_HE_tmppt2)
set udg_Holy_Exorcism = udg_Holy_Exorcism + 1
endloop
set udg_HE_ang = 0.00
call EnableTrigger( gg_trg_Holy_Exorcism_2 )
endfunction
//===========================================================================
function InitTrig_Holy_Exorcism_1 takes nothing returns nothing
set gg_trg_Holy_Exorcism_1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Holy_Exorcism_1, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Holy_Exorcism_1, Condition( function Trig_Holy_Exorcism_1_Conditions ) )
call TriggerAddAction( gg_trg_Holy_Exorcism_1, function Trig_Holy_Exorcism_1_Actions )
endfunction
JASS:
function Trig_Holy_Exorcism_2_Func002Func002A takes nothing returns nothing
set udg_HE_real = GetUnitFacing(GetEnumUnit())
set udg_HE_tmppt1 = GetUnitLoc(GetEnumUnit())
set udg_HE_tmppt2 = PolarProjectionBJ(udg_HE_tmppt1, 25.00, udg_HE_real)
call AddSpecialEffectLocBJ( udg_HE_tmppt2, "Abilities\\Spells\\Human\\Slow\\SlowCaster.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call SetUnitPositionLoc( GetEnumUnit(), udg_HE_tmppt2 )
call RemoveLocation(udg_HE_tmppt1)
call RemoveLocation(udg_HE_tmppt2)
endfunction
function Trig_Holy_Exorcism_2_Func002C takes nothing returns boolean
if ( not ( CountUnitsInGroup(udg_HE_dummygrp) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Holy_Exorcism_2_Actions takes nothing returns nothing
set udg_HE_dummygrp = GetUnitsOfTypeIdAll('n60Q')
if ( Trig_Holy_Exorcism_2_Func002C() ) then
call ForGroupBJ( udg_HE_dummygrp, function Trig_Holy_Exorcism_2_Func002Func002A )
else
call DisableTrigger( GetTriggeringTrigger() )
endif
call DestroyGroup(udg_HE_dummygrp)
endfunction
//===========================================================================
function InitTrig_Holy_Exorcism_2 takes nothing returns nothing
set gg_trg_Holy_Exorcism_2 = CreateTrigger( )
call DisableTrigger( gg_trg_Holy_Exorcism_2 )
call TriggerRegisterTimerEventPeriodic( gg_trg_Holy_Exorcism_2, 0.03 )
call TriggerAddAction( gg_trg_Holy_Exorcism_2, function Trig_Holy_Exorcism_2_Actions )
endfunction
JASS:
function Trig_Holy_Exorcism_3_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n60Q' ) ) then
return false
endif
return true
endfunction
function Trig_Holy_Exorcism_3_Func008001003001 takes nothing returns boolean
return ( IsUnitAlly(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Holy_Exorcism_3_Func008001003002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetTriggerUnit()) )
endfunction
function Trig_Holy_Exorcism_3_Func008001003 takes nothing returns boolean
return GetBooleanOr( Trig_Holy_Exorcism_3_Func008001003001(), Trig_Holy_Exorcism_3_Func008001003002() )
endfunction
function Trig_Holy_Exorcism_3_Func008Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) != GetUnitTypeId(GetTriggerUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Holy_Exorcism_3_Func008A takes nothing returns nothing
if ( Trig_Holy_Exorcism_3_Func008Func001C() ) then
set udg_HE_tmppt2 = GetUnitLoc(GetEnumUnit())
call AddSpecialEffectLocBJ( udg_HE_tmppt2, "Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) + 50.00 ) )
call RemoveLocation(udg_HE_tmppt2)
else
endif
endfunction
function Trig_Holy_Exorcism_3_Actions takes nothing returns nothing
set udg_HE_tmppt1 = GetUnitLoc(GetTriggerUnit())
set udg_HE_real = 50.00
call AddSpecialEffectLocBJ( udg_HE_tmppt1, "Abilities\\Spells\\Undead\\ReplenishHealth\\ReplenishHealthCasterOverhead.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call AddSpecialEffectLocBJ( udg_HE_tmppt1, "Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRangeOfLocMatching(200.00, udg_HE_tmppt1, Condition(function Trig_Holy_Exorcism_3_Func008001003)), function Trig_Holy_Exorcism_3_Func008A )
call RemoveUnit( GetTriggerUnit() )
call RemoveLocation(udg_HE_tmppt1)
endfunction
//===========================================================================
function InitTrig_Holy_Exorcism_3 takes nothing returns nothing
set gg_trg_Holy_Exorcism_3 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Holy_Exorcism_3, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Holy_Exorcism_3, Condition( function Trig_Holy_Exorcism_3_Conditions ) )
call TriggerAddAction( gg_trg_Holy_Exorcism_3, function Trig_Holy_Exorcism_3_Actions )
endfunction
JASS:
function Holy_Exorcism_Conditions takes nothing returns boolean
return GetSpellAbilityId()=='A63C'
endfunction
function Holy_Exorcism_Actions takes nothing returns nothing
local unit caster=GetTriggerUnit()
local unit lastcreated
local integer HE
local real x1=GetUnitX(caster)
local real y1=GetUnitY(caster)
local real facing = GetUnitFacing(caster)
local real x2=x1+150*Cos(facing*bj_DEGTORAD)
local real y2=y1+150*Sin(facing*bj_DEGTORAD)
local real angle
local real expired
local effect sfx
local real t1=GetSpellTargetX()
local real t2=GetSpellTargetY()
set HE = 1
loop
exitwhen HE > 3
set x2= x2+45*Cos(facing*bj_DEGTORAD)
set y2= y2+45*Sin(facing*bj_DEGTORAD)
set lastcreated=CreateUnit(GetOwningPlayer(caster),'n60Q',x2,y2,facing)
set sfx=AddSpecialEffect("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl", x2,y2)
call DestroyEffect(sfx)
set expired=SquareRoot((t1-x2)*(t1-x2)+(t2-y2)*(t2-y2))/1000
call UnitApplyTimedLife( lastcreated,'BTLF',expired)
set HE = HE + 1
endloop
set angle = 0.00
call EnableTrigger( gg_trg_Holy_Exorcism_2 )
endfunction
//===========================================================================
constant function LGHE takes nothing returns boolean
return true
endfunction
function InitTrig_Holy_Exorcism takes nothing returns nothing
local trigger T=CreateTrigger()
local trigger T2=CreateTrigger()
local integer TI=0
local filterfunc FF=Filter(function LGHE)
loop
exitwhen (TI>=bj_MAX_PLAYER_SLOTS)
call TriggerRegisterPlayerUnitEvent(T,Player(TI),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call TriggerRegisterPlayerUnitEvent(T2,Player(TI),EVENT_PLAYER_UNIT_DEATH,null)
set TI=TI+1
endloop
call DestroyBoolExpr(FF)
call DestroyFilter(FF)
call TriggerAddAction(T,function Holy_Exorcism_Actions)
call TriggerAddCondition(T,Condition(function Holy_Exorcism_Conditions))
set FF=null
set T=null
set T2=null
endfunction
I post the GUI version along with the converted JASS version and the JASS version which I personally editing it.
Electric Chain - I currently making my own version of electric chain. I am not familiar with hashtable since I never use it. I was planning to use hashtable to replace the integer.
Electric Strike - Currently trying to fix the lightning facing position and make it deal damage to enemy units. As for the knockback effect, it would be implement after I found a JASS KB system.
Holy Exorcism - Currently doesn't have any idea on converting the 2nd and 3rd trigger. As for the 1st trigger, I am having a maths problem regarding the arrow position.
Last edited: