Name | Type | is_array | initial_value |
Creep_Point | location | No | |
h | integer | No | |
H_Ability | abilcode | Yes | |
H_Angle | real | Yes | |
H_BigStone | unit | Yes | |
H_Cast_Point | location | Yes | |
H_Chibacu | unit | Yes | |
H_Index | integer | No | |
H_Index_Max | integer | No | |
H_Knockback_Time | integer | Yes | |
H_KnockBackGroup | group | Yes | |
H_Loop | integervar | No | |
H_Move | location | Yes | |
H_Mui | integer | No | |
H_Picked_Point | location | Yes | |
H_Picked_Unit | unit | Yes | |
H_Pickedunit2 | unit | Yes | |
H_PickUpGroup | group | Yes | |
H_Point1 | location | Yes | |
H_Point2 | location | Yes | |
H_RandomNumber | real | Yes | |
H_Small_Stone | unit | Yes | |
H_Speed1 | real | Yes | |
H_Speed2 | real | Yes | |
H_Spell | integer | Yes | |
H_Spell_Last | integer | Yes | |
H_Stone_Size | integer | Yes | |
H_Stones_Create | location | Yes | |
H_StonesRemove | group | Yes | |
H_unit | unit | Yes | |
table | hashtable | No |
//TESH.scrollpos=-1
//TESH.alwaysfold=0
function Trig_Spawn_Creeps_Actions takes nothing returns nothing
local unit spawned
local real vx = GetRandomReal(GetRectMinX(bj_mapInitialPlayableArea), GetRectMaxX(bj_mapInitialPlayableArea))
local real vy = GetRandomReal(GetRectMinY(bj_mapInitialPlayableArea), GetRectMaxY(bj_mapInitialPlayableArea))
set spawned = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE),ChooseRandomCreep(-1),vx,vy,0)
set spawned = null
endfunction
//===========================================================================
function InitTrig_Spawn_Creeps takes nothing returns nothing
local trigger createunits = CreateTrigger( )
call TriggerRegisterTimerEvent(createunits, 3.00, true)
call TriggerAddAction( createunits, function Trig_Spawn_Creeps_Actions )
set createunits = null
endfunction
//TESH.scrollpos=-1
//TESH.alwaysfold=0
function Trig_reset_Actions takes nothing returns nothing
local unit hero = gg_unit_H000_0001
call SetUnitState(hero, UNIT_STATE_LIFE, GetUnitState(hero, UNIT_STATE_MAX_LIFE) * RMaxBJ(0,100) * 0.01)
call SetUnitState(hero, UNIT_STATE_MANA, GetUnitState(hero, UNIT_STATE_MAX_MANA) * RMaxBJ(0,100) * 0.01)
call UnitResetCooldown( hero )
set hero = null
endfunction
//===========================================================================
function InitTrig_reset takes nothing returns nothing
local trigger resethero = CreateTrigger( )
call TriggerRegisterPlayerEvent(resethero, Player(0), EVENT_PLAYER_END_CINEMATIC)
call TriggerAddAction( resethero, function Trig_reset_Actions )
set resethero = null
endfunction
//TESH.scrollpos=-1
//TESH.alwaysfold=0
function Trig_Shinra_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A001'
endfunction
function shinragroup takes nothing returns nothing
local unit pickedd = GetEnumUnit ()
local unit shinra = LoadUnitHandle(udg_table,udg_h,1)
local group damaged = LoadGroupHandle(udg_table,udg_h,6)
local real sx = LoadReal(udg_table,udg_h,2)
local real sy = LoadReal(udg_table,udg_h,3)
local real gx = GetUnitX(pickedd)
local real gy = GetUnitY(pickedd)
local real angled = bj_RADTODEG * Atan2(gy - sy, gx - sx)
local real x = gx + 32 * Cos(angled * bj_DEGTORAD)
local real y = gy + 32 * Sin(angled * bj_DEGTORAD)
if IsUnitType(pickedd, UNIT_TYPE_STRUCTURE) == false and IsUnitAlly(pickedd, GetOwningPlayer(shinra)) == false then
call SetUnitPosition(pickedd,x,y)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",gx,gy))
endif
if IsUnitInGroup(pickedd, damaged) == false and IsUnitAlly(pickedd, GetOwningPlayer(shinra)) == false then
call GroupAddUnit(damaged,pickedd)
call UnitDamageTarget(shinra,pickedd,(125 * I2R(GetUnitAbilityLevel(shinra,'A001'))),true,false,ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
endif
set shinra = null
set pickedd = null
set damaged = null
endfunction
function shinradamage takes nothing returns boolean
return true
endfunction
function takenn takes nothing returns nothing
local timer n = GetExpiredTimer ()
local unit shinra = LoadUnitHandle(udg_table,GetHandleId(n),1)
local real sx = LoadReal(udg_table,GetHandleId(n),2)
local real sy = LoadReal(udg_table,GetHandleId(n),3)
local effect ss = LoadEffectHandle(udg_table,GetHandleId(n),4)
local real expire = LoadReal(udg_table,GetHandleId(n),5)
local group s
if expire <= 0 then
call SetUnitTimeScale(shinra, 100 * 0.01)
call PauseUnit(shinra,false)
call DestroyEffect(ss)
call DestroyGroup(LoadGroupHandle(udg_table,GetHandleId(n),6))
call FlushChildHashtable(udg_table,GetHandleId(n))
set n = null
set shinra = null
set ss = null
set s = null
call DestroyTimer(GetExpiredTimer())
else
call SaveReal(udg_table,GetHandleId(n),5,expire - 2.00)
set udg_h = GetHandleId(n)
set s = CreateGroup ()
call GroupEnumUnitsInRange(s,sx,sy,600,function shinradamage)
call ForGroup(s,function shinragroup)
call DestroyGroup(s)
set n = null
set shinra = null
set ss = null
set s = null
endif
endfunction
function Trig_Shinra_Actions takes nothing returns nothing
local timer n = CreateTimer ()
local unit shinra = GetTriggerUnit ()
local real sx = GetUnitX(shinra)
local real sy = GetUnitY(shinra)
local real expire = 34.00
local effect ss
local group damaged = CreateGroup ()
set ss = AddSpecialEffectTarget ("cronosphere.mdl",shinra,"origin" )
call PauseUnit(shinra,true)
call SetUnitTimeScale(shinra, 200 * 0.01)
call SetUnitAnimation( shinra, "Spell One" )
call SaveUnitHandle(udg_table,GetHandleId(n),1,shinra)
call SaveReal(udg_table,GetHandleId(n),2,sx)
call SaveReal(udg_table,GetHandleId(n),3,sy)
call SaveEffectHandle(udg_table,GetHandleId(n),4,ss)
call SaveReal(udg_table,GetHandleId(n),5,expire)
call SaveGroupHandle(udg_table,GetHandleId(n),6,damaged)
call TimerStart(n,0.02,true,function takenn)
set n = null
set shinra = null
set ss = null
endfunction
//===========================================================================
function InitTrig_Shinra takes nothing returns nothing
local trigger shinrar = CreateTrigger( )
call Preload("cronosphere.mdl")
call Preload("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl")
call TriggerRegisterAnyUnitEventBJ( shinrar , EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( shinrar , Condition( function Trig_Shinra_Conditions ) )
call TriggerAddAction( shinrar , function Trig_Shinra_Actions )
set shinrar = null
endfunction
//TESH.scrollpos=-1
//TESH.alwaysfold=0
function Trig_Bansho_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A000'
endfunction
function banshomove takes nothing returns nothing
local timer b = GetExpiredTimer ()
local unit pain = LoadUnitHandle(udg_table,GetHandleId(b),1)
local unit target = LoadUnitHandle(udg_table,GetHandleId(b),2)
local real px = LoadReal(udg_table,GetHandleId(b),3)
local real py = LoadReal(udg_table,GetHandleId(b),4)
local real tx = GetUnitX(target)
local real ty = GetUnitY(target)
local real angles = LoadReal(udg_table,GetHandleId(b),5)
local real x = tx + 30 * Cos(angles * bj_DEGTORAD)
local real y = ty + 30 * Sin(angles * bj_DEGTORAD)
local real wx
local real wy
local group g
call SetUnitPosition(target,x,y)
set wx = tx - px
set wy = ty - py
if SquareRoot(wx * wx + wy * wy) <= 125 then
call UnitDamageTarget(pain,target,(75 * I2R(GetUnitAbilityLevel(pain,'A000'))),true,false,ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS)
call PauseUnit(pain,false)
call PauseUnit(target,false)
call SetUnitPathing(target,true)
call FlushChildHashtable(udg_table,GetHandleId(b))
set g = null
set b = null
set pain = null
set target = null
call DestroyTimer(GetExpiredTimer())
else
call SetUnitFacing(target,angles)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",tx,ty))
set b = null
set pain = null
set target = null
endif
endfunction
function Trig_Bansho_Actions takes nothing returns nothing
local timer b = CreateTimer ()
local unit pain = GetTriggerUnit ()
local unit target = GetSpellTargetUnit ()
local real px = GetUnitX(pain)
local real py = GetUnitY(pain)
local real tx = GetUnitX(target)
local real ty = GetUnitY(target)
local real angles = bj_RADTODEG * Atan2 (py - ty, px - tx)
call PauseUnit(pain,true)
call PauseUnit(target,true)
call SetUnitPathing(target,false)
call SetUnitAnimation(pain, "Spell")
call SaveUnitHandle(udg_table,GetHandleId(b),1,pain)
call SaveUnitHandle(udg_table,GetHandleId(b),2,target)
call SaveReal(udg_table,GetHandleId(b),3,px)
call SaveReal(udg_table,GetHandleId(b),4,py)
call SaveReal(udg_table,GetHandleId(b),5,angles)
call TimerStart(b,0.03,true,function banshomove)
set b = null
set pain = null
set target = null
endfunction
//===========================================================================
function InitTrig_Bansho takes nothing returns nothing
local trigger banshop = CreateTrigger( )
call Preload("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl")
call TriggerRegisterAnyUnitEventBJ( banshop, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( banshop, Condition( function Trig_Bansho_Conditions ) )
call TriggerAddAction( banshop, function Trig_Bansho_Actions )
set banshop = null
endfunction
//TESH.scrollpos=-1
//TESH.alwaysfold=0
function Trig_Rinnegan_Conditions takes nothing returns boolean
return GetUnitAbilityLevel(GetTriggerUnit(), 'B000') > 0 and ( GetRandomInt(1, 100) <= 17 )
endfunction
function rineganpush takes nothing returns nothing
local timer w = GetExpiredTimer ()
local unit attacker = LoadUnitHandle(udg_table,GetHandleId(w),1)
local unit attacked = LoadUnitHandle(udg_table,GetHandleId(w),2)
local real timeleft = LoadReal(udg_table,GetHandleId(w),3)
local real ax = GetUnitX(attacker)
local real ay = GetUnitY(attacker)
local real dx = GetUnitX(attacked)
local real dy = GetUnitY(attacked)
local real angle = bj_RADTODEG * Atan2(dy - ay, dx - ax)
local real x = dx + 27 * Cos(angle * bj_DEGTORAD)
local real y = dy + 27 * Sin(angle * bj_DEGTORAD)
call SetUnitPosition(attacked,x,y)
if timeleft <= 0 then
call PauseUnit(attacked,false)
call SetUnitPathing(attacked,true)
call FlushChildHashtable(udg_table,GetHandleId(w))
set w = null
set attacker = null
set attacked = null
call DestroyTimer(GetExpiredTimer())
else
call SaveReal(udg_table,GetHandleId(w),3,timeleft - 2)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",dx,dy))
set w = null
set attacker = null
set attacked = null
endif
endfunction
function Trig_Rinnegan_Actions takes nothing returns nothing
local timer w = CreateTimer()
local unit attacker = GetTriggerUnit ()
local unit attacked = GetAttacker ()
local real timeleft = 10
call PauseUnit(attacked,true)
call SetUnitPathing(attacked,false)
call SaveUnitHandle(udg_table,GetHandleId(w),1,attacker)
call SaveUnitHandle(udg_table,GetHandleId(w),2,attacked)
call SaveReal(udg_table,GetHandleId(w),3,timeleft)
call TimerStart(w,0.02,true,function rineganpush)
set w = null
set attacker = null
set attacked = null
endfunction
//===========================================================================
function InitTrig_Rinnegan takes nothing returns nothing
local trigger Rinnegan = CreateTrigger( )
call Preload("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl")
call TriggerRegisterAnyUnitEventBJ( Rinnegan, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( Rinnegan, Condition( function Trig_Rinnegan_Conditions ) )
call TriggerAddAction( Rinnegan, function Trig_Rinnegan_Actions )
set Rinnegan = null
endfunction