Name | Type | is_array | initial_value |
A_King | unit | No | |
AINTEL | integer | No | |
ARadagasthitpoints | leaderboard | No | |
Aragorn | unit | No | |
Back_in_the_black | unit | No | |
Badass_ungoliant | unit | No | |
BB_Angle | real | Yes | |
BB_Caster | unit | Yes | |
BB_Check | boolean | Yes | |
BB_Damage | real | Yes | |
BB_Distance | real | Yes | |
BB_Integers | integer | Yes | |
BB_Interval | real | Yes | |
BB_Speed | real | Yes | |
BB_Timer | real | Yes | |
BE_angle | real | Yes | |
BE_array | integer | No | |
BE_array2 | integervar | No | |
BE_caster | unit | Yes | |
BE_distance | real | Yes | |
BE_dummy | unit | Yes | |
BE_group | group | Yes | |
BE_integer | integer | No | |
BE_MAX | integer | Yes | |
BE_move | location | Yes | |
BE_point1 | location | Yes | |
BE_speed | integer | Yes | |
BE_target | location | Yes | |
bounces | integer | Yes | |
Clarity | real | No | |
damage | integer | Yes | |
damage1 | integer | Yes | |
DashCaster | unit | Yes | |
DashDamage | real | Yes | |
DashDistance | integer | Yes | |
DashGroup1 | group | No | |
DashGroup2 | group | No | |
DashGroup3 | group | No | |
DashInteger | integer | Yes | |
DashPoint3 | location | Yes | |
DashPoint4 | location | Yes | |
DashPoint5 | location | Yes | |
DashReal1 | real | Yes | |
DashReal2 | real | Yes | |
DashSpeed | real | Yes | |
DwarfBOOS | unit | No | |
ExGroup | group | No | |
ExTemppoint | location | No | |
Exterminatied | unit | No | |
first_integer | integer | No | |
Gandal_Life | leaderboard | No | |
Gandalf | unit | No | |
GDD__Integers | integer | Yes | |
GDD__LeftMapGroup | group | No | |
GDD__TriggerArray | trigger | Yes | |
GDD__UnitArray | unit | Yes | |
GDD_Damage | real | No | |
GDD_DamagedUnit | unit | No | |
GDD_DamageSource | unit | No | |
GDD_Event | real | No | |
Gruso | unit | No | |
Guy_wave | unit | No | |
INDEX | integer | No | |
Intelliguence | real | No | |
KB_Angle | real | Yes | |
KB_Casters | unit | Yes | |
KB_CountBuffs | integer | No | |
KB_DestroyTrees | boolean | Yes | |
KB_EffectCounter | integer | Yes | |
KB_EffectCounter2 | integer | Yes | |
KB_Effects_1 | string | Yes | |
KB_Effects_2 | string | Yes | |
KB_GeneralIntegers | integervar | Yes | |
KB_KnockbackedUnits | group | No | |
KB_Levels | integer | Yes | |
KB_MaxDistance | real | Yes | |
KB_ReachedDistance | real | Yes | |
KB_ReducedReal | real | No | |
KB_ReduceSpeedReal | real | Yes | |
KB_SpecificSpeed | real | Yes | |
KB_StartPositions | location | Yes | |
KB_TempPoint | location | Yes | |
KB_TempReal | real | No | |
KB_TotalKnockUnits | integer | No | |
KB_Units | unit | Yes | |
KBA_Caster | unit | No | |
KBA_DestroyTrees | boolean | No | |
KBA_DistancePerLevel | real | No | |
KBA_Level | integer | No | |
KBA_SpecialEffects | string | Yes | |
KBA_Speed | real | No | |
KBA_StartingPosition | location | No | |
KBA_TargetUnit | unit | No | |
MC_Caster | unit | Yes | |
MC_DamageGroup | group | No | |
MC_DestroyTrees | boolean | No | |
MC_Duration | real | Yes | |
MC_Index | integer | Yes | |
MC_IndexSize | integer | No | |
MC_Level | integer | Yes | |
MC_MaxIndex | integer | No | |
MC_OffsetNewPos | location | Yes | |
MC_OffsetPoint | location | Yes | |
MC_TargetPoint | location | Yes | |
MCS_AttachmentPoint1 | string | No | |
MCS_AttachmentPoint2 | string | No | |
MCS_Caster1 | unit | No | |
MCS_Caster2 | unit | Yes | |
MCS_curDuration | real | Yes | |
MCS_Deadboolean | boolean | Yes | |
MCS_Duration1 | real | No | |
MCS_Duration2 | real | Yes | |
MCS_Integer | integer | Yes | |
MCS_MindControlledGroup | group | No | |
MCS_Player | player | Yes | |
MCS_SfxAtEndString | string | No | |
MCS_SfxAtEndString2 | string | Yes | |
MCS_SfxAtStartString | modelfile | No | |
MCS_SfxContinous1 | effect | Yes | |
MCS_SfxContinous1String | string | No | |
MCS_SfxContinous2 | effect | Yes | |
MCS_SfxContinous2String | string | No | |
MCS_Target1 | unit | No | |
MCS_Target2 | unit | Yes | |
Morgul | unit | No | |
Multi_Leak_Point | location | No | |
MultiDmg | real | No | |
MultiPoint | location | Yes | |
MultiUnit | unit | Yes | |
MVC_PickGroup | group | No | |
MVC_Point | location | Yes | |
MVC_UnitType | unitcode | Yes | |
PlayerColors | string | Yes | |
RA_Color | real | Yes | |
RA_Counter | real | Yes | |
RA_Dummy | unit | Yes | |
RA_Duration | real | Yes | |
RA_HeightInc | boolean | Yes | |
RA_Integers | integer | Yes | |
Radagast | unit | No | |
RAS_Color | real | No | |
RAS_Dummy | unit | No | |
RAS_Duration | real | No | |
RAS_HeightInc | boolean | No | |
SB_Angle | real | Yes | |
SB_Caster | unit | Yes | |
SB_Check | boolean | Yes | |
SB_CountMove | real | Yes | |
SB_Damage | real | Yes | |
SB_Distance | real | Yes | |
SB_Integers | integer | Yes | |
SB_Interval | real | Yes | |
SB_Point | location | Yes | |
SB_Speed | real | Yes | |
SB_Timer | real | Yes | |
SOC_Angle | real | Yes | |
SOC_AngleInteger | integer | Yes | |
SOC_AOE | real | No | |
SOC_Caster | unit | Yes | |
SOC_CasterPoint | location | Yes | |
SOC_Damage | real | Yes | |
SOC_ECSP | string | No | |
SOC_Hit | group | Yes | |
SOC_Index | integervar | Yes | |
SOC_Integer | integer | Yes | |
SOC_IntegerEnd | integer | No | |
SOC_KBCasterPoint | location | Yes | |
SOC_Range | real | No | |
SOC_SP | modelfile | No | |
SOC_WantSP | boolean | No | |
tempGroup | group | No | |
TempGroup | group | No | |
TempLoc | location | No | |
temppoint | location | No | |
Text_Duration | real | No | |
TextSize_dmg | real | No | |
TextSize_spells | real | No | |
tHE_SPIDER | unit | No | |
Theking | unit | No | |
Thing | group | No | |
TK_AttackType | attacktype | No | |
TK_DamageType | damagetype | No | |
TK_FlyingUnits | group | No | |
TK_FSpeed | real | Yes | |
TK_HDmgInPercIncreasement | real | No | |
TK_HDmgInPercStart | real | No | |
TK_Hero | unit | Yes | |
TK_ImpactDmgIncreasement | real | No | |
TK_ImpactDmgStart | real | No | |
TK_ImpactSFX | string | No | |
TK_Integers | integer | Yes | |
TK_Interval | real | Yes | |
TK_Level | integer | Yes | |
TK_LiftSFX | string | No | |
TK_LiftSFXTimer | real | No | |
TK_LsfxT | real | Yes | |
TK_MaxHeight | real | Yes | |
TK_MaxHeightIncreasement | real | No | |
TK_MaxHeightStart | real | No | |
TK_MinHeightIncreasement | real | No | |
TK_MinHeightStart | real | No | |
TK_Pause | boolean | No | |
TK_Speed | real | No | |
TK_SpeedVariationPerc | real | No | |
TK_SpellAoEIncreasement | real | No | |
TK_SpellAoEStart | real | No | |
TK_StartSFX | string | No | |
TK_TempPoint | location | Yes | |
TK_Unit | unit | Yes | |
TK_UnitGroup | group | No | |
Treebeard | unit | No | |
Ungoliant | unit | Yes | |
Unlightplace | location | No | |
uThe_Nazgul | unit | No | |
Yavanna | unit | No | |
Yavnnas_spell | leaderboard | No | |
yavnnatime | integer | No |
function Trig_Ring_to_the_nazgul_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTrainedUnit()) == 'Udre' ) ) then
return false
endif
return true
endfunction
function Trig_Ring_to_the_nazgul_Actions takes nothing returns nothing
call CreateItemLoc( 'I001', GetUnitLoc(GetTrainedUnit()) )
call IssueTargetItemOrder( GetTrainedUnit(), "smart", GetLastCreatedItem() )
endfunction
//===========================================================================
function InitTrig_Ring_to_the_nazgul takes nothing returns nothing
set gg_trg_Ring_to_the_nazgul = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ring_to_the_nazgul, EVENT_PLAYER_UNIT_TRAIN_FINISH )
call TriggerAddCondition( gg_trg_Ring_to_the_nazgul, Condition( function Trig_Ring_to_the_nazgul_Conditions ) )
call TriggerAddAction( gg_trg_Ring_to_the_nazgul, function Trig_Ring_to_the_nazgul_Actions )
endfunction
function Trig_P_for_the_towers_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetKillingUnitBJ()) == 'U009' ) ) then
return false
endif
return true
endfunction
function Trig_P_for_the_towers_Actions takes nothing returns nothing
call AddHeroXPSwapped( 150, GetKillingUnitBJ(), true )
endfunction
//===========================================================================
function InitTrig_P_for_the_towers takes nothing returns nothing
set gg_trg_P_for_the_towers = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_P_for_the_towers, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_P_for_the_towers, Condition( function Trig_P_for_the_towers_Conditions ) )
call TriggerAddAction( gg_trg_P_for_the_towers, function Trig_P_for_the_towers_Actions )
endfunction
function Trig_P_for_the_towers_Copy_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetKillingUnitBJ()) == 'U008' ) ) then
return false
endif
return true
endfunction
function Trig_P_for_the_towers_Copy_Actions takes nothing returns nothing
call AddHeroXPSwapped( 150, GetKillingUnitBJ(), true )
endfunction
//===========================================================================
function InitTrig_P_for_the_towers_Copy takes nothing returns nothing
set gg_trg_P_for_the_towers_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_P_for_the_towers_Copy, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_P_for_the_towers_Copy, Condition( function Trig_P_for_the_towers_Copy_Conditions ) )
call TriggerAddAction( gg_trg_P_for_the_towers_Copy, function Trig_P_for_the_towers_Copy_Actions )
endfunction
function Trig_P_for_the_towers_Copy_Copy_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetKillingUnitBJ()) == 'U001' ) ) then
return false
endif
return true
endfunction
function Trig_P_for_the_towers_Copy_Copy_Actions takes nothing returns nothing
call AddHeroXPSwapped( 160, GetKillingUnitBJ(), true )
endfunction
//===========================================================================
function InitTrig_P_for_the_towers_Copy_Copy takes nothing returns nothing
set gg_trg_P_for_the_towers_Copy_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_P_for_the_towers_Copy_Copy, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_P_for_the_towers_Copy_Copy, Condition( function Trig_P_for_the_towers_Copy_Copy_Conditions ) )
call TriggerAddAction( gg_trg_P_for_the_towers_Copy_Copy, function Trig_P_for_the_towers_Copy_Copy_Actions )
endfunction
function Trig_P_for_the_towers_Copy_Copy_Copy_Conditions takes nothing returns boolean
if ( not ( I2R(GetUnitAbilityLevelSwapped('A01U', GetKillingUnitBJ())) == 1.00 ) ) then
return false
endif
return true
endfunction
function Trig_P_for_the_towers_Copy_Copy_Copy_Actions takes nothing returns nothing
call AddHeroXPSwapped( 50, gg_unit_U001_0000, true )
endfunction
//===========================================================================
function InitTrig_P_for_the_towers_Copy_Copy_Copy takes nothing returns nothing
set gg_trg_P_for_the_towers_Copy_Copy_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_P_for_the_towers_Copy_Copy_Copy, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_P_for_the_towers_Copy_Copy_Copy, Condition( function Trig_P_for_the_towers_Copy_Copy_Copy_Conditions ) )
call TriggerAddAction( gg_trg_P_for_the_towers_Copy_Copy_Copy, function Trig_P_for_the_towers_Copy_Copy_Copy_Actions )
endfunction
function Trig_Money_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_517" )
call MeleeStartingHeroLimit( )
call SetForceAllianceStateBJ( bj_FORCE_PLAYER[0], bj_FORCE_PLAYER[7], bj_ALLIANCE_ALLIED )
call SetForceAllianceStateBJ( bj_FORCE_PLAYER[1], bj_FORCE_PLAYER[7], bj_ALLIANCE_ALLIED )
call SetForceAllianceStateBJ( bj_FORCE_PLAYER[2], bj_FORCE_PLAYER[7], bj_ALLIANCE_ALLIED )
call SetForceAllianceStateBJ( bj_FORCE_PLAYER[7], bj_FORCE_PLAYER[0], bj_ALLIANCE_ALLIED )
call SetForceAllianceStateBJ( bj_FORCE_PLAYER[7], bj_FORCE_PLAYER[1], bj_ALLIANCE_ALLIED )
call SetForceAllianceStateBJ( bj_FORCE_PLAYER[7], bj_FORCE_PLAYER[2], bj_ALLIANCE_ALLIED )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(4) )
call SetPlayerStateBJ( Player(0), PLAYER_STATE_RESOURCE_GOLD, 700 )
call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_GOLD, 700 )
call SetPlayerStateBJ( Player(2), PLAYER_STATE_RESOURCE_GOLD, 800 )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(0) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(1) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(2) )
endfunction
//===========================================================================
function InitTrig_Money takes nothing returns nothing
set gg_trg_Money = CreateTrigger( )
call TriggerAddAction( gg_trg_Money, function Trig_Money_Actions )
endfunction
function Trig_Chaos_Func001Func001001 takes nothing returns boolean
return ( GetUnitTypeId(GetEnumUnit()) == 'u00E' )
endfunction
function Trig_Chaos_Func001A takes nothing returns nothing
if ( Trig_Chaos_Func001Func001001() ) then
call UnitAddAbilityBJ( 'A01W', GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Chaos_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectAll(GetPlayableMapRect()), function Trig_Chaos_Func001A )
endfunction
//===========================================================================
function InitTrig_Chaos takes nothing returns nothing
set gg_trg_Chaos = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Chaos, 300.00 )
call TriggerAddAction( gg_trg_Chaos, function Trig_Chaos_Actions )
endfunction
function Trig_Unfightbale_corruption_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02X' ) ) then
return false
endif
return true
endfunction
function Trig_Unfightbale_corruption_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'o001', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetSpellTargetUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A02Y', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "frostnova", GetSpellTargetUnit() )
endfunction
//===========================================================================
function InitTrig_Unfightbale_corruption takes nothing returns nothing
set gg_trg_Unfightbale_corruption = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Unfightbale_corruption, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Unfightbale_corruption, Condition( function Trig_Unfightbale_corruption_Conditions ) )
call TriggerAddAction( gg_trg_Unfightbale_corruption, function Trig_Unfightbale_corruption_Actions )
endfunction
function Trig_Unfightbale_corruption_Copiar_2_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A027' ) ) then
return false
endif
return true
endfunction
function Trig_Unfightbale_corruption_Copiar_2_Actions takes nothing returns nothing
call TriggerSleepAction( 1.00 )
call KillUnit( GetSpellTargetUnit() )
call AddSpecialEffectLocBJ( GetUnitLoc(GetSpellTargetUnit()), "Abilities\\Spells\\Human\\ReviveHuman\\ReviveHuman.mdl" )
endfunction
//===========================================================================
function InitTrig_Unfightbale_corruption_Copiar_2 takes nothing returns nothing
set gg_trg_Unfightbale_corruption_Copiar_2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Unfightbale_corruption_Copiar_2, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Unfightbale_corruption_Copiar_2, Condition( function Trig_Unfightbale_corruption_Copiar_2_Conditions ) )
call TriggerAddAction( gg_trg_Unfightbale_corruption_Copiar_2, function Trig_Unfightbale_corruption_Copiar_2_Actions )
endfunction
function Trig_Unfightbale_corruption_Copiar_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'Udea' ) ) then
return false
endif
return true
endfunction
function Trig_Unfightbale_corruption_Copiar_Actions takes nothing returns nothing
call SetUnitAnimation( GetAttacker(), "spell throw alternate" )
endfunction
//===========================================================================
function InitTrig_Unfightbale_corruption_Copiar takes nothing returns nothing
set gg_trg_Unfightbale_corruption_Copiar = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Unfightbale_corruption_Copiar, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Unfightbale_corruption_Copiar, Condition( function Trig_Unfightbale_corruption_Copiar_Conditions ) )
call TriggerAddAction( gg_trg_Unfightbale_corruption_Copiar, function Trig_Unfightbale_corruption_Copiar_Actions )
endfunction
function Trig_istari_Copiar_3_Copiar_Copy_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'n00K' ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_3_Copiar_Copy_Actions takes nothing returns nothing
call SetUnitAnimation( GetAttacker(), "attack" )
endfunction
//===========================================================================
function InitTrig_istari_Copiar_3_Copiar_Copy takes nothing returns nothing
set gg_trg_istari_Copiar_3_Copiar_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_3_Copiar_Copy, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_istari_Copiar_3_Copiar_Copy, Condition( function Trig_istari_Copiar_3_Copiar_Copy_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_3_Copiar_Copy, function Trig_istari_Copiar_3_Copiar_Copy_Actions )
endfunction
function Trig_istari_Copiar_3_Copiar_Copy_Copy_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'Udea' ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_3_Copiar_Copy_Copy_Actions takes nothing returns nothing
call SetUnitAnimation( GetAttacker(), "spell" )
endfunction
//===========================================================================
function InitTrig_istari_Copiar_3_Copiar_Copy_Copy takes nothing returns nothing
set gg_trg_istari_Copiar_3_Copiar_Copy_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_3_Copiar_Copy_Copy, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_istari_Copiar_3_Copiar_Copy_Copy, Condition( function Trig_istari_Copiar_3_Copiar_Copy_Copy_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_3_Copiar_Copy_Copy, function Trig_istari_Copiar_3_Copiar_Copy_Copy_Actions )
endfunction
function Trig_istari_Copiar_2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttackedUnitBJ()) == 'earc' ) ) then
return false
endif
if ( not ( IsUnitType(GetAttacker(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_2_Actions takes nothing returns nothing
call IssueImmediateOrderBJ( GetAttackedUnitBJ(), "stomp" )
call TriggerSleepAction( 1.00 )
call IssuePointOrderLocBJ( GetAttackedUnitBJ(), "attack", GetRectCenter(gg_rct_Regi__n_003) )
endfunction
//===========================================================================
function InitTrig_istari_Copiar_2 takes nothing returns nothing
set gg_trg_istari_Copiar_2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_2, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_istari_Copiar_2, Condition( function Trig_istari_Copiar_2_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_2, function Trig_istari_Copiar_2_Actions )
endfunction
function Trig_istari_Copiar_2_Copiar_4_Func003001 takes nothing returns boolean
return ( GetUnitTypeId(GetAttackedUnitBJ()) == 'E002' )
endfunction
function Trig_istari_Copiar_2_Copiar_4_Func003002 takes nothing returns boolean
return ( GetUnitTypeId(GetAttacker()) == 'esen' )
endfunction
function Trig_istari_Copiar_2_Copiar_4_Conditions takes nothing returns boolean
if ( not GetBooleanAnd( Trig_istari_Copiar_2_Copiar_4_Func003001(), Trig_istari_Copiar_2_Copiar_4_Func003002() ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_2_Copiar_4_Actions takes nothing returns nothing
call KillUnit( GetAttacker() )
call AddSpecialEffectLocBJ( GetUnitLoc(GetAttacker()), "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl" )
endfunction
//===========================================================================
function InitTrig_istari_Copiar_2_Copiar_4 takes nothing returns nothing
set gg_trg_istari_Copiar_2_Copiar_4 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_2_Copiar_4, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_istari_Copiar_2_Copiar_4, Condition( function Trig_istari_Copiar_2_Copiar_4_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_2_Copiar_4, function Trig_istari_Copiar_2_Copiar_4_Actions )
endfunction
function Trig_istari_Copiar_2_Copiar_3_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'E002' ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_2_Copiar_3_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_MOney_Copiar_2_Copiar_5 )
call AddSpecialEffectLocBJ( GetUnitLoc(udg_Yavanna), "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl" )
call RemoveUnit( udg_Yavanna )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1462" )
call DestroyLeaderboardBJ( udg_Yavnnas_spell )
endfunction
//===========================================================================
function InitTrig_istari_Copiar_2_Copiar_3 takes nothing returns nothing
set gg_trg_istari_Copiar_2_Copiar_3 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_2_Copiar_3, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_istari_Copiar_2_Copiar_3, Condition( function Trig_istari_Copiar_2_Copiar_3_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_2_Copiar_3, function Trig_istari_Copiar_2_Copiar_3_Actions )
endfunction
function Trig_istari_Copiar_2_Copiar_3_Copy_2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'Hamg' ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_2_Copiar_3_Copy_2_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_RADAGAST_HP )
call AddSpecialEffectLocBJ( GetUnitLoc(udg_Yavanna), "Abilities\\Spells\\Human\\MassTeleport\\MassTeleportTarget.mdl" )
call DestroyLeaderboardBJ( udg_ARadagasthitpoints )
endfunction
//===========================================================================
function InitTrig_istari_Copiar_2_Copiar_3_Copy_2 takes nothing returns nothing
set gg_trg_istari_Copiar_2_Copiar_3_Copy_2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_2_Copiar_3_Copy_2, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_istari_Copiar_2_Copiar_3_Copy_2, Condition( function Trig_istari_Copiar_2_Copiar_3_Copy_2_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_2_Copiar_3_Copy_2, function Trig_istari_Copiar_2_Copiar_3_Copy_2_Actions )
endfunction
function Trig_istari_Copiar_2_Copiar_3_Copy_2_Copy_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'Hjai' ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_2_Copiar_3_Copy_2_Copy_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_2175" )
call TriggerSleepAction( 7.00 )
call CustomVictoryBJ( Player(0), true, true )
endfunction
//===========================================================================
function InitTrig_istari_Copiar_2_Copiar_3_Copy_2_Copy takes nothing returns nothing
set gg_trg_istari_Copiar_2_Copiar_3_Copy_2_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_2_Copiar_3_Copy_2_Copy, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_istari_Copiar_2_Copiar_3_Copy_2_Copy, Condition( function Trig_istari_Copiar_2_Copiar_3_Copy_2_Copy_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_2_Copiar_3_Copy_2_Copy, function Trig_istari_Copiar_2_Copiar_3_Copy_2_Copy_Actions )
endfunction
function Trig_istari_Copiar_2_Copiar_3_Copy_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'E002' ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_2_Copiar_3_Copy_Actions takes nothing returns nothing
call AddHeroXPSwapped( 3500, gg_unit_U001_0000, false )
call AddHeroXPSwapped( 3500, gg_unit_U009_0008, false )
call AddHeroXPSwapped( 3500, gg_unit_U008_0001, false )
endfunction
//===========================================================================
function InitTrig_istari_Copiar_2_Copiar_3_Copy takes nothing returns nothing
set gg_trg_istari_Copiar_2_Copiar_3_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_2_Copiar_3_Copy, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_istari_Copiar_2_Copiar_3_Copy, Condition( function Trig_istari_Copiar_2_Copiar_3_Copy_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_2_Copiar_3_Copy, function Trig_istari_Copiar_2_Copiar_3_Copy_Actions )
endfunction
function Trig_istari_Copiar_2_Copiar_3_Copiar_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttackedUnitBJ()) == 'E002' ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_2_Copiar_3_Copiar_Func002001 takes nothing returns boolean
return ( UnitHasBuffBJ(GetAttacker(), 'B000') == true )
endfunction
function Trig_istari_Copiar_2_Copiar_3_Copiar_Func003001 takes nothing returns boolean
return ( UnitHasBuffBJ(GetAttacker(), 'B000') == true )
endfunction
function Trig_istari_Copiar_2_Copiar_3_Copiar_Actions takes nothing returns nothing
call UnitDamageTargetBJ( GetAttackedUnitBJ(), GetAttacker(), 125.00, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL )
if ( Trig_istari_Copiar_2_Copiar_3_Copiar_Func002001() ) then
call UnitDamageTargetBJ( GetAttackedUnitBJ(), GetAttacker(), 4500.00, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL )
else
call DoNothing( )
endif
if ( Trig_istari_Copiar_2_Copiar_3_Copiar_Func003001() ) then
call AddSpecialEffectLocBJ( GetUnitLoc(GetAttacker()), "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl" )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_istari_Copiar_2_Copiar_3_Copiar takes nothing returns nothing
set gg_trg_istari_Copiar_2_Copiar_3_Copiar = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_2_Copiar_3_Copiar, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_istari_Copiar_2_Copiar_3_Copiar, Condition( function Trig_istari_Copiar_2_Copiar_3_Copiar_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_2_Copiar_3_Copiar, function Trig_istari_Copiar_2_Copiar_3_Copiar_Actions )
endfunction
function Trig_istari_Copiar_2_Copiar_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'esen' ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_2_Copiar_Actions takes nothing returns nothing
call AddSpecialEffectLocBJ( GetUnitLoc(GetDyingUnit()), "Abilities\\Spells\\Other\\Incinerate\\FireLordDeathExplode.mdl" )
call RemoveUnit( GetDyingUnit() )
endfunction
//===========================================================================
function InitTrig_istari_Copiar_2_Copiar takes nothing returns nothing
set gg_trg_istari_Copiar_2_Copiar = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_2_Copiar, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_istari_Copiar_2_Copiar, Condition( function Trig_istari_Copiar_2_Copiar_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_2_Copiar, function Trig_istari_Copiar_2_Copiar_Actions )
endfunction
function Trig_istari_Copiar_2_Copiar_Copy_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'Hjai' ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_2_Copiar_Copy_Actions takes nothing returns nothing
call DestroyLeaderboardBJ( udg_Gandal_Life )
endfunction
//===========================================================================
function InitTrig_istari_Copiar_2_Copiar_Copy takes nothing returns nothing
set gg_trg_istari_Copiar_2_Copiar_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_2_Copiar_Copy, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_istari_Copiar_2_Copiar_Copy, Condition( function Trig_istari_Copiar_2_Copiar_Copy_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_2_Copiar_Copy, function Trig_istari_Copiar_2_Copiar_Copy_Actions )
endfunction
function Trig_istari_Copiar_2_Copiar_Copiar_2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'E001' ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_2_Copiar_Copiar_2_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 1000, Player(0), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 1000, Player(1), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 1000, Player(2), PLAYER_STATE_RESOURCE_GOLD )
call DisableTrigger( gg_trg_MOney_Copiar_2_Copiar_2 )
call MoveRectToLoc( gg_rct_Huarnarea, GetUnitLoc(gg_unit_U00C_0014) )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1446" )
call CameraSetEQNoiseForPlayer( Player(0), 10.00 )
call CameraSetEQNoiseForPlayer( Player(1), 10.00 )
call CameraSetEQNoiseForPlayer( Player(2), 10.00 )
endfunction
//===========================================================================
function InitTrig_istari_Copiar_2_Copiar_Copiar_2 takes nothing returns nothing
set gg_trg_istari_Copiar_2_Copiar_Copiar_2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_2_Copiar_Copiar_2, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_istari_Copiar_2_Copiar_Copiar_2, Condition( function Trig_istari_Copiar_2_Copiar_Copiar_2_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_2_Copiar_Copiar_2, function Trig_istari_Copiar_2_Copiar_Copiar_2_Actions )
endfunction
function Trig_istari_Copiar_2_Copiar_Copiar_2_Copiar_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'E001' ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_2_Copiar_Copiar_2_Copiar_Actions takes nothing returns nothing
call TriggerSleepAction( 5.00 )
call CameraClearNoiseForPlayer( Player(0) )
call CameraClearNoiseForPlayer( Player(1) )
call CameraClearNoiseForPlayer( Player(1) )
endfunction
//===========================================================================
function InitTrig_istari_Copiar_2_Copiar_Copiar_2_Copiar takes nothing returns nothing
set gg_trg_istari_Copiar_2_Copiar_Copiar_2_Copiar = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_2_Copiar_Copiar_2_Copiar, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_istari_Copiar_2_Copiar_Copiar_2_Copiar, Condition( function Trig_istari_Copiar_2_Copiar_Copiar_2_Copiar_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_2_Copiar_Copiar_2_Copiar, function Trig_istari_Copiar_2_Copiar_Copiar_2_Copiar_Actions )
endfunction
function Trig_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'nmr2' ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'nmr2', Player(0), GetUnitLoc(GetDyingUnit()), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy takes nothing returns nothing
set gg_trg_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy, Condition( function Trig_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy, function Trig_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Actions )
endfunction
function Trig_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Copy_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'nmr3' ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Copy_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'nmr3', Player(0), GetUnitLoc(GetDyingUnit()), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Copy takes nothing returns nothing
set gg_trg_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Copy, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Copy, Condition( function Trig_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Copy_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Copy, function Trig_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Copy_Actions )
endfunction
function Trig_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Copy_Copy_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'nmer' ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Copy_Copy_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'nmer', Player(0), GetUnitLoc(GetDyingUnit()), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Copy_Copy takes nothing returns nothing
set gg_trg_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Copy_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Copy_Copy, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Copy_Copy, Condition( function Trig_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Copy_Copy_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Copy_Copy, function Trig_istari_Copiar_2_Copiar_Copiar_2_Copiar_Copy_Copy_Copy_Actions )
endfunction
function Trig_istari_Copiar_2_Copiar_Copiar_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'ugho' ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_2_Copiar_Copiar_Actions takes nothing returns nothing
call AddSpecialEffectLocBJ( GetUnitLoc(GetDyingUnit()), "Abilities\\Weapons\\SteamTank\\SteamTankImpact.mdl" )
call RemoveUnit( GetDyingUnit() )
endfunction
//===========================================================================
function InitTrig_istari_Copiar_2_Copiar_Copiar takes nothing returns nothing
set gg_trg_istari_Copiar_2_Copiar_Copiar = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_2_Copiar_Copiar, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_istari_Copiar_2_Copiar_Copiar, Condition( function Trig_istari_Copiar_2_Copiar_Copiar_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_2_Copiar_Copiar, function Trig_istari_Copiar_2_Copiar_Copiar_Actions )
endfunction
function Trig_istari_Copiar_2_Copiar_Copiar_Copiar_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'Hpal' ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_2_Copiar_Copiar_Copiar_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 600, Player(0), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 600, Player(1), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 600, Player(2), PLAYER_STATE_RESOURCE_GOLD )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1094" )
endfunction
//===========================================================================
function InitTrig_istari_Copiar_2_Copiar_Copiar_Copiar takes nothing returns nothing
set gg_trg_istari_Copiar_2_Copiar_Copiar_Copiar = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_2_Copiar_Copiar_Copiar, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_istari_Copiar_2_Copiar_Copiar_Copiar, Condition( function Trig_istari_Copiar_2_Copiar_Copiar_Copiar_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_2_Copiar_Copiar_Copiar, function Trig_istari_Copiar_2_Copiar_Copiar_Copiar_Actions )
endfunction
function Trig_istari_Copiar_2_Copiar_Copiar_Copiar_Copiar_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'Hlgr' ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_2_Copiar_Copiar_Copiar_Copiar_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 400, Player(0), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 400, Player(1), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 400, Player(2), PLAYER_STATE_RESOURCE_GOLD )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1175" )
endfunction
//===========================================================================
function InitTrig_istari_Copiar_2_Copiar_Copiar_Copiar_Copiar takes nothing returns nothing
set gg_trg_istari_Copiar_2_Copiar_Copiar_Copiar_Copiar = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_2_Copiar_Copiar_Copiar_Copiar, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_istari_Copiar_2_Copiar_Copiar_Copiar_Copiar, Condition( function Trig_istari_Copiar_2_Copiar_Copiar_Copiar_Copiar_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_2_Copiar_Copiar_Copiar_Copiar, function Trig_istari_Copiar_2_Copiar_Copiar_Copiar_Copiar_Actions )
endfunction
function Trig_istari_Copiar_2_Copiar_Copiar_Copiar_Copiar_Copiar_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'Harf' ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_2_Copiar_Copiar_Copiar_Copiar_Copiar_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 400, Player(0), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 400, Player(1), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 400, Player(2), PLAYER_STATE_RESOURCE_GOLD )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_1176" )
endfunction
//===========================================================================
function InitTrig_istari_Copiar_2_Copiar_Copiar_Copiar_Copiar_Copiar takes nothing returns nothing
set gg_trg_istari_Copiar_2_Copiar_Copiar_Copiar_Copiar_Copiar = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar_2_Copiar_Copiar_Copiar_Copiar_Copiar, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_istari_Copiar_2_Copiar_Copiar_Copiar_Copiar_Copiar, Condition( function Trig_istari_Copiar_2_Copiar_Copiar_Copiar_Copiar_Copiar_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar_2_Copiar_Copiar_Copiar_Copiar_Copiar, function Trig_istari_Copiar_2_Copiar_Copiar_Copiar_Copiar_Copiar_Actions )
endfunction
function Trig_istari_Copiar_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttackedUnitBJ()) == 'odoc' ) ) then
return false
endif
if ( not ( IsUnitType(GetAttacker(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_istari_Copiar_Actions takes nothing returns nothing
call IssueImmediateOrderBJ( GetAttackedUnitBJ(), "fanofknives" )
call TriggerSleepAction( 1.00 )
call IssuePointOrderLocBJ( GetAttackedUnitBJ(), "attack", GetRectCenter(gg_rct_Regi__n_003) )
endfunction
//===========================================================================
function InitTrig_istari_Copiar takes nothing returns nothing
set gg_trg_istari_Copiar = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_istari_Copiar, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_istari_Copiar, Condition( function Trig_istari_Copiar_Conditions ) )
call TriggerAddAction( gg_trg_istari_Copiar, function Trig_istari_Copiar_Actions )
endfunction
function Trig_Barad_dur_Copiar_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A001' ) ) then
return false
endif
return true
endfunction
function Trig_Barad_dur_Copiar_Func002Func003001 takes nothing returns boolean
return ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) <= 999.99 )
endfunction
function Trig_Barad_dur_Copiar_Func002Func003002 takes nothing returns boolean
return ( GetUnitTypeId(GetSpellTargetUnit()) == 'hmpr' )
endfunction
function Trig_Barad_dur_Copiar_Func002C takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Barad_dur_Copiar_Func002Func003001(), Trig_Barad_dur_Copiar_Func002Func003002() ) ) then
return false
endif
return true
endfunction
function Trig_Barad_dur_Copiar_Actions takes nothing returns nothing
call TriggerSleepAction( 1.00 )
if ( Trig_Barad_dur_Copiar_Func002C() ) then
call RemoveUnit( GetSpellTargetUnit() )
call CreateNUnitsAtLoc( 1, 'otau', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
else
endif
endfunction
//===========================================================================
function InitTrig_Barad_dur_Copiar takes nothing returns nothing
set gg_trg_Barad_dur_Copiar = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Barad_dur_Copiar, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Barad_dur_Copiar, Condition( function Trig_Barad_dur_Copiar_Conditions ) )
call TriggerAddAction( gg_trg_Barad_dur_Copiar, function Trig_Barad_dur_Copiar_Actions )
endfunction
function Trig_Barad_dur_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A001' ) ) then
return false
endif
return true
endfunction
function Trig_Barad_dur_Func002Func003001 takes nothing returns boolean
return ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) <= 999.99 )
endfunction
function Trig_Barad_dur_Func002Func003002 takes nothing returns boolean
return ( GetUnitTypeId(GetSpellTargetUnit()) == 'hfoo' )
endfunction
function Trig_Barad_dur_Func002C takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Barad_dur_Func002Func003001(), Trig_Barad_dur_Func002Func003002() ) ) then
return false
endif
return true
endfunction
function Trig_Barad_dur_Actions takes nothing returns nothing
call TriggerSleepAction( 1.00 )
if ( Trig_Barad_dur_Func002C() ) then
call RemoveUnit( GetSpellTargetUnit() )
call CreateNUnitsAtLoc( 1, 'otau', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
else
endif
endfunction
//===========================================================================
function InitTrig_Barad_dur takes nothing returns nothing
set gg_trg_Barad_dur = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Barad_dur, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Barad_dur, Condition( function Trig_Barad_dur_Conditions ) )
call TriggerAddAction( gg_trg_Barad_dur, function Trig_Barad_dur_Actions )
endfunction
function Trig_Barad_dur_Copiar_2_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A001' ) ) then
return false
endif
return true
endfunction
function Trig_Barad_dur_Copiar_2_Func002Func003001 takes nothing returns boolean
return ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) <= 999.99 )
endfunction
function Trig_Barad_dur_Copiar_2_Func002Func003002 takes nothing returns boolean
return ( GetUnitTypeId(GetSpellTargetUnit()) == 'hrif' )
endfunction
function Trig_Barad_dur_Copiar_2_Func002C takes nothing returns boolean
if ( not GetBooleanAnd( Trig_Barad_dur_Copiar_2_Func002Func003001(), Trig_Barad_dur_Copiar_2_Func002Func003002() ) ) then
return false
endif
return true
endfunction
function Trig_Barad_dur_Copiar_2_Actions takes nothing returns nothing
call TriggerSleepAction( 1.00 )
if ( Trig_Barad_dur_Copiar_2_Func002C() ) then
call RemoveUnit( GetSpellTargetUnit() )
call CreateNUnitsAtLoc( 1, 'otau', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
else
endif
endfunction
//===========================================================================
function InitTrig_Barad_dur_Copiar_2 takes nothing returns nothing
set gg_trg_Barad_dur_Copiar_2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Barad_dur_Copiar_2, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Barad_dur_Copiar_2, Condition( function Trig_Barad_dur_Copiar_2_Conditions ) )
call TriggerAddAction( gg_trg_Barad_dur_Copiar_2, function Trig_Barad_dur_Copiar_2_Actions )
endfunction
// GUI-Friendly Damage Detection -- v1.2.1 -- by Weep
// http:// www.thehelper.net/forums/showthread.php?t=137957
//
// Requires: only this trigger and its variables.
//
// -- What? --
// This snippet provides a leak-free, GUI-friendly implementation of an "any unit takes
// damage" event. It requires no JASS knowledge to use.
//
// It uses the Game - Value Of Real Variable event as its method of activating other
// triggers, and passes the event responses through a few globals.
//
// -- Why? --
// The traditional GUI method of setting up a trigger than runs when any unit is damaged
// leaks trigger events. This snippet is easy to implement and removes the need to do
// you own GUI damage detection setup.
//
// -- How To Implement --
// 0. Before you copy triggers that use GDD into a new map, you need to copy over GDD
// with its GDD Variable Creator trigger, or there will be a problem: the variables
// won't be automatically created correctly.
//
// 1. Be sure "Automatically create unknown variables while pasting trigger data" is
// enabled in the World Editor general preferences.
// 2. Copy this trigger category ("GDD") and paste it into your map.
// (Alternately: create the variables listed in the globals block below, create a
// trigger named "GUI Friendly Damage Detection", and paste in this entire text.)
// 3. Create your damage triggers using Game - Value Of Real Variable as the event,
// select GDD_Event as the variable, and leave the rest of the settings to the default
// "becomes Equal to 0.00".
// The event responses are the following variables:
// GDD_Damage is the amount of damage, replacing Event Response - Damage Taken.
// GDD_DamagedUnit is the damaged unit, replacing Event Response - Triggering Unit.
// Triggering Unit can still be used, if you need to use waits.
// Read the -- Notes -- section below for more info.
// GDD_DamageSource is the damaging unit, replacing Event Response - Damage Source.
//
// -- Notes --
// GDD's event response variables are not wait-safe; you can't use them after a wait in
// a trigger. If you need to use waits, Triggering Unit (a.k.a. GetTriggerUnit()) can
// be used in place of GDD_DamageSource. There is no usable wait-safe equivalent to
// Event Damage or Damage Source; you'll need to save the values yourself.
//
// Don't write any values to the variables used as the event responses, or it will mess
// up any other triggers using this snippet for their triggering. Only use their values.
//
// This uses arrays, so can detect damage for a maximum of 8190 units at a time, and
// cleans up data at a rate of 33.33 per second, by default. This should be enough for
// most maps, but if you want to change the rate, change the value returned in the
// GDD_RecycleRate function at the top of the code, below.
//
// By default, GDD will not register units that have Locust at the moment of their
// entering the game, and will not recognize when they take damage (which can only
// happen if the Locust ability is later removed from the unit.) To allow a unit to have
// Locust yet still cause GDD damage events if Locust is removed, you can either design
// the unit to not have Locust by default and add it via triggers after creation, or
// edit the GDD_Filter function at the top of the code, below.
//
// -- Credits --
// Captain Griffin on wc3c.net for the research and concept of GroupRefresh.
//
// Credit in your map not needed, but please include this README.
//
// -- Version History --
// 1.2.1: Minor code cleaning. Added configuration functions. Updated documentation.
// 1.2.0: Made this snippet work properly with recursive damage.
// 1.1.1: Added a check in order to not index units with the Locust ability (dummy units).
// If you wish to check for damage taken by a unit that is unselectable, do not
// give the unit-type Locust in the object editor; instead, add the Locust ability
// 'Aloc' via a trigger after its creation, then remove it.
// 1.1.0: Added a check in case a unit gets moved out of the map and back.
// 1.0.0: First release.
//===================================================================
// Configurables.
function GDD_RecycleRate takes nothing returns real //The rate at which the system checks units to see if they've been removed from the game
return 0.03
endfunction
function GDD_Filter takes unit u returns boolean //The condition a unit has to pass to have it registered for damage detection
return GetUnitAbilityLevel(u, 'Aloc') == 0 //By default, the system ignores Locust units, because they normally can't take damage anyway
endfunction
//===================================================================
// This is just for reference.
// If you use JassHelper, you could uncomment this section instead of creating the variables in the trigger editor.
// globals
// real udg_GDD_Event = 0.
// real udg_GDD_Damage = 0.
// unit udg_GDD_DamagedUnit
// unit udg_GDD_DamageSource
// trigger array udg_GDD__TriggerArray
// integer array udg_GDD__Integers
// unit array udg_GDD__UnitArray
// group udg_GDD__LeftMapGroup = CreateGroup()
// endglobals
//===================================================================
// System code follows. Don't touch!
function GDD_Event takes nothing returns boolean
local unit damagedcache = udg_GDD_DamagedUnit
local unit damagingcache = udg_GDD_DamageSource
local real damagecache = udg_GDD_Damage
set udg_GDD_DamagedUnit = GetTriggerUnit()
set udg_GDD_DamageSource = GetEventDamageSource()
set udg_GDD_Damage = GetEventDamage()
set udg_GDD_Event = 1.
set udg_GDD_Event = 0.
set udg_GDD_DamagedUnit = damagedcache
set udg_GDD_DamageSource = damagingcache
set udg_GDD_Damage = damagecache
set damagedcache = null
set damagingcache = null
return false
endfunction
function GDD_AddDetection takes nothing returns boolean
// if(udg_GDD__Integers[0] > 8190) then
// call BJDebugMsg("GDD: Too many damage events! Decrease number of units present in the map or increase recycle rate.")
// ***Recycle rate is specified in the GDD_RecycleRate function at the top of the code. Smaller is faster.***
// return
// endif
if(IsUnitInGroup(GetFilterUnit(), udg_GDD__LeftMapGroup)) then
call GroupRemoveUnit(udg_GDD__LeftMapGroup, GetFilterUnit())
elseif(GDD_Filter(GetFilterUnit())) then
set udg_GDD__Integers[0] = udg_GDD__Integers[0]+1
set udg_GDD__UnitArray[udg_GDD__Integers[0]] = GetFilterUnit()
set udg_GDD__TriggerArray[udg_GDD__Integers[0]] = CreateTrigger()
call TriggerRegisterUnitEvent(udg_GDD__TriggerArray[udg_GDD__Integers[0]], udg_GDD__UnitArray[udg_GDD__Integers[0]], EVENT_UNIT_DAMAGED)
call TriggerAddCondition(udg_GDD__TriggerArray[udg_GDD__Integers[0]], Condition(function GDD_Event))
endif
return false
endfunction
function GDD_PreplacedDetection takes nothing returns nothing
local group g = CreateGroup()
local integer i = 0
loop
call GroupEnumUnitsOfPlayer(g, Player(i), Condition(function GDD_AddDetection))
set i = i+1
exitwhen i == bj_MAX_PLAYER_SLOTS
endloop
call DestroyGroup(g)
set g = null
endfunction
function GDD_GroupRefresh takes nothing returns nothing
// Based on GroupRefresh by Captain Griffen on wc3c.net
if (bj_slotControlUsed[5063] == true) then
call GroupClear(udg_GDD__LeftMapGroup)
set bj_slotControlUsed[5063] = false
endif
call GroupAddUnit(udg_GDD__LeftMapGroup, GetEnumUnit())
endfunction
function GDD_Recycle takes nothing returns nothing
if(udg_GDD__Integers[0] <= 0) then
return
elseif(udg_GDD__Integers[1] <= 0) then
set udg_GDD__Integers[1] = udg_GDD__Integers[0]
endif
if(GetUnitTypeId(udg_GDD__UnitArray[udg_GDD__Integers[1]]) == 0) then
call DestroyTrigger(udg_GDD__TriggerArray[udg_GDD__Integers[1]])
set udg_GDD__TriggerArray[udg_GDD__Integers[1]] = null
set udg_GDD__TriggerArray[udg_GDD__Integers[1]] = udg_GDD__TriggerArray[udg_GDD__Integers[0]]
set udg_GDD__UnitArray[udg_GDD__Integers[1]] = udg_GDD__UnitArray[udg_GDD__Integers[0]]
set udg_GDD__UnitArray[udg_GDD__Integers[0]] = null
set udg_GDD__Integers[0] = udg_GDD__Integers[0]-1
endif
set udg_GDD__Integers[1] = udg_GDD__Integers[1]-1
endfunction
function GDD_LeaveMap takes nothing returns boolean
local boolean cached = bj_slotControlUsed[5063]
if(udg_GDD__Integers[2] < 64) then
set udg_GDD__Integers[2] = udg_GDD__Integers[2]+1
else
set bj_slotControlUsed[5063] = true
call ForGroup(udg_GDD__LeftMapGroup, function GDD_GroupRefresh)
set udg_GDD__Integers[2] = 0
endif
call GroupAddUnit(udg_GDD__LeftMapGroup, GetFilterUnit())
set bj_slotControlUsed[5063] = cached
return false
endfunction
// ===========================================================================
function InitTrig_GUI_Friendly_Damage_Detection takes nothing returns nothing
local region r = CreateRegion()
call RegionAddRect(r, GetWorldBounds())
call TriggerRegisterEnterRegion(CreateTrigger(), r, Condition(function GDD_AddDetection))
call TriggerRegisterLeaveRegion(CreateTrigger(), r, Condition(function GDD_LeaveMap))
call GDD_PreplacedDetection()
call TimerStart(CreateTimer(), GDD_RecycleRate(), true, function GDD_Recycle)
set r = null
endfunction