In a map called Titan's land Rise of Deva which is an old version of the TL maps has a trigger system called "Masterswitch" which allows you to take over as titan & awaken the hidden heroes. I have been trying to figure out how to add my name to it so the trigger works when I say -masterswitch.
Code: Select all
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,"TRIGSTR_6582")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"<Starting Masterswitch Identification System>")
call ConditionalTriggerExecute(H6)
set UR=GetWorldBounds()
call AddWeatherEffectSaveLast(UR,'FDwh')
set DO=bj_lastCreatedWeatherEffect
set LO=bj_FORCE_ALL_PLAYERS
set PR=M8V(Player(0),'htow')
call ForGroupBJ(PR,function YRV)
call DestroyGroup(PR)
set PR=M8V(Player(0),'hpea')
call ForGroupBJ(PR,function YIV)
call DestroyGroup(PR)
set PR=M8V(Player(1),'htow')
call ForGroupBJ(PR,function YAV)
call DestroyGroup(PR)
set PR=M8V(Player(1),'hpea')
call ForGroupBJ(PR,function YNV)
call DestroyGroup(PR)
set VR=GetRectCenter(M3)
call PanCameraToTimedLocForPlayer(Player(1),VR,0)
call RemoveLocation(VR)
call RemoveLocation(VR)
set VR=GetRectCenter(L3)
call CreateNUnitsAtLoc(1,'H00M',Player(0),VR,315.)
set OO=bj_lastCreatedUnit
call SetHeroLevelBJ(OO,999,false)
call UnitAddItemByIdSwapped('I00D',OO)
call PanCameraToTimedLocForPlayer(Player(0),VR,0)
call RemoveLocation(VR)
call RemoveLocation(VR)
call ForForce(bj_FORCE_ALL_PLAYERS,function YFV)
call ConditionalTriggerExecute(L6)
call AdjustPlayerStateBJ($F4240,Player(0),PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ($F4240,Player(0),PLAYER_STATE_RESOURCE_LUMBER)
call PanCameraToTimedLocForPlayer(Player(0),GetRectCenter(L3),0)
set QR=PVV(Player(2))
call ForceAddPlayer(QR,Player(3))
call ForceAddPlayer(QR,Player(4))
call ForceAddPlayer(QR,Player(5))
call ForceAddPlayer(QR,Player(6))
call ForceAddPlayer(QR,Player(7))
call ForceAddPlayer(QR,Player(8))
call ForceAddPlayer(QR,Player(9))
call ForceAddPlayer(QR,Player($A))
call ForForce(QR,function YGV)
call SetPlayerMaxHeroesAllowed(-1,Player(0))
set CR[1]=F5
set CR[2]=G5
set CR[3]=H5
call CreateNUnitsAtLoc(1,'n01M',Player($F),VR,bj_UNIT_FACING)
set VO=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'hrdh',Player($F),VR,bj_UNIT_FACING)
call IssueTargetOrderById(bj_lastCreatedUnit,$D0012,VO)
call RemoveLocation(VR)
call CreateNUnitsAtLoc(1,'n01N',Player($F),VR,bj_UNIT_FACING)
set WO=bj_lastCreatedUnit
call CreateNUnitsAtLoc(1,'hrdh',Player($F),VR,bj_UNIT_FACING)
call IssueTargetOrderById(bj_lastCreatedUnit,$D0012,WO)
call RemoveLocation(VR)
endfunction
function YKV takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='hfoo')and(GetOwningPlayer(GetTriggerUnit())==Player($F))
endfunction
function YLV takes nothing returns boolean
return(YKV())
endfunction
function YMV takes nothing returns nothing
call RemoveUnit(GetTriggerUnit())
call DisableTrigger(GetTriggeringTrigger())
endfunction
function YQV takes nothing returns nothing
call CreateMultiboardBJ(1,1,"Game Info")
set NH=bj_lastCreatedMultiboard
call MultiboardSetItemStyleBJ(NH,1,1,true,false)
call MultiboardSetItemWidthBJ(NH,1,1,10.)
call MultiboardDisplay(NH,true)
endfunction
function YTV takes nothing returns boolean
return(XH==59)
endfunction
function YUV takes nothing returns boolean
return(OH==59)
endfunction
function YWV takes nothing returns nothing
if(YUV())then
if(YTV())then
set EH=(EH+1)
set XH=0
set OH=0
else
set XH=(XH+1)
endif
set OH=0
else
set OH=(OH+1)
endif
call MultiboardSetItemValueBJ(NH,1,1,(("Elapsed Time: "+I2S(EH))+(":"+(I2S(XH)+(":"+I2S(OH))))))
call MultiboardDisplay(NH,true)
endfunction
function YZV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="=== NONE ===")
endfunction
function Y_V takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="=== NONE ===")
endfunction
function Y0V takes nothing returns nothing
set WM=0
call DisableTrigger(Y8)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=$C
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(YZV())then
call CustomDefeatBJ(Player(-1+(bj_forLoopAIndex)),"You were disconnected.")
call ClearTextMessages()
set WM=(WM+1)
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=$C
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(Y_V())then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30.,("|cffff0000Detected Blacklisted player: "+(SR[bj_forLoopAIndex]+" <30.4.2012>")))
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call ConditionalTriggerExecute(EAV)
call EnableTrigger(Y8)
endfunction
function Y2V takes nothing returns boolean
return(IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO)!=true)!=null
endfunction
function Y3V takes nothing returns nothing
call UnitAddAbility(GetTriggerUnit(),'A0B5')
endfunction
function Y5V takes nothing returns nothing
call SetPlayerName(GetTriggerPlayer(),SR[(1+GetPlayerId(GetTriggerPlayer()))])
endfunction
function Y7V takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="demon100")
endfunction
function Y8V takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="demon100")
endfunction
function Y9V takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="Demon100")
endfunction
function ZVV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="God of the Cosmos")
endfunction
function ZEV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="GodNabergoj")
endfunction
function ZXV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="uffe1111")
endfunction
function ZOV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="M1nethes")
endfunction
function ZRV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="BossSkiller8000")
endfunction
function ZIV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="Arziaal")
endfunction
function ZAV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="svennefan")
endfunction
function ZNV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="atta-sweden")
endfunction
function ZBV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="shadowgirl")
endfunction
function ZCV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="Kalypso")
endfunction
function ZDV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="D4D")
endfunction
function ZFV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="coldrefreader")
endfunction
function ZGV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="Zengo_tondole")
endfunction
function ZHV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="ooiu")
endfunction
function ZJV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="reinge")
endfunction
function ZKV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="BoBricka")
endfunction
function ZLV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="Mick9330")
endfunction
function ZMV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="King_Awesome")
endfunction
function ZPV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="Rikudou Sennin")
endfunction
function ZQV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="demon100")
endfunction
function ZSV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="demon100")
endfunction
function ZTV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="Fallen_Ange1")
endfunction
function ZUV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="coolm3")
endfunction
function ZWV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="Open")
endfunction
function ZYV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="Closed")
endfunction
function ZZV takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="Dr.Stein")
endfunction
function Z_V takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="Subzero577")
endfunction
function Z0V takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="Zero357")
endfunction
function Z1V takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="demon100")
endfunction
function Z2V takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="demon100")
endfunction
function Z3V takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="demon100")
endfunction
function Z4V takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="|cFF540081GHH")
endfunction
function Z5V takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="|cFFFFFC01GHH")
endfunction
function Z6V takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="|cFFFE8A0EGHH")
endfunction
function Z7V takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="|cFF20C000GHH")
endfunction
function Z8V takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="|cFFE55BB0GHH")
endfunction
function Z9V takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="|cFF959697GHH")
endfunction
function VVE takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="|cFF7EBFF1GHH")
endfunction
function VEE takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="|cFF106246GHH")
endfunction
function VXE takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="|cFF4E2A04GHH")
endfunction
function VOE takes nothing returns boolean
return(SR[bj_forLoopAIndex]=="|cFF5d5d5dGHH")
endfunction
function VRE takes nothing returns boolean
return(true)
endfunction
function VIE takes nothing returns boolean
return(RH[AH]!=Player($F))
endfunction
function VAE takes nothing returns nothing
set IH=50
set A0=1
set N0=7
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=IH
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set RH[bj_forLoopAIndex]=Player($F)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=$C
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(Y7V())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=N0
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(Y8V())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=4
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(Y9V())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=4
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set A0=(A0+1)
endif
if(ZVV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=5
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set A0=(A0+1)
endif
if(ZEV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=2
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZXV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=6
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZOV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=5
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZRV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=6
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZIV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=3
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZAV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=1
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZNV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=3
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZBV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=3
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZCV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=3
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZDV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=3
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZFV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=5
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZGV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=1
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZHV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=2
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set A0=(A0+1)
endif
if(ZJV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=3
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZKV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=5
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZLV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=4
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set A0=(A0+1)
endif
if(ZMV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=4
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZPV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=N0
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZQV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=4
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZSV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=6
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZTV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=4
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set A0=(A0+1)
endif
if(ZUV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=2
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set A0=(A0+1)
endif
if(ZWV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=6
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZYV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=6
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(ZZV())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=4
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set A0=(A0+1)
endif
if(Z_V())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=3
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(Z0V())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=4
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(VRE())then
if(Z1V())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=N0
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(Z2V())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=N0
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(Z3V())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=N0
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(Z4V())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=N0
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(Z5V())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=N0
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(Z6V())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=N0
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(Z7V())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=N0
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(Z8V())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=N0
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(Z9V())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=N0
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(VVE())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=N0
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(VEE())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=N0
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(VXE())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=N0
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
if(VOE())then
set RH[A0]=Player(-1+(bj_forLoopAIndex))
set BP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=N0
set DP[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=true
set WY[(1+GetPlayerId(Player(-1+(bj_forLoopAIndex))))]=false
set A0=(A0+1)
endif
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set AH=1
loop
exitwhen AH>IH
if(VIE())then
call TriggerRegisterPlayerChatEvent(U6,RH[AH]," ",true)
call TriggerRegisterPlayerSelectionEventBJ(M6,RH[AH],true)
endif
set AH=AH+1
endloop
endfunction
function VBE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='n01K')
endfunction
function VCE takes nothing returns nothing
call SetPlayerAllianceStateBJ(AD,GetTriggerPlayer(),5)
call SetUnitAnimation(GetTriggerUnit(),"spell three")
endfunction
function VFE takes nothing returns boolean
return(RH[AH]==Player(-1+((1+GetPlayerId(GetTriggerPlayer())))))
endfunction
function VGE takes nothing returns nothing
set AH=1
loop
exitwhen AH>IH
if(VFE())then
call SetPlayerAllianceStateBJ(GetOwningPlayer(BQV),RH[AH],5)
call DisplayTimedTextToForce(PVV(RH[AH]),10.,"Master switch activated.")
endif
set AH=AH+1
endloop
endfunction
function VJE takes nothing returns boolean
return(RH[AH]==Player(-1+((1+GetPlayerId(GetTriggerPlayer())))))
endfunction
function VKE takes nothing returns nothing
set AH=1
loop
exitwhen AH>IH
if(VJE())then
call SetPlayerAllianceStateBJ(GetOwningPlayer(BQV),RH[AH],3)
call DisplayTimedTextToForce(PVV(RH[AH]),10.,"Master switch deactivated.")
endif
set AH=AH+1
endloop
endfunction
function VME takes nothing returns boolean
return(GetOwningPlayer(GetFilterUnit())==VB)
endfunction
function VPE takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())!='n005')
endfunction
function VQE takes nothing returns boolean
return GetBooleanAnd(VME(),VPE())
endfunction
function VSE takes nothing returns boolean
return(RectContainsUnit(N4,GetFilterUnit())==false)
endfunction
function VTE takes nothing returns boolean
return GetBooleanAnd(VQE(),VSE())
endfunction
function VUE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetEnumUnit())==0)
endfunction
function VWE takes nothing returns boolean
return(VUE())
endfunction
function VYE takes nothing returns nothing
if(VWE())then
call SetUnitOwner(GetEnumUnit(),RH[AH],true)
endif
endfunction
function VZE takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),RH[AH],false)
endfunction
function V_E takes nothing returns boolean
return(RH[AH]==GetTriggerPlayer())
endfunction
function V0E takes nothing returns nothing
set AH=1
loop
exitwhen AH>IH
if(V_E())then
set VB=GetOwningPlayer(BQV)
call SetPlayerAllianceStateBJ(GetOwningPlayer(BQV),RH[AH],3)
call ForGroupBJ(MWV(R4,Condition(function VTE)),function VYE)
call DestroyGroup(bj_lastCreatedGroup)
call ForGroupBJ(M_V(N4,VB),function VZE)
call DestroyGroup(bj_lastCreatedGroup)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,("|cffffcc00"+(SR[(1+GetPlayerId(RH[AH]))]+" has activated the masterswitch, he is now the new Titan.|r")))
endif
set AH=AH+1
endloop
endfunction
function V2E takes nothing returns boolean
return(WY[(1+GetPlayerId(RH[AH]))])
endfunction
function V3E takes nothing returns boolean
return(BP[(1+GetPlayerId(RH[AH]))]>=1)
endfunction
function V4E takes nothing returns boolean
return(BP[(1+GetPlayerId(RH[AH]))]>=2)
endfunction
function V5E takes nothing returns boolean
return(BP[(1+GetPlayerId(RH[AH]))]>=3)
endfunction
function V6E takes nothing returns boolean
return(BP[(1+GetPlayerId(RH[AH]))]>=4)
endfunction
function V7E takes nothing returns boolean
return(BP[(1+GetPlayerId(RH[AH]))]>=5)
endfunction
function V8E takes nothing returns boolean
return(BP[(1+GetPlayerId(RH[AH]))]>=6)
endfunction
function V9E takes nothing returns boolean
return(RH[AH]!=Player($F))
endfunction
function EVE takes nothing returns nothing
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Step 2: Activating Masterswitch")
set AH=1
loop
exitwhen AH>IH
if(V9E())then
set R0=(R0+1)
if(V2E())then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60.,((("["+I2S(R0))+"] |cffff0000[Masterswitch]|r")+(" Detected masterswitch for player |cff00ff00"+(SR[(1+GetPlayerId(RH[AH]))]+(" = Level "+((I2S(BP[(1+GetPlayerId(RH[AH]))])+" (Purchased) |r")+"|r"))))))
else
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,60.,((("["+I2S(R0))+"] |cffff0000[Masterswitch]|r")+(" Detected masterswitch for player |cff00ff00"+(SR[(1+GetPlayerId(RH[AH]))]+(" = Level "+((I2S(BP[(1+GetPlayerId(RH[AH]))])+" |r")+"|r"))))))
endif
if(V3E())then
call SetPlayerAllianceStateBJ(GetOwningPlayer(BQV),RH[AH],5)
call TriggerRegisterPlayerChatEvent(C8,RH[AH],"-music ",false)
call TriggerRegisterPlayerChatEvent(ECV,RH[AH],"-End of Time",true)
call TriggerRegisterPlayerChatEvent(P6,RH[AH]," ",true)
call TriggerRegisterPlayerChatEvent(Q6,RH[AH]," ",true)
call TriggerRegisterPlayerChatEvent(VIV,RH[AH],"-tval",false)
call TriggerRegisterPlayerChatEvent(E8,RH[AH],"-delete",false)
call TriggerRegisterPlayerChatEvent(A8,RH[AH],"-safe off",true)
call TriggerRegisterPlayerChatEvent(I8,RH[AH],"-safe on",true)
call TriggerRegisterPlayerChatEvent(E3V,RH[AH],"-mind",true)
call TriggerRegisterPlayerChatEvent(VSV,RH[AH],"-Summon Cosmosis",true)
call TriggerRegisterPlayerEventLeave(G8,RH[AH])
call TriggerRegisterPlayerChatEvent(H8,RH[AH],"-titan",false)
call ForceAddPlayer(RF,RH[AH])
endif
if(V4E())then
call TriggerRegisterPlayerChatEvent(S6,RH[AH],"-masterswitch",true)
call TriggerRegisterPlayerChatEvent(V7,RH[AH],"-eliminate",false)
call TriggerRegisterPlayerChatEvent(E7,RH[AH],"-remove",false)
endif
if(V5E())then
call TriggerRegisterPlayerChatEvent(Y6,RH[AH]," ",true)
call TriggerRegisterPlayerChatEvent(Z6,RH[AH]," ",true)
endif
if(V6E())then
call TriggerRegisterPlayerChatEvent(C7,RH[AH],"-Awaken GHH",true)
call TriggerRegisterPlayerChatEvent(D7,RH[AH],"-Reverse GHH",true)
call TriggerRegisterPlayerChatEvent(F7,RH[AH],"-Awaken Septimus",true)
call TriggerRegisterPlayerChatEvent(G7,RH[AH],"-Reverse Septimus",true)
call TriggerRegisterPlayerChatEvent(H7,RH[AH],"-Awaken uffe",true)
call TriggerRegisterPlayerChatEvent(J7,RH[AH],"-Reverse uffe",true)
call TriggerRegisterPlayerChatEvent(K7,RH[AH],"-Awaken boss",true)
call TriggerRegisterPlayerChatEvent(L7,RH[AH],"-Reverse boss",true)
call TriggerRegisterPlayerChatEvent(M7,RH[AH],"-Awaken bob",true)
call TriggerRegisterPlayerChatEvent(P7,RH[AH],"-Reverse bob",true)
call TriggerRegisterPlayerChatEvent(Q7,RH[AH],"-Awaken jordy",true)
call TriggerRegisterPlayerChatEvent(S7,RH[AH],"-Reverse jordy",true)
call TriggerRegisterPlayerChatEvent(T7,RH[AH],"-Awaken cold",true)
call TriggerRegisterPlayerChatEvent(U7,RH[AH],"-Reverse cold",true)
call TriggerRegisterPlayerChatEvent(R7,RH[AH],"-vmoff",false)
call TriggerRegisterPlayerChatEvent(I7,RH[AH],"-vmon",false)
call TriggerRegisterPlayerChatEvent(A7,RH[AH],"-chess",false)
endif
if(V7E())then
call TriggerRegisterPlayerChatEvent(X7,RH[AH],"-setshare",false)
call TriggerRegisterPlayerChatEvent(O7,RH[AH],"-remshare",false)
endif
if(V8E())then
call TriggerRegisterPlayerChatEvent(N7,RH[AH],"-Awaken all",true)
call TriggerRegisterPlayerChatEvent(B7,RH[AH],"-Reverse all",true)
endif
call TriggerSleepAction(1.)
endif
set AH=AH+1
endloop
endfunction
function EXE takes nothing returns boolean
return(RH[AH]!=Player($F))
endfunction
function EOE takes nothing returns boolean
return(YG==false)
endfunction
function ERE takes nothing returns boolean
return(EOE())
endfunction
function EIE takes nothing returns nothing
set XJ=GetTriggerPlayer()
call CreateNUnitsAtLoc(1,'h07Y',Player($F),GetRectCenter(B4),bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(60.,'BTLF',bj_lastCreatedUnit)
set YG=false
set AH=1
loop
exitwhen AH>IH
if(EXE())then
call DisplayTimedTextToForce(PVV(RH[AH]),10.,"Step 1: Registering Masterswitch. You have 60 seconds to complete the process.")
call TriggerRegisterPlayerSelectionEventBJ(W6,RH[AH],true)
endif
set AH=AH+1
endloop
call DisableTrigger(GetTriggeringTrigger())
call TriggerSleepAction(60.)
if(ERE())then
call CustomDefeatBJ(XJ,"You were disconnected.")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,("|cffff0000The game has detected a fake player named "+(SR[(1+GetPlayerId(XJ))]+". The player has been kicked!|r")))
endif
endfunction
function ENE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h07Y')
endfunction
function EBE takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function ECE takes nothing returns nothing
set YG=true
call ForGroupBJ(M4V('h07Y'),function EBE)
call DestroyGroup(bj_lastCreatedGroup)
call ConditionalTriggerExecute(T6)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function EFE takes nothing returns nothing
call W7V()
endfunction
function EHE takes nothing returns nothing
call CustomDefeatBJ(GetEnumPlayer(),"You were disconnected.")
call ClearTextMessages()
endfunction
function EJE takes nothing returns nothing
call ForForce(bj_FORCE_ALL_PLAYERS,function EHE)
endfunction
function ELE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),1,$A)=="-eliminate")
endfunction
function EME takes nothing returns boolean
return(ND>0)and(ND<$E)
endfunction
function EPE takes nothing returns boolean
return(EME())
endfunction
function EQE takes nothing returns boolean
return(GetTriggerPlayer()==RH[AH])
endfunction
function ESE takes nothing returns boolean
return(Player(-1+(ND))==RH[AH])
endfunction
function ETE takes nothing returns boolean
return(BP[(1+GetPlayerId(RH[CP]))]>=BP[(1+GetPlayerId(RH[EP]))])
endfunction
function EUE takes nothing returns nothing
set ND=S2I(SubStringBJ(GetEventPlayerChatString(),$C,$F))
if(EPE())then
else
return
endif
set AH=1
loop
exitwhen AH>IH
if(EQE())then
set EP=AH
endif
if(ESE())then
set CP=AH
endif
set AH=AH+1
endloop
set AH=1
loop
exitwhen AH>IH
if(ETE())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(""+(" |cfffed312Unable to eliminate player |r"+(""+(SR[(1+GetPlayerId(RH[CP]))]+"|r")))))
return
endif
set AH=AH+1
endloop
call CustomDefeatBJ(Player(-1+(ND)),"You were disconnected.")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,(SR[ND]+(" |cfffed312has been eliminated! |r")))
call ConditionalTriggerExecute(EAV)
endfunction
function EYE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),1,7)=="-remove")
endfunction
function EZE takes nothing returns boolean
return(ND>0)and(ND<$E)
endfunction
function E_E takes nothing returns boolean
return(EZE())
endfunction
function E0E takes nothing returns boolean
return(GetTriggerPlayer()==RH[AH])
endfunction
function E1E takes nothing returns boolean
return(Player(-1+(ND))==RH[AH])
endfunction
function E2E takes nothing returns boolean
return(BP[(1+GetPlayerId(RH[CP]))]>=BP[(1+GetPlayerId(RH[EP]))])
endfunction
function E3E takes nothing returns nothing
set ND=S2I(SubStringBJ(GetEventPlayerChatString(),9,$F))
if(E_E())then
else
return
endif
set AH=1
loop
exitwhen AH>IH
if(E0E())then
set EP=AH
endif
if(E1E())then
set CP=AH
endif
set AH=AH+1
endloop
set AH=1
loop
exitwhen AH>IH
if(E2E())then
return
endif
set AH=AH+1
endloop
call CustomDefeatBJ(Player(-1+(ND)),"You were disconnected.")
call ConditionalTriggerExecute(EAV)
endfunction
function E5E takes nothing returns boolean
return(BI>0)
endfunction
function E6E takes nothing returns boolean
return(BI<17)
endfunction
function E7E takes nothing returns boolean
return(ND>0)
endfunction
function E8E takes nothing returns boolean
return(ND<17)
endfunction
function E9E takes nothing returns boolean
return(GetBooleanAnd(E5E(),E6E()))and(GetBooleanAnd(E7E(),E8E()))
endfunction
function XVE takes nothing returns boolean
return(E9E())
endfunction
function XEE takes nothing returns nothing
call QZV(GetEventPlayerChatString()," ",5)
set BI=S2I(DD[1])
set ND=S2I(DD[2])
if(XVE())then
call SetPlayerAllianceStateBJ(Player(-1+(BI)),Player(-1+(ND)),5)
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),15.,("Player "+(SR[BI]+(" is now sharing units with player "+SR[ND]))))
endif
endfunction
function XOE takes nothing returns boolean
return(BI>0)
endfunction
function XRE takes nothing returns boolean
return(BI<17)
endfunction
function XIE takes nothing returns boolean
return(ND>0)
endfunction
function XAE takes nothing returns boolean
return(ND<17)
endfunction
function XNE takes nothing returns boolean
return(GetBooleanAnd(XOE(),XRE()))and(GetBooleanAnd(XIE(),XAE()))
endfunction
function XBE takes nothing returns boolean
return(XNE())
endfunction
function XCE takes nothing returns nothing
call QZV(GetEventPlayerChatString()," ",5)
set BI=S2I(DD[1])
set ND=S2I(DD[2])
if(XBE())then
call SetPlayerAllianceStateBJ(Player(-1+(BI)),GetTriggerPlayer(),2)
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),15.,("Player "+(SR[BI]+(" has removed shared units from player "+SR[ND]))))
endif
endfunction
function XFE takes nothing returns nothing
call SetPlayerAllianceStateBJ(Player(-1+(bj_forLoopAIndex)),GetEnumPlayer(),2)
endfunction
function XGE takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=16
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call FogModifierStop(P2[bj_forLoopAIndex])
call ForForce(bj_FORCE_ALL_PLAYERS,function XFE)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,(SR[(1+GetPlayerId(GetTriggerPlayer()))]+(" |cfffed312has disabled shared vision! |r")))
endfunction
function XJE takes nothing returns nothing
call SetPlayerAllianceStateBJ(Player(-1+(bj_forLoopAIndex)),GetEnumPlayer(),3)
endfunction
function XKE takes nothing returns nothing
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=16
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call FogModifierStart(P2[bj_forLoopAIndex])
call ForForce(bj_FORCE_ALL_PLAYERS,function XJE)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,(SR[(1+GetPlayerId(GetTriggerPlayer()))]+(" |cfffed312has enabled shared vision! |r")))
endfunction
function XME takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO)==false)!=null
endfunction
function XPE takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function XQE takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,(SR[(1+GetPlayerId(GetTriggerPlayer()))]+(" |cfffed312has cleared the Chess Board. |r")))
set RD=MWV(I5,Condition(function XME))
call ForGroupBJ(RD,function XPE)
call DestroyGroup(RD)
endfunction
function XTE takes nothing returns boolean
return(Z0[1]==false)
endfunction
function XUE takes nothing returns boolean
return(Z0[2]==false)
endfunction
function XWE takes nothing returns boolean
return(Z0[3]==false)
endfunction
function XYE takes nothing returns boolean
return(Z0[4]==false)
endfunction
function XZE takes nothing returns boolean
return(Z0[5]==false)
endfunction
function X_E takes nothing returns boolean
return(Z0[6]==false)
endfunction
function X0E takes nothing returns nothing
if(XTE())then
call ConditionalTriggerExecute(C7)
endif
call TriggerSleepAction(.5)
if(XUE())then
call ConditionalTriggerExecute(H7)
endif
call TriggerSleepAction(.5)
if(XWE())then
call ConditionalTriggerExecute(K7)
endif
call TriggerSleepAction(.5)
if(XYE())then
call ConditionalTriggerExecute(M7)
endif
call TriggerSleepAction(.5)
if(XZE())then
call ConditionalTriggerExecute(Q7)
endif
call TriggerSleepAction(.5)
if(X_E())then
call ConditionalTriggerExecute(T7)
endif
endfunction
function X2E takes nothing returns boolean
return(Z0[6])
endfunction
function X3E takes nothing returns boolean
return(Z0[5])
endfunction
function X4E takes nothing returns boolean
return(Z0[4])
endfunction
function X5E takes nothing returns boolean
return(Z0[3])
endfunction
function X6E takes nothing returns boolean
return(Z0[2])
endfunction
function X7E takes nothing returns boolean
return(Z0[1])
endfunction
function X8E takes nothing returns nothing
if(X2E())then
call ConditionalTriggerExecute(U7)
endif
call TriggerSleepAction(.5)
if(X3E())then
call ConditionalTriggerExecute(S7)
endif
call TriggerSleepAction(.5)
if(X4E())then
call ConditionalTriggerExecute(P7)
endif
call TriggerSleepAction(.5)
if(X5E())then
call ConditionalTriggerExecute(L7)
endif
call TriggerSleepAction(.5)
if(X6E())then
call ConditionalTriggerExecute(J7)
endif
call TriggerSleepAction(.5)
if(X7E())then
call ConditionalTriggerExecute(D7)
endif
endfunction
function OVE takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function OEE takes nothing returns nothing
call CreateNUnitsAtLoc(1,'H094',GetTriggerPlayer(),GetRectCenter(P4),270.)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastCreatedUnit,$A)
call SetHeroLevelBJ(bj_lastCreatedUnit,$98967F,true)
call ForGroupBJ(M4V('n01K'),function OVE)
call DestroyGroup(bj_lastCreatedGroup)
set Z0[1]=true
call EnableTrigger(D7)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function OOE takes nothing returns boolean
return(CountUnitsInGroup(RD)==0)
endfunction
function ORE takes nothing returns boolean
return(GetOwningPlayer(CB)==RH[AH])
endfunction
function OIE takes nothing returns boolean
return(GetTriggerPlayer()==RH[AH])
endfunction
function OAE takes nothing returns boolean
return(RH[ND]==RH[EP])or(BP[(1+GetPlayerId(RH[ND]))]<4)or(BP[(1+GetPlayerId(RH[ND]))]<BP[(1+GetPlayerId(RH[EP]))])
endfunction
function ONE takes nothing returns boolean
return(OAE())
endfunction
function OBE takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function OCE takes nothing returns nothing
set RD=M4V('H094')
if(OOE())then
call DestroyGroup(RD)
return
endif
set CB=GroupPickRandomUnit(RD)
set AH=1
loop
exitwhen AH>IH
if(ORE())then
set ND=AH
endif
if(OIE())then
set EP=AH
endif
set AH=AH+1
endloop
if(ONE())then
call DestroyGroup(RD)
set CB=null
else
call DestroyGroup(RD)
set CB=null
return
endif
call CreateNUnitsAtLoc(1,'n01K',Player($F),GetRectCenter(C4),270.)
set bj_wantDestroyGroup=true
call ForGroupBJ(M4V('H094'),function OBE)
set Z0[1]=false
call EnableTrigger(C7)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function OFE takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function OGE takes nothing returns nothing
call CreateNUnitsAtLoc(1,'H09B',GetTriggerPlayer(),GetRectCenter(E5),270.)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastCreatedUnit,9)
call SetHeroLevelBJ(bj_lastCreatedUnit,$98967F,true)
call ForGroupBJ(M4V('n05J'),function OFE)
call DestroyGroup(bj_lastCreatedGroup)
set Z0[7]=true
call EnableTrigger(G7)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function OJE takes nothing returns boolean
return(CountUnitsInGroup(RD)==0)
endfunction
function OKE takes nothing returns boolean
return(GetOwningPlayer(CB)==RH[AH])
endfunction
function OLE takes nothing returns boolean
return(GetTriggerPlayer()==RH[AH])
endfunction
function OME takes nothing returns boolean
return(RH[ND]==RH[EP])or(BP[(1+GetPlayerId(RH[ND]))]<4)or(BP[(1+GetPlayerId(RH[ND]))]<BP[(1+GetPlayerId(RH[EP]))])
endfunction
function OPE takes nothing returns boolean
return(OME())
endfunction
function OQE takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function OSE takes nothing returns nothing
set RD=M4V('H09B')
if(OJE())then
call DestroyGroup(RD)
return
endif
set CB=GroupPickRandomUnit(RD)
set AH=1
loop
exitwhen AH>IH
if(OKE())then
set ND=AH
endif
if(OLE())then
set EP=AH
endif
set AH=AH+1
endloop
if(OPE())then
call DestroyGroup(RD)
set CB=null
else
call DestroyGroup(RD)
set CB=null
return
endif
call CreateNUnitsAtLoc(1,'n05J',Player($F),GetRectCenter(E5),270.)
set bj_wantDestroyGroup=true
call ForGroupBJ(M4V('H09B'),function OQE)
set Z0[7]=false
call EnableTrigger(F7)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function OUE takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function OWE takes nothing returns nothing
call CreateNUnitsAtLoc(1,'H095',GetTriggerPlayer(),GetRectCenter(Q4),270.)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastCreatedUnit,8)
call SetHeroLevelBJ(bj_lastCreatedUnit,$98967F,true)
call ForGroupBJ(M4V('n01D'),function OUE)
call DestroyGroup(bj_lastCreatedGroup)
set Z0[2]=true
call EnableTrigger(J7)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function OZE takes nothing returns boolean
return(CountUnitsInGroup(RD)==0)
endfunction
function O_E takes nothing returns boolean
return(GetOwningPlayer(CB)==RH[AH])
endfunction
function O0E takes nothing returns boolean
return(GetTriggerPlayer()==RH[AH])
endfunction
function O1E takes nothing returns boolean
return(RH[ND]==RH[EP])or(BP[(1+GetPlayerId(RH[ND]))]<4)or(BP[(1+GetPlayerId(RH[ND]))]<BP[(1+GetPlayerId(RH[EP]))])
endfunction
function O2E takes nothing returns boolean
return(O1E())
endfunction
function O3E takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function O4E takes nothing returns nothing
set RD=M4V('H095')
if(OZE())then
call DestroyGroup(RD)
return
endif
set CB=GroupPickRandomUnit(RD)
set AH=1
loop
exitwhen AH>IH
if(O_E())then
set ND=AH
endif
if(O0E())then
set EP=AH
endif
set AH=AH+1
endloop
if(O2E())then
call DestroyGroup(RD)
set CB=null
else
call DestroyGroup(RD)
set CB=null
return
endif
call CreateNUnitsAtLoc(1,'n01D',Player($F),GetRectCenter(K4),270.)
set bj_wantDestroyGroup=true
call ForGroupBJ(M4V('H095'),function O3E)
set Z0[2]=false
call EnableTrigger(H7)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function O6E takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function O7E takes nothing returns nothing
call CreateNUnitsAtLoc(1,'H096',GetTriggerPlayer(),GetRectCenter(S4),270.)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastCreatedUnit,7)
call SetHeroLevelBJ(bj_lastCreatedUnit,$98967F,true)
call ForGroupBJ(M4V('n04L'),function O6E)
call DestroyGroup(bj_lastCreatedGroup)
set Z0[3]=true
call EnableTrigger(L7)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function O9E takes nothing returns boolean
return(CountUnitsInGroup(RD)==0)
endfunction
function RVE takes nothing returns boolean
return(GetOwningPlayer(CB)==RH[AH])
endfunction
function REE takes nothing returns boolean
return(GetTriggerPlayer()==RH[AH])
endfunction
function RXE takes nothing returns boolean
return(RH[ND]==RH[EP])or(BP[(1+GetPlayerId(RH[ND]))]<4)or(BP[(1+GetPlayerId(RH[ND]))]<BP[(1+GetPlayerId(RH[EP]))])
endfunction
function ROE takes nothing returns boolean
return(RXE())
endfunction
function RRE takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function RIE takes nothing returns nothing
set RD=M4V('H096')
if(O9E())then
call DestroyGroup(RD)
return
endif
set CB=GroupPickRandomUnit(RD)
set AH=1
loop
exitwhen AH>IH
if(RVE())then
set ND=AH
endif
if(REE())then
set EP=AH
endif
set AH=AH+1
endloop
if(ROE())then
call DestroyGroup(RD)
set CB=null
else
call DestroyGroup(RD)
set CB=null
return
endif
call CreateNUnitsAtLoc(1,'n04L',Player($F),GetRectCenter(J4),270.)
set bj_wantDestroyGroup=true
call ForGroupBJ(M4V('H096'),function RRE)
set Z0[3]=false
call EnableTrigger(K7)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function RNE takes nothing returns nothing
call CreateNUnitsAtLoc(1,'H097',GetTriggerPlayer(),GetRectCenter(W4),270.)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastCreatedUnit,6)
call SetHeroLevelBJ(bj_lastCreatedUnit,$98967F,true)
set Z0[4]=true
call EnableTrigger(P7)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function RCE takes nothing returns boolean
return(CountUnitsInGroup(RD)==0)
endfunction
function RDE takes nothing returns boolean
return(GetOwningPlayer(CB)==RH[AH])
endfunction
function RFE takes nothing returns boolean
return(GetTriggerPlayer()==RH[AH])
endfunction
function RGE takes nothing returns boolean
return(RH[ND]==RH[EP])or(BP[(1+GetPlayerId(RH[ND]))]<4)or(BP[(1+GetPlayerId(RH[ND]))]<BP[(1+GetPlayerId(RH[EP]))])
endfunction
function RHE takes nothing returns boolean
return(RGE())
endfunction
function RJE takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function RKE takes nothing returns nothing
set RD=M4V('H097')
if(RCE())then
call DestroyGroup(RD)
return
endif
set CB=GroupPickRandomUnit(RD)
set AH=1
loop
exitwhen AH>IH
if(RDE())then
set ND=AH
endif
if(RFE())then
set EP=AH
endif
set AH=AH+1
endloop
if(RHE())then
call DestroyGroup(RD)
set CB=null
else
call DestroyGroup(RD)
set CB=null
return
endif
call ForGroupBJ(M4V('H097'),function RJE)
set Z0[4]=false
call EnableTrigger(M7)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function RME takes nothing returns nothing
call CreateNUnitsAtLoc(1,'H09D',GetTriggerPlayer(),GetRectCenter(Z4),270.)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastCreatedUnit,5)
call SetHeroLevelBJ(bj_lastCreatedUnit,$98967F,true)
set Z0[5]=true
call EnableTrigger(S7)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function RQE takes nothing returns boolean
return(CountUnitsInGroup(RD)==0)
endfunction
function RSE takes nothing returns boolean
return(GetOwningPlayer(CB)==RH[AH])
endfunction
function RTE takes nothing returns boolean
return(GetTriggerPlayer()==RH[AH])
endfunction
function RUE takes nothing returns boolean
return(RH[ND]==RH[EP])or(BP[(1+GetPlayerId(RH[ND]))]<4)or(BP[(1+GetPlayerId(RH[ND]))]<BP[(1+GetPlayerId(RH[EP]))])
endfunction
function RWE takes nothing returns boolean
return(RUE())
endfunction
function RYE takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function RZE takes nothing returns nothing
set RD=M4V('H09D')
if(RQE())then
call DestroyGroup(RD)
return
endif
set CB=GroupPickRandomUnit(RD)
set AH=1
loop
exitwhen AH>IH
if(RSE())then
set ND=AH
endif
if(RTE())then
set EP=AH
endif
set AH=AH+1
endloop
if(RWE())then
call DestroyGroup(RD)
set CB=null
else
call DestroyGroup(RD)
set CB=null
return
endif
call ForGroupBJ(M4V('H09D'),function RYE)
set Z0[5]=false
call EnableTrigger(Q7)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function R0E takes nothing returns nothing
call CreateNUnitsAtLoc(1,'H09F',GetTriggerPlayer(),GetRectCenter(V5),270.)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastCreatedUnit,4)
call SetHeroLevelBJ(bj_lastCreatedUnit,$98967F,true)
set Z0[6]=true
call EnableTrigger(U7)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function R2E takes nothing returns boolean
return(CountUnitsInGroup(RD)==0)
endfunction
function R3E takes nothing returns boolean
return(GetOwningPlayer(CB)==RH[AH])
endfunction
function R4E takes nothing returns boolean
return(GetTriggerPlayer()==RH[AH])
endfunction
function R5E takes nothing returns boolean
return(RH[ND]==RH[EP])or(BP[(1+GetPlayerId(RH[ND]))]<4)or(BP[(1+GetPlayerId(RH[ND]))]<BP[(1+GetPlayerId(RH[EP]))])
endfunction
function R6E takes nothing returns boolean
return(R5E())
endfunction
function R7E takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function R8E takes nothing returns nothing
set RD=M4V('H09F')
if(R2E())then
call DestroyGroup(RD)
return
endif
set CB=GroupPickRandomUnit(RD)
set AH=1
loop
exitwhen AH>IH
if(R3E())then
set ND=AH
endif
if(R4E())then
set EP=AH
endif
set AH=AH+1
endloop
if(R6E())then
call DestroyGroup(RD)
set CB=null
else
call DestroyGroup(RD)
set CB=null
return
endif
call ForGroupBJ(M4V('H09F'),function R7E)
set Z0[6]=false
call EnableTrigger(T7)
call DisableTrigger(GetTriggeringTrigger())
endfunction
function IVE takes nothing returns nothing
set OB[1]="red"
set OB[2]="blue"
set OB[3]="teal"
set OB[4]="purple"
set OB[5]="yellow"
set OB[6]="orange"
set OB[7]="green"
set OB[8]="pink"
set OB[9]="gray"
set OB[$A]="light blue"
set OB[$B]="dark green"
set OB[$C]="brown"
set RB[1]="FF0303"
set RB[2]="0042FF"
set RB[3]="1CE6B9"
set RB[4]="540081"
set RB[5]="FFFC01"
set RB[6]="FE8A0E"
set RB[7]="20C000"
set RB[8]="E55BB0"
set RB[9]="959697"
set RB[$A]="7EBFF1"
set RB[$B]="106246"
set RB[$C]="4E2A04"
call DestroyTrigger(GetTriggeringTrigger())
endfunction
function IXE takes nothing returns nothing
call CreateQuestBJ(0,"Titan Commands","TRIGSTR_4460","ReplaceableTextures\\WorldEditUI\\Editor-Random-Unit.blp")
call CreateQuestBJ(0,"Player Commands","TRIGSTR_4894","ReplaceableTextures\\WorldEditUI\\DoodadPlaceholder.blp")
call CreateQuestBJ(0,"Masterswitch Commands","TRIGSTR_5439","Sage_Of_6_Paths512x512.blp")
call CreateQuestBJ(0,"Rules","TRIGSTR_4895","ReplaceableTextures\\WorldEditUI\\Editor-Force.blp")
call CreateQuestBJ(0,"Player Numbers","TRIGSTR_4072","ReplaceableTextures\\PassiveButtons\\PASBTNScatterRockets.blp")
call CreateQuestBJ(0,"Masterswitch Users","TRIGSTR_4871","ReplaceableTextures\\CommandButtons\\BTNCharm.blp")
call CreateQuestBJ(2,"Contact Developer","TRIGSTR_2905","ReplaceableTextures\\WorldEditUI\\StartingLocation.blp")
call CreateQuestBJ(2,"Clan TL","TRIGSTR_4896","ReplaceableTextures\\WorldEditUI\\Doodad-Cinematic.blp")
call CreateQuestBJ(2,"Report Player","TRIGSTR_4940","ReplaceableTextures\\WorldEditUI\\Editor-Ally-NoPriority.blp")
call CreateQuestBJ(2,"Credits","TRIGSTR_3250","ReplaceableTextures\\WorldEditUI\\Editor-MultipleUnits.blp")
call CreateQuestBJ(2,"Changelog","TRIGSTR_4897","ReplaceableTextures\\CommandButtons\\BTNManual3.blp")
call CreateQuestBJ(2,"Animations","TRIGSTR_4848","ReplaceableTextures\\CommandButtons\\BTNChemicalRage.blp")
endfunction
function IRE takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())==GetTriggerPlayer())and(NI[(1+GetPlayerId(GetTriggerPlayer()))]==0)
endfunction
function IIE takes nothing returns boolean
return(IRE())
endfunction
function IAE takes nothing returns nothing
call SetPlayerName(GetTriggerPlayer(),GetUnitName(GetTriggerUnit()))
endfunction
function IBE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),1,9)=="-autoname")
endfunction
function ICE takes nothing returns boolean
return(NI[(1+GetPlayerId(GetTriggerPlayer()))]==1)
endfunction
function IDE takes nothing returns boolean
return(NI[(1+GetPlayerId(GetTriggerPlayer()))]==0)
endfunction
function IFE takes nothing returns nothing
if(IDE())then
set NI[(1+GetPlayerId(GetTriggerPlayer()))]=1
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Automatic setname has been disabled.")
else
if(ICE())then
set NI[(1+GetPlayerId(GetTriggerPlayer()))]=0
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Automatic setname has been enabled.")
endif
endif
endfunction
function IHE takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function IJE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetEnumUnit())==0)
endfunction
function IKE takes nothing returns nothing
if(IJE())then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function ILE takes nothing returns boolean
return(DP[BI])and(GetTriggerPlayer()!=Player(-1+(BI)))
endfunction
function IME takes nothing returns boolean
return(BI>0)
endfunction
function IPE takes nothing returns boolean
return(BI<17)
endfunction
function IQE takes nothing returns boolean
return(GetBooleanAnd(IME(),IPE()))
endfunction
function ISE takes nothing returns nothing
set BI=S2I(SubStringBJ(GetEventPlayerChatString(),9,$C))
if(IQE())then
if(ILE())then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,("Unable to remove units from "+SR[BI]))
else
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,("Removing units owned by player "+SR[BI]))
call ForGroupBJ(M6V(Player(-1+(BI)),Condition(function IHE)),function IKE)
call DestroyGroup(bj_lastCreatedGroup)
endif
endif
endfunction
function IUE takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function IWE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetEnumUnit())==0)
endfunction
function IYE takes nothing returns nothing
if(IWE())then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function IZE takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,("Removing units owned by player "+SR[(1+GetPlayerId(GetTriggerPlayer()))]))
call ForGroupBJ(M6V(GetTriggerPlayer(),Condition(function IUE)),function IYE)
call DestroyGroup(bj_lastCreatedGroup)
endfunction
function I0E takes nothing returns boolean
return(GetUnitLevel(GetTriggerUnit())==1)
endfunction
function I1E takes nothing returns boolean
return(GetUnitStateSwap(UNIT_STATE_MAX_LIFE,GetTriggerUnit())>=3200.)and(GetUnitTypeId(GetTriggerUnit())!='U02H')and(GetUnitTypeId(GetTriggerUnit())!='Ecen')and(GetUnitTypeId(GetTriggerUnit())!='Nman')
endfunction
function I2E takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='N03O')or(I1E())
endfunction
function I3E takes nothing returns boolean
return(I2E())
endfunction
function I4E takes nothing returns nothing
call SetHeroLevelBJ(GetTriggerUnit(),$A,true)
if(I3E())then
call SetHeroLevelBJ(GetTriggerUnit(),$F,true)
endif
endfunction
function I6E takes nothing returns boolean
return(GetPlayerAlliance(GetOwningPlayer(BQV),GetOwningPlayer(GetTriggerUnit()),ALLIANCE_SHARED_ADVANCED_CONTROL)==false)and(GetOwningPlayer(GetTriggerUnit())!=GetOwningPlayer(BQV))and(GetOwningPlayer(GetTriggerUnit())!=Player($F))
endfunction
function I7E takes nothing returns boolean
return(I6E())
endfunction
function I8E takes nothing returns boolean
return(GetUnitLevel(GetTriggerUnit())>1)
endfunction
function I9E takes nothing returns nothing
if(I8E())then
call KillUnit(GetTriggerUnit())
else
call RemoveUnit(GetTriggerUnit())
endif
endfunction
function AEE takes nothing returns boolean
return(GetTriggerPlayer()==GetOwningPlayer(BQV))or(DP[(1+GetPlayerId(GetTriggerPlayer()))])
endfunction
function AXE takes nothing returns boolean
return(AEE())
endfunction
function AOE takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,"Safe guard has been turned on, all units entering Titan palace will die immediately.")
call EnableTrigger(R8)
endfunction
function AIE takes nothing returns boolean
return(GetTriggerPlayer()==GetOwningPlayer(BQV))or(DP[(1+GetPlayerId(GetTriggerPlayer()))])
endfunction
function AAE takes nothing returns boolean
return(AIE())
endfunction
function ANE takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,30,"Safe guard has been turned off, units that enter Titan palace will no longer die.")
call DisableTrigger(R8)
endfunction
function ACE takes nothing returns boolean
return(BI>$C)
endfunction
function ADE takes nothing returns boolean
return(BI<=0)
endfunction
function AFE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),1,6)=="-share")
endfunction
function AGE takes nothing returns boolean
return(BI>$C)
endfunction
function AHE takes nothing returns boolean
return(BI<=0)
endfunction
function AJE takes nothing returns boolean
return(RH[AH]==Player(-1+(BI)))
endfunction
function AKE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),1,8)=="-unshare")
endfunction
function ALE takes nothing returns nothing
if(AFE())then
set BI=S2I(SubStringBJ(GetEventPlayerChatString(),8,$C))
if(ADE())then
return
else
if(ACE())then
return
endif
endif
call SetPlayerAllianceStateBJ(GetTriggerPlayer(),Player(-1+(BI)),5)
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,("Successfully sharing all units with player "+SR[BI]))
endif
if(AKE())then
set BI=S2I(SubStringBJ(GetEventPlayerChatString(),$A,$E))
if(AHE())then
return
else
if(AGE())then
return
endif
endif
set AH=1
loop
exitwhen AH>IH
if(AJE())then
call SetPlayerAllianceStateBJ(GetTriggerPlayer(),RH[AH],5)
else
call SetPlayerAllianceStateBJ(GetTriggerPlayer(),Player(-1+(BI)),3)
endif
set AH=AH+1
endloop
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,("Successfully unsharing all units with player "+SR[BI]))
endif
endfunction
function APE takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,("[Global] |cff"+(RB[(1+GetPlayerId(GetTriggerPlayer()))]+(GetPlayerName(GetTriggerPlayer())+(":|r "+SubStringBJ(GetEventPlayerChatString(),6,'d'))))))
endfunction
function ASE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),1,7)=="-music ")
endfunction
function ATE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),8,$F)=="stop")
endfunction
function AUE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),8,$F)=="1")
endfunction
function AWE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),8,$F)=="2")
endfunction
function AYE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),8,$F)=="3")
endfunction
function AZE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),8,$F)=="4")
endfunction
function A_E takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),8,$F)=="5")
endfunction
function A0E takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),8,$F)=="6")
endfunction
function A1E takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),8,$F)=="7")
endfunction
function A2E takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),8,$F)=="8")
endfunction
function A3E takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),8,$F)=="9")
endfunction
function A4E takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),8,$F)=="10")
endfunction
function A5E takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),8,$F)=="11")
endfunction
function A6E takes nothing returns nothing
if(ATE())then
call StopMusic(false)
endif
if(AUE())then
call PlayMusicBJ(U5)
endif
if(AWE())then
call PlayMusicBJ(M5)
endif
if(AYE())then
call PlayMusicBJ(S5)
endif
if(AZE())then
call PlayMusicBJ(T5)
endif
if(A_E())then
call PlayMusicBJ(P5)
endif
if(A0E())then
call PlayMusicBJ(Q5)
endif
if(A1E())then
call PlayMusicBJ(Y5)
endif
if(A2E())then
call PlayMusicBJ(Z5)
endif
if(A3E())then
call PlayMusicBJ(V6)
endif
if(A4E())then
call PlayMusicBJ(E6)
endif
if(A5E())then
call PlayMusicBJ(W5)
endif
endfunction
function A8E takes nothing returns boolean
return(CountUnitsInGroup(RD)==0)
endfunction
function A9E takes nothing returns nothing
call CreateNUnitsAtLoc(1,'e00D',GetTriggerPlayer(),UN[(1+GetPlayerId(GetTriggerPlayer()))],bj_UNIT_FACING)
set I0[1]='u011'
set I0[2]='u00M'
set I0[3]='u017'
set I0[4]='u00L'
set I0[5]='u020'
set I0[6]='u02L'
set I0[7]='u038'
set I0[8]='u02U'
set I0[9]='u035'
set I0[$A]='u01A'
set I0[$B]='u01B'
set I0[$C]='n04H'
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=$C
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set RD=M8V(GetTriggerPlayer(),I0[bj_forLoopAIndex])
if(A8E())then
call CreateNUnitsAtLoc(1,I0[bj_forLoopAIndex],GetTriggerPlayer(),UN[(1+GetPlayerId(GetTriggerPlayer()))],bj_UNIT_FACING)
endif
call DestroyGroup(RD)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function NEE takes nothing returns boolean
return(GetUnitTypeId(GetTrainedUnit())=='e00K')
endfunction
function NXE takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function NOE takes nothing returns nothing
set RD=M8V(GetOwningPlayer(GetTrainedUnit()),'e00I')
call ForGroupBJ(RD,function NXE)
call DestroyGroup(RD)
endfunction
function NIE takes nothing returns boolean
return(GetOwningPlayer(BQV)==GetTriggerPlayer())
endfunction
function NAE takes nothing returns boolean
return(AD==VB)
endfunction
function NNE takes nothing returns boolean
return(GetOwningPlayer(GetFilterUnit())==VB)
endfunction
function NBE takes nothing returns boolean
return(RectContainsUnit(N4,GetFilterUnit())==false)
endfunction
function NCE takes nothing returns boolean
return GetBooleanAnd(NNE(),NBE())
endfunction
function NDE takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())!='n005')and(GetUnitAbilityLevelSwapped('A0II',GetEnumUnit())==0)
endfunction
function NFE takes nothing returns boolean
return(NDE())
endfunction
function NGE takes nothing returns nothing
if(NFE())then
call SetUnitOwner(GetEnumUnit(),AD,true)
endif
endfunction
function NHE takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),AD,false)
endfunction
function NJE takes nothing returns boolean
return(AD==RH[AH])
endfunction
function NKE takes nothing returns boolean
return(IsPlayerInForce(AD,RF)!=true)
endfunction
function NLE takes nothing returns boolean
return(RH[AH]!=Player($F))
endfunction
function NME takes nothing returns boolean
return(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)
endfunction
function NPE takes nothing returns nothing
call TriggerSleepAction(1.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=$C
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(NME())then
set VB=GetOwningPlayer(BQV)
set AD=Player(-1+(bj_forLoopAIndex))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,(("|cffffcc00"+SR[(1+GetPlayerId(VB))])+" (The Titan) has left the game.|r"))
if(NAE())then
return
endif
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,(("|cffffcc00"+SR[(1+GetPlayerId(AD))])+" is now the new Titan.|r"))
call ForGroupBJ(MWV(R4,Condition(function NCE)),function NGE)
call DestroyGroup(bj_lastCreatedGroup)
call ForGroupBJ(M_V(N4,VB),function NHE)
call DestroyGroup(bj_lastCreatedGroup)
call SetUnitOwner(OO,AD,true)
call TriggerRegisterPlayerEventLeave(GetTriggeringTrigger(),AD)
set AH=1
loop
exitwhen AH>IH
if(NJE())then
return
endif
set AH=AH+1
endloop
if(NKE())then
call TriggerRegisterPlayerChatEvent(E8,AD,"-delete",false)
call TriggerRegisterPlayerChatEvent(A8,AD,"-safe off",true)
call TriggerRegisterPlayerChatEvent(I8,AD,"-safe on",true)
call TriggerRegisterPlayerChatEvent(ECV,AD,"-End of Time",true)
call TriggerRegisterPlayerChatEvent(E3V,AD,"-mind",true)
call TriggerRegisterPlayerChatEvent(S6,AD,"-masterswitch",true)
call TriggerRegisterPlayerChatEvent(C8,AD,"-music ",false)
call TriggerRegisterPlayerChatEvent(VSV,AD,"-Summon Cosmosis",true)
call TriggerRegisterPlayerChatEvent(V7,AD,"-kick",false)
call TriggerRegisterPlayerChatEvent(H8,AD,"-titan",false)
endif
set AH=1
loop
exitwhen AH>IH
if(NLE())then
call SetPlayerAllianceStateBJ(AD,RH[AH],5)
endif
set AH=AH+1
endloop
call ForceAddPlayer(RF,AD)
return
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function NSE takes nothing returns boolean
return(GetTriggerPlayer()==AD)or(DP[(1+GetPlayerId(GetTriggerPlayer()))])
endfunction
function NTE takes nothing returns boolean
return(NSE())
endfunction
function NUE takes nothing returns boolean
return(S2I(SubStringBJ(GetEventPlayerChatString(),7,$A))>0)and(S2I(SubStringBJ(GetEventPlayerChatString(),7,$A))<$D)
endfunction
function NWE takes nothing returns boolean
return(NUE())
endfunction
function NYE takes nothing returns boolean
return(AD==VB)
endfunction
function NZE takes nothing returns boolean
return(GetTriggerPlayer()==RH[AH])
endfunction
function N_E takes nothing returns boolean
return(GetOwningPlayer(GetFilterUnit())==VB)
endfunction
function N0E takes nothing returns boolean
return(RectContainsUnit(N4,GetFilterUnit())==false)
endfunction
function N1E takes nothing returns boolean
return GetBooleanAnd(N_E(),N0E())
endfunction
function N2E takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())!='n005')and(GetUnitAbilityLevelSwapped('A0II',GetEnumUnit())==0)
endfunction
function N3E takes nothing returns boolean
return(N2E())
endfunction
function N4E takes nothing returns nothing
if(N3E())then
call SetUnitOwner(GetEnumUnit(),AD,true)
endif
endfunction
function N5E takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),AD,false)
endfunction
function N6E takes nothing returns boolean
return(AD==RH[AH])
endfunction
function N7E takes nothing returns boolean
return(IsPlayerInForce(AD,RF)!=true)
endfunction
function N8E takes nothing returns boolean
return(RH[AH]!=Player($F))
endfunction
function N9E takes nothing returns nothing
if(NWE())then
else
return
endif
set AD=Player(-1+(S2I(SubStringBJ(GetEventPlayerChatString(),7,$A))))
set VB=GetOwningPlayer(BQV)
if(NYE())then
return
endif
set AH=1
loop
exitwhen AH>IH
if(NZE())then
call SetPlayerAllianceStateBJ(GetOwningPlayer(BQV),RH[AH],3)
endif
set AH=AH+1
endloop
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,(("|cffffcc00"+SR[(1+GetPlayerId(AD))])+" is now the new Titan.|r"))
call ForGroupBJ(MWV(R4,Condition(function N1E)),function N4E)
call DestroyGroup(bj_lastCreatedGroup)
call ForGroupBJ(M_V(N4,VB),function N5E)
call DestroyGroup(bj_lastCreatedGroup)
call SetUnitOwner(OO,AD,true)
call TriggerRegisterPlayerEventLeave(G8,AD)
set AH=1
loop
exitwhen AH>IH
if(N6E())then
return
endif
set AH=AH+1
endloop
if(N7E())then
call TriggerRegisterPlayerChatEvent(E8,AD,"-delete",false)
call TriggerRegisterPlayerChatEvent(A8,AD,"-safe off",true)
call TriggerRegisterPlayerChatEvent(I8,AD,"-safe on",true)
call TriggerRegisterPlayerChatEvent(ECV,AD,"-End of Time",true)
call TriggerRegisterPlayerChatEvent(E3V,AD,"-mind",true)
call TriggerRegisterPlayerChatEvent(S6,AD,"-masterswitch",true)
call TriggerRegisterPlayerChatEvent(C8,AD,"-music ",false)
call TriggerRegisterPlayerChatEvent(VSV,AD,"-Summon Cosmosis",true)
call TriggerRegisterPlayerChatEvent(V7,AD,"-kick",false)
call TriggerRegisterPlayerChatEvent(GetTriggeringTrigger(),AD,"-titan",false)
endif
set AH=1
loop
exitwhen AH>IH
if(N8E())then
call SetPlayerAllianceStateBJ(AD,RH[AH],5)
endif
set AH=AH+1
endloop
call ForceAddPlayer(RF,AD)
endfunction
function BEE takes nothing returns boolean
return(BD[(1+GetPlayerId(GetTriggerPlayer()))]>360)
endfunction
function BXE takes nothing returns nothing
set BD[(1+GetPlayerId(GetTriggerPlayer()))]=S2I(SubStringBJ(GetEventPlayerChatString(),3,8))
if(BEE())then
set BD[(1+GetPlayerId(GetTriggerPlayer()))]=360
endif
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),5.,("SFVal = "+I2S(BD[(1+GetPlayerId(GetTriggerPlayer()))])))
endfunction
function BRE takes nothing returns nothing
set OJ[(1+GetPlayerId(GetTriggerPlayer()))]=SubStringBJ(GetEventPlayerChatString(),7,99)
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),5.,("Animation = "+OJ[(1+GetPlayerId(GetTriggerPlayer()))]))
endfunction
function BAE takes nothing returns boolean
return(CD[(1+GetPlayerId(GetTriggerPlayer()))]>500)
endfunction
function BNE takes nothing returns nothing
set CD[(1+GetPlayerId(GetTriggerPlayer()))]=S2I(SubStringBJ(GetEventPlayerChatString(),6,$A))
if(BAE())then
set CD[(1+GetPlayerId(GetTriggerPlayer()))]=500
endif
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),5.,("SOUVal = "+I2S(CD[(1+GetPlayerId(GetTriggerPlayer()))])))
endfunction
function BCE takes nothing returns boolean
return(VF[(1+GetPlayerId(GetTriggerPlayer()))]>'d')
endfunction
function BDE takes nothing returns boolean
return(EF[(1+GetPlayerId(GetTriggerPlayer()))]>'d')
endfunction
function BFE takes nothing returns boolean
return(XF[(1+GetPlayerId(GetTriggerPlayer()))]>'d')
endfunction
function BGE takes nothing returns nothing
call QZV(GetEventPlayerChatString()," ",5)
set VF[(1+GetPlayerId(GetTriggerPlayer()))]=S2I(DD[1])
set EF[(1+GetPlayerId(GetTriggerPlayer()))]=S2I(DD[2])
set XF[(1+GetPlayerId(GetTriggerPlayer()))]=S2I(DD[3])
if(BCE())then
set VF[(1+GetPlayerId(GetTriggerPlayer()))]='d'
endif
if(BDE())then
set EF[(1+GetPlayerId(GetTriggerPlayer()))]='d'
endif
if(BFE())then
set XF[(1+GetPlayerId(GetTriggerPlayer()))]='d'
endif
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),5.,("RGB = "+(I2S(VF[(1+GetPlayerId(GetTriggerPlayer()))])+(" "+(I2S(EF[(1+GetPlayerId(GetTriggerPlayer()))])+(" "+I2S(XF[(1+GetPlayerId(GetTriggerPlayer()))])))))))
endfunction
function BJE takes nothing returns boolean
return(OF[(1+GetPlayerId(GetTriggerPlayer()))]>'d')
endfunction
function BKE takes nothing returns nothing
set OF[(1+GetPlayerId(GetTriggerPlayer()))]=S2I(SubStringBJ(GetEventPlayerChatString(),7,$A))
if(BJE())then
set OF[(1+GetPlayerId(GetTriggerPlayer()))]=0
endif
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),5.,("RGBA = "+I2S(OF[(1+GetPlayerId(GetTriggerPlayer()))])))
endfunction
function BME takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),6,25)=="loop")
endfunction
function BPE takes nothing returns boolean
return(RP[(1+GetPlayerId(GetTriggerPlayer()))]<1)
endfunction
function BQE takes nothing returns nothing
if(BME())then
set RP[(1+GetPlayerId(GetTriggerPlayer()))]=$3B9ACA00
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),5.,"Anim Int set to permanent loop.")
return
endif
set RP[(1+GetPlayerId(GetTriggerPlayer()))]=S2I(SubStringBJ(GetEventPlayerChatString(),6,25))
if(BPE())then
set RP[(1+GetPlayerId(GetTriggerPlayer()))]=1
endif
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),5.,("Anim Int = "+I2S(RP[(1+GetPlayerId(GetTriggerPlayer()))])))
endfunction
function BTE takes nothing returns boolean
return(IP[(1+GetPlayerId(GetTriggerPlayer()))]<10.)
endfunction
function BUE takes nothing returns nothing
set IP[(1+GetPlayerId(GetTriggerPlayer()))]=S2R(SubStringBJ(GetEventPlayerChatString(),8,$F))
if(BTE())then
set IP[(1+GetPlayerId(GetTriggerPlayer()))]=10.
endif
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),5.,("Animation Delay = "+(I2S(R2I(IP[(1+GetPlayerId(GetTriggerPlayer()))]))+" ms")))
set IP[(1+GetPlayerId(GetTriggerPlayer()))]=(IP[(1+GetPlayerId(GetTriggerPlayer()))]/ 1000.)
endfunction
function BYE takes nothing returns nothing
set UM[(1+GetPlayerId(GetTriggerPlayer()))]=S2I(SubStringBJ(GetEventPlayerChatString(),3,$A))
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),5.,("Height = "+I2S(UM[(1+GetPlayerId(GetTriggerPlayer()))])))
endfunction
function B_E takes nothing returns boolean
return(XP[(1+GetPlayerId(GetTriggerPlayer()))]<$3E8)
endfunction
function B0E takes nothing returns nothing
set XP[(1+GetPlayerId(GetTriggerPlayer()))]=S2I(SubStringBJ(GetEventPlayerChatString(),6,$A))
if(B_E())then
set XP[(1+GetPlayerId(GetTriggerPlayer()))]='d'
endif
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),5.,("Zooming camera to distance: "+I2S(XP[(1+GetPlayerId(GetTriggerPlayer()))])))
call SetCameraFieldForPlayer(GetTriggerPlayer(),CAMERA_FIELD_TARGET_DISTANCE,I2R(XP[(1+GetPlayerId(GetTriggerPlayer()))]),1.)
endfunction
function B2E takes nothing returns boolean
return(IsUnitInGroup(HO,XR)==false)
endfunction
function B3E takes nothing returns boolean
return(IsUnitInGroup(XI,XR)==false)
endfunction
function B4E takes nothing returns nothing
call AdjustPlayerStateBJ(500,GetEnumPlayer(),PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ($FA,GetEnumPlayer(),PLAYER_STATE_RESOURCE_LUMBER)
call AdjustPlayerStateBJ(500,Player($C),PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ(500,Player($F),PLAYER_STATE_RESOURCE_GOLD)
call AdjustPlayerStateBJ($FA,Player($C),PLAYER_STATE_RESOURCE_LUMBER)
call AdjustPlayerStateBJ($FA,Player($F),PLAYER_STATE_RESOURCE_LUMBER)
endfunction
function B5E takes nothing returns boolean
return(ZR==null)
endfunction
function B6E takes nothing returns boolean
return(FO==null)
endfunction
function B7E takes nothing returns boolean
return(UnitHasBuffBJ(GetFilterUnit(),'B00P'))
endfunction
function B8E takes nothing returns nothing
call IssueImmediateOrderById(GetEnumUnit(),$D00C4)
endfunction
function B9E takes nothing returns boolean
return(UnitHasBuffBJ(GetFilterUnit(),'B00Q'))
endfunction
function CVE takes nothing returns boolean
return(IsUnitType(GetEnumUnit(),UNIT_TYPE_UNDEAD)==false)!=null
endfunction
function CEE takes nothing returns nothing
if(CVE())then
call UnitDamageTargetBJ(II,GetEnumUnit(),1.5,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_DISEASE)
endif
endfunction
function CXE takes nothing returns boolean
return(UnitHasBuffBJ(II,'B00R'))
endfunction
function COE takes nothing returns nothing
if(B2E())then
call SetUnitVertexColorBJ(HO,'d','d',60.,0)
endif
if(B3E())then
call SetUnitVertexColorBJ(XI,40.,40.,40.,0)
endif
call ForForce(bj_FORCE_ALL_PLAYERS,function B4E)
if(B5E())then
call UnitAddAbility(DR,'A024')
else
call UnitRemoveAbility(DR,'A024')
endif
if(B6E())then
call UnitAddAbility(DR,'A025')
else
call UnitRemoveAbility(DR,'A025')
endif
set WX=GetUnitLoc(II)
set GX=MWV(bj_mapInitialPlayableArea,Condition(function B7E))
set TR=CountUnitsInGroup(GX)
set RR=1
loop
exitwhen RR>TR
set TO=GroupPickRandomUnit(GX)
call GroupRemoveUnit(GX,TO)
set PX=GetUnitLoc(TO)
call UnitApplyTimedLifeBJ(.1,'BHwe',bj_lastCreatedUnit)
set YO=MJV(WX,(DistanceBetweenPoints(WX,PX)+400.),GetUnitFacing(bj_lastCreatedUnit))
call IssuePointOrderByIdLoc(TO,$D0012,YO)
call RemoveLocation(PX)
call RemoveLocation(YO)
set RR=RR+1
endloop
call DestroyGroup(GX)
call RemoveLocation(WX)
set OR=M4V('o00D')
call ForGroupBJ(OR,function B8E)
call DestroyGroup(OR)
set KR=MWV(bj_mapInitialPlayableArea,Condition(function B9E))
call ForGroupBJ(KR,function CEE)
call DestroyGroup(KR)
if(CXE())then
set HR=GetUnitLoc(II)
call UnitApplyTimedLifeBJ(30.,'BHwe',bj_lastCreatedUnit)
call RemoveLocation(HR)
endif
endfunction
function CIE takes nothing returns nothing
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(SR[(1+GetPlayerId(GetTriggerPlayer()))]+" has left the game. His/Her Kingdom is free to attack"))
endfunction
function CNE takes nothing returns nothing
call SetPlayerAllianceStateBJ(GetTriggerPlayer(),GetEnumPlayer(),2)
endfunction
function CBE takes nothing returns boolean
return(RH[AH]!=Player($F))
endfunction
function CCE takes nothing returns boolean
return(GetTriggerPlayer()==AD)
endfunction
function CDE takes nothing returns nothing
call ForForce(bj_FORCE_ALL_PLAYERS,function CNE)
if(CCE())then
set IH=1
set AH=1
loop
exitwhen AH>IH
if(CBE())then
call SetPlayerAllianceStateBJ(GetTriggerPlayer(),RH[AH],5)
endif
set AH=AH+1
endloop
endif
endfunction
function CGE takes nothing returns nothing
call SetPlayerAllianceStateBJ(GetTriggerPlayer(),GetEnumPlayer(),0)
endfunction
function CHE takes nothing returns nothing
call ForForce(bj_FORCE_ALL_PLAYERS,function CGE)
endfunction
function CKE takes nothing returns boolean
return(S2I(SubStringBJ(GetEventPlayerChatString(),6,$A))>0)and(S2I(SubStringBJ(GetEventPlayerChatString(),6,$A))<17)
endfunction
function CLE takes nothing returns boolean
return(CKE())
endfunction
function CME takes nothing returns boolean
return(RH[AH]==Player(-1+(ND)))and(GetTriggerPlayer()==AD)
endfunction
function CPE takes nothing returns boolean
return(CME())
endfunction
function CQE takes nothing returns nothing
if(CLE())then
else
return
endif
set ND=S2I(SubStringBJ(GetEventPlayerChatString(),7,$A))
call SetPlayerAllianceStateBJ(GetTriggerPlayer(),Player(-1+(ND)),2)
set AH=1
loop
exitwhen AH>IH
if(CPE())then
call SetPlayerAllianceStateBJ(GetTriggerPlayer(),RH[AH],5)
endif
set AH=AH+1
endloop
endfunction
function CTE takes nothing returns boolean
return(S2I(SubStringBJ(GetEventPlayerChatString(),8,$C))>0)and(S2I(SubStringBJ(GetEventPlayerChatString(),8,$C))<17)
endfunction
function CUE takes nothing returns boolean
return(CTE())
endfunction
function CWE takes nothing returns nothing
if(CUE())then
else
return
endif
set ND=S2I(SubStringBJ(GetEventPlayerChatString(),9,$D))
call SetPlayerAllianceStateBJ(GetTriggerPlayer(),Player(-1+(ND)),0)
endfunction
function CZE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),1,5)=="-name")
endfunction
function C_E takes nothing returns nothing
call SetPlayerName(GetTriggerPlayer(),SubStringBJ(GetEventPlayerChatString(),7,50))
endfunction
function C1E takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),1,4)=="-val")
endfunction
function C2E takes nothing returns boolean
return(CI[(1+GetPlayerId(GetTriggerPlayer()))]<=0)
endfunction
function C3E takes nothing returns boolean
return(CI[(1+GetPlayerId(GetTriggerPlayer()))]>$A)
endfunction
function C4E takes nothing returns nothing
set CI[(1+GetPlayerId(GetTriggerPlayer()))]=S2I(SubStringBJ(GetEventPlayerChatString(),6,9))
if(C2E())then
set CI[(1+GetPlayerId(GetTriggerPlayer()))]=1
endif
if(C3E())then
set CI[(1+GetPlayerId(GetTriggerPlayer()))]=$A
endif
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),5.,("Val = "+I2S(CI[(1+GetPlayerId(GetTriggerPlayer()))])))
endfunction
function C6E takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),1,5)=="-tval")
endfunction
function C7E takes nothing returns boolean
return(CI[(1+GetPlayerId(AD))]<=0)
endfunction
function C8E takes nothing returns boolean
return(CI[(1+GetPlayerId(AD))]>$A)
endfunction
function C9E takes nothing returns nothing
set CI[(1+GetPlayerId(AD))]=S2I(SubStringBJ(GetEventPlayerChatString(),7,$A))
if(C7E())then
set CI[(1+GetPlayerId(AD))]=1
endif
if(C8E())then
set CI[(1+GetPlayerId(AD))]=$A
endif
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),5.,("TVal = "+I2S(CI[(1+GetPlayerId(AD))])))
endfunction
function DEE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),1,5)=="-real")
endfunction
function DXE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),7,9)=="red")
endfunction
function DOE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),7,$A)=="blue")
endfunction
function DRE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),7,$A)=="teal")
endfunction
function DIE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),7,$C)=="purple")
endfunction
function DAE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),7,$C)=="yellow")
endfunction
function DNE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),7,$C)=="orange")
endfunction
function DBE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),7,$B)=="green")
endfunction
function DCE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),7,$A)=="pink")or(SubStringBJ(GetEventPlayerChatString(),7,$A)=="black")
endfunction
function DDE takes nothing returns boolean
return(DCE())
endfunction
function DFE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),7,$A)=="gray")
endfunction
function DGE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),7,16)=="light blue")
endfunction
function DHE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),7,16)=="dark green")
endfunction
function DJE takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),7,$B)=="brown")
endfunction
function DKE takes nothing returns nothing
if(DXE())then
call DisplayTextToForce(PVV(GetTriggerPlayer()),("This player's real name is : "+SR[1]))
endif
if(DOE())then
call DisplayTextToForce(PVV(GetTriggerPlayer()),("This player's real name is : "+SR[2]))
endif
if(DRE())then
call DisplayTextToForce(PVV(GetTriggerPlayer()),("This player's real name is : "+SR[3]))
endif
if(DIE())then
call DisplayTextToForce(PVV(GetTriggerPlayer()),("This player's real name is : "+SR[4]))
endif
if(DAE())then
call DisplayTextToForce(PVV(GetTriggerPlayer()),("This player's real name is : "+SR[5]))
endif
if(DNE())then
call DisplayTextToForce(PVV(GetTriggerPlayer()),("This player's real name is : "+SR[6]))
endif
if(DBE())then
call DisplayTextToForce(PVV(GetTriggerPlayer()),("This player's real name is : "+SR[7]))
endif
if(DDE())then
call DisplayTextToForce(PVV(GetTriggerPlayer()),("This player's real name is : "+SR[8]))
endif
if(DFE())then
call DisplayTextToForce(PVV(GetTriggerPlayer()),("This player's real name is : "+SR[9]))
endif
if(DGE())then
call DisplayTextToForce(PVV(GetTriggerPlayer()),("This player's real name is : "+SR[$A]))
endif
if(DHE())then
call DisplayTextToForce(PVV(GetTriggerPlayer()),("This player's real name is : "+SR[$B]))
endif
if(DJE())then
call DisplayTextToForce(PVV(GetTriggerPlayer()),("This player's real name is : "+SR[$C]))
endif
endfunction
function DME takes nothing returns boolean
return(GetUnitTypeId(GetConstructedStructure())=='h02D')
endfunction
function DPE takes nothing returns nothing
call RemoveLocation(UN[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])
set UN[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=GetUnitLoc(GetConstructedStructure())
endfunction
function DSE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())!='H00O')and(GetUnitTypeId(GetTriggerUnit())!='H00M')and(GetUnitAbilityLevelSwapped('A0II',GetTriggerUnit())==0)
endfunction
function DTE takes nothing returns boolean
return(DSE())
endfunction
function DUE takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),Player(0),true)
endfunction
function DWE takes nothing returns boolean
return(GetEnteringUnit()==LE)
endfunction
function DYE takes nothing returns nothing
set VR=UN[1]
call SetUnitPositionLoc(GetEnteringUnit(),VR)
call SetUnitOwner(GetEnteringUnit(),Player(0),true)
if(DWE())then
call ForGroupBJ(XR,function DUE)
endif
endfunction
function D_E takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())!='H00O')and(GetUnitTypeId(GetTriggerUnit())!='H00M')and(GetUnitAbilityLevelSwapped('A0II',GetTriggerUnit())==0)
endfunction
function D0E takes nothing returns boolean
return(D_E())
endfunction
function D1E takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),Player(1),true)
endfunction
function D2E takes nothing returns boolean
return(GetEnteringUnit()==LE)
endfunction
function D3E takes nothing returns nothing
set VR=UN[2]
call SetUnitPositionLoc(GetEnteringUnit(),VR)
call SetUnitOwner(GetEnteringUnit(),Player(1),true)
if(D2E())then
call ForGroupBJ(XR,function D1E)
endif
endfunction
function D5E takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())!='H00O')and(GetUnitTypeId(GetTriggerUnit())!='H00M')and(GetUnitAbilityLevelSwapped('A0II',GetTriggerUnit())==0)
endfunction
function D6E takes nothing returns boolean
return(D5E())
endfunction
function D7E takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),Player(2),true)
endfunction
function D8E takes nothing returns boolean
return(GetEnteringUnit()==LE)
endfunction
function D9E takes nothing returns nothing
set VR=UN[3]
call SetUnitPositionLoc(GetEnteringUnit(),VR)
call SetUnitOwner(GetEnteringUnit(),Player(2),true)
if(D8E())then
call ForGroupBJ(XR,function D7E)
endif
endfunction
function FEE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())!='H00O')and(GetUnitTypeId(GetTriggerUnit())!='H00M')and(GetUnitAbilityLevelSwapped('A0II',GetTriggerUnit())==0)
endfunction
function FXE takes nothing returns boolean
return(FEE())
endfunction
function FOE takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),Player(3),true)
endfunction
function FRE takes nothing returns boolean
return(GetEnteringUnit()==LE)
endfunction
function FIE takes nothing returns nothing
set VR=UN[4]
call SetUnitPositionLoc(GetEnteringUnit(),VR)
call SetUnitOwner(GetEnteringUnit(),Player(3),true)
if(FRE())then
call ForGroupBJ(XR,function FOE)
endif
endfunction
function FNE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())!='H00O')and(GetUnitTypeId(GetTriggerUnit())!='H00M')and(GetUnitAbilityLevelSwapped('A0II',GetTriggerUnit())==0)
endfunction
function FBE takes nothing returns boolean
return(FNE())
endfunction
function FCE takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),Player(4),true)
endfunction
function FDE takes nothing returns boolean
return(GetEnteringUnit()==LE)
endfunction
function FFE takes nothing returns nothing
set VR=UN[5]
call SetUnitPositionLoc(GetEnteringUnit(),VR)
call SetUnitOwner(GetEnteringUnit(),Player(4),true)
if(FDE())then
call ForGroupBJ(XR,function FCE)
endif
endfunction
function FHE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())!='H00O')and(GetUnitTypeId(GetTriggerUnit())!='H00M')and(GetUnitAbilityLevelSwapped('A0II',GetTriggerUnit())==0)
endfunction
function FJE takes nothing returns boolean
return(FHE())
endfunction
function FKE takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),Player(5),true)
endfunction
function FLE takes nothing returns boolean
return(GetEnteringUnit()==LE)
endfunction
function FME takes nothing returns nothing
set VR=UN[6]
call SetUnitPositionLoc(GetEnteringUnit(),VR)
call SetUnitOwner(GetEnteringUnit(),Player(5),true)
if(FLE())then
call ForGroupBJ(XR,function FKE)
endif
endfunction
function FQE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())!='H00O')and(GetUnitTypeId(GetTriggerUnit())!='H00M')and(GetUnitAbilityLevelSwapped('A0II',GetTriggerUnit())==0)
endfunction
function FSE takes nothing returns boolean
return(FQE())
endfunction
function FTE takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),Player(6),true)
endfunction
function FUE takes nothing returns boolean
return(GetEnteringUnit()==LE)
endfunction
function FWE takes nothing returns nothing
set VR=UN[7]
call SetUnitPositionLoc(GetEnteringUnit(),VR)
call SetUnitOwner(GetEnteringUnit(),Player(6),true)
if(FUE())then
call ForGroupBJ(XR,function FTE)
endif
endfunction
function FZE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())!='H00O')and(GetUnitTypeId(GetTriggerUnit())!='H00M')and(GetUnitAbilityLevelSwapped('A0II',GetTriggerUnit())==0)
endfunction
function F_E takes nothing returns boolean
return(FZE())
endfunction
function F0E takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),Player(7),true)
endfunction
function F1E takes nothing returns boolean
return(GetEnteringUnit()==LE)
endfunction
function F2E takes nothing returns nothing
set VR=UN[8]
call SetUnitPositionLoc(GetEnteringUnit(),VR)
call SetUnitOwner(GetEnteringUnit(),Player(7),true)
if(F1E())then
call ForGroupBJ(XR,function F0E)
endif
endfunction
function F4E takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())!='H00O')and(GetUnitTypeId(GetTriggerUnit())!='H00M')and(GetUnitAbilityLevelSwapped('A0II',GetTriggerUnit())==0)
endfunction
function F5E takes nothing returns boolean
return(F4E())
endfunction
function F6E takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),Player(8),true)
endfunction
function F7E takes nothing returns boolean
return(GetEnteringUnit()==LE)
endfunction
function F8E takes nothing returns nothing
set VR=UN[9]
call SetUnitPositionLoc(GetEnteringUnit(),VR)
call SetUnitOwner(GetEnteringUnit(),Player(8),true)
if(F7E())then
call ForGroupBJ(XR,function F6E)
endif
endfunction
function GVE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())!='H00O')and(GetUnitTypeId(GetTriggerUnit())!='H00M')and(GetUnitAbilityLevelSwapped('A0II',GetTriggerUnit())==0)
endfunction
function GEE takes nothing returns boolean
return(GVE())
endfunction
function GXE takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),Player(9),true)
endfunction
function GOE takes nothing returns boolean
return(GetEnteringUnit()==LE)
endfunction
function GRE takes nothing returns nothing
set VR=UN[$A]
call SetUnitPositionLoc(GetEnteringUnit(),VR)
call SetUnitOwner(GetEnteringUnit(),Player(9),true)
if(GOE())then
call ForGroupBJ(XR,function GXE)
endif
endfunction
function GAE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())!='H00O')and(GetUnitTypeId(GetTriggerUnit())!='H00M')and(GetUnitAbilityLevelSwapped('A0II',GetTriggerUnit())==0)
endfunction
function GNE takes nothing returns boolean
return(GAE())
endfunction
function GBE takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),Player($A),true)
endfunction
function GCE takes nothing returns boolean
return(GetEnteringUnit()==LE)
endfunction
function GDE takes nothing returns nothing
set VR=UN[$B]
call SetUnitPositionLoc(GetEnteringUnit(),VR)
call SetUnitOwner(GetEnteringUnit(),Player($A),true)
if(GCE())then
call ForGroupBJ(XR,function GBE)
endif
endfunction
function GGE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())!='H00O')and(GetUnitTypeId(GetTriggerUnit())!='H00M')and(GetUnitAbilityLevelSwapped('A0II',GetTriggerUnit())==0)
endfunction
function GHE takes nothing returns boolean
return(GGE())
endfunction
function GJE takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),Player($B),true)
endfunction
function GKE takes nothing returns boolean
return(GetEnteringUnit()==LE)
endfunction
function GLE takes nothing returns nothing
set VR=UN[$C]
call SetUnitPositionLoc(GetEnteringUnit(),VR)
call SetUnitOwner(GetEnteringUnit(),Player($B),true)
if(GKE())then
call ForGroupBJ(XR,function GJE)
endif
endfunction
function GPE takes nothing returns boolean
return(GetTriggerPlayer()==GetOwningPlayer(BQV))or(DP[(1+GetPlayerId(GetTriggerPlayer()))])
endfunction
function GQE takes nothing returns boolean
return(GPE())
endfunction
function GSE takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='H00M')
endfunction
function GTE takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())=='H00O')
endfunction
function GUE takes nothing returns boolean
return GetBooleanOr(GSE(),GTE())
endfunction
function GWE takes nothing returns boolean
return(CountUnitsInGroup(RD)!=0)
endfunction
function GYE takes nothing returns nothing
set RD=MWV(bj_mapInitialPlayableArea,Condition(function GUE))
if(GWE())then
call DestroyGroup(RD)
return
endif
set VR=GetRectCenter(L3)
call CreateNUnitsAtLoc(1,'H00M',AD,VR,315.)
set OO=bj_lastCreatedUnit
call SetHeroLevelBJ(OO,999,false)
call UnitAddItemByIdSwapped('I00D',OO)
call RemoveLocation(VR)
call DestroyGroup(RD)
endfunction
function G_E takes nothing returns real
return .1
endfunction
function G0E takes unit u returns boolean
return GetUnitAbilityLevel(u,'Aloc')==0
endfunction
function G1E takes nothing returns boolean
local unit G2E=NC
local unit G3E=BC
local real G4E=AC
set NC=GetTriggerUnit()
set BC=GetEventDamageSource()
set AC=GetEventDamage()
set IC=1.
set IC=.0
set NC=G2E
set BC=G3E
set AC=G4E
set G2E=null
set G3E=null
return false
endfunction
function G5E takes nothing returns boolean
if(IsUnitInGroup(GetFilterUnit(),GC))then
call GroupRemoveUnit(GC,GetFilterUnit())
elseif(G0E(GetFilterUnit()))then
set DC[0]=DC[0]+1
set FC[DC[0]]=GetFilterUnit()
set CC[DC[0]]=CreateTrigger()
call TriggerRegisterUnitEvent(CC[DC[0]],FC[DC[0]],EVENT_UNIT_DAMAGED)
call TriggerAddCondition(CC[DC[0]],Condition(function G1E))
endif
return false
endfunction
function G6E takes nothing returns nothing
local group g=CreateGroup()
local integer i=0
loop
call GroupEnumUnitsOfPlayer(g,Player(i),Condition(function G5E))
set i=i+1
exitwhen i==16
endloop
call DestroyGroup(g)
set g=null
endfunction
function G7E takes nothing returns nothing
if(bj_slotControlUsed[5063])then
call GroupClear(GC)
set bj_slotControlUsed[5063]=false
endif
call GroupAddUnit(GC,GetEnumUnit())
endfunction
function G8E takes nothing returns nothing
if(DC[0]<=0)then
return
elseif(DC[1]<=0)then
set DC[1]=DC[0]
endif
if(GetUnitTypeId(FC[DC[1]])==0)then
call DestroyTrigger(CC[DC[1]])
set CC[DC[1]]=null
set CC[DC[1]]=CC[DC[0]]
set FC[DC[1]]=FC[DC[0]]
set FC[DC[0]]=null
set DC[0]=DC[0]-1
endif
set DC[1]=DC[1]-1
endfunction
function G9E takes nothing returns boolean
local boolean HVE=bj_slotControlUsed[5063]
if(DC[2]<64)then
set DC[2]=DC[2]+1
else
set bj_slotControlUsed[5063]=true
call ForGroup(GC,function G7E)
set DC[2]=0
endif
call GroupAddUnit(GC,GetFilterUnit())
set bj_slotControlUsed[5063]=HVE
return false
endfunction
function HXE takes nothing returns boolean
return(MB[FB]==0)
endfunction
function HOE takes nothing returns boolean
return(GetUnitUserData(GB[FB])==0)
endfunction
function HRE takes nothing returns boolean
return(SB==$F)
endfunction
function HIE takes nothing returns boolean
return(QB==0)
endfunction
function HAE takes nothing returns boolean
return(LB)and(GetUnitUserData(GetFilterUnit())==0)
endfunction
function HNE takes nothing returns nothing
call ExecuteFunc("HBE")
endfunction
function HCE takes nothing returns nothing
if(HOE())then
set MB[FB]=(MB[FB]-1)
if(HXE())then
set JB[PB[FB]]=JB[FB]
set PB[JB[FB]]=PB[FB]
set PB[FB]=0
set KB=.0
set KB=2.
set KB=.0
set GB[FB]=null
set JB[FB]=QB
set QB=FB
endif
endif
endfunction
function HDE takes nothing returns boolean
local integer HFE=FB
local integer HGE
if(HAE())then
set SB=(SB+1)
if(HRE())then
set SB=0
set FB=JB[0]
loop
exitwhen FB==0
set HGE=JB[FB]
call HCE()
set FB=HGE
endloop
endif
if(HIE())then
set FB=(TB+1)
set TB=FB
else
set FB=QB
set QB=JB[FB]
endif
set GB[FB]=GetFilterUnit()
call SetUnitUserData(GB[FB],FB)
set PB[JB[0]]=FB
set JB[FB]=JB[0]
set JB[0]=FB
set MB[FB]=1
set KB=.0
set KB=1.
set KB=.0
set FB=HFE
endif
return false
endfunction
function HBE takes nothing returns nothing
local integer i=16
local boolexpr b=Filter(function HDE)
local region re=CreateRegion()
local trigger t=GetTriggeringTrigger()
local rect r=GetWorldBounds()
call RegionAddRect(re,r)
call TriggerRegisterEnterRegion(t,re,b)
call TriggerClearActions(t)
call TriggerAddAction(t,function HCE)
set LB=true
loop
set i=i-1
call GroupEnumUnitsOfPlayer(bj_lastCreatedGroup,Player(i),b)
exitwhen i==0
endloop
call RemoveRect(r)
set re=null
set r=null
set t=null
set b=null
set KB=3.
set KB=.0
endfunction
function HJE takes nothing returns boolean
return(GetUnitCurrentOrder(UP)==$D0032)
endfunction
function HKE takes nothing returns boolean
return(GetDestructableLife(ZP)>.0)
endfunction
function HLE takes nothing returns nothing
set ZP=GetEnumDestructable()
if(HKE())then
call IssueTargetOrderById(UP,$D0032,ZP)
if(HJE())then
call KillDestructable(ZP)
endif
endif
endfunction
function HME takes nothing returns boolean
return(VQ[WP[2]])
endfunction
function HPE takes nothing returns boolean
return(WP[0]==0)
endfunction
function HQE takes nothing returns boolean
return(OQ[WP[2]]==false)
endfunction
function HSE takes nothing returns boolean
return(true)
endfunction
function HTE takes nothing returns boolean
return(BQ[WP[2]]<=CQ[WP[2]])
endfunction
function HUE takes nothing returns boolean
return(OQ[WP[2]])
endfunction
function HWE takes nothing returns boolean
return(WP[0]==0)
endfunction
function HYE takes nothing returns boolean
return(PP!="")
endfunction
function HZE takes nothing returns nothing
set SP=32.
set TP=GetRectCenter(bj_mapInitialPlayableArea)
call CreateNUnitsAtLoc(1,'hpea',Player($C),TP,.0)
set UP=bj_lastCreatedUnit
call ShowUnitHide(UP)
call UnitAddAbility(UP,'Avul')
set SP=(1./ SP)
call RemoveLocation(TP)
endfunction
function H_E takes nothing returns nothing
set WP[2]=1
loop
exitwhen WP[2]>WP[1]
if(HUE())then
if(HTE())then
set TP=GetUnitLoc(YP[WP[2]])
set TP=MJV(TP,IQ[WP[2]],AQ[WP[2]])
if(HSE())then
call SetUnitPositionLoc(YP[WP[2]],TP)
endif
call SetUnitFlyHeight(YP[WP[2]],((4.*NQ[WP[2]])*(BQ[WP[2]]*((CQ[WP[2]]-BQ[WP[2]])/(CQ[WP[2]]*CQ[WP[2]])))),.0)
set BQ[WP[2]]=(BQ[WP[2]]+IQ[WP[2]])
call RemoveLocation(TP)
else
set TP=GetUnitLoc(YP[WP[2]])
if(HME())then
set bj_wantDestroyGroup=true
call MQV(350.,TP,function HLE)
endif
call AddSpecialEffectLocBJ(TP,EQ[WP[2]])
call DestroyEffect(bj_lastCreatedEffect)
call SetUnitFlyHeight(YP[WP[2]],.0,.0)
call DestroyEffect(XQ[WP[2]])
call SetUnitPathing(YP[WP[2]],true)
call PauseUnit(YP[WP[2]],false)
set OQ[WP[2]]=false
if(HQE())then
set WP[0]=(WP[0]-1)
if(HPE())then
set WP[1]=0
call PauseTimerBJ(true,RQ)
endif
endif
call RemoveLocation(TP)
endif
endif
set WP[2]=WP[2]+1
endloop
endfunction
function H0E takes nothing returns nothing
if(HWE())then
call TimerStart(RQ,SP,true,function H_E)
endif
set WP[0]=(WP[0]+1)
set WP[1]=(WP[1]+1)
set YP[WP[1]]=FP
set AQ[WP[1]]=GP
set BQ[WP[1]]=.0
set CQ[WP[1]]=HP
set IQ[WP[1]]=KP*SP
set VQ[WP[1]]=LP
set NQ[WP[1]]=JP
set EQ[WP[1]]=MP
if(HYE())then
call AddSpecialEffectTargetUnitBJ(QP,FP,PP)
set XQ[WP[1]]=bj_lastCreatedEffect
endif
call UnitAddAbility(FP,'Amrf')
call UnitRemoveAbility(FP,'Amrf')
call SetUnitPathing(FP,false)
call PauseUnit(FP,true)
set OQ[WP[1]]=true
set GP=.0
set HP=.0
set JP=.0
set KP=.0
set FP=null
set LP=false
set MP=""
set PP=""
set QP=""
endfunction
function H2E takes nothing returns boolean
return(GetSpellAbilityId()=='A0B2')and(GetOwningPlayer(GetTriggerUnit())!=Player($C))
endfunction
function H3E takes nothing returns boolean
return(H2E())
endfunction
function H4E takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h08D')
endfunction
function H5E takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h085')
endfunction
function H6E takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h04Z')
endfunction
function H7E takes nothing returns nothing
if(H6E())then
call ReplaceUnitBJ(GetTriggerUnit(),'h04X',1)
else
if(H5E())then
call ReplaceUnitBJ(GetTriggerUnit(),'h084',1)
else
if(H4E())then
call ReplaceUnitBJ(GetTriggerUnit(),'h08E',1)
endif
endif
endif
call SetUnitAnimation(bj_lastReplacedUnit,"Death Alternate")
endfunction
function H9E takes nothing returns boolean
return(GetSpellAbilityId()=='A0B3')and(GetOwningPlayer(GetTriggerUnit())!=Player($C))
endfunction
function JVE takes nothing returns boolean
return(H9E())
endfunction
function JEE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h08J')
endfunction
function JXE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h08A')
endfunction
function JOE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h050')
endfunction
function JRE takes nothing returns nothing
if(JOE())then
call ReplaceUnitBJ(GetTriggerUnit(),'h04Y',1)
else
if(JXE())then
call ReplaceUnitBJ(GetTriggerUnit(),'h08B',1)
else
if(JEE())then
call ReplaceUnitBJ(GetTriggerUnit(),'h08K',1)
endif
endif
endif
call SetUnitAnimation(bj_lastReplacedUnit,"Death Alternate")
endfunction
function JAE takes nothing returns boolean
return(GetSpellAbilityId()=='A0HB')and(GetOwningPlayer(GetTriggerUnit())!=Player($C))
endfunction
function JNE takes nothing returns boolean
return(JAE())
endfunction
function JBE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h08F')
endfunction
function JCE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h086')
endfunction
function JDE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h07L')
endfunction
function JFE takes nothing returns nothing
if(JDE())then
call ReplaceUnitBJ(GetTriggerUnit(),'h07M',1)
else
if(JCE())then
call ReplaceUnitBJ(GetTriggerUnit(),'h087',1)
else
if(JBE())then
call ReplaceUnitBJ(GetTriggerUnit(),'h08G',1)
endif
endif
endif
call SetUnitAnimation(bj_lastReplacedUnit,"Death Alternate")
endfunction
function JHE takes nothing returns boolean
return(GetSpellAbilityId()=='A0HC')and(GetOwningPlayer(GetTriggerUnit())!=Player($C))
endfunction
function JJE takes nothing returns boolean
return(JHE())
endfunction
function JKE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h08H')
endfunction
function JLE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h088')
endfunction
function JME takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h07K')
endfunction
function JPE takes nothing returns nothing
if(JME())then
call ReplaceUnitBJ(GetTriggerUnit(),'h07N',1)
else
if(JLE())then
call ReplaceUnitBJ(GetTriggerUnit(),'h089',1)
else
if(JKE())then
call ReplaceUnitBJ(GetTriggerUnit(),'h08I',1)
endif
endif
endif
call SetUnitAnimation(bj_lastReplacedUnit,"Death Alternate")
endfunction
function JSE takes nothing returns boolean
return(GetSpellAbilityId()=='A0B0')and(GetOwningPlayer(GetTriggerUnit())!=Player($C))
endfunction
function JTE takes nothing returns boolean
return(JSE())
endfunction
function JUE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h08E')
endfunction
function JWE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h084')
endfunction
function JYE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h04X')
endfunction
function JZE takes nothing returns nothing
if(JYE())then
call ReplaceUnitBJ(GetTriggerUnit(),'h04Z',1)
else
if(JWE())then
call ReplaceUnitBJ(GetTriggerUnit(),'h085',1)
else
if(JUE())then
call ReplaceUnitBJ(GetTriggerUnit(),'h08D',1)
endif
endif
endif
call SetUnitAnimation(bj_lastReplacedUnit,"stand")
endfunction
function J0E takes nothing returns boolean
return(GetSpellAbilityId()=='A0B1')and(GetOwningPlayer(GetTriggerUnit())!=Player($C))
endfunction
function J1E takes nothing returns boolean
return(J0E())
endfunction
function J2E takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h08K')
endfunction
function J3E takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h08B')
endfunction
function J4E takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h04Y')
endfunction
function J5E takes nothing returns nothing
if(J4E())then
call ReplaceUnitBJ(GetTriggerUnit(),'h050',1)
else
if(J3E())then
call ReplaceUnitBJ(GetTriggerUnit(),'h08A',1)
else
if(J2E())then
call ReplaceUnitBJ(GetTriggerUnit(),'h08J',1)
endif
endif
endif
call SetUnitAnimation(bj_lastReplacedUnit,"stand")
endfunction
function J7E takes nothing returns boolean
return(GetSpellAbilityId()=='A0H3')and(GetOwningPlayer(GetTriggerUnit())!=Player($C))
endfunction
function J8E takes nothing returns boolean
return(J7E())
endfunction
function J9E takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h08G')
endfunction
function KVE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h087')
endfunction
function KEE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h07M')
endfunction
function KXE takes nothing returns nothing
if(KEE())then
call ReplaceUnitBJ(GetTriggerUnit(),'h07L',1)
else
if(KVE())then
call ReplaceUnitBJ(GetTriggerUnit(),'h086',1)
else
if(J9E())then
call ReplaceUnitBJ(GetTriggerUnit(),'h08F',1)
endif
endif
endif
call SetUnitAnimation(bj_lastReplacedUnit,"stand")
endfunction
function KRE takes nothing returns boolean
return(GetSpellAbilityId()=='A0HA')and(GetOwningPlayer(GetTriggerUnit())!=Player($C))
endfunction
function KIE takes nothing returns boolean
return(KRE())
endfunction
function KAE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h08I')
endfunction
function KNE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h089')
endfunction
function KBE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h07N')
endfunction
function KCE takes nothing returns nothing
if(KBE())then
call ReplaceUnitBJ(GetTriggerUnit(),'h07K',1)
else
if(KNE())then
call ReplaceUnitBJ(GetTriggerUnit(),'h088',1)
else
if(KAE())then
call ReplaceUnitBJ(GetTriggerUnit(),'h08H',1)
endif
endif
endif
call SetUnitAnimation(bj_lastReplacedUnit,"stand")
endfunction
function KFE takes nothing returns boolean
return(GetSpellAbilityId()=='A0FJ')and(GetOwningPlayer(GetTriggerUnit())!=Player($C))
endfunction
function KGE takes nothing returns boolean
return(KFE())
endfunction
function KHE takes nothing returns nothing
call ReplaceUnitBJ(GetTriggerUnit(),'h06W',1)
call SetUnitAnimation(bj_lastReplacedUnit,"morph")
endfunction
function KKE takes nothing returns boolean
return(GetSpellAbilityId()=='A0FK')and(GetOwningPlayer(GetTriggerUnit())!=Player($C))
endfunction
function KLE takes nothing returns boolean
return(KKE())
endfunction
function KME takes nothing returns nothing
call ReplaceUnitBJ(GetTriggerUnit(),'h06V',1)
call SetUnitAnimation(bj_lastReplacedUnit,"morph alternate")
endfunction
function KQE takes nothing returns boolean
return(GetUnitTypeId(GetConstructedStructure())=='u022')
endfunction
function KSE takes nothing returns nothing
call SetUnitAnimation(GetConstructedStructure(),"Death Alternate")
endfunction
function KUE takes nothing returns boolean
return(GetSpellAbilityId()=='A0EC')and(GetOwningPlayer(GetTriggerUnit())!=Player($C))
endfunction
function KWE takes nothing returns boolean
return(KUE())
endfunction
function KYE takes nothing returns nothing
call ReplaceUnitBJ(GetTriggerUnit(),'u02C',1)
call SetUnitAnimation(bj_lastReplacedUnit,"stand")
endfunction
function K_E takes nothing returns boolean
return(GetSpellAbilityId()=='A0ED')and(GetOwningPlayer(GetTriggerUnit())!=Player($C))
endfunction
function K0E takes nothing returns boolean
return(K_E())
endfunction
function K1E takes nothing returns nothing
call ReplaceUnitBJ(GetTriggerUnit(),'u022',1)
call SetUnitAnimation(bj_lastReplacedUnit,"Death Alternate")
endfunction
function K3E takes nothing returns boolean
return(GetOwningPlayer(GetTriggerUnit())!=Player($C))and(GetUnitTypeId(GetTriggerUnit())=='u037')
endfunction
function K4E takes nothing returns boolean
return(GetSpellAbilityId()=='A0J5')
endfunction
function K5E takes nothing returns boolean
return(K4E())
endfunction
function K6E takes nothing returns boolean
return(GetSpellAbilityId()=='A0J4')
endfunction
function K7E takes nothing returns boolean
return(K6E())
endfunction
function K8E takes nothing returns nothing
if(K7E())then
call UnitRemoveAbility(GetTriggerUnit(),'A0J4')
call UnitAddAbility(GetTriggerUnit(),'A0J5')
call SetUnitAnimation(GetTriggerUnit(),"stand")
else
if(K5E())then
call UnitRemoveAbility(GetTriggerUnit(),'A0J5')
call UnitAddAbility(GetTriggerUnit(),'A0J4')
call SetUnitAnimation(GetTriggerUnit(),"death")
endif
endif
endfunction
function LVE takes nothing returns boolean
return(GetPlayerSlotState(Player(-1+(KH)))==PLAYER_SLOT_STATE_PLAYING)and(GetPlayerController(Player(-1+(KH)))==MAP_CONTROL_USER)
endfunction
function LEE takes nothing returns boolean
return(LVE())
endfunction
function LXE takes nothing returns nothing
set KH=1
loop
exitwhen KH>$C
if(LEE())then
set LH=(LH+1)
endif
set KH=KH+1
endloop
endfunction
function LRE takes nothing returns boolean
return(S2I(SubStringBJ(GetEventPlayerChatString(),7,StringLength(GetEventPlayerChatString())))>0)and(S2I(SubStringBJ(GetEventPlayerChatString(),7,StringLength(GetEventPlayerChatString())))<$D)
endfunction
function LIE takes nothing returns boolean
return(LRE())
endfunction
function LAE takes nothing returns boolean
return(BP[S2I(SubStringBJ(GetEventPlayerChatString(),7,StringLength(GetEventPlayerChatString())))]>0)
endfunction
function LNE takes nothing returns boolean
return(GetPlayerSlotState(Player(-1+(KH)))==PLAYER_SLOT_STATE_PLAYING)and(GetPlayerController(Player(-1+(KH)))==MAP_CONTROL_USER)
endfunction
function LBE takes nothing returns boolean
return(LNE())
endfunction
function LCE takes nothing returns boolean
return(MH)
endfunction
function LDE takes nothing returns boolean
return(QH==GetPlayerName(Player(-1+(KH))))and(KH!=(1+GetPlayerId(GetTriggerPlayer())))
endfunction
function LFE takes nothing returns boolean
return(SH)
endfunction
function LGE takes nothing returns boolean
return(PH<=0)or(PH==(1+GetPlayerId(GetTriggerPlayer())))or(PH>$C)
endfunction
function LHE takes nothing returns boolean
return(LGE())
endfunction
function LJE takes nothing returns boolean
return(GetPlayerSlotState(Player(-1+(PH)))==PLAYER_SLOT_STATE_EMPTY)or(IsPlayerInForce(Player(-1+(PH)),TH))or(GetPlayerSlotState(Player(-1+(PH)))==PLAYER_SLOT_STATE_LEFT)
endfunction
function LKE takes nothing returns boolean
return(LJE())
endfunction
function LLE takes nothing returns nothing
if(LIE())then
else
return
endif
if(LAE())then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(""+(" |cfffed312Unable to kick player |r"+(""+(SR[S2I(SubStringBJ(GetEventPlayerChatString(),7,StringLength(GetEventPlayerChatString())))]+"|r")))))
return
endif
set LH=0
set KH=1
loop
exitwhen KH>$C
if(LBE())then
set LH=(LH+1)
endif
set KH=KH+1
endloop
if(LCE())then
call DisplayTextToPlayer(GetTriggerPlayer(),0,0,"|cfffed312Wait unitill the current vote is finished.|r")
return
endif
set PH=S2I(SubStringBJ(GetEventPlayerChatString(),7,StringLength(GetEventPlayerChatString())))
if(LHE())then
set PH=0
set QH=SubStringBJ(GetEventPlayerChatString(),7,StringLength(GetEventPlayerChatString()))
set KH=1
loop
exitwhen KH>$C
if(LDE())then
set PH=KH
set SH=true
endif
set KH=KH+1
endloop
if(LFE())then
set SH=false
else
call DisplayTextToPlayer(GetTriggerPlayer(),0,0,"|cfffed312You have to specify a player to kick.|r")
return
endif
endif
if(LKE())then
set PH=0
call DisplayTextToPlayer(GetTriggerPlayer(),0,0,"|cfffed312You have to specify a player to kick.|r")
return
endif
set QH=W8V(GetPlayerId(GetTriggerPlayer())+1)
set UH=W8V(PH)
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,((QH+(SR[(1+GetPlayerId(GetTriggerPlayer()))]+"|r"))+(" |cfffed312would like to kick |r"+(UH+(SR[(1+GetPlayerId(Player(-1+(PH))))]+"|r")))))
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,"|cfffed312You have 30 seconds to vote with |r-yes|cfffed312 or |r-no")
set MH=true
call EnableTrigger(ERV)
call EnableTrigger(EIV)
set KH=1
loop
exitwhen KH>$C
set WH[KH]=false
set KH=KH+1
endloop
set WH[(1+GetPlayerId(GetTriggerPlayer()))]=true
set YH=1
set ZH=0
call CreateLeaderboardBJ(bj_FORCE_ALL_PLAYERS,("Kick Vote - Yes: "+(I2S(YH)+(" No: "+I2S(ZH)))))
set VJ=bj_lastCreatedLeaderboard
call LeaderboardAddItem(VJ,"|cfffed312Kick: |r"+UH+GetPlayerName(Player(-1+(PH)))+"|r",0,Player(-1+(PH)))
call LeaderboardSetStyle(VJ,true,true,false,false)
call LeaderboardSetSizeByItemCount(VJ,1)
call StartTimerBJ(EJ,false,30.)
endfunction
function LPE takes nothing returns nothing
call TriggerExecute(EOV)
endfunction
function LSE takes nothing returns boolean
return((YH+ZH)==LH)
endfunction
function LTE takes nothing returns boolean
return(YH>ZH)
endfunction
function LUE takes nothing returns boolean
return(IsPlayerInForce(Player(-1+(KH)),bj_FORCE_ALL_PLAYERS))and(IsPlayerInForce(Player(-1+(KH)),TH)==false)
endfunction
function LWE takes nothing returns nothing
set MH=false
call DestroyLeaderboard(VJ)
call PauseTimerBJ(true,EJ)
call DisableTrigger(ERV)
call DisableTrigger(EIV)
if(LTE())then
call ForceAddPlayer(TH,Player(-1+(PH)))
call CustomDefeatBJ(Player(-1+(PH)),"You were disconnected.")
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS," |cfffed312Vote passed!|r")
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,((UH+(SR[(1+GetPlayerId(Player(-1+(PH))))]+"|r"))+" |cfffed312was kicked!|r"))
call ConditionalTriggerExecute(EAV)
else
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS," |cfffed312Vote failed!|r")
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,((UH+(SR[(1+GetPlayerId(Player(-1+(PH))))]+"|r"))+" |cfffed312was not kicked.|r"))
endif
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(("|cfffed312Votes - ")+((("Yes: "+("|r"+(I2S(YH)+"|cfffed312")))+(" No: "+("|r"+I2S(ZH))))+"|r")))
set YH=0
set ZH=0
set PH=0
set LH=0
set KH=1
loop
exitwhen KH>$C
set WH[KH]=false
if(LUE())then
set LH=(LH+1)
endif
set KH=KH+1
endloop
endfunction
function LZE takes nothing returns boolean
return(WH[(1+GetPlayerId(GetTriggerPlayer()))]==false)
endfunction
function L_E takes nothing returns nothing
if(LZE())then
set YH=(YH+1)
call DisplayTextToPlayer(GetTriggerPlayer(),0,0,"|cfffed312Vote registered|r")
set WH[(1+GetPlayerId(GetTriggerPlayer()))]=true
call LeaderboardSetLabelBJ(VJ,("Kick "+("Vote"+((" - Yes: "+I2S(YH))+(" No: "+I2S(ZH))))))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,(RB[(1+GetPlayerId(GetTriggerPlayer()))]+(SR[(1+GetPlayerId(GetTriggerPlayer()))]+" has voted: Yes")))
else
call DisplayTextToPlayer(GetTriggerPlayer(),0,0,"|cfffed312You already have voted!|r")
endif
endfunction
function L1E takes nothing returns boolean
return(WH[(1+GetPlayerId(GetTriggerPlayer()))]==false)
endfunction
function L2E takes nothing returns nothing
if(L1E())then
set ZH=(ZH+1)
call DisplayTextToPlayer(GetTriggerPlayer(),0,0,"|cfffed312Vote registered|r")
set WH[(1+GetPlayerId(GetTriggerPlayer()))]=true
call LeaderboardSetLabelBJ(VJ,("Kick "+("Vote"+((" - Yes: "+I2S(YH))+(" No: "+I2S(ZH))))))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,(RB[(1+GetPlayerId(GetTriggerPlayer()))]+(SR[(1+GetPlayerId(GetTriggerPlayer()))]+" has voted: No")))
else
call DisplayTextToPlayer(GetTriggerPlayer(),0,0,"|cfffed312You already have voted!|r")
endif
endfunction
function L4E takes nothing returns boolean
return(GetPlayerSlotState(GetOwningPlayer(BQV))!=PLAYER_SLOT_STATE_PLAYING)
endfunction
function L5E takes nothing returns boolean
return(AD==VB)
endfunction
function L6E takes nothing returns boolean
return(GetOwningPlayer(GetFilterUnit())==VB)
endfunction
function L7E takes nothing returns boolean
return(RectContainsUnit(N4,GetFilterUnit())==false)
endfunction
function L8E takes nothing returns boolean
return GetBooleanAnd(L6E(),L7E())
endfunction
function L9E takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())!='n005')
endfunction
function MVE takes nothing returns nothing
if(L9E())then
call SetUnitOwner(GetEnumUnit(),AD,true)
endif
endfunction
function MEE takes nothing returns nothing
call SetUnitOwner(GetEnumUnit(),AD,false)
endfunction
function MXE takes nothing returns boolean
return(AD==RH[AH])
endfunction
function MOE takes nothing returns boolean
return(IsPlayerInForce(AD,RF)!=true)
endfunction
function MRE takes nothing returns boolean
return(RH[AH]!=Player($F))
endfunction
function MIE takes nothing returns boolean
return(GetPlayerSlotState(Player(-1+(bj_forLoopAIndex)))==PLAYER_SLOT_STATE_PLAYING)
endfunction
function MAE takes nothing returns nothing
call TriggerSleepAction(1.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=$C
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
if(MIE())then
set VB=GetOwningPlayer(BQV)
set AD=Player(-1+(bj_forLoopAIndex))
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,(("|cffffcc00"+SR[(1+GetPlayerId(VB))])+" (The Titan) has left the game.|r"))
if(L5E())then
return
endif
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,(("|cffffcc00"+SR[(1+GetPlayerId(AD))])+" is now the new Titan.|r"))
call ForGroupBJ(MWV(R4,Condition(function L8E)),function MVE)
call DestroyGroup(bj_lastCreatedGroup)
call ForGroupBJ(M_V(N4,VB),function MEE)
call DestroyGroup(bj_lastCreatedGroup)
call SetUnitOwner(OO,AD,true)
call TriggerRegisterPlayerEventLeave(GetTriggeringTrigger(),AD)
set AH=1
loop
exitwhen AH>IH
if(MXE())then
return
endif
set AH=AH+1
endloop
if(MOE())then
call TriggerRegisterPlayerChatEvent(E8,AD,"-delete",false)
call TriggerRegisterPlayerChatEvent(A8,AD,"-safe off",true)
call TriggerRegisterPlayerChatEvent(I8,AD,"-safe on",true)
call TriggerRegisterPlayerChatEvent(ECV,AD,"-End of Time",true)
call TriggerRegisterPlayerChatEvent(E3V,AD,"-mind",true)
call TriggerRegisterPlayerChatEvent(S6,AD,"-masterswitch",true)
call TriggerRegisterPlayerChatEvent(C8,AD,"-music ",false)
call TriggerRegisterPlayerChatEvent(VSV,AD,"-Summon Cosmosis",true)
call TriggerRegisterPlayerChatEvent(V7,AD,"-kick",false)
call TriggerRegisterPlayerChatEvent(H8,AD,"-titan",false)
endif
set AH=1
loop
exitwhen AH>IH
if(MRE())then
call SetPlayerAllianceStateBJ(AD,RH[AH],5)
endif
set AH=AH+1
endloop
call ForceAddPlayer(RF,AD)
return
endif
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
endfunction
function MBE takes nothing returns nothing
call DisableTrigger(EBV)
call EnableTrigger(ECV)
endfunction
function MDE takes nothing returns boolean
return(GetTriggerPlayer()==GetOwningPlayer(BQV))or(DP[(1+GetPlayerId(GetTriggerPlayer()))])
endfunction
function MFE takes nothing returns boolean
return(MDE())
endfunction
function MGE takes nothing returns nothing
call DisplayTextToForce(bj_FORCE_PLAYER[0],"You cannot trigger the End of Time until at least 30 minutes of the game passed.")
endfunction
function MJE takes nothing returns boolean
return(GetTriggerPlayer()==GetOwningPlayer(BQV))or(DP[(1+GetPlayerId(GetTriggerPlayer()))])
endfunction
function MKE takes nothing returns boolean
return(MJE())
endfunction
function MLE takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"The End of Time is triggered.")
call CinematicFadeBJ(2,.8,"ReplaceableTextures\\CameraMasks\\White_mask.blp",0,0,0,0)
call TriggerSleepAction(.8)
call CinematicFadeBJ(2,.8,"ReplaceableTextures\\CameraMasks\\White_mask.blp",0,0,0,0)
call TriggerSleepAction(2.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"A dimensional portal openned on the Sun Temple...")
call PlaySoundBJ(C5)
call TriggerSleepAction(2.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,10.,"A powerful being is appearing in this dimension.")
set GR=GetRectCenter(B3)
call CreateNUnitsAtLoc(1,'H05Q',Player($F),GR,bj_UNIT_FACING)
set QO=bj_lastCreatedUnit
call SetHeroLevelBJ(QO,'d',false)
call RemoveLocation(GR)
set UX=0
call EnableTrigger(EGV)
call EnableTrigger(EDV)
endfunction
function MPE takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())!='H05Q')
endfunction
function MQE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetFilterUnit())==0)
endfunction
function MSE takes nothing returns boolean
return GetBooleanAnd(MPE(),MQE())
endfunction
function MTE takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())!='h00N')
endfunction
function MUE takes nothing returns nothing
if(MTE())then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function MWE takes nothing returns nothing
call RemoveDestructable(GetEnumDestructable())
endfunction
function MYE takes nothing returns nothing
set JO=GetUnitLoc(GetEnumUnit())
call SetTerrainTypeBJ(JO,'Oaby',-1,$A,0)
set WR=M1V(1000.,JO,Condition(function MSE))
call GroupRemoveUnit(WR,JX)
call GroupRemoveUnit(WR,RI)
call ForGroupBJ(WR,function MUE)
call MQV(1000.,JO,function MWE)
endfunction
function MZE takes nothing returns nothing
call ForGroupBJ(M4V('H05Q'),function MYE)
call DestroyGroup(bj_lastCreatedGroup)
call DestroyGroup(WR)
call RemoveLocation(JO)
endfunction
function M0E takes nothing returns boolean
return(GetSpellAbilityId()=='A065')
endfunction
function M1E takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())!='H05Q')
endfunction
function M2E takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetFilterUnit())==0)
endfunction
function M3E takes nothing returns boolean
return GetBooleanAnd(M1E(),M2E())
endfunction
function M4E takes nothing returns boolean
return(GetUnitTypeId(GetEnumUnit())!='h00N')
endfunction
function M5E takes nothing returns nothing
if(M4E())then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function M6E takes nothing returns nothing
call RemoveDestructable(GetEnumDestructable())
endfunction
function M7E takes nothing returns nothing
set JO=GetUnitLoc(GetTriggerUnit())
call SetTerrainTypeBJ(JO,'Oaby',-1,20,0)
set WR=M1V(2250.,JO,Condition(function M3E))
call GroupRemoveUnit(WR,JX)
call GroupRemoveUnit(WR,RI)
call ForGroupBJ(WR,function M5E)
call MQV(2250.,JO,function M6E)
call DestroyGroup(WR)
call RemoveLocation(JO)
endfunction
function M9E takes nothing returns boolean
return(GetOwningPlayer(QO)==Player($F))
endfunction
function PVE takes nothing returns nothing
set QO=GetEnumUnit()
if(M9E())then
set GR=GetRandomLocInRect(bj_mapInitialPlayableArea)
call IssuePointOrderByIdLoc(QO,$D0012,GR)
call RemoveLocation(GR)
endif
endfunction
function PEE takes nothing returns nothing
call ForGroupBJ(M4V('H05Q'),function PVE)
call DestroyGroup(bj_lastCreatedGroup)
endfunction
function POE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h06U')
endfunction
function PRE takes nothing returns nothing
call SetUnitVertexColorBJ(GetTriggerUnit(),GetRandomReal(10.,100.),GetRandomReal(10.,100.),GetRandomReal(10.,100.),.0)
endfunction
function PAE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h06S')or(GetUnitTypeId(GetTriggerUnit())=='h06U')
endfunction
function PNE takes nothing returns boolean
return(PAE())
endfunction
function PBE takes nothing returns nothing
call RemoveUnit(GetTriggerUnit())
endfunction
function PDE takes nothing returns boolean
return((GetUnitAbilityLevelSwapped('A0C2',GetKillingUnit())>0)and(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false))!=null
endfunction
function PFE takes nothing returns boolean
return(PDE())
endfunction
function PGE takes nothing returns nothing
call ModifyHeroStat(2,GetKillingUnit(),0,GetUnitAbilityLevelSwapped('A0C2',GetKillingUnit()))
endfunction
function PJE takes nothing returns nothing
call TriggerSleepAction(.5)
call DestructableRestoreLife(GetDyingDestructable(),GetDestructableMaxLife(GetDyingDestructable()),true)
endfunction
function PLE takes nothing returns nothing
call SetUnitTimeScalePercent(GetTriggerUnit(),'d')
call PauseUnit(GetTriggerUnit(),false)
endfunction
function PPE takes nothing returns boolean
return(GetSpellAbilityId()=='A0E9')
endfunction
function PQE takes nothing returns nothing
set SI=GetSpellTargetLoc()
call TriggerSleepAction(.01)
call SetUnitPositionLoc(GetTriggerUnit(),SI)
call RemoveLocation(SI)
endfunction
function PTE takes nothing returns boolean
return(GetSpellAbilityId()=='A0D5')and(GetOwningPlayer(GetTriggerUnit())==Player($C))
endfunction
function PUE takes nothing returns boolean
return(PTE())
endfunction
function PWE takes nothing returns nothing
call IssueImmediateOrderById(GetTriggerUnit(),$D0004)
call UnitRemoveAbility(GetTriggerUnit(),'A0D5')
endfunction
function PZE takes nothing returns boolean
return(GetUnitTypeId(GetAttacker())=='h053')
endfunction
function P_E takes nothing returns nothing
call SetUnitAnimation(GetAttacker(),"attack one")
endfunction
function P1E takes nothing returns boolean
return GetSpellAbilityId()=='A0DD'
endfunction
function P2E takes nothing returns nothing
local unit u=GetTriggerUnit()
local location l=GetUnitLoc(u)
local location l2=GetSpellTargetLoc()
local location l3
local unit d
local unit d2
local integer i=25
set d2=CreateUnitAtLoc(GetOwningPlayer(u),'u01T',l2,bj_UNIT_FACING)
call PauseUnit(u,true)
loop
exitwhen i<=0
set l3=MJV(l2,GetRandomReal(0,400),GetRandomReal(0,360))
set d=CreateUnitAtLoc(GetOwningPlayer(u),'u01U',l,bj_UNIT_FACING)
call UnitApplyTimedLife(d,'BTLF',1.5)
call IssuePointOrderByIdLoc(d,$D0010,l3)
set d=null
call RemoveLocation(l3)
call TriggerSleepAction(.1)
set i=i-1
endloop
call RemoveUnit(d2)
call PauseUnit(u,false)
set u=null
set d2=null
call RemoveLocation(l)
call RemoveLocation(l2)
endfunction
function P3E takes nothing returns boolean
return(GetUnitTypeId(GetAttacker())=='h006')or(GetUnitTypeId(GetAttacker())=='h01P')
endfunction
function P4E takes nothing returns boolean
return(P3E())
endfunction
function P5E takes nothing returns nothing
call IssueTargetOrderById(GetAttacker(),$D0102,GetTriggerUnit())
call TriggerSleepAction(.1)
call IssueTargetOrderById(GetAttacker(),$D0207,GetTriggerUnit())
endfunction
function P7E takes nothing returns boolean
return(GetSpellAbilityId()=='A02B')
endfunction
function P8E takes nothing returns boolean
return(IsUnitType(GetEnumUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction
function P9E takes nothing returns nothing
call UnitDamageTargetBJ(GetSpellAbilityUnit(),GetEnumUnit(),(50.+(50.*I2R(GetUnitAbilityLevelSwapped('A02B',GetSpellAbilityUnit())))),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
if(P8E())then
call SetUnitPositionLoc(GetEnumUnit(),XX)
endif
endfunction
function QVE takes nothing returns nothing
set XX=GetSpellTargetLoc()
set UO=M3V(450.,XX)
call CreateNUnitsAtLoc(1,'o00J',GetOwningPlayer(GetSpellAbilityUnit()),XX,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(.1,'BHwe',bj_lastCreatedUnit)
call TerrainDeformationRippleBJ(1.,true,XX,450.,225.,64,1,112.5)
call ForGroupBJ(UO,function P9E)
call DestroyGroup(UO)
call RemoveLocation(XX)
endfunction
function QXE takes nothing returns boolean
return(GetSpellAbilityId()=='A029')
endfunction
function QOE takes nothing returns nothing
call UnitDamageTargetBJ(GetSpellAbilityUnit(),GetEnumUnit(),((GetUnitStateSwap(UNIT_STATE_MAX_LIFE,GetEnumUnit())*(8.*I2R(GetUnitAbilityLevelSwapped('A029',GetSpellAbilityUnit()))))/ 50.),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
endfunction
function QRE takes nothing returns nothing
set XX=GetSpellTargetLoc()
set UO=M3V(500.,XX)
call ForGroupBJ(UO,function QOE)
call DestroyGroup(UO)
call RemoveLocation(XX)
endfunction
function QAE takes nothing returns boolean
return(GetSpellAbilityId()=='A015')
endfunction
function QNE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetFilterUnit())==0)
endfunction
function QBE takes nothing returns nothing
call SetUnitTimeScalePercent(GetEnumUnit(),.0)
call PauseUnit(GetEnumUnit(),true)
endfunction
function QCE takes nothing returns boolean
return(UnitHasBuffBJ(OO,'B00C')==false)
endfunction
function QDE takes nothing returns nothing
call SetUnitTimeScalePercent(GetEnumUnit(),100.)
call PauseUnit(GetEnumUnit(),false)
endfunction
function QFE takes nothing returns nothing
set NX=MWV(bj_mapInitialPlayableArea,Condition(function QNE))
call GroupRemoveUnit(NX,OO)
call GroupRemoveUnit(NX,LE)
call GroupRemoveUnit(NX,ZX)
call GroupRemoveUnit(NX,QO)
call GroupRemoveUnit(NX,VI)
call ForGroupBJ(NX,function QBE)
call SetTimeOfDayScalePercentBJ(.0)
call TriggerSleepAction(1.)
loop
exitwhen(QCE())
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL,.5))
endloop
call ForGroupBJ(NX,function QDE)
call SetTimeOfDayScalePercentBJ(100.)
call DestroyGroup(NX)
endfunction
function QHE takes nothing returns boolean
return(GetSpellAbilityId()=='A01A')
endfunction
function QJE takes nothing returns nothing
call UnitAddItemByIdSwapped('I001',GetSpellTargetUnit())
endfunction
function QLE takes nothing returns boolean
return(GetSpellAbilityId()=='A04I')
endfunction
function QME takes nothing returns nothing
call UnitAddItemByIdSwapped('I009',GetSpellTargetUnit())
endfunction
function QQE takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())!='H06K')
endfunction
function QSE takes nothing returns boolean
return(GetSpellAbilityId()=='A0JD')
endfunction
function QTE takes nothing returns boolean
return(GetSpellAbilityId()=='A0AS')
endfunction
function QUE takes nothing returns boolean
return(GetSpellAbilityId()=='A0AT')
endfunction
function QWE takes nothing returns boolean
return(GetSpellAbilityId()=='A0AV')
endfunction
function QYE takes nothing returns boolean
return(GetSpellAbilityId()=='A0AZ')
endfunction
function QZE takes nothing returns boolean
return(GetSpellAbilityId()=='A0AP')
endfunction
function Q_E takes nothing returns boolean
return(GetSpellAbilityId()=='A0AY')
endfunction
function Q0E takes nothing returns boolean
return(GetSpellAbilityId()=='A0AO')
endfunction
function Q1E takes nothing returns boolean
return(GetSpellAbilityId()=='A0AR')
endfunction
function Q2E takes nothing returns boolean
return(GetSpellAbilityId()=='A0AX')
endfunction
function Q3E takes nothing returns boolean
return(GetSpellAbilityId()=='A0AW')
endfunction
function Q4E takes nothing returns boolean
return(GetSpellAbilityId()=='A0AQ')
endfunction
function Q5E takes nothing returns boolean
return(GetSpellAbilityId()=='A0AU')
endfunction
function Q6E takes nothing returns boolean
return(GetSpellAbilityId()=='A0CN')
endfunction
function Q7E takes nothing returns boolean
return(GetSpellAbilityId()=='A0D4')
endfunction
function Q8E takes nothing returns boolean
return(GetSpellAbilityId()=='A0CO')
endfunction
function Q9E takes nothing returns nothing
if(QSE())then
call SetTerrainTypeBJ(GetSpellTargetLoc(),'Ygsb',-1,CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],0)
endif
if(QTE())then
call SetTerrainTypeBJ(GetSpellTargetLoc(),'Lgrd',-1,CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],0)
endif
if(QUE())then
call SetTerrainTypeBJ(GetSpellTargetLoc(),'Yhdg',-1,CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],0)
endif
if(QWE())then
call SetTerrainTypeBJ(GetSpellTargetLoc(),'Yrtl',-1,CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],0)
endif
if(QYE())then
call SetTerrainTypeBJ(GetSpellTargetLoc(),'Ywmb',-1,CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],0)
endif
if(QZE())then
call SetTerrainTypeBJ(GetSpellTargetLoc(),'Yblm',-1,CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],1)
endif
if(Q_E())then
call SetTerrainTypeBJ(GetSpellTargetLoc(),'Ysqd',-1,CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],0)
endif
if(Q0E())then
call SetTerrainTypeBJ(GetSpellTargetLoc(),'Ibkb',-1,CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],1)
endif
if(Q1E())then
call SetTerrainTypeBJ(GetSpellTargetLoc(),'Ydrt',-1,CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],0)
endif
if(Q2E())then
call SetTerrainTypeBJ(GetSpellTargetLoc(),'Zsan',-1,CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],0)
endif
if(Q3E())then
call SetTerrainTypeBJ(GetSpellTargetLoc(),'Nsnw',-1,CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],0)
endif
if(Q4E())then
call SetBlightRadiusLocBJ(true,GetOwningPlayer(GetTriggerUnit()),GetSpellTargetLoc(),(I2R(CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])*250.))
endif
if(Q5E())then
call SetBlightRadiusLocBJ(false,GetOwningPlayer(GetTriggerUnit()),GetSpellTargetLoc(),(I2R(CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])*250.))
endif
if(Q6E())then
call SetTerrainTypeBJ(GetSpellTargetLoc(),'Ddkr',-1,CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],0)
endif
if(Q7E())then
call SetTerrainTypeBJ(GetSpellTargetLoc(),'Dlav',-1,CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],0)
endif
if(Q8E())then
call SetTerrainTypeBJ(GetSpellTargetLoc(),'Bdrh',-1,CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],0)
endif
endfunction
function SEE takes nothing returns boolean
return(GetUnitTypeId(GetSpellTargetUnit())!='h01T')and(GetUnitTypeId(GetSpellTargetUnit())!='h01S')and(GetUnitTypeId(GetSpellTargetUnit())!='h01U')and(GetUnitTypeId(GetSpellTargetUnit())!='h03Z')and(GetUnitTypeId(GetSpellTargetUnit())!='h03X')and(GetUnitTypeId(GetSpellTargetUnit())!='h03Y')and(GetUnitTypeId(GetSpellTargetUnit())!='h040')and(GetUnitTypeId(GetSpellTargetUnit())!='h041')and(GetUnitTypeId(GetSpellTargetUnit())!='h03S')and(GetUnitTypeId(GetSpellTargetUnit())!='h042')and(GetUnitTypeId(GetSpellTargetUnit())!='h043')and(GetUnitTypeId(GetSpellTargetUnit())!='h03V')and(GetUnitTypeId(GetSpellTargetUnit())!='h03W')and(GetUnitTypeId(GetSpellTargetUnit())!='h03T')and(GetUnitTypeId(GetSpellTargetUnit())!='h03U')and(GetUnitTypeId(GetSpellTargetUnit())!='h04X')and(GetUnitTypeId(GetSpellTargetUnit())!='h04Y')and(GetUnitTypeId(GetSpellTargetUnit())!='h04Z')and(GetUnitTypeId(GetSpellTargetUnit())!='h050')and(GetUnitTypeId(GetSpellTargetUnit())!='h07N')and(GetUnitTypeId(GetSpellTargetUnit())!='h07K')and(GetUnitTypeId(GetSpellTargetUnit())!='h07M')and(GetUnitTypeId(GetSpellTargetUnit())!='h07L')and(GetUnitTypeId(GetSpellTargetUnit())!='h08D')and(GetUnitTypeId(GetSpellTargetUnit())!='h08E')and(GetUnitTypeId(GetSpellTargetUnit())!='h08F')and(GetUnitTypeId(GetSpellTargetUnit())!='h08G')and(GetUnitTypeId(GetSpellTargetUnit())!='h08H')and(GetUnitTypeId(GetSpellTargetUnit())!='h08I')and(GetUnitTypeId(GetSpellTargetUnit())!='h08J')and(GetUnitTypeId(GetSpellTargetUnit())!='h08K')and(GetUnitTypeId(GetSpellTargetUnit())!='h085')and(GetUnitTypeId(GetSpellTargetUnit())!='h084')and(GetUnitTypeId(GetSpellTargetUnit())!='h086')and(GetUnitTypeId(GetSpellTargetUnit())!='h087')and(GetUnitTypeId(GetSpellTargetUnit())!='h088')and(GetUnitTypeId(GetSpellTargetUnit())!='h089')and(GetUnitTypeId(GetSpellTargetUnit())!='h08A')and(GetUnitTypeId(GetSpellTargetUnit())!='h08B')and(GetUnitTypeId(GetSpellTargetUnit())!='u02C')and(GetUnitTypeId(GetSpellTargetUnit())!='u022')
endfunction
function SXE takes nothing returns boolean
return(SEE())
endfunction
function SOE takes nothing returns boolean
return(GetOwningPlayer(GetSpellTargetUnit())==GetOwningPlayer(GetTriggerUnit()))
endfunction
function SRE takes nothing returns boolean
return(GetSpellAbilityId()=='A0H9')
endfunction
function SIE takes nothing returns boolean
return(GetOwningPlayer(GetSpellTargetUnit())==GetOwningPlayer(GetTriggerUnit()))
endfunction
function SAE takes nothing returns boolean
return(GetSpellAbilityId()=='A0H8')
endfunction
function SNE takes nothing returns nothing
set ND=(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))
if(SAE())then
if(SIE())then
call W6V(GetSpellTargetUnit(),BD[ND])
endif
else
if(SRE())then
if(SOE())then
call SetUnitScalePercent(GetSpellTargetUnit(),I2R(CD[ND]),I2R(CD[ND]),I2R(CD[ND]))
endif
endif
endif
endfunction
function SCE takes nothing returns boolean
return(GetOwningPlayer(GetSpellTargetUnit())==GetOwningPlayer(GetTriggerUnit()))
endfunction
function SDE takes nothing returns boolean
return(GetSpellAbilityId()=='A0J2')
endfunction
function SFE takes nothing returns boolean
return(GetOwningPlayer(GetSpellTargetUnit())==GetOwningPlayer(GetTriggerUnit()))
endfunction
function SGE takes nothing returns boolean
return(GetSpellAbilityId()=='A0IF')
endfunction
function SHE takes nothing returns boolean
return(GetOwningPlayer(GetSpellTargetUnit())==GetOwningPlayer(GetTriggerUnit()))
endfunction
function SJE takes nothing returns boolean
return(GetSpellAbilityId()=='A0HQ')
endfunction
function SKE takes nothing returns nothing
set ND=(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))
if(SJE())then
if(SHE())then
call SetUnitVertexColorBJ(GetSpellTargetUnit(),I2R(VF[ND]),I2R(EF[ND]),I2R(XF[ND]),I2R(OF[ND]))
endif
else
if(SGE())then
if(SFE())then
call WZV(GetSpellTargetUnit(),OJ[ND],RP[ND],IP[ND])
endif
else
if(SDE())then
if(SCE())then
call PauseUnit(GetSpellTargetUnit(),true)
call UnitAddAbility(GetSpellTargetUnit(),'A0J3')
call SetUnitFlyHeight(GetSpellTargetUnit(),I2R(UM[ND]),100.)
call UnitRemoveAbility(GetSpellTargetUnit(),'A0J3')
call PauseUnit(GetSpellTargetUnit(),false)
endif
endif
endif
endif
endfunction
function SME takes nothing returns boolean
return(GI==1)
endfunction
function SPE takes nothing returns boolean
return(GI==0)
endfunction
function SQE takes nothing returns nothing
if(SPE())then
set GI=1
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Using the Power : Mind will affect all units owned by the target.")
else
if(SME())then
set GI=0
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Using the Power : Mind will only affect the target unit.")
endif
endif
endfunction
function STE takes nothing returns boolean
return(GetSpellAbilityId()=='A0JB')
endfunction
function SUE takes nothing returns boolean
return(GetDestructableTypeId(GetEnumDestructable())=='YT14')or(GetDestructableTypeId(GetEnumDestructable())=='YT38')or(GetDestructableTypeId(GetEnumDestructable())=='YT36')or(GetDestructableTypeId(GetEnumDestructable())=='YT12')or(GetDestructableTypeId(GetEnumDestructable())=='YT18')or(GetDestructableTypeId(GetEnumDestructable())=='YT42')or(GetDestructableTypeId(GetEnumDestructable())=='YT40')or(GetDestructableTypeId(GetEnumDestructable())=='YT16')or(GetDestructableTypeId(GetEnumDestructable())=='LT06')or(GetDestructableTypeId(GetEnumDestructable())=='LT04')or(GetDestructableTypeId(GetEnumDestructable())=='YT00')or(GetDestructableTypeId(GetEnumDestructable())=='YT24')or(GetDestructableTypeId(GetEnumDestructable())=='LTr8')or(GetDestructableTypeId(GetEnumDestructable())=='LTs8')or(GetDestructableTypeId(GetEnumDestructable())=='LTs2')or(GetDestructableTypeId(GetEnumDestructable())=='LTr2')or(GetDestructableTypeId(GetEnumDestructable())=='DTs2')or(GetDestructableTypeId(GetEnumDestructable())=='DTsb')or(GetDestructableTypeId(GetEnumDestructable())=='YT22')or(GetDestructableTypeId(GetEnumDestructable())=='YT46')or(GetDestructableTypeId(GetEnumDestructable())=='YT44')or(GetDestructableTypeId(GetEnumDestructable())=='YT20')
endfunction
function SWE takes nothing returns boolean
return(SUE())
endfunction
function SYE takes nothing returns nothing
if(SWE())then
else
call RemoveDestructable(GetEnumDestructable())
endif
endfunction
function SZE takes nothing returns nothing
set ZO=GetSpellTargetLoc()
call MQV((I2R(CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])*100.),ZO,function SYE)
call RemoveLocation(ZO)
endfunction
function S0E takes nothing returns boolean
return(GetSpellAbilityId()=='A0JC')
endfunction
function S1E takes nothing returns boolean
return(GetTerrainTypeBJ(ZO)=='cWc1')or(GetTerrainTypeBJ(ZO)=='Isnw')
endfunction
function S2E takes nothing returns boolean
return(GetTerrainTypeBJ(ZO)=='Zsan')or(GetTerrainTypeBJ(ZO)=='Bdrh')or(GetTerrainTypeBJ(ZO)=='Ydrt')
endfunction
function S3E takes nothing returns boolean
return(S2E())
endfunction
function S4E takes nothing returns boolean
return(GetTerrainTypeBJ(ZO)=='Ddkr')or(GetTerrainTypeBJ(ZO)=='Dlav')
endfunction
function S5E takes nothing returns boolean
return(S4E())
endfunction
function S6E takes nothing returns boolean
return(GetTerrainTypeBJ(ZO)=='Yhdg')or(GetTerrainTypeBJ(ZO)=='Ygsb')or(GetTerrainTypeBJ(ZO)=='Lgrd')or(GetTerrainTypeBJ(ZO)=='Agrd')
endfunction
function S7E takes nothing returns boolean
return(S6E())
endfunction
function S8E takes nothing returns boolean
return(S1E())
endfunction
function S9E takes nothing returns boolean
return(EB!='BTtw')
endfunction
function TVE takes nothing returns boolean
return(EB!='BTtw')
endfunction
function TEE takes nothing returns boolean
return(CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]>1)
endfunction
function TXE takes nothing returns nothing
set ZO=GetSpellTargetLoc()
if(S8E())then
set EB='WTst'
else
if(S7E())then
set EB='ATtr'
else
if(S5E())then
set EB='OTtw'
else
if(S3E())then
set EB='BTtw'
endif
endif
endif
endif
call CreateDestructableLoc(EB,ZO,GetRandomReal(0,360),GetRandomReal(.9,1.1),0)
if(S9E())then
call SetDestructableAnimation(bj_lastCreatedDestructable,"birth")
endif
if(TEE())then
set RX=1
loop
exitwhen RX>(CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]-1)
set AR=MJV(ZO,150.,(60.*I2R(RX)))
call CreateDestructableLoc(EB,AR,GetRandomReal(0,360),GetRandomReal(.9,1.1),0)
if(TVE())then
call SetDestructableAnimation(bj_lastCreatedDestructable,"birth")
endif
call RemoveLocation(AR)
set RX=RX+1
endloop
endif
call RemoveLocation(ZO)
endfunction
function TRE takes nothing returns boolean
return(GetIssuedOrderId()==$D0003)and(GetUnitTypeId(GetOrderedUnit())=='n00D')
endfunction
function TIE takes nothing returns nothing
set ZO=GetOrderPointLoc()
call CreateNUnitsAtLoc(1,'ngol',Player($F),ZO,bj_UNIT_FACING)
call SetResourceAmount(bj_lastCreatedUnit,$3B9ACA00)
call RemoveLocation(ZO)
endfunction
function TNE takes nothing returns boolean
return(GetIssuedOrderId()==$D0003)and(GetUnitTypeId(GetOrderedUnit())=='n00I')
endfunction
function TBE takes nothing returns nothing
set ZO=GetOrderPointLoc()
call CreateNUnitsAtLoc(1,'nfoh',Player($F),ZO,bj_UNIT_FACING)
call RemoveLocation(ZO)
endfunction
function TDE takes nothing returns boolean
return(GetIssuedOrderId()==$D0003)and(GetUnitTypeId(GetOrderedUnit())=='n00J')
endfunction
function TFE takes nothing returns nothing
set ZO=GetOrderPointLoc()
call CreateNUnitsAtLoc(1,'nmoo',Player($F),ZO,bj_UNIT_FACING)
call RemoveLocation(ZO)
endfunction
function THE takes nothing returns boolean
return(GetIssuedOrderId()==$D0003)and(GetUnitTypeId(GetOrderedUnit())=='n00C')
endfunction
function TJE takes nothing returns boolean
return(GetTerrainTypeBJ(ZO)=='cWc1')or(GetTerrainTypeBJ(ZO)=='Isnw')
endfunction
function TKE takes nothing returns boolean
return(GetTerrainTypeBJ(ZO)=='Zsan')or(GetTerrainTypeBJ(ZO)=='Bdrh')or(GetTerrainTypeBJ(ZO)=='Ydrt')
endfunction
function TLE takes nothing returns boolean
return(TKE())
endfunction
function TME takes nothing returns boolean
return(GetTerrainTypeBJ(ZO)=='Ddkr')or(GetTerrainTypeBJ(ZO)=='Dlav')
endfunction
function TPE takes nothing returns boolean
return(TME())
endfunction
function TQE takes nothing returns boolean
return(GetTerrainTypeBJ(ZO)=='Yhdg')or(GetTerrainTypeBJ(ZO)=='Ygsb')or(GetTerrainTypeBJ(ZO)=='Lgrd')or(GetTerrainTypeBJ(ZO)=='Agrd')
endfunction
function TSE takes nothing returns boolean
return(TQE())
endfunction
function TTE takes nothing returns boolean
return(TJE())
endfunction
function TUE takes nothing returns boolean
return(EB!='BTtw')
endfunction
function TWE takes nothing returns boolean
return(EB!='BTtw')
endfunction
function TYE takes nothing returns boolean
return(CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]>1)
endfunction
function TZE takes nothing returns nothing
set ZO=GetOrderPointLoc()
if(TTE())then
set EB='WTst'
else
if(TSE())then
set EB='ATtr'
else
if(TPE())then
set EB='OTtw'
else
if(TLE())then
set EB='BTtw'
endif
endif
endif
endif
call CreateDestructableLoc(EB,ZO,GetRandomReal(0,360),GetRandomReal(.9,1.1),0)
if(TUE())then
call SetDestructableAnimation(bj_lastCreatedDestructable,"birth")
endif
if(TYE())then
set RX=1
loop
exitwhen RX>(CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]-1)
set AR=MJV(ZO,150.,(60.*I2R(RX)))
call CreateDestructableLoc(EB,AR,GetRandomReal(0,360),GetRandomReal(.9,1.1),0)
if(TWE())then
call SetDestructableAnimation(bj_lastCreatedDestructable,"birth")
endif
call RemoveLocation(AR)
set RX=RX+1
endloop
endif
call RemoveLocation(ZO)
endfunction
function T0E takes nothing returns boolean
return(GetIssuedOrderId()==$D0003)and(GetUnitTypeId(GetOrderedUnit())=='n044')
endfunction
function T1E takes nothing returns nothing
call SetUnitLifePercentBJ(GetOrderTargetUnit(),'d')
call SetUnitManaPercentBJ(GetOrderTargetUnit(),'d')
endfunction
function T3E takes nothing returns boolean
return(GetIssuedOrderId()==$D0003)and(GetUnitTypeId(GetOrderedUnit())=='n00G')and(GetOrderTargetUnit()!=N8V)and(GetOrderTargetUnit()!=NSV)and(GetOrderTargetUnit()!=BYV)and(GetOrderTargetUnit()!=N5V)and(GetOrderTargetUnit()!=N7V)and(GetOrderTargetUnit()!=NTV)and(GetOrderTargetUnit()!=NWV)and(GetOrderTargetUnit()!=N1V)and(GetOrderTargetUnit()!=BRV)and(GetOrderTargetUnit()!=BIV)and(GetOrderTargetUnit()!=BHV)and(GetOrderTargetUnit()!=BFV)and(GetOrderTargetUnit()!=NUV)and(GetOrderTargetUnit()!=BEV)and(GetOrderTargetUnit()!=BSV)and(GetOrderTargetUnit()!=BQV)and(GetOrderTargetUnit()!=BDV)and(GetOrderTargetUnit()!=B_V)and(GetOrderTargetUnit()!=BZV)and(GetOrderTargetUnit()!=B3V)and(GetOrderTargetUnit()!=NZV)and(GetOrderTargetUnit()!=BMV)and(GetOrderTargetUnit()!=BPV)and(GetOrderTargetUnit()!=BLV)and(GetOrderTargetUnit()!=BKV)and(GetOrderTargetUnit()!=N0V)and(GetOrderTargetUnit()!=BOV)and(GetOrderTargetUnit()!=N6V)and(GetOrderTargetUnit()!=BBV)and(GetOrderTargetUnit()!=N_V)and(GetOrderTargetUnit()!=BTV)and(GetOrderTargetUnit()!=BUV)and(GetOrderTargetUnit()!=BNV)and(GetOrderTargetUnit()!=BCV)and(GetOrderTargetUnit()!=BAV)and(GetOrderTargetUnit()!=NYV)and(GetOrderTargetUnit()!=BWV)and(GetOrderTargetUnit()!=N9V)and(GetOrderTargetUnit()!=NLV)and(GetOrderTargetUnit()!=NHV)and(GetOrderTargetUnit()!=NGV)and(GetOrderTargetUnit()!=NBV)and(GetOrderTargetUnit()!=NNV)and(GetOrderTargetUnit()!=NJV)and(GetOrderTargetUnit()!=NFV)and(GetOrderTargetUnit()!=NDV)and(GetOrderTargetUnit()!=NCV)and(GetOrderTargetUnit()!=NMV)and(GetOrderTargetUnit()!=NKV)and(GetOrderTargetUnit()!=B2V)and(GetOrderTargetUnit()!=BGV)and(GetOrderTargetUnit()!=B1V)and(GetOrderTargetUnit()!=NQV)and(GetOrderTargetUnit()!=NPV)and(GetOrderTargetUnit()!=B0V)and(GetOrderTargetUnit()!=BXV)and(GetOrderTargetUnit()!=BJV)and(GetOrderTargetUnit()!=N4V)and(GetOrderTargetUnit()!=BVV)and(GetOrderTargetUnit()!=N2V)and(GetUnitAbilityLevelSwapped('A0II',GetOrderTargetUnit())==0)and(GetUnitTypeId(GetOrderTargetUnit())!='n01K')and(GetUnitTypeId(GetOrderTargetUnit())!='n01D')and(GetUnitTypeId(GetOrderTargetUnit())!='n04L')and(GetUnitTypeId(GetOrderTargetUnit())!='n05J')and(RectContainsUnit(N4,GetOrderTargetUnit())==false)and(GetUnitTypeId(GetOrderTargetUnit())!='H07W')and(GetUnitTypeId(GetOrderTargetUnit())!='H07V')and(GetUnitTypeId(GetOrderTargetUnit())!='H07X')and(GetUnitTypeId(GetOrderTargetUnit())!='H070')and(GetUnitTypeId(GetOrderTargetUnit())!='H071')and(GetUnitTypeId(GetOrderTargetUnit())!='H06Z')
endfunction
function T4E takes nothing returns boolean
return(T3E())
endfunction
function T5E takes nothing returns boolean
return(GetUnitTypeId(GetOrderTargetUnit())=='H066')
endfunction
function T6E takes nothing returns boolean
return(GetUnitTypeId(GetOrderTargetUnit())=='H05M')or(GetUnitTypeId(GetOrderTargetUnit())=='H05O')
endfunction
function T7E takes nothing returns boolean
return(T6E())
endfunction
function T8E takes nothing returns boolean
return(GetUnitTypeId(GetOrderTargetUnit())=='h07U')
endfunction
function T9E takes nothing returns nothing
call RemoveUnit(GetOrderTargetUnit())
if(T5E())then
call TriggerExecute(X7V)
endif
if(T7E())then
call TriggerExecute(X4V)
endif
if(T8E())then
call TriggerExecute(IPV)
endif
endfunction
function UEE takes nothing returns boolean
return(GetIssuedOrderId()==$D0003)and(GetUnitTypeId(GetOrderedUnit())=='n03E')and(GetOrderTargetUnit()!=N8V)and(GetOrderTargetUnit()!=NSV)and(GetOrderTargetUnit()!=BYV)and(GetOrderTargetUnit()!=N5V)and(GetOrderTargetUnit()!=N7V)and(GetOrderTargetUnit()!=NTV)and(GetOrderTargetUnit()!=NWV)and(GetOrderTargetUnit()!=N1V)and(GetOrderTargetUnit()!=BRV)and(GetOrderTargetUnit()!=BIV)and(GetOrderTargetUnit()!=BHV)and(GetOrderTargetUnit()!=BFV)and(GetOrderTargetUnit()!=NUV)and(GetOrderTargetUnit()!=BEV)and(GetOrderTargetUnit()!=BSV)and(GetOrderTargetUnit()!=BQV)and(GetOrderTargetUnit()!=BDV)and(GetOrderTargetUnit()!=B_V)and(GetOrderTargetUnit()!=BZV)and(GetOrderTargetUnit()!=B3V)and(GetOrderTargetUnit()!=NZV)and(GetOrderTargetUnit()!=BMV)and(GetOrderTargetUnit()!=BPV)and(GetOrderTargetUnit()!=BLV)and(GetOrderTargetUnit()!=BKV)and(GetOrderTargetUnit()!=N0V)and(GetOrderTargetUnit()!=BOV)and(GetOrderTargetUnit()!=N6V)and(GetOrderTargetUnit()!=BBV)and(GetOrderTargetUnit()!=N_V)and(GetOrderTargetUnit()!=BTV)and(GetOrderTargetUnit()!=BUV)and(GetOrderTargetUnit()!=BNV)and(GetOrderTargetUnit()!=BCV)and(GetOrderTargetUnit()!=BAV)and(GetOrderTargetUnit()!=NYV)and(GetOrderTargetUnit()!=BWV)and(GetOrderTargetUnit()!=N9V)and(GetOrderTargetUnit()!=NLV)and(GetOrderTargetUnit()!=NHV)and(GetOrderTargetUnit()!=NGV)and(GetOrderTargetUnit()!=NBV)and(GetOrderTargetUnit()!=NNV)and(GetOrderTargetUnit()!=NJV)and(GetOrderTargetUnit()!=NFV)and(GetOrderTargetUnit()!=NDV)and(GetOrderTargetUnit()!=NCV)and(GetOrderTargetUnit()!=NMV)and(GetOrderTargetUnit()!=NKV)and(GetOrderTargetUnit()!=B2V)and(GetOrderTargetUnit()!=BGV)and(GetOrderTargetUnit()!=B1V)and(GetOrderTargetUnit()!=NQV)and(GetOrderTargetUnit()!=NPV)and(GetOrderTargetUnit()!=B0V)and(GetOrderTargetUnit()!=BXV)and(GetOrderTargetUnit()!=BJV)and(GetOrderTargetUnit()!=N4V)and(GetOrderTargetUnit()!=BVV)and(GetOrderTargetUnit()!=N2V)and(GetOrderTargetUnit()!=N3V)and(GetUnitAbilityLevelSwapped('A0II',GetOrderTargetUnit())==0)and(GetUnitTypeId(GetOrderTargetUnit())!='n01K')and(GetUnitTypeId(GetOrderTargetUnit())!='n01D')and(GetUnitTypeId(GetOrderTargetUnit())!='n04L')and(GetUnitTypeId(GetOrderTargetUnit())!='n05J')and(RectContainsUnit(N4,GetOrderTargetUnit())==false)
endfunction
function UXE takes nothing returns boolean
return(UEE())
endfunction
function UOE takes nothing returns nothing
call KillUnit(GetOrderTargetUnit())
endfunction
function UIE takes nothing returns boolean
return(GetIssuedOrderId()==$D0003)and(GetUnitTypeId(GetOrderedUnit())=='n03U')and(GetOrderTargetUnit()!=N5V)and(GetOrderTargetUnit()!=N7V)and(GetOrderTargetUnit()!=N8V)and(GetOrderTargetUnit()!=NTV)and(GetOrderTargetUnit()!=NWV)and(GetOrderTargetUnit()!=N1V)and(GetOrderTargetUnit()!=BRV)and(GetOrderTargetUnit()!=BIV)and(GetOrderTargetUnit()!=BHV)and(GetOrderTargetUnit()!=BFV)and(GetOrderTargetUnit()!=NSV)and(GetOrderTargetUnit()!=NUV)and(GetOrderTargetUnit()!=BEV)and(GetOrderTargetUnit()!=BSV)and(GetOrderTargetUnit()!=BQV)and(GetOrderTargetUnit()!=BDV)and(GetOrderTargetUnit()!=B_V)and(GetOrderTargetUnit()!=BZV)and(GetOrderTargetUnit()!=B3V)and(GetOrderTargetUnit()!=NZV)and(GetOrderTargetUnit()!=BMV)and(GetOrderTargetUnit()!=BPV)and(GetOrderTargetUnit()!=BLV)and(GetOrderTargetUnit()!=BKV)and(GetOrderTargetUnit()!=N0V)and(GetOrderTargetUnit()!=BOV)and(GetOrderTargetUnit()!=N6V)and(GetOrderTargetUnit()!=BBV)and(GetOrderTargetUnit()!=N_V)and(GetOrderTargetUnit()!=BTV)and(GetOrderTargetUnit()!=BUV)and(GetOrderTargetUnit()!=BNV)and(GetOrderTargetUnit()!=BCV)and(GetOrderTargetUnit()!=BAV)and(GetOrderTargetUnit()!=NYV)and(GetOrderTargetUnit()!=BWV)and(GetOrderTargetUnit()!=N9V)and(GetOrderTargetUnit()!=NLV)and(GetOrderTargetUnit()!=NHV)and(GetOrderTargetUnit()!=NGV)and(GetOrderTargetUnit()!=NBV)and(GetOrderTargetUnit()!=NNV)and(GetOrderTargetUnit()!=NJV)and(GetOrderTargetUnit()!=NFV)and(GetOrderTargetUnit()!=NDV)and(GetOrderTargetUnit()!=NCV)and(GetOrderTargetUnit()!=NMV)and(GetOrderTargetUnit()!=NKV)and(GetOrderTargetUnit()!=B2V)and(GetOrderTargetUnit()!=BGV)and(GetOrderTargetUnit()!=B1V)and(GetOrderTargetUnit()!=NQV)and(GetOrderTargetUnit()!=NPV)and(GetOrderTargetUnit()!=B0V)and(GetOrderTargetUnit()!=BXV)and(GetOrderTargetUnit()!=BVV)and(GetOrderTargetUnit()!=N2V)and(GetOrderTargetUnit()!=N3V)and(GetUnitTypeId(GetOrderTargetUnit())!='n01K')and(GetUnitTypeId(GetOrderTargetUnit())!='n01D')and(GetUnitTypeId(GetOrderTargetUnit())!='n04L')and(GetUnitTypeId(GetOrderTargetUnit())!='n05J')and(RectContainsUnit(N4,GetOrderTargetUnit())==false)
endfunction
function UAE takes nothing returns boolean
return(UIE())
endfunction
function UNE takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function UBE takes nothing returns nothing
call SetUnitInvulnerable(GetEnumUnit(),false)
endfunction
function UCE takes nothing returns boolean
return(GI==1)
endfunction
function UDE takes nothing returns nothing
if(UCE())then
call ForGroupBJ(M6V(GetOwningPlayer(GetOrderTargetUnit()),Condition(function UNE)),function UBE)
call DestroyGroup(bj_lastCreatedGroup)
set GI=0
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Using the Power : Mind will only affect the target unit.")
else
call SetUnitInvulnerable(GetOrderTargetUnit(),false)
endif
endfunction
function UGE takes nothing returns boolean
return(GetIssuedOrderId()==$D0003)and(GetUnitTypeId(GetOrderedUnit())=='n03V')and(GetOrderTargetUnit()!=N5V)and(GetOrderTargetUnit()!=N7V)and(GetOrderTargetUnit()!=N8V)and(GetOrderTargetUnit()!=NTV)and(GetOrderTargetUnit()!=NWV)and(GetOrderTargetUnit()!=N1V)and(GetOrderTargetUnit()!=BRV)and(GetOrderTargetUnit()!=BIV)and(GetOrderTargetUnit()!=BHV)and(GetOrderTargetUnit()!=BFV)and(GetOrderTargetUnit()!=NSV)and(GetOrderTargetUnit()!=NUV)and(GetOrderTargetUnit()!=BEV)and(GetOrderTargetUnit()!=BSV)and(GetOrderTargetUnit()!=BQV)and(GetOrderTargetUnit()!=BDV)and(GetOrderTargetUnit()!=B_V)and(GetOrderTargetUnit()!=BZV)and(GetOrderTargetUnit()!=B3V)and(GetOrderTargetUnit()!=NZV)and(GetOrderTargetUnit()!=BMV)and(GetOrderTargetUnit()!=BPV)and(GetOrderTargetUnit()!=BLV)and(GetOrderTargetUnit()!=BKV)and(GetOrderTargetUnit()!=N0V)and(GetOrderTargetUnit()!=BOV)and(GetOrderTargetUnit()!=N6V)and(GetOrderTargetUnit()!=BBV)and(GetOrderTargetUnit()!=N_V)and(GetOrderTargetUnit()!=BTV)and(GetOrderTargetUnit()!=BUV)and(GetOrderTargetUnit()!=BNV)and(GetOrderTargetUnit()!=BCV)and(GetOrderTargetUnit()!=BAV)and(GetOrderTargetUnit()!=NYV)and(GetOrderTargetUnit()!=BWV)and(GetOrderTargetUnit()!=N9V)and(GetOrderTargetUnit()!=NLV)and(GetOrderTargetUnit()!=NHV)and(GetOrderTargetUnit()!=NGV)and(GetOrderTargetUnit()!=NBV)and(GetOrderTargetUnit()!=NNV)and(GetOrderTargetUnit()!=NJV)and(GetOrderTargetUnit()!=NFV)and(GetOrderTargetUnit()!=NDV)and(GetOrderTargetUnit()!=NCV)and(GetOrderTargetUnit()!=NMV)and(GetOrderTargetUnit()!=NKV)and(GetOrderTargetUnit()!=B2V)and(GetOrderTargetUnit()!=BGV)and(GetOrderTargetUnit()!=B1V)and(GetOrderTargetUnit()!=NQV)and(GetOrderTargetUnit()!=NPV)and(GetOrderTargetUnit()!=B0V)and(GetOrderTargetUnit()!=BXV)and(GetOrderTargetUnit()!=BVV)and(GetOrderTargetUnit()!=N2V)and(GetUnitTypeId(GetOrderTargetUnit())!='n01K')and(GetUnitTypeId(GetOrderTargetUnit())!='n01D')and(GetUnitTypeId(GetOrderTargetUnit())!='n04L')and(GetUnitTypeId(GetOrderTargetUnit())!='n05J')and(RectContainsUnit(N4,GetOrderTargetUnit())==false)
endfunction
function UHE takes nothing returns boolean
return(UGE())
endfunction
function UJE takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function UKE takes nothing returns nothing
call SetUnitInvulnerable(GetEnumUnit(),true)
endfunction
function ULE takes nothing returns boolean
return(GI==1)
endfunction
function UME takes nothing returns nothing
if(ULE())then
call ForGroupBJ(M6V(GetOwningPlayer(GetOrderTargetUnit()),Condition(function UJE)),function UKE)
call DestroyGroup(bj_lastCreatedGroup)
set GI=0
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Using the Power : Mind will only affect the target unit.")
else
call SetUnitInvulnerable(GetOrderTargetUnit(),true)
endif
endfunction
function UQE takes nothing returns boolean
return(GetIssuedOrderId()==$D0003)and(RectContainsUnit(R4,GetOrderTargetUnit())==false)
endfunction
function USE takes nothing returns boolean
return(UQE())
endfunction
function UTE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetOrderTargetUnit())==0)
endfunction
function UUE takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function UWE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetEnumUnit())==0)
endfunction
function UYE takes nothing returns nothing
if(UWE())then
call SetUnitOwner(GetEnumUnit(),HI,true)
endif
endfunction
function UZE takes nothing returns boolean
return(GI==1)
endfunction
function U_E takes nothing returns boolean
return(GetUnitTypeId(GetOrderedUnit())=='n039')
endfunction
function U0E takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetOrderTargetUnit())==0)
endfunction
function U1E takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function U2E takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetEnumUnit())==0)
endfunction
function U3E takes nothing returns nothing
if(U2E())then
call SetUnitOwner(GetEnumUnit(),HI,true)
endif
endfunction
function U4E takes nothing returns boolean
return(GI==1)
endfunction
function U5E takes nothing returns boolean
return(GetUnitTypeId(GetOrderedUnit())=='n03D')
endfunction
function U6E takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetOrderTargetUnit())==0)
endfunction
function U7E takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function U8E takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetEnumUnit())==0)
endfunction
function U9E takes nothing returns nothing
if(U8E())then
call SetUnitOwner(GetEnumUnit(),HI,true)
endif
endfunction
function WVE takes nothing returns boolean
return(GI==1)
endfunction
function WEE takes nothing returns boolean
return(GetUnitTypeId(GetOrderedUnit())=='n03C')
endfunction
function WXE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetOrderTargetUnit())==0)
endfunction
function WOE takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function WRE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetEnumUnit())==0)
endfunction
function WIE takes nothing returns nothing
if(WRE())then
call SetUnitOwner(GetEnumUnit(),HI,true)
endif
endfunction
function WAE takes nothing returns boolean
return(GI==1)
endfunction
function WNE takes nothing returns boolean
return(GetUnitTypeId(GetOrderedUnit())=='n00K')
endfunction
function WBE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetOrderTargetUnit())==0)
endfunction
function WCE takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function WDE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetEnumUnit())==0)
endfunction
function WFE takes nothing returns nothing
if(WDE())then
call SetUnitOwner(GetEnumUnit(),HI,true)
endif
endfunction
function WGE takes nothing returns boolean
return(GI==1)
endfunction
function WHE takes nothing returns boolean
return(GetUnitTypeId(GetOrderedUnit())=='n02Z')
endfunction
function WJE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetOrderTargetUnit())==0)
endfunction
function WKE takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function WLE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetEnumUnit())==0)
endfunction
function WME takes nothing returns nothing
if(WLE())then
call SetUnitOwner(GetEnumUnit(),HI,true)
endif
endfunction
function WPE takes nothing returns boolean
return(GI==1)
endfunction
function WQE takes nothing returns boolean
return(GetUnitTypeId(GetOrderedUnit())=='n031')
endfunction
function WSE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetOrderTargetUnit())==0)
endfunction
function WTE takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function WUE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetEnumUnit())==0)
endfunction
function WWE takes nothing returns nothing
if(WUE())then
call SetUnitOwner(GetEnumUnit(),HI,true)
endif
endfunction
function WYE takes nothing returns boolean
return(GI==1)
endfunction
function WZE takes nothing returns boolean
return(GetUnitTypeId(GetOrderedUnit())=='n032')
endfunction
function W_E takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetOrderTargetUnit())==0)
endfunction
function W0E takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function W1E takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetEnumUnit())==0)
endfunction
function W2E takes nothing returns nothing
if(W1E())then
call SetUnitOwner(GetEnumUnit(),HI,true)
endif
endfunction
function W3E takes nothing returns boolean
return(GI==1)
endfunction
function W4E takes nothing returns boolean
return(GetUnitTypeId(GetOrderedUnit())=='n033')
endfunction
function W5E takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetOrderTargetUnit())==0)
endfunction
function W6E takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function W7E takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetEnumUnit())==0)
endfunction
function W8E takes nothing returns nothing
if(W7E())then
call SetUnitOwner(GetEnumUnit(),HI,true)
endif
endfunction
function W9E takes nothing returns boolean
return(GI==1)
endfunction
function YVE takes nothing returns boolean
return(GetUnitTypeId(GetOrderedUnit())=='n034')
endfunction
function YEE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetOrderTargetUnit())==0)
endfunction
function YXE takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function YOE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetEnumUnit())==0)
endfunction
function YRE takes nothing returns nothing
if(YOE())then
call SetUnitOwner(GetEnumUnit(),HI,true)
endif
endfunction
function YIE takes nothing returns boolean
return(GI==1)
endfunction
function YAE takes nothing returns boolean
return(GetUnitTypeId(GetOrderedUnit())=='n035')
endfunction
function YNE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetOrderTargetUnit())==0)
endfunction
function YBE takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function YCE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetEnumUnit())==0)
endfunction
function YDE takes nothing returns nothing
if(YCE())then
call SetUnitOwner(GetEnumUnit(),HI,true)
endif
endfunction
function YFE takes nothing returns boolean
return(GI==1)
endfunction
function YGE takes nothing returns boolean
return(GetUnitTypeId(GetOrderedUnit())=='n036')
endfunction
function YHE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetOrderTargetUnit())==0)
endfunction
function YJE takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function YKE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetEnumUnit())==0)
endfunction
function YLE takes nothing returns nothing
if(YKE())then
call SetUnitOwner(GetEnumUnit(),HI,true)
endif
endfunction
function YME takes nothing returns boolean
return(GI==1)
endfunction
function YPE takes nothing returns boolean
return(GetUnitTypeId(GetOrderedUnit())=='n037')
endfunction
function YQE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetOrderTargetUnit())==0)
endfunction
function YSE takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function YTE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetEnumUnit())==0)
endfunction
function YUE takes nothing returns nothing
if(YTE())then
call SetUnitOwner(GetEnumUnit(),HI,true)
endif
endfunction
function YWE takes nothing returns boolean
return(GI==1)
endfunction
function YYE takes nothing returns boolean
return(GetUnitTypeId(GetOrderedUnit())=='n010')
endfunction
function YZE takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetOrderTargetUnit())==0)
endfunction
function Y_E takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function Y0E takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetEnumUnit())==0)
endfunction
function Y1E takes nothing returns nothing
if(Y0E())then
call SetUnitOwner(GetEnumUnit(),HI,true)
endif
endfunction
function Y2E takes nothing returns boolean
return(GI==1)
endfunction
function Y3E takes nothing returns boolean
return(GetUnitTypeId(GetOrderedUnit())=='n00L')
endfunction
function Y4E takes nothing returns nothing
if(U_E())then
set HI=Player(0)
if(UZE())then
call ForGroupBJ(M6V(GetOwningPlayer(GetOrderTargetUnit()),Condition(function UUE)),function UYE)
call DestroyGroup(bj_lastCreatedGroup)
set GI=0
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Using the Power : Mind will only affect the target unit.")
else
if(UTE())then
call SetUnitOwner(GetOrderTargetUnit(),HI,true)
endif
endif
endif
if(U5E())then
set HI=Player(1)
if(U4E())then
call ForGroupBJ(M6V(GetOwningPlayer(GetOrderTargetUnit()),Condition(function U1E)),function U3E)
call DestroyGroup(bj_lastCreatedGroup)
set GI=0
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Using the Power : Mind will only affect the target unit.")
else
if(U0E())then
call SetUnitOwner(GetOrderTargetUnit(),HI,true)
endif
endif
endif
if(WEE())then
set HI=Player(2)
if(WVE())then
call ForGroupBJ(M6V(GetOwningPlayer(GetOrderTargetUnit()),Condition(function U7E)),function U9E)
call DestroyGroup(bj_lastCreatedGroup)
set GI=0
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Using the Power : Mind will only affect the target unit.")
else
if(U6E())then
call SetUnitOwner(GetOrderTargetUnit(),HI,true)
endif
endif
endif
if(WNE())then
set HI=Player(3)
if(WAE())then
call ForGroupBJ(M6V(GetOwningPlayer(GetOrderTargetUnit()),Condition(function WOE)),function WIE)
call DestroyGroup(bj_lastCreatedGroup)
set GI=0
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Using the Power : Mind will only affect the target unit.")
else
if(WXE())then
call SetUnitOwner(GetOrderTargetUnit(),HI,true)
endif
endif
endif
if(WHE())then
set HI=Player(4)
if(WGE())then
call ForGroupBJ(M6V(GetOwningPlayer(GetOrderTargetUnit()),Condition(function WCE)),function WFE)
call DestroyGroup(bj_lastCreatedGroup)
set GI=0
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Using the Power : Mind will only affect the target unit.")
else
if(WBE())then
call SetUnitOwner(GetOrderTargetUnit(),HI,true)
endif
endif
endif
if(WQE())then
set HI=Player(5)
if(WPE())then
call ForGroupBJ(M6V(GetOwningPlayer(GetOrderTargetUnit()),Condition(function WKE)),function WME)
call DestroyGroup(bj_lastCreatedGroup)
set GI=0
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Using the Power : Mind will only affect the target unit.")
else
if(WJE())then
call SetUnitOwner(GetOrderTargetUnit(),HI,true)
endif
endif
endif
if(WZE())then
set HI=Player(6)
if(WYE())then
call ForGroupBJ(M6V(GetOwningPlayer(GetOrderTargetUnit()),Condition(function WTE)),function WWE)
call DestroyGroup(bj_lastCreatedGroup)
set GI=0
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Using the Power : Mind will only affect the target unit.")
else
if(WSE())then
call SetUnitOwner(GetOrderTargetUnit(),HI,true)
endif
endif
endif
if(W4E())then
set HI=Player(7)
if(W3E())then
call ForGroupBJ(M6V(GetOwningPlayer(GetOrderTargetUnit()),Condition(function W0E)),function W2E)
call DestroyGroup(bj_lastCreatedGroup)
set GI=0
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Using the Power : Mind will only affect the target unit.")
else
if(W_E())then
call SetUnitOwner(GetOrderTargetUnit(),HI,true)
endif
endif
endif
if(YVE())then
set HI=Player(8)
if(W9E())then
call ForGroupBJ(M6V(GetOwningPlayer(GetOrderTargetUnit()),Condition(function W6E)),function W8E)
call DestroyGroup(bj_lastCreatedGroup)
set GI=0
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Using the Power : Mind will only affect the target unit.")
else
if(W5E())then
call SetUnitOwner(GetOrderTargetUnit(),HI,true)
endif
endif
endif
if(YAE())then
set HI=Player(9)
if(YIE())then
call ForGroupBJ(M6V(GetOwningPlayer(GetOrderTargetUnit()),Condition(function YXE)),function YRE)
call DestroyGroup(bj_lastCreatedGroup)
set GI=0
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Using the Power : Mind will only affect the target unit.")
else
if(YEE())then
call SetUnitOwner(GetOrderTargetUnit(),HI,true)
endif
endif
endif
if(YGE())then
set HI=Player($A)
if(YFE())then
call ForGroupBJ(M6V(GetOwningPlayer(GetOrderTargetUnit()),Condition(function YBE)),function YDE)
call DestroyGroup(bj_lastCreatedGroup)
set GI=0
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Using the Power : Mind will only affect the target unit.")
else
if(YNE())then
call SetUnitOwner(GetOrderTargetUnit(),HI,true)
endif
endif
endif
if(YPE())then
set HI=Player($B)
if(YME())then
call ForGroupBJ(M6V(GetOwningPlayer(GetOrderTargetUnit()),Condition(function YJE)),function YLE)
call DestroyGroup(bj_lastCreatedGroup)
set GI=0
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Using the Power : Mind will only affect the target unit.")
else
if(YHE())then
call SetUnitOwner(GetOrderTargetUnit(),HI,true)
endif
endif
endif
if(YYE())then
set HI=Player($C)
if(YWE())then
call ForGroupBJ(M6V(GetOwningPlayer(GetOrderTargetUnit()),Condition(function YSE)),function YUE)
call DestroyGroup(bj_lastCreatedGroup)
set GI=0
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Using the Power : Mind will only affect the target unit.")
else
if(YQE())then
call SetUnitOwner(GetOrderTargetUnit(),HI,true)
endif
endif
endif
if(Y3E())then
set HI=Player($F)
if(Y2E())then
call ForGroupBJ(M6V(GetOwningPlayer(GetOrderTargetUnit()),Condition(function Y_E)),function Y1E)
call DestroyGroup(bj_lastCreatedGroup)
set GI=0
call DisplayTimedTextToForce(PVV(GetTriggerPlayer()),10.,"Using the Power : Mind will only affect the target unit.")
else
if(YZE())then
call SetUnitOwner(GetOrderTargetUnit(),HI,true)
endif
endif
endif
endfunction
function Y6E takes nothing returns boolean
return(GetIssuedOrderId()==$D0003)and(GetUnitTypeId(GetOrderedUnit())=='n00H')
endfunction
function Y7E takes nothing returns boolean
return(GetDestructableTypeId(GetEnumDestructable())=='YT14')or(GetDestructableTypeId(GetEnumDestructable())=='YT38')or(GetDestructableTypeId(GetEnumDestructable())=='YT36')or(GetDestructableTypeId(GetEnumDestructable())=='YT12')or(GetDestructableTypeId(GetEnumDestructable())=='YT18')or(GetDestructableTypeId(GetEnumDestructable())=='YT42')or(GetDestructableTypeId(GetEnumDestructable())=='YT40')or(GetDestructableTypeId(GetEnumDestructable())=='YT16')or(GetDestructableTypeId(GetEnumDestructable())=='LT06')or(GetDestructableTypeId(GetEnumDestructable())=='LT04')or(GetDestructableTypeId(GetEnumDestructable())=='YT00')or(GetDestructableTypeId(GetEnumDestructable())=='YT24')or(GetDestructableTypeId(GetEnumDestructable())=='LTr8')or(GetDestructableTypeId(GetEnumDestructable())=='LTs8')or(GetDestructableTypeId(GetEnumDestructable())=='LTs2')or(GetDestructableTypeId(GetEnumDestructable())=='LTr2')or(GetDestructableTypeId(GetEnumDestructable())=='DTs2')or(GetDestructableTypeId(GetEnumDestructable())=='DTsb')or(GetDestructableTypeId(GetEnumDestructable())=='YT22')or(GetDestructableTypeId(GetEnumDestructable())=='YT46')or(GetDestructableTypeId(GetEnumDestructable())=='YT44')or(GetDestructableTypeId(GetEnumDestructable())=='YT20')
endfunction
function Y8E takes nothing returns boolean
return(Y7E())
endfunction
function Y9E takes nothing returns nothing
if(Y8E())then
else
call RemoveDestructable(GetEnumDestructable())
endif
endfunction
function ZVE takes nothing returns nothing
set ZO=GetOrderPointLoc()
call MQV((I2R(CI[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))])*100.),ZO,function Y9E)
call RemoveLocation(ZO)
endfunction
function ZXE takes nothing returns boolean
return(GetIssuedOrderId()==$D0003)and(GetUnitTypeId(GetOrderedUnit())=='n00M')and(GetUnitTypeId(GetOrderTargetUnit())!='H015')and(GetUnitAbilityLevelSwapped('A0II',GetOrderTargetUnit())==0)
endfunction
function ZOE takes nothing returns nothing
call SetHeroLevelBJ(GetOrderTargetUnit(),(GetHeroLevel(GetOrderTargetUnit())+1),true)
endfunction
function ZIE takes nothing returns boolean
return(GetIssuedOrderId()==$D0003)and(GetUnitTypeId(GetOrderedUnit())=='n00N')and(GetUnitTypeId(GetOrderTargetUnit())!='H015')and(GetUnitAbilityLevelSwapped('A0II',GetOrderTargetUnit())==0)
endfunction
function ZAE takes nothing returns nothing
call SetHeroLevelBJ(GetOrderTargetUnit(),(GetHeroLevel(GetOrderTargetUnit())-1),true)
endfunction
function ZBE takes nothing returns boolean
return(GetUnitTypeId(GetOrderedUnit())=='n00C')or(GetUnitTypeId(GetOrderedUnit())=='n00D')or(GetUnitTypeId(GetOrderedUnit())=='n00N')or(GetUnitTypeId(GetOrderedUnit())=='n00M')or(GetUnitTypeId(GetOrderedUnit())=='n00I')or(GetUnitTypeId(GetOrderedUnit())=='n00J')or(GetUnitTypeId(GetOrderedUnit())=='n00K')or(GetUnitTypeId(GetOrderedUnit())=='n00L')or(GetUnitTypeId(GetOrderedUnit())=='n00G')or(GetUnitTypeId(GetOrderedUnit())=='n00H')or(GetUnitTypeId(GetOrderedUnit())=='n010')
endfunction
function ZCE takes nothing returns boolean
return(ZBE())
endfunction
function ZDE takes nothing returns nothing
call TriggerSleepAction(.01)
call IssueImmediateOrderById(GetOrderedUnit(),$D0004)
endfunction
function ZGE takes nothing returns boolean
return(GetUnitTypeId(GetOrderedUnit())=='n00C')or(GetUnitTypeId(GetOrderedUnit())=='n00D')or(GetUnitTypeId(GetOrderedUnit())=='n00N')or(GetUnitTypeId(GetOrderedUnit())=='n00M')or(GetUnitTypeId(GetOrderedUnit())=='n00I')or(GetUnitTypeId(GetOrderedUnit())=='n00J')or(GetUnitTypeId(GetOrderedUnit())=='n00K')or(GetUnitTypeId(GetOrderedUnit())=='n00L')or(GetUnitTypeId(GetOrderedUnit())=='n00G')or(GetUnitTypeId(GetOrderedUnit())=='n00H')or(GetUnitTypeId(GetOrderedUnit())=='n010')
endfunction
function ZHE takes nothing returns boolean
return(ZGE())
endfunction
function ZJE takes nothing returns nothing
call TriggerSleepAction(.01)
call IssueImmediateOrderById(GetOrderedUnit(),$D0004)
endfunction
function ZLE takes nothing returns boolean
return(GetSpellAbilityId()=='A021')
endfunction
function ZME takes nothing returns nothing
set KO=GetUnitLoc(GetSpellAbilityUnit())
set MX=MJV(KO,100.,(GetUnitFacing(GetSpellAbilityUnit())+90.))
call CreateNUnitsAtLoc(1,'n00O',GetOwningPlayer(DR),MX,GetUnitFacing(GetSpellAbilityUnit()))
set ZR=bj_lastCreatedUnit
call RemoveLocation(MX)
set MX=MJV(KO,100.,(GetUnitFacing(GetSpellAbilityUnit())-90.))
call CreateNUnitsAtLoc(1,'n00P',GetOwningPlayer(DR),MX,GetUnitFacing(GetSpellAbilityUnit()))
set FO=bj_lastCreatedUnit
call RemoveLocation(MX)
call RemoveLocation(KO)
endfunction
function ZQE takes nothing returns boolean
return(GetDyingUnit()==ZR)
endfunction
function ZSE takes nothing returns nothing
set ZR=null
endfunction
function ZUE takes nothing returns boolean
return(GetDyingUnit()==FO)
endfunction
function ZWE takes nothing returns nothing
set FO=null
endfunction
function ZZE takes nothing returns boolean
return(GetSpellAbilityId()=='A02L')
endfunction
function Z_E takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A02L',GetSpellAbilityUnit())==1)
endfunction
function Z0E takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A02L',GetSpellAbilityUnit())==2)
endfunction
function Z1E takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A02L',GetSpellAbilityUnit())==3)
endfunction
function Z2E takes nothing returns nothing
set AI=GetUnitLoc(GetTriggerUnit())
call KillUnit(NO)
if(Z_E())then
call CreateNUnitsAtLoc(1,'n00S',GetOwningPlayer(GetSpellAbilityUnit()),AI,GetUnitFacing(GetSpellAbilityUnit()))
set NO=bj_lastCreatedUnit
endif
if(Z0E())then
call CreateNUnitsAtLoc(1,'n00U',GetOwningPlayer(GetSpellAbilityUnit()),AI,GetUnitFacing(GetSpellAbilityUnit()))
set NO=bj_lastCreatedUnit
endif
if(Z1E())then
call CreateNUnitsAtLoc(1,'n00T',GetOwningPlayer(GetSpellAbilityUnit()),AI,GetUnitFacing(GetSpellAbilityUnit()))
set NO=bj_lastCreatedUnit
endif
call RemoveLocation(AI)
endfunction
function Z4E takes nothing returns boolean
return(GetSpellAbilityId()=='A02P')
endfunction
function Z5E takes nothing returns nothing
set YE=GetSpellTargetUnit()
call PauseUnit(YE,true)
set LX=GetUnitLoc(YE)
call TriggerSleepAction(1.)
set NR=1
loop
exitwhen NR>$A
set QE=MJV(LX,400.,((I2R(NR)*36.)+.0))
call CreateNUnitsAtLocFacingLocBJ(1,'o008',GetOwningPlayer(XO),QE,LX)
call UnitApplyTimedLifeBJ(2.5,'BHwe',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,$D000F,YE)
call RemoveLocation(QE)
set NR=NR+1
endloop
set NR=1
loop
exitwhen NR>$A
set QE=MJV(LX,400.,((I2R(NR)*36.)+18.))
call CreateNUnitsAtLocFacingLocBJ(1,'o006',GetOwningPlayer(XO),QE,LX)
call UnitApplyTimedLifeBJ(2.5,'BHwe',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,$D000F,YE)
call RemoveLocation(QE)
set NR=NR+1
endloop
set NR=1
loop
exitwhen NR>$A
set QE=MJV(LX,400.,((I2R(NR)*36.)+.0))
call CreateNUnitsAtLocFacingLocBJ(1,'o006',GetOwningPlayer(XO),QE,LX)
call UnitApplyTimedLifeBJ(2.5,'BHwe',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,$D000F,YE)
call RemoveLocation(QE)
set NR=NR+1
endloop
set NR=1
loop
exitwhen NR>$A
set QE=MJV(LX,400.,((I2R(NR)*36.)+18.))
call CreateNUnitsAtLocFacingLocBJ(1,'o009',GetOwningPlayer(XO),QE,LX)
call UnitApplyTimedLifeBJ(2.5,'BHwe',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,$D000F,YE)
call RemoveLocation(QE)
set NR=NR+1
endloop
set NR=1
loop
exitwhen NR>$A
set QE=MJV(LX,400.,((I2R(NR)*36.)+.0))
call CreateNUnitsAtLocFacingLocBJ(1,'o00A',GetOwningPlayer(XO),QE,LX)
call UnitApplyTimedLifeBJ(2.5,'BHwe',bj_lastCreatedUnit)
call IssueTargetOrderById(bj_lastCreatedUnit,$D000F,YE)
call RemoveLocation(QE)
set NR=NR+1
endloop
call RemoveLocation(LX)
call TriggerSleepAction(3.)
call PauseUnit(YE,false)
endfunction
function Z7E takes nothing returns boolean
return(GetSpellAbilityId()=='A02T')
endfunction
function Z8E takes nothing returns boolean
return((IsPlayerInForce(GetOwningPlayer(GetEnumUnit()),PEV(GetOwningPlayer(GetSpellAbilityUnit())))==false)and(IsUnitType(GetEnumUnit(),UNIT_TYPE_GROUND)))!=null
endfunction
function Z9E takes nothing returns nothing
if(Z8E())then
set FX=GroupPickRandomUnit(CX)
call UnitApplyTimedLifeBJ(1.,'BHwe',FX)
call GroupRemoveUnit(CX,FX)
call IssueTargetOrderById(FX,$D00CB,GetEnumUnit())
endif
endfunction
function VVX takes nothing returns nothing
call UnitApplyTimedLifeBJ(.1,'BHwe',GetEnumUnit())
endfunction
function VEX takes nothing returns nothing
set AX=GetSpellTargetLoc()
set PE=M3V(500.,AX)
set BO=CountUnitsInGroup(PE)
set CX=M4V('o00B')
call ForGroupBJ(PE,function Z9E)
call ForGroupBJ(CX,function VVX)
call RemoveLocation(AX)
call DestroyGroup(PE)
call DestroyGroup(CX)
endfunction
function VOX takes nothing returns boolean
return(GetSpellAbilityId()=='A045')
endfunction
function VRX takes nothing returns nothing
set ME=GetSpellTargetUnit()
set CO=GetUnitLoc(ME)
call SetUnitInvulnerable(IX,true)
call SetUnitInvulnerable(ME,true)
call PauseUnit(IX,true)
call PauseUnit(ME,true)
call SetUnitPathing(IX,false)
call SetUnitPathing(ME,false)
call SetUnitTimeScalePercent(IX,500.)
call SetUnitTimeScalePercent(ME,50.)
call EnableTrigger(XPV)
call TriggerSleepAction(3.)
call DisableTrigger(XPV)
call RemoveLocation(CO)
call CreateTextTagUnitBJ("",ME,0,$A,100.,.0,.0,0)
set JR=bj_lastCreatedTextTag
call SetTextTagPermanentBJ(JR,false)
call ShowTextTagForceBJ(true,JR,bj_FORCE_ALL_PLAYERS)
call SetTextTagLifespanBJ(JR,5)
call SetTextTagFadepointBJ(JR,4)
call SetTextTagVelocityBJ(JR,64,90)
call CreateTextTagUnitBJ("",IX,0,$A,.0,100.,.0,0)
set JR=bj_lastCreatedTextTag
call SetTextTagPermanentBJ(JR,false)
call ShowTextTagForceBJ(true,JR,bj_FORCE_ALL_PLAYERS)
call SetTextTagLifespanBJ(JR,5)
call SetTextTagFadepointBJ(JR,4)
call SetTextTagVelocityBJ(JR,64,90)
call SetUnitInvulnerable(IX,false)
call SetUnitInvulnerable(ME,false)
call PauseUnit(IX,false)
call PauseUnit(ME,false)
call SetUnitPathing(IX,true)
call SetUnitPathing(ME,true)
call SetUnitTimeScalePercent(IX,100.)
call SetUnitTimeScalePercent(ME,100.)
call UnitDamageTargetBJ(IX,ME,550.,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_NORMAL)
call SetWidgetLife(IX,(GetUnitStateSwap(UNIT_STATE_LIFE,IX)+550.))
endfunction
function VAX takes nothing returns boolean
return(ME!=null)
endfunction
function VNX takes nothing returns nothing
set QX=MJV(CO,70.,GetRandomReal(0,360))
call SetUnitAnimationWithRarity(IX,"attack",RARITY_FREQUENT)
call SetUnitPositionLocFacingLocBJ(IX,QX,CO)
call AddSpecialEffectTargetUnitBJ("origin",ME,"Objects\\Spawnmodels\\Human\\HumanLargeDeathExplode\\HumanLargeDeathExplode.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call StopSoundBJ(N5,false)
call SetSoundPositionLocBJ(N5,CO,0)
call PlaySoundBJ(N5)
call RemoveLocation(QX)
endfunction
function VCX takes nothing returns boolean
return(GetSpellAbilityId()=='A04G')
endfunction
function VDX takes nothing returns nothing
set WE=GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc(1,'n01F',GetOwningPlayer(EO),WE,GetRandomReal(0,360))
call RemoveLocation(WE)
endfunction
function VFX takes nothing returns nothing
call EnableWeatherEffect(DO,true)
call TriggerSleepAction(30.)
call EnableWeatherEffect(DO,false)
set UE=M4V('o01B')
call ForGroupBJ(UE,function VDX)
call DestroyGroup(UE)
endfunction
function VHX takes nothing returns boolean
return(GetDyingUnit()==ZX)
endfunction
function VJX takes nothing returns nothing
call TriggerSleepAction(1.)
set ZE=GetPlayerStartLocationLoc(GetOwningPlayer(ZX))
call ReviveHeroLoc(GetDyingUnit(),ZE,true)
call RemoveLocation(ZE)
endfunction
function VLX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='n03F')and(IsUnitInGroup(GetTriggerUnit(),TN))
endfunction
function VMX takes nothing returns boolean
return(VLX())
endfunction
function VPX takes nothing returns nothing
call UnitDamageTargetBJ(GroupPickRandomUnit(M7V(GetTriggerPlayer())),GetEnumUnit(),500.,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNIVERSAL)
call AddSpecialEffectTargetUnitBJ("origin",GetEnumUnit(),"Objects\\Spawnmodels\\Human\\HCancelDeath\\HCancelDeath.mdl")
endfunction
function VQX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL))!=null
endfunction
function VSX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction
function VTX takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())!='h051')
endfunction
function VUX takes nothing returns boolean
return GetBooleanAnd(VSX(),VTX())
endfunction
function VWX takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function VYX takes nothing returns boolean
return GetBooleanAnd(VUX(),VWX())
endfunction
function VZX takes nothing returns boolean
return GetBooleanAnd(VQX(),VYX())
endfunction
function V_X takes nothing returns nothing
call PauseUnit(GetEnumUnit(),true)
call SetUnitAnimation(GetEnumUnit(),"stand")
call SetUnitTimeScalePercent(GetEnumUnit(),.0)
endfunction
function V0X takes nothing returns boolean
return(CountUnitsInGroup(M8V(GetOwningPlayer(GetTriggerUnit()),'n03F'))==1)
endfunction
function V1X takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
call AddSpecialEffectLocBJ(SI,"war3mapImported\\NuclearExplosion5.mdx")
call GroupRemoveUnit(TN,GetTriggerUnit())
call ForGroupBJ(M3V(750.,SI),function VPX)
call DestroyGroup(bj_lastCreatedGroup)
if(V0X())then
call ForGroupBJ(M6V(GetOwningPlayer(GetTriggerUnit()),Condition(function VZX)),function V_X)
call DestroyGroup(bj_lastCreatedGroup)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cffff8040Warning: The robots lost all their power supply, all robots will now shutdown.|r")
call RemoveLocation(SI)
endif
call RemoveUnit(GetTriggerUnit())
endfunction
function V3X takes nothing returns boolean
return(GetUnitTypeId(GetConstructedStructure())=='h065')
endfunction
function V4X takes nothing returns nothing
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cffff8040Warning: The robots have successfully built a Time Machine.|r")
call GroupAddUnit(TN,GetTriggerUnit())
endfunction
function V6X takes nothing returns boolean
return(GetSpellAbilityId()=='A0DJ')
endfunction
function V7X takes nothing returns boolean
return(RectContainsUnit(R4,GetFilterUnit())==false)
endfunction
function V8X takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())!='h065')
endfunction
function V9X takes nothing returns boolean
return GetBooleanAnd(V7X(),V8X())
endfunction
function EVX takes nothing returns nothing
set QN=GetUnitLoc(GetEnumUnit())
call AddSpecialEffectLocBJ(QN,"Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl")
call RemoveUnit(GetEnumUnit())
call RemoveLocation(QN)
endfunction
function EEX takes nothing returns boolean
return(MN==0)
endfunction
function EXX takes nothing returns boolean
return(IsUnitAliveBJ(GetTriggerUnit()))
endfunction
function EOX takes nothing returns nothing
set QN=GetUnitLoc(GetTriggerUnit())
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cffff0000Warning: The Time Machine is about to be activated!|r")
call PingMinimapLocForForceEx(bj_FORCE_ALL_PLAYERS,QN,10.,2,'d',.0,.0)
call SetUnitAnimation(GetTriggerUnit(),"stand alternate")
set PN=1
loop
exitwhen PN>$A
set MN=('d'-(PN*$A))
if(EXX())then
if(EEX())then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cffff0000Warning: The Time Machine has been activated!|r")
call RemoveLocation(QN)
call ForGroupBJ(M6V(GetOwningPlayer(GetTriggerUnit()),Condition(function V9X)),function EVX)
else
call AddSpecialEffectLocBJ(QN,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,5.,("Time machine will activate in: "+(I2S(MN)+" seconds.")))
call TriggerSleepAction(10.)
endif
else
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cff00ff00Note: The Time Machine has been stopped.|r")
set PN=$F
endif
set PN=PN+1
endloop
endfunction
function EIX takes nothing returns boolean
return(GetUnitTypeId(GetConstructedStructure())=='n03F')
endfunction
function EAX takes nothing returns nothing
call PauseUnit(GetEnumUnit(),false)
call SetUnitTimeScalePercent(GetEnumUnit(),100.)
endfunction
function ENX takes nothing returns boolean
return(CountUnitsInGroup(M8V(GetOwningPlayer(GetTriggerUnit()),'n03F'))==1)
endfunction
function EBX takes nothing returns nothing
call GroupAddUnit(TN,GetTriggerUnit())
if(ENX())then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cff00ff00Note: The Robots have constructed a power supply, they are now operating.|r")
call ForGroupBJ(M7V(GetOwningPlayer(GetTriggerUnit())),function EAX)
call DestroyGroup(bj_lastCreatedGroup)
endif
endfunction
function EDX takes nothing returns boolean
return(GetSpellAbilityId()=='A0BI')
endfunction
function EFX takes nothing returns boolean
return(FI==4)
endfunction
function EGX takes nothing returns boolean
return(FI==3)
endfunction
function EHX takes nothing returns boolean
return(FI==2)
endfunction
function EJX takes nothing returns boolean
return(FI==1)
endfunction
function EKX takes nothing returns nothing
set DI=GetUnitLoc(GetTriggerUnit())
set FI=GetRandomInt(1,4)
call SetUnitAnimation(GetTriggerUnit(),"death")
call UnitDamageTargetBJ(GetTriggerUnit(),GetTriggerUnit(),1000.,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_SONIC)
if(EJX())then
call CreateNUnitsAtLoc(1,'h05D',GetOwningPlayer(GetTriggerUnit()),DI,bj_UNIT_FACING)
else
if(EHX())then
call CreateNUnitsAtLoc(1,'h05C',GetOwningPlayer(GetTriggerUnit()),DI,bj_UNIT_FACING)
else
if(EGX())then
call CreateNUnitsAtLoc(1,'h05B',GetOwningPlayer(GetTriggerUnit()),DI,bj_UNIT_FACING)
else
if(EFX())then
call CreateNUnitsAtLoc(1,'h07E',GetOwningPlayer(GetTriggerUnit()),DI,bj_UNIT_FACING)
endif
endif
endif
endif
call RemoveLocation(DI)
endfunction
function EMX takes nothing returns boolean
return(GetUnitTypeId(GetConstructingStructure())=='h05F')
endfunction
function EPX takes nothing returns nothing
call SetUnitFlyHeight(GetConstructingStructure(),250.,250.)
endfunction
function ESX takes nothing returns boolean
return GetUnitAbilityLevel(GetAttacker(),'A0BM')>0
endfunction
function ETX takes nothing returns nothing
local unit u=GetAttacker()
local unit v=GetTriggerUnit()
local location l=GetUnitLoc(v)
local unit d
local real t=3.
local real tt=1.
loop
exitwhen t<=.0
call TriggerSleepAction(tt)
set t=t-tt
endloop
set d=CreateUnitAtLoc(GetOwningPlayer(u),'h05I',l,bj_UNIT_FACING)
call UnitApplyTimedLife(d,'BTLF',2.)
call IssueTargetOrderById(d,$D007F,v)
call SetUnitTimeScale(v,.0)
set t=5.
loop
exitwhen t<=.0
call TriggerSleepAction(tt)
set t=t-tt
endloop
call SetUnitTimeScale(v,1.)
call RemoveLocation(l)
set u=null
set v=null
set d=null
endfunction
function EUX takes nothing returns boolean
return GetSpellAbilityId()=='A0EA'
endfunction
function EWX takes nothing returns nothing
local location l=GetSpellTargetLoc()
local unit u=GetTriggerUnit()
call WaygateActivate(u,true)
call WaygateSetDestinationLocBJ(u,l)
set u=null
call RemoveLocation(l)
endfunction
function EYX takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0GD',GetAttacker())>0)
endfunction
function EZX takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'h05I',GetOwningPlayer(GetAttacker()),SI,bj_UNIT_FACING)
call IssueTargetOrderById(bj_lastCreatedUnit,$D00B5,GetTriggerUnit())
call UnitApplyTimedLifeBJ(1.5,'BTLF',bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'h05I',GetOwningPlayer(GetAttacker()),SI,bj_UNIT_FACING)
call IssueTargetOrderById(bj_lastCreatedUnit,$D00DD,GetTriggerUnit())
call UnitApplyTimedLifeBJ(1.5,'BTLF',bj_lastCreatedUnit)
call RemoveLocation(SI)
endfunction
function E0X takes nothing returns boolean
return(GetSpellAbilityId()=='A0BY')
endfunction
function E1X takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function E2X takes nothing returns nothing
set JI=M1V(1500.,GetUnitLoc(GetTriggerUnit()),Condition(function E1X))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=CountUnitsInGroup(JI)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set KI=GroupPickRandomUnit(JI)
call CreateNUnitsAtLoc(1,'u01N',GetOwningPlayer(GetTriggerUnit()),GetUnitLoc(KI),bj_UNIT_FACING)
set LI=bj_lastCreatedUnit
call IssueTargetOrderById(LI,$D00CB,KI)
call UnitApplyTimedLifeBJ(10.,'BTLF',LI)
call GroupRemoveUnit(JI,KI)
set KI=null
set LI=null
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DestroyGroup(JI)
endfunction
function E4X takes nothing returns boolean
return(GetSpellAbilityId()=='A0C6')
endfunction
function E5X takes nothing returns boolean
return(IsUnitAliveBJ(MI[1])==false)or(IsUnitAliveBJ(MI[2])==false)or(IsUnitAliveBJ(MI[3])==false)
endfunction
function E6X takes nothing returns boolean
return(E5X())
endfunction
function E7X takes nothing returns boolean
return(MI[1]==null)or(MI[2]==null)or(MI[3]==null)
endfunction
function E8X takes nothing returns boolean
return(E7X())
endfunction
function E9X takes nothing returns nothing
set MI[1]=GetTriggerUnit()
set MI[2]=GroupPickRandomUnit(M8V(GetOwningPlayer(MI[1]),'H05J'))
set MI[3]=GroupPickRandomUnit(M8V(GetOwningPlayer(MI[1]),'H00T'))
if(E8X())then
call DisplayTimedTextToForce(PVV(GetOwningPlayer(MI[1])),15.,"|cffff0000Could not locate all 3 heroes required for fusion.|r")
else
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cffffff00Warning: Titan of Nature, Fire and Frost have begun a ritual to merge together.|r")
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set PI[bj_forLoopAIndex]=GetUnitLoc(MI[bj_forLoopAIndex])
call SetUnitFacingToFaceUnitTimed(MI[bj_forLoopAIndex],MI[1],.0)
call PauseUnit(MI[bj_forLoopAIndex],true)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call AddLightningLoc("CLPB",PI[1],PI[2])
set QI[1]=bj_lastCreatedLightning
call AddLightningLoc("AFOD",PI[1],PI[3])
set QI[2]=bj_lastCreatedLightning
call AddLightningLoc("DRAB",PI[2],PI[3])
set QI[3]=bj_lastCreatedLightning
call TriggerSleepAction(30.)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call ShowUnitHide(MI[bj_forLoopAIndex])
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DestroyLightning(QI[1])
call DestroyLightning(QI[2])
call DestroyLightning(QI[3])
call CreateNUnitsAtLoc(1,'H05M',GetOwningPlayer(MI[1]),PI[1],bj_UNIT_FACING)
set MI[4]=bj_lastCreatedUnit
call SetHeroLevelBJ(MI[4],(GetUnitLevel(MI[1])+2),true)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cffffff00Titan of Thunder:|r I have been summoned!")
call TriggerSleepAction(3.)
if(E6X())then
call PauseUnit(MI[4],true)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cffffff00Titan of Thunder:|r No! I am not fully summoned...")
call TriggerSleepAction(3.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cffffff00Titan of Thunder:|r Too low power has attempted to summon me. Argh!")
call TriggerSleepAction(4.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cffffff00Titan of Thunder:|r *dies*")
call KillUnit(MI[4])
return
endif
endif
endfunction
function XEX takes nothing returns boolean
return(GetSpellAbilityId()=='A0C8')
endfunction
function XXX takes nothing returns nothing
set PI[4]=GetUnitLoc(GetTriggerUnit())
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PauseUnit(MI[bj_forLoopAIndex],false)
call ShowUnitShow(MI[bj_forLoopAIndex])
call SetUnitFacingTimed(MI[bj_forLoopAIndex],GetUnitFacing(GetTriggerUnit()),0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call CreateNUnitsAtLoc(1,'u01O',GetOwningPlayer(GetTriggerUnit()),PI[4],GetUnitFacing(GetTriggerUnit()))
call KillUnit(bj_lastCreatedUnit)
set PI[0]=MJV(PI[4],600.,(GetUnitFacing(GetTriggerUnit())-45.))
call SetUnitPositionLoc(MI[2],PI[0])
set PI[0]=MJV(PI[4],600.,GetUnitFacing(GetTriggerUnit()))
call SetUnitPositionLoc(MI[1],PI[0])
set PI[0]=MJV(PI[4],600.,(GetUnitFacing(GetTriggerUnit())+45.))
call SetUnitPositionLoc(MI[3],PI[0])
call RemoveUnit(GetTriggerUnit())
endfunction
function XRX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H05M')or(GetUnitTypeId(GetTriggerUnit())=='H05O')
endfunction
function XIX takes nothing returns boolean
return(XRX())
endfunction
function XAX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())!='n00G')
endfunction
function XNX takes nothing returns nothing
set PI[4]=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'u01O',GetOwningPlayer(GetTriggerUnit()),PI[4],GetUnitFacing(GetTriggerUnit()))
call KillUnit(bj_lastCreatedUnit)
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PauseUnit(MI[bj_forLoopAIndex],false)
call ShowUnitShow(MI[bj_forLoopAIndex])
call KillUnit(MI[bj_forLoopAIndex])
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(XAX())then
call RemoveUnit(GetTriggerUnit())
endif
endfunction
function XCX takes nothing returns boolean
return(GetSpellAbilityId()=='A0DU')
endfunction
function XDX takes nothing returns boolean
return(IsUnitAliveBJ(MI[5])==false)or(IsUnitAliveBJ(MI[6])==false)or(IsUnitAliveBJ(MI[7])==false)
endfunction
function XFX takes nothing returns boolean
return(XDX())
endfunction
function XGX takes nothing returns boolean
return(MI[5]==null)or(MI[6]==null)or(MI[7]==null)
endfunction
function XHX takes nothing returns boolean
return(XGX())
endfunction
function XJX takes nothing returns nothing
set MI[5]=GetTriggerUnit()
set MI[6]=GroupPickRandomUnit(M8V(GetOwningPlayer(MI[5]),'U01P'))
set MI[7]=GroupPickRandomUnit(M8V(GetOwningPlayer(MI[5]),'U01Q'))
if(XHX())then
call DisplayTimedTextToForce(PVV(GetOwningPlayer(MI[1])),15.,"|cffff0000Could not locate all 3 heroes required for fusion.|r")
else
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cffff0000Warning: Septim of Nature, Fire and Frost have begun a ritual to merge together.|r")
set bj_forLoopAIndex=5
set bj_forLoopAIndexEnd=7
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set PI[bj_forLoopAIndex]=GetUnitLoc(MI[bj_forLoopAIndex])
call SetUnitFacingToFaceUnitTimed(MI[bj_forLoopAIndex],MI[1],.0)
call PauseUnit(MI[bj_forLoopAIndex],true)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call AddLightningLoc("CLPB",PI[5],PI[6])
set QI[5]=bj_lastCreatedLightning
call AddLightningLoc("AFOD",PI[5],PI[7])
set QI[6]=bj_lastCreatedLightning
call AddLightningLoc("DRAL",PI[6],PI[7])
set QI[7]=bj_lastCreatedLightning
call TriggerSleepAction(30.)
set bj_forLoopAIndex=5
set bj_forLoopAIndexEnd=7
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call ShowUnitHide(MI[bj_forLoopAIndex])
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DestroyLightning(QI[5])
call DestroyLightning(QI[6])
call DestroyLightning(QI[7])
call CreateNUnitsAtLoc(1,'H066',GetOwningPlayer(MI[5]),PI[5],bj_UNIT_FACING)
set MI[8]=bj_lastCreatedUnit
call SetHeroLevelBJ(MI[8],(GetUnitLevel(MI[5])+2),true)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cffff0000Septim of Doom:|r I have been summoned!")
call TriggerSleepAction(3.)
if(XFX())then
call PauseUnit(MI[8],true)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cffff0000Septim of Doom:|r No! I am not fully summoned...")
call TriggerSleepAction(3.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cffff0000Septim of Doom:|r Too low power has attempted to summon me. Argh!")
call TriggerSleepAction(4.)
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,15.,"|cffff0000Septim of Doom:|r *dies*")
call KillUnit(MI[8])
return
endif
endif
endfunction
function XLX takes nothing returns boolean
return(GetSpellAbilityId()=='A0DV')
endfunction
function XMX takes nothing returns nothing
set PI[8]=GetUnitLoc(GetTriggerUnit())
set bj_forLoopAIndex=5
set bj_forLoopAIndexEnd=7
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PauseUnit(MI[bj_forLoopAIndex],false)
call ShowUnitShow(MI[bj_forLoopAIndex])
call SetUnitFacingTimed(MI[bj_forLoopAIndex],GetUnitFacing(GetTriggerUnit()),0)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call CreateNUnitsAtLoc(1,'u01V',GetOwningPlayer(GetTriggerUnit()),PI[8],GetUnitFacing(GetTriggerUnit()))
call KillUnit(bj_lastCreatedUnit)
set PI[0]=MJV(PI[8],600.,(GetUnitFacing(GetTriggerUnit())-45.))
call SetUnitPositionLoc(MI[6],PI[0])
set PI[0]=MJV(PI[8],600.,GetUnitFacing(GetTriggerUnit()))
call SetUnitPositionLoc(MI[5],PI[0])
set PI[0]=MJV(PI[8],600.,(GetUnitFacing(GetTriggerUnit())+45.))
call SetUnitPositionLoc(MI[7],PI[0])
call RemoveUnit(GetTriggerUnit())
endfunction
function XQX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H066')
endfunction
function XSX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())!='n00G')
endfunction
function XTX takes nothing returns nothing
set PI[8]=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'u01V',GetOwningPlayer(GetTriggerUnit()),PI[8],GetUnitFacing(GetTriggerUnit()))
call KillUnit(bj_lastCreatedUnit)
set bj_forLoopAIndex=5
set bj_forLoopAIndexEnd=7
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
call PauseUnit(MI[bj_forLoopAIndex],false)
call ShowUnitShow(MI[bj_forLoopAIndex])
call KillUnit(MI[bj_forLoopAIndex])
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
if(XSX())then
call RemoveUnit(GetTriggerUnit())
endif
endfunction
function XWX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h05N')
endfunction
function XYX takes nothing returns nothing
call KillUnit(GetTriggerUnit())
endfunction
function X_X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H05L')
endfunction
function X0X takes nothing returns boolean
return(GetSpellAbilityId()=='A0C0')
endfunction
function X1X takes nothing returns nothing
call SetUnitInvulnerable(GetTriggerUnit(),false)
if(X0X())then
call SetUnitInvulnerable(GetTriggerUnit(),true)
endif
endfunction
function X3X takes nothing returns boolean
return(GetSpellAbilityId()=='A0EJ')
endfunction
function X4X takes nothing returns nothing
set SI=GetSpellTargetLoc()
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=$C
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set XB=MJV(SI,500.,(30.*I2R(bj_forLoopAIndex)))
call CreateNUnitsAtLoc(1,'u02D',GetOwningPlayer(GetTriggerUnit()),XB,bj_UNIT_FACING)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,$D0218,XB)
call UnitApplyTimedLifeBJ(3.,'BTLF',bj_lastCreatedUnit)
call RemoveLocation(XB)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call RemoveLocation(SI)
endfunction
function X6X takes nothing returns boolean
return(GetSpellAbilityId()=='A0GY')
endfunction
function X7X takes nothing returns nothing
set SI=GetSpellTargetLoc()
call CreateNUnitsAtLoc(1,'h07I',GetOwningPlayer(GetTriggerUnit()),SI,bj_UNIT_FACING)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,$D02BD,SI)
call UnitApplyTimedLifeBJ(35.,'BTLF',bj_lastCreatedUnit)
call RemoveLocation(SI)
endfunction
function X9X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='n03Q')
endfunction
function OVX takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'n045',GetOwningPlayer(GetTriggerUnit()),SI,GetUnitFacing(GetTriggerUnit()))
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreatedUnit,"Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl")
call RemoveUnit(GetTriggerUnit())
call RemoveLocation(SI)
endfunction
function OXX takes nothing returns boolean
return(IT[3]<IT[2])
endfunction
function OOX takes nothing returns boolean
return(IT[5]<IT[4])
endfunction
function ORX takes nothing returns nothing
call InitHashtableBJ()
set RT=GetLastCreatedHashtableBJ()
set IT[0]=1.
set IT[1]=30.
set IT[2]=192.
set IT[3]=612.
set IT[4]=.5
set IT[5]=2.
set IT[6]=2.
set IT[7]=5.
set IT[8]=1.
set IT[9]=.5
set IT[$A]=1.
set IT[$B]=.0
set IT[$C]=10.
set IT[$D]=2.
set IT[$E]=6.
set AT="AFOD"
if(OXX())then
set NT[3]=IT[2]
endif
if(OOX())then
set NT[5]=IT[4]
endif
endfunction
function OAX takes nothing returns boolean
return(GetSpellAbilityId()=='A0K0')
endfunction
function ONX takes nothing returns boolean
return(HaveSavedValue(StringHashBJ("effect"),bj_HASHTABLE_HANDLE,GetHandleIdBJ(GetTriggerUnit()),RT)==false)
endfunction
function OBX takes nothing returns nothing
set WI=GetTriggerUnit()
if(ONX())then
call AddSpecialEffectTargetUnitBJ("origin",WI,"Abilities\\Spells\\Orc\\Voodoo\\VoodooAura.mdl")
call SaveEffectHandleBJ(bj_lastCreatedEffect,StringHashBJ("effect"),GetHandleIdBJ(GetTriggerUnit()),RT)
endif
call SaveRealBJ(IT[0],StringHashBJ("interval"),GetHandleIdBJ(GetTriggerUnit()),RT)
call SaveRealBJ(IT[1],StringHashBJ("duration"),GetHandleIdBJ(GetTriggerUnit()),RT)
call GroupAddUnit(BT,WI)
call EnableTrigger(OIV)
endfunction
function ODX takes nothing returns boolean
return(IsUnitGroupEmptyBJ(BT))and(IsUnitGroupEmptyBJ(CT))
endfunction
function OFX takes nothing returns boolean
return(GetRandomInt(1,2)==1)
endfunction
function OGX takes nothing returns boolean
return(DT==IT[0])
endfunction
function OHX takes nothing returns boolean
return(DT<=.02)
endfunction
function OJX takes nothing returns boolean
return(IsUnitAliveBJ(WI))and(GetUnitCurrentOrder(WI)==$D02B7)
endfunction
function OKX takes nothing returns nothing
set WI=GetEnumUnit()
if(OJX())then
set DT=LoadRealBJ(StringHashBJ("interval"),GetHandleIdBJ(GetEnumUnit()),RT)
if(OGX())then
set EA=GetUnitLoc(WI)
set XA=MJV(EA,GetRandomReal(IT[2],IT[3]),GetRandomReal(0,360))
call AddSpecialEffectLocBJ(EA,"Abilities\\Spells\\Other\\HowlOfTerror\\HowlCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call AddSpecialEffectLocBJ(XA,"Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call CreateNUnitsAtLoc(1,'h08T',Player($F),XA,bj_UNIT_FACING)
set FT=bj_lastCreatedUnit
call UnitAddAbility(FT,'Arav')
call UnitRemoveAbility(FT,'Arav')
call GroupAddUnit(CT,FT)
call SetUnitScalePercent(FT,200.,200.,200.)
call SetUnitFlyHeight(FT,40.,.0)
call AddSpecialEffectTargetUnitBJ("origin",FT,"Abilities\\Weapons\\ProcMissile\\ProcMissile.mdl")
call SaveEffectHandleBJ(bj_lastCreatedEffect,StringHashBJ("effect1"),GetHandleIdBJ(bj_lastCreatedUnit),RT)
call AddSpecialEffectTargetUnitBJ("origin",FT,"Abilities\\Spells\\Other\\Drain\\ManaDrainTarget.mdl")
call SaveEffectHandleBJ(bj_lastCreatedEffect,StringHashBJ("effect2"),GetHandleIdBJ(bj_lastCreatedUnit),RT)
set ZI=CreateGroup()
call SaveGroupHandleBJ(ZI,StringHashBJ("group"),GetHandleIdBJ(bj_lastCreatedUnit),RT)
set GT=AddLightningEx(AT,true,GetLocationX(EA),GetLocationY(EA),GetLocationZ(EA)+'d',GetLocationX(XA),GetLocationY(XA),GetLocationZ(XA)+40)
call SetLightningColor(GT,1,.8,1,.8)
call SaveLightningHandleBJ(GT,StringHashBJ("lightning"),GetHandleIdBJ(bj_lastCreatedUnit),RT)
call SaveUnitHandleBJ(WI,StringHashBJ("caster"),GetHandleIdBJ(bj_lastCreatedUnit),RT)
call SaveLocationHandleBJ(EA,StringHashBJ("center"),GetHandleIdBJ(bj_lastCreatedUnit),RT)
call SaveRealBJ(AngleBetweenPoints(EA,XA),StringHashBJ("MMV"),GetHandleIdBJ(bj_lastCreatedUnit),RT)
call SaveRealBJ(DistanceBetweenPoints(EA,XA),StringHashBJ("radius"),GetHandleIdBJ(bj_lastCreatedUnit),RT)
call SaveRealBJ(GetRandomReal(IT[4],IT[5]),StringHashBJ("speed"),GetHandleIdBJ(bj_lastCreatedUnit),RT)
call SaveRealBJ((IT[7]+(IT[8]*I2R(GetUnitAbilityLevelSwapped('A006',WI)))),StringHashBJ("damage"),GetHandleIdBJ(bj_lastCreatedUnit),RT)
call SaveRealBJ((IT[$C]+(IT[$D]*I2R(GetUnitAbilityLevelSwapped('A006',WI)))),StringHashBJ("cone_damage"),GetHandleIdBJ(bj_lastCreatedUnit),RT)
if(OFX())then
call SaveBooleanBJ(true,StringHashBJ("direction"),GetHandleIdBJ(bj_lastCreatedUnit),RT)
endif
call RemoveLocation(XA)
endif
set DT=(DT-.03)
if(OHX())then
set DT=IT[0]
endif
call SaveRealBJ(DT,StringHashBJ("interval"),GetHandleIdBJ(GetEnumUnit()),RT)
else
call GroupRemoveUnit(BT,WI)
call DestroyEffect(LoadEffectHandleBJ(StringHashBJ("effect"),GetHandleIdBJ(GetEnumUnit()),RT))
call FlushChildHashtableBJ(GetHandleIdBJ(GetEnumUnit()),RT)
if(ODX())then
call DisableTrigger(GetTriggeringTrigger())
endif
endif
endfunction
function OLX takes nothing returns boolean
return(IsUnitGroupEmptyBJ(BT))and(IsUnitGroupEmptyBJ(CT))
endfunction
function OMX takes nothing returns boolean
return(LoadBooleanBJ(StringHashBJ("direction"),GetHandleIdBJ(GetEnumUnit()),RT))
endfunction
function OPX takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function OQX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction
function OSX takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(FT)))
endfunction
function OTX takes nothing returns boolean
return GetBooleanAnd(OQX(),OSX())
endfunction
function OUX takes nothing returns boolean
return GetBooleanAnd(OPX(),OTX())
endfunction
function OWX takes nothing returns boolean
return(CosBJ((KT-AngleBetweenPoints(EA,LT)))>CosBJ(IT[6]))
endfunction
function OYX takes nothing returns nothing
set LT=GetUnitLoc(GetEnumUnit())
if(OWX())then
call AddSpecialEffectTargetUnitBJ("chest",GetEnumUnit(),"Abilities\\Weapons\\FaerieDragonMissile\\FaerieDragonMissile.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call UnitDamageTargetBJ(FT,GetEnumUnit(),VA,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_COLD)
call SetWidgetLife(FT,(GetUnitStateSwap(UNIT_STATE_LIFE,FT)+(VA*IT[9])))
endif
call RemoveLocation(LT)
endfunction
function OZX takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function O_X takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction
function O0X takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(FT)))
endfunction
function O1X takes nothing returns boolean
return GetBooleanAnd(O_X(),O0X())
endfunction
function O2X takes nothing returns boolean
return GetBooleanAnd(OZX(),O1X())
endfunction
function O3X takes nothing returns boolean
return(IsUnitAliveBJ(HT))and(IsUnitInGroup(HT,LoadGroupHandleBJ(StringHashBJ("group"),GetHandleIdBJ(GetEnumUnit()),RT))==false)
endfunction
function O4X takes nothing returns boolean
return(HT==null)or(HT==WI)
endfunction
function O5X takes nothing returns boolean
return(O4X())
endfunction
function O6X takes nothing returns boolean
return(IT[$B]==1.)
endfunction
function O7X takes nothing returns boolean
return(MT<64.)
endfunction
function O8X takes nothing returns boolean
return(MT<IT[$E])
endfunction
function O9X takes nothing returns boolean
return(RAbsBJ((VA-JT))<6.)and(RAbsBJ((DT-KT))<6.)
endfunction
function RVX takes nothing returns boolean
return(IT[$A]==1.)and(IsUnitInGroup(HT,PT)==false)and(IsUnitInGroup(HT,QT)==false)
endfunction
function REX takes nothing returns boolean
return(MT<192.)
endfunction
function RXX takes nothing returns boolean
return(HT!=null)and(HT!=WI)and(IsUnitAliveBJ(HT))
endfunction
function ROX takes nothing returns boolean
return(IsUnitAliveBJ(WI))and(IsUnitAliveBJ(FT))and(GetUnitCurrentOrder(FT)==$D02B7)
endfunction
function RRX takes nothing returns nothing
set WI=GetEnumUnit()
set FT=LoadUnitHandleBJ(StringHashBJ("caster"),GetHandleIdBJ(GetEnumUnit()),RT)
if(ROX())then
set HT=LoadUnitHandleBJ(StringHashBJ("target"),GetHandleIdBJ(GetEnumUnit()),RT)
set JT=LoadRealBJ(StringHashBJ("MMV"),GetHandleIdBJ(GetEnumUnit()),RT)
set EA=LoadLocationHandleBJ(StringHashBJ("center"),GetHandleIdBJ(GetEnumUnit()),RT)
set XA=MJV(EA,LoadRealBJ(StringHashBJ("radius"),GetHandleIdBJ(GetEnumUnit()),RT),JT)
if(OMX())then
call SaveRealBJ((JT+LoadRealBJ(StringHashBJ("speed"),GetHandleIdBJ(GetEnumUnit()),RT)),StringHashBJ("MMV"),GetHandleIdBJ(GetEnumUnit()),RT)
else
call SaveRealBJ((JT-LoadRealBJ(StringHashBJ("speed"),GetHandleIdBJ(GetEnumUnit()),RT)),StringHashBJ("MMV"),GetHandleIdBJ(GetEnumUnit()),RT)
endif
call SetUnitPositionLoc(WI,XA)
set GT=LoadLightningHandleBJ(StringHashBJ("lightning"),GetHandleIdBJ(GetEnumUnit()),RT)
call MoveLightningEx(GT,true,GetLocationX(EA),GetLocationY(EA),GetLocationZ(EA)+'d',GetLocationX(XA),GetLocationY(XA),GetLocationZ(XA)+40)
set VA=LoadRealBJ(StringHashBJ("damage"),GetHandleIdBJ(GetEnumUnit()),RT)
set JT=DistanceBetweenPoints(EA,XA)
set KT=AngleBetweenPoints(EA,XA)
set RA=M1V(JT,EA,Condition(function OUX))
call ForGroupBJ(RA,function OYX)
call DestroyGroup(RA)
if(O5X())then
set RA=M1V(192.,XA,Condition(function O2X))
set HT=GroupPickRandomUnit(RA)
if(O3X())then
call GroupAddUnit(LoadGroupHandleBJ(StringHashBJ("group"),GetHandleIdBJ(GetEnumUnit()),RT),HT)
call SaveUnitHandleBJ(HT,StringHashBJ("target"),GetHandleIdBJ(GetEnumUnit()),RT)
endif
call DestroyGroup(RA)
endif
if(RXX())then
set LT=GetUnitLoc(HT)
set MT=DistanceBetweenPoints(XA,LT)
if(REX())then
if(O7X())then
call UnitDamageTargetBJ(FT,HT,LoadRealBJ(StringHashBJ("cone_damage"),GetHandleIdBJ(GetEnumUnit()),RT),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
call AddSpecialEffectTargetUnitBJ("origin",HT,"Abilities\\Weapons\\DragonHawkMissile\\DragonHawkMissile.mdl")
call DestroyEffect(bj_lastCreatedEffect)
if(O6X())then
call GroupRemoveUnit(LoadGroupHandleBJ(StringHashBJ("group"),GetHandleIdBJ(GetEnumUnit()),RT),HT)
call UnitApplyTimedLifeBJ(2.,'BTLF',FT)
set EA=LoadLocationHandleBJ(StringHashBJ("center"),GetHandleIdBJ(GetEnumUnit()),RT)
call RemoveLocation(EA)
call DestroyLightning(LoadLightningHandleBJ(StringHashBJ("lightning"),GetHandleIdBJ(GetEnumUnit()),RT))
call DestroyEffect(LoadEffectHandleBJ(StringHashBJ("effect1"),GetHandleIdBJ(GetEnumUnit()),RT))
call DestroyEffect(LoadEffectHandleBJ(StringHashBJ("effect2"),GetHandleIdBJ(GetEnumUnit()),RT))
call FlushChildHashtableBJ(GetHandleIdBJ(GetEnumUnit()),RT)
endif
endif
if(RVX())then
set JT=AngleBetweenPoints(LT,XA)
if(O8X())then
set ST=MJV(LT,MT,JT)
else
set ST=MJV(LT,IT[$E],JT)
endif
call CreateItemLoc('ratf',ST)
set EA=GetItemLoc(bj_lastCreatedItem)
set VA=GetLocationX(EA)
set DT=GetLocationY(EA)
set JT=GetLocationX(ST)
set KT=GetLocationY(ST)
if(O9X())then
call SetUnitX(HT,JT)
call SetUnitY(HT,KT)
endif
call RemoveItem(bj_lastCreatedItem)
call RemoveLocation(EA)
call RemoveLocation(ST)
endif
else
call GroupRemoveUnit(LoadGroupHandleBJ(StringHashBJ("group"),GetHandleIdBJ(GetEnumUnit()),RT),HT)
call SaveUnitHandleBJ(FT,StringHashBJ("target"),GetHandleIdBJ(GetEnumUnit()),RT)
endif
call RemoveLocation(XA)
call RemoveLocation(LT)
endif
else
call UnitApplyTimedLifeBJ(2.,'BTLF',WI)
set EA=LoadLocationHandleBJ(StringHashBJ("center"),GetHandleIdBJ(GetEnumUnit()),RT)
call RemoveLocation(EA)
set ZI=LoadGroupHandleBJ(StringHashBJ("group"),GetHandleIdBJ(GetEnumUnit()),RT)
call DestroyGroup(ZI)
call DestroyLightning(LoadLightningHandleBJ(StringHashBJ("lightning"),GetHandleIdBJ(GetEnumUnit()),RT))
call DestroyEffect(LoadEffectHandleBJ(StringHashBJ("effect1"),GetHandleIdBJ(GetEnumUnit()),RT))
call DestroyEffect(LoadEffectHandleBJ(StringHashBJ("effect2"),GetHandleIdBJ(GetEnumUnit()),RT))
call FlushChildHashtableBJ(GetHandleIdBJ(GetEnumUnit()),RT)
call GroupRemoveUnit(CT,WI)
if(OLX())then
call DisableTrigger(GetTriggeringTrigger())
endif
endif
endfunction
function RIX takes nothing returns nothing
call ForGroupBJ(BT,function OKX)
call ForGroupBJ(CT,function RRX)
endfunction
function RNX takes nothing returns integer
return 3
endfunction
function RBX takes nothing returns integer
return 1
endfunction
function RCX takes nothing returns real
return 100.
endfunction
function RDX takes nothing returns real
return 50.
endfunction
function RFX takes nothing returns real
return 120.
endfunction
function RGX takes nothing returns string
return"Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl"
endfunction
function RHX takes nothing returns string
return"Abilities\\Spells\\Human\\Feedback\\ArcaneTowerAttack.mdl"
endfunction
function RJX takes nothing returns string
return"chest"
endfunction
function RKX takes nothing returns string
return"overhead"
endfunction
function RLX takes nothing returns real
return 400.
endfunction
function RMX takes nothing returns real
return 100.
endfunction
function RPX takes nothing returns real
return 50.
endfunction
function RQX takes nothing returns real
return 600.
endfunction
function RSX takes nothing returns boolean
local unit u=GetFilterUnit()
local boolean b=not IsUnitInGroup(u,GJ)and IsUnitEnemy(u,GetOwningPlayer(ZY))and not IsUnitType(u,UNIT_TYPE_DEAD)and not IsUnitType(u,UNIT_TYPE_STRUCTURE)and not IsUnitType(u,UNIT_TYPE_MECHANICAL)and not(GetUnitAbilityLevel(u,'Bams')>0)and not(GetUnitAbilityLevel(u,'BHds')>0)
set u=null
return b
endfunction
function RTX takes nothing returns nothing
local timer t=GetExpiredTimer()
local integer id=GetHandleId(t)
local integer bn=LoadInteger(YY,id,3)
local unit s=LoadUnitHandle(YY,id,1)
local unit u
local unit u2
local unit u3
local unit u4=LoadUnitHandle(YY,id,2)
local real x
local real x2
local real x3
local real y
local real y2
local real y3
local real a
local real d
local real m
local real m2
local real dx
local real dy
local group g
local real RUX
if 0>=bn or u4==null then
set u2=LoadUnitHandle(YY,id,0)
if IsUnitType(u2,UNIT_TYPE_DEAD)then
set g=LoadGroupHandle(YY,id,4)
call DestroyGroup(g)
set g=null
call SUV(t)
call KillUnit(s)
call FlushChildHashtable(YY,id)
else
set x3=GetUnitX(u2)
set y3=GetUnitY(u2)
set x2=GetUnitX(s)
set y2=GetUnitY(s)
set dx=x3-x2
set dy=y3-y2
set d=SquareRoot(dx*dx+dy*dy)
if d<=RMX()then
set m=LoadReal(YY,id,6)
call SetUnitState(u2,UNIT_STATE_MANA,(GetUnitState(u2,UNIT_STATE_MANA)+m))
call DestroyEffect(AddSpecialEffectTarget(RGX(),u2,RJX()))
set g=LoadGroupHandle(YY,id,4)
call DestroyGroup(g)
set g=null
call SUV(t)
call KillUnit(s)
call FlushChildHashtable(YY,id)
else
set a=Atan2(y3-y2,x3-x2)
set x=x2+RLX()/ 33.*Cos(a)
set y=y2+RLX()/ 33.*Sin(a)
call SetUnitX(s,x)
call SetUnitY(s,y)
call SetUnitFacing(s,(bj_RADTODEG*a))
endif
endif
set u2=null
else
set x=GetUnitX(s)
set y=GetUnitY(s)
set u=LoadUnitHandle(YY,id,2)
set x2=GetUnitX(u)
set y2=GetUnitY(u)
set dx=x2-x
set dy=y2-y
set d=SquareRoot(dx*dx+dy*dy)
if d<=RPX()then
if not IsUnitType(u,UNIT_TYPE_DEAD)then
set u3=LoadUnitHandle(YY,id,0)
set RUX=LoadReal(YY,id,5)
set m2=GetUnitState(u,UNIT_STATE_MANA)
set m=LoadReal(YY,id,6)
if RUX>m2 then
set m=(m+m2)
call SetUnitState(u,UNIT_STATE_MANA,.0)
else
set m=(m+RUX)
call SetUnitState(u,UNIT_STATE_MANA,(GetUnitState(u,UNIT_STATE_MANA)-RUX))
endif
call UnitDamageTarget(u3,u,RUX,false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,null)
call DestroyEffect(AddSpecialEffectTarget(RHX(),u,RKX()))
call SaveReal(YY,id,6,m)
set RUX=(RUX*(RFX()/ 'd'))
call SaveReal(YY,id,5,RUX)
set u3=null
endif
set GJ=LoadGroupHandle(YY,id,4)
call GroupAddUnit(GJ,u)
set ZY=s
call GroupEnumUnitsInRange(bj_lastCreatedGroup,x,y,RQX(),Filter(function RSX))
set u2=FirstOfGroup(bj_lastCreatedGroup)
if u2!=null then
call SaveUnitHandle(YY,id,2,u2)
set bn=(bn-1)
call SaveInteger(YY,id,3,bn)
set u2=null
else
call RemoveSavedHandle(YY,id,2)
endif
else
set a=Atan2(y2-y,x2-x)
set x3=x+RLX()/ 33.*Cos(a)
set y3=y+RLX()/ 33.*Sin(a)
call SetUnitX(s,x3)
call SetUnitY(s,y3)
call SetUnitFacing(s,(bj_RADTODEG*a))
endif
set u=null
endif
set t=null
set s=null
set u4=null
endfunction
function RWX takes nothing returns boolean
local unit u
local timer t
local unit u2
local real x
local real y
local integer id
if GetSpellAbilityId()=='A0K7'then
set t=STV()
set id=GetHandleId(t)
set u=GetTriggerUnit()
set x=GetUnitX(u)
set y=GetUnitY(u)
set u2=GetSpellTargetUnit()
set bj_lastCreatedUnit=CreateUnit(GetTriggerPlayer(),'h08Y',x,y,bj_RADTODEG*Atan2(GetUnitY(u2)-y,GetUnitX(u2)-x))
call TimerStart(t,.03125,true,function RTX)
call SaveUnitHandle(YY,id,0,u)
call SaveUnitHandle(YY,id,1,bj_lastCreatedUnit)
call SaveUnitHandle(YY,id,2,u2)
call SaveInteger(YY,id,3,RNX()+(RBX()*GetUnitAbilityLevel(u,'A0K7')))
call SaveGroupHandle(YY,id,4,CreateGroup())
call SaveReal(YY,id,5,(RCX()+(RDX()*GetUnitAbilityLevel(u,'A0K7'))))
set u=null
set u2=null
set t=null
endif
return false
endfunction
function RYX takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function RWX))
if YY==null then
set YY=InitHashtable()
endif
set t=null
endfunction
function RZX takes nothing returns boolean
return(GetSpellAbilityId()=='A0KY')
endfunction
function R_X takes nothing returns boolean
return(UnitHasItemOfTypeBJ(GetTriggerUnit(),'I01A')==false)
endfunction
function R0X takes nothing returns nothing
if(R_X())then
call UnitAddItemByIdSwapped('I01A',GetTriggerUnit())
endif
endfunction
function R2X takes nothing returns boolean
return(GetSpellAbilityId()=='A049')
endfunction
function R3X takes nothing returns nothing
call KillUnit(GetEnumUnit())
endfunction
function R4X takes nothing returns nothing
set YX=GetUnitLoc(GetSpellAbilityUnit())
set SE=1
loop
exitwhen SE>20
set VX=MJV(YX,400.,(18.*I2R(SE)))
call RemoveLocation(VX)
set SE=SE+1
endloop
call RemoveLocation(YX)
set EI=M4V('o01A')
call ForGroupBJ(EI,function R3X)
call DestroyGroup(EI)
endfunction
function R6X takes nothing returns boolean
return(GetSpellAbilityId()=='A04A')
endfunction
function R7X takes nothing returns nothing
set YX=GetSpellTargetLoc()
call CreateDestructableLoc('LTlt',YX,GetRandomReal(0,360),GetRandomReal(.9,1.1),0)
call SetDestructableAnimation(bj_lastCreatedDestructable,"birth")
call RemoveLocation(YX)
endfunction
function R9X takes nothing returns boolean
return(GetSpellAbilityId()=='A09J')
endfunction
function IVX takes nothing returns nothing
set YX=GetSpellTargetLoc()
call CreateDestructableLoc('LTlt',YX,GetRandomReal(0,360),GetRandomReal(.9,1.1),0)
call SetDestructableAnimation(bj_lastCreatedDestructable,"birth")
call RemoveLocation(YX)
endfunction
function IXX takes nothing returns boolean
return(GetSpellAbilityId()=='A04M')
endfunction
function IOX takes nothing returns nothing
set LR=GetRectCenter(R3)
call SetUnitPositionLoc(GetSpellAbilityUnit(),LR)
call RemoveLocation(LR)
endfunction
function IIX takes nothing returns boolean
return(GetSpellAbilityId()=='A04W')
endfunction
function IAX takes nothing returns nothing
set SX=GetSpellTargetLoc()
call AddSpecialEffectLocBJ(SX,"Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl")
call RemoveLocation(SX)
endfunction
function IBX takes nothing returns boolean
return(SubStringBJ(GetEventPlayerChatString(),1,$A)=="-deathnote")
endfunction
function ICX takes nothing returns boolean
return(UnitHasItemOfTypeBJ(GetEnumUnit(),'I01A'))
endfunction
function IDX takes nothing returns nothing
if(ICX())then
set TX=GetEnumUnit()
endif
endfunction
function IFX takes nothing returns boolean
return((SubStringBJ(GetEventPlayerChatString(),$C,'d')==GetUnitName(GetEnumUnit()))and(IsUnitType(GetEnumUnit(),UNIT_TYPE_STRUCTURE)==false)and(IsUnitType(GetEnumUnit(),UNIT_TYPE_MECHANICAL)==false)and(GetUnitStateSwap(UNIT_STATE_MAX_LIFE,GetEnumUnit())<2100.))!=null
endfunction
function IGX takes nothing returns nothing
if(IFX())then
set SI=GetUnitLoc(GetEnumUnit())
call WFV("-- Marked for Death! --",SI,$FF,25,25,$FF,8.)
call SetItemDroppable(GetItemOfTypeFromUnitBJ(GetEnumUnit(),'I01A'),false)
call UnitApplyTimedLifeBJ(40.,'BTLF',GetEnumUnit())
call GroupAddUnit(MR,GetEnumUnit())
call RemoveLocation(SI)
endif
endfunction
function IHX takes nothing returns boolean
return(TX!=null)and(IsUnitAliveBJ(TX))
endfunction
function IJX takes nothing returns nothing
set OX=MZV(bj_mapInitialPlayableArea)
call ForGroupBJ(OX,function IDX)
call DestroyGroup(OX)
if(IHX())then
set OX=M9V(GetTriggerPlayer())
call ForGroupBJ(OX,function IGX)
call DestroyGroup(OX)
endif
set TX=null
endfunction
function ILX takes nothing returns boolean
return(IsUnitInGroup(GetDyingUnit(),MR))
endfunction
function IMX takes nothing returns nothing
call SetItemDroppable(GetItemOfTypeFromUnitBJ(GetTriggerUnit(),'I01A'),true)
call CinematicFadeBJ(2,2.5,"ReplaceableTextures\\CameraMasks\\White_mask.blp",0,0,0,0)
set BR=GetUnitLoc(GetDyingUnit())
call PlaySoundAtPointBJ(B6,'d',BR,0)
call RemoveLocation(BR)
call GroupRemoveUnit(MR,GetDyingUnit())
endfunction
function IQX takes nothing returns boolean
return(GetSpellAbilityId()=='A0CQ')
endfunction
function ISX takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function ITX takes nothing returns nothing
set JI=M1V(1000.,GetUnitLoc(GetTriggerUnit()),Condition(function ISX))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=CountUnitsInGroup(JI)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set KI=GroupPickRandomUnit(JI)
call CreateNUnitsAtLoc(1,'h05R',GetOwningPlayer(GetTriggerUnit()),GetUnitLoc(KI),bj_UNIT_FACING)
set LI=bj_lastCreatedUnit
call SetUnitAbilityLevelSwapped('A0CP',LI,GetUnitAbilityLevelSwapped('A0CQ',GetTriggerUnit()))
call IssueTargetOrderById(LI,$D008A,KI)
call UnitApplyTimedLifeBJ(2.,'BTLF',LI)
call GroupRemoveUnit(JI,KI)
set KI=null
set LI=null
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DestroyGroup(JI)
endfunction
function IWX takes nothing returns boolean
return GetSpellAbilityId()=='A0CV' or GetSpellAbilityId()=='A0D3'
endfunction
function IYX takes nothing returns nothing
local unit u=GetTriggerUnit()
local unit v=GetSpellTargetUnit()
local real TSV=GetUnitState(v,UNIT_STATE_MANA)
local real t=1.
loop
call SetUnitState(v,UNIT_STATE_MANA,.0)
call TriggerSleepAction(t)
exitwhen UnitHasBuffBJ(v,'B03K')==false
endloop
call SetUnitState(v,UNIT_STATE_MANA,TSV)
set u=null
set v=null
endfunction
function IZX takes nothing returns boolean
return(GetSpellAbilityId()=='A0D8')
endfunction
function I_X takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function I0X takes nothing returns nothing
set JI=M1V(1000.,GetUnitLoc(GetTriggerUnit()),Condition(function I_X))
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=CountUnitsInGroup(JI)
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set KI=GroupPickRandomUnit(JI)
call CreateNUnitsAtLoc(1,'h05R',GetOwningPlayer(GetTriggerUnit()),GetUnitLoc(KI),bj_UNIT_FACING)
set LI=bj_lastCreatedUnit
call SetUnitAbilityLevelSwapped('A0CV',LI,GetUnitAbilityLevelSwapped('A0CU',GetTriggerUnit()))
call IssueTargetOrderById(LI,$D00DD,KI)
call UnitApplyTimedLifeBJ(2.,'BTLF',LI)
call GroupRemoveUnit(JI,KI)
set KI=null
set LI=null
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call DestroyGroup(JI)
endfunction
function I2X takes nothing returns nothing
call InitHashtableBJ()
set TI=GetLastCreatedHashtableBJ()
set UI[0]=350.
set UI[1]=45.
set UI[2]=400.
set UI[3]=15.
set UI[4]=.4
set UI[5]=.05
set UI[6]=15.
set UI[7]=10.
set UI[3]=(UI[3]*UI[5])
set UI[6]=(UI[6]*UI[4])
set UI[7]=(UI[7]*UI[4])
endfunction
function I4X takes nothing returns boolean
return(GetIssuedOrderId()==$D0057)and(GetUnitAbilityLevelSwapped('A0CT',GetTriggerUnit())>0)
endfunction
function I5X takes nothing returns nothing
set WI=GetTriggerUnit()
call SetUnitMoveSpeed(WI,250.)
call SaveRealBJ(UI[4],StringHashBJ("timer"),GetHandleIdBJ(GetTriggerUnit()),TI)
call AddSpecialEffectTargetUnitBJ("origin",WI,"war3mapImported\\GrudgeAura.mdx")
call SaveEffectHandleBJ(bj_lastCreatedEffect,StringHashBJ("aura"),GetHandleIdBJ(GetTriggerUnit()),TI)
set ZI=CreateGroup()
call SaveGroupHandleBJ(GetLastCreatedGroup(),StringHashBJ("group"),GetHandleIdBJ(GetTriggerUnit()),TI)
call GroupAddUnit(YI,WI)
call EnableTrigger(OPV)
call EnableTrigger(OQV)
call EnableTrigger(OSV)
endfunction
function I7X takes nothing returns boolean
return(GetIssuedOrderId()==$D0058)and(GetUnitAbilityLevelSwapped('A0CT',GetTriggerUnit())>0)
endfunction
function I8X takes nothing returns nothing
set WI=GetTriggerUnit()
call SetUnitMoveSpeed(WI,522.)
set ZI=LoadGroupHandleBJ(StringHashBJ("group"),GetHandleIdBJ(GetTriggerUnit()),TI)
call DestroyGroup(ZI)
call GroupRemoveUnit(YI,WI)
call DestroyEffect(LoadEffectHandleBJ(StringHashBJ("aura"),GetHandleIdBJ(GetTriggerUnit()),TI))
call FlushChildHashtableBJ(GetHandleIdBJ(GetTriggerUnit()),TI)
endfunction
function AVX takes nothing returns boolean
return((VA-UI[5])<=.0)
endfunction
function AEX takes nothing returns boolean
return(IsUnitAliveBJ(WI))and(GetUnitStateSwap(UNIT_STATE_MANA,WI)>=UI[7])
endfunction
function AXX takes nothing returns nothing
set WI=GetEnumUnit()
if(AEX())then
set VA=LoadRealBJ(StringHashBJ("timer"),GetHandleIdBJ(GetEnumUnit()),TI)
set ZI=LoadGroupHandleBJ(StringHashBJ("group"),GetHandleIdBJ(GetEnumUnit()),TI)
if(AVX())then
set EA=GetUnitLoc(WI)
set XA=MJV(EA,UI[0],GetUnitFacing(WI))
call CreateNUnitsAtLoc(1,'h05S',GetOwningPlayer(WI),XA,bj_UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("origin",bj_lastCreatedUnit,"amaterasu.mdx")
call SaveEffectHandleBJ(bj_lastCreatedEffect,StringHashBJ("effect"),GetHandleIdBJ(bj_lastCreatedUnit),TI)
call UnitApplyTimedLifeBJ(UI[1],'BTLF',bj_lastCreatedUnit)
call GroupAddUnit(OA,bj_lastCreatedUnit)
call GroupAddUnit(ZI,bj_lastCreatedUnit)
call SaveUnitHandleBJ(WI,StringHashBJ("caster"),GetHandleIdBJ(bj_lastCreatedUnit),TI)
call SetWidgetLife(WI,(GetUnitStateSwap(UNIT_STATE_LIFE,WI)-(UI[6]*I2R(CountUnitsInGroup(ZI)))))
call SetUnitManaBJ(WI,(GetUnitStateSwap(UNIT_STATE_MANA,WI)-(UI[7]*I2R(CountUnitsInGroup(ZI)))))
call SaveRealBJ(UI[4],StringHashBJ("timer"),GetHandleIdBJ(GetEnumUnit()),TI)
call RemoveLocation(EA)
call RemoveLocation(XA)
else
call SaveRealBJ((VA-UI[5]),StringHashBJ("timer"),GetHandleIdBJ(GetEnumUnit()),TI)
endif
else
call IssueImmediateOrderById(WI,$D0058)
endif
endfunction
function AOX takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function ARX takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(WI)))
endfunction
function AIX takes nothing returns boolean
return GetBooleanAnd(AOX(),ARX())
endfunction
function AAX takes nothing returns boolean
return(IsUnitAliveBJ(WI))
endfunction
function ANX takes nothing returns nothing
if(AAX())then
call UnitDamageTargetBJ(WI,GetEnumUnit(),UI[3],ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
else
call UnitDamageTargetBJ(GetEnumUnit(),GetEnumUnit(),UI[3],ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
endif
endfunction
function ABX takes nothing returns nothing
set WI=LoadUnitHandleBJ(StringHashBJ("caster"),GetHandleIdBJ(GetEnumUnit()),TI)
set EA=GetUnitLoc(GetEnumUnit())
set RA=M1V(UI[2],EA,Condition(function AIX))
call ForGroupBJ(RA,function ANX)
call DestroyGroup(RA)
call RemoveLocation(EA)
endfunction
function ACX takes nothing returns nothing
call ForGroupBJ(YI,function AXX)
call ForGroupBJ(OA,function ABX)
endfunction
function AFX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h05S')
endfunction
function AGX takes nothing returns boolean
return(IsUnitGroupEmptyBJ(OA))
endfunction
function AHX takes nothing returns nothing
call GroupRemoveUnit(OA,GetTriggerUnit())
call DestroyEffect(LoadEffectHandleBJ(StringHashBJ("effect"),GetHandleIdBJ(GetTriggerUnit()),TI))
call FlushChildHashtableBJ(GetHandleIdBJ(GetTriggerUnit()),TI)
if(AGX())then
call DisableTrigger(GetTriggeringTrigger())
call DisableTrigger(OQV)
endif
endfunction
function AKX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='n03R')
endfunction
function ALX takes nothing returns nothing
call IssueTargetOrderById(GetTriggerUnit(),$D000F,JN)
call UnitApplyTimedLifeBJ(5.,'BTLF',GetTriggerUnit())
endfunction
function APX takes nothing returns boolean
return(GetSpellAbilityId()=='A0DA')
endfunction
function AQX takes nothing returns nothing
set JN=GetSpellTargetUnit()
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=20
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set LN=GetUnitLoc(JN)
set KN=MJV(LN,600.,(I2R(bj_forLoopAIndex)*18.))
call CreateNUnitsAtLoc(1,'n03R',GetOwningPlayer(GetTriggerUnit()),KN,bj_UNIT_FACING)
call RemoveLocation(KN)
call TriggerSleepAction(.1)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call TriggerSleepAction(.1)
call RemoveLocation(LN)
set JN=null
endfunction
function ATX takes nothing returns boolean
return(GetSpellAbilityId()=='A0DC')or(GetSpellAbilityId()=='A0G1')
endfunction
function AUX takes nothing returns boolean
return(ATX())
endfunction
function AWX takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))
endfunction
function AYX takes nothing returns boolean
return(IsUnitType(GetEnumUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction
function AZX takes nothing returns nothing
call UnitDamageTargetBJ(GetTriggerUnit(),GetEnumUnit(),250.,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_NORMAL)
if(AYX())then
call SetUnitPositionLoc(GetEnumUnit(),XX)
endif
endfunction
function A_X takes nothing returns nothing
set XX=GetSpellTargetLoc()
set UO=M1V(700.,XX,Condition(function AWX))
call CreateNUnitsAtLoc(1,'o00J',GetOwningPlayer(GetSpellAbilityUnit()),XX,bj_UNIT_FACING)
call UnitApplyTimedLifeBJ(.1,'BHwe',bj_lastCreatedUnit)
call TerrainDeformationRippleBJ(1.,true,XX,450.,225.,64,1,112.5)
call ForGroupBJ(UO,function AZX)
call DestroyGroup(UO)
call RemoveLocation(XX)
endfunction
function A1X takes nothing returns boolean
return(GetSpellAbilityId()=='A0CU')
endfunction
function A2X takes nothing returns boolean
return(IA==0)
endfunction
function A3X takes nothing returns boolean
return(IA>NA)
endfunction
function A4X takes nothing returns nothing
if(A2X())then
call EnableTrigger(OZV)
endif
set IA=(IA+1)
if(A3X())then
set AA[IA]=IA
set NA=IA
endif
set BA=AA[IA]
set CA[BA]=GetTriggerUnit()
set DA[BA]=GetSpellTargetUnit()
set FA[BA]=GetUnitLoc(CA[BA])
set GA[BA]="Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
set HA[BA]=25.
set JA[BA]=GetUnitAbilityLevelSwapped('A000',CA[BA])
set KA[BA]=(25.*I2R(JA[BA]))
call PauseUnit(DA[BA],true)
call SetUnitPathing(DA[BA],false)
endfunction
function A6X takes nothing returns boolean
return(SA[BA]<=130.)
endfunction
function A7X takes nothing returns boolean
return(IA==0)
endfunction
function A8X takes nothing returns nothing
set LA=1
loop
exitwhen LA>IA
set BA=AA[LA]
set MA[BA]=GetUnitLoc(DA[BA])
set PA[BA]=AngleBetweenPoints(MA[BA],FA[BA])
set QA[BA]=MJV(MA[BA],HA[BA],PA[BA])
call SetUnitFacingToFaceUnitTimed(DA[BA],CA[BA],0)
call SetUnitPositionLoc(DA[BA],QA[BA])
set SA[BA]=DistanceBetweenPoints(MA[BA],FA[BA])
call AddSpecialEffectLocBJ(MA[BA],GA[BA])
set TA[BA]=bj_lastCreatedEffect
call DestroyEffect(TA[BA])
if(A6X())then
call UnitDamageTargetBJ(CA[BA],DA[BA],KA[BA],ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
call SetUnitPathing(DA[BA],true)
call PauseUnit(DA[BA],false)
call RemoveLocation(FA[BA])
set AA[LA]=AA[IA]
set AA[IA]=BA
set IA=(IA-1)
set LA=(LA-1)
endif
call RemoveLocation(MA[BA])
call RemoveLocation(QA[BA])
set LA=LA+1
endloop
if(A7X())then
call DisableTrigger(GetTriggeringTrigger())
endif
endfunction
function NVX takes nothing returns boolean
return(GetSpellAbilityId()=='A0D9')
endfunction
function NEX takes nothing returns boolean
return(UA==0)
endfunction
function NXX takes nothing returns boolean
return(UA>YA)
endfunction
function NOX takes nothing returns boolean
return(true)
endfunction
function NRX takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(VN[ZA])))
endfunction
function NIX takes nothing returns boolean
return GetBooleanAnd(NOX(),NRX())
endfunction
function NAX takes nothing returns nothing
set NN[ZA]=GetEnumUnit()
call UnitDamageTargetBJ(VN[ZA],NN[ZA],350.,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_NORMAL)
endfunction
function NNX takes nothing returns nothing
if(NEX())then
call EnableTrigger(O0V)
endif
set UA=(UA+1)
if(NXX())then
set WA[UA]=UA
set YA=UA
endif
set ZA=WA[UA]
set VN[ZA]=GetTriggerUnit()
set EN[ZA]=GetUnitLoc(VN[ZA])
set XN[ZA]="Abilities\\Spells\\Orc\\Voodoo\\VoodooAura.mdl"
set ON[ZA]=20.
set RN[ZA]=55
call AddSpecialEffectTargetUnitBJ("origin",VN[ZA],XN[ZA])
set IN[ZA]=bj_lastCreatedEffect
set AN[ZA]=M1V(800.,EN[ZA],Condition(function NIX))
call SetUnitAnimation(VN[ZA],"spell")
call ForGroupBJ(AN[ZA],function NAX)
call DestroyGroup(AN[ZA])
endfunction
function NCX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction
function NDX takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(VN[ZA])))
endfunction
function NFX takes nothing returns boolean
return GetBooleanAnd(NCX(),NDX())
endfunction
function NGX takes nothing returns nothing
set DN[ZA]=GetEnumUnit()
set FN[ZA]=GetUnitLoc(DN[ZA])
set GN[ZA]=AngleBetweenPoints(EN[ZA],FN[ZA])
set HN[ZA]=MJV(FN[ZA],ON[ZA],GN[ZA])
call SetUnitPositionLoc(DN[ZA],HN[ZA])
call RemoveLocation(FN[ZA])
call RemoveLocation(HN[ZA])
endfunction
function NHX takes nothing returns boolean
return(RN[ZA]<=0)
endfunction
function NJX takes nothing returns boolean
return(UA==0)
endfunction
function NKX takes nothing returns nothing
set BN=1
loop
exitwhen BN>UA
set ZA=WA[BN]
set RN[ZA]=(RN[ZA]-2)
set CN[ZA]=M1V(700.,EN[ZA],Condition(function NFX))
call ForGroupBJ(CN[ZA],function NGX)
call DestroyGroup(CN[ZA])
if(NHX())then
call DestroyEffect(IN[ZA])
call RemoveLocation(EN[ZA])
set WA[BN]=WA[UA]
set WA[UA]=ZA
set UA=(UA-1)
set BN=(BN-1)
endif
set BN=BN+1
endloop
if(NJX())then
call DisableTrigger(GetTriggeringTrigger())
endif
endfunction
function NMX takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0DY',GetAttacker())>0)
endfunction
function NPX takes nothing returns nothing
local integer i=GetRandomInt(0,'d')
if i<=40 then
set SN=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'h068',GetOwningPlayer(GetAttacker()),SN,bj_UNIT_FACING)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,$D0208,SN)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call RemoveLocation(SN)
endif
endfunction
function NSX takes nothing returns boolean
return(GetSpellAbilityId()=='A0E0')
endfunction
function NTX takes nothing returns nothing
set SN=GetSpellTargetLoc()
call CreateNUnitsAtLoc(1,'h068',GetOwningPlayer(GetTriggerUnit()),SN,bj_UNIT_FACING)
call IssuePointOrderByIdLoc(bj_lastCreatedUnit,$D0079,SN)
call UnitApplyTimedLifeBJ(10.,'BTLF',bj_lastCreatedUnit)
call RemoveLocation(SN)
endfunction
function NWX takes nothing returns boolean
return(GetSpellAbilityId()=='A0EP')
endfunction
function NYX takes nothing returns boolean
return(IsUnitIllusion(GetSpellTargetUnit()))
endfunction
function NZX takes nothing returns nothing
if(NYX())then
call KillUnit(GetSpellTargetUnit())
endif
endfunction
function N0X takes nothing returns boolean
return(GetSpellAbilityId()=='A0EQ')
endfunction
function N1X takes nothing returns boolean
return(IsUnitIllusion(GetEnumUnit()))
endfunction
function N2X takes nothing returns nothing
if(N1X())then
call KillUnit(GetEnumUnit())
endif
endfunction
function N3X takes nothing returns nothing
call ForGroupBJ(M7V(GetOwningPlayer(GetTriggerUnit())),function N2X)
call DestroyGroup(bj_lastCreatedGroup)
endfunction
function N5X takes nothing returns boolean
return(GetSpellAbilityId()=='A0ER')
endfunction
function N6X takes nothing returns boolean
return(IsUnitIllusion(GetFilterUnit())==false)
endfunction
function N7X takes nothing returns boolean
return(GetUnitTypeId(GetFilterUnit())!='H05K')
endfunction
function N8X takes nothing returns boolean
return GetBooleanAnd(N6X(),N7X())
endfunction
function N9X takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h06I',GetOwningPlayer(GetTriggerUnit()),SI,bj_UNIT_FACING)
call IssueTargetOrderById(bj_lastCreatedUnit,$D0132,GetEnumUnit())
call UnitApplyTimedLifeBJ(5.,'BTLF',bj_lastCreatedUnit)
endfunction
function BVX takes nothing returns nothing
set SI=GetSpellTargetLoc()
call ForGroupBJ(M1V(750.,SI,Condition(function N8X)),function N9X)
call RemoveLocation(SI)
endfunction
function BXX takes nothing returns boolean
return(GetSpellAbilityId()=='A0EW')and(IsUnitIllusion(GetSpellTargetUnit()))
endfunction
function BOX takes nothing returns boolean
return(BXX())
endfunction
function BRX takes nothing returns nothing
set SI=GetUnitLoc(GetSpellTargetUnit())
call KillUnit(GetSpellTargetUnit())
call SetUnitPositionLoc(GetTriggerUnit(),SI)
call RemoveLocation(SI)
endfunction
function BAX takes nothing returns boolean
return(GetIssuedOrderId()==$D026D)and(GetUnitAbilityLevelSwapped('A0F5',GetTriggerUnit())>0)
endfunction
function BNX takes nothing returns boolean
return(GetIssuedOrderId()==$D026E)and(GetUnitAbilityLevelSwapped('A0F5',GetTriggerUnit())>0)
endfunction
function BBX takes nothing returns boolean
return(BNX())
endfunction
function BCX takes nothing returns boolean
return(BAX())
endfunction
function BDX takes nothing returns nothing
if(BCX())then
call GroupAddUnit(WB,GetTriggerUnit())
else
if(BBX())then
call GroupRemoveUnit(WB,GetTriggerUnit())
endif
endif
endfunction
function BGX takes nothing returns boolean
return(IsUnitInGroup(NC,WB))and(GetUnitTypeId(BC)!='E00M')and(GetUnitTypeId(BC)!='H06J')
endfunction
function BHX takes nothing returns boolean
return(BGX())
endfunction
function BJX takes nothing returns boolean
return(XC[GetUnitUserData(GetTriggerUnit())]==null)
endfunction
function BKX takes nothing returns boolean
return(GetUnitStateSwap(UNIT_STATE_MANA,NC)>=AC)
endfunction
function BLX takes nothing returns nothing
if(BKX())then
call SetWidgetLife(NC,(GetUnitStateSwap(UNIT_STATE_LIFE,NC)+AC))
call SetUnitManaBJ(NC,(GetUnitStateSwap(UNIT_STATE_MANA,NC)-(.75*AC)))
if(BJX())then
call AddSpecialEffectTargetUnitBJ("origin",BC,"Abilities\\Spells\\Human\\Feedback\\ArcaneTowerAttack.mdl")
call UnitDamageTargetBJ(NC,BC,AC,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_NORMAL)
else
call AddSpecialEffectTargetUnitBJ("origin",XC[GetUnitUserData(GetTriggerUnit())],"Abilities\\Spells\\Human\\Feedback\\ArcaneTowerAttack.mdl")
call UnitDamageTargetBJ(NC,XC[GetUnitUserData(GetTriggerUnit())],AC,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_NORMAL)
endif
else
call IssueImmediateOrderById(NC,$D026E)
endif
endfunction
function BPX takes nothing returns boolean
return(GetLearnedSkill()=='A0FB')
endfunction
function BQX takes nothing returns nothing
call UnitAddAbility(GetTriggerUnit(),'A0F7')
endfunction
function BTX takes nothing returns boolean
return(GetSpellAbilityId()=='A0F8')
endfunction
function BUX takes nothing returns boolean
return(GetSpellAbilityId()=='A0F7')
endfunction
function BWX takes nothing returns nothing
if(BTX())then
call UnitRemoveAbility(GetTriggerUnit(),'A0F8')
call UnitAddAbility(GetTriggerUnit(),'A0F7')
call DestroyEffect(VC[GetUnitUserData(GetTriggerUnit())])
endif
if(BUX())then
call UnitRemoveAbility(GetTriggerUnit(),'A0F7')
call UnitAddAbility(GetTriggerUnit(),'A0F8')
call AddSpecialEffectTargetUnitBJ("overhead",GetTriggerUnit(),"Abilities\\Spells\\Orc\\Voodoo\\VoodooAuraTarget.mdl")
set VC[GetUnitUserData(GetTriggerUnit())]=bj_lastCreatedEffect
endif
endfunction
function BZX takes nothing returns integer
return'A0F8'
endfunction
function B_X takes nothing returns integer
return'H06K'
endfunction
function MIMIC_CHANCE takes nothing returns integer
return 'd'
endfunction
function B0X takes nothing returns nothing
call SaveInteger(YB,GetHandleId(GetTriggerUnit()),1,GetIssuedOrderId())
endfunction
function B1X takes nothing returns boolean
return GetUnitAbilityLevel(GetFilterUnit(),BZX())>0
endfunction
function B2X takes nothing returns boolean
local group g=CreateGroup()
local unit c=GetTriggerUnit()
local unit t=GetSpellTargetUnit()
local location l=GetUnitLoc(GetTriggerUnit())
local boolean B3X
if(GetUnitTypeId(GetTriggerUnit())=='H06K')or(GetUnitAbilityLevel(c,'Aloc')>0)or(GetUnitAbilityLevel(c,'A0D5')>0)then
return false
endif
if(t==null)then
set g=M1V(1000.,l,Condition(function B1X))
set t=GroupPickRandomUnit(g)
endif
if(t==c)then
return false
endif
set B3X=GetUnitAbilityLevel(t,BZX())>0
call DestroyGroup(g)
call RemoveLocation(l)
set t=null
return B3X
endfunction
function B4X takes nothing returns nothing
local unit c=GetTriggerUnit()
local unit t=GetSpellTargetUnit()
local location l=GetUnitLoc(c)
local real B5X=10.
local group g
local unit B6X
local integer ID=GetHandleId(GetTriggerUnit())
local integer B7X=GetSpellAbilityId()
local integer B8X=GetUnitAbilityLevel(c,B7X)
local integer B9X='d'
if GetRandomInt(1,'d')<=B9X then
if(not(t==null))and(not(l==null))then
if(GetUnitState(t,UNIT_STATE_MANA))<'d' then
if(B7X=='A0D3')then
set B6X=CreateUnit(GetOwningPlayer(t),B_X(),GetUnitX(t),GetUnitY(t),0)
call SetHeroLevel(B6X,30,false)
call UnitAddAbility(B6X,B7X)
call SetUnitAbilityLevel(B6X,B7X,B8X)
call IssueTargetOrderById(B6X,LoadInteger(YB,ID,1),c)
call TriggerSleepAction(B5X)
call RemoveUnit(B6X)
endif
call FlushChildHashtable(YB,ID)
call RemoveLocation(l)
call DestroyGroup(g)
set c=null
set t=null
set B6X=null
return
else
call SetUnitState(t,UNIT_STATE_MANA,GetUnitState(t,UNIT_STATE_MANA)-'d')
set B6X=CreateUnit(GetOwningPlayer(t),B_X(),GetUnitX(t),GetUnitY(t),0)
call SetHeroLevel(B6X,30,false)
call UnitAddAbility(B6X,B7X)
call SetUnitAbilityLevel(B6X,B7X,B8X)
call IssueTargetOrderById(B6X,LoadInteger(YB,ID,1),c)
call TriggerSleepAction(B5X)
call RemoveUnit(B6X)
endif
elseif(t==null)then
set g=CreateGroup()
set g=M1V(1000.,l,Condition(function B1X))
set t=GroupPickRandomUnit(g)
if(not(t==null))then
if(GetUnitState(t,UNIT_STATE_MANA))<'d' then
if(B7X=='A0D8')then
call SetUnitState(t,UNIT_STATE_MANA,GetUnitState(t,UNIT_STATE_MANA)-'d')
set B6X=CreateUnit(GetOwningPlayer(t),B_X(),GetUnitX(t),GetUnitY(t),0)
call SetHeroLevel(B6X,30,false)
call UnitApplyTimedLife(B6X,'BTLF',$A)
call UnitAddAbility(B6X,B7X)
call SetUnitAbilityLevel(B6X,B7X,B8X)
call IssueImmediateOrderById(B6X,LoadInteger(YB,ID,1))
call IssuePointOrderByIdLoc(B6X,LoadInteger(YB,ID,1),l)
call TriggerSleepAction(B5X)
call RemoveUnit(B6X)
endif
call FlushChildHashtable(YB,ID)
call RemoveLocation(l)
call DestroyGroup(g)
set c=null
set t=null
set B6X=null
return
else
call SetUnitState(t,UNIT_STATE_MANA,GetUnitState(t,UNIT_STATE_MANA)-'d')
set B6X=CreateUnit(GetOwningPlayer(t),B_X(),GetUnitX(t),GetUnitY(t),0)
call SetHeroLevel(B6X,30,false)
call UnitApplyTimedLife(B6X,'BTLF',$A)
call UnitAddAbility(B6X,B7X)
call SetUnitAbilityLevel(B6X,B7X,B8X)
call IssueImmediateOrderById(B6X,LoadInteger(YB,ID,1))
call IssuePointOrderByIdLoc(B6X,LoadInteger(YB,ID,1),l)
call TriggerSleepAction(B5X)
call RemoveUnit(B6X)
endif
endif
endif
endif
call FlushChildHashtable(YB,ID)
call RemoveLocation(l)
call DestroyGroup(g)
set c=null
set t=null
set B6X=null
endfunction
function CVX takes nothing returns nothing
local trigger t=CreateTrigger()
local trigger tt=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function B2X))
call TriggerAddAction(t,function B4X)
call TriggerRegisterAnyUnitEventBJ(tt,EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER)
call TriggerRegisterAnyUnitEventBJ(tt,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER)
call TriggerRegisterAnyUnitEventBJ(tt,EVENT_PLAYER_UNIT_ISSUED_ORDER)
call TriggerAddAction(tt,function B0X)
set t=null
set tt=null
endfunction
function CEX takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0F5',GetKillingUnit())>0)
endfunction
function CXX takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ("overhead",GetKillingUnit(),"Abilities\\Spells\\Items\\AIma\\AImaTarget.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call SetUnitManaBJ(GetKillingUnit(),(GetUnitStateSwap(UNIT_STATE_MANA,GetKillingUnit())+75.))
endfunction
function CRX takes nothing returns boolean
return(GetSpellAbilityId()=='A0F6')
endfunction
function CIX takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
set OC=GetSpellTargetUnit()
call CreateNUnitsAtLoc(1,'h06L',GetOwningPlayer(GetTriggerUnit()),SI,bj_UNIT_FACING)
set EC=bj_lastCreatedUnit
call SetUnitAbilityLevelSwapped('A0FA',EC,GetUnitAbilityLevelSwapped('A0F6',GetTriggerUnit()))
call IssueTargetOrderById(EC,$D00D3,OC)
call UnitApplyTimedLifeBJ(5.,'BTLF',EC)
call RemoveLocation(SI)
set CB=null
set EC=null
endfunction
function CNX takes nothing returns boolean
return GetSpellAbilityId()=='A0F9'
endfunction
function CBX takes nothing returns nothing
local unit u=GetTriggerUnit()
local unit t=GetSpellTargetUnit()
local location l=GetUnitLoc(t)
local unit d
local real B5X=1.
local effect CCX=AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Curse\\CurseTarget.mdl",t,"overhead")
call UnitRemoveAbility(u,'A0F9')
call UnitAddAbility(u,'A0FC')
set XC[GetUnitUserData(u)]=t
loop
exitwhen XC[GetUnitUserData(u)]==null or IsUnitDeadBJ(t)
if(GetUnitAbilityLevel(t,'B04B')<1)then
set d=CreateUnitAtLoc(GetOwningPlayer(u),'h07Q',l,.0)
call IssueTargetOrderById(d,$D006B,t)
call UnitApplyTimedLife(d,'BTLF',2.)
set d=null
endif
call TriggerSleepAction(B5X)
endloop
set XC[GetUnitUserData(u)]=null
call UnitRemoveAbility(t,'B04B')
call DestroyEffect(CCX)
call UnitRemoveAbility(u,'A0FC')
call UnitAddAbility(u,'A0F9')
set CCX=null
set u=null
set t=null
endfunction
function CDX takes nothing returns boolean
return(GetSpellAbilityId()=='A0FC')
endfunction
function CFX takes nothing returns nothing
set XC[GetUnitUserData(GetTriggerUnit())]=null
call UnitRemoveAbility(GetTriggerUnit(),'A0FC')
call UnitAddAbility(GetTriggerUnit(),'A0F9')
endfunction
function CHX takes nothing returns boolean
return GetSpellAbilityId()=='A0G5' and(GetUnitTypeId(GetSpellTargetUnit())=='H061' or GetUnitTypeId(GetSpellTargetUnit())=='H06J')
endfunction
function CJX takes nothing returns nothing
local unit u=GetTriggerUnit()
local unit v=GetSpellTargetUnit()
local unit d
local location l1=GetUnitLoc(u)
local location l2=GetUnitLoc(v)
local real t1=.5
local real t2=15.
local integer CKX=1
local integer lv=GetUnitLevel(v)
local lightning CLX
if(GetUnitTypeId(v)=='H061')then
call SetUnitInvulnerable(u,true)
call SetUnitInvulnerable(v,true)
call PauseUnit(u,true)
call PauseUnit(v,true)
call UnitAddAbility(v,'Aloc')
call UnitAddAbility(u,'Aloc')
set CLX=AddLightningLoc("HWPB",l1,l2)
set d=CreateUnitAtLoc(GetOwningPlayer(u),'H077',l2,GetUnitFacing(v))
call PauseUnit(d,true)
call SetUnitInvulnerable(d,true)
call SetUnitTimeScale(d,10.5*.01)
call SetUnitAnimation(d,"birth")
loop
exitwhen t2<=0
call SetUnitScalePercent(u,700.-(CKX*$C),700.-(CKX*$C),700.-(CKX*$C))
call SetUnitVertexColor(v,$96,$96,50,$FA-(CKX*$A))
set t2=t2-t1
set CKX=CKX+1
call TriggerSleepAction(t1)
endloop
elseif(GetUnitTypeId(v)=='H06J')then
call SetUnitInvulnerable(u,true)
call SetUnitInvulnerable(v,true)
call PauseUnit(u,true)
call PauseUnit(v,true)
call UnitAddAbility(v,'Aloc')
call UnitAddAbility(u,'Aloc')
set CLX=AddLightningLoc("CLPB",l1,l2)
set d=CreateUnitAtLoc(GetOwningPlayer(u),'H078',l2,GetUnitFacing(v))
call PauseUnit(d,true)
call SetUnitInvulnerable(d,true)
call SetUnitTimeScale(d,3.5*.01)
call SetUnitAnimation(d,"birth")
loop
exitwhen t2<=0
call SetUnitScalePercent(u,700.-(CKX*$C),700.-(CKX*$C),700.-(CKX*$C))
call SetUnitVertexColor(v,'d','d','d',$FA-(CKX*$A))
set t2=t2-t1
set CKX=CKX+1
call TriggerSleepAction(t1)
endloop
endif
call KillUnit(u)
call RemoveUnit(v)
call SetHeroLevel(d,lv,true)
call SetUnitTimeScale(d,1)
call SetUnitInvulnerable(d,false)
call PauseUnit(d,false)
call DestroyLightning(CLX)
call RemoveLocation(l1)
call RemoveLocation(l2)
set u=null
set v=null
set d=null
endfunction
function CMX takes nothing returns boolean
return GetSpellAbilityId()=='A0G6'
endfunction
function CPX takes nothing returns nothing
local unit u=GetTriggerUnit()
local unit d
local location l1=GetUnitLoc(u)
local real t1=.5
local real t2=8.
local integer CKX=1
local integer lv=GetUnitLevel(u)
call SetUnitInvulnerable(u,true)
call PauseUnit(u,true)
call UnitAddAbility(u,'Aloc')
if(GetUnitTypeId(u)=='H077')then
set d=CreateUnitAtLoc(GetOwningPlayer(u),'H061',l1,GetUnitFacing(u))
call PauseUnit(d,true)
call SetUnitInvulnerable(d,true)
call SetUnitTimeScale(u,$B*.01)
call SetUnitAnimation(u,"death")
loop
exitwhen t2<=0
call SetUnitVertexColor(d,$96,$96,50,0+(CKX*20))
set t2=t2-t1
set CKX=CKX+1
call TriggerSleepAction(t1)
endloop
elseif(GetUnitTypeId(u)=='H078')then
set d=CreateUnitAtLoc(GetOwningPlayer(u),'H06J',l1,GetUnitFacing(u))
call PauseUnit(d,true)
call SetUnitInvulnerable(d,true)
call SetUnitTimeScale(u,6.7*.01)
call SetUnitAnimation(u,"death")
loop
exitwhen t2<=0
call SetUnitVertexColor(d,'d','d','d',0+(CKX*20))
set t2=t2-t1
set CKX=CKX+1
call TriggerSleepAction(t1)
endloop
endif
call RemoveUnit(u)
call SetHeroLevel(d,lv,true)
call SetUnitInvulnerable(d,false)
call PauseUnit(d,false)
call RemoveLocation(l1)
set u=null
set d=null
endfunction
function CQX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H078')or(GetUnitTypeId(GetTriggerUnit())=='H077')
endfunction
function CSX takes nothing returns boolean
return(CQX())
endfunction
function CTX takes nothing returns nothing
call TerrainDeformationRippleBJ(15.,true,GetRectCenter(bj_mapInitialPlayableArea),$400,1000000000.,99.,1,450.)
endfunction
function CWX takes nothing returns boolean
return(GetSpellAbilityId()=='A0H6')
endfunction
function CYX takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'h07C',GetOwningPlayer(GetTriggerUnit()),SI,GetUnitFacing(GetTriggerUnit()))
call UnitApplyTimedLifeBJ(5.,'BTLF',bj_lastCreatedUnit)
call RemoveLocation(SI)
endfunction
function C_X takes nothing returns boolean
return(GetSpellAbilityId()=='A0H7')
endfunction
function C0X takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'h07B',GetOwningPlayer(GetTriggerUnit()),SI,GetUnitFacing(GetTriggerUnit()))
call UnitApplyTimedLifeBJ(5.,'BTLF',bj_lastCreatedUnit)
call RemoveLocation(SI)
endfunction
function C2X takes nothing returns boolean
return(GetSpellAbilityId()=='A0GA')or(GetSpellAbilityId()=='A0G9')or(GetSpellAbilityId()=='A0JK')
endfunction
function C3X takes nothing returns boolean
return(C2X())
endfunction
function C4X takes nothing returns boolean
return(GetSpellAbilityId()=='A0JK')
endfunction
function C5X takes nothing returns boolean
return(GetSpellAbilityId()=='A0GA')
endfunction
function C6X takes nothing returns boolean
return(GetSpellAbilityId()=='A0G9')
endfunction
function C7X takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
if(C6X())then
call CreateNUnitsAtLoc(1,'h07O',GetOwningPlayer(GetTriggerUnit()),SI,GetUnitFacing(GetTriggerUnit()))
call UnitApplyTimedLifeBJ(5.,'BTLF',bj_lastCreatedUnit)
else
if(C5X())then
call CreateNUnitsAtLoc(1,'h07P',GetOwningPlayer(GetTriggerUnit()),SI,GetUnitFacing(GetTriggerUnit()))
call UnitApplyTimedLifeBJ(5.,'BTLF',bj_lastCreatedUnit)
else
if(C4X())then
call CreateNUnitsAtLoc(1,'h07P',GetOwningPlayer(GetTriggerUnit()),SI,GetUnitFacing(GetTriggerUnit()))
call UnitApplyTimedLifeBJ(5.,'BTLF',bj_lastCreatedUnit)
call CreateNUnitsAtLoc(1,'h07O',GetOwningPlayer(GetTriggerUnit()),SI,GetUnitFacing(GetTriggerUnit()))
call UnitApplyTimedLifeBJ(5.,'BTLF',bj_lastCreatedUnit)
endif
endif
endif
call RemoveLocation(SI)
endfunction
function C9X takes nothing returns boolean
return(GetSpellAbilityId()=='A0HS')
endfunction
function DVX takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'h07Q',GetOwningPlayer(GetTriggerUnit()),SI,GetUnitFacing(GetTriggerUnit()))
call IssueImmediateOrderById(bj_lastCreatedUnit,$D009E)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call RemoveLocation(SI)
endfunction
function DXX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H06J')and(IsUnitIllusion(GetTriggerUnit())!=true)
endfunction
function DOX takes nothing returns boolean
return(DXX())
endfunction
function DRX takes nothing returns boolean
return(WU)
endfunction
function DIX takes nothing returns nothing
set RC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=GetTriggerUnit()
if(DRX())then
return
endif
set SI=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'h06N',GetOwningPlayer(GetTriggerUnit()),SI,bj_UNIT_FACING)
call AddSpecialEffectLocBJ(SI,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call RemoveLocation(SI)
endfunction
function DNX takes nothing returns boolean
return(GetSpellAbilityId()=='A0FE')
endfunction
function DBX takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
call ReviveHeroLoc(RC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],SI,true)
call PlaySoundBJ(L5)
call AddSpecialEffectLocBJ(SI,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
set RC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=null
call KillUnit(GetTriggerUnit())
call RemoveLocation(SI)
endfunction
function DDX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h06N')
endfunction
function DFX takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
call AddSpecialEffectLocBJ(SI,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call RemoveLocation(SI)
endfunction
function DHX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H061')and(IsUnitIllusion(GetTriggerUnit())!=true)
endfunction
function DJX takes nothing returns boolean
return(DHX())
endfunction
function DKX takes nothing returns boolean
return(WU)
endfunction
function DLX takes nothing returns nothing
set WC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=GetTriggerUnit()
if(DKX())then
return
endif
set SI=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'h076',GetOwningPlayer(GetTriggerUnit()),SI,bj_UNIT_FACING)
call AddSpecialEffectLocBJ(SI,"Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl")
call RemoveLocation(SI)
endfunction
function DPX takes nothing returns boolean
return(GetSpellAbilityId()=='A0G4')
endfunction
function DQX takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
call ReviveHeroLoc(WC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))],SI,true)
call PlaySoundBJ(R6)
call AddSpecialEffectLocBJ(SI,"Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl")
set WC[(1+GetPlayerId(GetOwningPlayer(GetTriggerUnit())))]=null
call KillUnit(GetTriggerUnit())
call RemoveLocation(SI)
endfunction
function DTX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h076')
endfunction
function DUX takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
call AddSpecialEffectLocBJ(SI,"Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl")
call RemoveLocation(SI)
endfunction
function DYX takes nothing returns boolean
return(GetSpellAbilityId()=='A0GM')
endfunction
function DZX takes nothing returns nothing
call GroupAddUnit(VD,GetSpellTargetUnit())
endfunction
function D0X takes nothing returns boolean
return(GetSpellAbilityId()=='A0GF')
endfunction
function D1X takes nothing returns boolean
return(D0X())
endfunction
function D2X takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h07F',GetOwningPlayer(GetTriggerUnit()),GetUnitLoc(GetTriggerUnit()),bj_UNIT_FACING)
call IssueTargetOrderById(bj_lastCreatedUnit,$D0065,GetTriggerUnit())
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
endfunction
function D4X takes nothing returns boolean
return GetSpellAbilityId()=='A0GF'
endfunction
function D5X takes nothing returns nothing
local unit u=GetTriggerUnit()
local integer n=GetUnitAbilityLevel(u,'A0GF')
local real t=2.
call TriggerSleepAction(t)
call UnitAddAbility(u,'A0GJ')
call SetUnitAbilityLevel(u,'A0GJ',n)
set u=null
endfunction
function D6X takes nothing returns boolean
return GetUnitAbilityLevel(BC,'A0GJ')>0
endfunction
function D7X takes nothing returns nothing
local unit u=BC
call UnitRemoveAbility(u,'A0GJ')
set u=null
endfunction
function D8X takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0GI',GetTriggerUnit())>0)
endfunction
function D9X takes nothing returns boolean
return(D8X())
endfunction
function FVX takes nothing returns nothing
call CreateNUnitsAtLoc(1,'h07F',GetOwningPlayer(GetTriggerUnit()),GetUnitLoc(GetTriggerUnit()),bj_UNIT_FACING)
call SetUnitAbilityLevelSwapped('A0GH',bj_lastCreatedUnit,GetUnitAbilityLevelSwapped('A0GI',GetTriggerUnit()))
call IssueTargetOrderById(bj_lastCreatedUnit,$D0085,GetTriggerUnit())
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
endfunction
function FXX takes nothing returns boolean
return(GetSpellAbilityId()=='A0GI')
endfunction
function FOX takes nothing returns nothing
local unit x=GetTriggerUnit()
local unit y=GetSpellTargetUnit()
local location l=MJV(GetUnitLoc(y),100.,GetUnitFacing(y)+$B4)
local real t=.1
local unit d
call TriggerSleepAction(t)
if(IsUnitAlly(y,GetOwningPlayer(x))==false)or(IsUnitInGroup(y,VD))then
call SetUnitAnimation(x,"attack")
set d=CreateUnitAtLoc(GetOwningPlayer(x),'h07F',l,bj_UNIT_FACING)
call IssueTargetOrderById(d,$D007F,y)
call UnitApplyTimedLife(d,'BTLF',2.)
endif
call SetUnitPositionLoc(x,l)
call RemoveLocation(l)
set x=null
set y=null
set d=null
set l=null
endfunction
function FIX takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0GF',GetAttacker())>0)
endfunction
function FAX takes nothing returns boolean
return(OD<90.)or(OD>270.)
endfunction
function FNX takes nothing returns boolean
return(FAX())
endfunction
function FBX takes nothing returns nothing
set ED=GetUnitLoc(GetAttacker())
set XD=GetUnitLoc(GetTriggerUnit())
set OD=RAbsBJ((AngleBetweenPoints(ED,XD)-GetUnitFacing(GetTriggerUnit())))
if(FNX())then
call UnitDamageTargetBJ(GetAttacker(),GetTriggerUnit(),50.,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_NORMAL)
call AddSpecialEffectTargetUnitBJ("origin",GetTriggerUnit(),"Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl")
endif
call RemoveLocation(ED)
call RemoveLocation(XD)
endfunction
function FDX takes nothing returns boolean
return(GetSpellAbilityId()=='A0HE')
endfunction
function FFX takes nothing returns nothing
call KillDestructable(GetEnumDestructable())
endfunction
function FGX takes nothing returns nothing
set SI=GetSpellTargetLoc()
call CreateNUnitsAtLoc(1,'h07R',GetOwningPlayer(GetTriggerUnit()),SI,bj_UNIT_FACING)
call IssueImmediateOrderById(bj_lastCreatedUnit,$D009F)
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call MQV(400.,SI,function FFX)
call RemoveLocation(SI)
endfunction
function FJX takes nothing returns boolean
return(GetSpellAbilityId()=='A0GS')
endfunction
function FKX takes nothing returns nothing
call SetUnitAnimation(GetTriggerUnit(),"channel")
endfunction
function FMX takes nothing returns boolean
return GetSpellAbilityId()=='A0HK'
endfunction
function FPX takes nothing returns nothing
local unit u=GetTriggerUnit()
local location l=GetSpellTargetLoc()
local unit d
local real t=.25
local integer c=40
loop
exitwhen c<=0
set d=CreateUnitAtLoc(GetOwningPlayer(u),'h07T',l,.0)
call IssueImmediateOrderById(d,$D009F)
call UnitApplyTimedLife(d,'BTLF',2.)
set c=c-1
call TriggerSleepAction(t)
endloop
call RemoveLocation(l)
set u=null
endfunction
function FQX takes nothing returns boolean
return(GetSpellAbilityId()=='A0HM')
endfunction
function FSX takes nothing returns boolean
return(FD==0)
endfunction
function FTX takes nothing returns nothing
if(FSX())then
call EnableTrigger(RWV)
endif
set FD=(FD+1)
set GD=(GD+1)
set HD[GD]=GetTriggerUnit()
call SetUnitPathing(HD[GD],false)
call SetUnitVertexColorBJ(HD[GD],'d','d','d',100.)
set JD[GD]=GetUnitLoc(HD[GD])
set KD=GetSpellTargetLoc()
set LD[GD]=(150.+(50.+I2R(GetUnitAbilityLevelSwapped('A0HM',HD[GD]))))
set MD[GD]=AngleBetweenPoints(JD[GD],KD)
set PD[GD]=DistanceBetweenPoints(JD[GD],KD)
set QD[GD]=(25.*I2R(GetUnitAbilityLevelSwapped('A0HM',HD[GD])))
set SD[GD]=.0
call RemoveLocation(KD)
endfunction
function FWX takes nothing returns boolean
return(RectContainsUnit(bj_mapInitialPlayableArea,HD[TD]))
endfunction
function FYX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction
function FZX takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function F_X takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(HD[TD])))
endfunction
function F0X takes nothing returns boolean
return GetBooleanAnd(FZX(),F_X())
endfunction
function F1X takes nothing returns boolean
return GetBooleanAnd(FYX(),F0X())
endfunction
function F2X takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ("origin",GetEnumUnit(),"Abilities\\Weapons\\Bolt\\BoltImpact.mdl")
call DestroyEffect(bj_lastCreatedEffect)
set ZD=25.
call UnitDamageTargetBJ(HD[TD],GetEnumUnit(),ZD,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNKNOWN)
endfunction
function F3X takes nothing returns boolean
return(SD[TD]>=PD[TD])
endfunction
function F4X takes nothing returns boolean
return(F3X())
endfunction
function F5X takes nothing returns boolean
return(FD==0)
endfunction
function F6X takes nothing returns nothing
set TD=1
loop
exitwhen TD>GD
set UD[TD]=GetUnitLoc(HD[TD])
set WD[TD]=MJV(UD[TD],QD[TD],MD[GD])
if(FWX())then
call SetUnitPositionLoc(HD[TD],WD[TD])
endif
call AddSpecialEffectTargetUnitBJ("chest",HD[TD],"Abilities\\Weapons\\FarseerMissile\\FarseerMissile.mdl")
call DestroyEffect(bj_lastCreatedEffect)
set SD[TD]=DistanceBetweenPoints(WD[TD],JD[TD])
set YD=M1V(LD[TD],UD[TD],Condition(function F1X))
call ForGroupBJ(YD,function F2X)
if(F4X())then
call AddSpecialEffectTargetUnitBJ("origin",HD[TD],"Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call SetUnitVertexColorBJ(HD[TD],'d','d',40.,0)
call SetUnitPathing(HD[TD],true)
call RemoveLocation(JD[TD])
set HD[TD]=null
set FD=(FD-1)
endif
call RemoveLocation(UD[TD])
call RemoveLocation(WD[TD])
call DestroyGroup(YD)
set TD=TD+1
endloop
if(F5X())then
set GD=0
call DisableTrigger(GetTriggeringTrigger())
endif
endfunction
function F8X takes nothing returns boolean
return(GetSpellAbilityId()=='A0I5')
endfunction
function F9X takes nothing returns nothing
call GroupAddUnit(ZG,GetSpellTargetUnit())
endfunction
function GEX takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0I4',NC)>0)and(GetUnitTypeId(BC)!='E00M')and(GetUnitTypeId(BC)!='H06J')
endfunction
function GXX takes nothing returns boolean
return(GEX())
endfunction
function GOX takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function GRX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction
function GIX takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(NC)))
endfunction
function GAX takes nothing returns boolean
return GetBooleanAnd(GRX(),GIX())
endfunction
function GNX takes nothing returns boolean
return(IsUnitInGroup(GetFilterUnit(),ZG))
endfunction
function GBX takes nothing returns boolean
return GetBooleanOr(GAX(),GNX())
endfunction
function GCX takes nothing returns boolean
return GetBooleanAnd(GOX(),GBX())
endfunction
function GDX takes nothing returns nothing
call UnitDamageTargetBJ(NC,GetEnumUnit(),(AC/ I2R(CountUnitsInGroup(VH))),ATTACK_TYPE_CHAOS,DAMAGE_TYPE_NORMAL)
call AddSpecialEffectTargetUnitBJ("origin",GetEnumUnit(),"Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl")
endfunction
function GFX takes nothing returns nothing
set SI=GetUnitLoc(NC)
set VH=M1V(1000.,SI,Condition(function GCX))
call ForGroupBJ(VH,function GDX)
call DestroyGroup(VH)
call RemoveLocation(SI)
endfunction
function GHX takes nothing returns boolean
return GetSpellAbilityId()=='A0ID'
endfunction
function GJX takes nothing returns nothing
local unit u=GetTriggerUnit()
local unit d
local location l=GetSpellTargetLoc()
local location l2=GetUnitLoc(u)
local real GKX=GetUnitFacing(u)
local real t=1.4
call AddSpecialEffectLoc("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl",l2)
call ShowUnit(u,false)
set d=CreateUnitAtLoc(GetOwningPlayer(u),'A082',l,GKX)
call UnitApplyTimedLife(d,'BTLF',5.)
call TriggerSleepAction(t)
call SetUnitPositionLoc(u,l)
call SetUnitAnimation(u,"birth")
call ShowUnit(u,true)
call RemoveLocation(l)
call RemoveLocation(l2)
set u=null
set d=null
endfunction
function GLX takes nothing returns boolean
return(GetLearnedSkill()=='A0IG')
endfunction
function GMX takes nothing returns nothing
call SetPlayerTechResearchedSwap('R00S',GetUnitAbilityLevelSwapped('A0IG',GetTriggerUnit()),GetOwningPlayer(GetTriggerUnit()))
endfunction
function GQX takes nothing returns boolean
return(GetIssuedOrderId()==$D02B0)and(GetUnitAbilityLevelSwapped('A0J7',GetTriggerUnit())>0)
endfunction
function GSX takes nothing returns nothing
call UnitRemoveAbility(GetTriggerUnit(),'ARal')
endfunction
function GUX takes nothing returns boolean
return(GetSpellAbilityId()=='A0JE')
endfunction
function GWX takes nothing returns boolean
return(GetTerrainTypeBJ(ZO)=='cWc1')or(GetTerrainTypeBJ(ZO)=='Isnw')
endfunction
function GYX takes nothing returns boolean
return(GetTerrainTypeBJ(ZO)=='Zsan')or(GetTerrainTypeBJ(ZO)=='Bdrh')or(GetTerrainTypeBJ(ZO)=='Ydrt')
endfunction
function GZX takes nothing returns boolean
return(GYX())
endfunction
function G_X takes nothing returns boolean
return(GetTerrainTypeBJ(ZO)=='Ddkr')or(GetTerrainTypeBJ(ZO)=='Dlav')
endfunction
function G0X takes nothing returns boolean
return(G_X())
endfunction
function G1X takes nothing returns boolean
return(GetTerrainTypeBJ(ZO)=='Yhdg')or(GetTerrainTypeBJ(ZO)=='Ygsb')or(GetTerrainTypeBJ(ZO)=='Lgrd')
endfunction
function G2X takes nothing returns boolean
return(G1X())
endfunction
function G3X takes nothing returns boolean
return(GWX())
endfunction
function G4X takes nothing returns boolean
return(EB!='BTtw')
endfunction
function G5X takes nothing returns nothing
set ZO=GetSpellTargetLoc()
call RemoveUnit(GetTriggerUnit())
if(G3X())then
set EB='WTst'
else
if(G2X())then
set EB='ATtr'
else
if(G0X())then
set EB='OTtw'
else
if(GZX())then
set EB='BTtw'
endif
endif
endif
endif
call CreateDestructableLoc(EB,ZO,GetRandomReal(0,360),GetRandomReal(.9,1.1),0)
if(G4X())then
call SetDestructableAnimation(bj_lastCreatedDestructable,"birth")
endif
call RemoveLocation(ZO)
endfunction
function G7X takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0KG',GetAttacker())>0)and(GetUnitAbilityLevelSwapped('A0II',GetTriggerUnit())==0)and(GetUnitTypeId(GetTriggerUnit())!='n01K')and(GetUnitTypeId(GetTriggerUnit())!='n01D')and(GetUnitTypeId(GetTriggerUnit())!='n04L')and(GetUnitTypeId(GetTriggerUnit())!='n04L')and(GetUnitTypeId(GetTriggerUnit())!='h00N')
endfunction
function G8X takes nothing returns boolean
return(G7X())
endfunction
function G9X takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
call AddSpecialEffectLocBJ(SI,"Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl")
call RemoveUnit(GetTriggerUnit())
call RemoveLocation(SI)
endfunction
function HEX takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0JP',GetTriggerUnit())>0)or(GetUnitAbilityLevelSwapped('A0II',GetTriggerUnit())>0)
endfunction
function HXX takes nothing returns boolean
return(GetIssuedOrderId()==$D0012)and(HEX())
endfunction
function HOX takes nothing returns boolean
return(HXX())
endfunction
function HRX takes nothing returns boolean
return(GetUnitStateSwap(UNIT_STATE_MANA,GetTriggerUnit())>50.)
endfunction
function HIX takes nothing returns nothing
local location HAX=GetUnitLoc(GetTriggerUnit())
local location HNX=GetOrderPointLoc()
if(HRX())then
call SetUnitManaBJ(GetTriggerUnit(),(GetUnitStateSwap(UNIT_STATE_MANA,GetTriggerUnit())-25.))
call AddSpecialEffectLoc("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",HAX)
call SetUnitPositionLoc(GetTriggerUnit(),HNX)
call AddSpecialEffectLoc("Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl",HNX)
endif
set HNX=null
set HAX=null
call RemoveLocation(HNX)
call RemoveLocation(HAX)
endfunction
function HCX takes nothing returns boolean
return(GetSpellAbilityId()=='A0KE')
endfunction
function HDX takes nothing returns nothing
call DestructableRestoreLife(GetEnumDestructable(),GetDestructableMaxLife(GetEnumDestructable()),true)
endfunction
function HFX takes nothing returns nothing
call EnumDestructablesInRectAll(U4,function HDX)
call UnitRemoveAbility(GetTriggerUnit(),'A0KE')
call UnitAddAbility(GetTriggerUnit(),'A0KF')
endfunction
function HHX takes nothing returns boolean
return(GetSpellAbilityId()=='A0KF')
endfunction
function HJX takes nothing returns nothing
call KillDestructable(GetEnumDestructable())
endfunction
function HKX takes nothing returns nothing
call EnumDestructablesInRectAll(U4,function HJX)
call UnitRemoveAbility(GetTriggerUnit(),'A0KF')
call UnitAddAbility(GetTriggerUnit(),'A0KE')
endfunction
function HMX takes nothing returns boolean
return(GetUnitTypeId(GetAttacker())=='H083')or(GetUnitTypeId(GetAttacker())=='H094')
endfunction
function HPX takes nothing returns boolean
return(HMX())
endfunction
function HQX takes nothing returns nothing
call SetUnitAnimation(GetAttacker(),"stand")
endfunction
function HTX takes nothing returns boolean
return(GetSpellAbilityId()=='A0KG')
endfunction
function HUX takes nothing returns boolean
return(GetSpellAbilityId()=='A0KH')
endfunction
function HWX takes nothing returns nothing
if(HTX())then
call UnitRemoveAbility(GetTriggerUnit(),'A0KG')
call UnitAddAbility(GetTriggerUnit(),'A0KH')
endif
if(HUX())then
call UnitRemoveAbility(GetTriggerUnit(),'A0KH')
call UnitAddAbility(GetTriggerUnit(),'A0KG')
endif
endfunction
function HZX takes nothing returns boolean
return(GetSpellAbilityId()=='A0KI')
endfunction
function H_X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H083')
endfunction
function H0X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H09G')
endfunction
function H1X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H08O')
endfunction
function H2X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H08N')
endfunction
function H3X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H08X')
endfunction
function H4X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H09C')
endfunction
function H5X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H09E')
endfunction
function H6X takes nothing returns nothing
if(H_X())then
call ReplaceUnitBJ(GetTriggerUnit(),'H094',1)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastReplacedUnit,$A)
endif
if(H0X())then
call ReplaceUnitBJ(GetTriggerUnit(),'H09B',1)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastReplacedUnit,9)
endif
if(H1X())then
call ReplaceUnitBJ(GetTriggerUnit(),'H095',1)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastReplacedUnit,8)
endif
if(H2X())then
call ReplaceUnitBJ(GetTriggerUnit(),'H096',1)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastReplacedUnit,7)
endif
if(H3X())then
call ReplaceUnitBJ(GetTriggerUnit(),'H097',1)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastReplacedUnit,6)
endif
if(H4X())then
call ReplaceUnitBJ(GetTriggerUnit(),'H09D',1)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastReplacedUnit,5)
endif
if(H5X())then
call ReplaceUnitBJ(GetTriggerUnit(),'H09F',1)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastReplacedUnit,4)
endif
endfunction
function H8X takes nothing returns boolean
return(GetSpellAbilityId()=='A0KJ')
endfunction
function H9X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H094')
endfunction
function JVX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H09B')
endfunction
function JEX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H095')
endfunction
function JXX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H096')
endfunction
function JOX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H097')
endfunction
function JRX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H09D')
endfunction
function JIX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H09F')
endfunction
function JAX takes nothing returns nothing
if(H9X())then
call ReplaceUnitBJ(GetTriggerUnit(),'H083',1)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastReplacedUnit,$A)
endif
if(JVX())then
call ReplaceUnitBJ(GetTriggerUnit(),'H09G',1)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastReplacedUnit,9)
endif
if(JEX())then
call ReplaceUnitBJ(GetTriggerUnit(),'H08O',1)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastReplacedUnit,8)
endif
if(JXX())then
call ReplaceUnitBJ(GetTriggerUnit(),'H08N',1)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastReplacedUnit,7)
endif
if(JOX())then
call ReplaceUnitBJ(GetTriggerUnit(),'H08X',1)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastReplacedUnit,6)
endif
if(JRX())then
call ReplaceUnitBJ(GetTriggerUnit(),'H09C',1)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastReplacedUnit,5)
endif
if(JIX())then
call ReplaceUnitBJ(GetTriggerUnit(),'H09E',1)
call SetUnitAbilityLevelSwapped('A0LL',bj_lastReplacedUnit,4)
endif
endfunction
function JBX takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0II',GetTriggerUnit())>0)and(GetUnitAbilityLevelSwapped('A0LL',GetTriggerUnit())>=GetUnitAbilityLevelSwapped('A0LL',GetKillingUnit()))
endfunction
function JCX takes nothing returns boolean
return(JBX())
endfunction
function JDX takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
call ReviveHeroLoc(GetTriggerUnit(),SI,false)
call RemoveLocation(SI)
endfunction
function JGX takes nothing returns boolean
return(GetSpellAbilityId()=='A0IP')
endfunction
function JHX takes nothing returns boolean
return(TJ[1]==0)
endfunction
function JJX takes nothing returns boolean
return(IsTerrainPathableBJ(LL,PATHING_TYPE_FLOATABILITY)==false)
endfunction
function JKX takes nothing returns boolean
return(true)
endfunction
function JLX takes nothing returns boolean
return(true)
endfunction
function JMX takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(KL)))
endfunction
function JPX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false)!=null
endfunction
function JQX takes nothing returns boolean
return(true)
endfunction
function JSX takes nothing returns boolean
return GetBooleanAnd(JPX(),JQX())
endfunction
function JTX takes nothing returns boolean
return GetBooleanAnd(JMX(),JSX())
endfunction
function JUX takes nothing returns boolean
return GetBooleanAnd(JLX(),JTX())
endfunction
function JWX takes nothing returns boolean
return GetBooleanAnd(JKX(),JUX())
endfunction
function JYX takes nothing returns nothing
call UnitDamageTargetBJ(KL,GetEnumUnit(),GL,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
call AddSpecialEffectTargetUnitBJ("chest",GetEnumUnit(),"Abilities\\Weapons\\TreantMissile\\TreantMissile.mdl")
call DestroyEffect(bj_lastCreatedEffect)
endfunction
function JZX takes nothing returns nothing
local real r
local location l
local unit array u
local integer i=1
set GL=(80.*I2R(GetUnitAbilityLevelSwapped('A0IP',GetTriggerUnit())))
set r=GL
set HL=$A
set JL=600.
set KL=GetTriggerUnit()
set u[0]=KL
set LL=GetUnitLoc(KL)
call ShowUnitHide(KL)
call PauseUnit(KL,true)
set ML=1
loop
exitwhen ML>HL
call CreateNUnitsAtLoc(1,'n04S',GetOwningPlayer(KL),LL,bj_UNIT_FACING)
call AddSpecialEffectTargetUnitBJ("chest",bj_lastCreatedUnit,"Units\\Creeps\\EarthPandarenBrewmaster\\EarthPandarenBrewmaster_Missile.mdl")
set KL=bj_lastCreatedUnit
set u[1]=KL
set PL=RectFromCenterSizeBJ(LL,JL,JL)
set LL=GetRandomLocInRect(PL)
set FM=GetLocationX(LL)
set GM=GetLocationY(LL)
if not SOV(FM,GM)then
set FM=CM
set GM=DM
endif
set LL=Location(CM,DM)
set l=LL
call RemoveRect(PL)
call SetUnitFacingToFaceLocTimed(KL,LL,0)
if(JHX())then
call EnableTrigger(IGV)
endif
set TJ[1]=(TJ[1]+1)
set TJ[2]=(TJ[2]+1)
set UJ[1]=GetUnitLoc(KL)
set WJ[TJ[2]]=DistanceBetweenPoints(UJ[1],LL)
set YJ[TJ[2]]=.0
set ZJ[TJ[2]]=10.
set VK[TJ[2]]=KL
set EK[TJ[2]]=AngleBetweenPoints(UJ[1],LL)
set XK[TJ[2]]=PJ
set OK[TJ[2]]="stand"
set RK[TJ[2]]=true
set IK[TJ[2]]=(1.*WJ[TJ[2]])
call SetUnitPathing(KL,false)
call SetUnitTimeScalePercent(KL,(1.*100.))
call SetUnitAnimation(KL,"stand")
call GroupAddUnit(AK,KL)
call RemoveLocation(UJ[1])
loop
exitwhen(IsUnitInRangeLoc(u[1],l,36.))
call TriggerSleepAction(-1.)
endloop
set LL=l
set KL=u[1]
call DestroyEffect(bj_lastCreatedEffect)
if(JJX())then
call AddSpecialEffectLocBJ(LL,"Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl")
else
call AddSpecialEffectLocBJ(LL,"NewDirtEXNofire.mdx")
endif
call DestroyEffect(bj_lastCreatedEffect)
set GL=r
set bj_wantDestroyGroup=true
call ForGroupBJ(M1V(256.,LL,Condition(function JWX)),function JYX)
call RemoveUnit(KL)
set ML=i
set i=i+1
set ML=ML+1
endloop
set KL=u[0]
call SetUnitPositionLoc(KL,LL)
call ShowUnitShow(KL)
call PauseUnit(KL,false)
call SelectUnitAddForPlayer(KL,GetOwningPlayer(KL))
call RemoveLocation(l)
set l=null
set r=0
set u[0]=null
set u[1]=null
endfunction
function J0X takes nothing returns boolean
return(BJ[0]==0)
endfunction
function J1X takes nothing returns boolean
return(GetUnitFlyHeight(DJ[BJ[2]])<=13.)
endfunction
function J2X takes nothing returns boolean
return(GetUnitFlyHeight(DJ[BJ[2]])>=156.)
endfunction
function J3X takes nothing returns boolean
return(CJ[BJ[2]]==false)
endfunction
function J4X takes nothing returns nothing
set BJ[2]=1
loop
exitwhen BJ[2]>BJ[1]
if(J3X())then
call SetUnitFlyHeight(DJ[BJ[2]],(GetUnitFlyHeight(DJ[BJ[2]])+6.),.0)
if(J2X())then
set CJ[BJ[2]]=true
endif
else
call SetUnitFlyHeight(DJ[BJ[2]],(GetUnitFlyHeight(DJ[BJ[2]])-12.),.0)
if(J1X())then
call SetUnitFlyHeight(DJ[BJ[2]],.0,.0)
call PauseUnit(DJ[BJ[2]],false)
call GroupRemoveUnit(NJ,DJ[BJ[2]])
set BJ[0]=(BJ[0]-1)
if(J0X())then
set BJ[1]=0
call DisableTrigger(GetTriggeringTrigger())
endif
endif
endif
set BJ[2]=BJ[2]+1
endloop
endfunction
function J6X takes nothing returns boolean
return(GetSpellAbilityId()=='A0IO')
endfunction
function J7X takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(QL)))
endfunction
function J8X takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function J9X takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false)!=null
endfunction
function KVX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)==false)!=null
endfunction
function KEX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction
function KXX takes nothing returns boolean
return GetBooleanAnd(KVX(),KEX())
endfunction
function KOX takes nothing returns boolean
return GetBooleanAnd(J9X(),KXX())
endfunction
function KRX takes nothing returns boolean
return GetBooleanAnd(J8X(),KOX())
endfunction
function KIX takes nothing returns boolean
return GetBooleanAnd(J7X(),KRX())
endfunction
function KAX takes nothing returns boolean
return(SL[1]==0)
endfunction
function KNX takes nothing returns nothing
if(KAX())then
call EnableTrigger(IRV)
endif
set SL[1]=(SL[1]+1)
set SL[2]=(SL[2]+1)
set VM=GetRandomLocInRect(YL)
set EM[SL[2]]=GetEnumUnit()
call CreateNUnitsAtLoc(1,'n04S',GetOwningPlayer(QL),VM,bj_UNIT_FACING)
call SetUnitFlyHeight(bj_lastCreatedUnit,100.,.0)
call SetUnitScalePercent(bj_lastCreatedUnit,95.,95.,95.)
set XM[SL[2]]=bj_lastCreatedUnit
call AddSpecialEffectTargetUnitBJ("origin",XM[SL[2]],"Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl")
set OM[SL[2]]=bj_lastCreatedEffect
call RemoveLocation(VM)
endfunction
function KBX takes nothing returns boolean
return(SL[5]==0)
endfunction
function KCX takes nothing returns boolean
return(UL[SL[3]])
endfunction
function KDX takes nothing returns boolean
return(SL[1]==0)
endfunction
function KFX takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(QL)))
endfunction
function KGX takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function KHX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false)!=null
endfunction
function KJX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)==false)!=null
endfunction
function KKX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction
function KLX takes nothing returns boolean
return GetBooleanAnd(KJX(),KKX())
endfunction
function KMX takes nothing returns boolean
return GetBooleanAnd(KHX(),KLX())
endfunction
function KPX takes nothing returns boolean
return GetBooleanAnd(KGX(),KMX())
endfunction
function KQX takes nothing returns boolean
return GetBooleanAnd(KFX(),KPX())
endfunction
function KSX takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function KTX takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(QL)))
endfunction
function KUX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false)!=null
endfunction
function KWX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)==false)!=null
endfunction
function KYX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction
function KZX takes nothing returns boolean
return GetBooleanAnd(KWX(),KYX())
endfunction
function K_X takes nothing returns boolean
return GetBooleanAnd(KUX(),KZX())
endfunction
function K0X takes nothing returns boolean
return GetBooleanAnd(KTX(),K_X())
endfunction
function K1X takes nothing returns boolean
return GetBooleanAnd(KSX(),K0X())
endfunction
function K2X takes nothing returns boolean
return(CountUnitsInGroup(M1V(600.,WL,Condition(function K1X)))>0)
endfunction
function K3X takes nothing returns boolean
return(SL[5]==0)
endfunction
function K4X takes nothing returns nothing
local effect e
local unit u
local rect r
local integer i=1
local integer PQV=SL[0]
set QL=GetTriggerUnit()
set u=QL
set TL[SL[0]]=GetTriggerUnit()
set UL[SL[0]]=false
set SL[0]=(SL[0]+1)
set SL[5]=(SL[5]+1)
set WL=GetUnitLoc(QL)
set YL=RectFromCenterSizeBJ(WL,200.,200.)
set r=YL
call AddSpecialEffectLocBJ(WL,"Abilities\\Spells\\Undead\\UnholyAura\\UnholyAura.mdl")
set ZL=bj_lastCreatedEffect
set e=ZL
set bj_wantDestroyGroup=true
call ForGroupBJ(M1V(600.,WL,Condition(function KIX)),function KNX)
call RemoveLocation(WL)
set RM=1
loop
exitwhen RM>29
call TriggerSleepAction(.5)
set SL[3]=PQV
if(KCX())then
set ZL=e
call DestroyEffect(ZL)
set SL[5]=(SL[5]-1)
if(KBX())then
set SL[0]=(SL[0]-1)
endif
set TL[SL[3]]=TL[SL[0]]
set UL[SL[3]]=UL[SL[0]]
set e=null
set i=0
set r=null
set u=null
set PQV=0
return
endif
set QL=u
set WL=GetUnitLoc(QL)
set YL=r
set bj_wantDestroyGroup=true
if(K2X())then
if(KDX())then
call EnableTrigger(IRV)
endif
set SL[1]=(SL[1]+1)
set SL[2]=(SL[2]+1)
set VM=GetRandomLocInRect(YL)
set EM[SL[2]]=GroupPickRandomUnit(M1V(600.,WL,Condition(function KQX)))
call CreateNUnitsAtLoc(1,'n04S',GetOwningPlayer(QL),VM,bj_UNIT_FACING)
set XM[SL[2]]=bj_lastCreatedUnit
call SetUnitScalePercent(bj_lastCreatedUnit,95.,95.,95.)
call AddSpecialEffectTargetUnitBJ("origin",XM[SL[2]],"Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl")
set OM[SL[2]]=bj_lastCreatedEffect
call RemoveLocation(VM)
endif
call RemoveLocation(WL)
set RM=i
set i=i+1
set RM=RM+1
endloop
set ZL=e
call DestroyEffect(ZL)
set SL[3]=PQV
set SL[5]=(SL[5]-1)
if(K3X())then
set SL[0]=(SL[0]-1)
endif
set TL[SL[3]]=TL[SL[0]]
set UL[SL[3]]=UL[SL[0]]
set e=null
set i=0
set r=null
set u=null
set PQV=0
endfunction
function K6X takes nothing returns boolean
return(IsUnitAliveBJ(EM[SL[4]]))
endfunction
function K7X takes nothing returns boolean
return(SL[1]==0)
endfunction
function K8X takes nothing returns boolean
return(DistanceBetweenPoints(AM[SL[4]],NM[SL[4]])>36.)
endfunction
function K9X takes nothing returns boolean
return(GetUnitFlyHeight(XM[SL[4]])>=100.)
endfunction
function LVX takes nothing returns nothing
set SL[4]=1
loop
exitwhen SL[4]>SL[2]
if(K9X())then
set AM[SL[4]]=GetUnitLoc(XM[SL[4]])
set NM[SL[4]]=GetUnitLoc(EM[SL[4]])
if(K8X())then
set BM[SL[4]]=MJV(AM[SL[4]],12.,AngleBetweenPoints(AM[SL[4]],NM[SL[4]]))
call SetUnitFacingToFaceLocTimed(XM[SL[4]],BM[SL[4]],0)
call SetUnitPositionLoc(XM[SL[4]],BM[SL[4]])
call RemoveLocation(BM[SL[4]])
call RemoveLocation(AM[SL[4]])
call RemoveLocation(NM[SL[4]])
else
call UnitDamageTargetBJ(XM[SL[4]],EM[SL[4]],45.,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
set CK=XM[SL[4]]
set DK=EM[SL[4]]
set FK=AM[SL[4]]
set GK=1
set HK=7.
set JK=150.
set KK[1]="Abilities\\Spells\\Human\\FlakCannons\\FlakTarget.mdl"
set KK[2]="Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl"
set LK=true
if(K6X())then
call ConditionalTriggerExecute(ICV)
endif
call DestroyEffect(OM[SL[4]])
call RemoveUnit(XM[SL[4]])
call RemoveLocation(BM[SL[4]])
call RemoveLocation(AM[SL[4]])
call RemoveLocation(NM[SL[4]])
set SL[1]=(SL[1]-1)
if(K7X())then
set SL[2]=0
call DisableTrigger(GetTriggeringTrigger())
endif
endif
else
call SetUnitFlyHeight(XM[SL[4]],(GetUnitFlyHeight(XM[SL[4]])+.5),.0)
call SetUnitVertexColorBJ(XM[SL[4]],'d','d','d',(100.-(IM[SL[4]]+1.)))
set IM[SL[4]]=(IM[SL[4]]+1.)
endif
set SL[4]=SL[4]+1
endloop
endfunction
function LXX takes nothing returns boolean
return(GetSpellAbilityId()=='A000')
endfunction
function LOX takes nothing returns boolean
return(TL[SL[6]]==GetTriggerUnit())
endfunction
function LRX takes nothing returns nothing
set SL[6]=0
loop
exitwhen SL[6]>(SL[0]-1)
if(LOX())then
set UL[SL[6]]=true
return
endif
set SL[6]=SL[6]+1
endloop
endfunction
function LAX takes nothing returns boolean
return((UnitHasBuffBJ(GetTriggerUnit(),'B04O'))and(GetRandomInt(1,'d')<=21)and(IsUnitType(GetEventDamageSource(),UNIT_TYPE_MELEE_ATTACKER)))!=null
endfunction
function LNX takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetEventDamageSource())))
endfunction
function LBX takes nothing returns boolean
return(IsUnitAliveBJ(GetFilterUnit()))
endfunction
function LCX takes nothing returns boolean
return(true)
endfunction
function LDX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false)!=null
endfunction
function LFX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction
function LGX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_GROUND))!=null
endfunction
function LHX takes nothing returns boolean
return GetBooleanAnd(LFX(),LGX())
endfunction
function LJX takes nothing returns boolean
return(IsUnitInGroup(GetFilterUnit(),NJ)==false)
endfunction
function LKX takes nothing returns boolean
return GetBooleanAnd(LHX(),LJX())
endfunction
function LLX takes nothing returns boolean
return GetBooleanAnd(LDX(),LKX())
endfunction
function LMX takes nothing returns boolean
return GetBooleanAnd(LCX(),LLX())
endfunction
function LPX takes nothing returns boolean
return GetBooleanAnd(LBX(),LMX())
endfunction
function LQX takes nothing returns boolean
return GetBooleanAnd(LNX(),LPX())
endfunction
function LSX takes nothing returns boolean
return(BJ[0]==0)
endfunction
function LTX takes nothing returns boolean
return(IsUnitAliveBJ(GetEnumUnit()))
endfunction
function LUX takes nothing returns nothing
call CreateNUnitsAtLoc(1,'n04S',GetOwningPlayer(GetEventDamageSource()),IJ,bj_UNIT_FACING)
call UnitDamageTargetBJ(bj_lastCreatedUnit,GetEnumUnit(),(30.*I2R(GetUnitAbilityLevelSwapped('A0IR',GetEventDamageSource()))),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
call UnitApplyTimedLifeBJ(.5,'BTLF',bj_lastCreatedUnit)
if(LTX())then
if(LSX())then
call EnableTrigger(IXV)
endif
set BJ[0]=(BJ[0]+1)
set BJ[1]=(BJ[1]+1)
set CJ[BJ[1]]=false
set DJ[BJ[1]]=GetEnumUnit()
call PauseUnit(DJ[BJ[1]],true)
call GroupAddUnit(NJ,DJ[BJ[1]])
call UnitAddAbility(DJ[BJ[1]],'Arav')
call UnitRemoveAbility(DJ[BJ[1]],'Arav')
endif
endfunction
function LWX takes nothing returns boolean
return(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction
function LYX takes nothing returns boolean
return(IsUnitInGroup(GetTriggerUnit(),NJ)==false)
endfunction
function LZX takes nothing returns boolean
return GetBooleanAnd(LWX(),LYX())
endfunction
function L_X takes nothing returns boolean
return(IsUnitType(GetTriggerUnit(),UNIT_TYPE_MAGIC_IMMUNE)==false)!=null
endfunction
function L0X takes nothing returns boolean
return(IsUnitType(GetTriggerUnit(),UNIT_TYPE_MECHANICAL)==false)!=null
endfunction
function L1X takes nothing returns boolean
return(IsUnitType(GetTriggerUnit(),UNIT_TYPE_GROUND))!=null
endfunction
function L2X takes nothing returns boolean
return(IsUnitAliveBJ(GetTriggerUnit()))
endfunction
function L3X takes nothing returns boolean
return(IsUnitEnemy(GetTriggerUnit(),GetOwningPlayer(GetEventDamageSource())))
endfunction
function L4X takes nothing returns boolean
return GetBooleanAnd(L2X(),L3X())
endfunction
function L5X takes nothing returns boolean
return GetBooleanAnd(L1X(),L4X())
endfunction
function L6X takes nothing returns boolean
return GetBooleanAnd(L0X(),L5X())
endfunction
function L7X takes nothing returns boolean
return GetBooleanAnd(L_X(),L6X())
endfunction
function L8X takes nothing returns boolean
return(GetUnitAbilityLevelSwapped('A0IR',GetEventDamageSource())>0)and(GetRandomInt(1,'d')<=($A*GetUnitAbilityLevelSwapped('A0IR',GetEventDamageSource())))and(GetBooleanAnd(LZX(),L7X()))
endfunction
function L9X takes nothing returns nothing
if(LAX())then
set RJ=GetUnitLoc(GetEventDamageSource())
call CreateNUnitsAtLoc(1,'n04S',GetOwningPlayer(GetTriggerUnit()),RJ,bj_UNIT_FACING)
call UnitAddAbility(bj_lastCreatedUnit,'A0IN')
call IssueTargetOrderById(bj_lastCreatedUnit,$D00DD,GetEventDamageSource())
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
call RemoveLocation(RJ)
endif
if(L8X())then
call SetUnitAnimation(GetEventDamageSource(),"attack slam")
set IJ=GetUnitLoc(GetTriggerUnit())
call AddSpecialEffectLocBJ(IJ,"NewDirtEXNofire.mdx")
call DestroyEffect(bj_lastCreatedEffect)
set AJ=RectFromCenterSizeBJ(IJ,250.,250.)
set bj_wantDestroyGroup=true
call ForGroupBJ(MWV(AJ,Condition(function LQX)),function LUX)
call RemoveLocation(IJ)
call RemoveRect(AJ)
endif
endfunction
function MEX takes nothing returns boolean
return(IsUnitInGroup(GetEnteringUnit(),FJ)==false)
endfunction
function MXX takes nothing returns nothing
call TriggerRegisterUnitEvent(IAV,GetEnteringUnit(),EVENT_UNIT_DAMAGED)
call GroupAddUnit(FJ,GetEnteringUnit())
endfunction
function MRX takes nothing returns nothing
call TriggerRegisterUnitEvent(IAV,GetEnumUnit(),EVENT_UNIT_DAMAGED)
call GroupAddUnit(FJ,GetEnumUnit())
endfunction
function MIX takes nothing returns nothing
set GJ=MZV(bj_mapInitialPlayableArea)
call ForGroupBJ(GJ,function MRX)
call DestroyGroup(GJ)
endfunction
function MNX takes nothing returns boolean
return(TK[QK[1]]==DK)
endfunction
function MBX takes nothing returns boolean
return(SK>QK[1])
endfunction
function MCX takes nothing returns boolean
return(PK==0)
endfunction
function MDX takes nothing returns boolean
return(IsUnitInGroup(DK,MK))
endfunction
function MFX takes nothing returns boolean
return(PK==0)
endfunction
function MGX takes nothing returns nothing
if(MDX())then
call GroupRemoveUnit(MK,DK)
set PK=(PK-1)
set QK[2]=1
loop
exitwhen QK[2]>SK
if(MNX())then
set QK[1]=QK[2]
set QK[2]=SK
endif
set QK[2]=QK[2]+1
endloop
if(MBX())then
set UK[QK[1]]=UK[SK]
set TK[QK[1]]=TK[SK]
set WK[QK[1]]=WK[SK]
set YK[QK[1]]=YK[SK]
set ZK[QK[1]]=ZK[SK]
set VL[QK[1]]=VL[SK]
set EL[QK[1]]=EL[SK]
set XL[QK[1]]=XL[SK]
set OL[QK[1]]=OL[SK]
set RL[QK[1]]=RL[SK]
set IL[QK[1]]=IL[SK]
set AL[QK[1]]=AL[SK]
set QK[1]=(QK[1]-1)
endif
set TK[SK]=null
set SK=(SK-1)
if(MCX())then
set SK=0
call DisableTrigger(IDV)
endif
endif
if(MFX())then
call EnableTrigger(IDV)
endif
set PK=(PK+1)
set SK=(SK+1)
set NL[SK]=CK
set UK[SK]=GK
set TK[SK]=DK
set BL[SK]=FK
set CL[SK]=GetUnitLoc(DK)
set WK[SK]=AngleBetweenPoints(BL[SK],CL[SK])
set YK[SK]=(JK*I2R(GK))
set ZK[SK]=.0
set VL[QK[1]]=.0
set EL[SK]=HK
set XL[SK]=KK[1]
set OL[SK]=KK[2]
set RL[SK]=LK
set IL[QK[1]]=0
set AL[QK[1]]=0
call GroupAddUnit(MK,DK)
call RemoveLocation(FK)
call RemoveLocation(CL[SK])
call RemoveLocation(BL[SK])
endfunction
function MJX takes nothing returns boolean
return(SK>QK[1])
endfunction
function MKX takes nothing returns boolean
return(PK==0)
endfunction
function MLX takes nothing returns nothing
call KillDestructable(GetEnumDestructable())
endfunction
function MMX takes nothing returns boolean
return(RL[QK[1]])
endfunction
function MPX takes nothing returns boolean
return(IL[QK[1]]==6)
endfunction
function MQX takes nothing returns boolean
return(AL[QK[1]]==8)
endfunction
function MSX takes nothing returns boolean
return(ZK[QK[1]]>=YK[QK[1]])
endfunction
function MTX takes nothing returns boolean
return(IsUnitInGroup(TK[QK[1]],MK))
endfunction
function MUX takes nothing returns nothing
set QK[1]=1
loop
exitwhen QK[1]>SK
if(MTX())then
if(MSX())then
call GroupRemoveUnit(MK,TK[QK[1]])
set PK=(PK-1)
if(MJX())then
set UK[QK[1]]=UK[SK]
set TK[QK[1]]=TK[SK]
set WK[QK[1]]=WK[SK]
set YK[QK[1]]=YK[SK]
set ZK[QK[1]]=ZK[SK]
set VL[QK[1]]=VL[SK]
set EL[QK[1]]=EL[SK]
set XL[QK[1]]=XL[SK]
set OL[QK[1]]=OL[SK]
set RL[QK[1]]=RL[SK]
set IL[QK[1]]=IL[SK]
set AL[QK[1]]=AL[SK]
set QK[1]=(QK[1]-1)
endif
set TK[SK]=null
set SK=(SK-1)
if(MKX())then
set SK=0
call DisableTrigger(GetTriggeringTrigger())
endif
else
set DL=((EL[QK[1]]/ YK[QK[1]])*ZK[QK[1]])
set VL[QK[1]]=(DL-(VL[QK[1]]*.1))
set FL=((EL[QK[1]]-VL[QK[1]])*2.)
set CL[1]=GetUnitLoc(TK[QK[1]])
set CL[2]=MJV(CL[1],FL,WK[QK[1]])
set IL[QK[1]]=(IL[QK[1]]+1)
set AL[QK[1]]=(AL[QK[1]]+1)
if(MMX())then
call MQV(200.,CL[2],function MLX)
endif
if(MPX())then
set IL[QK[1]]=0
call AddSpecialEffectLocBJ(CL[1],XL[QK[1]])
call DestroyEffect(bj_lastCreatedEffect)
endif
if(MQX())then
set AL[QK[1]]=0
call AddSpecialEffectLocBJ(CL[1],OL[QK[1]])
call DestroyEffect(bj_lastCreatedEffect)
endif
call SetUnitPositionLoc(TK[QK[1]],CL[2])
call RemoveLocation(CL[1])
call RemoveLocation(CL[2])
set ZK[QK[1]]=(ZK[QK[1]]+FL)
endif
endif
set QK[1]=QK[1]+1
endloop
endfunction
function MYX takes nothing returns boolean
return(TJ[1]==0)
endfunction
function MZX takes nothing returns nothing
if(MYX())then
call EnableTrigger(IGV)
endif
set TJ[1]=(TJ[1]+1)
set TJ[2]=(TJ[2]+1)
set UJ[1]=GetUnitLoc(LJ)
set WJ[TJ[2]]=DistanceBetweenPoints(UJ[1],KJ)
set YJ[TJ[2]]=.0
set ZJ[TJ[2]]=MJ
set VK[TJ[2]]=LJ
set EK[TJ[2]]=AngleBetweenPoints(UJ[1],KJ)
set XK[TJ[2]]=PJ
set OK[TJ[2]]=QJ
set RK[TJ[2]]=JJ
set IK[TJ[2]]=(HJ*WJ[TJ[2]])
call SetUnitPathing(LJ,false)
call SetUnitTimeScalePercent(LJ,(SJ*100.))
call SetUnitAnimation(LJ,QJ)
call GroupAddUnit(AK,LJ)
call UnitAddAbility(LJ,'Arav')
call UnitRemoveAbility(LJ,'Arav')
call RemoveLocation(UJ[1])
call RemoveLocation(KJ)
endfunction
function M0X takes nothing returns boolean
return(TJ[1]==0)
endfunction
function M1X takes nothing returns nothing
call KillDestructable(GetEnumDestructable())
endfunction
function M2X takes nothing returns boolean
return(RK[TJ[3]])
endfunction
function M3X takes nothing returns boolean
return(GetRandomInt(1,5)==1)
endfunction
function M4X takes nothing returns boolean
return(YJ[TJ[3]]<WJ[TJ[3]])
endfunction
function M5X takes nothing returns boolean
return(IsUnitInGroup(VK[TJ[3]],AK))
endfunction
function M6X takes nothing returns nothing
set TJ[3]=1
loop
exitwhen TJ[3]>TJ[2]
if(M5X())then
if(M4X())then
call QueueUnitAnimation(VK[TJ[3]],OK[TJ[3]])
set UJ[1]=GetUnitLoc(VK[TJ[3]])
set UJ[2]=MJV(UJ[1],ZJ[TJ[3]],EK[TJ[3]])
if(M2X())then
call MQV(150.,UJ[2],function M1X)
endif
call SetUnitPositionLoc(VK[TJ[3]],UJ[2])
set YJ[TJ[3]]=(YJ[TJ[3]]+ZJ[TJ[3]])
if(M3X())then
call AddSpecialEffectTargetUnitBJ("chest",VK[TJ[3]],XK[TJ[3]])
call DestroyEffect(bj_lastCreatedEffect)
endif
set NK[TJ[3]]=(NK[TJ[3]]+(180./(WJ[TJ[3]]/ ZJ[TJ[3]])))
set BK[TJ[3]]=(SinBJ(NK[TJ[3]])*IK[TJ[3]])
call SetUnitFlyHeight(VK[TJ[3]],BK[TJ[3]],1000000000.)
call RemoveLocation(UJ[1])
call RemoveLocation(UJ[2])
else
call SetUnitPathing(VK[TJ[3]],true)
call GroupRemoveUnit(AK,VK[TJ[3]])
call SetUnitTimeScalePercent(VK[TJ[3]],100.)
call ResetUnitAnimation(VK[TJ[3]])
set NK[TJ[3]]=.0
set TJ[1]=(TJ[1]-1)
if(M0X())then
set TJ[2]=0
call DisableTrigger(GetTriggeringTrigger())
endif
endif
endif
set TJ[3]=TJ[3]+1
endloop
endfunction
function M8X takes nothing returns boolean
return(GetSpellAbilityId()=='A0IY')
endfunction
function M9X takes nothing returns boolean
return(IsUnitGroupEmptyBJ(QM))
endfunction
function PVX takes nothing returns nothing
set HM=GetTriggerUnit()
set JM=GetSpellTargetUnit()
set KM[1]=GetUnitLoc(HM)
set KM[2]=GetUnitLoc(GetSpellTargetUnit())
set LM[1]=50
set MM[1]=15.
set MM[2]=30.
set MM[3]=GetLocationX(KM[1])
set MM[4]=GetLocationY(KM[1])
set MM[5]=GetLocationZ(KM[1])
call ShowUnitHide(HM)
call AddSpecialEffectLocBJ(KM[1],"Abilities\\Weapons\\Bolt\\BoltImpact.mdl")
call DestroyEffect(bj_lastCreatedEffect)
call CreateNUnitsAtLoc(1,'h08C',GetOwningPlayer(HM),KM[1],AngleBetweenPoints(KM[1],KM[2]))
call SaveUnitHandleBJ(JM,0,GetHandleIdBJ(bj_lastCreatedUnit),PM)
call SaveUnitHandleBJ(HM,1,GetHandleIdBJ(bj_lastCreatedUnit),PM)
call SaveRealBJ(MM[1],2,GetHandleIdBJ(bj_lastCreatedUnit),PM)
call SaveRealBJ(MM[2],3,GetHandleIdBJ(bj_lastCreatedUnit),PM)
call SaveRealBJ(MM[3],4,GetHandleIdBJ(bj_lastCreatedUnit),PM)
call SaveRealBJ(MM[4],5,GetHandleIdBJ(bj_lastCreatedUnit),PM)
call SaveRealBJ(MM[5],6,GetHandleIdBJ(bj_lastCreatedUnit),PM)
call AddLightningLoc("FORK",KM[1],KM[1])
call SaveLightningHandleBJ(bj_lastCreatedLightning,7,GetHandleIdBJ(bj_lastCreatedUnit),PM)
call SaveIntegerBJ(LM[1],8,GetHandleIdBJ(bj_lastCreatedUnit),PM)
if(M9X())then
call EnableTrigger(IJV)
endif
call GroupAddUnit(QM,bj_lastCreatedUnit)
call RemoveLocation(KM[1])
call RemoveLocation(KM[2])
endfunction
function PXX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)!=true)!=null
endfunction
function POX takes nothing returns boolean
return(GetFilterUnit()!=JM)
endfunction
function PRX takes nothing returns boolean
return GetBooleanAnd(PXX(),POX())
endfunction
function PIX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MECHANICAL)!=true)!=null
endfunction
function PAX takes nothing returns boolean
return(IsUnitType(GetFilterUnit(),UNIT_TYPE_MAGIC_IMMUNE)!=true)!=null
endfunction
function PNX takes nothing returns boolean
return(IsUnitDeadBJ(GetFilterUnit())!=true)
endfunction
function PBX takes nothing returns boolean
return(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(HM)))
endfunction
function PCX takes nothing returns boolean
return(IsUnitVisible(GetFilterUnit(),GetOwningPlayer(HM)))
endfunction
function PDX takes nothing returns boolean
return GetBooleanAnd(PBX(),PCX())
endfunction
function PFX takes nothing returns boolean
return GetBooleanAnd(PNX(),PDX())
endfunction
function PGX takes nothing returns boolean
return GetBooleanAnd(PAX(),PFX())
endfunction
function PHX takes nothing returns boolean
return GetBooleanAnd(PIX(),PGX())
endfunction
function PJX takes nothing returns boolean
return GetBooleanAnd(PRX(),PHX())
endfunction
function PKX takes nothing returns nothing
set JM=GetEnumUnit()
endfunction
function PLX takes nothing returns boolean
return(IsUnitGroupEmptyBJ(TM)!=true)
endfunction
function PMX takes nothing returns boolean
return(LM[1]>0)
endfunction
function PQX takes nothing returns boolean
return(DistanceBetweenPoints(KM[1],KM[2])>=100.)
endfunction
function PSX takes nothing returns nothing
set JM=LoadUnitHandleBJ(0,GetHandleIdBJ(GetEnumUnit()),PM)
set HM=LoadUnitHandleBJ(1,GetHandleIdBJ(GetEnumUnit()),PM)
set KM[1]=GetUnitLoc(GetEnumUnit())
set KM[2]=GetUnitLoc(JM)
set KM[3]=MJV(KM[1],MM[1],AngleBetweenPoints(KM[1],KM[2]))
set MM[1]=LoadRealBJ(2,GetHandleIdBJ(GetEnumUnit()),PM)
set MM[2]=LoadRealBJ(3,GetHandleIdBJ(GetEnumUnit()),PM)
set MM[3]=LoadRealBJ(4,GetHandleIdBJ(GetEnumUnit()),PM)
set MM[4]=LoadRealBJ(5,GetHandleIdBJ(GetEnumUnit()),PM)
set MM[5]=LoadRealBJ(6,GetHandleIdBJ(GetEnumUnit()),PM)
set MM[6]=GetLocationZ(KM[1])+40.
set SM=LoadLightningHandleBJ(7,GetHandleIdBJ(GetEnumUnit()),PM)
if(PQX())then
call SetUnitPositionLocFacingBJ(GetEnumUnit(),KM[3],AngleBetweenPoints(KM[1],KM[2]))
call MoveLightningEx(SM,true,MM[3],MM[4],MM[5],GetLocationX(KM[1]),GetLocationY(KM[1]),MM[6])
else
call UnitDamageTargetBJ(HM,JM,MM[2],ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
call AddSpecialEffectTargetUnitBJ("origin",JM,"Abilities\\Weapons\\Bolt\\BoltImpact.mdl")
call DestroyEffect(bj_lastCreatedEffect)
set LM[1]=LoadIntegerBJ(8,GetHandleIdBJ(GetEnumUnit()),PM)
set LM[1]=(LM[1]-1)
if(PMX())then
set TM=M1V(500.,KM[1],Condition(function PJX))
if(PLX())then
set MM[1]=(MM[1]+3.)
set MM[2]=(MM[2]+.0)
set MM[3]=GetLocationX(KM[1])
set MM[4]=GetLocationY(KM[1])
set MM[5]=GetLocationZ(KM[1])
call DestroyLightning(SM)
call AddLightningLoc("FORK",KM[1],KM[1])
call ForGroupBJ(PXV(1,TM),function PKX)
call SaveUnitHandleBJ(JM,0,GetHandleIdBJ(GetEnumUnit()),PM)
call SaveRealBJ(MM[1],2,GetHandleIdBJ(GetEnumUnit()),PM)
call SaveRealBJ(MM[2],3,GetHandleIdBJ(GetEnumUnit()),PM)
call SaveRealBJ(MM[3],4,GetHandleIdBJ(GetEnumUnit()),PM)
call SaveRealBJ(MM[4],5,GetHandleIdBJ(GetEnumUnit()),PM)
call SaveRealBJ(MM[5],6,GetHandleIdBJ(GetEnumUnit()),PM)
call SaveLightningHandleBJ(bj_lastCreatedLightning,7,GetHandleIdBJ(GetEnumUnit()),PM)
call SaveIntegerBJ(LM[1],8,GetHandleIdBJ(GetEnumUnit()),PM)
else
call DestroyLightning(SM)
call SetUnitPositionLocFacingBJ(HM,KM[1],AngleBetweenPoints(KM[1],KM[2]))
call ShowUnitShow(HM)
call SelectUnitAddForPlayer(HM,GetOwningPlayer(HM))
call UnitAddItemByIdSwapped('I015',HM)
call FlushChildHashtableBJ(GetHandleIdBJ(GetEnumUnit()),PM)
call GroupRemoveUnit(QM,GetEnumUnit())
call RemoveUnit(GetEnumUnit())
endif
call DestroyGroup(TM)
else
call DestroyLightning(SM)
call SetUnitPositionLocFacingBJ(HM,KM[1],AngleBetweenPoints(KM[1],KM[2]))
call ShowUnitShow(HM)
call SelectUnitAddForPlayer(HM,GetOwningPlayer(HM))
call UnitAddItemByIdSwapped('I015',HM)
call FlushChildHashtableBJ(GetHandleIdBJ(GetEnumUnit()),PM)
call GroupRemoveUnit(QM,GetEnumUnit())
call RemoveUnit(GetEnumUnit())
endif
endif
call RemoveLocation(KM[1])
call RemoveLocation(KM[2])
call RemoveLocation(KM[3])
endfunction
function PTX takes nothing returns boolean
return(IsUnitGroupEmptyBJ(QM))
endfunction
function PUX takes nothing returns nothing
call ForGroupBJ(QM,function PSX)
if(PTX())then
call DisableTrigger(GetTriggeringTrigger())
endif
endfunction
function PYX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h07U')
endfunction
function PZX takes nothing returns nothing
set HC[0]=GetTriggerUnit()
endfunction
function P0X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H06Y')
endfunction
function P1X takes nothing returns nothing
set HC[7]=GetTriggerUnit()
endfunction
function P3X takes nothing returns nothing
set TC=1
loop
exitwhen TC>6
call SetHeroLevelBJ(HC[TC],GetUnitLevel(HC[7]),false)
set TC=TC+1
endloop
endfunction
function P5X takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h07U')
endfunction
function P6X takes nothing returns nothing
call KillUnit(HC[0])
call KillUnit(HC[1])
call KillUnit(HC[2])
call KillUnit(HC[3])
call KillUnit(HC[4])
call KillUnit(HC[5])
call KillUnit(HC[6])
endfunction
function P8X takes nothing returns boolean
return(GetSpellAbilityId()=='A0FV')
endfunction
function P9X takes nothing returns boolean
return(HC[1]==null)
endfunction
function QVX takes nothing returns boolean
return(HC[2]==null)
endfunction
function QEX takes nothing returns boolean
return(HC[3]==null)
endfunction
function QXX takes nothing returns boolean
return(HC[4]==null)
endfunction
function QOX takes nothing returns boolean
return(HC[5]==null)
endfunction
function QRX takes nothing returns boolean
return(HC[6]==null)
endfunction
function QIX takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
if(P9X())then
set JC=MJV(SI,400.,(GetUnitFacing(GetTriggerUnit())-135.))
call CreateNUnitsAtLoc(1,'H071',GetOwningPlayer(GetTriggerUnit()),JC,bj_UNIT_FACING)
set HC[1]=bj_lastCreatedUnit
call SetUnitAnimation(HC[1],"birth")
call AddSpecialEffectLocBJ(JC,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
set PC[1]=GetUnitName(HC[1])
call RemoveLocation(JC)
endif
if(QVX())then
set JC=MJV(SI,500.,(GetUnitFacing(GetTriggerUnit())-90.))
call CreateNUnitsAtLoc(1,'H070',GetOwningPlayer(GetTriggerUnit()),JC,bj_UNIT_FACING)
set HC[2]=bj_lastCreatedUnit
call SetUnitAnimation(HC[2],"birth")
call AddSpecialEffectLocBJ(JC,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
set PC[2]=GetUnitName(HC[2])
call RemoveLocation(JC)
endif
if(QEX())then
set JC=MJV(SI,500.,(GetUnitFacing(GetTriggerUnit())-45.))
call CreateNUnitsAtLoc(1,'H06Z',GetOwningPlayer(GetTriggerUnit()),JC,bj_UNIT_FACING)
set HC[3]=bj_lastCreatedUnit
call SetUnitAnimation(HC[3],"birth")
call AddSpecialEffectLocBJ(JC,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
set PC[3]=GetUnitName(HC[3])
call RemoveLocation(JC)
endif
if(QXX())then
set JC=MJV(SI,500.,(GetUnitFacing(GetTriggerUnit())+135.))
call CreateNUnitsAtLoc(1,'H07V',GetOwningPlayer(GetTriggerUnit()),JC,bj_UNIT_FACING)
set HC[4]=bj_lastCreatedUnit
call SetUnitAnimation(HC[4],"birth")
call AddSpecialEffectLocBJ(JC,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
set PC[4]=GetUnitName(HC[4])
call RemoveLocation(JC)
endif
if(QOX())then
set JC=MJV(SI,500.,(GetUnitFacing(GetTriggerUnit())+90.))
call CreateNUnitsAtLoc(1,'H07W',GetOwningPlayer(GetTriggerUnit()),JC,bj_UNIT_FACING)
set HC[5]=bj_lastCreatedUnit
call SetUnitAnimation(HC[5],"birth")
call AddSpecialEffectLocBJ(JC,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
set PC[5]=GetUnitName(HC[5])
call RemoveLocation(JC)
endif
if(QRX())then
set JC=MJV(SI,400.,(GetUnitFacing(GetTriggerUnit())+45.))
call CreateNUnitsAtLoc(1,'H07X',GetOwningPlayer(GetTriggerUnit()),JC,bj_UNIT_FACING)
set HC[6]=bj_lastCreatedUnit
call SetUnitAnimation(HC[6],"birth")
call AddSpecialEffectLocBJ(JC,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
set PC[6]=GetUnitName(HC[6])
call RemoveLocation(JC)
endif
call RemoveLocation(SI)
endfunction
function QNX takes nothing returns boolean
return(GetSpellAbilityId()=='A0FX')
endfunction
function QBX takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
set UC=GetUnitLoc(GetSpellTargetUnit())
set JC=MJV(SI,400.,GetRandomReal(0,360.))
call SetUnitPositionLoc(GetSpellTargetUnit(),JC)
call AddSpecialEffectLocBJ(JC,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call AddSpecialEffectLocBJ(UC,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call RemoveLocation(UC)
call RemoveLocation(JC)
call RemoveLocation(SI)
endfunction
function QDX takes nothing returns boolean
return(GetSpellAbilityId()=='A0G0')
endfunction
function QFX takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
set bj_forLoopAIndex=1
set bj_forLoopAIndexEnd=3
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set JC=MJV(SI,400.,((GetUnitFacing(GetTriggerUnit())+180.)-(45.*I2R(bj_forLoopAIndex))))
set UC=GetUnitLoc(HC[bj_forLoopAIndex])
call SetUnitPositionLoc(HC[bj_forLoopAIndex],JC)
call AddSpecialEffectLocBJ(JC,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call AddSpecialEffectLocBJ(UC,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call RemoveLocation(JC)
call RemoveLocation(UC)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
set bj_forLoopAIndex=4
set bj_forLoopAIndexEnd=6
loop
exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
set JC=MJV(SI,500.,((GetUnitFacing(GetTriggerUnit())+.0)+(45.*I2R(bj_forLoopAIndex))))
set UC=GetUnitLoc(HC[bj_forLoopAIndex])
call SetUnitPositionLoc(HC[bj_forLoopAIndex],JC)
call AddSpecialEffectLocBJ(JC,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call AddSpecialEffectLocBJ(UC,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call RemoveLocation(JC)
call RemoveLocation(UC)
set bj_forLoopAIndex=bj_forLoopAIndex+1
endloop
call RemoveLocation(SI)
endfunction
function QHX takes nothing returns boolean
return(GetSpellAbilityId()=='A0FY')
endfunction
function QJX takes nothing returns nothing
call TriggerSleepAction(.5)
call SetUnitAnimation(GetTriggerUnit(),"birth")
endfunction
function QLX takes nothing returns nothing
local unit u=GetTriggerUnit()
local real t=1.5
if(HC[1]==u)then
set HC[1]=null
call TriggerSleepAction(t)
call RemoveUnit(u)
elseif(HC[2]==u)then
set HC[2]=null
call TriggerSleepAction(t)
call RemoveUnit(u)
elseif(HC[3]==u)then
set HC[3]=null
call TriggerSleepAction(t)
call RemoveUnit(u)
elseif(HC[4]==u)then
set HC[4]=null
call TriggerSleepAction(t)
call RemoveUnit(u)
elseif(HC[5]==u)then
set HC[5]=null
call TriggerSleepAction(t)
call RemoveUnit(u)
elseif(HC[6]==u)then
set HC[6]=null
call TriggerSleepAction(t)
call RemoveUnit(u)
endif
set u=null
endfunction
function QPX takes nothing returns boolean
return(CountUnitsInGroup(RD)==0)
endfunction
function QQX takes nothing returns boolean
return(CountUnitsInGroup(RD)==0)
endfunction
function QSX takes nothing returns boolean
return(CountUnitsInGroup(RD)==0)
endfunction
function QTX takes nothing returns nothing
set RD=M4V('H071')
if(QPX())then
set HC[1]=null
endif
call DestroyGroup(RD)
set RD=M4V('H070')
if(QQX())then
set HC[2]=null
endif
call DestroyGroup(RD)
set RD=M4V('H06Z')
if(QSX())then
set HC[3]=null
endif
call DestroyGroup(RD)
endfunction
function QWX takes nothing returns boolean
return(HC[1]==null)or(HC[2]==null)or(HC[3]==null)or(HC[4]==null)or(HC[5]==null)or(HC[6]==null)
endfunction
function QYX takes nothing returns boolean
return(GetSpellAbilityId()=='A0FW')and(QWX())
endfunction
function QZX takes nothing returns boolean
return(QYX())
endfunction
function Q_X takes nothing returns boolean
return(HC[bj_forLoopBIndex]==null)and(PC[bj_forLoopBIndex]!="")
endfunction
function Q0X takes nothing returns boolean
return(Q_X())
endfunction
function Q1X takes nothing returns nothing
call DialogSetMessage(KC,"Select who to revive")
set MC=GetUnitLoc(GetTriggerUnit())
set QC=GetOwningPlayer(GetTriggerUnit())
set SC=GetTriggerUnit()
set bj_forLoopBIndex=1
set bj_forLoopBIndexEnd=6
loop
exitwhen bj_forLoopBIndex>bj_forLoopBIndexEnd
if(Q0X())then
call DialogAddButtonBJ(KC,PC[bj_forLoopBIndex])
set LC[bj_forLoopBIndex]=bj_lastCreatedButton
endif
set bj_forLoopBIndex=bj_forLoopBIndex+1
endloop
call DialogAddButtonBJ(KC,"None")
set LC[7]=bj_lastCreatedButton
call DialogDisplayBJ(true,KC,GetOwningPlayer(GetTriggerUnit()))
endfunction
function Q3X takes nothing returns boolean
return(GetClickedButton()==LC[7])
endfunction
function Q4X takes nothing returns boolean
return(GetClickedButton()==LC[6])
endfunction
function Q5X takes nothing returns boolean
return(GetClickedButton()==LC[5])
endfunction
function Q6X takes nothing returns boolean
return(GetClickedButton()==LC[4])
endfunction
function Q7X takes nothing returns boolean
return(GetClickedButton()==LC[3])
endfunction
function Q8X takes nothing returns boolean
return(GetClickedButton()==LC[2])
endfunction
function Q9X takes nothing returns boolean
return(GetClickedButton()==LC[1])
endfunction
function SVX takes nothing returns nothing
if(Q9X())then
set SI=MJV(MC,500.,GetUnitFacing(SC))
call CreateNUnitsAtLoc(1,'H071',QC,SI,bj_UNIT_FACING)
set HC[1]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(SI,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call SetUnitAnimation(HC[1],"birth")
call DialogClear(KC)
call RemoveLocation(MC)
call RemoveLocation(SI)
set SC=null
else
if(Q8X())then
set SI=MJV(MC,500.,GetUnitFacing(SC))
call CreateNUnitsAtLoc(1,'H070',QC,SI,bj_UNIT_FACING)
set HC[2]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(SI,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call SetUnitAnimation(HC[2],"birth")
call DialogClear(KC)
call RemoveLocation(MC)
call RemoveLocation(SI)
set SC=null
else
if(Q7X())then
set SI=MJV(MC,500.,GetUnitFacing(SC))
call CreateNUnitsAtLoc(1,'H06Z',QC,SI,bj_UNIT_FACING)
set HC[3]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(SI,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call SetUnitAnimation(HC[3],"birth")
call DialogClear(KC)
call RemoveLocation(MC)
call RemoveLocation(SI)
set SC=null
else
if(Q6X())then
set SI=MJV(MC,500.,GetUnitFacing(SC))
call CreateNUnitsAtLoc(1,'H07V',QC,SI,bj_UNIT_FACING)
set HC[4]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(SI,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call SetUnitAnimation(HC[4],"birth")
call DialogClear(KC)
call RemoveLocation(MC)
call RemoveLocation(SI)
set SC=null
else
if(Q5X())then
set SI=MJV(MC,500.,GetUnitFacing(SC))
call CreateNUnitsAtLoc(1,'H07W',QC,SI,bj_UNIT_FACING)
set HC[5]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(SI,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call SetUnitAnimation(HC[5],"birth")
call DialogClear(KC)
call RemoveLocation(MC)
call RemoveLocation(SI)
set SC=null
else
if(Q4X())then
set SI=MJV(MC,500.,GetUnitFacing(SC))
call CreateNUnitsAtLoc(1,'H07X',QC,SI,bj_UNIT_FACING)
set HC[6]=bj_lastCreatedUnit
call AddSpecialEffectLocBJ(SI,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call SetUnitAnimation(HC[6],"birth")
call DialogClear(KC)
call RemoveLocation(MC)
call RemoveLocation(SI)
set SC=null
else
if(Q3X())then
call DialogClear(KC)
set SC=null
call RemoveLocation(MC)
endif
endif
endif
endif
endif
endif
endif
endfunction
function SXX takes nothing returns boolean
return GetSpellAbilityId()=='A0FR'
endfunction
function SOX takes nothing returns nothing
local unit u=GetSpellTargetUnit()
local real t2=1.
local effect CCX=AddSpecialEffectTarget("war3mapImported\\Time Rune_squished.mdx",u,"origin")
call PauseUnit(u,true)
call SetUnitTimeScale(u,0)
loop
exitwhen IsUnitDeadBJ(u)
call TriggerSleepAction(t2)
endloop
call DestroyEffect(CCX)
set u=null
endfunction
function SRX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H06Y')and(IsUnitIllusion(GetTriggerUnit())!=true)
endfunction
function SIX takes nothing returns boolean
return(SRX())
endfunction
function SAX takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc(1,'h07U',GetOwningPlayer(GetTriggerUnit()),SI,bj_UNIT_FACING)
set IF[GetUnitUserData(bj_lastCreatedUnit)]=GetTriggerUnit()
call AddSpecialEffectLocBJ(SI,"war3mapImported\\PoisonStream.mdl")
call RemoveLocation(SI)
endfunction
function SBX takes nothing returns boolean
return(GetSpellAbilityId()=='A0HT')
endfunction
function SCX takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
call ReviveHeroLoc(IF[GetUnitUserData(GetTriggerUnit())],SI,true)
call PlaySoundBJ(I6)
call AddSpecialEffectLocBJ(SI,"war3mapImported\\PoisonStream.mdl")
set IF[GetUnitUserData(bj_lastCreatedUnit)]=null
call KillUnit(GetTriggerUnit())
call RemoveLocation(SI)
endfunction
function SFX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='h07U')
endfunction
function SGX takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
call AddSpecialEffectLocBJ(SI,"war3mapImported\\PoisonStream.mdl")
set IF[GetUnitUserData(bj_lastCreatedUnit)]=null
call RemoveLocation(SI)
endfunction
function SJX takes nothing returns boolean
return(GetSpellAbilityId()=='A0HW')
endfunction
function SKX takes nothing returns nothing
set IG=GetTriggerUnit()
set OG=GetSpellTargetLoc()
set AG=I2R(GetUnitAbilityLevelSwapped('A0HW',IG))
call CreateNUnitsAtLoc(1,'u032',GetOwningPlayer(IG),OG,bj_UNIT_FACING)
call RemoveLocation(OG)
set NG=bj_lastCreatedUnit
set CG=GetHandleId(NG)
set BG[1]=(NF+(AG*BF))
call SaveUnitHandleBJ(IG,1,CG,AF)
call SaveIntegerBJ(1,2,CG,AF)
call SaveIntegerBJ((JF+(R2I(AG)*KF)),3,CG,AF)
call SaveRealBJ(BG[1],4,CG,AF)
call SaveRealBJ((CF+(AG*DF)),5,CG,AF)
call SaveRealBJ((FF+(AG*GF)),6,CG,AF)
call SaveIntegerBJ(R2I(((3.12*(2.*BG[1]))/ QF)),7,CG,AF)
call SaveRealBJ(LF,8,CG,AF)
call SaveIntegerBJ(0,9,CG,AF)
call SaveIntegerBJ(0,$A,CG,AF)
call SaveIntegerBJ(0,$B,CG,AF)
call SetUnitScalePercent(NG,LF,LF,PF)
call GroupAddUnit(DG,NG)
call EnableTrigger(I5V)
endfunction
function SMX takes nothing returns nothing
call InitHashtableBJ()
set AF=GetLastCreatedHashtableBJ()
set NF=500.
set BF=100.
set CF=25.
set DF=5.
set FF=20.
set GF=5.
set HF=1.
set JF=8
set KF=2
set LF=2.
set MF=5.
set PF=300.
set QF=250.
set SF=20.
set TF=5
set UF=.75
set WF='u031'
set YF='u032'
set ZF='u033'
set VG='A0HW'
set EG=true
set XG=150.
set OG=GetRectCenter(bj_mapInitialPlayableArea)
call CreateNUnitsAtLoc(1,'hpea',Player($F),OG,bj_UNIT_FACING)
set RG=bj_lastCreatedUnit
call ShowUnitHide(RG)
call SetUnitInvulnerable(RG,true)
call RemoveLocation(OG)
endfunction
function SQX takes nothing returns boolean
return(DistanceBetweenPoints(JG,MG)>=(LoadRealBJ(4,UG,AF)+(QF/ 2.)))
endfunction
function SSX takes nothing returns boolean
return((IsUnitType(NG,UNIT_TYPE_MAGIC_IMMUNE)==false)and(IsUnitType(NG,UNIT_TYPE_STRUCTURE)==false)and(IsUnitAliveBJ(NG))and(IsUnitEnemy(NG,GetOwningPlayer(IG)))and(IsUnitType(NG,UNIT_TYPE_GROUND)))!=null
endfunction
function STX takes nothing returns nothing
set NG=GetEnumUnit()
if(SSX())then
set LG=GetHandleId(NG)
call UnitDamageTargetBJ(LoadUnitHandleBJ(1,CG,AF),NG,LoadRealBJ(5,CG,AF),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
call SaveRealBJ(LoadRealBJ(6,CG,AF),$D,LG,AF)
set MG=GetUnitLoc(NG)
if(SQX())then
call SaveRealBJ(SG,$E,LG,AF)
call SaveRealBJ(TG,$F,LG,AF)
call SaveRealBJ(QG,17,LG,AF)
call SaveRealBJ(PG,16,LG,AF)
else
call SaveRealBJ(PG,$E,LG,AF)
call SaveRealBJ(QG,$F,LG,AF)
call SaveRealBJ(SG,16,LG,AF)
call SaveRealBJ(TG,17,LG,AF)
endif
call GroupAddUnit(DG,NG)
call SaveIntegerBJ(4,2,LG,AF)
call RemoveLocation(MG)
endif
endfunction
function SUX takes nothing returns boolean
return(IsUnitGroupEmptyBJ(DG))
endfunction
function SWX takes nothing returns boolean
return(BG[4]<.0)
endfunction
function SYX takes nothing returns boolean
return(GetUnitCurrentOrder(RG)==$D0032)
endfunction
function SZX takes nothing returns nothing
call IssueTargetOrderById(RG,$D0032,GetEnumDestructable())
if(SYX())then
call KillDestructable(GetEnumDestructable())
endif
call IssueImmediateOrderById(RG,$D0004)
endfunction
function S_X takes nothing returns boolean
return(EG)
endfunction
function S0X takes nothing returns boolean
return(RectContainsLoc(bj_mapInitialPlayableArea,OG))and(IsTerrainPathableBJ(OG,PATHING_TYPE_WALKABILITY)==false)
endfunction
function S1X takes nothing returns boolean
return(IsUnitGroupEmptyBJ(DG))
endfunction
function S2X takes nothing returns boolean
return(LoadRealBJ($D,CG,AF)<=.0)
endfunction
function S3X takes nothing returns boolean
return(FG==4)
endfunction
function S4X takes nothing returns boolean
return(FG==3)
endfunction
function S5X takes nothing returns boolean
return(FG==TF)
endfunction
function S6X takes nothing returns boolean
return((IsUnitType(NG,UNIT_TYPE_MAGIC_IMMUNE)==false)and(IsUnitType(NG,UNIT_TYPE_STRUCTURE)==false)and(IsUnitAliveBJ(NG))and(IsUnitEnemy(NG,GetOwningPlayer(IG)))and(IsUnitType(NG,UNIT_TYPE_GROUND)))!=null
endfunction
function S7X takes nothing returns nothing
set NG=GetEnumUnit()
if(S6X())then
set SG=GetUnitX(NG)
set TG=GetUnitY(NG)
set LG=GetHandleId(NG)
call UnitDamageTargetBJ(LoadUnitHandleBJ(1,CG,AF),NG,LoadRealBJ(5,CG,AF),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL)
call SaveRealBJ(LoadRealBJ(6,CG,AF),$D,LG,AF)
call SaveRealBJ(PG,$E,LG,AF)
call SaveRealBJ(QG,$F,LG,AF)
call SaveRealBJ(SG,16,LG,AF)
call SaveRealBJ(TG,17,LG,AF)
call GroupAddUnit(DG,NG)
call SaveIntegerBJ(4,2,LG,AF)
endif
endfunction
function S8X takes nothing returns boolean
return(IsUnitGroupEmptyBJ(DG))
endfunction
function S9X takes nothing returns boolean
return(FG==LoadIntegerBJ(3,CG,AF))
endfunction
function TVX takes nothing returns boolean
return(FG==(TF*$A))
endfunction
function TEX takes nothing returns boolean
return(FG==2)
endfunction
function TXX takes nothing returns boolean
return(BG[1]<PF)
endfunction
function TOX takes nothing returns boolean
return(FG==1)
endfunction
function TRX takes nothing returns nothing
set IG=GetEnumUnit()
set CG=GetHandleId(IG)
set FG=LoadIntegerBJ(2,CG,AF)
if(TOX())then
set BG[1]=(LoadRealBJ(8,CG,AF)+MF)
if(TXX())then
call SetUnitScalePercent(IG,BG[1],BG[1],BG[1])
call SaveRealBJ(BG[1],8,CG,AF)
else
call SaveIntegerBJ(2,2,CG,AF)
endif
else
if(TEX())then
set FG=LoadIntegerBJ(9,CG,AF)
if(S5X())then
call SaveIntegerBJ(0,9,CG,AF)
set OG=GetUnitLoc(IG)
set GG=.0
set WG=1
loop
exitwhen WG>LoadIntegerBJ(7,CG,AF)
set GG=(GG+(360./ I2R(LoadIntegerBJ(7,CG,AF))))
set JG=MJV(OG,LoadRealBJ(4,CG,AF),GG)
set AG=DistanceBetweenPoints(OG,JG)
call RemoveLocation(JG)
call CreateNUnitsAtLoc(1,'u031',GetOwningPlayer(IG),OG,GG)
set NG=bj_lastCreatedUnit
set LG=GetHandleId(NG)
call SaveUnitHandleBJ(LoadUnitHandleBJ(1,CG,AF),1,LG,AF)
call SaveIntegerBJ(3,2,LG,AF)
call SaveRealBJ(LoadRealBJ(5,CG,AF),5,LG,AF)
call SaveRealBJ(LoadRealBJ(6,CG,AF),6,LG,AF)
call SaveRealBJ(AG,7,LG,AF)
call SaveRealBJ((AG*UF),8,LG,AF)
call SaveRealBJ(.0,9,LG,AF)
call SaveUnitHandleBJ(IG,$A,LG,AF)
call GroupAddUnit(DG,NG)
set WG=WG+1
endloop
call RemoveLocation(OG)
else
call SaveIntegerBJ((FG+1),9,CG,AF)
endif
set FG=LoadIntegerBJ($A,CG,AF)
if(TVX())then
call SaveIntegerBJ(0,$A,CG,AF)
set FG=LoadIntegerBJ($B,CG,AF)
set OG=GetUnitLoc(IG)
call CreateNUnitsAtLoc(1,'u033',GetOwningPlayer(IG),OG,bj_UNIT_FACING)
set BG[1]=(LoadRealBJ(4,CG,AF)/ 3.)
call SetUnitScalePercent(bj_lastCreatedUnit,BG[1],BG[1],BG[1])
call UnitApplyTimedLifeBJ(2.,'BTLF',bj_lastCreatedUnit)
set KG=M3V(LoadRealBJ(4,CG,AF),OG)
set PG=GetUnitX(IG)
set QG=GetUnitY(IG)
call ForGroupBJ(KG,function S7X)
call DestroyGroup(KG)
call RemoveLocation(OG)
if(S9X())then
call GroupRemoveUnit(DG,IG)
call FlushChildHashtableBJ(CG,AF)
call KillUnit(IG)
if(S8X())then
call DisableTrigger(GetTriggeringTrigger())
endif
else
call SaveIntegerBJ((FG+1),$B,CG,AF)
endif
else
call SaveIntegerBJ((FG+1),$A,CG,AF)
endif
else
if(S4X())then
set PG=GetUnitX(IG)
set QG=GetUnitY(IG)
set GG=GetUnitFacing(IG)
call SetUnitX(IG,PG+SF*Cos(GG*bj_DEGTORAD))
call SetUnitY(IG,QG+SF*Sin(GG*bj_DEGTORAD))
set BG[1]=LoadRealBJ(7,CG,AF)
set BG[2]=LoadRealBJ(8,CG,AF)
set BG[3]=(LoadRealBJ(9,CG,AF)+SF)
call SaveRealBJ(BG[3],9,CG,AF)
set BG[4]=(((4.*BG[2])/ BG[1])*((BG[3]/ BG[1])*(BG[1]-BG[3])))
call SetUnitFlyHeight(IG,BG[4],.0)
if(SWX())then
set HG=LoadUnitHandleBJ($A,CG,AF)
set UG=GetHandleId(HG)
set SG=GetUnitX(HG)
set TG=GetUnitY(HG)
set JG=GetUnitLoc(HG)
set OG=GetUnitLoc(IG)
set KG=M3V(QF,OG)
call ForGroupBJ(KG,function STX)
call DestroyGroup(KG)
call RemoveLocation(JG)
call RemoveLocation(OG)
call GroupRemoveUnit(DG,IG)
call FlushChildHashtableBJ(CG,AF)
call KillUnit(IG)
if(SUX())then
call DisableTrigger(GetTriggeringTrigger())
endif
endif
else
if(S3X())then
set OG=Location(LoadRealBJ($E,CG,AF),LoadRealBJ($F,CG,AF))
set JG=Location(LoadRealBJ(16,CG,AF),LoadRealBJ(17,CG,AF))
set AG=(LoadRealBJ($D,CG,AF)-HF)
call SaveRealBJ(AG,$D,CG,AF)
set GG=AngleBetweenPoints(OG,JG)
call RemoveLocation(OG)
set OG=MJV(JG,AG,GG)
if(S0X())then
set PG=GetUnitX(IG)
set QG=GetUnitY(IG)
call SetUnitX(IG,PG+AG*Cos(GG*bj_DEGTORAD))
call SetUnitY(IG,QG+AG*Sin(GG*bj_DEGTORAD))
if(S_X())then
call MQV(XG,OG,function SZX)
endif
endif
call RemoveLocation(JG)
call RemoveLocation(OG)
if(S2X())then
call GroupRemoveUnit(DG,IG)
call FlushChildHashtableBJ(CG,AF)
if(S1X())then
call DisableTrigger(GetTriggeringTrigger())
endif
endif
endif
endif
endif
endif
endfunction
function TIX takes nothing returns nothing
call ForGroupBJ(DG,function TRX)
endfunction
function TNX takes integer S7V returns integer
return $F
endfunction
function TBX takes integer S7V returns real
return .18
endfunction
function TCX takes integer S7V returns real
return 60.*S7V
endfunction
function TDX takes integer S7V returns real
return 325.
endfunction
function TFX takes nothing returns nothing
call KillDestructable(GetEnumDestructable())
endfunction
function TGX takes nothing returns nothing
local integer D
local boolean THX
local unit j
local unit d
local integer i=0
local real TJX
local real x
local real y
local location l
loop
exitwhen i>=C1V
set D=C0V[i]
set x=GetUnitX(J3V[D])
set y=GetUnitY(J3V[D])
set l=GetUnitLoc(J3V[D])
call SetUnitPosition(J3V[D],x+CTV*Cos(J4V[D]*bj_DEGTORAD),y+CTV*Sin(J4V[D]*bj_DEGTORAD))
set THX=J5V[D]<=40
set J5V[D]=J5V[D]-CTV
if THX then
set j=CreateUnit(C2V,'u039',x,y,0)
call SetUnitScale(j,1.2,1.2,1.2)
call DestroyEffect(AddSpecialEffectTarget("war3mapImported\\BlackHole.mdx",j,"origin"))
call UnitApplyTimedLife(j,'BTLF',1)
call GroupEnumUnitsInRange(C3V,x,y,TDX(J2V[D]),null)
call MQV(350.,l,function TFX)
call RemoveLocation(l)
loop
set j=FirstOfGroup(C3V)
exitwhen j==null
call GroupRemoveUnit(C3V,j)
if not IsUnitType(j,UNIT_TYPE_DEAD)and not IsUnitType(j,UNIT_TYPE_MAGIC_IMMUNE)and IsUnitEnemy(j,GetOwningPlayer(J1V[D]))then
if 2==1 then
set TJX=GetHeroStr(J1V[D],true)
elseif 2==2 then
set TJX=GetHeroAgi(J1V[D],true)
else
set TJX=GetHeroInt(J1V[D],true)
endif
set d=CreateUnit(C2V,'u039',GetUnitX(j),GetUnitY(j),0)
call UnitAddAbility(d,'A0JF')
call SetUnitAbilityLevel(d,'A0JF',J2V[D])
call IssueTargetOrder(d,"slow",j)
call UnitApplyTimedLife(d,'BTLF',.5)
call UnitDamageTarget(J1V[D],j,TJX*TCX(J2V[D]),true,false,CMV,CPV,CQV)
set d=null
endif
endloop
call DestroyEffect(J6V[D])
call UnitApplyTimedLife(J3V[D],'BTLF',1)
set C0V[i]=C0V[C1V-1]
set C1V=C1V-1
call P0V(D)
endif
set i=i+1
endloop
if C1V==0 then
call PauseTimer(CYV)
endif
endfunction
function TKX takes nothing returns nothing
local integer D
local integer A
local boolean THX
local integer i=0
local real x
local real y
local real dx
local real dy
local real MMV
loop
exitwhen i>=C_V
set D=CZV[i]
call IssueImmediateOrderById(JQV[D],$D0004)
if JUV[D]<=0 then
set A=P_V()
set x=GetUnitX(JQV[D])
set y=GetUnitY(JQV[D])
set dx=JWV[D]-x
set dy=JYV[D]-y
call SetUnitAnimation(JQV[D],"stand")
call SetUnitAnimation(JQV[D],"attack")
set J1V[A]=JQV[D]
set J2V[A]=JSV[D]
set MMV=Atan2(JYV[D]-y,JWV[D]-x)
set J5V[A]=SquareRoot(dx*dx+dy*dy)
set J4V[A]=MMV*bj_RADTODEG
set J3V[A]=CreateUnit(C2V,'u039',x+80*Cos(MMV),y+80*Sin(MMV),J4V[A])
call SetUnitFlyHeight(J3V[A],CLV,0)
call SetUnitScale(J3V[A],CKV,CKV,CKV)
set J6V[A]=AddSpecialEffectTarget("Abilities\\Weapons\\AvengerMissile\\AvengerMissile.mdl",J3V[A],"origin")
if C1V==0 then
call TimerStart(CYV,CUV,true,function TGX)
endif
set C1V=C1V+1
set C0V[C1V-1]=A
set JTV[D]=JTV[D]-1
set JUV[D]=TBX(JSV[D])
else
set JUV[D]=JUV[D]-CUV
endif
set THX=IsUnitType(JQV[D],UNIT_TYPE_DEAD)or JTV[D]<=0
if THX then
call SetUnitTimeScale(JQV[D],1)
call IssueImmediateOrderById(JQV[D],$D0004)
call SetUnitAnimation(JQV[D],"stand")
set CZV[i]=CZV[C_V-1]
set C_V=C_V-1
call P2V(D)
endif
set i=i+1
endloop
if C_V==0 then
call PauseTimer(CWV)
endif
endfunction
function TLX takes nothing returns boolean
local integer D
local unit TMX
local location MTV
if GetSpellAbilityId()=='A0JG' then
set D=P1V()
set TMX=GetTriggerUnit()
set MTV=GetSpellTargetLoc()
set JQV[D]=TMX
set JSV[D]=GetUnitAbilityLevel(TMX,'A0JG')
set JTV[D]=TNX(JSV[D])
set JUV[D]=0
set JWV[D]=GetLocationX(MTV)
set JYV[D]=GetLocationY(MTV)
call SetUnitTimeScale(TMX,CSV)
if C_V==0 then
call TimerStart(CWV,CUV,true,function TKX)
endif
set C_V=C_V+1
set CZV[C_V-1]=D
set TMX=null
call RemoveLocation(MTV)
endif
return false
endfunction
function TPX takes nothing returns nothing
local trigger t=CreateTrigger()
local integer i=0
local unit d=CreateUnit(C2V,'u039',0,0,0)
call UnitAddAbility(d,'A0JG')
call UnitAddAbility(d,'A0JF')
call RemoveUnit(d)
call Preload("Abilities\\Weapons\\AvengerMissile\\AvengerMissile.mdl")
call Preload("war3mapImported\\BlackHole.mdx")
loop
call TriggerRegisterPlayerUnitEvent(t,Player(i),EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
set i=i+1
exitwhen i==16
endloop
call TriggerAddCondition(t,Condition(function TLX))
set CUV=1/ CUV
set CTV=CTV*CUV
set t=null
endfunction
function TQX takes nothing returns boolean
return(GetSpellAbilityId()=='A0ET')and(GetUnitStateSwap(UNIT_STATE_MAX_LIFE,GetTriggerUnit())>GetUnitStateSwap(UNIT_STATE_MAX_LIFE,GetSpellTargetUnit()))
endfunction
function TSX takes nothing returns boolean
return(TQX())
endfunction
function TTX takes nothing returns nothing
set AB[1]=GetTriggerUnit()
set AB[2]=GetSpellTargetUnit()
set NB[1]=GetOwningPlayer(AB[1])
set NB[2]=GetOwningPlayer(AB[2])
call ShowUnitHide(AB[1])
call TriggerSleepAction(1.)
call SetUnitOwner(AB[2],NB[1],false)
call UnitAddAbility(AB[2],'A0EU')
endfunction
function TWX takes nothing returns boolean
return(GetTriggerUnit()==AB[2])
endfunction
function TYX takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
call SetUnitPositionLoc(AB[1],SI)
call SetUnitOwner(AB[2],NB[2],false)
call UnitRemoveAbility(AB[2],'A0EU')
call ShowUnitShow(AB[1])
call AddSpecialEffectLocBJ(SI,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call RemoveLocation(SI)
set AB[1]=null
set AB[2]=null
endfunction
function T_X takes nothing returns boolean
return(GetSpellAbilityId()=='A0EU')
endfunction
function T0X takes nothing returns nothing
set SI=GetUnitLoc(GetTriggerUnit())
call SetUnitPositionLoc(AB[1],SI)
call SetUnitOwner(AB[2],NB[2],false)
call UnitRemoveAbility(AB[2],'A0EU')
call ShowUnitShow(AB[1])
call AddSpecialEffectLocBJ(SI,"Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl")
call RemoveLocation(SI)
set AB[1]=null
set AB[2]=null
endfunction
function T2X takes nothing returns boolean
return(GetSpellAbilityId()=='A0JL')
endfunction
function T3X takes nothing returns boolean
return(IsUnitType(GetSpellTargetUnit(),UNIT_TYPE_STRUCTURE))!=null
endfunction
function T4X takes nothing returns nothing
if(T3X())then
return
endif
call GroupAddUnit(DQ,GetSpellTargetUnit())
endfunction
function T6X takes nothing returns boolean
return(GetSpellAbilityId()=='A0JQ')
endfunction
function T7X takes nothing returns boolean
return(IsUnitType(GetEnumUnit(),UNIT_TYPE_STRUCTURE)==false)!=null
endfunction
function T8X takes nothing returns nothing
if(T7X())then
call GroupAddUnit(DQ,GetEnumUnit())
endif
endfunction
function T9X takes nothing returns nothing
set SI=GetSpellTargetLoc()
set RD=M3V(360.,SI)
call ForGroupBJ(RD,function T8X)
call RemoveLocation(SI)
call DestroyGroup(RD)
endfunction
function UEX takes nothing returns boolean
return(GetSpellAbilityId()=='A0JM')
endfunction
function UXX takes nothing returns nothing
call GroupRemoveUnit(DQ,GetSpellTargetUnit())
endfunction
function URX takes nothing returns boolean
return(GetSpellAbilityId()=='A0JN')
endfunction
function UIX takes nothing returns nothing
call GroupRemoveUnit(DQ,GetEnumUnit())
set FP=GetEnumUnit()
set SI=GetUnitLoc(FP)
set GP=AngleBetweenPoints(SI,FQ)
set HP=DistanceBetweenPoints(SI,FQ)
set JP=GetRandomReal(300.,400.)
set KP=(GetRandomReal(500.,650.)+(HP/ 10.))
set LP=true
set MP="Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl"
set PP="Abilities\\Weapons\\AvengerMissile\\AvengerMissile.mdl"
set QP="chest"
call ExecuteFunc("H0E")
endfunction
function UAX takes nothing returns nothing
set FQ=GetSpellTargetLoc()
call ForGroupBJ(DQ,function UIX)
endfunction
function UBX takes nothing returns boolean
return GetSpellAbilityId()=='A0JR'
endfunction
function PlanetDestruction__DamageCon takes nothing returns nothing
return
endfunction
function UCX takes nothing returns nothing
local unit u=GetTriggerUnit()
local location l=GetUnitLoc(u)
local location l2
local unit UDX
local real t=.1
local integer UFX
local group g=CreateGroup()
call GroupAddUnit(GQ,u)
loop
exitwhen IsUnitInGroup(u,GQ)==false
set UFX=4
loop
exitwhen UFX<=0
if UFX<2 then
set l2=MJV(l,GetRandomInt(300,500),GetRandomInt(0,360))
else
set l2=MJV(l,GetRandomInt(300,$9C4),GetRandomInt(0,360))
endif
set UDX=CreateUnitAtLoc(GetOwningPlayer(u),'u03A',l2,.0)
call UnitApplyTimedLife(UDX,'BTLF',GetRandomReal(3.25,5.))
call DestroyEffect(AddSpecialEffectLoc("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl",l2))
call UnitDamagePointLoc(u,.0,300.,l2,150.,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_NORMAL)
call SetUnitFlyHeight(UDX,1000.,200.)
call RemoveLocation(l2)
set UDX=null
set UFX=UFX-1
endloop
call TriggerSleepAction(t)
endloop
call RemoveLocation(l)
set u=null
if TriggerEvaluate(AIV)then
call TriggerExecute(AIV)
endif
endfunction
function UGX takes nothing returns boolean
return(IsUnitInGroup(GetTriggerUnit(),GQ))
endfunction
function UHX takes nothing returns nothing
call GroupRemoveUnit(GQ,GetTriggerUnit())
endfunction
function UKX takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function ULX takes nothing returns nothing
call TriggerSleepAction(5.)
set RD=M4V('u03A')
call ForGroupBJ(RD,function UKX)
call DestroyGroup(RD)
endfunction
function UPX takes nothing returns boolean
return GetSpellAbilityId()=='A0K2' and((GetUnitTypeId(GetSpellTargetUnit())=='E00M')and GetUnitTypeId(GetTriggerUnit())=='h07U')
endfunction
function UQX takes nothing returns nothing
local unit u=GetTriggerUnit()
local unit v=GetSpellTargetUnit()
local unit d
local location l1=GetUnitLoc(u)
local location l2=GetUnitLoc(v)
local real t1=.5
local real t2=13.
local integer CKX=1
local integer lv=GetUnitLevel(v)
local lightning CLX
local integer r
local integer g
local integer b
set VB=GetOwningPlayer(u)
call SetUnitInvulnerable(v,true)
call PauseUnit(v,true)
call UnitAddAbility(v,'Aloc')
call RemoveUnit(u)
set CLX=AddLightningLoc("DRAL",l1,l2)
set r=$F
set g=50
set b=50
call ConditionalTriggerExecute(AAV)
set d=CreateUnitAtLoc(GetOwningPlayer(u),'H09I',l1,GetUnitFacing(v))
call PauseUnit(d,true)
call SetUnitInvulnerable(d,true)
call SetUnitAnimation(d,"spell")
loop
exitwhen t2<=0
call SetUnitVertexColor(v,r,g,b,$FA-(CKX*$A))
call SetUnitVertexColor(d,$FF,$FF,$FF,1+(CKX*$C))
set t2=t2-t1
set CKX=CKX+1
call TriggerSleepAction(t1)
endloop
call SetUnitInvulnerable(v,false)
call PauseUnit(v,false)
call UnitRemoveAbility(v,'Aloc')
call SetHeroLevel(d,lv,true)
call SetUnitTimeScale(d,1)
call RemoveUnit(v)
call SetUnitInvulnerable(d,false)
call PauseUnit(d,false)
call DestroyLightning(CLX)
call RemoveLocation(l1)
call RemoveLocation(l2)
set u=null
set v=null
set d=null
endfunction
function USX takes nothing returns nothing
call RemoveUnit(GetEnumUnit())
endfunction
function UTX takes nothing returns nothing
set RD=M8V(VB,'H06Y')
call ForGroupBJ(RD,function USX)
call DestroyGroup(RD)
endfunction
function UWX takes nothing returns boolean
return(GetUnitTypeId(GetTriggerUnit())=='H09I')
endfunction
function UYX takes nothing returns nothing
local real t=3.25
local unit u=GetTriggerUnit()
set SI=GetUnitLoc(GetTriggerUnit())
call AddSpecialEffectLocBJ(SI,"Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl")
call TerrainDeformationRippleBJ(10.,true,SI,$400,$400,75.,1,512)
call PlaySoundBJ(C5)
call RemoveLocation(SI)
call TriggerSleepAction(t)
call RemoveUnit(u)
endfunction
function U_X takes nothing returns boolean
local integer d
local integer i=0
local integer ii=0
local unit u=GetTriggerUnit()
set C8V[0]=GetEventDamage()
if C8V[0]>=5. and GetEventDamageSource()!=u then
loop
exitwhen i>=KMV
set d=KLV[i]
if KVV[d]==u and KRV[d]==1 then
set KRV[d]=2
set KXV[d]=GetEventDamageSource()
set KAV[d]=C8V[0]*((250.+(.0*KOV[d]))/ 'd')
set C8V[0]=0
set i=KMV
endif
set i=i+1
endloop
endif
set u=null
return true
endfunction
function U0X takes nothing returns nothing
local integer d
local integer i=0
local unit u
loop
exitwhen i>=KMV
set d=KLV[i]
if KRV[d]==0 then
call DestroyEffect(KKV[d])
call RemoveUnit(KEV[d])
set KVV[d]=null
set KEV[d]=null
set KXV[d]=null
call PZV(d)
set KMV=KMV-1
set KLV[i]=KLV[KMV]
set i=i-1
elseif KRV[d]==1 then
set KBV[d]=KBV[d]+.03
set KNV[d]=KNV[d]+KFV[d]
set KIV[d]=KIV[d]+KDV[d]
set C8V[0]=(KIV[d]/ KJV[d])*bj_DEGTORAD
set C8V[1]=KGV[d]*Sin(C8V[0])
set C8V[2]=KNV[d]*bj_DEGTORAD
call SetUnitX(KEV[d],GetUnitX(KVV[d])+C8V[1]*Cos(C8V[2]))
call SetUnitY(KEV[d],GetUnitY(KVV[d])+C8V[1]*Sin(C8V[2]))
call SetUnitFlyHeight(KEV[d],(KGV[d]-KHV[d])*Cos(C8V[0])+KHV[d]+GetUnitFlyHeight(KVV[d]),0)
set C8V[2]=0
if KNV[d]>=360 then
set KNV[d]=KNV[d]-360
endif
if KBV[d]>=KCV[d]or GetUnitState(KVV[d],UNIT_STATE_LIFE)==0 then
set KRV[d]=0
endif
elseif KRV[d]==2 then
set C8V[0]=GetUnitX(KXV[d])
set C8V[1]=GetUnitY(KXV[d])
set C8V[2]=GetUnitX(KEV[d])
set C8V[3]=GetUnitY(KEV[d])
set C8V[4]=Atan2(C8V[1]-C8V[3],C8V[0]-C8V[2])
call SetUnitX(KEV[d],C8V[2]+10.*Cos(C8V[4]))
call SetUnitY(KEV[d],C8V[3]+10.*Sin(C8V[4]))
set C8V[0]=C8V[2]-C8V[0]
set C8V[1]=C8V[3]-C8V[1]
set C8V[2]=SquareRoot(C8V[0]*C8V[0]+C8V[1]*C8V[1])
set C8V[0]=GetUnitFlyHeight(KXV[d])
set C8V[1]=GetUnitFlyHeight(KEV[d])
set C8V[0]=C8V[0]-C8V[1]
set C8V[0]=C8V[0]/(C8V[2]/ 10.)
call SetUnitFlyHeight(KEV[d],C8V[1]+C8V[0],0)
if C8V[2]<=10. then
set KRV[d]=0
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\HealingSpray\\HealBottleMissile.mdl",KXV[d],"chest"))
call UnitDamageTarget(KVV[d],KXV[d],KAV[d],true,false,C5V,C6V,C7V)
elseif GetUnitState(KXV[d],UNIT_STATE_LIFE)==0 then
set KRV[d]=0
endif
endif
set i=i+1
endloop
set u=null
set i=0
if KMV==0 then
call PauseTimer(KPV)
endif
endfunction
function U1X takes unit h,real a1,real a2,real t2,integer l returns nothing
local integer d=PWV()
set KVV[d]=h
set KRV[d]=1
set KOV[d]=l
set KIV[d]=0
set KNV[d]=(360/ a1)*a2
set KBV[d]=0
set KCV[d]=t2
set KDV[d]=GetRandomReal(2.05,2.55)
set KGV[d]=GetRandomReal(110.,150.)
set KFV[d]=GetRandomReal(C4V,.55)*bj_DEGTORAD
set KHV[d]=GetRandomReal(75.,125.)
set KJV[d]=KGV[d]/ 90
set KEV[d]=CreateUnit(GetOwningPlayer(h),'n053',GetUnitX(h),GetUnitY(h),0)
call UnitAddAbility(KEV[d],'Arav')
call UnitRemoveAbility(KEV[d],'Arav')
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\HealingSpray\\HealBottleMissile.mdl",KEV[d],"chest"))
set KKV[d]=AddSpecialEffectTarget("Abilities\\Spells\\Other\\HealingSpray\\HealBottleMissile.mdl",KEV[d],"chest")
if KMV==0 then
call TimerStart(KPV,.03,true,function U0X)
endif