Name | Type | is_array | initial_value |
AliveMineCarts | integer | No | |
AliveTownhallCount | integer | No | |
AntiFood | unit | Yes | |
BattleCryActive | boolean | Yes | |
BattleCryLevelTemp | integer | No | |
BattleCryPlayerTemp | player | No | |
BattleCrySteps | integer | Yes | 1 |
BBRevive_Owner | player | No | |
BloodBrother | unit | Yes | |
BTNS_RaceDialog | button | Yes | |
BuildingsUnderConstruction | group | No | |
CRAI_AI_RND | integer | No | |
CRAI_Count | integer | No | 1 |
CRAI_Defeat_Count | integer | No | |
CRAI_Fleeing_Units | group | No | |
CRAI_Name_temp | string | No | |
CRAI_NameRND | integer | Yes | |
CRAI_Names | string | Yes | |
CRAI_Player | player | No | |
CRAI_Players | boolean | Yes | |
DummyCount | integer | No | |
ForrestBackupCounter | integer | No | |
ForrestBackupTimer | timer | Yes | |
ForrestBackupUnits | unit | Yes | |
FortifyEffects | effect | Yes | |
FoundHarvestTarget | boolean | No | |
GnollGiftedNumber | integer | No | |
HarvestDistance | real | No | |
HarvestMinRangeUnit | unit | No | |
HarvestReturnTarget | unit | No | |
HarvestReturnTargets | unit | Yes | |
HarvestTreeTargets | destructable | Yes | |
ItemClass | integer | No | |
ItemLevel | integer | No | |
ItemLuckTurtle | unit | No | |
ItemType | itemcode | No | |
LightGrenadeGroup | group | No | |
Loyalty_ItemDrop | item | Yes | |
LoyaltyActive | boolean | No | |
LoyaltyOwner | player | Yes | |
LoyaltyTargets | unit | Yes | |
LoyaltyTemp | unit | No | |
MineCartCount | integer | No | |
MineFull | boolean | No | |
MinesTargeted | unit | Yes | |
NrOfTownhalls | integer | Yes | |
NrPlayersReady | integer | No | |
PlayerReady | boolean | Yes | |
RaceDialog | dialog | No | |
RaceDialogs | dialog | Yes | |
RaceSelectTimer | timer | No | |
RandomRace | integer | No | |
RevealBuilding | unit | Yes | |
RevivePoint | location | No | |
RndNumber | integer | No | |
ShadowVamp | unit | No | |
SiegeMachinery_Count | integer | No | |
SiegeMachineryGlobal | unit | No | |
SiegeMachineryTarget | location | No | |
SpeakerTower_SFX | effect | Yes | |
SpeakerTowerNumber | integer | No | |
SpellAktiv | boolean | Yes | |
SpellDauer | real | Yes | |
SpiritualizeTargets | unit | Yes | |
SpyUsedUnitGroup | group | No | |
StartMineCartTemp | unit | No | |
StunGrenadeGroup | group | No | |
SV_Owner | player | No | |
SV_Position | location | No | |
TimeBombCounter | boolean | Yes | |
TimeBombPlayer | player | No | |
TimeBombs | unit | Yes | |
VoodooBladeChance | integer | No | |
WoodChanterCVTemp | integer | No | |
WoodChanterNumber | integer | No |
function Trig_Gnoll_Huts_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetAttackedUnitBJ())) == MAP_CONTROL_COMPUTER ) ) then
return false
endif
if ( not ( udg_CRAI_Players[GetConvertedPlayerId(GetOwningPlayer(GetAttackedUnitBJ()))] == true ) ) then
return false
endif
if ( not ( GetUnitLifePercent(GetAttackedUnitBJ()) <= 20.00 ) ) then
return false
endif
if ( not ( IsUnitInGroup(GetAttackedUnitBJ(), udg_CRAI_Fleeing_Units) == false ) ) then
return false
endif
return true
endfunction
function Trig_Gnoll_Huts_Actions takes nothing returns nothing
local unit GnollHut
local unit AttackedUnit
set GnollHut = GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetAttackedUnitBJ()), 'h005'))
call RemoveGuardPosition( GetAttackedUnitBJ() )
call GroupAddUnitSimple( GetAttackedUnitBJ(), udg_CRAI_Fleeing_Units )
call IssueTargetOrderBJ( GetAttackedUnitBJ(), "board", GnollHut )
set AttackedUnit = GetAttackedUnitBJ()
call PolledWait( 30.00 )
call IssueTargetOrderBJ( GnollHut, "unload", AttackedUnit)
call RecycleGuardPosition( AttackedUnit )
call GroupRemoveUnitSimple( AttackedUnit, udg_CRAI_Fleeing_Units )
endfunction
//===========================================================================
function InitTrig_Gnoll_Huts takes nothing returns nothing
set gg_trg_Gnoll_Huts = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Gnoll_Huts, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Gnoll_Huts, Condition( function Trig_Gnoll_Huts_Conditions ) )
call TriggerAddAction( gg_trg_Gnoll_Huts, function Trig_Gnoll_Huts_Actions )
endfunction
function Trig_CRAI_2nd_Townhall_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetConstructingStructure()) == 'n006' ) ) then
return false
endif
return true
endfunction
function Trig_CRAI_2nd_Townhall_Func001001001 takes nothing returns boolean
return ( GetPlayerState(GetOwningPlayer(GetConstructingStructure()), PLAYER_STATE_RESOURCE_GOLD) >= 350 )
endfunction
function Trig_CRAI_2nd_Townhall_Func001001002 takes nothing returns boolean
return ( GetPlayerState(GetOwningPlayer(GetConstructingStructure()), PLAYER_STATE_RESOURCE_LUMBER) >= 210 )
endfunction
function Trig_CRAI_2nd_Townhall_Func001001 takes nothing returns boolean
return GetBooleanAnd( Trig_CRAI_2nd_Townhall_Func001001001(), Trig_CRAI_2nd_Townhall_Func001001002() )
endfunction
function Trig_CRAI_2nd_Townhall_Actions takes nothing returns nothing
local player Techer
set Techer = GetOwningPlayer(GetConstructingStructure())
loop
exitwhen ( Trig_CRAI_2nd_Townhall_Func001001() )
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, 4.00))
endloop
call ReplaceUnitBJ( GroupPickRandomUnit(GetUnitsOfPlayerAndTypeId(Techer, 'h001')), 'h008', bj_UNIT_STATE_METHOD_RELATIVE )
call SetPlayerStateBJ( Techer, PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(Techer, PLAYER_STATE_RESOURCE_GOLD) - 320 ) )
call SetPlayerStateBJ( Techer, PLAYER_STATE_RESOURCE_LUMBER, ( GetPlayerState(Techer, PLAYER_STATE_RESOURCE_LUMBER) - 210 ) )
endfunction
//===========================================================================
function InitTrig_CRAI_2nd_Townhall takes nothing returns nothing
set gg_trg_CRAI_2nd_Townhall = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_CRAI_2nd_Townhall, EVENT_PLAYER_UNIT_CONSTRUCT_START )
call TriggerAddCondition( gg_trg_CRAI_2nd_Townhall, Condition( function Trig_CRAI_2nd_Townhall_Conditions ) )
call TriggerAddAction( gg_trg_CRAI_2nd_Townhall, function Trig_CRAI_2nd_Townhall_Actions )
endfunction
function Trig_S_Ignorance_ON_u_OFF_Conditions takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("immolation") ) ) then
return false
endif
return true
endfunction
function Trig_S_Ignorance_ON_u_OFF_Func011C takes nothing returns boolean
if ( not ( udg_SpellAktiv[GetConvertedPlayerId(GetOwningPlayer(GetOrderedUnit()))] == true ) ) then
return false
endif
return true
endfunction
function Trig_S_Ignorance_ON_u_OFF_Actions takes nothing returns nothing
// Aktivieren
local unit OgerLord
local unit Ignorance_Dummy
set OgerLord = GetOrderedUnit()
set udg_SpellAktiv[GetConvertedPlayerId(GetOwningPlayer(GetOrderedUnit()))] = true
call UnitAddAbilityBJ( 'A00S', GetOrderedUnit() )
call UnitAddAbilityBJ( 'A00R', GetOrderedUnit() )
call CreateNUnitsAtLoc( 1, 'h00S', GetOwningPlayer(GetOrderedUnit()), GetUnitLoc(GetOrderedUnit()), bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "smart", GetOrderedUnit() )
call ShowUnitHide( GetLastCreatedUnit() )
set Ignorance_Dummy = GetLastCreatedUnit()
// Wait für Auto Disable
call PolledWait( udg_SpellDauer[GetUnitAbilityLevelSwapped('A01L', OgerLord)] )
// Auto Disable (wenn Spell noch aktiv)
if ( Trig_S_Ignorance_ON_u_OFF_Func011C() ) then
call IssueImmediateOrderBJ( OgerLord, "unimmolation" )
call RemoveUnit( Ignorance_Dummy )
else
endif
endfunction
//===========================================================================
function InitTrig_S_Ignorance_ON_u_OFF takes nothing returns nothing
set gg_trg_S_Ignorance_ON_u_OFF = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_S_Ignorance_ON_u_OFF, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_S_Ignorance_ON_u_OFF, Condition( function Trig_S_Ignorance_ON_u_OFF_Conditions ) )
call TriggerAddAction( gg_trg_S_Ignorance_ON_u_OFF, function Trig_S_Ignorance_ON_u_OFF_Actions )
endfunction
function Trig_StartCatapult_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTransportUnitBJ()) == 'o001' ) ) then
return false
endif
return true
endfunction
function Trig_StartCatapult_Actions takes nothing returns nothing
local unit OgerSGonnaFly
call ReplaceUnitBJ( GetLoadedUnitBJ(), 'n00A', bj_UNIT_STATE_METHOD_RELATIVE )
set OgerSGonnaFly = GetLastReplacedUnitBJ()
call IssuePointOrderLocBJ( GetLastReplacedUnitBJ(), "move", PolarProjectionBJ(GetUnitLoc(GetTransportUnitBJ()), 512.00, GetUnitFacing(GetLastReplacedUnitBJ())) )
call SetUnitFlyHeightBJ( GetLastReplacedUnitBJ(), 400.00, 300.00 )
call AddSpecialEffectTargetUnitBJ( "origin", GetSpellAbilityUnit(), "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl" )
call KillUnit( GetTransportUnitBJ() )
call PolledWait( 1.00 )
call SetUnitFlyHeightBJ( OgerSGonnaFly, 100.00, 300.00 )
endfunction
//===========================================================================
function InitTrig_StartCatapult takes nothing returns nothing
set gg_trg_StartCatapult = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_StartCatapult, EVENT_PLAYER_UNIT_LOADED )
call TriggerAddCondition( gg_trg_StartCatapult, Condition( function Trig_StartCatapult_Conditions ) )
call TriggerAddAction( gg_trg_StartCatapult, function Trig_StartCatapult_Actions )
endfunction
function Trig_TreeIsCut_Conditions takes nothing returns boolean
if ( not ( TimerGetRemaining(udg_ForrestBackupTimer[GetConvertedPlayerId(GetOwningPlayer(GetOrderedUnit()))]) <= 0.00 ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetOrderedUnit()) == 'h000' ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("resumeharvesting") ) ) then
return false
endif
return true
endfunction
function Trig_TreeIsCut_Actions takes nothing returns nothing
local unit ForceOfNature_Dummy
local destructable ForceOfNature_Target
local unit Ordered_WoodChanter
set Ordered_WoodChanter = GetOrderedUnit()
set ForceOfNature_Target = udg_HarvestTreeTargets[GetUnitUserData(GetOrderedUnit())]
set udg_HarvestReturnTargets[GetUnitUserData(GetOrderedUnit())] = GetOrderTargetUnit()
call UnitRemoveAbilityBJ( 'A000', GetOrderedUnit() )
call CreateNUnitsAtLoc( 1, 'h002', Player(PLAYER_NEUTRAL_PASSIVE), GetUnitLoc(GetOrderedUnit()), bj_UNIT_FACING )
set ForceOfNature_Dummy = GetLastCreatedUnit()
call SetUnitUserData( GetLastCreatedUnit(), GetUnitUserData(GetOrderedUnit()) )
call ShowUnitHide( GetLastCreatedUnit() )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "forceofnature", GetDestructableLoc(udg_HarvestTreeTargets[GetUnitUserData(GetOrderedUnit())]) )
call UnitAddAbilityBJ( 'A000', GetOrderedUnit() )
call PolledWait( 0.2 )
call IssueImmediateOrderBJ( Ordered_WoodChanter, "autoharvestlumber" )
call PolledWait( 3.00 )
call RemoveUnit( ForceOfNature_Dummy )
call DestructableRestoreLife( ForceOfNature_Target, GetDestructableMaxLife(ForceOfNature_Target), true )
//call IssueImmediateOrderBJ( Ordered_WoodChanter, "autoharvestlumber" )
endfunction
//===========================================================================
function InitTrig_TreeIsCut takes nothing returns nothing
set gg_trg_TreeIsCut = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_TreeIsCut, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerAddCondition( gg_trg_TreeIsCut, Condition( function Trig_TreeIsCut_Conditions ) )
call TriggerAddAction( gg_trg_TreeIsCut, function Trig_TreeIsCut_Actions )
endfunction
function Trig_WalkingTreeDies_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01R' ) ) then
return false
endif
return true
endfunction
function Trig_WalkingTreeDies_Func001001 takes nothing returns boolean
return ( GetPlayerTechCountSimple('R00F', GetOwningPlayer(udg_HarvestReturnTargets[GetUnitUserData(GetSpellAbilityUnit())])) == 1 )
endfunction
function Trig_WalkingTreeDies_Func002002 takes nothing returns boolean
return ( GetPlayerTechCountSimple('R00F', GetOwningPlayer(udg_HarvestReturnTargets[GetUnitUserData(GetSpellAbilityUnit())])) == 0 )
endfunction
function Trig_WalkingTreeDies_Actions takes nothing returns nothing
local texttag lumber_text
if ( Trig_WalkingTreeDies_Func001001() ) then
call CreateTextTagUnitBJ( "+15", GetSpellAbilityUnit(), 64.00, 10, 0.00, 100, 40.00, 0 )
else
call DoNothing( )
endif
if ( Trig_WalkingTreeDies_Func002002() ) then
call CreateTextTagUnitBJ( "+10", GetSpellAbilityUnit(), 64.00, 10, 0.00, 100, 40.00, 0 )
else
call DoNothing( )
endif
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call ShowTextTagForceBJ( false, GetLastCreatedTextTag(), GetPlayersAll() )
call ShowTextTagForceBJ( true, GetLastCreatedTextTag(), GetForceOfPlayer(GetOwningPlayer(udg_HarvestReturnTargets[GetUnitUserData(GetSpellAbilityUnit())])) )
set lumber_text = GetLastCreatedTextTag()
call RemoveUnit( GetSpellAbilityUnit() )
call PolledWait( 1.00 )
call DestroyTextTagBJ( lumber_text )
endfunction
//===========================================================================
function InitTrig_WalkingTreeDies takes nothing returns nothing
set gg_trg_WalkingTreeDies = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_WalkingTreeDies, EVENT_PLAYER_UNIT_SPELL_FINISH )
call TriggerAddCondition( gg_trg_WalkingTreeDies, Condition( function Trig_WalkingTreeDies_Conditions ) )
call TriggerAddAction( gg_trg_WalkingTreeDies, function Trig_WalkingTreeDies_Actions )
endfunction
function Trig_InitHarvest_Func002C takes nothing returns boolean
if ( ( GetIssuedOrderIdBJ() == 851970 ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == 852019 ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("smart") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("harvest") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("autoharvestlumber") ) ) then
return true
endif
return false
endfunction
function Trig_InitHarvest_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetOrderedUnit()) == 'h000' ) ) then
return false
endif
if ( not Trig_InitHarvest_Func002C() ) then
return false
endif
return true
endfunction
function Trig_InitHarvest_Actions takes nothing returns nothing
set udg_HarvestTreeTargets[GetUnitUserData(GetOrderedUnit())] = GetOrderTargetDestructable()
endfunction
//===========================================================================
function InitTrig_SelectHarvestTarget takes nothing returns nothing
set gg_trg_SelectHarvestTarget = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SelectHarvestTarget, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerAddCondition( gg_trg_SelectHarvestTarget, Condition( function Trig_InitHarvest_Conditions ) )
call TriggerAddAction( gg_trg_SelectHarvestTarget, function Trig_InitHarvest_Actions )
endfunction
function Trig_SelectHarvestTarget_Point_Func002C takes nothing returns boolean
if ( ( GetIssuedOrderIdBJ() == 851970 ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("smart") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("harvest") ) ) then
return true
endif
return false
endfunction
function Trig_SelectHarvestTarget_Point_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetOrderedUnit()) == 'h000' ) ) then
return false
endif
if ( not Trig_SelectHarvestTarget_Point_Func002C() ) then
return false
endif
return true
endfunction
function Trig_SelectHarvestTarget_Point_Actions takes nothing returns nothing
set udg_HarvestTreeTargets[GetUnitUserData(GetOrderedUnit())] = RandomDestructableInRectSimpleBJ(RectFromCenterSizeBJ(GetOrderPointLoc(), 64.00, 64.00))
endfunction
//===========================================================================
function InitTrig_SelectHarvestTarget_Point takes nothing returns nothing
set gg_trg_SelectHarvestTarget_Point = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SelectHarvestTarget_Point, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( gg_trg_SelectHarvestTarget_Point, Condition( function Trig_SelectHarvestTarget_Point_Conditions ) )
call TriggerAddAction( gg_trg_SelectHarvestTarget_Point, function Trig_SelectHarvestTarget_Point_Actions )
endfunction
function Trig_MineCartUnloads_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetOrderedUnit()) == 'h004' ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("unload") ) ) then
return false
endif
return true
endfunction
function Trig_MineCartUnloads_Actions takes nothing returns nothing
local unit MineCart
set MineCart = GetOrderedUnit()
call SetUnitMoveSpeed( GetOrderedUnit(), ( GetUnitMoveSpeed(GetOrderedUnit()) - 15.00 ) )
call PolledWait( 0.20 )
call PauseUnitBJ( true, MineCart )
call IssueImmediateOrderBJ( MineCart, "stop" )
call PolledWait( 0.01 )
call PauseUnitBJ( false, MineCart )
endfunction
//===========================================================================
function InitTrig_MineCartUnloads takes nothing returns nothing
set gg_trg_MineCartUnloads = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MineCartUnloads, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerAddCondition( gg_trg_MineCartUnloads, Condition( function Trig_MineCartUnloads_Conditions ) )
call TriggerAddAction( gg_trg_MineCartUnloads, function Trig_MineCartUnloads_Actions )
endfunction
function Trig_EncampmentDown_Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetDyingUnit()) == 'h001' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'h008' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'h009' ) ) then
return true
endif
return false
endfunction
function Trig_EncampmentDown_Conditions takes nothing returns boolean
if ( not Trig_EncampmentDown_Func003C() ) then
return false
endif
return true
endfunction
function Trig_EncampmentDown_Func002Func004001001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_TOWNHALL) == true )
endfunction
function Trig_EncampmentDown_Func002Func004001001002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_EncampmentDown_Func002Func004001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_EncampmentDown_Func002Func004001001002001(), Trig_EncampmentDown_Func002Func004001001002002() )
endfunction
function Trig_EncampmentDown_Func002C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfPlayerMatching(GetOwningPlayer(GetDyingUnit()), Condition(function Trig_EncampmentDown_Func002Func004001001002))) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_EncampmentDown_Actions takes nothing returns nothing
local integer PlayerNumber
set PlayerNumber = GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))
set udg_NrOfTownhalls[PlayerNumber] = ( udg_NrOfTownhalls[PlayerNumber] - 1 )
call SetPlayerTechMaxAllowedSwap( 'h004', udg_NrOfTownhalls[PlayerNumber], GetOwningPlayer(GetDyingUnit()) )
call PolledWait( 0.20 )
if ( Trig_EncampmentDown_Func002C() ) then
call KillUnit( udg_RevealBuilding[PlayerNumber] )
call KillUnit( udg_AntiFood[PlayerNumber] )
return
else
endif
endfunction
//===========================================================================
function InitTrig_EncampmentDown takes nothing returns nothing
set gg_trg_EncampmentDown = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_EncampmentDown, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_EncampmentDown, Condition( function Trig_EncampmentDown_Conditions ) )
call TriggerAddAction( gg_trg_EncampmentDown, function Trig_EncampmentDown_Actions )
endfunction
function Trig_ForrestBackup_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A008' ) ) then
return false
endif
return true
endfunction
function Trig_ForrestBackup_Actions takes nothing returns nothing
local effect forrest_backup
call AddSpecialEffectTargetUnitBJ( "overhead", GetSpellAbilityUnit(), "Abilities\\Spells\\Human\\Brilliance\\Brilliance.mdl" )
set forrest_backup = GetLastCreatedEffectBJ()
call StartTimerBJ( udg_ForrestBackupTimer[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], false, 20.00 )
call PolledWait( 20 )
call DestroyEffectBJ( forrest_backup )
endfunction
//===========================================================================
function InitTrig_ForrestBackup takes nothing returns nothing
set gg_trg_ForrestBackup = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ForrestBackup, EVENT_PLAYER_UNIT_SPELL_FINISH )
call TriggerAddCondition( gg_trg_ForrestBackup, Condition( function Trig_ForrestBackup_Conditions ) )
call TriggerAddAction( gg_trg_ForrestBackup, function Trig_ForrestBackup_Actions )
endfunction
function Trig_NewMineCartOrdere_Conditions takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == 1747988532 ) ) then
return false
endif
return true
endfunction
function Trig_NewMineCartOrdere_Actions takes nothing returns nothing
call PolledWait( 0.01 )
call SetPlayerUnitAvailableBJ( 'h004', false, GetOwningPlayer(GetOrderedUnit()) )
endfunction
//===========================================================================
function InitTrig_NewMineCartOrdered takes nothing returns nothing
set gg_trg_NewMineCartOrdered = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NewMineCartOrdered, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_NewMineCartOrdered, Condition( function Trig_NewMineCartOrdere_Conditions ) )
call TriggerAddAction( gg_trg_NewMineCartOrdered, function Trig_NewMineCartOrdere_Actions )
endfunction
function Trig_StartSpiritualize_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01H' ) ) then
return false
endif
return true
endfunction
function Trig_StartSpiritualize_Actions takes nothing returns nothing
local unit Spirit_Divine
local unit Spirit_Banish
set udg_SpiritualizeTargets[GetUnitUserData(GetSpellAbilityUnit())] = GetSpellTargetUnit()
call CreateNUnitsAtLoc( 1, 'h00E', Player(PLAYER_NEUTRAL_PASSIVE), GetUnitLoc(GetSpellTargetUnit()), bj_UNIT_FACING )
call ShowUnitHide( GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "innerfire", GetSpellTargetUnit() )
set Spirit_Divine = GetLastCreatedUnit()
call CreateNUnitsAtLoc( 1, 'h00E', Player(PLAYER_NEUTRAL_PASSIVE), GetUnitLoc(GetSpellAbilityUnit()), bj_UNIT_FACING )
call ShowUnitHide( GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "banish", GetSpellAbilityUnit() )
set Spirit_Banish = GetLastCreatedUnit()
call PolledWait( 2.00 )
call RemoveUnit( Spirit_Divine )
call RemoveUnit( Spirit_Banish )
endfunction
//===========================================================================
function InitTrig_StartSpiritualize takes nothing returns nothing
set gg_trg_StartSpiritualize = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_StartSpiritualize, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_StartSpiritualize, Condition( function Trig_StartSpiritualize_Conditions ) )
call TriggerAddAction( gg_trg_StartSpiritualize, function Trig_StartSpiritualize_Actions )
endfunction
function Trig_RageWardSFX_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'o000' ) ) then
return false
endif
return true
endfunction
function Trig_RageWardSFX_Actions takes nothing returns nothing
local effect RageWard_SFX
call AddSpecialEffectLocBJ( OffsetLocation(GetUnitLoc(GetSummonedUnit()), -20.00, -20.00), "Abilities\\Spells\\Other\\Doom\\DoomTarget.mdl" )
set RageWard_SFX = GetLastCreatedEffectBJ()
call PolledWait( 25 )
call DestroyEffectBJ( RageWard_SFX )
endfunction
//===========================================================================
function InitTrig_RageWardSFX takes nothing returns nothing
set gg_trg_RageWardSFX = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_RageWardSFX, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_RageWardSFX, Condition( function Trig_RageWardSFX_Conditions ) )
call TriggerAddAction( gg_trg_RageWardSFX, function Trig_RageWardSFX_Actions )
endfunction
function Trig_BloodLinkStart_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02C' ) ) then
return false
endif
return true
endfunction
function Trig_BloodLinkStart_Actions takes nothing returns nothing
local effect BL
call AddSpecialEffectTargetUnitBJ( "overhead", GetSpellAbilityUnit(), "Abilities\\Weapons\\ChimaeraAcidMissile\\ChimaeraAcidMissile.mdl" )
set BL = GetLastCreatedEffectBJ()
call PolledWait( 4.00 )
call DestroyEffectBJ( BL )
endfunction
//===========================================================================
function InitTrig_BloodLinkStart takes nothing returns nothing
set gg_trg_BloodLinkStart = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BloodLinkStart, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
call TriggerAddCondition( gg_trg_BloodLinkStart, Condition( function Trig_BloodLinkStart_Conditions ) )
call TriggerAddAction( gg_trg_BloodLinkStart, function Trig_BloodLinkStart_Actions )
endfunction
function Trig_StartLightGrenade_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A012' ) ) then
return false
endif
return true
endfunction
function Trig_StartLightGrenade_Func001001003 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetSpellAbilityUnit()) )
endfunction
function Trig_StartLightGrenade_Func001A takes nothing returns nothing
call UnitAddAbilityBJ( 'Agho', GetEnumUnit() )
call GroupAddUnitSimple( GetEnumUnit(), udg_LightGrenadeGroup )
endfunction
function Trig_StartLightGrenade_Func002001 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A012', GetSpellAbilityUnit()) == 1 )
endfunction
function Trig_StartLightGrenade_Func003001 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A012', GetSpellAbilityUnit()) == 2 )
endfunction
function Trig_StartLightGrenade_Func004001 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A012', GetSpellAbilityUnit()) == 3 )
endfunction
function Trig_StartLightGrenade_Func005002 takes nothing returns nothing
call UnitRemoveAbilityBJ( 'Agho', GetEnumUnit() )
endfunction
function Trig_StartLightGrenade_Actions takes nothing returns nothing
local group LightGrenade_Targets
call CinematicFadeBJ( bj_CINEFADETYPE_FADEOUTIN, 0.5, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100.00, 100.00, 100.00, 0 )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(400.00, GetSpellTargetLoc(), Condition(function Trig_StartLightGrenade_Func001001003)), function Trig_StartLightGrenade_Func001A )
if ( Trig_StartLightGrenade_Func002001() ) then
call PolledWait( 4.00 )
else
call DoNothing( )
endif
set LightGrenade_Targets = udg_LightGrenadeGroup
if ( Trig_StartLightGrenade_Func003001() ) then
call PolledWait( 6.00 )
else
call DoNothing( )
endif
if ( Trig_StartLightGrenade_Func004001() ) then
call PolledWait( 8.00 )
else
call DoNothing( )
endif
call ForGroupBJ( LightGrenade_Targets, function Trig_StartLightGrenade_Func005002 )
endfunction
//===========================================================================
function InitTrig_StartLightGrenade takes nothing returns nothing
set gg_trg_StartLightGrenade = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_StartLightGrenade, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_StartLightGrenade, Condition( function Trig_StartLightGrenade_Conditions ) )
call TriggerAddAction( gg_trg_StartLightGrenade, function Trig_StartLightGrenade_Actions )
endfunction
function Trig_MindBreak_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01U' ) ) then
return false
endif
return true
endfunction
function Trig_MindBreak_Actions takes nothing returns nothing
local unit SlowCaster
call CreateNUnitsAtLoc( 1, 'h00U', Player(0), GetUnitLoc(GetSpellTargetUnit()), bj_UNIT_FACING )
set SlowCaster = GetLastCreatedUnit()
call ShowUnitHide( GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "slow", GetSpellTargetUnit() )
call PolledWait( 2.00 )
call RemoveUnit( SlowCaster )
endfunction
//===========================================================================
function InitTrig_MindBreak takes nothing returns nothing
set gg_trg_MindBreak = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MindBreak, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_MindBreak, Condition( function Trig_MindBreak_Conditions ) )
call TriggerAddAction( gg_trg_MindBreak, function Trig_MindBreak_Actions )
endfunction
function Trig_GoblinTimeBomb_Func003Func004001 takes nothing returns boolean
return ( udg_TimeBombCounter[GetConvertedPlayerId(udg_TimeBombPlayer)] == false )
endfunction
function Trig_GoblinTimeBomb_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00A' ) ) then
return false
endif
return true
endfunction
function Trig_GoblinTimeBomb_Func006Func001001 takes nothing returns boolean
return ( IsUnitType(GetEnumUnit(), UNIT_TYPE_STRUCTURE) == true )
endfunction
function Trig_GoblinTimeBomb_Func006A takes nothing returns nothing
if ( Trig_GoblinTimeBomb_Func006Func001001() ) then
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - ( 250.00 * ( GetUnitLifePercent(udg_TimeBombs[GetConvertedPlayerId(udg_TimeBombPlayer)]) / 100.00 ) ) ) )
else
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - ( 50.00 * ( GetUnitLifePercent(udg_TimeBombs[GetConvertedPlayerId(udg_TimeBombPlayer)]) / 100.00 ) ) ) )
endif
endfunction
function Trig_GoblinTimeBomb_Func007Func001001 takes nothing returns boolean
return ( IsUnitType(GetEnumUnit(), UNIT_TYPE_STRUCTURE) == true )
endfunction
function Trig_GoblinTimeBomb_Func007A takes nothing returns nothing
if ( Trig_GoblinTimeBomb_Func007Func001001() ) then
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - ( 1250.00 * ( GetUnitLifePercent(udg_TimeBombs[GetConvertedPlayerId(udg_TimeBombPlayer)]) / 100.00 ) ) ) )
else
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - ( 250.00 * ( GetUnitLifePercent(udg_TimeBombs[GetConvertedPlayerId(udg_TimeBombPlayer)]) / 100.00 ) ) ) )
endif
endfunction
function Trig_GoblinTimeBomb_Actions takes nothing returns nothing
local unit Timebomb
local texttag Countdown
local integer loop_index
local integer loop_indexend
set udg_TimeBombCounter[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] = true
call CreateNUnitsAtLoc( 1, 'h00V', GetOwningPlayer(GetSpellAbilityUnit()), GetSpellTargetLoc(), bj_UNIT_FACING )
set Timebomb = GetLastCreatedUnit()
set udg_TimeBombs[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] = GetLastCreatedUnit()
set loop_index = 1
set loop_indexend = 45
loop
exitwhen loop_index > loop_indexend
call CreateTextTagUnitBJ( I2S(( 46 - loop_index )), Timebomb, 0, 10, 100, 0.00, 0.00, 0 )
set Countdown = GetLastCreatedTextTag()
call PolledWait( 1.00 )
call DestroyTextTagBJ( Countdown )
set udg_TimeBombPlayer = GetOwningPlayer(Timebomb)
if ( Trig_GoblinTimeBomb_Func003Func004001() ) then
return
else
call DoNothing( )
endif
set loop_index = loop_index + 1
endloop
set udg_TimeBombPlayer = GetOwningPlayer(Timebomb)
call ForGroupBJ( GetUnitsInRangeOfLocAll(900.00, GetUnitLoc(Timebomb)), function Trig_GoblinTimeBomb_Func006A )
call ForGroupBJ( GetUnitsInRangeOfLocAll(512, GetUnitLoc(Timebomb)), function Trig_GoblinTimeBomb_Func007A )
call AddSpecialEffectLocBJ( GetUnitLoc(Timebomb), "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" )
call KillUnit( Timebomb )
call PlaySoundBJ( gg_snd_FlameStrikeBirth1 )
endfunction
//===========================================================================
function InitTrig_GoblinTimeBomb takes nothing returns nothing
set gg_trg_GoblinTimeBomb = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_GoblinTimeBomb, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_GoblinTimeBomb, Condition( function Trig_GoblinTimeBomb_Conditions ) )
call TriggerAddAction( gg_trg_GoblinTimeBomb, function Trig_GoblinTimeBomb_Actions )
endfunction
function Trig_VoodooBlade_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetKillingUnitBJ()) == 'H00M' ) ) then
return false
endif
return true
endfunction
function Trig_VoodooBlade_Func002Func006C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A01A', GetKillingUnitBJ()) == 1 ) ) then
return false
endif
if ( not ( udg_VoodooBladeChance <= 15 ) ) then
return false
endif
return true
endfunction
function Trig_VoodooBlade_Func002C takes nothing returns boolean
if ( not Trig_VoodooBlade_Func002Func006C() ) then
return false
endif
return true
endfunction
function Trig_VoodooBlade_Func003Func006C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A01A', GetKillingUnitBJ()) == 2 ) ) then
return false
endif
if ( not ( udg_VoodooBladeChance <= 25 ) ) then
return false
endif
return true
endfunction
function Trig_VoodooBlade_Func003C takes nothing returns boolean
if ( not Trig_VoodooBlade_Func003Func006C() ) then
return false
endif
return true
endfunction
function Trig_VoodooBlade_Func004Func006C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A01A', GetKillingUnitBJ()) == 3 ) ) then
return false
endif
if ( not ( udg_VoodooBladeChance <= 35 ) ) then
return false
endif
return true
endfunction
function Trig_VoodooBlade_Func004C takes nothing returns boolean
if ( not Trig_VoodooBlade_Func004Func006C() ) then
return false
endif
return true
endfunction
function Trig_VoodooBlade_Actions takes nothing returns nothing
local unit VoodooBlade_Dummy
set udg_VoodooBladeChance = GetRandomInt(1, 100)
if ( Trig_VoodooBlade_Func002C() ) then
call CreateNUnitsAtLoc( 1, 'h00W', GetOwningPlayer(GetKillingUnitBJ()), GetUnitLoc(GetDyingUnit()), bj_UNIT_FACING )
set VoodooBlade_Dummy = GetLastCreatedUnit()
call ShowUnitHide( GetLastCreatedUnit() )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "animatedead" )
call TriggerSleepAction( 2 )
call RemoveUnit( VoodooBlade_Dummy )
else
endif
if ( Trig_VoodooBlade_Func003C() ) then
call CreateNUnitsAtLoc( 1, 'h00W', GetOwningPlayer(GetKillingUnitBJ()), GetUnitLoc(GetDyingUnit()), bj_UNIT_FACING )
set VoodooBlade_Dummy = GetLastCreatedUnit()
call ShowUnitHide( GetLastCreatedUnit() )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "animatedead" )
call TriggerSleepAction( 2 )
call RemoveUnit( VoodooBlade_Dummy )
else
endif
if ( Trig_VoodooBlade_Func004C() ) then
call CreateNUnitsAtLoc( 1, 'h00W', GetOwningPlayer(GetKillingUnitBJ()), GetUnitLoc(GetDyingUnit()), bj_UNIT_FACING )
set VoodooBlade_Dummy = GetLastCreatedUnit()
call ShowUnitHide( GetLastCreatedUnit() )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "animatedead" )
call TriggerSleepAction( 2 )
call RemoveUnit( VoodooBlade_Dummy )
else
endif
endfunction
//===========================================================================
function InitTrig_VoodooBlade takes nothing returns nothing
set gg_trg_VoodooBlade = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_VoodooBlade, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_VoodooBlade, Condition( function Trig_VoodooBlade_Conditions ) )
call TriggerAddAction( gg_trg_VoodooBlade, function Trig_VoodooBlade_Actions )
endfunction
function Trig_BattleCry_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01Z' ) ) then
return false
endif
return true
endfunction
function Trig_BattleCry_Func002Func001001 takes nothing returns boolean
return ( udg_BattleCryActive[GetConvertedPlayerId(udg_BattleCryPlayerTemp)] == false )
endfunction
function Trig_BattleCry_Func002Func005001 takes nothing returns boolean
return ( udg_BattleCryLevelTemp == 1 )
endfunction
function Trig_BattleCry_Func002Func003001 takes nothing returns boolean
return ( udg_BattleCryLevelTemp == 2 )
endfunction
function Trig_BattleCry_Func002Func004001 takes nothing returns boolean
return ( udg_BattleCryLevelTemp == 3 )
endfunction
function Trig_BattleCry_Actions takes nothing returns nothing
local unit BattleCry_Caster
local integer AbilityLevel
local player CasterOwner
local integer LoopVarStart
local integer LoopVarEnd
set udg_BattleCryActive[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] = true
set BattleCry_Caster = GetSpellAbilityUnit()
set AbilityLevel = GetUnitAbilityLevelSwapped('A01Z', BattleCry_Caster)
set CasterOwner = GetOwningPlayer(BattleCry_Caster)
set LoopVarStart = 1
set LoopVarEnd = 10
set udg_BattleCryLevelTemp = AbilityLevel
loop
exitwhen LoopVarStart > LoopVarEnd
set udg_BattleCryPlayerTemp = CasterOwner
if ( Trig_BattleCry_Func002Func001001() ) then
return
else
call DoNothing( )
endif
if ( Trig_BattleCry_Func002Func005001() ) then
call ModifyHeroStat( bj_HEROSTAT_INT, BattleCry_Caster, bj_MODIFYMETHOD_ADD, 1 )
call ModifyHeroStat( bj_HEROSTAT_AGI, BattleCry_Caster, bj_MODIFYMETHOD_ADD, 1 )
call ModifyHeroStat( bj_HEROSTAT_STR, BattleCry_Caster, bj_MODIFYMETHOD_ADD, 1 )
else
call DoNothing( )
endif
if ( Trig_BattleCry_Func002Func003001() ) then
call ModifyHeroStat( bj_HEROSTAT_INT, BattleCry_Caster, bj_MODIFYMETHOD_ADD, 2 )
call ModifyHeroStat( bj_HEROSTAT_AGI, BattleCry_Caster, bj_MODIFYMETHOD_ADD, 2 )
call ModifyHeroStat( bj_HEROSTAT_STR, BattleCry_Caster, bj_MODIFYMETHOD_ADD, 2 )
else
call DoNothing( )
endif
if ( Trig_BattleCry_Func002Func004001() ) then
call ModifyHeroStat( bj_HEROSTAT_INT, BattleCry_Caster, bj_MODIFYMETHOD_ADD, 3 )
call ModifyHeroStat( bj_HEROSTAT_AGI, BattleCry_Caster, bj_MODIFYMETHOD_ADD, 3 )
call ModifyHeroStat( bj_HEROSTAT_STR, BattleCry_Caster, bj_MODIFYMETHOD_ADD, 3 )
else
call DoNothing( )
endif
call SetUnitScalePercent( BattleCry_Caster, ( 100.00 + ( 10.00 * I2R(LoopVarStart) ) ), ( 100.00 + ( 10.00 * I2R(LoopVarStart) ) ), ( 100.00 + ( 10.00 * I2R(LoopVarStart) ) ) )
set udg_BattleCrySteps[GetConvertedPlayerId(GetOwningPlayer(BattleCry_Caster))] = ( udg_BattleCrySteps[GetConvertedPlayerId(GetOwningPlayer(BattleCry_Caster))] + 1 )
call PolledWait( 0.50 )
set LoopVarStart = LoopVarStart + 1
endloop
endfunction
//===========================================================================
function InitTrig_BattleCry takes nothing returns nothing
set gg_trg_BattleCry = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BattleCry, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
call TriggerAddCondition( gg_trg_BattleCry, Condition( function Trig_BattleCry_Conditions ) )
call TriggerAddAction( gg_trg_BattleCry, function Trig_BattleCry_Actions )
endfunction
function Trig_BattleCryCanceled_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01Z' ) ) then
return false
endif
return true
endfunction
function Trig_BattleCryCanceled_Func003Func003001 takes nothing returns boolean
return ( udg_BattleCryLevelTemp == 2 )
endfunction
function Trig_BattleCryCanceled_Func003Func004001 takes nothing returns boolean
return ( udg_BattleCryLevelTemp == 3 )
endfunction
function Trig_BattleCryCanceled_Func003Func005001 takes nothing returns boolean
return ( udg_BattleCryLevelTemp == 1 )
endfunction
function Trig_BattleCryCanceled_Actions takes nothing returns nothing
local unit BattleCry_Caster
local integer AbilityLevel
local integer LoopStart
local integer LoopEnd
set udg_BattleCryActive[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] = false
set BattleCry_Caster = GetSpellAbilityUnit()
set AbilityLevel = GetUnitAbilityLevelSwapped('A01Z', BattleCry_Caster)
set udg_BattleCryLevelTemp = AbilityLevel
if ( Trig_BattleCryCanceled_Func003Func003001() ) then
call PolledWait( 10.00 )
else
call DoNothing( )
endif
if ( Trig_BattleCryCanceled_Func003Func004001() ) then
call PolledWait( 20.00 )
else
call DoNothing( )
endif
set LoopStart = 1
set LoopEnd = udg_BattleCrySteps[GetConvertedPlayerId(GetOwningPlayer(BattleCry_Caster))] - 1
loop
exitwhen LoopStart > LoopEnd
call PolledWait( 3.00 )
if ( Trig_BattleCryCanceled_Func003Func005001() ) then
call ModifyHeroStat( bj_HEROSTAT_INT, BattleCry_Caster, bj_MODIFYMETHOD_SUB, 1 )
call ModifyHeroStat( bj_HEROSTAT_AGI, BattleCry_Caster, bj_MODIFYMETHOD_SUB, 1 )
call ModifyHeroStat( bj_HEROSTAT_STR, BattleCry_Caster, bj_MODIFYMETHOD_SUB, 1 )
else
call DoNothing( )
endif
if ( Trig_BattleCryCanceled_Func003Func004001() ) then
call ModifyHeroStat( bj_HEROSTAT_INT, BattleCry_Caster, bj_MODIFYMETHOD_SUB, 3 )
call ModifyHeroStat( bj_HEROSTAT_AGI, BattleCry_Caster, bj_MODIFYMETHOD_SUB, 3 )
call ModifyHeroStat( bj_HEROSTAT_STR, BattleCry_Caster, bj_MODIFYMETHOD_SUB, 3 )
else
call DoNothing( )
endif
if ( Trig_BattleCryCanceled_Func003Func003001() ) then
call ModifyHeroStat( bj_HEROSTAT_INT, BattleCry_Caster, bj_MODIFYMETHOD_SUB, 2 )
call ModifyHeroStat( bj_HEROSTAT_AGI, BattleCry_Caster, bj_MODIFYMETHOD_SUB, 2 )
call ModifyHeroStat( bj_HEROSTAT_STR, BattleCry_Caster, bj_MODIFYMETHOD_SUB, 2 )
else
call DoNothing( )
endif
call SetUnitScalePercent( BattleCry_Caster, ( 100.00 + ( 10.00 * ( I2R(udg_BattleCrySteps[GetConvertedPlayerId(GetOwningPlayer(BattleCry_Caster))]) - I2R(LoopStart) ) ) ), ( 100.00 + ( 10.00 * ( I2R(udg_BattleCrySteps[GetConvertedPlayerId(GetOwningPlayer(BattleCry_Caster))]) - I2R(LoopStart) ) ) ), ( 100.00 + ( 10.00 * ( I2R(udg_BattleCrySteps[GetConvertedPlayerId(GetOwningPlayer(BattleCry_Caster))]) - I2R(LoopStart) ) ) ) )
set LoopStart = LoopStart + 1
endloop
set udg_BattleCrySteps[GetConvertedPlayerId(GetOwningPlayer(BattleCry_Caster))] = 1
endfunction
//===========================================================================
function InitTrig_BattleCryCanceled takes nothing returns nothing
set gg_trg_BattleCryCanceled = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BattleCryCanceled, EVENT_PLAYER_UNIT_SPELL_ENDCAST )
call TriggerAddCondition( gg_trg_BattleCryCanceled, Condition( function Trig_BattleCryCanceled_Conditions ) )
call TriggerAddAction( gg_trg_BattleCryCanceled, function Trig_BattleCryCanceled_Actions )
endfunction
function Trig_ShadowVampEffect_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02K' ) ) then
return false
endif
return true
endfunction
function Trig_ShadowVampEffect_Actions takes nothing returns nothing
local unit ShadowVampSFX
call CreateNUnitsAtLoc( 1, 'h00Y', Player(PLAYER_NEUTRAL_PASSIVE), GetUnitLoc(GetSpellAbilityUnit()), bj_UNIT_FACING )
set ShadowVampSFX = GetLastCreatedUnit()
call PolledWait( 2 )
call RemoveUnit( ShadowVampSFX )
endfunction
//===========================================================================
function InitTrig_ShadowVampEffect takes nothing returns nothing
set gg_trg_ShadowVampEffect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ShadowVampEffect, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ShadowVampEffect, Condition( function Trig_ShadowVampEffect_Conditions ) )
call TriggerAddAction( gg_trg_ShadowVampEffect, function Trig_ShadowVampEffect_Actions )
endfunction
function Trig_ShadowVampAbillities_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02K' ) ) then
return false
endif
return true
endfunction
function Trig_ShadowVampAbillities_Actions takes nothing returns nothing
local player CastingOwner
local unit Shadow_Vamp
local location SV_Position
set Shadow_Vamp = GetSpellAbilityUnit()
set SV_Position = GetUnitLoc(Shadow_Vamp)
set CastingOwner = GetOwningPlayer(GetSpellAbilityUnit())
call SetPlayerAbilityAvailableBJ( false, 'A023', GetOwningPlayer(GetSpellAbilityUnit()) )
call SetPlayerAbilityAvailableBJ( false, 'A025', GetOwningPlayer(GetSpellAbilityUnit()) )
call SetPlayerAbilityAvailableBJ( false, 'A027', GetOwningPlayer(GetSpellAbilityUnit()) )
endfunction
//===========================================================================
function InitTrig_ShadowVampAbillities takes nothing returns nothing
set gg_trg_ShadowVampAbillities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ShadowVampAbillities, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ShadowVampAbillities, Condition( function Trig_ShadowVampAbillities_Conditions ) )
call TriggerAddAction( gg_trg_ShadowVampAbillities, function Trig_ShadowVampAbillities_Actions )
endfunction
function Trig_VampAbillities_Conditions takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("ravenform") ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetOrderedUnit()) == 'E000' ) ) then
return false
endif
return true
endfunction
function Trig_VampAbillities_Actions takes nothing returns nothing
local unit OrderedUnit
set OrderedUnit = GetOrderedUnit()
call SetPlayerAbilityAvailableBJ( false, 'A023', GetOwningPlayer(GetOrderedUnit()) )
call SetPlayerAbilityAvailableBJ( false, 'A025', GetOwningPlayer(GetOrderedUnit()) )
call SetPlayerAbilityAvailableBJ( false, 'A027', GetOwningPlayer(GetOrderedUnit()) )
call PolledWait( 1.00 )
call UnitResetCooldown( OrderedUnit )
call PolledWait( 59.00 )
call IssueImmediateOrderBJ( OrderedUnit, "unravenform" )
endfunction
//===========================================================================
function InitTrig_VampAbillities takes nothing returns nothing
set gg_trg_VampAbillities = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_VampAbillities, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_VampAbillities, Condition( function Trig_VampAbillities_Conditions ) )
call TriggerAddAction( gg_trg_VampAbillities, function Trig_VampAbillities_Actions )
endfunction
function Trig_VampireHeight_Func001Func001C takes nothing returns boolean
if ( not ( GetUnitFlyHeight(GetEnumUnit()) > 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_VampireHeight_Func001A takes nothing returns nothing
if ( Trig_VampireHeight_Func001Func001C() ) then
call SetUnitAnimation( udg_ShadowVamp, "death" )
set udg_ShadowVamp = GetEnumUnit()
call TriggerExecute( gg_trg_VampireCrash )
else
endif
endfunction
function Trig_VampireHeight_Func003A takes nothing returns nothing
call UnitRemoveAbilityBJ( 'ACrn', GetEnumUnit() )
call SetUnitLifeBJ( GetEnumUnit(), 10.00 )
endfunction
function Trig_VampireHeight_Actions takes nothing returns nothing
local player SV_Owner
set SV_Owner = GetOwningPlayer(udg_ShadowVamp)
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(udg_ShadowVamp), 'E001'), function Trig_VampireHeight_Func001A )
endfunction
//===========================================================================
function InitTrig_VampireHeight takes nothing returns nothing
set gg_trg_VampireHeight = CreateTrigger( )
call TriggerAddAction( gg_trg_VampireHeight, function Trig_VampireHeight_Actions )
endfunction
function Trig_Assassinate_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A023' ) ) then
return false
endif
return true
endfunction
function Trig_Assassinate_Actions takes nothing returns nothing
local unit A_Caster
local unit A_Target
set A_Caster = GetSpellAbilityUnit()
set A_Target = GetSpellTargetUnit()
call TriggerSleepAction( 0.10 )
call SetUnitPositionLoc( A_Caster, GetUnitLoc(A_Target) )
endfunction
//===========================================================================
function InitTrig_Assassinate takes nothing returns nothing
set gg_trg_Assassinate = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Assassinate, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Assassinate, Condition( function Trig_Assassinate_Conditions ) )
call TriggerAddAction( gg_trg_Assassinate, function Trig_Assassinate_Actions )
endfunction
function Trig_SiegeDownRoot_Conditions takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("root") ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetOrderedUnit()) == 'h00Z' ) ) then
return false
endif
return true
endfunction
function Trig_SiegeDownRoot_Func001001 takes nothing returns boolean
return ( DistanceBetweenPoints(GetUnitLoc(udg_SiegeMachineryGlobal), udg_SiegeMachineryTarget) <= 1.00 )
endfunction
function Trig_SiegeDownRoot_Actions takes nothing returns nothing
local unit SiegeMachinery
local location Siege_Target
set SiegeMachinery = GetOrderedUnit()
set Siege_Target = GetOrderPointLoc()
loop
set udg_SiegeMachineryGlobal = SiegeMachinery
set udg_SiegeMachineryTarget = Siege_Target
exitwhen ( Trig_SiegeDownRoot_Func001001() )
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, 0.50))
endloop
call AddSpecialEffectTargetUnitBJ( "origin", SiegeMachinery, "Abilities\\Spells\\Orc\\ReinforcedTrollBurrow\\ReinforcedTrollBurrowTarget.mdl" )
set udg_FortifyEffects[GetUnitUserData(SiegeMachinery)] = GetLastCreatedEffectBJ()
endfunction
//===========================================================================
function InitTrig_SiegeDownRoot takes nothing returns nothing
set gg_trg_SiegeDownRoot = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SiegeDownRoot, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerAddCondition( gg_trg_SiegeDownRoot, Condition( function Trig_SiegeDownRoot_Conditions ) )
call TriggerAddAction( gg_trg_SiegeDownRoot, function Trig_SiegeDownRoot_Actions )
endfunction
function Trig_LoyaltyCanceled_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02E' ) ) then
return true
endif
return true
endfunction
function Trig_LoyaltyCanceled_Actions takes nothing returns nothing
local unit Target_Loyalty
set Target_Loyalty = udg_LoyaltyTargets[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))]
set udg_LoyaltyActive = false
call SetUnitVertexColorBJ( GetSpellAbilityUnit(), 100.00, 100.00, 100.00, 0.00 )
call ResetUnitAnimation( GetSpellAbilityUnit() )
call SetUnitOwner( udg_LoyaltyTargets[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], udg_LoyaltyOwner[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))], true )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitRemoveItemFromSlotSwapped( GetForLoopIndexA(), udg_LoyaltyTargets[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] )
set udg_Loyalty_ItemDrop[GetForLoopIndexA()] = GetLastRemovedItem()
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call UnitRemoveAbilityBJ( 'A01J', udg_LoyaltyTargets[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] )
call UnitAddAbilityBJ( 'AInv', udg_LoyaltyTargets[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call UnitAddItemSwapped( udg_Loyalty_ItemDrop[GetForLoopIndexA()], udg_LoyaltyTargets[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] )
call SetItemDroppableBJ( udg_Loyalty_ItemDrop[GetForLoopIndexA()], true )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call SuspendHeroXPBJ( true, udg_LoyaltyTargets[GetConvertedPlayerId(GetOwningPlayer(GetSpellAbilityUnit()))] )
call TriggerSleepAction( 5.00 )
call SetUnitInvulnerable( Target_Loyalty, false )
endfunction
//===========================================================================
function InitTrig_LoyaltyCanceled takes nothing returns nothing
set gg_trg_LoyaltyCanceled = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_LoyaltyCanceled, EVENT_PLAYER_UNIT_SPELL_ENDCAST )
call TriggerRegisterAnyUnitEventBJ( gg_trg_LoyaltyCanceled, EVENT_PLAYER_UNIT_SPELL_FINISH )
call TriggerAddCondition( gg_trg_LoyaltyCanceled, Condition( function Trig_LoyaltyCanceled_Conditions ) )
call TriggerAddAction( gg_trg_LoyaltyCanceled, function Trig_LoyaltyCanceled_Actions )
endfunction
function Trig_SFX_Func002Func003001 takes nothing returns boolean
return ( udg_LoyaltyActive == false )
endfunction
function Trig_SFX_Actions takes nothing returns nothing
local unit Loyalty_Caster
local integer counter
set udg_LoyaltyActive = true
set counter = 1
set Loyalty_Caster = udg_LoyaltyTemp
loop
exitwhen counter > 100
call AddSpecialEffectTargetUnitBJ( "origin", Loyalty_Caster, "war3mapImported\\DoomDeath.mdl" )
call TriggerSleepAction( 1.00 )
if ( Trig_SFX_Func002Func003001() ) then
return
else
call DoNothing( )
endif
set counter = counter + 1
endloop
endfunction
//===========================================================================
function InitTrig_SFX takes nothing returns nothing
set gg_trg_SFX = CreateTrigger( )
call TriggerAddAction( gg_trg_SFX, function Trig_SFX_Actions )
endfunction
function Trig_Steal_Gold_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01E' ) ) then
return false
endif
return true
endfunction
function Trig_Steal_Gold_Func001Func001Func003C takes nothing returns boolean
if ( not ( GetPlayerState(GetOwningPlayer(GetSpellTargetUnit()), PLAYER_STATE_RESOURCE_GOLD) <= 0 ) ) then
return false
endif
return true
endfunction
function Trig_Steal_Gold_Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_TOWNHALL) == false ) ) then
return false
endif
return true
endfunction
function Trig_Steal_Gold_Func001Func001Func002001 takes nothing returns boolean
return ( GetUnitUserData(GetSpellAbilityUnit()) != 1 )
endfunction
function Trig_Steal_Gold_Actions takes nothing returns nothing
local unit Caster
local unit CasterTarget
local integer bj_forLoopCIndex
local integer bj_forLoopCIndexEnd
set Caster = GetSpellAbilityUnit()
set CasterTarget = GetSpellTargetUnit()
if ( Trig_Steal_Gold_Func001C() ) then
call IssueImmediateOrderBJ( Caster, "stop" )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSpellAbilityUnit())), "TRIGSTR_1349" )
call PolledWait( 0.10 )
call SetUnitManaBJ( Caster, ( GetUnitStateSwap(UNIT_STATE_MANA, Caster) + 100.00 ) )
call UnitResetCooldown( Caster )
else
call SetUnitUserData( GetSpellAbilityUnit(), 1 )
set bj_forLoopCIndex = 1
set bj_forLoopCIndexEnd = 60
loop
exitwhen bj_forLoopCIndex > bj_forLoopCIndexEnd
if ( Trig_Steal_Gold_Func001Func001Func002001() ) then
set bj_forLoopCIndex = 61
else
call DoNothing( )
endif
call SetPlayerStateBJ( GetOwningPlayer(Caster), PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(GetOwningPlayer(Caster), PLAYER_STATE_RESOURCE_GOLD) + 10 ) )
call SetPlayerStateBJ( GetOwningPlayer(CasterTarget), PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(GetOwningPlayer(CasterTarget), PLAYER_STATE_RESOURCE_GOLD) - 10 ) )
if ( Trig_Steal_Gold_Func001Func001Func003C() ) then
call IssueImmediateOrderBJ( Caster, "stop" )
return
else
endif
call PolledWait( 1.00 )
set bj_forLoopCIndex = bj_forLoopCIndex + 1
endloop
endif
endfunction
//===========================================================================
function InitTrig_Steal_Gold takes nothing returns nothing
set gg_trg_Steal_Gold = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Steal_Gold, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Steal_Gold, Condition( function Trig_Steal_Gold_Conditions ) )
call TriggerAddAction( gg_trg_Steal_Gold, function Trig_Steal_Gold_Actions )
endfunction
function Trig_Spy_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02D' ) ) then
return false
endif
return true
endfunction
function Trig_Spy_Func001Func001C takes nothing returns boolean
if ( not ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_GOLD) < 50 ) ) then
return false
endif
return true
endfunction
function Trig_Spy_Func001Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'hhou' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'otrb' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'uzig' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'uzg1' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'uzg2' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'emow' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) != 'h005' ) ) then
return false
endif
return true
endfunction
function Trig_Spy_Func001C takes nothing returns boolean
if ( not Trig_Spy_Func001Func002C() ) then
return false
endif
return true
endfunction
function Trig_Spy_Actions takes nothing returns nothing
local unit Caster
set Caster = GetSpellAbilityUnit()
if ( Trig_Spy_Func001C() ) then
call IssueImmediateOrderBJ( GetSpellAbilityUnit(), "stop" )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSpellAbilityUnit())), "TRIGSTR_1363" )
call PolledWait( 0.10 )
call UnitResetCooldown( Caster )
call SetUnitManaBJ( Caster, ( GetUnitStateSwap(UNIT_STATE_MANA, Caster) + 50.00 ) )
else
if ( Trig_Spy_Func001Func001C() ) then
call IssueImmediateOrderBJ( GetSpellAbilityUnit(), "stop" )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSpellAbilityUnit())), "TRIGSTR_1364" )
call PolledWait( 0.10 )
call UnitResetCooldown( Caster )
call SetUnitManaBJ( Caster, ( GetUnitStateSwap(UNIT_STATE_MANA, Caster) + 50.00 ) )
else
call SetPlayerStateBJ( GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(GetOwningPlayer(GetSpellAbilityUnit()), PLAYER_STATE_RESOURCE_GOLD) - 50 ) )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetSpellAbilityUnit())), ( "|cffffcc00Spy Message:|r Enemie's food is approximately " + ( I2S(( ( GetPlayerState(GetOwningPlayer(GetSpellTargetUnit()), PLAYER_STATE_RESOURCE_FOOD_USED) - 5 ) + GetRandomInt(0, 10) )) + "." ) ) )
endif
endif
endfunction
//===========================================================================
function InitTrig_Spy takes nothing returns nothing
set gg_trg_Spy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Spy, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Spy, Condition( function Trig_Spy_Conditions ) )
call TriggerAddAction( gg_trg_Spy, function Trig_Spy_Actions )
endfunction