Name | Type | is_array | initial_value |
AAD_AbilityIndex | integer | Yes | |
ABE_AbilityIndex | integer | Yes | |
ABE_AoE | real | Yes | |
ABE_LatchRange | real | Yes | |
ABF_AbilityIndex | integer | Yes | |
ABF_Config_Damage | real | Yes | |
ABF_Config_Duration | real | Yes | |
ABF_Damage | real | Yes | |
ABF_Duration | real | Yes | |
ABO_AbilityIndex | integer | Yes | |
ACA_AbilityIndex | integer | No | |
ACA_Config_IntegerCheck | integer | Yes | |
ACAN_AbilityIndex | integer | No | |
ACAN_Caster | unit | No | |
ACAN_Config_Heal | real | Yes | |
ACAN_Heal | real | No | |
ACG_AbilityIndex | integer | Yes | |
ACG_Config_Damage | real | Yes | |
ACG_Damage | real | Yes | |
ACHR_AbilityIndex | integer | Yes | |
ACHR_Config_Duration | real | Yes | |
ACHR_Duration | real | Yes | |
ACR_AbilityIndex | integer | Yes | |
ACR_Caster | unit | No | |
ACS_AbilityIndex | integer | No | |
ACS_Config_AoE | real | Yes | |
ACS_Group | group | No | |
ACT_AbilityIndex | integer | No | |
ACT_Config_Duration | real | Yes | |
ACT_Dummy | unit | No | |
ACT_Duration | real | No | |
AD_Angle | real | Yes | |
AD_Arrow | unit | Yes | |
AD_Boolean | boolean | Yes | |
AD_Caster | unit | Yes | |
AD_DefaultHeight | real | Yes | |
AD_Distance | real | Yes | |
AD_Distance2 | real | Yes | |
AD_DistanceKeeper | unit | Yes | |
AD_DistanceTravelled | real | Yes | |
AD_Group | group | No | |
AD_MaxIndex | integer | No | |
AD_PickedUnits | unit | No | |
AD_Player | player | Yes | |
AD_RandomUnit | unit | No | |
AD_TempIndex | integer | No | |
AD_TempInteger | integer | Yes | |
AD_TempPoint | location | No | |
AD_TempPoint2 | location | No | |
AD_TempPoint3 | location | No | |
AD_TempPoint4 | location | No | |
AD_TotalDistance | real | No | |
AD_UnitsInGroup | integer | No | |
ADB_AbilityIndex | integer | No | |
ADB_Config_Damage | real | Yes | |
ADC_AbilityIndex | integer | Yes | |
AE_AbilityIndex | integer | No | |
AFL_AbilityIndex | integer | Yes | |
AFL_Angle | real | No | |
AFL_Caster | unit | Yes | |
AFL_Config_Gravity | real | Yes | |
AFL_Duration | real | Yes | |
AFL_Gravity | real | Yes | |
AFL_Group | group | No | |
AFL_MaxIndex | integer | No | |
AFL_PickedUnits | unit | No | |
AFL_Player | player | Yes | |
AFL_TempIndex | integer | No | |
AFL_TempPoint | location | No | |
AFL_TempPoint2 | location | No | |
AFL_TempPoint3 | location | No | |
AFO_AbilityIndex | integer | Yes | |
AFO_Config_Damage | real | Yes | |
AFO_Damage | real | Yes | |
AFR_AbilityIndex | integer | Yes | |
AFR_CasterDamage | real | Yes | |
AFR_Config_CasterDamage | real | Yes | |
AFR_Config_WolfDamage | real | Yes | |
AFR_WolfDamage | real | Yes | |
AGOD_AbilityIndex | integer | Yes | |
AGOD_Config_Damage | real | Yes | |
AGOD_Damage | real | Yes | |
AHD_AbilityIndex | integer | Yes | |
AHD_Config_Heal | real | Yes | |
AHD_Heal | real | Yes | |
AIB_AbilityIndex | integer | Yes | |
AIB_Config_ShardCount | integer | Yes | |
AIC_Angle | real | Yes | |
AIC_Caster | unit | Yes | |
AIC_Group | group | No | |
AIC_MaxIndex | integer | No | |
AIC_PickedUnits | unit | No | |
AIC_Player | player | Yes | |
AIC_RandomOffset | real | No | |
AIC_TempIndex | integer | No | |
AIC_TempPoint | location | No | |
AIC_TempPoint2 | location | No | |
AIN_AbilityIndex | integer | Yes | |
AIN_Config_Damage | real | Yes | |
AIN_Config_Duration | real | Yes | |
AIN_Damage | real | Yes | |
AIN_Duration | real | Yes | |
ALL_AbilityIndex | integer | Yes | |
ALL_Duration | real | Yes | |
ALS_AbilityIndex | integer | Yes | |
ALS_Config_Duration | real | Yes | |
ALS_Config_Heal | real | Yes | |
ALS_Duration | real | Yes | |
ALS_Heal | real | Yes | |
AMC_AbilityIndex | integer | Yes | |
AMP_AbilityIndex | integer | Yes | |
AMP_Bounces | integer | Yes | |
AMP_Config_Bounces | integer | Yes | |
AMP_Config_Damage | real | Yes | |
AMP_Damage | real | Yes | |
ANH_AbilityIndex | integer | No | |
ANP_AbilityIndex | integer | Yes | |
ANP_Config_Damage | real | Yes | |
ANP_Config_Duration | real | Yes | |
ANP_Damage | real | Yes | |
ANP_Duration | real | Yes | |
APL_Dummy | unit | No | |
APL_Duration | real | Yes | |
APL_Group | group | No | |
APL_MaxIndex | integer | No | |
APL_PickedUnits | unit | No | |
APL_SFX | effect | Yes | |
APL_TempIndex | integer | No | |
APL_TempPoint | location | No | |
APS_AbilityIndex | integer | Yes | |
APS_Config_Speed | real | Yes | |
APS_Config_SpeedDivision | real | Yes | |
APS_SpeedDivision | real | Yes | |
ARA_AbilityIndex | integer | Yes | |
ARA_Config_Damage | real | Yes | |
ARA_Config_Duration | real | Yes | |
ARA_Damage | real | Yes | |
ARA_Duration | real | Yes | |
ARB_AbilityIndex | integer | Yes | |
ARB_Caster | unit | No | |
ARB_Config_Duration | real | Yes | |
ARB_Duration | real | Yes | |
ARE_AbilityIndex | integer | No | |
ARE_Config_Heal | real | Yes | |
Arena_Config_Text | string | Yes | |
Arena_Config_Units | unitcode | Yes | |
Arena_Group | group | No | |
Arena_Group2 | group | No | |
Arena_PickedUnits | unit | No | |
Arena_Player | player | No | |
Arena_Region | rect | No | |
Arena_TempPoint | location | No | |
AROA_AbilityIndex | integer | Yes | |
AROA_Config_Damage | real | Yes | |
AROAD_AbilityIndex | integer | Yes | |
ARock_AbilityIndex | integer | Yes | |
ARock_Caster | unit | No | |
ARock_DebuffAbility | abilcode | Yes | |
ARock_Dummy | unit | Yes | |
ARock_Group | group | No | |
ARock_MaxIndex | integer | No | |
ARock_PickedUnits | unit | No | |
ARock_Player | player | Yes | |
ARock_TempIndex | integer | No | |
ARock_TempPoint | location | No | |
AS_AbilityIndex | integer | Yes | |
AS_Config_Speed | real | Yes | |
AS_Speed | real | Yes | |
ASAD_AbilityIndex | integer | Yes | |
ASAD_Config_Multiplier | real | Yes | |
ASAD_Multiplier | real | Yes | |
ASB_AbilityIndex | integer | Yes | |
ASB_Damage | real | Yes | |
ASB_Duration | real | Yes | |
ASD_AbilityIndex | integer | Yes | |
ASD_Config_Damage | real | Yes | |
ASD_Config_Duration | real | Yes | |
ASD_Damage | real | Yes | |
ASD_Duration | real | Yes | |
ASO_AbilityIndex | integer | Yes | |
ASP_AbilityIndex | integer | Yes | |
ASP_Config_Damage | real | Yes | |
ASP_Damage | real | Yes | |
AST_AbilityIndex | integer | Yes | |
ASW_AbilityIndex | integer | No | |
ASW_Angle | real | No | |
ASW_Caster | unit | No | |
ASW_Config_Duration | real | Yes | |
ASW_Config_WolfCount | integer | Yes | |
ASW_Duration | real | No | |
ASW_Group | group | No | |
ASW_SummonedUnits | unit | No | |
ASW_TempPlayer | player | No | |
ASW_TempPoint | location | No | |
ASW_TempPoint2 | location | No | |
ASW_WolfCount | integer | No | |
ATE_AbilityIndex | integer | Yes | |
ATE_CasterLife | real | Yes | |
ATE_Config_CasterLife | real | Yes | |
ATE_Config_Duration | real | Yes | |
ATE_Config_EnemyLife | real | Yes | |
ATE_Duration | real | Yes | |
ATE_EnemyLife | real | Yes | |
ATOT_AbilityIndex | integer | No | |
AttackPreventer_Attacked | unit | No | |
AttackPreventer_Attacker | unit | No | |
ATTT_AbilityIndex | integer | No | |
ATTT_Config_Damage | real | Yes | |
ATTT_Config_Heal | real | Yes | |
ATTT_Damage | real | No | |
ATTT_Heal | real | No | |
AUW_AbilityIndex | integer | Yes | |
AW_Integer | integer | No | |
AWS_AbilityIndex | integer | No | |
AWS_Config_Heal | real | Yes | |
AWS_Heal | real | No | |
B_Caster | unit | No | |
B_SFX | string | No | |
B_TempPoint | location | No | |
B_TempPoint2 | location | No | |
BC_Angle | real | No | |
BC_Caster | unit | No | |
BC_Dragon | unit | No | |
BC_Player | player | No | |
BC_TempPoint | location | No | |
BC_TempPoint2 | location | No | |
BE_AbilityCounter | integer | No | |
BE_Check | integer | Yes | |
BE_CurrentDistance | real | No | |
BE_CurrentPick | unit | No | |
BE_CurrentX | real | No | |
BE_CurrentY | real | No | |
BE_Duration | real | Yes | |
BE_EnchantedObj | unit | Yes | |
BE_LastNode | integer | No | |
BE_Lightning | lightning | Yes | |
BE_NextNode | integer | Yes | |
BE_NodeNumber | integer | No | |
BE_Player | player | Yes | |
BE_PrevNode | integer | Yes | |
BE_RecyclableNodes | integer | No | |
BE_RecycleNodes | integer | Yes | |
BE_SpecialEf | effect | Yes | |
BE_Swap | group | No | |
BE_Target | unit | Yes | |
BE_TempGroup | group | No | |
BE_Timer | timer | No | |
BE_Unit | unit | No | |
BF_Caster | unit | Yes | |
BF_Duration | real | Yes | |
BF_MaxIndex | integer | No | |
BF_Player | player | Yes | |
BF_Target | unit | Yes | |
BF_TargetDummy | unit | Yes | |
BF_TempIndex | integer | No | |
BF_TempPoint | location | No | |
BF_TempPoint2 | location | No | |
BF_TempPoint3 | location | No | |
BMBoolean | boolean | No | |
BO_Caster | unit | Yes | |
BO_Duration | real | Yes | |
BO_MaxIndex | integer | No | |
BO_TempIndex | integer | No | |
Burst_ADummy | unit | No | |
Burst_Angle | real | Yes | |
Burst_Caster | unit | No | |
Burst_Config_AString | string | No | |
Burst_Config_DString | string | No | |
Burst_Config_SString | string | No | |
Burst_DDummy | unit | No | |
Burst_Duration | real | Yes | |
Burst_Group | group | No | |
Burst_MaxIndex | integer | No | |
Burst_SDummy | unit | No | |
Burst_Speed | real | Yes | |
Burst_String | string | Yes | |
Burst_Target | unit | Yes | |
Burst_TempIndex | integer | No | |
Burst_TempPoint | location | No | |
Burst_TempPoint2 | location | No | |
Burst_TP1 | location | No | |
Burst_TP2 | location | No | |
Burst_TP3 | location | No | |
CA_Angle | real | Yes | |
CA_Attacker | unit | No | |
CA_Boolean | boolean | No | |
CA_Caster | unit | Yes | |
CA_Damaged | unit | Yes | |
CA_DamageTaken | real | Yes | |
CA_Distance | real | Yes | |
CA_DistanceTravelled | real | Yes | |
CA_Dummy | unit | Yes | |
CA_Group | group | No | |
CA_HeroCount | integer | No | |
CA_IntegerCheck | integer | No | |
CA_MaxIndex | integer | No | |
CA_PickedUnits | unit | No | |
CA_Player | player | Yes | |
CA_RandomRegister | unit | No | |
CA_TargetDummy | unit | Yes | |
CA_TempIndex | integer | No | |
CA_TempPoint | location | No | |
CA_TempPoint2 | location | No | |
CA_TempPoint3 | location | No | |
CA_TotalDistance | real | No | |
CA_TriggerInteger | integer | No | |
CG_Angle | real | Yes | |
CG_Caster | unit | Yes | |
CG_Distance | real | Yes | |
CG_Dummy | unit | Yes | |
CG_Group | group | No | |
CG_MaxIndex | integer | No | |
CG_PickedUnits | unit | No | |
CG_Player | player | Yes | |
CG_TargetDummy | unit | Yes | |
CG_TempIndex | integer | No | |
CG_TempPoint | location | No | |
CG_TempPoint2 | location | No | |
CG_TempPoint3 | location | No | |
CHR_Caster | unit | Yes | |
CHR_Duration | real | Yes | |
CHR_Group | group | No | |
CHR_MaxIndex | integer | No | |
CHR_PickedUnits | unit | No | |
CHR_Player | player | Yes | |
CHR_SFX | effect | Yes | |
CHR_TempIndex | integer | No | |
CHR_TempPoint | location | No | |
Click | integer | Yes | |
ClickHero | unit | Yes | |
Combine_Arcane | integer | No | |
Combine_Blood | integer | No | |
Combine_Darkness | integer | No | |
Combine_Death | integer | No | |
Combine_Earth | integer | No | |
Combine_Fire | integer | No | |
Combine_Group | group | No | |
Combine_Ice | integer | No | |
Combine_Life | integer | No | |
Combine_Metal | integer | No | |
Combine_Nature | integer | No | |
Combine_Player | player | No | |
Combine_Poison | integer | No | |
Combine_Shield | integer | No | |
Combine_String | integer | No | |
Combine_Unit | unit | No | |
Combine_Voice | integer | No | |
Combine_Water | integer | No | |
Combine_Wind | integer | No | |
Countdown_DefeatGroup | group | No | |
Countdown_DefeatInteger | integer | No | |
Countdown_Duration | integer | No | |
Countdown_Group | group | No | |
Countdown_HeroGroup | group | No | |
Countdown_Integer | integer | No | |
Countdown_PickedUnits | unit | No | |
Countdown_TempPoint | location | No | |
Countdown_TheLich | unit | No | |
Countdown_Timer | timer | No | |
CR_Angle | real | Yes | |
CR_Axe | unit | Yes | |
CR_Duration | real | Yes | |
CR_Formation | real | No | |
CR_MaxIndex | integer | No | |
CR_Player | player | Yes | |
CR_Real | real | No | |
CR_Target | unit | Yes | |
CR_TempIndex | integer | No | |
CR_TempPoint | location | No | |
CR_TempPoint2 | location | No | |
CS_Caster | unit | No | |
CS_Dummy | unit | No | |
CS_Group | group | No | |
CS_PickedUnits | unit | No | |
CS_Player | player | No | |
CS_Target | unit | No | |
CS_TempPoint | location | No | |
CS_TempPoint2 | location | No | |
CT_Caster | unit | No | |
CT_Player | player | No | |
CT_TempPoint | location | No | |
CT_Tree | destructable | No | |
DB_PickedUnits | unit | No | |
DB_TempAttacker | unit | No | |
DB_TempGroup | group | No | |
DB_TempPlayer | player | No | |
DB_TempPoint | location | No | |
DBurst_Group | group | No | |
DBurst_PickedUnits | unit | No | |
DC_Angle | real | Yes | |
DC_Caster | unit | Yes | |
DC_Dummy | unit | Yes | |
DC_MaxIndex | integer | No | |
DC_Player | player | No | |
DC_TempIndex | integer | No | |
DC_TempPoint | location | No | |
DC_TempPoint2 | location | No | |
Death_Dummy | unit | Yes | |
Death_Duration | real | Yes | |
Death_DyingUnit | unit | Yes | |
Death_MaxIndex | integer | No | |
Death_TempIndex | integer | No | |
Death_TempPoint | location | No | |
Death_TrigPlayer | player | Yes | |
Dest | destructable | No | |
DestChecker | unit | No | |
destructable | destructable | No | |
DPP_HeroCount | integer | No | |
DPP_PlayerHero | unit | Yes | |
E_Caster | unit | No | |
E_Dummy | unit | No | |
E_Group | group | No | |
E_PickedUnits | unit | No | |
E_Player | player | No | |
E_TempPoint | location | No | |
FB_AbilityCounter | integer | No | |
FB_AoE | real | Yes | |
FB_Caster | unit | Yes | |
FB_Damage | real | Yes | |
FB_Duration | real | Yes | |
FB_LastNode | integer | No | |
FB_NextNode | integer | Yes | |
FB_NodeNumber | integer | No | |
FB_Player | player | Yes | |
FB_PrevNode | integer | Yes | |
FB_RecyclableNodes | integer | No | |
FB_RecycleNodes | integer | Yes | |
FB_Size | real | Yes | |
FB_SpecialEf | effect | Yes | |
FB_Sphere | unit | Yes | |
FB_TempGroup | group | No | |
FB_Timer | timer | No | |
FFAVisibility | fogmodifier | Yes | |
FO_Angle | real | Yes | |
FO_Caster | unit | Yes | |
FO_Dummy | unit | Yes | |
FO_Duration | real | Yes | |
FO_Formation | real | Yes | |
FO_Group | group | No | |
FO_MaxIndex | integer | No | |
FO_PickedUnits | unit | No | |
FO_Player | player | Yes | |
FO_SecondAngle | real | Yes | |
FO_SFXDummy | unit | No | |
FO_TargetDummy | unit | Yes | |
FO_TempIndex | integer | No | |
FO_TempPoint | location | No | |
FO_TempPoint2 | location | No | |
FO_TempPoint3 | location | No | |
FO_TempReal | real | No | |
FR_Caster | unit | Yes | |
FR_Distance | real | Yes | |
FR_DistanceTravelled | real | Yes | |
FR_Dummy | unit | No | |
FR_MaxIndex | integer | No | |
FR_Player | player | Yes | |
FR_SFX | effect | Yes | |
FR_Speed | real | Yes | |
FR_Target | unit | Yes | |
FR_TempIndex | integer | No | |
FR_TempPoint | location | No | |
FR_TempPoint2 | location | No | |
FR_TempPoint3 | location | No | |
FR_TotalDistance | real | No | |
FT_Point2 | location | No | |
GlobalDeaths | integer | Yes | |
GlobalKills | integer | Yes | |
GOD_Angle | real | Yes | |
GOD_AngleDummy | unit | Yes | |
GOD_Caster | unit | Yes | |
GOD_ClosestUnit | unit | Yes | |
GOD_DisplaceDistance | real | Yes | |
GOD_Distance | real | Yes | |
GOD_Dummy | unit | Yes | |
GOD_Duration | real | Yes | |
GOD_Group | group | No | |
GOD_MaxIndex | integer | No | |
GOD_MaxRange | real | No | |
GOD_PickedUnits | unit | No | |
GOD_Player | player | Yes | |
GOD_SecondAngle | real | No | |
GOD_SFXBoolean | boolean | Yes | |
GOD_TargetDummy | unit | Yes | |
GOD_TempIndex | integer | No | |
GOD_TempPoint | location | No | |
GOD_TempPoint2 | location | No | |
GOD_TempPoint3 | location | No | |
GOD_TempPoint4 | location | No | |
GOD_TempPoint5 | location | No | |
GOTL_Caster | unit | No | |
GOTL_Target | unit | No | |
HD_Angle | real | Yes | |
HD_Caster | unit | Yes | |
HD_Drone | unit | Yes | |
HD_MaxIndex | integer | No | |
HD_Player | player | No | |
HD_SFX | effect | Yes | |
HD_TempIndex | integer | No | |
HD_TempPoint | location | No | |
HD_TempPoint2 | location | No | |
HDD_Caster | unit | Yes | |
HDD_MaxIndex | integer | No | |
HDD_TempIndex | integer | No | |
Hero_Array | unitcode | Yes | |
Hero_Icon | string | Yes | |
HowManyPlayers | integer | No | |
IB_Caster | unit | Yes | |
IB_Dummy | unit | Yes | |
IB_MaxIndex | integer | No | |
IB_Player | player | No | |
IB_ShardCount | integer | Yes | |
IB_Target | unit | Yes | |
IB_TempIndex | integer | No | |
IB_TempPoint | location | No | |
IB_TempPoint2 | location | No | |
IBR_Caster | unit | No | |
IBR_Integer | integer | No | |
ILC_Dummy | unit | No | |
ILC_Killer | unit | No | |
ILC_Player | player | No | |
ILC_TempPoint | location | No | |
IN_Caster | unit | Yes | |
IN_Duration | real | Yes | |
IN_MaxIndex | integer | No | |
IN_PickedUnits | unit | No | |
IN_SFX | effect | Yes | |
IN_TempGroup | group | No | |
IN_TempIndex | integer | No | |
IN_TempPlayer | player | Yes | |
IN_TempPoint | location | No | |
Integer | integer | No | |
IR_Dummy | unit | Yes | |
IR_Duration | real | Yes | |
IR_MaxIndex | integer | No | |
IR_Player | player | Yes | |
IR_Target | unit | Yes | |
IR_TempIndex | integer | No | |
IR_TempPoint | location | No | |
IRBoolean | boolean | No | |
IRO_Caster | unit | Yes | |
IRO_Duration | real | Yes | |
IRO_Group | group | No | |
IRO_MaxIndex | integer | No | |
IRO_PickedUnits | unit | No | |
IRO_Player | player | Yes | |
IRO_TempIndex | integer | No | |
IsDestTree | boolean | No | |
ISI_CCIntegerHandle | integer | Yes | |
ISI_DHIntegerHandle | integer | Yes | |
ISI_FCIntegerHandle | integer | Yes | |
ISI_Hashtable | hashtable | No | |
ISI_IntegerHandle | integer | No | |
ISI_ItemCountBOTF | integer | No | |
ISI_ItemCountCC | integer | No | |
ISI_ItemCountDH | integer | No | |
ISI_ItemCountEA | integer | No | |
ISI_ItemCountEOS | integer | No | |
ISI_ItemCountFC | integer | No | |
ISI_ItemCountFE | integer | No | |
ISI_ItemCountGC | integer | No | |
ISI_ItemCountHW | integer | No | |
ISI_ItemCountIM | integer | No | |
ISI_ItemCountME | integer | No | |
ISI_ItemCountMS | integer | No | |
ISI_ItemCountOOW | integer | No | |
ISI_ItemCountTOL | integer | No | |
ISI_Load | integer | No | |
ISI_Unit | unit | No | |
ISS_AbilityIndex | integer | No | |
ISS_Angle | real | No | |
ISS_Caster | unit | No | |
ISS_Dummy | unit | No | |
ISS_Integer | integer | No | |
ISS_Player | player | No | |
ISS_Target | unit | No | |
ISS_TempPoint | location | No | |
ISS_TempPoint2 | location | No | |
ITR_Caster | unit | No | |
ITR_Dummy | unit | No | |
ITR_Duration | real | Yes | |
ITR_MaxIndex | integer | No | |
ITR_Player | player | No | |
ITR_TempIndex | integer | No | |
ITR_TempPoint | location | No | |
ITR_Visibility | fogmodifier | Yes | |
KIlls_1 | integer | No | |
KIlls_2 | integer | No | |
Leaderboard | leaderboard | No | |
Leaderboard_Kills | integer | Yes | |
Leaderboard_kills_Killer | unit | No | |
Leaderboard_kills_Player | player | No | |
lightning | lightning | No | |
List | integer | No | |
LL_AbilityCounter | integer | No | |
LL_Boolean | boolean | Yes | |
LL_Caster | unit | Yes | |
LL_CounterDuration | real | Yes | |
LL_Duration | real | Yes | |
LL_Globe | unit | Yes | |
LL_Height | real | Yes | |
LL_LastNode | integer | No | |
LL_Lightning | lightning | Yes | |
LL_NextNode | integer | Yes | |
LL_NodeNumber | integer | No | |
LL_PreviousNode | integer | Yes | |
LL_PrevNode | integer | Yes | |
LL_RecyclableNodes | integer | No | |
LL_RecycleNodes | integer | Yes | |
LL_Size | real | Yes | |
LL_Target | unit | Yes | |
LL_Timer | timer | No | |
LR_Caster | unit | No | |
LR_CurrentHP | real | No | |
LS_Caster | unit | No | |
LS_Duration | real | Yes | |
LS_Fountain | unit | Yes | |
LS_Group | group | No | |
LS_Healing | real | Yes | |
LS_MaxIndex | integer | No | |
LS_PickedUnits | unit | No | |
LS_Player | player | Yes | |
LS_TempIndex | integer | No | |
LS_TempPoint | location | No | |
LUL | integer | No | |
M_Angle | real | Yes | |
M_Caster | unit | Yes | |
M_esc_Circle | real | No | |
M_esc_CircularPoints | location | No | |
M_esc_Duration | real | Yes | |
M_esc_Item | item | Yes | |
M_esc_MaxIndex | integer | No | |
M_esc_PickedUnit | unit | No | |
M_esc_Position | location | No | |
M_esc_TempIndex | integer | No | |
M_esc_TrigPlayer | player | No | |
M_esc_UnitGroup | group | No | |
M_ManipulatedItem | item | No | |
M_MaxIndex | integer | No | |
M_Offset | location | No | |
M_Orb | unit | Yes | |
M_Pickup | integer | No | |
M_Player | player | No | |
M_Position | location | No | |
M_Skip_Group | group | No | |
M_Skip_Integer | integer | No | |
M_Skip_PickedUnits | unit | No | |
M_TempIndex | integer | No | |
Magic_Abilities | abilcode | Yes | |
Magic_Angle | real | No | |
Magic_CenterPoint | location | No | |
Magic_Circle | real | No | |
Magic_CircularPoints | location | No | |
Magic_ItemElements | itemcode | Yes | |
Magic_PlayerGroup | force | No | |
Magic_PlayerInteger | integer | No | |
Magic_preduration | real | No | |
Magic_Timer | timer | No | |
Magic_UnitElements | unitcode | Yes | |
MaxRounds | integer | No | |
MC_Caster | unit | No | |
MC_ClosestUnit | unit | Yes | |
MC_Distance | real | Yes | |
MC_Duration | real | Yes | |
MC_Formation | real | No | |
MC_Group | group | No | |
MC_MaxIndex | integer | No | |
MC_Pest | unit | Yes | |
MC_PestCount | integer | No | |
MC_PickedUnits | unit | No | |
MC_Player | player | No | |
MC_Real | real | No | |
MC_SearchRange | real | No | |
MC_TempIndex | integer | No | |
MC_TempPoint | location | No | |
MC_TempPoint2 | location | No | |
MC_TempPoint3 | location | No | |
MD_Dyingunit | unit | No | |
MD_Group | group | No | |
MD_Pickedunits | unit | No | |
MD_Player | player | No | |
MD_TempPoint | location | No | |
ModeInteger | integer | No | |
MP_Angle | real | Yes | |
MP_Axe | unit | Yes | |
MP_Caster | unit | Yes | |
MP_Count | integer | Yes | |
MP_Damage | real | Yes | |
MP_Distance | real | Yes | |
MP_Group | group | No | |
MP_Group2 | group | No | |
MP_MaxIndex | integer | No | |
MP_PickedUnits | unit | No | |
MP_Player | player | Yes | |
MP_RandomUnit | unit | Yes | |
MP_RemoveAxeInteger | integer | No | |
MP_Speed | real | Yes | |
MP_TempIndex | integer | No | |
MP_TempPoint | location | No | |
MP_TempPoint2 | location | No | |
MP_TempPoint3 | location | No | |
Multiboard_Color | integer | No | |
Multiboard_Spots | integer | Yes | |
MultiboardInteger | integer | No | |
NextInteger | integer | No | |
NH_Caster | unit | No | |
NH_Dummy | unit | No | |
NH_Group | group | No | |
NH_PickedUnits | unit | No | |
NH_Player | player | No | |
NH_TempPoint | location | No | |
Normal_PlayerCount | player | No | |
NP_Caster | unit | Yes | |
NP_Duration | real | Yes | |
NP_FloatingText | texttag | Yes | |
NP_MaxIndex | integer | No | |
NP_Player | player | Yes | |
NP_SFX | effect | Yes | |
NP_Target | unit | Yes | |
NP_TempIndex | integer | No | |
NP_TempPoint | location | No | |
NP_TempPoint2 | location | No | |
Pick_Group | group | No | |
PickedUnit | unit | No | |
PickingDuration | real | No | |
PK_Caster | unit | No | |
PK_Target | unit | No | |
PK_TempPoint | location | No | |
PK_TempPoint2 | location | No | |
Player_Colors | string | Yes | |
Player_Count | integer | No | |
Playergroup | force | No | |
PS_Angle | real | Yes | |
PS_Caster | unit | Yes | |
PS_Distance | real | Yes | |
PS_DistanceTravelled | real | Yes | |
PS_Dummy | unit | Yes | |
PS_Duration | real | Yes | |
PS_MaxIndex | integer | No | |
PS_Player | player | No | |
PS_Speed | real | Yes | |
PS_TempIndex | integer | No | |
PS_TempPoint | location | No | |
PS_TempPoint2 | location | No | |
PS_TempPoint3 | location | No | |
PS_TotalDistance | real | No | |
RA_Caster | unit | Yes | |
RA_Dummy | unit | Yes | |
RA_Duration | real | Yes | |
RA_Group | group | No | |
RA_MaxIndex | integer | No | |
RA_PickedUnits | unit | No | |
RA_Player | player | Yes | |
RA_SFX | effect | Yes | |
RA_TempIndex | integer | No | |
RA_TempPoint | location | No | |
Random_Count | integer | No | |
Random_Data | integer | Yes | |
Random_Hero | integer | No | |
Random_Player | player | No | |
RB_Angle | real | Yes | |
RB_Duration | real | Yes | |
RB_Group | group | No | |
RB_MaxIndex | integer | No | |
RB_PickedUnits | unit | No | |
RB_Player | player | Yes | |
RB_SFX | effect | Yes | |
RB_Target | unit | Yes | |
RB_TempIndex | integer | No | |
RB_TempPoint | location | No | |
RB_TempPoint2 | location | No | |
RB_TempPoint3 | location | No | |
RE_Caster | unit | No | |
RE_TempPoint | location | No | |
Regions | rect | Yes | |
ROA_Angle | real | Yes | |
ROA_AnimationCheck | real | Yes | |
ROA_Arrow | unit | No | |
ROA_Boolean | boolean | Yes | |
ROA_Caster | unit | Yes | |
ROA_Distance | real | Yes | |
ROA_DistanceKeeper | unit | Yes | |
ROA_Duration | real | Yes | |
ROA_Facing | real | No | |
ROA_FNegativeAngle | integer | Yes | |
ROA_FPositiveAngle | integer | Yes | |
ROA_Group | group | No | |
ROA_MaxIndex | integer | No | |
ROA_PickedUnits | unit | No | |
ROA_Player | player | Yes | |
ROA_RandomUnit | unit | No | |
ROA_ShootingAngle | integer | Yes | |
ROA_TempIndex | integer | No | |
ROA_TempPoint | location | No | |
ROA_TempPoint2 | location | No | |
ROA_TempPoint3 | location | No | |
ROAD_Caster | unit | Yes | |
ROAD_MaxIndex | integer | No | |
ROAD_Player | player | Yes | |
ROAD_TempIndex | integer | No | |
Rock_Caster | unit | No | |
Rock_TempPlayer | player | No | |
Rock_TempPoint | location | No | |
Rock_TempPoint2 | location | No | |
RoundEnded | boolean | No | |
Rounds_TempPoint | location | No | |
Rounds_TempPoint2 | location | No | |
RoundsWon | integer | Yes | |
S_Angle | real | Yes | |
S_Boolean | boolean | Yes | |
S_Caster | unit | Yes | |
S_Distance | real | Yes | |
S_Dummy | unit | Yes | |
S_Group | group | No | |
S_Group2 | group | No | |
S_Integer | integer | No | |
S_MaxIndex | integer | No | |
S_PickedUnits | unit | No | |
S_Player | player | Yes | |
S_PosDummy | unit | Yes | |
S_Speed | real | Yes | |
S_Target | unit | Yes | |
S_TempIndex | integer | No | |
S_TempPoint | location | No | |
S_TempPoint2 | location | No | |
S_TempPoint3 | location | No | |
SAD_RandomInteger | integer | No | |
SB_AbilityCounter | integer | No | |
SB_Ball | unit | Yes | |
SB_Caster | unit | Yes | |
SB_Damage | real | Yes | |
SB_Duration | real | Yes | |
SB_KnockbackAoE | real | Yes | |
SB_LastNode | integer | No | |
SB_NextNode | integer | Yes | |
SB_NodeNumber | integer | No | |
SB_Player | player | Yes | |
SB_PrevNode | integer | Yes | |
SB_RecyclableNodes | integer | No | |
SB_RecycleNodes | integer | Yes | |
SB_Size | real | Yes | |
SB_Speed | real | Yes | |
SB_Target | unit | Yes | |
SB_TempGroup | group | No | |
SB_Timer | timer | No | |
SD_Caster | unit | Yes | |
SD_Dummy | unit | No | |
SD_Duration | real | Yes | |
SD_Group | group | No | |
SD_MaxIndex | integer | No | |
SD_PickedUnits | unit | No | |
SD_SFX | effect | Yes | |
SD_TempIndex | integer | No | |
SD_TempPlayer | player | Yes | |
SD_TempPoint | location | No | |
Selector | unit | No | |
sfx | effect | No | |
SG_Caster | unit | No | |
SG_TempPoint | location | No | |
SO_Angle | real | Yes | |
SO_Caster | unit | Yes | |
SO_Distance | real | Yes | |
SO_Dummy | unit | Yes | |
SO_Duration | real | Yes | |
SO_MaxIndex | integer | No | |
SO_Player | player | Yes | |
SO_Stun | unit | No | |
SO_TargetDummy | unit | Yes | |
SO_TempIndex | integer | No | |
SO_TempPoint | location | No | |
SO_TempPoint2 | location | No | |
SO_TempPoint3 | location | No | |
SOD_Caster | unit | Yes | |
SOD_MaxIndex | integer | No | |
SOD_TempIndex | integer | No | |
SP_Caster | unit | No | |
SP_Dummy | unit | Yes | |
SP_Duration | real | Yes | |
SP_Group | group | No | |
SP_MaxIndex | integer | No | |
SP_PickedUnits | unit | No | |
SP_Player | player | Yes | |
SP_Target | unit | Yes | |
SP_TempIndex | integer | No | |
SP_TempPoint | location | No | |
SpecialEffect | effect | No | |
SpecialEffect2 | effect | No | |
SpecialEffect3 | effect | No | |
SpecialEffect4 | effect | No | |
ST_Caster | unit | Yes | |
ST_Duration | real | Yes | |
ST_Group | group | No | |
ST_Group2 | group | No | |
ST_MaxIndex | integer | No | |
ST_PickedUnits | unit | No | |
ST_Player | player | Yes | |
ST_RandomUnit | unit | No | |
ST_TempIndex | integer | No | |
ST_TempPlayer | player | No | |
ST_TempPoint | location | No | |
ST_TempPoint2 | location | No | |
ST_Totem | unit | Yes | |
TE_Caster | unit | Yes | |
TE_Duration | real | Yes | |
TE_FloatingTextC | texttag | Yes | |
TE_FloatingTextT | texttag | Yes | |
TE_MaxIndex | integer | No | |
TE_Target | unit | Yes | |
TE_TempIndex | integer | No | |
TE_TempPoint | location | No | |
TE_TempPoint2 | location | No | |
TeamsBoolean | boolean | Yes | |
TempGroup | group | No | |
TempInteger | integer | No | |
TempInteger2 | integer | No | |
TempPlayer | player | No | |
TempPlayer2 | player | No | |
TempPoint | location | No | |
TempUnit | unit | No | |
TextDyingGroup | group | No | |
TextDyingHero | unit | No | |
TextDyingKiller | unit | No | |
TextDyingPlayer | player | No | |
TextKillingInteger | integer | No | |
Timer | timer | No | |
TOT_Caster | unit | No | |
TOT_Player | player | No | |
TOT_Point | location | No | |
TOT_Unit | unit | No | |
Total_Heros | integer | No | |
TrackingInteger | integer | No | |
TreeKill | boolean | No | |
TTT_Caster | unit | No | |
TTT_Dummy | unit | No | |
TTT_Group | group | No | |
TTT_Group2 | group | No | |
TTT_Integer | integer | No | |
TTT_PickedUnits | unit | No | |
TTT_Player | player | No | |
TTT_SearchAoE | real | No | |
TTT_TempPoint | location | No | |
UTD_DamagedUnit | unit | Yes | |
UTD_DamageTaken | real | Yes | |
UTD_FloatingText | texttag | Yes | |
UTD_FTDuration | real | Yes | |
UTD_FTLoc | real | Yes | |
UTD_FTPoint | location | No | |
UTD_FTPoint2 | location | No | |
UTD_Group | group | No | |
UTD_MaxIndex | integer | No | |
UTD_TempIndex | integer | No | |
UTD_Units | unit | No | |
UW_Angle | real | Yes | |
UW_Caster | unit | Yes | |
UW_Dummy | unit | Yes | |
UW_Duration | real | Yes | |
UW_Formation | real | No | |
UW_Lightning | lightning | Yes | |
UW_MaxIndex | integer | No | |
UW_Player | player | No | |
UW_Real | real | No | |
UW_TempIndex | integer | No | |
UW_TempPoint | location | No | |
UW_TempPoint2 | location | No | |
W1 | effect | No | |
W2 | effect | No | |
W3 | effect | No | |
W4 | effect | No | |
WIA_Boolean | boolean | Yes | |
WIA_Caster | unit | Yes | |
WIA_ClosestUnit | unit | Yes | |
WIA_Distance | real | Yes | |
WIA_Duration | real | Yes | |
WIA_MaxIndex | integer | No | |
WIA_TempIndex | integer | No | |
WIR_Angle | real | No | |
WIR_Boolean | boolean | Yes | |
WIR_Caster | unit | Yes | |
WIR_ClosestUnit | unit | Yes | |
WIR_Distance | real | Yes | |
WIR_Duration | real | Yes | |
WIR_Group | group | No | |
WIR_MaxIndex | integer | No | |
WIR_PickedUnits | unit | No | |
WIR_Player | player | No | |
WIR_RandomInteger | integer | No | |
WIR_SearchRange | real | No | |
WIR_TempIndex | integer | No | |
WIR_TempPoint | location | No | |
WIR_TempPoint2 | location | No | |
WS_Caster | unit | No | |
WS_Group | group | No | |
WS_Integer | integer | No | |
WS_PickedUnits | unit | No | |
WS_TempPoint | location | No |
//TESH.scrollpos=148
//TESH.alwaysfold=0
//Linked list recycling function
function BE_Recycle takes integer Node returns nothing
if (udg_BE_LastNode == Node) then
set udg_BE_LastNode = udg_BE_PrevNode[Node]
endif
set udg_BE_RecycleNodes[udg_BE_RecyclableNodes] = Node
set udg_BE_RecyclableNodes = udg_BE_RecyclableNodes + 1
set udg_BE_NextNode[udg_BE_PrevNode[Node]] = udg_BE_NextNode[Node]
set udg_BE_PrevNode[udg_BE_NextNode[Node]] = udg_BE_PrevNode[Node]
set udg_BE_AbilityCounter = udg_BE_AbilityCounter - 1
if (udg_BE_AbilityCounter == 0) then
call PauseTimer(udg_BE_Timer)
endif
endfunction
//Below is the main function of the spell (loop), it pulls one closest enemy towards the enchanted object
//If the unit goes out of range, selects a new target and exceeds the duration
function BE_Loop takes nothing returns nothing
local real x
local real y
local real z
local real x2
local real y2
local real z2
local real dx
local real dy
local integer Node = 0
local real angle
local unit u
local real d
local real aoe = 300
loop
set Node = udg_BE_NextNode[Node]
exitwhen Node == 0
if udg_BE_Duration[Node] > 0.00 then
set udg_BE_Duration[Node] = udg_BE_Duration[Node] - 0.031250
set x = GetUnitX(udg_BE_EnchantedObj[Node])
set y = GetUnitY(udg_BE_EnchantedObj[Node])
// Calculating the nearest unit
if udg_BE_Check[Node] == 0 then
call GroupEnumUnitsInRange(udg_BE_TempGroup, x, y, aoe, null)
loop
set u = FirstOfGroup(udg_BE_TempGroup)
exitwhen u == null
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 < aoe and u != udg_BE_EnchantedObj[Node] and GetUnitAbilityLevel(u, 'A06T') == 0 and IsUnitAlly(u, udg_BE_Player[Node]) == false and not(IsUnitType(u, UNIT_TYPE_DEAD)) then
set udg_BE_Target[Node] = FirstOfGroup(udg_BE_TempGroup)
set aoe = d
endif
call GroupRemoveUnit(udg_BE_TempGroup, u)
endloop
endif
// Setting up the global integer to keep the spell from checking for a new target
if udg_BE_Check[Node] == 0 and udg_BE_Target[Node] != null then
set udg_BE_Check[Node] = 1
set udg_BE_Duration[Node] = 5.00
endif
// Pulling the enemy
if udg_BE_Target[Node] != null then
set z = GetUnitFlyHeight(udg_BE_EnchantedObj[Node]) + 50.00
set x2 = GetUnitX(udg_BE_Target[Node])
set y2 = GetUnitY(udg_BE_Target[Node])
set z2 = GetUnitFlyHeight(udg_BE_Target[Node]) + 50.00
call MoveLightningEx(udg_BE_Lightning[Node], false, x, y, z, x2, y2, z2)
set angle = Atan2(y - y2, x - x2)
if (GetUnitAbilityLevel(udg_BE_EnchantedObj[Node], 'A0AX') == 1) then
call SetUnitX(udg_BE_Target[Node], x2 + 15.625 * Cos(angle)) // 500 MS
call SetUnitY(udg_BE_Target[Node], y2 + 15.625 * Sin(angle)) // 500 MS
else
call SetUnitX(udg_BE_Target[Node], x2 + 9.375 * Cos(angle)) // 300 MS
call SetUnitY(udg_BE_Target[Node], y2 + 9.375 * Sin(angle)) // 300 MS
endif
set dx = x2 - x
set dy = y2 - y
set d = SquareRoot(dx*dx + dy*dy)
endif
// Checking if the distance has been exceeded
if d > 500 and udg_BE_Target[Node] != null and udg_BE_Check[Node] == 1 and not(IsUnitType(udg_BE_Target[Node], UNIT_TYPE_DEAD) == true) then
set udg_BE_Duration[Node] = 0.00
endif
// If the duration has ended, clean up
else
call DestroyLightning(udg_BE_Lightning[Node])
call DestroyEffect(udg_BE_SpecialEf[Node])
call BE_Recycle(Node)
endif
endloop
endfunction
// Linked list node creation
function BE_CreateNode takes nothing returns integer
local integer Node = 0
if (udg_BE_RecyclableNodes == 0) then
set udg_BE_NodeNumber = udg_BE_NodeNumber + 1
set Node = udg_BE_NodeNumber
else
set udg_BE_RecyclableNodes = udg_BE_RecyclableNodes - 1
set Node = udg_BE_RecycleNodes[udg_BE_RecyclableNodes]
endif
set udg_BE_NextNode[Node] = 0
set udg_BE_NextNode[udg_BE_LastNode] = Node
set udg_BE_PrevNode[Node] = udg_BE_LastNode
set udg_BE_LastNode = Node
set udg_BE_AbilityCounter = udg_BE_AbilityCounter + 1
if (udg_BE_AbilityCounter == 1) then
call TimerStart(udg_BE_Timer, 0.031250, true, function BE_Loop)
endif
return Node
endfunction
// Function onCast, sets up the base for the ability
function BE_OnCast takes nothing returns boolean
local integer Node
local unit u
local real x
local real y
local real z
local integer i
local integer i2
local integer count = 0
local integer random
// Checking if the casted ability is right
if (GetSpellAbilityId() == 'A0AV') then
set Node = BE_CreateNode()
set udg_BE_Player[Node] = GetTriggerPlayer()
set udg_BE_Target[Node] = null
set udg_BE_Check[Node] = 0
set udg_BE_Duration[Node] = 6.00
set x = GetSpellTargetX()
set y = GetSpellTargetY()
// Getting the random unit from the targeted AoE
call GroupEnumUnitsInRange(udg_BE_TempGroup, x, y, 300, null)
loop
set u = FirstOfGroup(udg_BE_TempGroup)
exitwhen u == null
set i = GetUnitAbilityLevel(u, 'A0AX')
set i2 = GetUnitAbilityLevel(u, 'A06T')
if (not IsUnitType(u, UNIT_TYPE_DEAD)) and (not IsUnitType(u, UNIT_TYPE_STRUCTURE)) and (i2 == 0 or i == 1) then
set count = count + 1
call GroupAddUnit(udg_BE_Swap, u)
endif
call GroupRemoveUnit(udg_BE_TempGroup, u)
endloop
set random = GetRandomInt(0, count)
set count = 0
loop
set u = FirstOfGroup(udg_BE_Swap)
exitwhen u == null
set count = count + 1
if count == random then
set udg_BE_Unit = u
endif
call GroupRemoveUnit(udg_BE_Swap, u)
endloop
// Adding the lightning and the special "brilliance aura" effect to the target
set udg_BE_EnchantedObj[Node] = udg_BE_Unit
set udg_BE_SpecialEf[Node] = AddSpecialEffectTarget("Abilities\\Weapons\\FarseerMissile\\FarseerMissile.mdl", udg_BE_EnchantedObj[Node], "chest")
set z = GetUnitFlyHeight(udg_BE_EnchantedObj[Node]) + 50.00
set udg_BE_Lightning[Node] = AddLightningEx("CHIM", false, x, y, z, x, y, z)
endif
return false
endfunction
// Initializing the trigger
function InitTrig_Binding_Enchant takes nothing returns nothing
local trigger BE = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(BE, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(BE, Condition(function BE_OnCast))
endfunction
//TESH.scrollpos=14
//TESH.alwaysfold=0
// Linked list recycle
function SB_Recycle takes integer Node returns nothing
if (udg_SB_LastNode == Node) then
set udg_SB_LastNode = udg_SB_PrevNode[Node]
endif
set udg_SB_RecycleNodes[udg_SB_RecyclableNodes] = Node
set udg_SB_RecyclableNodes = udg_SB_RecyclableNodes + 1
set udg_SB_NextNode[udg_SB_PrevNode[Node]] = udg_SB_NextNode[Node]
set udg_SB_PrevNode[udg_SB_NextNode[Node]] = udg_SB_PrevNode[Node]
set udg_SB_AbilityCounter = udg_SB_AbilityCounter - 1
if (udg_SB_AbilityCounter == 0) then
call PauseTimer(udg_SB_Timer)
endif
endfunction
// Loop
function SB_Loop takes nothing returns nothing
local real x
local real y
local real x2
local real y2
local real angle
local integer Node = 0
local unit u
local real dx
local real dy
local real d
loop
set Node = udg_SB_NextNode[Node]
exitwhen Node == 0
if udg_SB_Duration[Node] > 0 and not(IsUnitType(udg_SB_Target[Node], UNIT_TYPE_DEAD) == true) then
set udg_SB_Duration[Node] = udg_SB_Duration[Node] - 0.031250
set x = GetUnitX(udg_SB_Target[Node])
set y = GetUnitY(udg_SB_Target[Node])
set x2 = GetUnitX(udg_SB_Ball[Node])
set y2 = GetUnitY(udg_SB_Ball[Node])
set dx = x2 - x
set dy = y2 - y
set d = SquareRoot(dx*dx + dy*dy)
set angle = Atan2(y - y2, x - x2)
call SetUnitX(udg_SB_Ball[Node], x2 + udg_SB_Speed[Node] * Cos(angle))
call SetUnitY(udg_SB_Ball[Node], y2 + udg_SB_Speed[Node] * Sin(angle))
set udg_SB_Speed[Node] = udg_SB_Speed[Node] + 0.09765625 // Interval value
call SetUnitScale(udg_SB_Ball[Node], udg_SB_Size[Node], 0.00, 0.00)
set udg_SB_Size[Node] = udg_SB_Size[Node] + 0.015625 // Interval value
call GroupEnumUnitsInRange(udg_SB_TempGroup, x2, y2, udg_SB_KnockbackAoE[Node], null)
loop
set u = FirstOfGroup(udg_SB_TempGroup)
exitwhen u == null
if not(IsUnitType(u, UNIT_TYPE_DEAD) == true) and GetUnitAbilityLevel(u, 'ACEV') == 0 and not(IsUnitAlly(u, udg_SB_Player[Node]) == true) and not(IsUnitType(u, UNIT_TYPE_STRUCTURE)) then
set x = GetUnitX(u)
set y = GetUnitY(u)
set angle = Atan2(y - y2, x - x2)
call SetUnitX(u, x + 5.00 * Cos(angle)) // Interval value
call SetUnitY(u, y + 5.00 * Sin(angle)) // Interval value
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl", u, "origin"))
endif
call GroupRemoveUnit(udg_SB_TempGroup, u)
endloop
set udg_SB_KnockbackAoE[Node] = udg_SB_KnockbackAoE[Node] + 1.250 // Interval value
set udg_SB_Damage[Node] = udg_SB_Damage[Node] + 0.3125 // Interval value
if d < 50.00 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\LightningBolt\\LightningBoltMissile.mdl", udg_SB_Target[Node], "chest"))
call UnitDamageTarget(udg_SB_Caster[Node], udg_SB_Target[Node], udg_SB_Damage[Node], true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set udg_SB_Duration[Node] = 0.00
endif
else
call UnitApplyTimedLife(udg_SB_Ball[Node], 'BTLF', 0.01)
call SB_Recycle(Node)
endif
endloop
endfunction
// Linked list node creation
function SB_CreateNode takes nothing returns integer
local integer Node = 0
if (udg_SB_RecyclableNodes == 0) then
set udg_SB_NodeNumber = udg_SB_NodeNumber + 1
set Node = udg_SB_NodeNumber
else
set udg_SB_RecyclableNodes = udg_SB_RecyclableNodes - 1
set Node = udg_SB_RecycleNodes[udg_SB_RecyclableNodes]
endif
set udg_SB_NextNode[Node] = 0
set udg_SB_NextNode[udg_SB_LastNode] = Node
set udg_SB_PrevNode[Node] = udg_SB_LastNode
set udg_SB_LastNode = Node
set udg_SB_AbilityCounter = udg_SB_AbilityCounter + 1
if (udg_SB_AbilityCounter == 1) then
call TimerStart(udg_SB_Timer, 0.031250, true, function SB_Loop) // Interval
endif
return Node
endfunction
// Linked list onCast
function SB_OnCast takes nothing returns boolean
local real x
local real y
local integer Node
if (GetSpellAbilityId() == 'A0AY') then
set Node = SB_CreateNode()
set udg_SB_Player[Node] = GetTriggerPlayer()
set udg_SB_Target[Node] = GetSpellTargetUnit()
set udg_SB_Caster[Node] = GetTriggerUnit()
set x = GetUnitX(udg_SB_Caster[Node])
set y = GetUnitY(udg_SB_Caster[Node])
set udg_SB_Ball[Node] = CreateUnit(udg_SB_Player[Node], 'h028', x, y, GetUnitFacing(udg_SB_Caster[Node]))
set udg_SB_Size[Node] = 0.50
set udg_SB_Speed[Node] = 3.125 // Interval value
set udg_SB_KnockbackAoE[Node] = 50.00
set udg_SB_Duration[Node] = 9.00
set udg_SB_Damage[Node] = 10.00
endif
return false
endfunction
// Initialization function
function InitTrig_Shock_Burst takes nothing returns nothing
local trigger SB = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(SB, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(SB, Condition(function SB_OnCast))
endfunction
//TESH.scrollpos=58
//TESH.alwaysfold=0
// Linked list recycling function
function LL_Recycle takes integer Node returns nothing
if (udg_LL_LastNode == Node) then
set udg_LL_LastNode = udg_LL_PrevNode[Node]
endif
set udg_LL_RecycleNodes[udg_LL_RecyclableNodes] = Node
set udg_LL_RecyclableNodes = udg_LL_RecyclableNodes + 1
set udg_LL_NextNode[udg_LL_PrevNode[Node]] = udg_LL_NextNode[Node]
set udg_LL_PrevNode[udg_LL_NextNode[Node]] = udg_LL_PrevNode[Node]
set udg_LL_AbilityCounter = udg_LL_AbilityCounter - 1
if (udg_LL_AbilityCounter == 0) then
call PauseTimer(udg_LL_Timer)
endif
endfunction
// Main function of the spell (loop)
function LL_Loop takes nothing returns nothing
local real x
local real y
local real z
local real x2
local real y2
local real z2
local real dx
local real dy
local real d
local integer Node = 0
local real damage
loop
set Node = udg_LL_NextNode[Node]
exitwhen Node == 0
if udg_LL_Duration[Node] > 0.00 and not(IsUnitType(udg_LL_Target[Node], UNIT_TYPE_DEAD) == true) then
set udg_LL_Duration[Node] = udg_LL_Duration[Node] - 0.031250
set x = GetUnitX(udg_LL_Target[Node])
set y = GetUnitY(udg_LL_Target[Node])
set z = GetUnitFlyHeight(udg_LL_Target[Node]) + 50.00
set x2 = GetUnitX(udg_LL_Globe[Node])
set y2 = GetUnitY(udg_LL_Globe[Node])
set z2 = GetUnitFlyHeight(udg_LL_Globe[Node]) + 100.00
// Moving the lightning
call MoveLightningEx(udg_LL_Lightning[Node], false, x2, y2, z2, x, y, z)
// Calculating the distance to check later if it has been exceeded
set dx = x2 - x
set dy = y2 - y
set d = SquareRoot(dx*dx + dy*dy)
// Damaging the target
set damage = (d / 15) * 0.031250
call UnitDamageTarget(udg_LL_Caster[Node], udg_LL_Target[Node], damage, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
// Using a counter duration variable to reduce the special effect spam
set udg_LL_CounterDuration[Node] = udg_LL_CounterDuration[Node] - 0.031250
if udg_LL_CounterDuration[Node] < 0.00 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\FarseerMissile\\FarseerMissile.mdl", udg_LL_Target[Node], "chest"))
set udg_LL_CounterDuration[Node] = 0.15625
endif
// Hovering the globe to make it look less stiff
set udg_LL_Height[Node] = GetUnitFlyHeight(udg_LL_Globe[Node])
if udg_LL_Boolean[Node] == true then
set udg_LL_Height[Node] = udg_LL_Height[Node] - 4.00
if udg_LL_Height[Node] < 50.00 then
set udg_LL_Boolean[Node] = false
endif
else
set udg_LL_Height[Node] = udg_LL_Height[Node] + 4.00
if udg_LL_Height[Node] > 250.00 then
set udg_LL_Boolean[Node] = true
endif
endif
call SetUnitFlyHeight(udg_LL_Globe[Node], udg_LL_Height[Node], 0.00)
// Increasing the globe's size at first, to prevent it from appearing out of thin air
if udg_LL_Size[Node] < 1.70 then
set udg_LL_Size[Node] = udg_LL_Size[Node] + 0.07
endif
call SetUnitScale(udg_LL_Globe[Node], udg_LL_Size[Node], 0.00, 0.00)
// Checking if the distance has been exceeded
if d > 800.00 then
set udg_LL_Duration[Node] = 0.00
endif
else
// Spell ended, recycle
call UnitApplyTimedLife(udg_LL_Globe[Node], 'BTLF', 0.01)
call DestroyLightning(udg_LL_Lightning[Node])
call LL_Recycle(Node)
endif
endloop
endfunction
// Linked list node creation
function LL_CreateNode takes nothing returns integer
local integer Node = 0
if (udg_LL_RecyclableNodes == 0) then
set udg_LL_NodeNumber = udg_LL_NodeNumber + 1
set Node = udg_LL_NodeNumber
else
set udg_LL_RecyclableNodes = udg_LL_RecyclableNodes - 1
set Node = udg_LL_RecycleNodes[udg_LL_RecyclableNodes]
endif
set udg_LL_NextNode[Node] = 0
set udg_LL_NextNode[udg_LL_LastNode] = Node
set udg_LL_PrevNode[Node] = udg_LL_LastNode
set udg_LL_LastNode = Node
set udg_LL_AbilityCounter = udg_LL_AbilityCounter + 1
if (udg_LL_AbilityCounter == 1) then
call TimerStart(udg_LL_Timer, 0.031250, true, function LL_Loop) // Interval
endif
return Node
endfunction
// Function onCast
function LL_OnCast takes nothing returns boolean
local real x
local real y
local real z
local real x2
local real y2
local real z2
local player p
local integer Node
// Checking if the ability casted is Lightning Lock
if (GetSpellAbilityId() == 'A0B0') then
// Creating the node, initializing the variables
set Node = LL_CreateNode()
set udg_LL_Duration[Node] = 7.00
set p = GetTriggerPlayer()
set udg_LL_Target[Node] = GetSpellTargetUnit()
set udg_LL_Caster[Node] = GetTriggerUnit()
set x = GetUnitX(udg_LL_Target[Node])
set y = GetUnitY(udg_LL_Target[Node])
set z = GetUnitFlyHeight(udg_LL_Target[Node]) + 50.00
// Creating the globe
set udg_LL_Globe[Node] = CreateUnit(p, 'h029', x, y, GetRandomReal(1, 360))
set x2 = GetUnitX(udg_LL_Globe[Node])
set y2 = GetUnitY(udg_LL_Globe[Node])
set z2 = GetUnitFlyHeight(udg_LL_Globe[Node]) + 100.00
// Creating the lightning (forked lightning type)
set udg_LL_Lightning[Node] = AddLightningEx("FORK", false, x2, y2, z2, x, y, z)
set udg_LL_Height[Node] = GetUnitFlyHeight(udg_LL_Globe[Node])
set udg_LL_Boolean[Node] = false
set udg_LL_CounterDuration[Node] = 0.00
set udg_LL_Size[Node] = 0.10
endif
return false
endfunction
// Initialization function
function InitTrig_Lightning_Lock takes nothing returns nothing
local trigger LL = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(LL, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(LL, Condition(function LL_OnCast))
endfunction
//TESH.scrollpos=20
//TESH.alwaysfold=0
// Linked list recycling function
function FB_Recycle takes integer Node returns nothing
if (udg_FB_LastNode == Node) then
set udg_FB_LastNode = udg_FB_PrevNode[Node]
endif
set udg_FB_RecycleNodes[udg_FB_RecyclableNodes] = Node
set udg_FB_RecyclableNodes = udg_FB_RecyclableNodes + 1
set udg_FB_NextNode[udg_FB_PrevNode[Node]] = udg_FB_NextNode[Node]
set udg_FB_PrevNode[udg_FB_NextNode[Node]] = udg_FB_PrevNode[Node]
set udg_FB_AbilityCounter = udg_FB_AbilityCounter - 1
if (udg_FB_AbilityCounter == 0) then
call PauseTimer(udg_FB_Timer)
endif
endfunction
// Main function of the spell (loop)
function FB_Loop takes nothing returns nothing
local integer Node = 0
local real x
local real y
local unit u
loop
set Node = udg_FB_NextNode[Node]
exitwhen Node == 0
if udg_FB_Duration[Node] > 0.00 and (GetUnitCurrentOrder(udg_FB_Caster[Node]) == 852600) then
set udg_FB_Duration[Node] = udg_FB_Duration[Node] - 0.031250
set udg_FB_Size[Node] = udg_FB_Size[Node] + 0.1250
call SetUnitScale(udg_FB_Sphere[Node], udg_FB_Size[Node], 0.00, 0.00)
if UnitHasItemOfTypeBJ(udg_FB_Caster[Node], 'I02X') then
set udg_ISI_Load = LoadIntegerBJ(14, udg_ISI_CCIntegerHandle[Node], udg_ISI_Hashtable)
set udg_FB_Damage[Node] = udg_FB_Damage[Node] + 1.5625 + (0.6250 * udg_ISI_Load)
else
set udg_FB_Damage[Node] = udg_FB_Damage[Node] + 1.5625
endif
set udg_FB_AoE[Node] = udg_FB_AoE[Node] + 4.6875
else
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl", udg_FB_Sphere[Node], "origin"))
call DestroyEffect(udg_FB_SpecialEf[Node])
call UnitApplyTimedLife(udg_FB_Sphere[Node], 'BTLF', 0.01)
set x = GetUnitX(udg_FB_Sphere[Node])
set y = GetUnitY(udg_FB_Sphere[Node])
call GroupEnumUnitsInRange(udg_FB_TempGroup, x, y, udg_FB_AoE[Node], null)
loop
set u = FirstOfGroup(udg_FB_TempGroup)
exitwhen u == null
if not(IsUnitType(u, UNIT_TYPE_DEAD) == true) and not(IsUnitType(u, UNIT_TYPE_DEAD) == true) and not(IsUnitAlly(u, udg_FB_Player[Node]) == true) and GetUnitAbilityLevel(u, 'ACEV') == 0 then
call UnitDamageTarget(udg_FB_Caster[Node], u, udg_FB_Damage[Node], true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
endif
call GroupRemoveUnit(udg_FB_TempGroup, u)
endloop
call FB_Recycle(Node)
endif
endloop
endfunction
// Linked list node creation
function FB_CreateNode takes nothing returns integer
local integer Node = 0
if (udg_FB_RecyclableNodes == 0) then
set udg_FB_NodeNumber = udg_FB_NodeNumber + 1
set Node = udg_FB_NodeNumber
else
set udg_FB_RecyclableNodes = udg_FB_RecyclableNodes - 1
set Node = udg_FB_RecycleNodes[udg_FB_RecyclableNodes]
endif
set udg_FB_NextNode[Node] = 0
set udg_FB_NextNode[udg_FB_LastNode] = Node
set udg_FB_PrevNode[Node] = udg_FB_LastNode
set udg_FB_LastNode = Node
set udg_FB_AbilityCounter = udg_FB_AbilityCounter + 1
if (udg_FB_AbilityCounter == 1) then
call TimerStart(udg_FB_Timer, 0.031250, true, function FB_Loop) // Interval
endif
return Node
endfunction
// Function onCast
function FB_OnCast takes nothing returns boolean
local real x
local real y
local real x2
local real y2
local real angle
local integer Node
if (GetSpellAbilityId() == 'A0AZ') or (GetSpellAbilityId() == 'A0BA') then
set Node = FB_CreateNode()
set udg_FB_Player[Node] = GetTriggerPlayer()
set udg_FB_Duration[Node] = 0.50
set udg_FB_Caster[Node] = GetTriggerUnit()
set x = GetUnitX(udg_FB_Caster[Node])
set y = GetUnitY(udg_FB_Caster[Node])
set angle = GetUnitFacing(udg_FB_Caster[Node])
set x2 = x + 600 * Cos(Deg2Rad(angle))
set y2 = y + 600 * Sin(Deg2Rad(angle))
set udg_FB_Sphere[Node] = CreateUnit(udg_FB_Player[Node], 'h02A', x2, y2, angle)
set udg_FB_Size[Node] = 0.10
set udg_FB_Damage[Node] = 5.00
set udg_FB_AoE[Node] = 50.00
set udg_FB_SpecialEf[Node] = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl", udg_FB_Sphere[Node], "origin")
set udg_ISI_CCIntegerHandle[Node] = GetHandleIdBJ(GetTriggerUnit())
endif
return false
endfunction
// Initialization function
function InitTrig_Force_Blast takes nothing returns nothing
local trigger FB = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(FB, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(FB, Condition(function FB_OnCast))
endfunction
//TESH.scrollpos=152
//TESH.alwaysfold=0
//Linked list recycling function
function ABE_Recycle takes integer Node returns nothing
if (udg_BE_LastNode == Node) then
set udg_BE_LastNode = udg_BE_PrevNode[Node]
endif
set udg_BE_RecycleNodes[udg_BE_RecyclableNodes] = Node
set udg_BE_RecyclableNodes = udg_BE_RecyclableNodes + 1
set udg_BE_NextNode[udg_BE_PrevNode[Node]] = udg_BE_NextNode[Node]
set udg_BE_PrevNode[udg_BE_NextNode[Node]] = udg_BE_PrevNode[Node]
set udg_BE_AbilityCounter = udg_BE_AbilityCounter - 1
if (udg_BE_AbilityCounter == 0) then
call PauseTimer(udg_BE_Timer)
endif
endfunction
//Below is the main function of the spell (loop), it pulls one closest enemy towards the enchanted object
//If the unit goes out of range, selects a new target and exceeds the duration
function ABE_Loop takes nothing returns nothing
local real x
local real y
local real z
local real x2
local real y2
local real z2
local real dx
local real dy
local integer Node = 0
local real angle
local unit u
local real d
loop
set Node = udg_BE_NextNode[Node]
exitwhen Node == 0
if udg_BE_Duration[Node] > 0.00 then
set udg_BE_Duration[Node] = udg_BE_Duration[Node] - 0.031250
set x = GetUnitX(udg_BE_EnchantedObj[Node])
set y = GetUnitY(udg_BE_EnchantedObj[Node])
// Calculating the nearest unit
if udg_BE_Check[Node] == 0 then
call GroupEnumUnitsInRange(udg_BE_TempGroup, x, y, udg_ABE_LatchRange[udg_ABE_AbilityIndex[Node]], null)
loop
set u = FirstOfGroup(udg_BE_TempGroup)
exitwhen u == null
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 < udg_ABE_LatchRange[udg_ABE_AbilityIndex[Node]] and u != udg_BE_EnchantedObj[Node] and GetUnitAbilityLevel(u, 'A06T') == 0 and IsUnitAlly(u, udg_BE_Player[Node]) == false and not(IsUnitType(u, UNIT_TYPE_DEAD)) then
set udg_BE_Target[Node] = FirstOfGroup(udg_BE_TempGroup)
set udg_ABE_LatchRange[udg_ABE_AbilityIndex[Node]] = d
endif
call GroupRemoveUnit(udg_BE_TempGroup, u)
endloop
endif
// Setting up the global integer to keep the spell from checking for a new target
if udg_BE_Check[Node] == 0 and udg_BE_Target[Node] != null then
set udg_BE_Check[Node] = 1
set udg_BE_Duration[Node] = 5.00
endif
// Pulling the enemy
if udg_BE_Target[Node] != null then
set z = GetUnitFlyHeight(udg_BE_EnchantedObj[Node]) + 50.00
set x2 = GetUnitX(udg_BE_Target[Node])
set y2 = GetUnitY(udg_BE_Target[Node])
set z2 = GetUnitFlyHeight(udg_BE_Target[Node]) + 50.00
call MoveLightningEx(udg_BE_Lightning[Node], false, x, y, z, x2, y2, z2)
set angle = Atan2(y - y2, x - x2)
if (GetUnitAbilityLevel(udg_BE_EnchantedObj[Node], 'A0AX') == 1) then
call SetUnitX(udg_BE_Target[Node], x2 + 15.625 * Cos(angle)) // 500 MS
call SetUnitY(udg_BE_Target[Node], y2 + 15.625 * Sin(angle)) // 500 MS
else
call SetUnitX(udg_BE_Target[Node], x2 + 9.375 * Cos(angle)) // 300 MS
call SetUnitY(udg_BE_Target[Node], y2 + 9.375 * Sin(angle)) // 300 MS
endif
set dx = x2 - x
set dy = y2 - y
set d = SquareRoot(dx*dx + dy*dy)
endif
// Checking if the distance has been exceeded
if d > 500 and udg_BE_Target[Node] != null and udg_BE_Check[Node] == 1 then
set udg_BE_Duration[Node] = 0.00
endif
// If the duration has ended, clean up
else
call DestroyLightning(udg_BE_Lightning[Node])
call DestroyEffect(udg_BE_SpecialEf[Node])
call ABE_Recycle(Node)
endif
endloop
endfunction
// Linked list node creation
function ABE_CreateNode takes nothing returns integer
local integer Node = 0
if (udg_BE_RecyclableNodes == 0) then
set udg_BE_NodeNumber = udg_BE_NodeNumber + 1
set Node = udg_BE_NodeNumber
else
set udg_BE_RecyclableNodes = udg_BE_RecyclableNodes - 1
set Node = udg_BE_RecycleNodes[udg_BE_RecyclableNodes]
endif
set udg_BE_NextNode[Node] = 0
set udg_BE_NextNode[udg_BE_LastNode] = Node
set udg_BE_PrevNode[Node] = udg_BE_LastNode
set udg_BE_LastNode = Node
set udg_BE_AbilityCounter = udg_BE_AbilityCounter + 1
if (udg_BE_AbilityCounter == 1) then
call TimerStart(udg_BE_Timer, 0.031250, true, function ABE_Loop)
endif
return Node
endfunction
// Function onCast, sets up the base for the ability
function ABE_OnCast takes nothing returns boolean
local integer Node
local unit u
local real x
local real y
local real z
local integer i
local integer i2
local integer count = 0
local integer random
local unit u2
// Checking if the casted ability is right
if (GetSpellAbilityId() == 'A0B7') then
set Node = ABE_CreateNode()
set udg_BE_Player[Node] = GetTriggerPlayer()
set udg_BE_Target[Node] = null
set udg_BE_Check[Node] = 0
set udg_BE_Duration[Node] = 6.00
set u2 = GetTriggerUnit()
set udg_ABE_AbilityIndex[Node] = GetUnitAbilityLevel(u, 'A0B7')
set x = GetSpellTargetX()
set y = GetSpellTargetY()
// Getting the random unit from the targeted AoE
call GroupEnumUnitsInRange(udg_BE_TempGroup, x, y, udg_ABE_AoE[udg_ABE_AbilityIndex[Node]], null)
loop
set u = FirstOfGroup(udg_BE_TempGroup)
exitwhen u == null
set i = GetUnitAbilityLevel(u, 'A0AX')
set i2 = GetUnitAbilityLevel(u, 'A06T')
if (not IsUnitType(u, UNIT_TYPE_DEAD)) and (not IsUnitType(u, UNIT_TYPE_STRUCTURE)) and (i2 == 0 or i == 1) then
set count = count + 1
call GroupAddUnit(udg_BE_Swap, u)
endif
call GroupRemoveUnit(udg_BE_TempGroup, u)
endloop
set random = GetRandomInt(0, count)
set count = 0
loop
set u = FirstOfGroup(udg_BE_Swap)
exitwhen u == null
set count = count + 1
if count == random then
set udg_BE_Unit = u
endif
call GroupRemoveUnit(udg_BE_Swap, u)
endloop
// Adding the lightning and the special "brilliance aura" effect to the target
set udg_BE_EnchantedObj[Node] = udg_BE_Unit
set udg_BE_SpecialEf[Node] = AddSpecialEffectTarget("Abilities\\Weapons\\FarseerMissile\\FarseerMissile.mdl", udg_BE_EnchantedObj[Node], "chest")
set z = GetUnitFlyHeight(udg_BE_EnchantedObj[Node]) + 50.00
set udg_BE_Lightning[Node] = AddLightningEx("CHIM", false, x, y, z, x, y, z)
endif
set u2 = null
return false
endfunction
// Initializing the trigger
function InitTrig_Arena_Binding_Enchant takes nothing returns nothing
local trigger BE = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(BE, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(BE, Condition(function ABE_OnCast))
endfunction
//TESH.scrollpos=85
//TESH.alwaysfold=0
// Linked list recycle
function ASB_Recycle takes integer Node returns nothing
if (udg_SB_LastNode == Node) then
set udg_SB_LastNode = udg_SB_PrevNode[Node]
endif
set udg_SB_RecycleNodes[udg_SB_RecyclableNodes] = Node
set udg_SB_RecyclableNodes = udg_SB_RecyclableNodes + 1
set udg_SB_NextNode[udg_SB_PrevNode[Node]] = udg_SB_NextNode[Node]
set udg_SB_PrevNode[udg_SB_NextNode[Node]] = udg_SB_PrevNode[Node]
set udg_SB_AbilityCounter = udg_SB_AbilityCounter - 1
if (udg_SB_AbilityCounter == 0) then
call PauseTimer(udg_SB_Timer)
endif
endfunction
// Loop
function ASB_Loop takes nothing returns nothing
local real x
local real y
local real x2
local real y2
local real angle
local integer Node = 0
local unit u
local real dx
local real dy
local real d
loop
set Node = udg_SB_NextNode[Node]
exitwhen Node == 0
if udg_SB_Duration[Node] > 0 and not(IsUnitType(udg_SB_Target[Node], UNIT_TYPE_DEAD) == true) then
set udg_SB_Duration[Node] = udg_SB_Duration[Node] - 0.031250
set x = GetUnitX(udg_SB_Target[Node])
set y = GetUnitY(udg_SB_Target[Node])
set x2 = GetUnitX(udg_SB_Ball[Node])
set y2 = GetUnitY(udg_SB_Ball[Node])
set dx = x2 - x
set dy = y2 - y
set d = SquareRoot(dx*dx + dy*dy)
set angle = Atan2(y - y2, x - x2)
call SetUnitX(udg_SB_Ball[Node], x2 + udg_SB_Speed[Node] * Cos(angle))
call SetUnitY(udg_SB_Ball[Node], y2 + udg_SB_Speed[Node] * Sin(angle))
set udg_SB_Speed[Node] = udg_SB_Speed[Node] + 0.09765625 // Interval value
call SetUnitScale(udg_SB_Ball[Node], udg_SB_Size[Node], 0.00, 0.00)
set udg_SB_Size[Node] = udg_SB_Size[Node] + 0.015625 // Interval value
call GroupEnumUnitsInRange(udg_SB_TempGroup, x2, y2, udg_SB_KnockbackAoE[Node], null)
loop
set u = FirstOfGroup(udg_SB_TempGroup)
exitwhen u == null
if not(IsUnitType(u, UNIT_TYPE_DEAD) == true) and GetUnitAbilityLevel(u, 'ACEV') == 0 and not(IsUnitAlly(u, udg_SB_Player[Node]) == true) and not(IsUnitType(u, UNIT_TYPE_STRUCTURE)) then
set x = GetUnitX(u)
set y = GetUnitY(u)
set angle = Atan2(y - y2, x - x2)
call SetUnitX(u, x + 5.00 * Cos(angle)) // Interval value
call SetUnitY(u, y + 5.00 * Sin(angle)) // Interval value
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl", u, "origin"))
endif
call GroupRemoveUnit(udg_SB_TempGroup, u)
endloop
set udg_SB_KnockbackAoE[Node] = udg_SB_KnockbackAoE[Node] + 1.250 // Interval value
set udg_SB_Damage[Node] = udg_SB_Damage[Node] + udg_ASB_Damage[udg_ASB_AbilityIndex[Node]] // Interval value
if d < 50.00 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Orc\\LightningBolt\\LightningBoltMissile.mdl", udg_SB_Target[Node], "chest"))
call UnitDamageTarget(udg_SB_Caster[Node], udg_SB_Target[Node], udg_SB_Damage[Node], true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set udg_SB_Duration[Node] = 0.00
endif
else
call UnitApplyTimedLife(udg_SB_Ball[Node], 'BTLF', 0.01)
call ASB_Recycle(Node)
endif
endloop
endfunction
// Linked list node creation
function ASB_CreateNode takes nothing returns integer
local integer Node = 0
if (udg_SB_RecyclableNodes == 0) then
set udg_SB_NodeNumber = udg_SB_NodeNumber + 1
set Node = udg_SB_NodeNumber
else
set udg_SB_RecyclableNodes = udg_SB_RecyclableNodes - 1
set Node = udg_SB_RecycleNodes[udg_SB_RecyclableNodes]
endif
set udg_SB_NextNode[Node] = 0
set udg_SB_NextNode[udg_SB_LastNode] = Node
set udg_SB_PrevNode[Node] = udg_SB_LastNode
set udg_SB_LastNode = Node
set udg_SB_AbilityCounter = udg_SB_AbilityCounter + 1
if (udg_SB_AbilityCounter == 1) then
call TimerStart(udg_SB_Timer, 0.031250, true, function SB_Loop) // Interval
endif
return Node
endfunction
// Linked list onCast
function ASB_OnCast takes nothing returns boolean
local real x
local real y
local integer Node
if (GetSpellAbilityId() == 'A0B8') then
set Node = ASB_CreateNode()
set udg_SB_Player[Node] = GetTriggerPlayer()
set udg_SB_Target[Node] = GetSpellTargetUnit()
set udg_SB_Caster[Node] = GetTriggerUnit()
set udg_ASB_AbilityIndex[Node] = GetUnitAbilityLevel(udg_SB_Caster[Node], 'A0B8')
set x = GetUnitX(udg_SB_Caster[Node])
set y = GetUnitY(udg_SB_Caster[Node])
set udg_SB_Ball[Node] = CreateUnit(udg_SB_Player[Node], 'h028', x, y, GetUnitFacing(udg_SB_Caster[Node]))
set udg_SB_Size[Node] = 0.50
set udg_SB_Speed[Node] = 3.125 // Interval value
set udg_SB_KnockbackAoE[Node] = 50.00
set udg_SB_Duration[Node] = udg_ASB_Duration[udg_ASB_AbilityIndex[Node]]
set udg_SB_Damage[Node] = 10.00
endif
return false
endfunction
// Initialization function
function InitTrig_Arena_Shock_Burst takes nothing returns nothing
local trigger SB = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(SB, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(SB, Condition(function ASB_OnCast))
endfunction
//TESH.scrollpos=112
//TESH.alwaysfold=0
// Linked list recycling function
function ALL_Recycle takes integer Node returns nothing
if (udg_LL_LastNode == Node) then
set udg_LL_LastNode = udg_LL_PrevNode[Node]
endif
set udg_LL_RecycleNodes[udg_LL_RecyclableNodes] = Node
set udg_LL_RecyclableNodes = udg_LL_RecyclableNodes + 1
set udg_LL_NextNode[udg_LL_PrevNode[Node]] = udg_LL_NextNode[Node]
set udg_LL_PrevNode[udg_LL_NextNode[Node]] = udg_LL_PrevNode[Node]
set udg_LL_AbilityCounter = udg_LL_AbilityCounter - 1
if (udg_LL_AbilityCounter == 0) then
call PauseTimer(udg_LL_Timer)
endif
endfunction
// Main function of the spell (loop)
function ALL_Loop takes nothing returns nothing
local real x
local real y
local real z
local real x2
local real y2
local real z2
local real dx
local real dy
local real d
local integer Node = 0
local real damage
loop
set Node = udg_LL_NextNode[Node]
exitwhen Node == 0
if udg_LL_Duration[Node] > 0.00 and not(IsUnitType(udg_LL_Target[Node], UNIT_TYPE_DEAD) == true) then
set udg_LL_Duration[Node] = udg_LL_Duration[Node] - 0.031250
set x = GetUnitX(udg_LL_Target[Node])
set y = GetUnitY(udg_LL_Target[Node])
set z = GetUnitFlyHeight(udg_LL_Target[Node]) + 50.00
set x2 = GetUnitX(udg_LL_Globe[Node])
set y2 = GetUnitY(udg_LL_Globe[Node])
set z2 = GetUnitFlyHeight(udg_LL_Globe[Node]) + 75.00
// Moving the lightning
call MoveLightningEx(udg_LL_Lightning[Node], false, x2, y2, z2, x, y, z)
// Calculating the distance to check later if it has been exceeded
set dx = x2 - x
set dy = y2 - y
set d = SquareRoot(dx*dx + dy*dy)
// Damaging the target
set damage = (d / 15) * 0.031250
call UnitDamageTarget(udg_LL_Caster[Node], udg_LL_Target[Node], damage, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
// Using a counter duration variable to reduce the special effect spam
set udg_LL_CounterDuration[Node] = udg_LL_CounterDuration[Node] - 0.031250
if udg_LL_CounterDuration[Node] < 0.00 then
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\FarseerMissile\\FarseerMissile.mdl", udg_LL_Target[Node], "chest"))
set udg_LL_CounterDuration[Node] = 0.15625
endif
// Hovering the globe to make it look less stiff
set udg_LL_Height[Node] = GetUnitFlyHeight(udg_LL_Globe[Node])
if udg_LL_Boolean[Node] == true then
set udg_LL_Height[Node] = udg_LL_Height[Node] - 4.00
if udg_LL_Height[Node] < 50.00 then
set udg_LL_Boolean[Node] = false
endif
else
set udg_LL_Height[Node] = udg_LL_Height[Node] + 4.00
if udg_LL_Height[Node] > 250.00 then
set udg_LL_Boolean[Node] = true
endif
endif
call SetUnitFlyHeight(udg_LL_Globe[Node], udg_LL_Height[Node], 0.00)
// Increasing the globe's size at first, to prevent it from appearing out of thin air
if udg_LL_Size[Node] < 1.70 then
set udg_LL_Size[Node] = udg_LL_Size[Node] + 0.07
endif
call SetUnitScale(udg_LL_Globe[Node], udg_LL_Size[Node], 0.00, 0.00)
// Checking if the distance has been exceeded
if d > 800.00 then
set udg_LL_Duration[Node] = 0.00
endif
else
// Spell ended, recycle
call UnitApplyTimedLife(udg_LL_Globe[Node], 'BTLF', 0.01)
call DestroyLightning(udg_LL_Lightning[Node])
call ALL_Recycle(Node)
endif
endloop
endfunction
// Linked list node creation
function ALL_CreateNode takes nothing returns integer
local integer Node = 0
if (udg_LL_RecyclableNodes == 0) then
set udg_LL_NodeNumber = udg_LL_NodeNumber + 1
set Node = udg_LL_NodeNumber
else
set udg_LL_RecyclableNodes = udg_LL_RecyclableNodes - 1
set Node = udg_LL_RecycleNodes[udg_LL_RecyclableNodes]
endif
set udg_LL_NextNode[Node] = 0
set udg_LL_NextNode[udg_LL_LastNode] = Node
set udg_LL_PrevNode[Node] = udg_LL_LastNode
set udg_LL_LastNode = Node
set udg_LL_AbilityCounter = udg_LL_AbilityCounter + 1
if (udg_LL_AbilityCounter == 1) then
call TimerStart(udg_LL_Timer, 0.031250, true, function ALL_Loop) // Interval
endif
return Node
endfunction
// Function onCast
function ALL_OnCast takes nothing returns boolean
local real x
local real y
local real z
local real x2
local real y2
local real z2
local player p
local integer Node
// Checking if the ability casted is Lightning Lock
if (GetSpellAbilityId() == 'A0B9') then
// Creating the node, initializing the variables
set Node = LL_CreateNode()
set p = GetTriggerPlayer()
set udg_LL_Target[Node] = GetSpellTargetUnit()
set udg_LL_Caster[Node] = GetTriggerUnit()
set udg_ALL_AbilityIndex[Node] = GetUnitAbilityLevel(udg_LL_Caster[Node], 'A0B9')
set udg_LL_Duration[Node] = udg_ALL_Duration[udg_ALL_AbilityIndex[Node]]
set x = GetUnitX(udg_LL_Target[Node])
set y = GetUnitY(udg_LL_Target[Node])
set z = GetUnitFlyHeight(udg_LL_Target[Node]) + 50.00
// Creating the globe
set udg_LL_Globe[Node] = CreateUnit(p, 'h029', x, y, GetRandomReal(1, 360))
set x2 = GetUnitX(udg_LL_Globe[Node])
set y2 = GetUnitY(udg_LL_Globe[Node])
set z2 = GetUnitFlyHeight(udg_LL_Globe[Node]) + 75.00
// Creating the lightning (forked lightning type)
set udg_LL_Lightning[Node] = AddLightningEx("FORK", false, x2, y2, z2, x, y, z)
set udg_LL_Height[Node] = GetUnitFlyHeight(udg_LL_Globe[Node])
set udg_LL_Boolean[Node] = false
set udg_LL_CounterDuration[Node] = 0.00
set udg_LL_Size[Node] = 0.10
endif
return false
endfunction
// Initialization function
function InitTrig_Arena_Lightning_Lock takes nothing returns nothing
local trigger LL = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(LL, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(LL, Condition(function ALL_OnCast))
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function LavaDamage takes nothing returns nothing
local unit u
local real x
local real y
local rect r = GetWorldBounds()
call GroupEnumUnitsInRect(udg_TempGroup, r, null)
loop
set u = FirstOfGroup(udg_TempGroup)
exitwhen u == null
if not(IsUnitType(u, UNIT_TYPE_DEAD)) then
set x = GetUnitX(u)
set y = GetUnitY(u)
if (GetTerrainType(x, y) == 'Dlav') then
call UnitDamageTarget(u, u, 3, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS)
call SetUnitX(u, (x + 6.00 * Cos(bj_PI)))
call SetUnitY(u, (y + 6.00 * Sin(bj_PI)))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\Weapons\\FireBallMissile\\FireBallMissile.mdl", u, "origin"))
endif
endif
call GroupRemoveUnit(udg_TempGroup, u)
endloop
endfunction
function InitTrig_Lava takes nothing returns nothing
local trigger LD = CreateTrigger()
call TriggerRegisterTimerEvent(LD, 0.20, true)
call TriggerAddAction(LD, function LavaDamage)
endfunction