constant function JassBoolFilter takes nothing returns boolean
return TRUE
endfunction
constant function DD_Ptr takes handle h returns integer
return h
return 0
endfunction
constant function ToRegion takes integer pointer returns region
return pointer
return null
endfunction
constant function GetDummyFilter takes nothing returns filterfunc
return udg_this_filter
return null
endfunction
constant function DD_Mod takes integer a, integer b returns integer
return (a - (a/b) * b)
endfunction
function DD_PlayPortal takes location where, string id returns nothing
local sound s = null
if (id == "birth") then
set s = CreateSound( "Sound\\Ambient\\DoodadEffects\\ShimmeringPortalBirth.wav", false, true, true, 10, 10, "DefaultEAXON" )
call SetSoundParamsFromLabel( s, "ShimmeringPortalBirth" )
elseif (id == "death") then
set s = CreateSound( "Sound\\Ambient\\DoodadEffects\\ShimmeringPortalDeath.wav", false, true, true, 10, 10, "DefaultEAXON" )
call SetSoundDuration( s, 8529 )
call SetSoundParamsFromLabel( s, "ShimmeringPortalDeath" )
elseif (id == "enter") then
set s = CreateSound( "Sound\\Ambient\\DoodadEffects\\ShimmeringPortalEntrance.wav", false, true, true, 10, 10, "DefaultEAXON" )
call SetSoundParamsFromLabel( s, "EnterShimmeringPortal" )
call SetSoundDuration( s, 1829 )
endif
if (where == null) then
call SetSoundPosition(s, 0., 0., 0.)
call SetSoundVolume(s, 1)
call StartSound(s)
call KillSoundWhenDone(s)
set s = null
return
endif
call SetSoundPosition(s, GetLocationX(where), GetLocationY(where), 0.)
call StartSound(s)
call KillSoundWhenDone(s)
set bj_lastPlayedSound = s
set s = null
endfunction
constant function this_id takes handle obj returns integer
return DD_Mod( DD_Ptr( obj ), JASS_MAX_ARRAY_SIZE )
endfunction
constant function Min4 takes real a, real b, real c, real d returns real
if (a < b and a < c and a < d) then
return a
elseif (b < c and b < d) then
return b
elseif (c < d) then
return c
endif
return d
endfunction
constant function Max4 takes real a, real b, real c, real d returns real
if (a > b and a > c and a > d) then
return a
elseif (b > c and b > d) then
return b
elseif (c > d) then
return c
endif
return d
endfunction
constant function GetTriggeringRect takes nothing returns rect
return udg_Temp_Trig_Rect[this_id(GetTriggeringRegion())]
endfunction
function TeleportUnitActions takes nothing returns nothing
local unit u = GetTriggerUnit()
local real x
local real y
local rect r
local real d
local location l
local integer id = this_id(GetTriggeringTrigger())
local real rad
// No flying units or is unit dead?
if ((IsUnitType(u, UNIT_TYPE_FLYING) and not udg_Portal_AllowFlyingUnits) or IsUnitType(u, UNIT_TYPE_DEAD)) then
set u = null
return
endif
// Unit is teleported
if (udg_SP_UnitTeleported[this_id(u)]) then
set udg_SP_UnitTeleported[this_id(u)] = false
set u = null
return
endif
set udg_SP_UnitTeleported[this_id(u)] = true
// First portal is entred
set r = GetTriggeringRect()
if (r == udg_SP_Rect1[id]) then
set r = udg_SP_Rect2[id]
else
// Second portal is entred
set r = udg_SP_Rect1[id]
endif
set rad = GetUnitFacing(u) * bj_DEGTORAD
set x = GetRandomReal(GetRectMinX(r), GetRectMaxX(r))
set y = GetRandomReal(GetRectMinY(r), GetRectMaxY(r))
if (IsTerrainPathable(x, y, PATHING_TYPE_WALKABILITY)) then
set u = null
set r = null
return
endif
set l = Location(GetUnitX(u), GetUnitY(u))
call DD_PlayPortal(l, "enter")
if (udg_Portal_EffectOnEnter != "") then
call DestroyEffect(AddSpecialEffectLoc(udg_Portal_EffectOnEnter, l))
endif
call RemoveLocation(l)
call SetUnitPosition(u, x, y)
set d = GetRandomReal(150., 200.)
call IssuePointOrder(u, "move", x+d*Cos(rad), y+d*Sin(rad))
if (udg_Portal_PanCamera) then
if (GetLocalPlayer() == GetOwningPlayer(u)) then
call PanCameraToTimed(x, y, 0.05)
endif
endif
if (udg_Portal_EffectOnExit != "") then
call DestroyEffect(AddSpecialEffect(udg_Portal_EffectOnExit, x, y))
endif
set u = null
set r = null
set l = null
endfunction
function TriggerRegisterUnitEnterPortal takes trigger t, location where, real angle, integer var returns event
local real x = GetLocationX(where)
local real y = GetLocationY(where)
local real w = udg_Portal_Weight
local real h = udg_Portal_Height
local real d = SquareRoot(0.25*((w*w)+(h*h)))
local real rad = Atan(h/w)
local real x1 = x + d * Cos(angle+rad)
local real y1 = y + d * Sin(angle+rad)
local real x2 = x - d * Cos(angle-rad)
local real y2 = y - d * Sin(angle-rad)
local real x3 = x - d * Cos(angle+rad)
local real y3 = y - d * Sin(angle+rad)
local real x4 = x + d * Cos(angle-rad)
local real y4 = y + d * Sin(angle-rad)
local real minx = Min4(x1, x2, x3, x4)
local real miny = Min4(y1, y2, y3, y4)
local real maxx = Max4(x1, x2, x3, x4)
local real maxy = Max4(y1, y2, y3, y4)
local integer id = this_id(t)
if (var == 0) then
set udg_SP_Region1[id] = DD_Ptr(CreateRegion())
set udg_SP_Rect1[id] = Rect(minx, miny, maxx, maxy)
set udg_Temp_Trig_Rect[DD_Mod(udg_SP_Region1[id], JASS_MAX_ARRAY_SIZE)] = udg_SP_Rect1[id]
call RegionAddRect(ToRegion(udg_SP_Region1[id]), udg_SP_Rect1[id])
return TriggerRegisterEnterRegion(t, ToRegion(udg_SP_Region1[id]), GetDummyFilter())
else
set udg_SP_Region2[id] = DD_Ptr(CreateRegion())
set udg_SP_Rect2[id] = Rect(minx, miny, maxx, maxy)
set udg_Temp_Trig_Rect[DD_Mod(udg_SP_Region2[id], JASS_MAX_ARRAY_SIZE)] = udg_SP_Rect2[id]
call RegionAddRect(ToRegion(udg_SP_Region2[id]), udg_SP_Rect2[id])
return TriggerRegisterEnterRegion(t, ToRegion(udg_SP_Region2[id]), GetDummyFilter())
endif
return (null)
endfunction
constant function DD_TOTA takes integer pointer returns triggeraction
return pointer
return null
endfunction
function DeallocateMemory takes trigger t returns nothing
local integer id = this_id(t)
call RemoveRegion(ToRegion(udg_SP_Region1[id]))
call RemoveRegion(ToRegion(udg_SP_Region2[id]))
call RemoveRect(udg_SP_Rect1[id])
call RemoveRect(udg_SP_Rect2[id])
call TriggerRemoveAction(t, DD_TOTA(udg_SP_TriggerAction[id]))
call DestroyTrigger(t)
set udg_SP_Rect1[id] = null
set udg_SP_Rect2[id] = null
endfunction
function TriggerRegisterGenericPortalEvent takes trigger t, playerunitevent pe returns event
local integer i = 0
loop
exitwhen (i >= bj_MAX_PLAYER_SLOTS)
call TriggerRegisterPlayerUnitEvent(t, Player(i), pe, GetDummyFilter())
set i = i + 1
endloop
return (null)
endfunction
Name | Type | is_array | initial_value |
AAHakkeNumbers | integer | No | |
acounter | integer | No | |
Angle | real | No | |
angle | real | No | |
AngleLoop | real | No | |
arrayfilled | boolean | Yes | |
BladeUnitGroup | group | No | |
BlowCountera | integer | No | |
BRCaster | unit | No | |
BRSF | effect | No | |
BRTarget | unit | No | |
caster | unit | No | |
Caster | unit | No | |
caster_mist | unit | No | |
Caster_NightmareStrike | unit | No | |
Caster_shadow | unit | No | |
Caster_Unit | unit | No | |
CasterNumber | integer | No | |
CasterPoint | location | No | |
Casters | unit | Yes | |
CastingUnit | unit | Yes | |
Cha_Caster | unit | No | |
Cha_Special | effect | Yes | |
Cha_Target | unit | No | |
Chidori_Caster | unit | Yes | |
Chidori_Target | unit | Yes | |
ChidoriCaster | unit | No | |
ChidoriCaster2 | unit | No | |
ChidoriOrb | effect | No | |
ChidoriPointArray | location | Yes | |
ChidoriRealArray | real | Yes | |
ChidoriTarget | unit | No | |
Creep_Point | location | Yes | |
Damage | real | Yes | |
DamagedGroup | group | No | |
DemGeholfenWird | unit | No | |
DemonSpirit_Effect | unit | No | |
dum | unit | No | |
Dummys | unit | Yes | |
EarthCaster | unit | No | |
EarthTar | unit | No | |
effect | effect | Yes | |
EffectPoint | location | No | |
Enemy_Little_Fireballs | unit | No | |
Eye_Angle | real | No | |
Eye_Attack_Group | group | No | |
Eye_Caster | unit | No | |
Eye_Dummy | unit | No | |
Eye_Fade | real | No | |
Eye_Group | group | No | |
Eye_Players | force | No | |
Eye_Point | location | No | |
Eye_Target | unit | No | |
Fury | location | Yes | |
GeyserCasters | group | No | |
GeyserPoint | location | Yes | |
guk | group | No | |
henge_unit | unit | No | |
Hero | unit | Yes | |
HR_AbilatyForEffect | abilcode | Yes | |
HR_AnimationCaster | string | Yes | |
HR_AnimationInteger | integer | No | |
HR_AnimationTarget | string | Yes | |
HR_AttacksAllredyDealed | integer | Yes | |
HR_AttacksDealed | integer | Yes | |
HR_AttackSpeed | real | Yes | |
HR_AttackType | attacktype | Yes | |
HR_Aura | unit | Yes | |
HR_Caster | unit | Yes | |
HR_Damage | real | Yes | |
HR_DamageType | damagetype | Yes | |
HR_DebugGroup | group | Yes | |
HR_Distanceaa | real | Yes | |
HR_IncreaseSpeed | real | Yes | |
HR_Integers | integer | Yes | |
HR_Invulnerable | boolean | Yes | |
HR_ManaStolen | real | Yes | |
HR_PlayerLeak | force | No | |
HR_Real | real | Yes | |
HR_SFX1 | string | Yes | |
HR_SFX2 | string | Yes | |
HR_ShowHitsAndIncrease | integer | Yes | |
HR_SpecialHitsCount | integer | No | |
HR_StartingAnimSpeed | real | Yes | |
HR_Target | unit | Yes | |
HR_Text | string | Yes | |
HR_TimeForAttack | real | Yes | |
HRS_AbilatyForEffect | abilcode | No | |
HRS_Animations | string | Yes | |
HRS_AttacksDealed | integer | No | |
HRS_AttackType | attacktype | No | |
HRS_Damage | real | No | |
HRS_DamageType | damagetype | No | |
HRS_HitsDealed64 | boolean | No | |
HRS_IncreaseSpeed | real | No | |
HRS_Invulnerable | boolean | No | |
HRS_ManaStolen | real | No | |
HRS_SFX1 | string | No | |
HRS_SFX2 | string | No | |
HRS_StartCDAttack | real | No | |
HRS_StartingAnimSpeed | real | No | |
HRS_Text | string | No | |
IceNeedlesCaster | unit | No | |
IceNeedlesDummy | unit | No | |
IceNeedlesPoint | location | No | |
Itachi_LittleFireball_Caster | unit | No | |
Jumper | unit | No | |
JumpStunDummy | unit | No | |
KB_Angle | real | Yes | |
KB_Casters | unit | Yes | |
KB_CountBuffs | integer | No | |
KB_DestroyTrees | boolean | Yes | |
KB_Effects_1 | string | Yes | |
KB_Effects_2 | string | Yes | |
KB_GeneralIntegers | integer | Yes | |
KB_KnockbackedUnits | group | No | |
KB_Levels | integer | Yes | |
KB_MaxDistance | real | Yes | |
KB_ReachedDistance | real | Yes | |
KB_ReducedReal | real | No | |
KB_ReduceSpeedReal | real | Yes | |
KB_SpecificSpeed | real | Yes | |
KB_StartPositions | location | Yes | |
KB_TempPoint | location | Yes | |
KB_TempReal | real | No | |
KB_TotalKnockUnits | integer | No | |
KB_Units | unit | Yes | |
KBA_Caster | unit | No | |
KBA_DestroyTrees | boolean | No | |
KBA_DistancePerLevel | real | No | |
KBA_Level | integer | No | |
KBA_SpecialEffects | string | Yes | |
KBA_Speed | real | No | |
KBA_StartingPosition | location | No | |
KBA_TargetUnit | unit | No | |
KY_Boolean | boolean | Yes | |
KY_Cast | unit | Yes | |
KY_Derege | real | Yes | |
KY_Target | unit | Yes | |
LeeTarget | unit | No | |
LittleFireballs | unit | Yes | |
LOC | location | Yes | |
log | unit | No | |
Loop | integer | Yes | |
LotusAngle | real | No | |
LotusCaster | unit | No | |
LotusDummy | unit | No | |
LotusFade | real | No | |
LotusPoint | location | No | |
LotusTarget | unit | No | |
lpoint | location | No | |
LS_Dummy | unit | No | |
LS_GeneralInteger | integer | No | |
LS_Groups | group | Yes | |
LS_TempPoint | location | Yes | |
mist | unit | No | |
MovePoint | location | No | |
MoveToPoint | location | No | |
Naruto | unit | No | |
NarutoRendanCaster | unit | No | |
NarutoRendanGroup | group | No | |
NarutoRendanOn | boolean | No | |
NarutoRendanPoint | location | No | |
NarutoRendanTarget | unit | No | |
NearbyDamagedTargetNightmare | unit | No | |
Number_Of_Souls | integer | No | |
Player_Integer | integer | No | |
point | location | No | |
point2 | location | No | |
PointLeak | location | No | |
PointLeak2 | location | Yes | |
Portal_AllowFlyingUnits | boolean | No | |
Portal_CastTime | real | Yes | |
Portal_Duration | real | Yes | |
Portal_EffectOnEnter | string | No | |
Portal_EffectOnExit | string | No | |
Portal_Height | real | No | |
Portal_PanCamera | boolean | No | |
Portal_Weight | real | No | |
PositionNaruto | location | No | |
PositionTarg | location | No | |
PositionVictim | location | No | |
poto | integer | No | 1 |
RandomHero | unitcode | Yes | |
RandomNumber | integer | No | |
RasenganCaster | unit | No | |
RasenganClone | unit | No | |
RasenganTarget | unit | No | |
Real | real | Yes | |
RealCriecle | real | No | |
Reanimated | unit | No | |
SF | effect | Yes | |
sharingan | unit | No | |
sharingan_ability | abilcode | No | |
Soul_Effect | effect | Yes | |
Soul_Misile | unit | No | |
Soul_Missile | unit | No | |
Soulless | group | No | |
SP_Ang | real | No | |
SP_Finished | boolean | Yes | |
SP_Id | integer | No | |
SP_Level | integer | No | |
SP_Portal1 | destructable | No | |
SP_Portal2 | destructable | No | |
SP_PORTAL_BIRTH_TIMEOUT | real | No | 6.00 |
SP_Portal_ById1 | destructable | Yes | |
SP_Portal_ById2 | destructable | Yes | |
SP_PORTAL_DEATH_TIMEOUT | real | No | 5.77 |
SP_PortalBirth1 | sound | Yes | |
SP_PortalBirth2 | sound | Yes | |
SP_Rect1 | rect | Yes | |
SP_Rect2 | rect | Yes | |
SP_Region1 | integer | Yes | |
SP_Region2 | integer | Yes | |
SP_Temp_Point1 | location | No | |
SP_Temp_Point2 | location | No | |
SP_Trigger | trigger | No | |
SP_TriggerAction | integer | Yes | |
SP_UnitTeleported | boolean | Yes | |
SP_Visibility | fogmodifier | No | |
Specialefect | effect | No | |
SpellPoint | location | No | |
Sprite | string | Yes | |
Stolen_Unit | unit | Yes | |
targ | unit | No | |
target | unit | No | |
Target | unit | No | |
Target_NightmareEffect | effect | No | |
Target_NightmareStrike | unit | No | |
target_shadow | unit | No | |
TargetPoint | location | No | |
targetpos | rect | No | |
tdef | terraindeformation | No | |
Temp_Integer | integer | No | |
Temp_Trig_Rect | rect | Yes | |
TempGroup | group | No | |
TempGroup2 | group | No | |
TempInteger | integer | No | |
TempLocA | location | No | |
TempLocB | location | No | |
TempPoint | location | No | |
TempPoint1 | location | No | |
TempPoint2 | location | No | |
TempPoint3 | location | No | |
TempUnit | unit | No | |
this_filter | integer | No | |
Traget | unit | No | |
Unitcasting | unit | No | |
Units | unit | Yes | |
Victim | unit | No | |
Water_Angle | real | No | |
Water_Caser | unit | No | |
Water_Caster_Position | location | No | |
Water_Dummy | unit | No | |
Water_Leak_Position | location | No | |
Water_Player | player | No | |
Water_Position | location | No | |
WhirlPools | group | No |