Name | Type | is_array | initial_value |
ADloc | location | No | |
AE_learn | unit | No | |
AF_CasterLoc | location | No | |
AF_SpellLoc | location | No | |
AI_Check | boolean | No | |
AI_Grupo | group | Yes | |
AI_Heroe | unit | Yes | |
AI_Heroe_Item | integer | Yes | |
AI_Heroe_Rol | integer | Yes | |
AI_ItemCarry | itemcode | Yes | |
AI_ItemCarry1 | itemcode | Yes | |
AI_ItemCarry2 | itemcode | Yes | |
AI_ItemCarry3 | itemcode | Yes | |
AI_ItemSupport1 | itemcode | Yes | |
AI_ItemSupport2 | itemcode | Yes | |
AI_ItemTank1 | itemcode | Yes | |
AI_ItemTank2 | itemcode | Yes | |
AI_OrdenActual | boolean | Yes | |
AI_Punto | location | Yes | |
AI_PuntosAtacarBosque | rect | Yes | |
AI_PuntosAtacarMAA | rect | Yes | |
AI_PuntosAtacarMAA_Total | integer | No | |
AI_PuntosBosque | rect | Yes | |
AI_PuntosEstancados_Total | integer | No | |
AI_RandomInteger | integer | Yes | |
APpoint | location | No | |
APPrandom | integer | No | |
ARcaster | unit | No | |
ARdistance | real | No | |
ARdummy | unit | No | |
ARgroup | group | No | |
ArmorPen_loc | location | No | |
ARpos | location | No | |
ARposoff | location | No | |
Arrebato_Attacks | integer | Yes | |
Arrebato_Hero | unit | Yes | |
Azote_Boolean | boolean | Yes | |
Azote_Caster | unit | Yes | |
Azote_Distance | real | Yes | |
Azote_GroupDamage | group | No | |
Azote_Integer | integer | Yes | |
Azote_Pos | location | No | |
Azote_PosOff | location | No | |
BlueCreepsSpawn | location | Yes | |
BuffedGroup | group | No | |
Carrera_Angulo | real | No | |
Carrera_Boolean | boolean | Yes | |
Carrera_Caster | unit | Yes | |
Carrera_Distance | real | Yes | |
Carrera_Group | group | No | |
Carrera_GroupAlready | group | Yes | |
Carrera_Integer | integer | Yes | |
Carrera_Pos | location | No | |
Carrera_PosOff | location | No | |
Carrera_SFX | effect | Yes | |
Carrera_Target | unit | Yes | |
Carrera_X | real | No | |
Carrera_Y | real | No | |
CCcaster | unit | No | |
CCdummy | unit | No | |
CCloc | location | No | |
CCrandom | integer | No | |
Celeridad_Counts | integer | Yes | |
Celeridad_Max | integer | Yes | |
CErandom | integer | No | |
CH_Boolean | boolean | Yes | |
CH_Caster | unit | Yes | |
CH_Dummy | unit | Yes | |
CH_Integer | integer | Yes | |
CH_Point | location | No | |
Charge_Boolean | boolean | Yes | |
Charge_Caster | unit | Yes | |
Charge_Distance | real | Yes | |
Charge_Group | group | No | |
Charge_Integer | integer | Yes | |
Charge_Pos | location | No | |
Charge_Pos_Cas | location | No | |
Charge_Pos_Off | location | No | |
Charge_Temp | integer | No | |
Cincel_AttackLimit | integer | No | |
Cincel_Attacks | integer | Yes | |
Cincel_Hero | unit | Yes | |
CM_Player | player | No | |
CMvalue | real | No | |
CorazonHieloRandom | integer | No | |
Cpoint | location | No | |
CREEPmenor | unitcode | Yes | |
CREEPminors | integer | No | |
CREEPrandom | unitcode | Yes | |
CREEPtotal | integer | No | |
CRrandom | integer | No | |
CS_Instances | real | Yes | |
Curse_Activated | boolean | No | |
Curse_AI | boolean | No | |
Curse_BlueBooleana | boolean | No | |
Curse_Favors | integer | Yes | |
Curse_Integer | integer | No | |
Curse_Point | location | Yes | |
Curse_Points | integer | Yes | |
Curse_RandomMinions | integer | No | |
Curse_RedBooleana | boolean | No | |
Curse_TextPoints | texttag | No | |
Curse_Timer | timer | No | |
Curse_TimerShow | timerdialog | No | |
Curse_Total | integer | No | |
CV_Dummy | unit | No | |
DamageBlockingAbility | abilcode | No | |
DamageEvent | real | No | |
DamageEventAmount | real | No | |
DamageEventAOE | integer | No | |
DamageEventAOEGroup | group | No | |
DamageEventCritical | boolean | No | |
DamageEventCriticalOverride | boolean | No | |
DamageEventExplodesUnit | boolean | No | |
DamageEventFilterUnit | unit | No | |
DamageEventLevel | integer | No | |
DamageEventOverride | boolean | No | |
DamageEventPrevAmt | real | No | |
DamageEventSource | unit | No | |
DamageEventsWasted | integer | No | |
DamageEventTarget | unit | No | |
DamageEventTrigger | trigger | No | |
DamageEventType | integer | No | |
DamageModifierEvent | real | No | |
DamageTypeBlocked | integer | No | |
DamageTypeCriticalStrike | integer | No | |
DamageTypeDOT | integer | No | |
DamageTypeExplosive | integer | No | |
DamageTypeHeal | integer | No | |
DamageTypePure | integer | No | |
DamageTypeRanged | integer | No | |
DamageTypeReduced | integer | No | |
DamageTypeSpell | integer | No | |
Danza_loc | location | No | |
DBpoint | location | No | |
DBrandom | integer | No | |
DF_Boolean | boolean | Yes | |
DF_Boolean2 | boolean | Yes | |
DF_Caster | unit | Yes | |
DF_Damage | real | Yes | |
DF_Damage2 | real | Yes | |
DF_Dummy | unit | Yes | |
DF_Fallspeed | real | Yes | |
DF_Friendlydamage | boolean | Yes | |
DF_Group | group | Yes | |
DF_index | integer | Yes | |
DF_point | location | Yes | |
DF_Range | real | Yes | |
DF_Real | real | Yes | |
DF_Real2 | real | Yes | |
DF_SEffect1 | effect | Yes | |
DF_SEffect2 | effect | Yes | |
DF_Target | location | Yes | |
DF_Timer | integer | Yes | |
DF_Timer2 | integer | Yes | |
divine | itemcode | No | |
DmgEvBracers | itemcode | No | |
DmgEvLife | real | No | |
DmgEvN | integer | No | |
DmgEvRecursionN | integer | No | |
DmgEvRunning | boolean | No | |
DmgEvStack | unit | Yes | |
DmgEvStarted | boolean | No | |
DmgEvTimer | timer | No | |
DmgEvTrig | trigger | No | |
DMGS_Ability | abilcode | No | |
DMGS_Block | real | No | |
DMGS_BlockEvent | real | No | |
DMGS_CalculateBlock | trigger | No | |
DMGS_CalculateCrit | trigger | No | |
DMGS_CalculateEvasion | trigger | No | |
DMGS_Colour | string | Yes | |
DMGS_CritAttach | string | No | |
DMGS_CriticalBonus | real | No | |
DMGS_CriticalChance | real | No | |
DMGS_CriticalEvent | real | No | |
DMGS_CriticalPercent | real | No | |
DMGS_CritSFX | string | No | |
DMGS_Evasion | real | No | |
DMGS_EvasionEvent | real | No | |
DMGS_Floater | texttag | Yes | |
DMGS_Phase | integer | Yes | |
DMGS_Reduction | real | No | |
DMGS_ResetAbility | abilcode | No | |
DMGS_Size | real | Yes | |
DMGS_SizeDefault | real | No | |
DMGS_SizeHealthFactor | real | No | |
DMGS_SizeMax | real | No | |
DMGS_SizeMin | real | No | |
DMGS_Text | string | Yes | |
DMGS_TextIndex | integer | No | |
DMGS_TextSizeDecrease | real | Yes | |
DMGS_TextSizeDecreaseBase | real | No | |
DMGS_TextSizeIncrease | real | No | |
DmgTypPrev | integer | No | |
DRlife | real | No | |
DVrandom | integer | No | |
EdMcaster | unit | No | |
EDNcaster | unit | No | |
EDNcasterloc | location | No | |
EDNdistance | real | No | |
EDNray | lightning | No | |
EDNtarget | unit | No | |
EDNtargetloc | location | No | |
EDNtime | real | No | |
EDpoint | location | No | |
EDposition | location | No | |
EjecutarLife | real | No | |
EmpalarLoc | location | No | |
EVSloc | location | No | |
FForce_Distance | real | No | |
FForce_Pos | location | No | |
FForce_Pos_Off | location | No | |
FForce_Sfx | effect | No | |
FForcer | unit | No | |
Fuerza_1 | force | No | |
Fuerza_2 | force | No | |
furiacaido | item | No | |
fvdummy | unit | No | |
fvint | integer | No | |
fvloc | location | Yes | |
fvug | group | Yes | |
fvunit | unit | No | |
GolpeDivinoDamage | real | No | |
GolpeSombrio_Damage | real | No | |
GT_Attacks | integer | Yes | |
GT_Caster | unit | Yes | |
GT_CasterLoc | location | No | |
GT_Dummy | unit | No | |
GT_Player | player | No | |
H_CasPos | location | No | |
H_Caster | unit | No | |
H_CastNumber | integer | No | |
H_Direction | boolean | Yes | |
H_Distance | real | No | |
H_Group | group | No | |
H_HookHead | unit | No | |
H_Origin | location | Yes | |
H_Pos | location | No | |
H_PosOff | location | No | |
H_Ray | lightning | No | |
H_Switch | integer | No | |
H_Target | unit | Yes | |
H_TGroup | group | No | |
Hash | hashtable | No | |
Hcaster | unit | No | |
Hcasterposition | location | No | |
HeldrakeBot | unit | No | |
HeldrakeBotBlue | boolean | No | |
HeldrakeBotRed | boolean | No | |
HeldrakeKillPoint | location | No | |
HeldrakeMid | unit | No | |
HeldrakeMidBlue | boolean | No | |
HeldrakeMidRed | boolean | No | |
HeldrakePos | location | Yes | |
HeldrakePosMove | location | Yes | |
HeldrakeSFXPoint | location | Yes | |
HeldrakeTop | unit | No | |
HeldrakeTopBlue | boolean | No | |
HeldrakeTopRed | boolean | No | |
HEROE | unit | Yes | |
HeroeDeathTimer1 | timer | No | |
HeroeDeathTimer2 | timer | No | |
HeroeDeathTimer3 | timer | No | |
HeroeDeathTimer4 | timer | No | |
HeroeDeathTimer6 | timer | No | |
HeroeDeathTimer8 | timer | No | |
HeroeDeathTimerShow1 | timerdialog | No | |
HeroeDeathTimerShow2 | timerdialog | No | |
HeroeDeathTimerShow3 | timerdialog | No | |
HeroeDeathTimerShow4 | timerdialog | No | |
HeroeDeathTimerShow6 | timerdialog | No | |
HeroeDeathTimerShow8 | timerdialog | No | |
HeroesDisponibles | unitcode | Yes | |
HookAbility | abilcode | No | |
HookAllowAllyMagicImmune | boolean | No | |
HookAllowEnemyMagicImmune | boolean | No | |
HookAttackType | attacktype | No | |
HookChainBreakDistance | real | No | |
HookDamage | real | Yes | |
HookDamageType | damagetype | No | |
HookDisableWhileInUse | boolean | No | |
HookDummy | unitcode | No | |
HookGrabRadius | real | No | |
HookLightningEffect | lightningtype | No | |
HookLightningEffectEx | string | No | |
Hooks | group | Yes | |
HookSoundEffect | sound | No | |
HookSpecialEffect | string | No | |
HookTravelDistance | real | Yes | |
HookTravelDuration | real | No | |
HookTravelSpeed | real | No | |
HookUseLightningEx | boolean | No | |
HookUseSpeed | boolean | No | |
HuevoAI | boolean | No | |
HuevoHolderLoc | location | No | |
HuevoInteger | integer | No | |
HuevoItem | item | No | |
HuevoLoc | location | No | |
HuevoPicker | unit | No | |
HuevoTimer | timer | No | |
HuevoTimerVentana | timerdialog | No | |
IDcaster | unit | No | |
IDcasterlife | real | No | |
IDtarget | unit | No | |
IDtargetlife | real | No | |
Incinerar_Damage | real | No | |
Index | integer | Yes | |
InfestedUnits | group | No | |
IniciativaGroup | group | No | |
InsolacionRandom | integer | No | |
JudgementTarget | unit | No | |
LastDamageHP | real | No | |
LastDmgPrevAmount | real | Yes | |
LastDmgPrevType | integer | Yes | |
LastDmgSource | unit | Yes | |
LastDmgTarget | unit | Yes | |
LastDmgValue | real | Yes | |
LastDmgWasSpell | boolean | Yes | |
LeaderBoard | leaderboard | No | |
LeapBaseDistance | real | No | |
LeapBounceRate | real | No | |
LeapDistancePerLevel | real | No | |
LeapGP | group | No | |
LeapHandle | integer | No | |
LeapJumpRate | real | No | |
LeapJumpRateBounce | real | No | |
LeapPoint | location | No | |
LeapPoint1 | location | No | |
LeapSpeed | real | No | |
LeapUnit | unit | No | |
LeapZOffset | real | No | |
locattack | location | No | |
locspell | location | No | |
LoopA | integervar | No | |
LoopB | integervar | No | |
MA_Dummy | unit | No | |
Martillo_CasPos | location | No | |
Martillo_Caster | unit | No | |
Martillo_Distance | real | No | |
Martillo_Dummy | unit | No | |
Martillo_Group | group | No | |
Martillo_Pos | location | No | |
Martillo_PosOff | location | No | |
Martillo_TarPos | location | No | |
MBcaster | unit | No | |
MBloc | location | No | |
MentalidadRandom | integer | No | |
MFcaster | unit | No | |
MFdummy | unit | No | |
MFtarget | unit | No | |
MGbuff | buffcode | No | |
Mgroup | group | No | |
Mgroup_already | group | No | |
MH_Angle | real | Yes | |
MH_ApplyDamage | boolean | Yes | |
MH_Dest | real | No | |
MH_DestPoint | location | No | |
MH_Detector | group | No | |
MH_Distance | real | Yes | |
MH_DistCounter | real | Yes | |
MH_EndPoint | location | No | |
MH_Hook | unit | Yes | |
MH_HookChain | lightning | Yes | |
MH_HookedUnit | unit | Yes | |
MH_Hooker | unit | Yes | |
MH_HookerPos | location | Yes | |
MH_HookOn | boolean | Yes | |
MH_HookPos | location | Yes | |
MH_Index1 | integer | No | |
MH_Index2 | integer | No | |
MH_Level | integer | Yes | |
MH_OffsetConstant | real | No | |
MH_StartPoint | location | No | |
MH_TempPoint | location | No | |
MH_TempUnit | unit | No | |
MKBrandom | integer | No | |
MododeJuego | dialog | No | |
MododeJuegoNumber | button | Yes | |
MododeJuegoSelected | integer | No | |
Mostrar_Dano | boolean | Yes | true |
MRrandom | integer | No | |
Muere_Group | group | No | |
Muere_Loc | location | No | |
Mutilar_Attacks | integer | Yes | |
Mutilar_Hero | unit | Yes | |
MVmanaFaltante | real | No | |
MVTarget | unit | No | |
Necromastery_CheckGroup | group | No | |
Necromastery_KillCounts | integer | No | |
Necromastery_MaxCounts | integer | Yes | |
NetherPosicion1 | location | No | |
OAloc | location | No | |
Omnislash_CL_AbilityLevel | integer | Yes | |
Omnislash_CL_AOE | real | Yes | |
Omnislash_CL_Caster | unit | Yes | |
Omnislash_CL_Count | integer | Yes | |
Omnislash_CL_Damage | integer | Yes | |
Omnislash_CL_FirstTarget | boolean | Yes | |
Omnislash_CL_Group | group | Yes | |
Omnislash_CL_Loc | location | Yes | |
Omnislash_CL_Player | player | Yes | |
Omnislash_CL_Slashes | integer | Yes | |
Omnislash_CL_Target | unit | Yes | |
Omnislash_CL_Victim | unit | Yes | |
Omnislash_Max_Index | integer | No | |
Omnislash_MUI_1 | integer | No | |
Omnislash_MUI_2 | integer | Yes | |
Omnislash_MUI_3 | integervar | No | |
Omnislash_Temp | integer | No | |
OniricoCaster | unit | No | |
OniricoRandom | integer | No | |
Orbe_Damage | real | No | |
OS_DamageHeal | real | No | |
PA_random | integer | No | |
PApoint | location | No | |
phoenix | unit | No | |
phoenixmover | location | No | |
PickGroup | group | No | |
PinkSparkleCD | integer | Yes | |
Player_Kill_Racha | integer | Yes | |
Player_Kills | integer | Yes | |
Player_Unit_Heroes | unit | Yes | |
PlayerGold | integer | No | |
PNCaster | unit | No | |
PNCastLoc | location | No | |
PNLocOffset | location | Yes | |
PNReal | real | No | |
POcaster | unit | No | |
PRSloc | location | No | |
PS_loc | location | No | |
QM_value | real | No | |
QMA_amount | real | No | |
QMA_Random | integer | No | |
Qpoint | location | No | |
RAR_random | integer | No | |
RARdummy | unit | No | |
RARloc | location | No | |
RARpos | location | No | |
RARtime | integer | No | |
Ravage_Caster | unit | No | |
Ravage_Dummy | unit | Yes | |
Ravage_DummyGroup | group | No | |
Ravage_Point | location | Yes | |
RedCreepsSpawn | location | Yes | |
ResetAbility | abilcode | No | |
ResetLevel | integer | No | |
ResetUnit | unit | No | |
ResPoint1 | location | No | |
ResPoint2 | location | No | |
RFdummy | unit | No | |
RFpoint | location | No | |
ROloc | location | No | |
SadismInteger | integer | Yes | |
SadismTime | integer | Yes | |
Saigo_Max | integer | No | |
SArandom | integer | No | |
SatanFallCharges | integer | Yes | |
SBcaster | unit | No | |
SBdummy | unit | No | |
SBpoint | location | No | |
SBtarget | unit | No | |
SDdummy | unit | No | |
SDlearning | unit | No | |
SDloc | location | No | |
SedSangreRandom | integer | No | |
SentenciaLunarGroup | group | No | |
SentenciaLunarHeroes | integer | No | |
SentenciaLunarPos | location | No | |
SentenciaLunarUnits | integer | No | |
SIcaster | unit | No | |
Sierra_Booleana | boolean | No | |
Sierra_Caster | unit | No | |
Sierra_DistanceBetween | real | No | |
Sierra_DistanceTarget | real | No | |
Sierra_Dummy | unit | No | |
Sierra_Group | group | No | |
Sierra_PosCaster | location | No | |
Sierra_PosDummy | location | No | |
Sierra_PosDummyOff | location | No | |
Sierra_PosTarget | location | No | |
SILpos | location | No | |
Slow_loc | location | No | |
SnIcaster | unit | No | |
SolarGroup | group | No | |
SolarPoint | location | No | |
Sombra_Closest | unit | No | |
Sombra_Dummy | unit | Yes | |
Sombra_Group | group | No | |
Sombra_Integer | integer | No | |
Sombra_ShortestDistance | real | No | |
Sombraloc | location | No | |
spellgroup | group | No | |
SRrandom | integer | No | |
SScaster | unit | No | |
SSdummy | unit | No | |
Stone_Caster | unit | No | |
Stone_Dummy | unit | No | |
Stone_DummyStun | unit | No | |
Stone_Effect | effect | No | |
Stone_Group | group | No | |
Stone_GroupAlready | group | No | |
Stone_Pos | location | No | |
Stone_PosOff | location | No | |
Stone_Time | real | No | |
Stored_Unit | unit | Yes | |
STpoint | location | No | |
SuckedUnits | group | No | |
Table | leaderboard | No | |
TE_point | location | No | |
TeamAzulCreeps | integer | Yes | |
TeamAzulDragon | boolean | No | |
TeamAzulGolem | boolean | No | |
TeamAzulHidra | boolean | No | |
TeamAzulMenor | integer | Yes | |
TeamRojoCreeps | integer | Yes | |
TeamRojoDragon | boolean | No | |
TeamRojoGolem | boolean | No | |
TeamRojoHidra | boolean | No | |
TeamRojoMenor | integer | Yes | |
TEcaster | unit | No | |
TEdummy | unit | No | |
TEMPENT | integer | No | |
TempFloatText | texttag | No | |
tempgroup | group | No | |
TempReal | real | No | |
TempUnit | unit | No | |
TEpoint | location | No | |
TEpos | location | No | |
TErandom | integer | No | |
test | boolean | No | |
TEXcaster | unit | No | |
TFcaster | unit | No | |
TFcastpoint | location | No | |
TFdummy | unit | No | |
TFpoint | location | No | |
TGFA_Angulo | real | No | |
TGFA_Boolean | boolean | Yes | |
TGFA_Caster | unit | Yes | |
TGFA_Interger | integer | Yes | |
TGFA_PuntoReusable | location | No | |
TGFA_PuntoReusable2 | location | No | |
TGFA_Target | unit | Yes | |
ThunClap | effect | No | |
Tip | string | Yes | |
Tiro_Attacks | integer | Yes | |
TKcaster | unit | No | |
TKrandom | integer | No | |
TMcaster | unit | No | |
TMmana | unit | No | |
TMshadow | unit | No | |
TMstun | unit | No | |
TMtarget | unit | No | |
TMvalue | real | No | |
ToqueCamazotRandom | integer | No | |
Torinukeru_Random | integer | No | |
TotalDeHeroesDisponibles | integer | No | |
TPcaster | unit | No | |
TS_Dummy | unit | No | |
TVdamage | real | No | |
TVheal | real | No | |
TVrandom | integer | No | |
UDex | integer | No | |
UDexGen | integer | No | |
UDexNext | integer | Yes | |
UDexPrev | integer | Yes | |
UDexRecycle | integer | No | |
UDexUnits | unit | Yes | |
UDexWasted | integer | No | |
UnitDamageRegistered | boolean | Yes | |
UnitIndexerEnabled | boolean | No | |
UnitIndexEvent | real | No | |
UnitIndexLock | integer | Yes | |
UnitLocDestroy | location | No | |
Valentia_Count | integer | Yes | |
Valentia_Group | group | No | |
Valentia_Max | integer | Yes | |
Venganza_Counts | integer | Yes | |
Venganza_Group | group | No | |
Venganza_Max | integer | Yes | |
WY_dummy | unit | No | |
ZFrandom | integer | No |
function Trig_items_Conditions takes nothing returns boolean
if ( not ( GetItemType(GetManipulatedItem()) == ITEM_TYPE_PURCHASABLE ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetManipulatingUnit(), GetItemTypeId(GetManipulatedItem())) == true ) ) then
return false
endif
if ( not ( GetManipulatedItem() != GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), GetItemTypeId(GetManipulatedItem())) ) ) then
return false
endif
return true
endfunction
function Trig_items_Actions takes nothing returns nothing
call SetItemCharges( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), GetItemTypeId(GetManipulatedItem())), ( GetItemCharges(GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), GetItemTypeId(GetManipulatedItem()))) + GetItemCharges(GetManipulatedItem()) ) )
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
call RemoveItem( GetManipulatedItem() )
endfunction
//===========================================================================
function InitTrig_items takes nothing returns nothing
set gg_trg_items = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_items, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_items, Condition( function Trig_items_Conditions ) )
call TriggerAddAction( gg_trg_items, function Trig_items_Actions )
endfunction
function Trig_First_Blood_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( IsUnitEnemy(GetKillingUnitBJ(), GetOwningPlayer(GetDyingUnit())) == true ) ) then
return false
endif
if ( not ( GetPlayerSlotState(GetOwningPlayer(GetKillingUnitBJ())) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetKillingUnitBJ(), GetUnitsOfPlayerAll(Player(PLAYER_NEUTRAL_AGGRESSIVE))) == false ) ) then
return false
endif
return true
endfunction
function Trig_First_Blood_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call DisplayTextToForce( GetPlayersAll(), ( ( ( ( GetPlayerName(GetOwningPlayer(GetKillingUnitBJ())) + "(" ) + ( GetUnitName(udg_HEROE[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))]) + ")" ) ) + " has obtained the |c00640000First Blood|r (+200 gold)" ) + "" ) )
call AdjustPlayerStateBJ( 200, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_GOLD )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_First_Blood takes nothing returns nothing
set gg_trg_First_Blood = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_First_Blood, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_First_Blood, Condition( function Trig_First_Blood_Conditions ) )
call TriggerAddAction( gg_trg_First_Blood, function Trig_First_Blood_Actions )
endfunction
function Trig_Creeps2_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'h00P', Player(10), GetRectCenter(gg_rct_Alianza_Top), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h00P', Player(10), GetRectCenter(gg_rct_Alianza_Bot), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h00P', Player(10), GetRectCenter(gg_rct_Alianza_mid), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h00R', Player(11), GetRectCenter(gg_rct_Undead_mid), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h00R', Player(11), GetRectCenter(gg_rct_Undead_Top), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h00R', Player(11), GetRectCenter(gg_rct_Undead_Bot), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Creeps2 takes nothing returns nothing
set gg_trg_Creeps2 = CreateTrigger( )
call DisableTrigger( gg_trg_Creeps2 )
call TriggerRegisterTimerEventPeriodic( gg_trg_Creeps2, 30.00 )
call TriggerAddAction( gg_trg_Creeps2, function Trig_Creeps2_Actions )
endfunction
function Trig_Doombringer_act_Copiar_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) != true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetAttacker(), 'I04J') == true ) ) then
return false
endif
if ( not ( IsUnitEnemy(GetAttackedUnitBJ(), GetOwningPlayer(GetAttacker())) == true ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_MECHANICAL) == false ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'BNdo') == false ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetAttacker()) == false ) ) then
return false
endif
return true
endfunction
function Trig_Doombringer_act_Copiar_Func002C takes nothing returns boolean
if ( not ( udg_DBrandom <= 10 ) ) then
return false
endif
return true
endfunction
function Trig_Doombringer_act_Copiar_Actions takes nothing returns nothing
set udg_DBrandom = GetRandomInt(1, 100)
if ( Trig_Doombringer_act_Copiar_Func002C() ) then
set udg_DBpoint = GetUnitLoc(GetAttacker())
call CreateNUnitsAtLoc( 1, 'h011', GetOwningPlayer(GetAttacker()), udg_DBpoint, bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call UnitAddAbilityBJ( 'A0NS', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "doom", GetAttackedUnitBJ() )
call RemoveLocation(udg_DBpoint)
else
endif
endfunction
//===========================================================================
function InitTrig_Doombringer_act_Copiar takes nothing returns nothing
set gg_trg_Doombringer_act_Copiar = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Doombringer_act_Copiar, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Doombringer_act_Copiar, Condition( function Trig_Doombringer_act_Copiar_Conditions ) )
call TriggerAddAction( gg_trg_Doombringer_act_Copiar, function Trig_Doombringer_act_Copiar_Actions )
endfunction
function Trig_Etereal_strike_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0J2' ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(GetSpellTargetUnit(), 'BNss') == false ) ) then
return false
endif
if ( not ( IsUnitEnemy(GetSpellTargetUnit(), GetOwningPlayer(GetSpellAbilityUnit())) == true ) ) then
return false
endif
return true
endfunction
function Trig_Etereal_strike_Actions takes nothing returns nothing
call UnitDamageTargetBJ( GetSpellAbilityUnit(), GetSpellTargetUnit(), ( 1.00 * I2R(GetHeroStatBJ(bj_HEROSTAT_INT, GetSpellAbilityUnit(), true)) ), ATTACK_TYPE_MAGIC, DAMAGE_TYPE_MAGIC )
call AddSpecialEffectTargetUnitBJ( "chest", GetSpellTargetUnit(), "Abilities\\Weapons\\GreenDragonMissile\\GreenDragonMissile.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
endfunction
//===========================================================================
function InitTrig_Etereal_strike takes nothing returns nothing
set gg_trg_Etereal_strike = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Etereal_strike, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Etereal_strike, Condition( function Trig_Etereal_strike_Conditions ) )
call TriggerAddAction( gg_trg_Etereal_strike, function Trig_Etereal_strike_Actions )
endfunction
function Trig_Titan_Loop_Actions takes nothing returns nothing
call SetUnitScalePercent( udg_TPcaster, 135.00, 135.00, 135.00 )
endfunction
//===========================================================================
function InitTrig_Titan_Loop takes nothing returns nothing
set gg_trg_Titan_Loop = CreateTrigger( )
call DisableTrigger( gg_trg_Titan_Loop )
call TriggerRegisterTimerEventPeriodic( gg_trg_Titan_Loop, 5.00 )
call TriggerAddAction( gg_trg_Titan_Loop, function Trig_Titan_Loop_Actions )
endfunction
function Trig_Artilleria_Cast_Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0QJ' ) ) then
return false
endif
return true
endfunction
function Trig_Artilleria_Cast_Actions takes nothing returns nothing
if ( Trig_Artilleria_Cast_Func001C() ) then
call RemoveUnit( udg_ARdummy )
call DisableTrigger( gg_trg_Artilleria_Loop )
set udg_ARcaster = GetSpellAbilityUnit()
call CreateNUnitsAtLoc( 1, 'h02N', GetOwningPlayer(udg_ARcaster), GetSpellTargetLoc(), AngleBetweenPoints(GetUnitLoc(udg_ARcaster), GetSpellTargetLoc()) )
set udg_ARdummy = GetLastCreatedUnit()
set udg_ARdistance = 800.00
call SetUnitPathing( udg_ARdummy, false )
call EnableTrigger( gg_trg_Artilleria_Loop )
else
endif
endfunction
//===========================================================================
function InitTrig_Artilleria_Cast takes nothing returns nothing
set gg_trg_Artilleria_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Artilleria_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddAction( gg_trg_Artilleria_Cast, function Trig_Artilleria_Cast_Actions )
endfunction
function Trig_Leap_1_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0D8' ) ) then
return false
endif
return true
endfunction
function Trig_Leap_1_Func015C takes nothing returns boolean
if ( not ( LoadBooleanBJ(StringHashBJ("underorder"), udg_LeapHandle, udg_Hash) == true ) ) then
return false
endif
return true
endfunction
function Trig_Leap_1_Actions takes nothing returns nothing
set udg_LeapUnit = GetTriggerUnit()
set udg_LeapHandle = GetHandleIdBJ(GetTriggerUnit())
set udg_LeapPoint = GetUnitLoc(udg_LeapUnit)
call IssueImmediateOrderBJ( udg_LeapUnit, "stop" )
call SaveLocationHandleBJ( udg_LeapPoint, StringHashBJ("position"), udg_LeapHandle, udg_Hash )
set udg_LeapZOffset = GetLocationZ(udg_LeapPoint)
call SaveRealBJ( udg_LeapZOffset, StringHashBJ("zoffsetbase"), udg_LeapHandle, udg_Hash )
call SaveRealBJ( ( udg_LeapBaseDistance + ( udg_LeapDistancePerLevel * I2R(GetUnitAbilityLevelSwapped('A000', udg_LeapUnit)) ) ), StringHashBJ("leapdistance"), udg_LeapHandle, udg_Hash )
call SaveRealBJ( LoadRealBJ(StringHashBJ("leapdistance"), udg_LeapHandle, udg_Hash), StringHashBJ("leapbasedistance"), udg_LeapHandle, udg_Hash )
call SaveRealBJ( 0.00, StringHashBJ("distance"), udg_LeapHandle, udg_Hash )
call SaveRealBJ( udg_LeapSpeed, StringHashBJ("basespeed"), udg_LeapHandle, udg_Hash )
call SaveRealBJ( udg_LeapSpeed, StringHashBJ("speed"), udg_LeapHandle, udg_Hash )
call SaveRealBJ( udg_LeapJumpRate, StringHashBJ("basejumprate"), udg_LeapHandle, udg_Hash )
call SaveRealBJ( udg_LeapJumpRate, StringHashBJ("jumprate"), udg_LeapHandle, udg_Hash )
if ( Trig_Leap_1_Func015C() ) then
set udg_LeapPoint = Location(LoadRealBJ(StringHashBJ("orderpointX"), udg_LeapHandle, udg_Hash), LoadRealBJ(StringHashBJ("orderpointY"), udg_LeapHandle, udg_Hash))
call SaveRealBJ( AngleBetweenPoints(LoadLocationHandleBJ(StringHashBJ("position"), udg_LeapHandle, udg_Hash), udg_LeapPoint), StringHashBJ("angle"), udg_LeapHandle, udg_Hash )
else
call SaveRealBJ( GetUnitFacing(udg_LeapUnit), StringHashBJ("angle"), udg_LeapHandle, udg_Hash )
endif
call SaveBooleanBJ( false, StringHashBJ("underorder"), udg_LeapHandle, udg_Hash )
call SaveRealBJ( ( ( ( ( -1.00 * udg_LeapJumpRate ) / LoadRealBJ(StringHashBJ("leapdistance"), udg_LeapHandle, udg_Hash) ) * Pow(( LoadRealBJ(StringHashBJ("leapdistance"), udg_LeapHandle, udg_Hash) / 2.00 ), 2.00) ) + ( udg_LeapJumpRate * ( LoadRealBJ(StringHashBJ("leapdistance"), udg_LeapHandle, udg_Hash) / 2.00 ) ) ), StringHashBJ("heightbounce"), udg_LeapHandle, udg_Hash )
call SaveBooleanBJ( true, StringHashBJ("bounce"), udg_LeapHandle, udg_Hash )
call UnitAddAbilityBJ( 'Arav', udg_LeapUnit )
call UnitRemoveAbilityBJ( 'Arav', udg_LeapUnit )
call GroupAddUnitSimple( udg_LeapUnit, udg_LeapGP )
call SetUnitAnimation( udg_LeapUnit, "walk" )
call SetUnitTimeScalePercent( udg_LeapUnit, 75.00 )
call RemoveLocation(udg_LeapPoint)
endfunction
//===========================================================================
function InitTrig_Leap_1 takes nothing returns nothing
set gg_trg_Leap_1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Leap_1, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Leap_1, Condition( function Trig_Leap_1_Conditions ) )
call TriggerAddAction( gg_trg_Leap_1, function Trig_Leap_1_Actions )
endfunction
function Trig_Leap_2_Func001Func002Func015Func001Func002C takes nothing returns boolean
if ( not ( LoadBooleanBJ(StringHashBJ("bounce"), udg_LeapHandle, udg_Hash) == true ) ) then
return false
endif
if ( not ( LoadRealBJ(StringHashBJ("zoffsetnp"), udg_LeapHandle, udg_Hash) >= ( LoadRealBJ(StringHashBJ("heightbounce"), udg_LeapHandle, udg_Hash) + LoadRealBJ(StringHashBJ("zoffsetbase"), udg_LeapHandle, udg_Hash) ) ) ) then
return false
endif
return true
endfunction
function Trig_Leap_2_Func001Func002Func015Func001C takes nothing returns boolean
if ( ( IsTerrainPathableBJ(udg_LeapPoint, PATHING_TYPE_WALKABILITY) == true ) ) then
return true
endif
if ( Trig_Leap_2_Func001Func002Func015Func001Func002C() ) then
return true
endif
return false
endfunction
function Trig_Leap_2_Func001Func002Func015Func002Func006C takes nothing returns boolean
if ( not ( LoadBooleanBJ(StringHashBJ("saveorder"), udg_LeapHandle, udg_Hash) == true ) ) then
return false
endif
return true
endfunction
function Trig_Leap_2_Func001Func002Func015Func002C takes nothing returns boolean
if ( not ( ( LoadRealBJ(StringHashBJ("height"), udg_LeapHandle, udg_Hash) - LoadRealBJ(StringHashBJ("zoffset"), udg_LeapHandle, udg_Hash) ) <= 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Leap_2_Func001Func002Func015Func012C takes nothing returns boolean
if ( not ( LoadBooleanBJ(StringHashBJ("saveorder"), udg_LeapHandle, udg_Hash) == true ) ) then
return false
endif
return true
endfunction
function Trig_Leap_2_Func001Func002Func015C takes nothing returns boolean
if ( not Trig_Leap_2_Func001Func002Func015Func001C() ) then
return false
endif
if ( not ( ( LoadRealBJ(StringHashBJ("height"), udg_LeapHandle, udg_Hash) - LoadRealBJ(StringHashBJ("zoffset"), udg_LeapHandle, udg_Hash) ) <= 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Leap_2_Func001Func002A takes nothing returns nothing
set udg_LeapUnit = GetEnumUnit()
call SetUnitPathing( udg_LeapUnit, false )
set udg_LeapHandle = GetHandleIdBJ(GetEnumUnit())
set udg_LeapPoint1 = GetUnitLoc(udg_LeapUnit)
set udg_LeapPoint = PolarProjectionBJ(udg_LeapPoint1, LoadRealBJ(StringHashBJ("speed"), udg_LeapHandle, udg_Hash), LoadRealBJ(StringHashBJ("angle"), udg_LeapHandle, udg_Hash))
call SaveLocationHandleBJ( udg_LeapPoint, StringHashBJ("nextposition"), udg_LeapHandle, udg_Hash )
call SaveRealBJ( ( LoadRealBJ(StringHashBJ("distance"), udg_LeapHandle, udg_Hash) + LoadRealBJ(StringHashBJ("speed"), udg_LeapHandle, udg_Hash) ), StringHashBJ("distance"), udg_LeapHandle, udg_Hash )
call SaveRealBJ( ( ( ( ( -1.00 * LoadRealBJ(StringHashBJ("jumprate"), udg_LeapHandle, udg_Hash) ) / LoadRealBJ(StringHashBJ("leapdistance"), udg_LeapHandle, udg_Hash) ) * Pow(LoadRealBJ(StringHashBJ("distance"), udg_LeapHandle, udg_Hash), 2.00) ) + ( LoadRealBJ(StringHashBJ("jumprate"), udg_LeapHandle, udg_Hash) * LoadRealBJ(StringHashBJ("distance"), udg_LeapHandle, udg_Hash) ) ), StringHashBJ("height"), udg_LeapHandle, udg_Hash )
call SaveRealBJ( ( ( LoadRealBJ(StringHashBJ("distance"), udg_LeapHandle, udg_Hash) * 100.00 ) / LoadRealBJ(StringHashBJ("leapdistance"), udg_LeapHandle, udg_Hash) ), StringHashBJ("parabola"), udg_LeapHandle, udg_Hash )
set udg_LeapZOffset = GetLocationZ(udg_LeapPoint)
call SaveRealBJ( udg_LeapZOffset, StringHashBJ("zoffsetnp"), udg_LeapHandle, udg_Hash )
call SaveRealBJ( ( LoadRealBJ(StringHashBJ("zoffsetnp"), udg_LeapHandle, udg_Hash) - LoadRealBJ(StringHashBJ("zoffsetbase"), udg_LeapHandle, udg_Hash) ), StringHashBJ("zoffset"), udg_LeapHandle, udg_Hash )
call SetUnitFlyHeightBJ( udg_LeapUnit, ( LoadRealBJ(StringHashBJ("height"), udg_LeapHandle, udg_Hash) - LoadRealBJ(StringHashBJ("zoffset"), udg_LeapHandle, udg_Hash) ), 0.00 )
call SetUnitPositionLocFacingBJ( udg_LeapUnit, LoadLocationHandleBJ(StringHashBJ("nextposition"), udg_LeapHandle, udg_Hash), LoadRealBJ(StringHashBJ("angle"), udg_LeapHandle, udg_Hash) )
if ( Trig_Leap_2_Func001Func002Func015C() ) then
call ResetUnitAnimation( udg_LeapUnit )
set udg_LeapPoint = GetUnitLoc(udg_LeapUnit)
call AddSpecialEffectLocBJ( udg_LeapPoint, "Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call SaveLocationHandleBJ( udg_LeapPoint, StringHashBJ("position"), udg_LeapHandle, udg_Hash )
call SaveRealBJ( 0.00, StringHashBJ("distance"), udg_LeapHandle, udg_Hash )
set udg_LeapZOffset = GetLocationZ(udg_LeapPoint)
call SaveRealBJ( udg_LeapZOffset, StringHashBJ("zoffsetbase"), udg_LeapHandle, udg_Hash )
if ( Trig_Leap_2_Func001Func002Func015Func012C() ) then
set udg_LeapPoint = Location(LoadRealBJ(StringHashBJ("orderpointX"), udg_LeapHandle, udg_Hash), LoadRealBJ(StringHashBJ("orderpointY"), udg_LeapHandle, udg_Hash))
call SaveRealBJ( AngleBetweenPoints(LoadLocationHandleBJ(StringHashBJ("position"), udg_LeapHandle, udg_Hash), udg_LeapPoint), StringHashBJ("angle"), udg_LeapHandle, udg_Hash )
call SaveRealBJ( LoadRealBJ(StringHashBJ("basespeed"), udg_LeapHandle, udg_Hash), StringHashBJ("speed"), udg_LeapHandle, udg_Hash )
call SaveRealBJ( LoadRealBJ(StringHashBJ("basejumprate"), udg_LeapHandle, udg_Hash), StringHashBJ("jumprate"), udg_LeapHandle, udg_Hash )
call SaveRealBJ( LoadRealBJ(StringHashBJ("leapbasedistance"), udg_LeapHandle, udg_Hash), StringHashBJ("leapdistance"), udg_LeapHandle, udg_Hash )
else
call SaveRealBJ( ( LoadRealBJ(StringHashBJ("basespeed"), udg_LeapHandle, udg_Hash) / ( udg_LeapJumpRateBounce / 2.00 ) ), StringHashBJ("speed"), udg_LeapHandle, udg_Hash )
call SaveRealBJ( ( LoadRealBJ(StringHashBJ("basejumprate"), udg_LeapHandle, udg_Hash) * udg_LeapJumpRateBounce ), StringHashBJ("jumprate"), udg_LeapHandle, udg_Hash )
call SaveRealBJ( ( LoadRealBJ(StringHashBJ("leapbasedistance"), udg_LeapHandle, udg_Hash) * udg_LeapBounceRate ), StringHashBJ("leapdistance"), udg_LeapHandle, udg_Hash )
endif
call SaveBooleanBJ( false, StringHashBJ("saveorder"), udg_LeapHandle, udg_Hash )
call SaveBooleanBJ( false, StringHashBJ("bounce"), udg_LeapHandle, udg_Hash )
else
if ( Trig_Leap_2_Func001Func002Func015Func002C() ) then
call SetUnitPathing( udg_LeapUnit, true )
call GroupRemoveUnitSimple( udg_LeapUnit, udg_LeapGP )
call SetUnitAnimation( udg_LeapUnit, "walk" )
call SetUnitTimeScalePercent( udg_LeapUnit, 100.00 )
if ( Trig_Leap_2_Func001Func002Func015Func002Func006C() ) then
set udg_LeapPoint = Location(LoadRealBJ(StringHashBJ("orderpointX"), udg_LeapHandle, udg_Hash), LoadRealBJ(StringHashBJ("orderpointY"), udg_LeapHandle, udg_Hash))
call IssuePointOrderLocBJ( udg_LeapUnit, "smart", udg_LeapPoint )
call SaveBooleanBJ( false, StringHashBJ("saveorder"), udg_LeapHandle, udg_Hash )
else
endif
else
endif
endif
endfunction
function Trig_Leap_2_Func001C takes nothing returns boolean
if ( not ( CountUnitsInGroup(udg_LeapGP) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Leap_2_Actions takes nothing returns nothing
if ( Trig_Leap_2_Func001C() ) then
call ForGroupBJ( udg_LeapGP, function Trig_Leap_2_Func001Func002A )
call RemoveLocation(udg_LeapPoint)
call RemoveLocation(udg_LeapPoint1)
else
endif
endfunction
//===========================================================================
function InitTrig_Leap_2 takes nothing returns nothing
set gg_trg_Leap_2 = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Leap_2, 0.03 )
call TriggerAddAction( gg_trg_Leap_2, function Trig_Leap_2_Actions )
endfunction
function Trig_OrderPoint_Func006C takes nothing returns boolean
if ( not ( IsUnitInGroup(udg_LeapUnit, udg_LeapGP) == true ) ) then
return false
endif
return true
endfunction
function Trig_OrderPoint_Actions takes nothing returns nothing
set udg_LeapUnit = GetTriggerUnit()
set udg_LeapHandle = GetHandleIdBJ(GetTriggerUnit())
set udg_LeapPoint = GetOrderPointLoc()
call SaveRealBJ( GetLocationX(udg_LeapPoint), StringHashBJ("orderpointX"), udg_LeapHandle, udg_Hash )
call SaveRealBJ( GetLocationY(udg_LeapPoint), StringHashBJ("orderpointY"), udg_LeapHandle, udg_Hash )
if ( Trig_OrderPoint_Func006C() ) then
call SaveBooleanBJ( true, StringHashBJ("saveorder"), udg_LeapHandle, udg_Hash )
else
endif
call SaveBooleanBJ( true, StringHashBJ("underorder"), udg_LeapHandle, udg_Hash )
call RemoveLocation(udg_LeapPoint)
endfunction
//===========================================================================
function InitTrig_OrderPoint takes nothing returns nothing
set gg_trg_OrderPoint = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_OrderPoint, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddAction( gg_trg_OrderPoint, function Trig_OrderPoint_Actions )
endfunction
function Trig_MH_Cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == udg_HookAbility ) ) then
return false
endif
return true
endfunction
function Trig_MH_Cast_Func019C takes nothing returns boolean
if ( not ( udg_HookUseSpeed == true ) ) then
return false
endif
return true
endfunction
function Trig_MH_Cast_Func020C takes nothing returns boolean
if ( not ( udg_HookDisableWhileInUse == true ) ) then
return false
endif
return true
endfunction
function Trig_MH_Cast_Func021C takes nothing returns boolean
if ( not ( udg_MH_Index1 == 1 ) ) then
return false
endif
return true
endfunction
function Trig_MH_Cast_Actions takes nothing returns nothing
set udg_MH_Index1 = ( udg_MH_Index1 + 1 )
set udg_MH_ApplyDamage[udg_MH_Index1] = false
set udg_MH_Hooker[udg_MH_Index1] = GetTriggerUnit()
set udg_MH_DistCounter[udg_MH_Index1] = 0.00
set udg_MH_Level[udg_MH_Index1] = GetUnitAbilityLevelSwapped(udg_HookAbility, udg_MH_Hooker[udg_MH_Index1])
set udg_MH_StartPoint = GetUnitLoc(udg_MH_Hooker[udg_MH_Index1])
set udg_MH_Distance[udg_MH_Index1] = ( udg_HookTravelDistance[udg_MH_Level[udg_MH_Index1]] + udg_MH_OffsetConstant )
set udg_MH_HookOn[udg_MH_Index1] = false
set udg_MH_EndPoint = GetSpellTargetLoc()
set udg_MH_Angle[udg_MH_Index1] = AngleBetweenPoints(udg_MH_StartPoint, udg_MH_EndPoint)
set udg_MH_TempPoint = PolarProjectionBJ(udg_MH_StartPoint, udg_MH_OffsetConstant, udg_MH_Angle[udg_MH_Index1])
call CreateNUnitsAtLoc( 1, udg_HookDummy, GetTriggerPlayer(), udg_MH_TempPoint, udg_MH_Angle[udg_MH_Index1] )
set udg_MH_Hook[udg_MH_Index1] = GetLastCreatedUnit()
set udg_MH_HookerPos[udg_MH_Index1] = GetUnitLoc(udg_MH_Hooker[udg_MH_Index1])
set udg_MH_HookPos[udg_MH_Index1] = GetUnitLoc(udg_MH_Hook[udg_MH_Index1])
call AddLightningLoc( udg_HookLightningEffect, udg_MH_HookerPos[udg_MH_Index1], udg_MH_HookPos[udg_MH_Index1] )
call SetLightningColorBJ( GetLastCreatedLightningBJ(), 0.35, 0.35, 0.35, 1 )
set udg_MH_HookChain[udg_MH_Index1] = GetLastCreatedLightningBJ()
if ( Trig_MH_Cast_Func019C() ) then
set udg_MH_Dest = ( udg_HookTravelSpeed * 0.02 )
else
set udg_MH_Dest = ( ( udg_MH_Distance[udg_MH_Index1] / udg_HookTravelDuration ) / 10.00 )
endif
if ( Trig_MH_Cast_Func020C() ) then
call UnitRemoveAbilityBJ( udg_HookAbility, udg_MH_Hooker[udg_MH_Index1] )
else
endif
if ( Trig_MH_Cast_Func021C() ) then
call EnableTrigger( gg_trg_MH_Loop )
else
endif
call RemoveLocation(udg_MH_TempPoint)
call RemoveLocation(udg_MH_StartPoint)
call RemoveLocation(udg_MH_EndPoint)
endfunction
//===========================================================================
function InitTrig_MH_Cast takes nothing returns nothing
set gg_trg_MH_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MH_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_MH_Cast, Condition( function Trig_MH_Cast_Conditions ) )
call TriggerAddAction( gg_trg_MH_Cast, function Trig_MH_Cast_Actions )
endfunction
function Trig_Gacho_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0RD' ) ) then
return false
endif
return true
endfunction
function Trig_Gacho_Actions takes nothing returns nothing
call RemoveUnit( udg_H_HookHead )
call DestroyLightningBJ( udg_H_Ray )
call DisableTrigger( gg_trg_Gacho_Loop )
set udg_H_Caster = GetSpellAbilityUnit()
set udg_H_Distance = ( 800.00 + ( 50.00 * I2R(GetUnitAbilityLevelSwapped('A0RD', udg_H_Caster)) ) )
call CreateNUnitsAtLoc( 1, 'h003', GetOwningPlayer(udg_H_Caster), PolarProjectionBJ(GetUnitLoc(udg_H_Caster), 30.00, AngleBetweenPoints(GetUnitLoc(udg_H_Caster), GetSpellTargetLoc())), AngleBetweenPoints(GetUnitLoc(udg_H_Caster), GetSpellTargetLoc()) )
set udg_H_HookHead = GetLastCreatedUnit()
call SetUnitPathing( udg_H_HookHead, false )
call AddLightningLoc( "MBUR", GetUnitLoc(udg_H_Caster), GetUnitLoc(udg_H_HookHead) )
call SetLightningColorBJ( GetLastCreatedLightningBJ(), 0.50, 0.05, 0.52, 1 )
set udg_H_Ray = GetLastCreatedLightningBJ()
call EnableTrigger( gg_trg_Gacho_Loop )
endfunction
//===========================================================================
function InitTrig_Gacho takes nothing returns nothing
set gg_trg_Gacho = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Gacho, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Gacho, Condition( function Trig_Gacho_Conditions ) )
call TriggerAddAction( gg_trg_Gacho, function Trig_Gacho_Actions )
endfunction
function Trig_BlackHole_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0RQ' ) ) then
return false
endif
return true
endfunction
function Trig_BlackHole_Actions takes nothing returns nothing
set udg_fvunit = GetTriggerUnit()
set udg_fvint = ( GetUnitAbilityLevelSwapped('A0RQ', GetTriggerUnit()) * 20 )
set udg_fvloc[1] = GetUnitLoc(udg_fvunit)
call CreateNUnitsAtLoc( 1, 'e006', Player(PLAYER_NEUTRAL_PASSIVE), udg_fvloc[1], bj_UNIT_FACING )
set udg_fvdummy = GetLastCreatedUnit()
call UnitApplyTimedLifeBJ( 3.50, 'BTLF', udg_fvdummy )
call EnableTrigger( gg_trg_sucking )
endfunction
//===========================================================================
function InitTrig_BlackHole takes nothing returns nothing
set gg_trg_BlackHole = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BlackHole, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
call TriggerAddCondition( gg_trg_BlackHole, Condition( function Trig_BlackHole_Conditions ) )
call TriggerAddAction( gg_trg_BlackHole, function Trig_BlackHole_Actions )
endfunction
function Trig_sucking_Func001002003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_sucking_Func001002003002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_sucking_Func001002003002002001 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_fvunit)) == true )
endfunction
function Trig_sucking_Func001002003002002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_MAGIC_IMMUNE) == false )
endfunction
function Trig_sucking_Func001002003002002 takes nothing returns boolean
return GetBooleanAnd( Trig_sucking_Func001002003002002001(), Trig_sucking_Func001002003002002002() )
endfunction
function Trig_sucking_Func001002003002 takes nothing returns boolean
return GetBooleanAnd( Trig_sucking_Func001002003002001(), Trig_sucking_Func001002003002002() )
endfunction
function Trig_sucking_Func001002003 takes nothing returns boolean
return GetBooleanAnd( Trig_sucking_Func001002003001(), Trig_sucking_Func001002003002() )
endfunction
function Trig_sucking_Func002Func005A takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ( "chest", GetEnumUnit(), "Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayDamage.mdl" )
set udg_fvloc[3] = GetUnitLoc(GetEnumUnit())
set udg_fvloc[4] = PolarProjectionBJ(udg_fvloc[3], 10.00, AngleBetweenPoints(udg_fvloc[3], udg_fvloc[1]))
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call SetUnitPositionLocFacingLocBJ( GetEnumUnit(), udg_fvloc[4], udg_fvloc[1] )
call UnitDamageTargetBJ( udg_fvunit, GetEnumUnit(), 6.50, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )
call RemoveLocation(udg_fvloc[3])
call RemoveLocation(udg_fvloc[4])
call DestroyGroup(udg_fvug[1])
endfunction
function Trig_sucking_Func002C takes nothing returns boolean
if ( not ( GetUnitCurrentOrder(udg_fvunit) == String2OrderIdBJ("starfall") ) ) then
return false
endif
return true
endfunction
function Trig_sucking_Actions takes nothing returns nothing
set udg_fvug[1] = GetUnitsInRangeOfLocMatching(475.00, udg_fvloc[1], Condition(function Trig_sucking_Func001002003))
if ( Trig_sucking_Func002C() ) then
call ForGroupBJ( udg_fvug[1], function Trig_sucking_Func002Func005A )
else
call RemoveLocation(udg_fvloc[1])
call DisableTrigger( gg_trg_sucking )
call KillUnit( udg_fvdummy )
endif
endfunction
//===========================================================================
function InitTrig_sucking takes nothing returns nothing
set gg_trg_sucking = CreateTrigger( )
call DisableTrigger( gg_trg_sucking )
call TriggerRegisterTimerEventPeriodic( gg_trg_sucking, ( 0.25 / 5.00 ) )
call TriggerAddAction( gg_trg_sucking, function Trig_sucking_Actions )
endfunction