//TESH.scrollpos=-1
//TESH.alwaysfold=0
Name | Type | is_array | initial_value |
KMHM | group | No | |
KMHM_Caster | unit | Yes | |
KMHM_integer | integer | No | |
KMHM_Player | player | Yes | |
KMHM_Point | location | Yes | |
KMHM_Special | group | Yes | |
KMHM_Tek_Vurus | group | Yes | |
SF_Caster | unit | Yes | |
SF_integer | integer | No | |
SK | group | No | |
SK_Caster | unit | Yes | |
SK_integer | integer | No | |
SK_Player | player | Yes | |
SK_Point | location | Yes | |
SK_Sh_integer | integer | No | |
SK_Special | group | Yes | |
SK_Tek_Vurus | group | Yes | |
SP | group | No | |
SP_Caster | unit | Yes | |
SP_integer | integer | No | |
SP_Point | location | Yes |
//TESH.scrollpos=-1
//TESH.alwaysfold=0
function Trig_Kamehameha_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A000' ) ) then
return false
endif
return true
endfunction
function Trig_Kamehameha_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local player pa = GetOwningPlayer(a)
local location q = GetUnitLoc(a)
local integer s = GetConvertedPlayerId(pa)
local real face = GetUnitFacing(a)
local unit dummy = CreateUnitAtLoc(pa,'e000',q,face)
local unit charm = CreateUnitAtLoc(pa,'e002',q,face)
set udg_KMHM_Caster[s] = GetTriggerUnit()
set udg_KMHM_Point[s] = GetSpellTargetLoc()
set udg_KMHM_Player[s] = pa
call SetUnitFacingToFaceLocTimed(charm,udg_KMHM_Point[s],0)
call SetUnitFacingToFaceLocTimed(dummy,udg_KMHM_Point[s],0)
call PlaySoundAtPointBJ(gg_snd_Goku_ha3__ALLConverter_u, 100, q, 0 )
call GroupAddUnit(udg_KMHM,dummy)
call UnitApplyTimedLife(charm,'BFTL',1)
set dummy = null
set charm = null
call RemoveLocation(q)
endfunction
//===========================================================================
function InitTrig_Kamehameha takes nothing returns nothing
set gg_trg_Kamehameha = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Kamehameha, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Kamehameha, Condition( function Trig_Kamehameha_Conditions ) )
call TriggerAddAction( gg_trg_Kamehameha, function Trig_Kamehameha_Actions )
endfunction
//TESH.scrollpos=-1
//TESH.alwaysfold=0
function gg takes nothing returns nothing
local unit a = GetEnumUnit()
local real damage = ((0.5*GetUnitAbilityLevel(udg_KMHM_Caster[udg_KMHM_integer],'A000'))+1.9)*GetHeroStatBJ(bj_HEROSTAT_STR,udg_KMHM_Caster[udg_KMHM_integer],true)
if (IsUnitEnemy(a,udg_KMHM_Player[udg_KMHM_integer])) then
if ( not ( IsUnitInGroup(a,udg_KMHM_Tek_Vurus[udg_KMHM_integer] ))) then
call UnitDamageTargetBJ(udg_KMHM_Caster[udg_KMHM_integer],a,damage,ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL)
call GroupAddUnit(udg_KMHM_Tek_Vurus[udg_KMHM_integer],a)
endif
endif
set a = null
endfunction
function Special_Destroy takes nothing returns nothing
local unit a = GetEnumUnit()
call RemoveUnit(a)
set a = null
call GroupRemoveUnit(udg_KMHM_Special[udg_KMHM_integer],a)
endfunction
function Damage_Destroy takes nothing returns nothing
local unit a = GetEnumUnit()
call GroupRemoveUnit(udg_KMHM_Tek_Vurus[udg_KMHM_integer],a)
set a = null
endfunction
function KMHM takes nothing returns nothing
local unit a = GetEnumUnit()
local location q = GetUnitLoc(a)
local player pa = GetOwningPlayer(a)
local real face = GetUnitFacing(a)
local location w = PolarProjectionBJ(q,31,face)
local integer s = GetConvertedPlayerId(pa)
local unit dummy
local group g = GetUnitsInRangeOfLocAll(200,q)
local group gr = GetUnitsInRangeOfLocAll(500,q)
set udg_KMHM_integer = s
if ( IsUnitInRangeLoc(a,udg_KMHM_Point[s],250)) then
call KillUnit(a)
call GroupRemoveUnit(udg_KMHM,a)
set dummy = CreateUnitAtLoc(pa,'e003',q,face)
call UnitApplyTimedLife(dummy,'BFTL',1.5)
call ForGroup(gr,function gg)
call ForGroup(udg_KMHM_Special[udg_KMHM_integer],function Special_Destroy)
call ForGroup(udg_KMHM_Tek_Vurus[udg_KMHM_integer],function Damage_Destroy)
call SetUnitAnimation(udg_KMHM_Caster[s],"stand")
set udg_KMHM_Caster[s] = null
call RemoveLocation(udg_KMHM_Point[s])
else
set dummy = CreateUnitAtLoc(pa,'e001',q,face)
call GroupAddUnit(udg_KMHM_Special[s],dummy)
call ForGroup(g,function gg)
call SetUnitPositionLoc(a,w)
endif
call RemoveLocation(q)
call RemoveLocation(w)
call DestroyGroup(g)
call DestroyGroup(gr)
set a = null
set dummy = null
endfunction
function Trig_Kamehameha_loop_Actions takes nothing returns nothing
call ForGroup(udg_KMHM,function KMHM)
endfunction
//===========================================================================
function InitTrig_Kamehameha_loop takes nothing returns nothing
set gg_trg_Kamehameha_loop = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Kamehameha_loop, 0.03)
call TriggerAddAction( gg_trg_Kamehameha_loop, function Trig_Kamehameha_loop_Actions )
endfunction
//TESH.scrollpos=-1
//TESH.alwaysfold=0
function Trig_Spirit_Bomb_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A001' ) ) then
return false
endif
return true
endfunction
function Trig_Spirit_Bomb_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local location l = GetSpellTargetLoc()
local real y = GetUnitY(a)
local real x = GetUnitX(a)
local real tx = GetLocationX(l)
local real ty = GetLocationY(l)
local real face = GetUnitFacing(a)
local player pa = GetOwningPlayer(a)
local real scale = 0.31
local unit spirit = CreateUnit(pa,'e004',x,y,face)
local integer loopa = 1
local unit dummy = CreateUnit(pa,'e007',x,y,face)
local group g
local integer paa = GetConvertedPlayerId(pa)
call SetUnitAnimationByIndex(a,10)
set udg_SP_Caster[paa] = GetTriggerUnit()
set udg_SP_Point[paa] = GetSpellTargetLoc()
call UnitApplyTimedLife(dummy,'BFTL',4)
call SetUnitFacingToFaceLocTimed(spirit,udg_SP_Point[paa],0)
set dummy = null
call SetUnitAnimation(a,"alternate stand")
loop
exitwhen(loopa>=8)
set scale = scale+0.31
call SetUnitScale(spirit,scale,scale,scale)
set dummy = CreateUnit(pa,'e005',x,y,face)
call UnitApplyTimedLife(dummy,'BFTL',0.5)
set dummy = null
set dummy = CreateUnit(pa,'e006',x,y,face)
call UnitApplyTimedLife(dummy,'BFTL',0.5)
set dummy = null
call TriggerSleepAction(0.5)
set loopa = loopa+1
endloop
call SetUnitPosition(spirit,x,y)
call SetUnitAnimationByIndex(a,11)
call GroupAddUnit(udg_SP,spirit)
set spirit = null
endfunction
//===========================================================================
function InitTrig_Spirit_Bomb takes nothing returns nothing
set gg_trg_Spirit_Bomb = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Spirit_Bomb, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Spirit_Bomb, Condition( function Trig_Spirit_Bomb_Conditions ) )
call TriggerAddAction( gg_trg_Spirit_Bomb, function Trig_Spirit_Bomb_Actions )
endfunction
//TESH.scrollpos=-1
//TESH.alwaysfold=0
function Trgg takes nothing returns nothing
local integer s = udg_SP_integer
local unit a = udg_SP_Caster[s]
local unit w = GetEnumUnit()
local real damage = ((1*GetUnitAbilityLevel(a,'A002'))+2.5)* GetHeroStatBJ(bj_HEROSTAT_STR,a,true)
if ( IsUnitEnemy(w,GetOwningPlayer(a))) then
call UnitDamageTargetBJ(a,w,damage,ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL)
endif
set a = null
set w = null
endfunction
function Trig_Spirit_Bomb_loop_Func001A takes nothing returns nothing
local unit a =GetEnumUnit()
local real x = GetUnitX(a)
local real y = GetUnitY(a)
local player pa = GetOwningPlayer(a)
local integer s = GetConvertedPlayerId(pa)
local location q = udg_SP_Point[s]
local real face = GetUnitFacing(a)
local group g
local real tx = x+25*Cos(face*bj_DEGTORAD)
local real ty = y+25*Sin(face*bj_DEGTORAD)
local unit dummy
if ( IsUnitInRangeLoc(a,udg_SP_Point[s],500)) then
call GroupRemoveUnit(udg_SP,a)
set dummy = CreateUnit(pa,'e008',x,y,face)
call UnitApplyTimedLife(dummy,'BFTL',1)
set dummy = CreateUnit(pa,'e009',x,y,face)
call UnitApplyTimedLife(dummy,'BFTL',1)
call RemoveUnit(a)
set g = GetUnitsInRangeOfLocAll(1000,q)
set udg_SP_integer = s
call ForGroup(g,function Trgg)
call RemoveLocation(q)
call DestroyGroup(g)
else
call SetUnitPosition(a,tx,ty)
endif
set a = null
endfunction
function Trig_Spirit_Bomb_loop_Actions takes nothing returns nothing
call ForGroupBJ( udg_SP, function Trig_Spirit_Bomb_loop_Func001A )
endfunction
//===========================================================================
function InitTrig_Spirit_Bomb_loop takes nothing returns nothing
set gg_trg_Spirit_Bomb_loop = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Spirit_Bomb_loop, 0.03 )
call TriggerAddAction( gg_trg_Spirit_Bomb_loop, function Trig_Spirit_Bomb_loop_Actions )
endfunction
//TESH.scrollpos=-1
//TESH.alwaysfold=0
function Trig_Solar_Flare_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A002' ) ) then
return false
endif
return true
endfunction
function Damage takes nothing returns nothing
local unit w = GetEnumUnit()
local unit a = udg_SF_Caster[udg_SF_integer]
local real x = GetUnitX(w)
local real y = GetUnitY(w)
local player pa = GetOwningPlayer(a)
local player paa = GetOwningPlayer(w)
local real face = GetUnitFacing(w)
local unit dummy = CreateUnit(pa,'e00B',x,y,face)
if ( IsUnitEnemy(dummy,paa))then
call UnitApplyTimedLife(dummy,'BFTL',1)
call UnitAddAbility(dummy,'A003')
call SetUnitAbilityLevel(dummy,'A003',GetUnitAbilityLevel(a,'A002'))
call IssueTargetOrder(dummy,"curse",w)
endif
set dummy = null
set w = null
endfunction
function Trig_Solar_Flare_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local real x = GetUnitX(a)
local real y = GetUnitY(a)
local player pa = GetOwningPlayer(a)
local real face = GetUnitFacing(a)
local integer s = GetConvertedPlayerId(pa)
local location q = GetUnitLoc(a)
local unit dummy = CreateUnit(pa,'e00A',x,y,face)
local group g = GetUnitsInRangeOfLocAll(800,q)
call SetUnitAnimationByIndex(a,14)
call UnitApplyTimedLife(dummy,'BFTL',1)
set udg_SF_Caster[s] = GetTriggerUnit()
set udg_SF_integer = GetConvertedPlayerId(pa)
call ForGroup(g,function Damage)
set dummy = null
call DestroyGroup(g)
call RemoveLocation(q)
endfunction
//===========================================================================
function InitTrig_Solar_Flare takes nothing returns nothing
set gg_trg_Solar_Flare = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Solar_Flare, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Solar_Flare, Condition( function Trig_Solar_Flare_Conditions ) )
call TriggerAddAction( gg_trg_Solar_Flare, function Trig_Solar_Flare_Actions )
endfunction
//TESH.scrollpos=-1
//TESH.alwaysfold=0
function Trig_Super_Saiyan_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A004' ) ) then
return false
endif
return true
endfunction
function Trig_Super_Saiyan_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local integer loopa = 1
local real x = GetUnitX(a)
local real y = GetUnitY(a)
local string sp = "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl"
local string spp = "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl"
loop
exitwhen(loopa>=20)
call DestroyEffect(AddSpecialEffect(sp,x,y))
call DestroyEffect(AddSpecialEffect(spp,x,y))
call TriggerSleepAction(0.10)
set loopa = loopa+1
endloop
set a = null
endfunction
//===========================================================================
function InitTrig_Super_Saiyan takes nothing returns nothing
set gg_trg_Super_Saiyan = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Super_Saiyan, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Super_Saiyan, Condition( function Trig_Super_Saiyan_Conditions ) )
call TriggerAddAction( gg_trg_Super_Saiyan, function Trig_Super_Saiyan_Actions )
endfunction
//TESH.scrollpos=-1
//TESH.alwaysfold=0
function Trig_Super_Kamehameha_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A005' ) ) then
return false
endif
return true
endfunction
function Trig_Super_Kamehameha_Actions takes nothing returns nothing
local unit a = GetTriggerUnit()
local location w = GetUnitLoc(a)
local real face = GetUnitFacing(a)
local real facee = face+80
local integer shnid = 'e00E'
local player pa = GetOwningPlayer(a)
local location q = PolarProjectionBJ(w,15,facee)
local unit shn = CreateUnitAtLoc(pa,shnid,q,face)
local integer s = GetConvertedPlayerId(pa)
local unit dummy
set udg_SK_Caster[s] = GetTriggerUnit()
set udg_SK_Player[s] = pa
set udg_SK_Point[s] = GetSpellTargetLoc()
call TriggerSleepAction(0.10)
call SetUnitAnimationByIndex(a,12)
call PauseUnit(a,true)
call UnitApplyTimedLife(shn,'BFTL',3.1)
set shn = null
call PlaySoundAtPointBJ(gg_snd_Goku_Kamehameha____With__Sound_Effect___2_u,100,w,0)
call TriggerSleepAction(3)
if ( IsUnitAliveBJ(a)) then
call SetUnitAnimationByIndex(a,13)
set dummy = CreateUnitAtLoc(pa,'e00C',q,face)
call SetUnitFacingToFaceLocTimed(dummy,udg_SK_Point[s],0)
call GroupAddUnit(udg_SK,dummy)
set dummy = null
endif
call RemoveLocation(w)
call RemoveLocation(q)
endfunction
//===========================================================================
function InitTrig_Super_Kamehameha takes nothing returns nothing
set gg_trg_Super_Kamehameha = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Super_Kamehameha, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Super_Kamehameha, Condition( function Trig_Super_Kamehameha_Conditions ) )
call TriggerAddAction( gg_trg_Super_Kamehameha, function Trig_Super_Kamehameha_Actions )
endfunction
//TESH.scrollpos=-1
//TESH.alwaysfold=0
function Sh takes nothing returns nothing
if ( not (udg_SK_Sh_integer == 0 ) )then
call CameraSetEQNoiseForPlayer(GetEnumPlayer(),5)
endif
endfunction
function Special_Destroyy takes nothing returns nothing
local unit a = GetEnumUnit()
call RemoveUnit(a)
set a = null
call GroupRemoveUnit(udg_SK_Special[udg_SK_integer],a)
endfunction
function Damage_Destroyy takes nothing returns nothing
local unit a = GetEnumUnit()
call GroupRemoveUnit(udg_SK_Tek_Vurus[udg_SK_integer],a)
set a = null
endfunction
function ggr takes nothing returns nothing
local unit a = GetEnumUnit()
local integer q = udg_SK_integer
local real damage = 5.1*GetHeroStatBJ(bj_HEROSTAT_STR,udg_SK_Caster[q],true)
if ( IsUnitEnemy(a,udg_SK_Player[q])) then
if ( not ( IsUnitInGroup(a,udg_SK_Tek_Vurus[q]))) then
call UnitDamageTargetBJ(udg_SK_Caster[q],a,damage,ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL)
call GroupAddUnit(udg_SK_Tek_Vurus[q],a)
endif
endif
set a = null
endfunction
function Group takes nothing returns nothing
local unit a = GetEnumUnit()
local player pa = GetOwningPlayer(a)
local integer s = GetConvertedPlayerId(pa)
local location q = GetUnitLoc(a)
local real x = GetUnitX(a)
local real y = GetUnitY(a)
local real face = GetUnitFacing(a)
local real tx = x+31*Cos(face*bj_DEGTORAD)
local real ty = y+31*Sin(face*bj_DEGTORAD)
local unit dummy
local group g = GetUnitsInRangeOfLocAll(350,q)
local group gr = GetUnitsInRangeOfLocAll(800,q)
set udg_SK_integer = s
if ( IsUnitInRangeLoc(a,udg_SK_Point[s],400)) then
call KillUnit(a)
call GroupRemoveUnit(udg_SK,a)
set dummy = CreateUnit(pa,'e00F',x,y,face)
set udg_SK_Sh_integer = udg_SK_Sh_integer+1
call ForForce(GetPlayersAll(),function Sh)
call ForGroup(gr,function ggr)
call ForGroup(udg_SK_Special[s],function Special_Destroyy)
call ForGroup(udg_SK_Tek_Vurus[s],function Damage_Destroyy)
call PauseUnit(udg_SK_Caster[s],false)
set udg_SK_Caster[s] = null
call RemoveLocation(udg_SK_Point[s])
set dummy = CreateUnit(pa,'e00G',x,y,face)
call UnitApplyTimedLife(dummy,'BFTL',4)
set dummy = null
else
set dummy = CreateUnit(pa,'e00D',x,y,face)
call SetUnitPosition(a,tx,ty)
call GroupAddUnit(udg_SK_Special[s],dummy)
call ForGroup(g,function ggr)
endif
call RemoveLocation(q)
call DestroyGroup(g)
call DestroyGroup(gr)
endfunction
function Super_Kamehameha_loop_Actions takes nothing returns nothing
call ForGroup(udg_SK,function Group)
endfunction
//===========================================================================
function InitTrig_Super_Kamehameha_loop takes nothing returns nothing
set gg_trg_Super_Kamehameha_loop = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Super_Kamehameha_loop, 0.03 )
call TriggerAddAction( gg_trg_Super_Kamehameha_loop, function Super_Kamehameha_loop_Actions )
endfunction
//TESH.scrollpos=-1
//TESH.alwaysfold=0
function Trig_Untitled_Trigger_001_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'e00G' ) ) then
return false
endif
return true
endfunction
function pgs takes nothing returns nothing
call CameraClearNoiseForPlayer(GetEnumPlayer())
endfunction
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
set udg_SK_Sh_integer = udg_SK_Sh_integer-1
if ( udg_SK_Sh_integer == 0) then
call ForForce(GetPlayersAll(),function pgs)
endif
endfunction
//===========================================================================
function InitTrig_Super_Kamehameha_sh takes nothing returns nothing
set gg_trg_Super_Kamehameha_sh = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Super_Kamehameha_sh, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Super_Kamehameha_sh, Condition( function Trig_Untitled_Trigger_001_Conditions ) )
call TriggerAddAction( gg_trg_Super_Kamehameha_sh, function Trig_Untitled_Trigger_001_Actions )
endfunction