//=========================================================================== // // DotK ver2.09 // // Warcraft III map script // Generated by the Warcraft III World Editor // Date: Tue Jun 03 03:04:44 2008 // Map Author: maho,kashisu // //=========================================================================== //*************************************************************************** //* //* Global Variables //* //*************************************************************************** globals // User-defined real array udg_saitou_bakuniku integer udg_Avenger_X = 0 integer array udg_Ghost_flag integer array udg_SE_melee integer array udg_SC_melee integer array udg_SE_range integer array udg_SC_range integer udg_Creep_Count_Melee = 0 integer udg_Creep_Count_Range = 0 integer udg_Creep_Count_Siege = 0 unit udg_CripplingFear = null integer udg_skillLv = 0 boolean udg_Night_Flag = false unit array udg_PlayerX_Hero integer udg_Player01_Kill = 0 integer udg_Player02_Kill = 0 integer udg_Player03_Kill = 0 integer udg_Player04_Kill = 0 integer udg_Player05_Kill = 0 integer udg_Player10_Kill = 0 integer udg_Player06_Kill = 0 integer udg_Player07_Kill = 0 integer udg_Player08_Kill = 0 integer udg_Player09_Kill = 0 integer udg_Player01_Dead = 0 integer udg_Player02_Dead = 0 integer udg_Player03_Dead = 0 integer udg_Player04_Dead = 0 integer udg_Player05_Dead = 0 integer udg_Player06_Dead = 0 integer udg_Player07_Dead = 0 integer udg_Player08_Dead = 0 integer udg_Player09_Dead = 0 integer udg_Player10_Dead = 0 integer array udg_Player01_Creep integer array udg_Player10_Creep integer array udg_Player02_Creep integer array udg_Player03_Creep integer array udg_Player04_Creep integer array udg_Player05_Creep integer array udg_Player06_Creep integer array udg_Player07_Creep integer array udg_Player08_Creep integer array udg_Player09_Creep timer array udg_AutoRevivalTimer timerdialog array udg_AutoRevivalTimerWindow boolean udg_Flag_1st_Blood = false integer udg_GameEnd = 0 integer array udg_PlayerPrintNumber integer udg_Report_X = 0 integer array udg_PlayerX_Dead_Flag integer udg_KillCount_Judge = 0 integer udg_SE_Siege = 0 integer udg_SC_Siege = 0 integer array udg_Creep_Status integer array udg_Rune integer array udg_NeutralCreeps_A1 integer array udg_NeutralCreeps_B1 integer array udg_NeutralCreeps_B2 integer array udg_NeutralCreeps_C1 integer array udg_NeutralCreeps_Cx1 integer array udg_NeutralCreeps_C4 integer array udg_NeutralCreeps_C2 integer array udg_NeutralCreeps_C3 integer array udg_NeutralCreeps_Cx2 integer array udg_NeutralCreeps_Cx3 integer array udg_NeutralCreeps_D1 integer array udg_NeutralCreeps_D3 integer array udg_NeutralCreeps_D2 rect udg_NeutralCreepPointX = null integer udg_X = 0 item array udg_Bottle_in_Rune integer udg_Reciepes_Counter = 0 integer array udg_Reciepe_Item1 integer array udg_Reciepe_Item4 integer array udg_Reciepe_Item2 integer array udg_Reciepe_Item3 integer array udg_Reciepe_Result integer array udg_Reciepe_lenght integer udg_Reciepes_MaxCount = 0 real udg_Item_CoolDown_Time = 0 item udg_Item_Search_Counter = null integer udg_Iitem_Array_Counter = 0 real array udg_Item_CoolDown_Time_Array item array udg_Item_Array integer udg_CreepLv = 0 timer array udg_Bottle_in_Rune_Timer integer udg_Creep_Siege_Counter = 0 unit udg_Unit_X_Target = null unit udg_Unit_X = null integer udg_string = 0 timer udg_AuroraCannon_Timer = null integer udg_Orb_Type = 0 integer udg_InvokeSkill = 0 integer udg_Orb_Counter = 0 unit udg_Velg_Avestar_Target = null gamecache udg_Core = null unit udg_Mechanical_Control_Temp = null unit udg_Mechanical_Control_Temp_target = null group udg_ew = null unit udg_unit_temp = null group udg_UNKNOWN_group = null real udg_Spectre_damage = 0 unit array udg_Footmans integer udg_FootmansExp = 0 real array udg_Chaos_Panic_HP real array udg_Chaos_Panic_MP integer udg_Chaos_Panic_Nam = 0 integer udg_Elemental_Flag = 0 boolean udg_Backstab = false unit udg_GaleHunter = null boolean udg_Shadow_Inducement = false group udg_StartCreep = null leaderboard array udg_CS_boards multiboard array udg_M_board integer array udg_NeutralCreeps1 integer array udg_NeutralCreeps2 integer array udg_NeutralCreeps3 integer array udg_NeutralCreeps4 integer array udg_NeutralCreeps5 integer udg_Henshin = 0 // Generated rect gg_rct_BottomRelayArea = null rect gg_rct_SC_Bottom_Melee = null rect gg_rct_SC_Bottom_Range = null rect gg_rct_SC_BottomStartPoint = null rect gg_rct_SC_Center_Melee = null rect gg_rct_SC_Center_Range = null rect gg_rct_SC_CenterStartPoint = null rect gg_rct_SC_Natural_BigCreep = null rect gg_rct_SC_Natural_Creep_1 = null rect gg_rct_SC_Natural_Creep_2 = null rect gg_rct_SC_Natural_Creep_3 = null rect gg_rct_SC_Natural_Creep_4 = null rect gg_rct_SC_Natural_Creep_5 = null rect gg_rct_SC_Top_Melee = null rect gg_rct_SC_Top_Range = null rect gg_rct_SC_TopStartPoint = null rect gg_rct_SCOURGES_Start = null rect gg_rct_SE_Bottom_Melee = null rect gg_rct_SE_Bottom_Range = null rect gg_rct_SE_BottomStartPoint = null rect gg_rct_SE_Center_Melee = null rect gg_rct_SE_Center_Range = null rect gg_rct_SE_CenterStartPoint = null rect gg_rct_SE_Natural_BigCreep = null rect gg_rct_SE_Natural_Creep_1 = null rect gg_rct_SE_Natural_Creep_2 = null rect gg_rct_SE_Natural_Creep_3 = null rect gg_rct_SE_Natural_Creep_4 = null rect gg_rct_SE_Natural_Creep_5 = null rect gg_rct_SE_Top_Melee = null rect gg_rct_SE_Top_Range = null rect gg_rct_SE_TopStartPoint = null rect gg_rct_SENTINELS_Start = null rect gg_rct_TopRelayArea = null rect gg_rct_Left_Rune = null rect gg_rct_Right_Rune = null sound gg_snd_SleepBirth = null sound gg_snd_TheHornOfCenarius = null sound gg_snd_ReceiveGold = null sound gg_snd_MaievYesAttack2 = null sound gg_snd_leapattack1 = null trigger gg_trg_MoveSpeed = null trigger gg_trg_TestMode = null trigger gg_trg_Gold = null trigger gg_trg_lvlup = null trigger gg_trg_wtf = null trigger gg_trg_wtf_Skill = null trigger gg_trg_testStart = null trigger gg_trg_ReHero = null trigger gg_trg_HeroRecall = null trigger gg_trg_HeroRevival = null trigger gg_trg_Day_and_night = null trigger gg_trg_PlayerTimeOut = null trigger gg_trg_Hero_Setup = null trigger gg_trg_AutoRevival = null trigger gg_trg_AutoRevivalTimeOut2 = null trigger gg_trg_AutoRevivalTimeOut3 = null trigger gg_trg_AutoRevivalTimeOut4 = null trigger gg_trg_AutoRevivalTimeOut5 = null trigger gg_trg_AutoRevivalTimeOut6 = null trigger gg_trg_AutoRevivalTimeOut8 = null trigger gg_trg_AutoRevivalTimeOut9 = null trigger gg_trg_AutoRevivalTimeOut10 = null trigger gg_trg_AutoRevivalTimeOut11 = null trigger gg_trg_AutoRevivalTimeOut12 = null trigger gg_trg_KillJudge = null trigger gg_trg_SetNeutralCreeps = null trigger gg_trg_NeutralCreep_StartUp = null trigger gg_trg_CreepDeny = null trigger gg_trg_DenyFlag = null trigger gg_trg_LvUP_Creep = null trigger gg_trg_DeadCount = null trigger gg_trg_Player1_Kill = null trigger gg_trg_Player2_Kill = null trigger gg_trg_Player3_Kill = null trigger gg_trg_Player4_Kill = null trigger gg_trg_Player5_Kill = null trigger gg_trg_Player6_Kill = null trigger gg_trg_Player7_Kill = null trigger gg_trg_Player8_Kill = null trigger gg_trg_Player9_Kill = null trigger gg_trg_Player10_Kill = null trigger gg_trg_HeroKill_Creep = null trigger gg_trg_Charges_Connection = null trigger gg_trg_Undroppable_Cooldowns = null trigger gg_trg_Reset_Droppable_Status = null trigger gg_trg_Try_Apply_Reciepe = null trigger gg_trg_Specific_Reciepes = null trigger gg_trg_SetUpReciepes = null trigger gg_trg_Rune = null trigger gg_trg_RuneTimeout = null trigger gg_trg_Bottle_Control = null trigger gg_trg_Bottle_Control2 = null trigger gg_trg_Bottle_in_Rune = null trigger gg_trg_Cranium_Basher_Flag = null trigger gg_trg_Eye_of_Skadi_Flag = null trigger gg_trg_Refresher_Orb = null trigger gg_trg_Aghanims_Scepter = null trigger gg_trg_Power_Treads = null trigger gg_trg_Orchid_Malevolence = null trigger gg_trg_Shivas_Guard = null trigger gg_trg_Armlet_of_Mordiggian = null trigger gg_trg_Item_Skill_Support = null trigger gg_trg_Item_Skill_Support_Drop = null trigger gg_trg_Flying_Courier1 = null trigger gg_trg_Flying_Courier2 = null trigger gg_trg_Animal_Style_Change = null trigger gg_trg_Lightning_Orb = null trigger gg_trg_Speso = null trigger gg_trg_Ring_of_Basilius = null trigger gg_trg_Animal_Courier = null trigger gg_trg_Moon_Orb = null trigger gg_trg_Bo = null trigger gg_trg_Sudden_death = null trigger gg_trg_WorldTimer = null trigger gg_trg_Afforestation = null trigger gg_trg_Periodical_Income = null trigger gg_trg_StartUp = null trigger gg_trg_StartUpx = null trigger gg_trg_StartUp2 = null trigger gg_trg_StartUp3 = null trigger gg_trg_StartUp4 = null trigger gg_trg_CS_Board = null trigger gg_trg_Untitled_Trigger_001 = null trigger gg_trg_LH_Deny_Counter = null trigger gg_trg_GameStart = null trigger gg_trg_CreepInterval = null trigger gg_trg_CreepTurnabout = null trigger gg_trg_SiegeCleep = null trigger gg_trg_Siege2 = null trigger gg_trg_TowerAI = null trigger gg_trg_CleepAI = null trigger gg_trg_TowerBonus = null trigger gg_trg_TowerCollapse1st = null trigger gg_trg_TowerCollapse2nd = null trigger gg_trg_TowerCollapse3rd = null trigger gg_trg_TowerCollapseLast = null trigger gg_trg_RAX_Collapse = null trigger gg_trg_RAX_All_Collapse_SE = null trigger gg_trg_RAX_All_Collapse_SC = null trigger gg_trg_Win = null trigger gg_trg_Report = null trigger gg_trg_Poison_Territory = null trigger gg_trg_Bakuniku = null trigger gg_trg_BakunikuGet = null trigger gg_trg_Muscle_Armor = null trigger gg_trg_Muscle_Attack = null trigger gg_trg_Muscle_Revolution = null trigger gg_trg_YARANAIKA = null trigger gg_trg_The_law_of_the_jungle = null trigger gg_trg_Velg_Avestar = null trigger gg_trg_Velg_Avestar_Startup = null trigger gg_trg_Avenger = null trigger gg_trg_Avenger_Dead = null trigger gg_trg_NightmareStyle = null trigger gg_trg_NightmareStyle__________u = null trigger gg_trg_Ghost_Form = null trigger gg_trg_SpiritShock = null trigger gg_trg_Blizzard = null trigger gg_trg_Swords_of_Revealing_Light = null trigger gg_trg_Empowering_Haste = null trigger gg_trg_Like_the_gale = null trigger gg_trg_Rupture = null trigger gg_trg_Divine_Shield = null trigger gg_trg_Redemption_Aura = null trigger gg_trg_Void = null trigger gg_trg_Crippling_Fear = null trigger gg_trg_Hunter_in_the_Night = null trigger gg_trg_Justice_Judgment = null trigger gg_trg_Blink_Strike = null trigger gg_trg_Mana_Burst = null trigger gg_trg_Mana_Burst_X = null trigger gg_trg_Mind_Revolution = null trigger gg_trg_Mind_Revolution__________u = null trigger gg_trg_Mana_Flare = null trigger gg_trg_oyabun = null trigger gg_trg_Triple_Wave = null trigger gg_trg_Wild_Shot = null trigger gg_trg_Destructive_Shot = null trigger gg_trg_Explosion_Impale = null trigger gg_trg_Dislike_Stampede = null trigger gg_trg_wanwan = null trigger gg_trg_Firewall = null trigger gg_trg_Burning_Shot = null trigger gg_trg_Aurora_Cannon = null trigger gg_trg_DeLay_Flare = null trigger gg_trg_Power_Orb_Get = null trigger gg_trg_Speed_Orb_Get = null trigger gg_trg_Wisdom_Orb_Get = null trigger gg_trg_Fire_Bolt_Active = null trigger gg_trg_Ice_Bolt_Active = null trigger gg_trg_Lightning_Bolt_Active = null trigger gg_trg_Orb_Reset = null trigger gg_trg_Invoke = null trigger gg_trg_Thunder_Storm2 = null trigger gg_trg_Lightning_Blast = null trigger gg_trg_Explosion = null trigger gg_trg_Gate_of_Babylon = null trigger gg_trg_Meteor = null trigger gg_trg_rarihoma = null trigger gg_trg_Escape = null trigger gg_trg_Escape_Pasive = null trigger gg_trg_Fire_Bolt = null trigger gg_trg_Ice_Bolt = null trigger gg_trg_Lightning_Bolt = null trigger gg_trg_Elemental_Cast_Get = null trigger gg_trg_Elemental_Cast = null trigger gg_trg_Width_Doom = null trigger gg_trg_Chaos_Meteor = null trigger gg_trg_Legend_Weapon = null trigger gg_trg_Battle_Order = null trigger gg_trg_Land_Groan = null trigger gg_trg_Moon_Glaive = null trigger gg_trg_Eclipse = null trigger gg_trg_Spectral_Dagger = null trigger gg_trg_Desolate = null trigger gg_trg_Dispersion = null trigger gg_trg_Haunt = null trigger gg_trg_Reality = null trigger gg_trg_Footmans_Sommon = null trigger gg_trg_Footmans_Pop = null trigger gg_trg_Footmans_Skill = null trigger gg_trg_Footmans_Revival = null trigger gg_trg_Footmans_Dead = null trigger gg_trg_Footmans_Item = null trigger gg_trg_Footmans_Item_Get = null trigger gg_trg_Footmans_Item_Drop = null trigger gg_trg_Footmans_Exp = null trigger gg_trg_Darkness_Shot = null trigger gg_trg_Genocide_Bash = null trigger gg_trg_Chaos_Panic = null trigger gg_trg_Chaos_Panic_x = null trigger gg_trg_Volcano = null trigger gg_trg_Graveyard_of_Tragedy = null trigger gg_trg_Graveyard_of_Tragedy2 = null trigger gg_trg_Deth_Explosion = null trigger gg_trg_Collapsing_Soul = null trigger gg_trg_Entangling_Roots = null trigger gg_trg_Heaven_Punisher = null trigger gg_trg_Over_Frost = null trigger gg_trg_Absolute = null trigger gg_trg_Revitalization = null trigger gg_trg_Backstab2 = null trigger gg_trg_Backstab = null trigger gg_trg_Nether_Drain = null trigger gg_trg_Decrepify = null trigger gg_trg_DecrepifySlow = null trigger gg_trg_Wild_Axes = null trigger gg_trg_Axe_Storm = null trigger gg_trg_Observer_Trap = null trigger gg_trg_Sniper = null trigger gg_trg_Lockon = null trigger gg_trg_Venom_Splash = null trigger gg_trg_Devour = null trigger gg_trg_Thunder_Storm = null trigger gg_trg_Judgment = null trigger gg_trg_God_Pursuit = null trigger gg_trg_Shadow_Inducement = null trigger gg_trg_Shadow_Inducement_Get = null trigger gg_trg_Conduction = null trigger gg_trg_Void_Darkness = null trigger gg_trg_Cerberus_Aura = null trigger gg_trg_Gate_of_Tartaros = null trigger gg_trg_Rot_x = null trigger gg_trg_Fire = null trigger gg_trg_Self = null trigger gg_trg_Dead = null trigger gg_trg_Icon = null trigger gg_trg_Shadow_Slash = null trigger gg_trg_Geyser = null trigger gg_trg_Water_Barrier = null trigger gg_trg_Waveform = null trigger gg_trg_Atlantis = null trigger gg_trg_Breath_of_Terror = null trigger gg_trg_Charge_of_Darkness = null trigger gg_trg_Fire_Storm = null trigger gg_trg_Frost_Buster = null trigger gg_trg_purge = null trigger gg_trg_purge__________u = null trigger gg_trg_trap_Hero = null trigger gg_trg_trap_Hero__________u = null trigger gg_trg_trap_Creep = null trigger gg_trg_trap_Creep__________u = null trigger gg_trg_Vengence = null trigger gg_trg_Leap_Attack = null trigger gg_trg_Endurance = null trigger gg_trg_Vampire_Groan = null trigger gg_trg_Amateras = null trigger gg_trg_Meigoku = null trigger gg_trg_Overload = null trigger gg_trg_Accelerate = null trigger gg_trg_Absolute_Observance = null trigger gg_trg_Marionette_Control = null trigger gg_trg_Recall = null trigger gg_trg_Boost_of_Marionette = null trigger gg_trg_Lex_Aeterna = null trigger gg_trg_Kyrie_Eleison = null trigger gg_trg_Fissure = null trigger gg_trg_Echo_Slam = null trigger gg_trg_Burst_Tackle_Back = null trigger gg_trg_Burst_Tackle = null trigger gg_trg_Arm_Brack = null trigger gg_trg_Blur = null unit gg_unit_u008_0045 = null unit gg_unit_unpl_0073 = null unit gg_unit_u00A_0048 = null unit gg_unit_u00A_0047 = null unit gg_unit_u009_0046 = null unit gg_unit_usep_0067 = null unit gg_unit_utod_0066 = null unit gg_unit_utod_0057 = null unit gg_unit_usep_0056 = null unit gg_unit_utod_0055 = null unit gg_unit_usep_0054 = null unit gg_unit_n003_0051 = null unit gg_unit_u008_0050 = null unit gg_unit_u009_0049 = null unit gg_unit_u00A_0044 = null unit gg_unit_u009_0043 = null unit gg_unit_u008_0042 = null unit gg_unit_n004_0001 = null unit gg_unit_e000_0034 = null unit gg_unit_etol_0006 = null unit gg_unit_eaom_0008 = null unit gg_unit_eaoe_0009 = null unit gg_unit_eaoe_0019 = null unit gg_unit_eaom_0020 = null unit gg_unit_eaoe_0022 = null unit gg_unit_eaom_0023 = null unit gg_unit_e001_0026 = null unit gg_unit_e001_0027 = null unit gg_unit_e001_0028 = null unit gg_unit_e003_0029 = null unit gg_unit_e003_0030 = null unit gg_unit_e003_0031 = null unit gg_unit_e000_0033 = null unit gg_unit_e000_0032 = null unit gg_unit_n005_0095 = null unit gg_unit_n005_0100 = null unit gg_unit_e00V_0080 = null unit gg_unit_e00V_0081 = null endglobals function InitGlobals takes nothing returns nothing local integer i = 0 set i = 0 loop exitwhen (i > 11) set udg_saitou_bakuniku[i] = 0 set i = i + 1 endloop set udg_Avenger_X = 0 set i = 0 loop exitwhen (i > 10) set udg_Ghost_flag[i] = 0 set i = i + 1 endloop set udg_Creep_Count_Melee = 3 set udg_Creep_Count_Range = 1 set udg_Creep_Count_Siege = 1 set udg_CripplingFear = null set udg_skillLv = 0 set udg_Night_Flag = false set udg_Player01_Kill = 0 set udg_Player02_Kill = 0 set udg_Player03_Kill = 0 set udg_Player04_Kill = 0 set udg_Player05_Kill = 0 set udg_Player10_Kill = 0 set udg_Player06_Kill = 0 set udg_Player07_Kill = 0 set udg_Player08_Kill = 0 set udg_Player09_Kill = 0 set udg_Player01_Dead = 0 set udg_Player02_Dead = 0 set udg_Player03_Dead = 0 set udg_Player04_Dead = 0 set udg_Player05_Dead = 0 set udg_Player06_Dead = 0 set udg_Player07_Dead = 0 set udg_Player08_Dead = 0 set udg_Player09_Dead = 0 set udg_Player10_Dead = 0 set i = 0 loop exitwhen (i > 3) set udg_Player01_Creep[i] = 0 set i = i + 1 endloop set i = 0 loop exitwhen (i > 3) set udg_Player10_Creep[i] = 0 set i = i + 1 endloop set i = 0 loop exitwhen (i > 3) set udg_Player02_Creep[i] = 0 set i = i + 1 endloop set i = 0 loop exitwhen (i > 3) set udg_Player03_Creep[i] = 0 set i = i + 1 endloop set i = 0 loop exitwhen (i > 3) set udg_Player04_Creep[i] = 0 set i = i + 1 endloop set i = 0 loop exitwhen (i > 3) set udg_Player05_Creep[i] = 0 set i = i + 1 endloop set i = 0 loop exitwhen (i > 3) set udg_Player06_Creep[i] = 0 set i = i + 1 endloop set i = 0 loop exitwhen (i > 3) set udg_Player07_Creep[i] = 0 set i = i + 1 endloop set i = 0 loop exitwhen (i > 3) set udg_Player08_Creep[i] = 0 set i = i + 1 endloop set i = 0 loop exitwhen (i > 3) set udg_Player09_Creep[i] = 0 set i = i + 1 endloop set i = 0 loop exitwhen (i > 12) set udg_AutoRevivalTimer[i] = CreateTimer() set i = i + 1 endloop set udg_Flag_1st_Blood = false set udg_GameEnd = 0 set i = 0 loop exitwhen (i > 10) set udg_PlayerPrintNumber[i] = 0 set i = i + 1 endloop set udg_Report_X = 1 set i = 0 loop exitwhen (i > 12) set udg_PlayerX_Dead_Flag[i] = 0 set i = i + 1 endloop set udg_KillCount_Judge = 0 set i = 0 loop exitwhen (i > 11) set udg_Creep_Status[i] = 0 set i = i + 1 endloop set udg_X = 0 set udg_Reciepes_Counter = 0 set i = 0 loop exitwhen (i > 120) set udg_Reciepe_Item1[i] = 0 set i = i + 1 endloop set i = 0 loop exitwhen (i > 120) set udg_Reciepe_Item4[i] = 0 set i = i + 1 endloop set i = 0 loop exitwhen (i > 120) set udg_Reciepe_Item2[i] = 0 set i = i + 1 endloop set i = 0 loop exitwhen (i > 120) set udg_Reciepe_Item3[i] = 0 set i = i + 1 endloop set i = 0 loop exitwhen (i > 120) set udg_Reciepe_Result[i] = 0 set i = i + 1 endloop set i = 0 loop exitwhen (i > 120) set udg_Reciepe_lenght[i] = 0 set i = i + 1 endloop set udg_Reciepes_MaxCount = 120 set udg_Item_CoolDown_Time = 0 set udg_Iitem_Array_Counter = 0 set i = 0 loop exitwhen (i > 1) set udg_Item_CoolDown_Time_Array[i] = 0 set i = i + 1 endloop set udg_CreepLv = 1 set i = 0 loop exitwhen (i > 10) set udg_Bottle_in_Rune_Timer[i] = CreateTimer() set i = i + 1 endloop set udg_Creep_Siege_Counter = 0 set udg_string = 0 set udg_AuroraCannon_Timer = CreateTimer() set udg_Orb_Type = 0 set udg_Orb_Counter = 0 set udg_ew = CreateGroup() set udg_UNKNOWN_group = CreateGroup() set udg_Spectre_damage = 0 set udg_FootmansExp = 0 set i = 0 loop exitwhen (i > 10) set udg_Chaos_Panic_HP[i] = 0 set i = i + 1 endloop set i = 0 loop exitwhen (i > 10) set udg_Chaos_Panic_MP[i] = 0 set i = i + 1 endloop set udg_Chaos_Panic_Nam = 0 set udg_Elemental_Flag = 0 set udg_Backstab = false set udg_Shadow_Inducement = false set udg_StartCreep = CreateGroup() set i = 0 loop exitwhen (i > 1) set udg_M_board[i] = CreateMultiboard() set i = i + 1 endloop set udg_Henshin = 'A0EK' endfunction //*************************************************************************** //* //* Unit Item Tables //* //*************************************************************************** function Unit000114_DropItems takes nothing returns nothing local widget trigWidget = null local unit trigUnit = null local integer itemID = 0 local boolean canDrop = true set trigWidget = bj_lastDyingWidget if (trigWidget == null) then set trigUnit = GetTriggerUnit() endif if (trigUnit != null) then set canDrop = not IsUnitHidden(trigUnit) if (canDrop and GetChangingUnit() != null) then set canDrop = (GetChangingUnitPrevOwner() == Player(PLAYER_NEUTRAL_AGGRESSIVE)) endif endif if (canDrop) then // Item set 0 call RandomDistReset( ) call RandomDistAddItem( 'I02Z', 100 ) set itemID = RandomDistChoose( ) if (trigUnit != null) then call UnitDropItem( trigUnit, itemID ) else call WidgetDropItem( trigWidget, itemID ) endif endif set bj_lastDyingWidget = null call DestroyTrigger(GetTriggeringTrigger()) endfunction //*************************************************************************** //* //* Sounds //* //*************************************************************************** function InitSounds takes nothing returns nothing set gg_snd_SleepBirth = CreateSound( "Abilities\\Spells\\Undead\\Sleep\\SleepBirth1.wav", false, true, true, 10, 10, "SpellsEAX" ) call SetSoundParamsFromLabel( gg_snd_SleepBirth, "Sleep" ) call SetSoundDuration( gg_snd_SleepBirth, 3203 ) call SetSoundPitch( gg_snd_SleepBirth, 0.0 ) call SetSoundDistances( gg_snd_SleepBirth, 0.0, 0.0 ) call SetSoundDistanceCutoff( gg_snd_SleepBirth, 0.0 ) set gg_snd_TheHornOfCenarius = CreateSound( "Sound\\Ambient\\DoodadEffects\\TheHornOfCenarius.wav", false, false, false, 10, 10, "DefaultEAXON" ) call SetSoundParamsFromLabel( gg_snd_TheHornOfCenarius, "HornOfCenariusSound" ) call SetSoundDuration( gg_snd_TheHornOfCenarius, 12121 ) set gg_snd_ReceiveGold = CreateSound( "Abilities\\Spells\\Items\\ResourceItems\\ReceiveGold.wav", false, true, true, 10, 10, "SpellsEAX" ) call SetSoundParamsFromLabel( gg_snd_ReceiveGold, "ReceiveGold" ) call SetSoundDuration( gg_snd_ReceiveGold, 589 ) set gg_snd_MaievYesAttack2 = CreateSound( "Units\\NightElf\\Maiev\\MaievYesAttack2.wav", false, true, true, 10, 10, "HeroAcksEAX" ) call SetSoundParamsFromLabel( gg_snd_MaievYesAttack2, "MaievYesAttack" ) call SetSoundDuration( gg_snd_MaievYesAttack2, 1080 ) set gg_snd_leapattack1 = CreateSound( "Sound\\Music\\mp3Music\\leapattack1.mp3", false, false, false, 10, 10, "" ) call SetSoundDuration( gg_snd_leapattack1, 705 ) call SetSoundChannel( gg_snd_leapattack1, 0 ) call SetSoundVolume( gg_snd_leapattack1, 127 ) call SetSoundPitch( gg_snd_leapattack1, 1.0 ) endfunction //*************************************************************************** //* //* Unit Creation //* //*************************************************************************** //=========================================================================== function CreateBuildingsForPlayer0 takes nothing returns nothing local player p = Player(0) local unit u local integer unitID local trigger t local real life set u = CreateUnit( p, 'edos', -6080.0, -5952.0, 270.000 ) set gg_unit_etol_0006 = CreateUnit( p, 'etol', -4800.0, -6912.0, 270.000 ) set u = CreateUnit( p, 'emow', -3360.0, -7008.0, 270.000 ) set gg_unit_eaom_0008 = CreateUnit( p, 'eaom', -3840.0, -6720.0, 270.000 ) set gg_unit_eaoe_0009 = CreateUnit( p, 'eaoe', -3776.0, -6272.0, 270.000 ) set u = CreateUnit( p, 'emow', -3488.0, -5856.0, 270.000 ) set u = CreateUnit( p, 'emow', -3744.0, -5536.0, 270.000 ) set u = CreateUnit( p, 'emow', -4320.0, -6944.0, 270.000 ) set u = CreateUnit( p, 'emow', -4512.0, -6432.0, 270.000 ) set u = CreateUnit( p, 'emow', -4896.0, -5728.0, 270.000 ) set u = CreateUnit( p, 'emow', -5280.0, -5344.0, 270.000 ) set u = CreateUnit( p, 'emow', -5920.0, -4832.0, 270.000 ) set u = CreateUnit( p, 'emow', -5280.0, -4192.0, 270.000 ) set u = CreateUnit( p, 'emow', -5664.0, -3872.0, 270.000 ) set gg_unit_eaoe_0019 = CreateUnit( p, 'eaoe', -4800.0, -4608.0, 270.000 ) set gg_unit_eaom_0020 = CreateUnit( p, 'eaom', -4288.0, -4992.0, 270.000 ) set u = CreateUnit( p, 'eaow', -5440.0, -4800.0, 270.000 ) set gg_unit_eaoe_0022 = CreateUnit( p, 'eaoe', -5952.0, -4160.0, 270.000 ) set gg_unit_eaom_0023 = CreateUnit( p, 'eaom', -6400.0, -4224.0, 270.000 ) set u = CreateUnit( p, 'edob', -3840.0, -5184.0, 270.000 ) endfunction //=========================================================================== function CreateUnitsForPlayer0 takes nothing returns nothing local player p = Player(0) local unit u local integer unitID local trigger t local real life set gg_unit_n004_0001 = CreateUnit( p, 'n004', -6720.0, -5920.0, 270.000 ) call SetUnitColor( gg_unit_n004_0001, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'h004', -6400.0, -5952.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'e002', -4512.0, -6816.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'e002', -4896.0, -6560.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set gg_unit_e001_0026 = CreateUnit( p, 'e001', -3424.0, -6560.0, 270.000 ) call SetUnitColor( gg_unit_e001_0026, ConvertPlayerColor(0) ) set gg_unit_e001_0027 = CreateUnit( p, 'e001', -4384.0, -4448.0, 270.000 ) call SetUnitColor( gg_unit_e001_0027, ConvertPlayerColor(0) ) set gg_unit_e001_0028 = CreateUnit( p, 'e001', -6240.0, -3808.0, 270.000 ) call SetUnitColor( gg_unit_e001_0028, ConvertPlayerColor(0) ) set gg_unit_e003_0029 = CreateUnit( p, 'e003', -544.0, -6688.0, 270.000 ) call SetUnitColor( gg_unit_e003_0029, ConvertPlayerColor(0) ) set gg_unit_e003_0030 = CreateUnit( p, 'e003', -3488.0, -3296.0, 270.000 ) call SetUnitColor( gg_unit_e003_0030, ConvertPlayerColor(0) ) set gg_unit_e003_0031 = CreateUnit( p, 'e003', -6112.0, -1312.0, 270.000 ) call SetUnitColor( gg_unit_e003_0031, ConvertPlayerColor(0) ) set gg_unit_e000_0032 = CreateUnit( p, 'e000', -1504.0, -1824.0, 270.000 ) call SetUnitColor( gg_unit_e000_0032, ConvertPlayerColor(0) ) set gg_unit_e000_0033 = CreateUnit( p, 'e000', -6112.0, 1504.0, 270.000 ) call SetUnitColor( gg_unit_e000_0033, ConvertPlayerColor(0) ) set gg_unit_e000_0034 = CreateUnit( p, 'e000', 4960.0, -6752.0, 270.000 ) call SetUnitColor( gg_unit_e000_0034, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n00L', -6720.0, -5312.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n00P', -6848.0, -5760.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n006', -6720.0, -5504.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n007', -6720.0, -5696.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n008', -6208.0, -5312.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n009', -6336.0, -5248.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n00A', -6464.0, -5248.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n00B', -6592.0, -5312.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n00C', -6656.0, -5184.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) endfunction //=========================================================================== function CreateUnitsForPlayer1 takes nothing returns nothing local player p = Player(1) local unit u local integer unitID local trigger t local real life set gg_unit_n005_0095 = CreateUnit( p, 'n005', -6272.0, -6784.0, 270.000 ) call SetUnitColor( gg_unit_n005_0095, ConvertPlayerColor(0) ) endfunction //=========================================================================== function CreateUnitsForPlayer2 takes nothing returns nothing local player p = Player(2) local unit u local integer unitID local trigger t local real life set u = CreateUnit( p, 'n005', -6144.0, -6784.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) endfunction //=========================================================================== function CreateUnitsForPlayer3 takes nothing returns nothing local player p = Player(3) local unit u local integer unitID local trigger t local real life set u = CreateUnit( p, 'n005', -6400.0, -6784.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) endfunction //=========================================================================== function CreateUnitsForPlayer4 takes nothing returns nothing local player p = Player(4) local unit u local integer unitID local trigger t local real life set u = CreateUnit( p, 'n005', -6016.0, -6784.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) endfunction //=========================================================================== function CreateUnitsForPlayer5 takes nothing returns nothing local player p = Player(5) local unit u local integer unitID local trigger t local real life set u = CreateUnit( p, 'n005', -6528.0, -6784.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) endfunction //=========================================================================== function CreateBuildingsForPlayer6 takes nothing returns nothing local player p = Player(6) local unit u local integer unitID local trigger t local real life set u = CreateUnit( p, 'ugrv', 6400.0, 4736.0, 270.000 ) set gg_unit_usep_0054 = CreateUnit( p, 'usep', 4160.0, 3392.0, 270.000 ) set gg_unit_utod_0055 = CreateUnit( p, 'utod', 3776.0, 3840.0, 270.000 ) set gg_unit_usep_0056 = CreateUnit( p, 'usep', 6272.0, 3264.0, 270.000 ) set gg_unit_utod_0057 = CreateUnit( p, 'utod', 5824.0, 3264.0, 270.000 ) set u = CreateUnit( p, 'uzig', 5536.0, 3296.0, 270.000 ) set u = CreateUnit( p, 'uzig', 6304.0, 3744.0, 270.000 ) set u = CreateUnit( p, 'uzig', 6112.0, 4000.0, 270.000 ) set u = CreateUnit( p, 'uzig', 5408.0, 2656.0, 270.000 ) set u = CreateUnit( p, 'uzig', 4768.0, 3104.0, 270.000 ) set u = CreateUnit( p, 'uzig', 4640.0, 3680.0, 270.000 ) set u = CreateUnit( p, 'uzig', 3168.0, 4000.0, 270.000 ) set u = CreateUnit( p, 'uzig', 3040.0, 5088.0, 270.000 ) set gg_unit_utod_0066 = CreateUnit( p, 'utod', 3520.0, 5440.0, 270.000 ) set gg_unit_usep_0067 = CreateUnit( p, 'usep', 3776.0, 5952.0, 270.000 ) set u = CreateUnit( p, 'uzig', 4192.0, 5536.0, 270.000 ) set u = CreateUnit( p, 'usap', 3520.0, 4608.0, 270.000 ) set u = CreateUnit( p, 'uzig', 4128.0, 4512.0, 270.000 ) set u = CreateUnit( p, 'uslh', 4096.0, 2688.0, 270.000 ) set gg_unit_unpl_0073 = CreateUnit( p, 'unpl', 4928.0, 4480.0, 270.000 ) endfunction //=========================================================================== function CreateUnitsForPlayer6 takes nothing returns nothing local player p = Player(6) local unit u local integer unitID local trigger t local real life set gg_unit_u008_0042 = CreateUnit( p, 'u008', 1056.0, -160.0, 270.000 ) call SetUnitColor( gg_unit_u008_0042, ConvertPlayerColor(0) ) set gg_unit_u009_0043 = CreateUnit( p, 'u009', 2400.0, 1696.0, 270.000 ) call SetUnitColor( gg_unit_u009_0043, ConvertPlayerColor(0) ) set gg_unit_u00A_0044 = CreateUnit( p, 'u00A', 3616.0, 3296.0, 270.000 ) call SetUnitColor( gg_unit_u00A_0044, ConvertPlayerColor(0) ) set gg_unit_u008_0045 = CreateUnit( p, 'u008', -4704.0, 5920.0, 270.000 ) call SetUnitColor( gg_unit_u008_0045, ConvertPlayerColor(0) ) set gg_unit_u009_0046 = CreateUnit( p, 'u009', 96.0, 5856.0, 270.000 ) call SetUnitColor( gg_unit_u009_0046, ConvertPlayerColor(0) ) set gg_unit_u00A_0047 = CreateUnit( p, 'u00A', 3168.0, 5920.0, 270.000 ) call SetUnitColor( gg_unit_u00A_0047, ConvertPlayerColor(0) ) set gg_unit_u00A_0048 = CreateUnit( p, 'u00A', 6112.0, 2784.0, 270.000 ) call SetUnitColor( gg_unit_u00A_0048, ConvertPlayerColor(0) ) set gg_unit_u009_0049 = CreateUnit( p, 'u009', 6112.0, -96.0, 270.000 ) call SetUnitColor( gg_unit_u009_0049, ConvertPlayerColor(0) ) set gg_unit_u008_0050 = CreateUnit( p, 'u008', 6048.0, -2080.0, 270.000 ) call SetUnitColor( gg_unit_u008_0050, ConvertPlayerColor(0) ) set gg_unit_n003_0051 = CreateUnit( p, 'n003', 6272.0, 5504.0, 270.000 ) call SetUnitColor( gg_unit_n003_0051, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n002', 6400.0, 5120.0, 270.000 ) set u = CreateUnit( p, 'u007', 4576.0, 4576.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'u007', 4960.0, 4128.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n00L', 5696.0, 5696.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n00P', 6144.0, 5760.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n006', 5952.0, 5568.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n007', 6080.0, 5568.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n008', 5696.0, 5120.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n00C', 5568.0, 5568.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n00B', 5696.0, 5440.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n00A', 5568.0, 5376.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n009', 5568.0, 5248.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) endfunction //=========================================================================== function CreateUnitsForPlayer7 takes nothing returns nothing local player p = Player(7) local unit u local integer unitID local trigger t local real life set gg_unit_n005_0100 = CreateUnit( p, 'n005', 6080.0, 6464.0, 270.000 ) call SetUnitColor( gg_unit_n005_0100, ConvertPlayerColor(0) ) endfunction //=========================================================================== function CreateUnitsForPlayer8 takes nothing returns nothing local player p = Player(8) local unit u local integer unitID local trigger t local real life set u = CreateUnit( p, 'n005', 6208.0, 6464.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) endfunction //=========================================================================== function CreateUnitsForPlayer9 takes nothing returns nothing local player p = Player(9) local unit u local integer unitID local trigger t local real life set u = CreateUnit( p, 'n005', 5952.0, 6464.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) endfunction //=========================================================================== function CreateUnitsForPlayer10 takes nothing returns nothing local player p = Player(10) local unit u local integer unitID local trigger t local real life set u = CreateUnit( p, 'n005', 6336.0, 6464.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) endfunction //=========================================================================== function CreateUnitsForPlayer11 takes nothing returns nothing local player p = Player(11) local unit u local integer unitID local trigger t local real life set u = CreateUnit( p, 'n005', 5824.0, 6464.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) endfunction //=========================================================================== function CreateNeutralHostile takes nothing returns nothing local player p = Player(PLAYER_NEUTRAL_AGGRESSIVE) local unit u local integer unitID local trigger t local real life set u = CreateUnit( p, 'u00N', 2425.3, -559.4, 186.310 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set t = CreateTrigger( ) call TriggerRegisterUnitEvent( t, u, EVENT_UNIT_DEATH ) call TriggerRegisterUnitEvent( t, u, EVENT_UNIT_CHANGE_OWNER ) call TriggerAddAction( t, function Unit000114_DropItems ) endfunction //=========================================================================== function CreateNeutralPassiveBuildings takes nothing returns nothing local player p = Player(PLAYER_NEUTRAL_PASSIVE) local unit u local integer unitID local trigger t local real life set u = CreateUnit( p, 'ngme', -7232.0, 4160.0, 270.000 ) set u = CreateUnit( p, 'ngme', 7232.0, -4736.0, 270.000 ) endfunction //=========================================================================== function CreateNeutralPassive takes nothing returns nothing local player p = Player(PLAYER_NEUTRAL_PASSIVE) local unit u local integer unitID local trigger t local real life set u = CreateUnit( p, 'n01G', 5888.0, 6208.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n00I', -6080.0, -6464.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n00J', -6464.0, -7040.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n00K', -6080.0, -7040.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n01J', 6272.0, 6208.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n01I', 5824.0, 6720.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n01H', 6208.0, 6720.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n001', -6464.0, -6464.0, 270.000 ) set gg_unit_e00V_0080 = CreateUnit( p, 'e00V', -5952.7, 5554.8, 159.450 ) call SetUnitColor( gg_unit_e00V_0080, ConvertPlayerColor(0) ) set gg_unit_e00V_0081 = CreateUnit( p, 'e00V', 5672.2, -6329.5, 159.450 ) call SetUnitColor( gg_unit_e00V_0081, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n00D', 3008.0, 64.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) set u = CreateUnit( p, 'n00D', -4608.0, 1152.0, 270.000 ) call SetUnitColor( u, ConvertPlayerColor(0) ) endfunction //=========================================================================== function CreatePlayerBuildings takes nothing returns nothing call CreateBuildingsForPlayer0( ) call CreateBuildingsForPlayer6( ) endfunction //=========================================================================== function CreatePlayerUnits takes nothing returns nothing call CreateUnitsForPlayer0( ) call CreateUnitsForPlayer1( ) call CreateUnitsForPlayer2( ) call CreateUnitsForPlayer3( ) call CreateUnitsForPlayer4( ) call CreateUnitsForPlayer5( ) call CreateUnitsForPlayer6( ) call CreateUnitsForPlayer7( ) call CreateUnitsForPlayer8( ) call CreateUnitsForPlayer9( ) call CreateUnitsForPlayer10( ) call CreateUnitsForPlayer11( ) endfunction //=========================================================================== function CreateAllUnits takes nothing returns nothing call CreateNeutralPassiveBuildings( ) call CreatePlayerBuildings( ) call CreateNeutralHostile( ) call CreateNeutralPassive( ) call CreatePlayerUnits( ) endfunction //*************************************************************************** //* //* Regions //* //*************************************************************************** function CreateRegions takes nothing returns nothing local weathereffect we set gg_rct_BottomRelayArea = Rect( 5344.0, -6624.0, 5920.0, -5952.0 ) set gg_rct_SC_Bottom_Melee = Rect( 5760.0, 2464.0, 6240.0, 2944.0 ) set gg_rct_SC_Bottom_Range = Rect( 5760.0, 2912.0, 6240.0, 3392.0 ) set gg_rct_SC_BottomStartPoint = Rect( 5312.0, 2080.0, 6624.0, 3840.0 ) set gg_rct_SC_Center_Melee = Rect( 3264.0, 2880.0, 3744.0, 3360.0 ) set gg_rct_SC_Center_Range = Rect( 3712.0, 3104.0, 4192.0, 3584.0 ) set gg_rct_SC_CenterStartPoint = Rect( 3040.0, 2592.0, 4544.0, 4416.0 ) set gg_rct_SC_Natural_BigCreep = Rect( 4256.0, -2400.0, 4320.0, -2336.0 ) set gg_rct_SC_Natural_Creep_1 = Rect( -4448.0, 3616.0, -4384.0, 3680.0 ) set gg_rct_SC_Natural_Creep_2 = Rect( -2720.0, 4544.0, -2656.0, 4608.0 ) set gg_rct_SC_Natural_Creep_3 = Rect( -1728.0, 2368.0, -1664.0, 2432.0 ) set gg_rct_SC_Natural_Creep_4 = Rect( -512.0, 3200.0, -448.0, 3264.0 ) set gg_rct_SC_Natural_Creep_5 = Rect( 832.0, 2816.0, 896.0, 2880.0 ) set gg_rct_SC_Top_Melee = Rect( 2880.0, 5760.0, 3360.0, 6240.0 ) set gg_rct_SC_Top_Range = Rect( 3328.0, 5472.0, 3808.0, 5952.0 ) set gg_rct_SC_TopStartPoint = Rect( 2528.0, 4928.0, 4224.0, 6592.0 ) set gg_rct_SCOURGES_Start = Rect( 5792.0, 4992.0, 6112.0, 5344.0 ) set gg_rct_SE_Bottom_Melee = Rect( -3712.0, -6784.0, -3232.0, -6304.0 ) set gg_rct_SE_Bottom_Range = Rect( -4160.0, -6784.0, -3680.0, -6304.0 ) set gg_rct_SE_BottomStartPoint = Rect( -4480.0, -7264.0, -2944.0, -5856.0 ) set gg_rct_SE_Center_Melee = Rect( -4608.0, -4672.0, -4128.0, -4192.0 ) set gg_rct_SE_Center_Range = Rect( -4832.0, -5152.0, -4352.0, -4672.0 ) set gg_rct_SE_CenterStartPoint = Rect( -5184.0, -5472.0, -3744.0, -3712.0 ) set gg_rct_SE_Natural_BigCreep = Rect( -3200.0, -256.0, -3136.0, -192.0 ) set gg_rct_SE_Natural_Creep_1 = Rect( -1024.0, -4544.0, -960.0, -4480.0 ) set gg_rct_SE_Natural_Creep_2 = Rect( -256.0, -3424.0, -192.0, -3360.0 ) set gg_rct_SE_Natural_Creep_3 = Rect( 1536.0, -4096.0, 1600.0, -4032.0 ) set gg_rct_SE_Natural_Creep_4 = Rect( 2944.0, -5120.0, 3008.0, -5056.0 ) set gg_rct_SE_Natural_Creep_5 = Rect( 3040.0, -3776.0, 3104.0, -3712.0 ) set gg_rct_SE_Top_Melee = Rect( -6496.0, -4064.0, -6016.0, -3584.0 ) set gg_rct_SE_Top_Range = Rect( -6496.0, -4544.0, -6016.0, -4064.0 ) set gg_rct_SE_TopStartPoint = Rect( -6912.0, -4960.0, -5504.0, -3296.0 ) set gg_rct_SENTINELS_Start = Rect( -6528.0, -5728.0, -6208.0, -5408.0 ) set gg_rct_TopRelayArea = Rect( -6272.0, 5024.0, -5632.0, 5824.0 ) set gg_rct_Left_Rune = Rect( -2624.0, 1728.0, -2464.0, 1888.0 ) set gg_rct_Right_Rune = Rect( 3136.0, -3104.0, 3296.0, -2944.0 ) endfunction //*************************************************************************** //* //* Custom Script Code //* //*************************************************************************** function CreateDummy takes player pl , location loc , integer life , integer abi , integer abiL returns unit call CreateNUnitsAtLoc( 1, 'h006', pl, loc, bj_UNIT_FACING ) call UnitAddAbilityBJ( abi, GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( abi, GetLastCreatedUnit(), abiL ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, life ) return GetLastCreatedUnit() endfunction function PutText takes string msg ,location loc returns nothing call CreateTextTagLocBJ( msg , loc, 0, 10, 100, 100, 100, 0 ) call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 40.00, 90 ) call SetTextTagPermanentBJ( GetLastCreatedTextTag(), false ) call SetTextTagLifespanBJ( GetLastCreatedTextTag(), 3.00 ) endfunction function Elemental_Reset takes unit tunit returns nothing if(udg_Elemental_Flag == 0 or udg_Elemental_Flag == 10 or udg_Elemental_Flag == 100)then call UnitRemoveAbilityBJ( 'A08M', tunit ) call UnitRemoveAbilityBJ( 'A08N', tunit ) call UnitRemoveAbilityBJ( 'A08O', tunit ) call UnitRemoveAbilityBJ( 'A0BF', tunit ) call UnitRemoveAbilityBJ( 'A0BG', tunit ) endif if(udg_Elemental_Flag == 0 or udg_Elemental_Flag == 1 or udg_Elemental_Flag == 100)then call UnitRemoveAbilityBJ( 'A08P', tunit ) call UnitRemoveAbilityBJ( 'A08Q', tunit ) call UnitRemoveAbilityBJ( 'A08R', tunit ) call UnitRemoveAbilityBJ( 'A0BH', tunit ) call UnitRemoveAbilityBJ( 'A0BI', tunit ) endif if(udg_Elemental_Flag == 0 or udg_Elemental_Flag == 1 or udg_Elemental_Flag == 10)then call UnitRemoveAbilityBJ( 'A08S', tunit ) call UnitRemoveAbilityBJ( 'A08T', tunit ) call UnitRemoveAbilityBJ( 'A08U', tunit ) call UnitRemoveAbilityBJ( 'A0BJ', tunit ) call UnitRemoveAbilityBJ( 'A0BK', tunit ) endif endfunction function ColorGet takes integer cpno returns string if (cpno == 0) then return "|c00ff0303" endif if (cpno == 1) then return "|c000042ff" endif if (cpno == 2) then return "|c001ce6b9" endif if (cpno == 3) then return "|c00540081" endif if (cpno == 4) then return "|c00fffc01" endif if (cpno == 5) then return "|c00ff8000" endif if (cpno == 6) then return "|c0020c000" endif if (cpno == 7) then return "|c00e55660" endif if (cpno == 8) then return "|c00959697" endif if (cpno == 9) then return "|c007ebff1" endif if (cpno == 10) then return "|c00106246" endif if (cpno == 11) then return "|c004e2a04" endif return "|cffffffff" endfunction function H2Ix takes handle pTarg returns integer return pTarg return 0 endfunction function H2Tx takes handle pTarg returns string return I2S(H2Ix(pTarg)) endfunction function FastFlush takes string pTable returns nothing call FlushStoredMission(udg_Core,pTable) endfunction function SetHandle takes string pTable,string pKey,handle pData returns nothing call StoreInteger(udg_Core,pTable,pKey,H2Ix(pData)) endfunction function SetInteger takes string pTable,string pKey,integer pData returns nothing call StoreInteger(udg_Core,pTable,pKey,pData) endfunction function SetReal takes string pTable,string pKey,real pData returns nothing call StoreReal(udg_Core,pTable,pKey,pData) endfunction function SetBoolean takes string pTable,string pKey,boolean pData returns nothing call StoreBoolean(udg_Core,pTable,pKey,pData) endfunction function GetUnit takes string pTable,string pKey returns unit return GetStoredInteger(udg_Core,pTable,pKey) return null endfunction function GetPlayer takes string pTable,string pKey returns player return GetStoredInteger(udg_Core,pTable,pKey) return null endfunction function GetTimer takes string pTable,string pKey returns timer return GetStoredInteger(udg_Core,pTable,pKey) return null endfunction function GetTrigger takes string pTable,string pKey returns trigger return GetStoredInteger(udg_Core,pTable,pKey) return null endfunction function GetGroup takes string pTable,string pKey returns group return GetStoredInteger(udg_Core,pTable,pKey) return null endfunction function GetFX takes string pTable,string pKey returns effect return GetStoredInteger(udg_Core,pTable,pKey) return null endfunction function GetLocation takes string pTable,string pKey returns location return GetStoredInteger(udg_Core,pTable,pKey) return null endfunction function GetInteger takes string pTable,string pKey returns integer return GetStoredInteger(udg_Core,pTable,pKey) endfunction function GetReal takes string pTable,string pKey returns real return GetStoredReal(udg_Core,pTable,pKey) endfunction function GetBoolean takes string pTable,string pKey returns boolean return GetStoredBoolean(udg_Core,pTable,pKey) endfunction function SetString takes string pTable,string pKey,string pData returns nothing call StoreString(udg_Core,pTable,pKey,pData) endfunction function GetTrigAction takes string pTable,string pKey returns triggeraction return GetStoredInteger(udg_Core,pTable,pKey) return null endfunction function GetString takes string pTable,string pKey returns string return GetStoredString(udg_Core,pTable,pKey) endfunction function DelayedDamageTimer takes nothing returns nothing local string lf5=H2Tx(GetExpiredTimer()) local unit lEU=GetUnit(lf5,"Unit") call SetUnitState(lEU,UNIT_STATE_LIFE,GetUnitState(lEU,UNIT_STATE_LIFE)+GetReal(lf5,"Damage")) endfunction function DelayedDamage takes unit pEU,real pf7 returns nothing local timer ltt=CreateTimer() local string lf5=H2Tx(ltt) call SetReal(lf5,"Damage",pf7) call SetHandle(lf5,"Unit",pEU) call TimerStart(ltt,0,false,function DelayedDamageTimer) endfunction function DelayedDamageCheck takes unit pEU,real pf7 returns nothing local real lf9=GetUnitState(pEU,UNIT_STATE_MAX_LIFE) local real lFa=GetUnitState(pEU,UNIT_STATE_LIFE) if pf7>(lf9-lFa)then if pf7>=lFa then call SetUnitState(pEU,UNIT_STATE_LIFE,lf9) call DelayedDamage(pEU,pf7-(lf9-lFa)) else call DelayedDamage(pEU,pf7) endif else call SetUnitState(pEU,UNIT_STATE_LIFE,GetUnitState(pEU,UNIT_STATE_LIFE)+pf7) endif endfunction function ReturnMinReal takes real paa,real pbb returns real if(paalfr)then return lfr endif return pxx endfunction function SafeY takes real pyy returns real local real lfr=GetRectMinY(bj_mapInitialPlayableArea)+50 if(pyylfr)then return lfr endif return pyy endfunction function KillDestructableEnum takes nothing returns nothing call KillDestructable(GetEnumDestructable()) endfunction function ReturnTrueRange takes unit pFb,location pFB returns real local real lFC=GetUnitX(pFb) local real lFd=GetUnitY(pFb) local real lEv=GetLocationX(pFB) local real lEV=GetLocationY(pFB) if pFb==null then return 0x540BE3FF else return SquareRoot((lFC-lEv)*(lFC-lEv)+(lFd-lEV)*(lFd-lEV)) endif endfunction function SpellPreload takes integer pfS returns nothing local unit luu=CreateUnit(Player(15),'e00Y',0,0,270) call UnitAddAbility(luu,pfS) call UnitRemoveAbility(luu,pfS) call RemoveUnit(luu) endfunction function DestroyTriggerEx takes trigger ptt returns nothing call DestroyTrigger(ptt) endfunction //*************************************************************************** //* //* Triggers //* //*************************************************************************** //=========================================================================== // Trigger: MoveSpeed //=========================================================================== function Trig_MoveSpeed_Actions takes nothing returns nothing call DisplayTextToForce( GetForceOfPlayer(GetTriggerPlayer()), R2S(GetUnitMoveSpeed(udg_PlayerX_Hero[GetConvertedPlayerId(GetTriggerPlayer())])) ) endfunction //=========================================================================== function InitTrig_MoveSpeed takes nothing returns nothing set gg_trg_MoveSpeed = CreateTrigger( ) call TriggerRegisterPlayerChatEvent( gg_trg_MoveSpeed, Player(1), "-ms", false ) call TriggerRegisterPlayerChatEvent( gg_trg_MoveSpeed, Player(2), "-ms", false ) call TriggerRegisterPlayerChatEvent( gg_trg_MoveSpeed, Player(3), "-ms", false ) call TriggerRegisterPlayerChatEvent( gg_trg_MoveSpeed, Player(4), "-ms", false ) call TriggerRegisterPlayerChatEvent( gg_trg_MoveSpeed, Player(5), "-ms", false ) call TriggerRegisterPlayerChatEvent( gg_trg_MoveSpeed, Player(7), "-ms", false ) call TriggerRegisterPlayerChatEvent( gg_trg_MoveSpeed, Player(8), "-ms", false ) call TriggerRegisterPlayerChatEvent( gg_trg_MoveSpeed, Player(9), "-ms", false ) call TriggerRegisterPlayerChatEvent( gg_trg_MoveSpeed, Player(10), "-ms", false ) call TriggerRegisterPlayerChatEvent( gg_trg_MoveSpeed, Player(11), "-ms", false ) call TriggerAddAction( gg_trg_MoveSpeed, function Trig_MoveSpeed_Actions ) endfunction //=========================================================================== // Trigger: TestMode // // ãƒEƒãƒE‚°å‘½ä»¤Ešè³Eß制御 // 発言ã€Egold xxxxxxã€ã€€xxxxxx=ä»»æ„ãE金é¡E //=========================================================================== function Trig_TestMode_Actions takes nothing returns nothing call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_2952" ) call ExecuteFunc("Start_Gold") call ExecuteFunc("Start_lvlup") call ExecuteFunc("Start_wtf") call ExecuteFunc("Start_testStart") call ExecuteFunc("Start_ReHero") call DestroyTrigger( GetTriggeringTrigger() ) endfunction function InitTrig_TestMode takes nothing returns nothing set gg_trg_TestMode = CreateTrigger( ) call TriggerRegisterPlayerChatEvent( gg_trg_TestMode, Player(1), "-test", true ) call TriggerAddAction( gg_trg_TestMode, function Trig_TestMode_Actions ) endfunction//=========================================================================== // Trigger: Gold // // ãƒEƒãƒE‚°å‘½ä»¤Ešè³Eß制御 // 発言ã€Egold xxxxxxã€ã€€xxxxxx=ä»»æ„ãE金é¡E //=========================================================================== function Trig_Gold_Actions takes nothing returns nothing call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD, S2I(SubStringBJ(GetEventPlayerChatString(), 7, 14)) ) endfunction function Start_Gold takes nothing returns nothing set gg_trg_Gold = CreateTrigger( ) call TriggerRegisterPlayerChatEvent( gg_trg_Gold, Player(1), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_Gold, Player(2), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_Gold, Player(3), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_Gold, Player(4), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_Gold, Player(5), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_Gold, Player(7), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_Gold, Player(8), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_Gold, Player(9), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_Gold, Player(10), "-gold", false ) call TriggerRegisterPlayerChatEvent( gg_trg_Gold, Player(11), "-gold", false ) call TriggerAddAction( gg_trg_Gold, function Trig_Gold_Actions ) endfunction function InitTrig_Gold takes nothing returns nothing endfunction//=========================================================================== // Trigger: lvlup // // ãƒEƒãƒE‚°å‘½ä»¤Ešãƒ¬ãƒ™ãƒ«åˆ¶å¾¡ // 発言「lã€E //=========================================================================== function Trig_lvlup_Func001001002 takes nothing returns boolean return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true ) endfunction function Trig_lvlup_Func001A takes nothing returns nothing call SetHeroLevelBJ( GetEnumUnit(), ( GetHeroLevel(GetEnumUnit()) + 1 ), true ) endfunction function Trig_lvlup_Actions takes nothing returns nothing call ForGroupBJ( GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function Trig_lvlup_Func001001002)), function Trig_lvlup_Func001A ) endfunction function Start_lvlup takes nothing returns nothing set gg_trg_lvlup = CreateTrigger( ) call TriggerRegisterPlayerChatEvent( gg_trg_lvlup, Player(1), "l", true ) call TriggerRegisterPlayerChatEvent( gg_trg_lvlup, Player(2), "l", true ) call TriggerRegisterPlayerChatEvent( gg_trg_lvlup, Player(3), "l", true ) call TriggerRegisterPlayerChatEvent( gg_trg_lvlup, Player(4), "l", true ) call TriggerRegisterPlayerChatEvent( gg_trg_lvlup, Player(5), "l", true ) call TriggerRegisterPlayerChatEvent( gg_trg_lvlup, Player(7), "l", true ) call TriggerRegisterPlayerChatEvent( gg_trg_lvlup, Player(8), "l", true ) call TriggerRegisterPlayerChatEvent( gg_trg_lvlup, Player(9), "l", true ) call TriggerRegisterPlayerChatEvent( gg_trg_lvlup, Player(10), "l", true ) call TriggerRegisterPlayerChatEvent( gg_trg_lvlup, Player(11), "l", true ) call TriggerAddAction( gg_trg_lvlup, function Trig_lvlup_Actions ) endfunction function InitTrig_lvlup takes nothing returns nothing endfunction//=========================================================================== // Trigger: wtf //=========================================================================== function Trig_wtf_Actions takes nothing returns nothing call ExecuteFunc("Start_wtf_Skill") endfunction function Start_wtf takes nothing returns nothing set gg_trg_wtf = CreateTrigger( ) call TriggerRegisterPlayerChatEvent( gg_trg_wtf, Player(1), "-wtf", true ) call TriggerAddAction( gg_trg_wtf, function Trig_wtf_Actions ) endfunction function InitTrig_wtf takes nothing returns nothing endfunction//=========================================================================== // Trigger: wtf Skill //=========================================================================== function Trig_wtf_Skill_Actions takes nothing returns nothing call TriggerSleepAction( 0.10 ) call UnitResetCooldown( GetTriggerUnit() ) call SetUnitManaPercentBJ( GetTriggerUnit(), 100 ) endfunction function Start_wtf_Skill takes nothing returns nothing set gg_trg_wtf_Skill = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_wtf_Skill, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddAction( gg_trg_wtf_Skill, function Trig_wtf_Skill_Actions ) endfunction function InitTrig_wtf_Skill takes nothing returns nothing endfunction//=========================================================================== // Trigger: testStart //=========================================================================== function Trig_testStart_Actions takes nothing returns nothing call EnableTrigger( gg_trg_GameStart ) call ConditionalTriggerExecute( gg_trg_GameStart ) endfunction function Start_testStart takes nothing returns nothing set gg_trg_testStart = CreateTrigger( ) call TriggerRegisterPlayerChatEvent( gg_trg_testStart, Player(1), "-start", true ) call TriggerAddAction( gg_trg_testStart, function Trig_testStart_Actions ) endfunction function InitTrig_testStart takes nothing returns nothing endfunction//=========================================================================== // Trigger: ReHero //=========================================================================== function Trig_ReHero_Actions takes nothing returns nothing call RemoveUnit( udg_PlayerX_Hero[GetConvertedPlayerId(GetTriggerPlayer())] ) call SetPlayerMaxHeroesAllowed( 1, GetTriggerPlayer() ) endfunction function Start_ReHero takes nothing returns nothing set gg_trg_ReHero = CreateTrigger( ) call TriggerRegisterPlayerChatEvent( gg_trg_ReHero, Player(1), "-rehero", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ReHero, Player(2), "-rehero", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ReHero, Player(3), "-rehero", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ReHero, Player(4), "-rehero", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ReHero, Player(5), "-rehero", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ReHero, Player(7), "-rehero", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ReHero, Player(8), "-rehero", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ReHero, Player(9), "-rehero", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ReHero, Player(10), "-rehero", true ) call TriggerRegisterPlayerChatEvent( gg_trg_ReHero, Player(11), "-rehero", true ) call TriggerAddAction( gg_trg_ReHero, function Trig_ReHero_Actions ) endfunction function InitTrig_ReHero takes nothing returns nothing endfunction//=========================================================================== // Trigger: HeroRecall // // ヒãEローãŒå¬é‚E•ã‚ŒãŸã¨ããEå‹•ä½E // ・泉å‰ã¸ç§»å‹E // ・視界も泉å‰ã¸ // ・ã“れ以上雇ãˆãªãE‚ˆãE«åˆ¶å¾¡ // ・é…åEã«ä½¿ç”¨ãƒ’ãEロー格ç´E //=========================================================================== function Trig_HeroRecall_Conditions takes nothing returns boolean if ( not ( IsUnitType(GetSoldUnit(), UNIT_TYPE_HERO) == true ) ) then return false endif return true endfunction function Trig_HeroRecall_Func001C takes nothing returns boolean if ( not ( IsPlayerAlly(GetOwningPlayer(GetSoldUnit()), Player(0)) == true ) ) then return false endif return true endfunction function Trig_HeroRecall_Actions takes nothing returns nothing if ( Trig_HeroRecall_Func001C() ) then call SetUnitPositionLoc( GetSoldUnit(), GetRandomLocInRect(gg_rct_SENTINELS_Start) ) call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetSoldUnit()), GetUnitLoc(GetSoldUnit()), 0.00 ) call SetPlayerMaxHeroesAllowed( 0, GetOwningPlayer(GetSoldUnit()) ) call SelectUnitForPlayerSingle( GetSoldUnit(), GetOwningPlayer(GetSoldUnit()) ) else call SetUnitPositionLoc( GetSoldUnit(), GetRandomLocInRect(gg_rct_SCOURGES_Start) ) call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetSoldUnit()), GetUnitLoc(GetSoldUnit()), 0.00 ) call SetPlayerMaxHeroesAllowed( 0, GetOwningPlayer(GetSoldUnit()) ) call SelectUnitForPlayerSingle( GetSoldUnit(), GetOwningPlayer(GetSoldUnit()) ) endif set udg_PlayerX_Hero[GetConvertedPlayerId(GetOwningPlayer(GetSoldUnit()))] = GetSoldUnit() call DisplayTextToForce( GetPlayersAll(), ( GetUnitName(GetSoldUnit()) + ( "(" + ( GetPlayerName(GetOwningPlayer(GetSoldUnit())) + ")" ) ) ) ) endfunction //=========================================================================== function InitTrig_HeroRecall takes nothing returns nothing set gg_trg_HeroRecall = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_HeroRecall, EVENT_PLAYER_UNIT_SELL ) call TriggerAddCondition( gg_trg_HeroRecall, Condition( function Trig_HeroRecall_Conditions ) ) call TriggerAddAction( gg_trg_HeroRecall, function Trig_HeroRecall_Actions ) endfunction //=========================================================================== // Trigger: HeroRevival // // ヒãEローãŒå¾©æ´»ã—ãŸã¨ããEå‹•ä½E // ・泉å‰ã¸ç§»å‹E // ・視界も泉å‰ã¸ //=========================================================================== function Trig_HeroRevival_Conditions takes nothing returns boolean if ( not ( IsUnitType(GetRevivingUnit(), UNIT_TYPE_HERO) == true ) ) then return false endif return true endfunction function Trig_HeroRevival_Func001C takes nothing returns boolean if ( not ( IsPlayerAlly(GetOwningPlayer(GetRevivingUnit()), Player(0)) == true ) ) then return false endif return true endfunction function Trig_HeroRevival_Actions takes nothing returns nothing if ( Trig_HeroRevival_Func001C() ) then call SetUnitPositionLoc( GetRevivingUnit(), GetRandomLocInRect(gg_rct_SENTINELS_Start) ) call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetRevivingUnit()), GetUnitLoc(GetRevivingUnit()), 0.00 ) call SelectUnitForPlayerSingle( GetRevivingUnit(), GetOwningPlayer(GetRevivingUnit()) ) else call SetUnitPositionLoc( GetRevivingUnit(), GetRandomLocInRect(gg_rct_SCOURGES_Start) ) call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetRevivingUnit()), GetUnitLoc(GetRevivingUnit()), 0.00 ) call SelectUnitForPlayerSingle( GetRevivingUnit(), GetOwningPlayer(GetRevivingUnit()) ) endif call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[GetConvertedPlayerId(GetTriggerPlayer())] ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[GetConvertedPlayerId(GetTriggerPlayer())] ) call ConditionalTriggerExecute( gg_trg_RuneTimeout ) endfunction //=========================================================================== function InitTrig_HeroRevival takes nothing returns nothing set gg_trg_HeroRevival = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_HeroRevival, EVENT_PLAYER_HERO_REVIVE_FINISH ) call TriggerAddCondition( gg_trg_HeroRevival, Condition( function Trig_HeroRevival_Conditions ) ) call TriggerAddAction( gg_trg_HeroRevival, function Trig_HeroRevival_Actions ) endfunction //=========================================================================== // Trigger: Day and night //=========================================================================== function Trig_Day_and_night_Func002Func001C takes nothing returns boolean if ( not ( udg_Night_Flag == false ) ) then return false endif return true endfunction function Trig_Day_and_night_Func002Func002C takes nothing returns boolean if ( not ( udg_Night_Flag == true ) ) then return false endif return true endfunction function Trig_Day_and_night_Func002Func003001 takes nothing returns boolean return ( GetTimeOfDay() > 6.00 ) endfunction function Trig_Day_and_night_Func002Func003002 takes nothing returns boolean return ( GetTimeOfDay() <= 18.00 ) endfunction function Trig_Day_and_night_Func002C takes nothing returns boolean if ( not GetBooleanAnd( Trig_Day_and_night_Func002Func003001(), Trig_Day_and_night_Func002Func003002() ) ) then return false endif return true endfunction function Trig_Day_and_night_Actions takes nothing returns nothing if ( Trig_Day_and_night_Func002C() ) then if ( Trig_Day_and_night_Func002Func001C() ) then else set udg_Night_Flag = false endif else if ( Trig_Day_and_night_Func002Func002C() ) then else set udg_Night_Flag = true endif endif endfunction //=========================================================================== function InitTrig_Day_and_night takes nothing returns nothing set gg_trg_Day_and_night = CreateTrigger( ) call TriggerRegisterTimerEventPeriodic( gg_trg_Day_and_night, 1.00 ) call TriggerAddAction( gg_trg_Day_and_night, function Trig_Day_and_night_Actions ) endfunction //=========================================================================== // Trigger: PlayerTimeOut //=========================================================================== function Trig_PlayerTimeOut_Actions takes nothing returns nothing call DisplayTextToForce( GetPlayersAll(), ( "|cffff0000" + ( GetPlayerName(GetTriggerPlayer()) + ( " TimeOut" + "|r" ) ) ) ) endfunction //=========================================================================== function InitTrig_PlayerTimeOut takes nothing returns nothing set gg_trg_PlayerTimeOut = CreateTrigger( ) call TriggerRegisterPlayerEventLeave( gg_trg_PlayerTimeOut, Player(1) ) call TriggerRegisterPlayerEventLeave( gg_trg_PlayerTimeOut, Player(2) ) call TriggerRegisterPlayerEventLeave( gg_trg_PlayerTimeOut, Player(3) ) call TriggerRegisterPlayerEventLeave( gg_trg_PlayerTimeOut, Player(4) ) call TriggerRegisterPlayerEventLeave( gg_trg_PlayerTimeOut, Player(5) ) call TriggerRegisterPlayerEventLeave( gg_trg_PlayerTimeOut, Player(7) ) call TriggerRegisterPlayerEventLeave( gg_trg_PlayerTimeOut, Player(8) ) call TriggerRegisterPlayerEventLeave( gg_trg_PlayerTimeOut, Player(9) ) call TriggerRegisterPlayerEventLeave( gg_trg_PlayerTimeOut, Player(10) ) call TriggerRegisterPlayerEventLeave( gg_trg_PlayerTimeOut, Player(11) ) call TriggerAddAction( gg_trg_PlayerTimeOut, function Trig_PlayerTimeOut_Actions ) endfunction //=========================================================================== // Trigger: Hero Setup //=========================================================================== function Trig_Hero_Setup_Conditions takes nothing returns boolean return IsUnitType(GetSoldUnit(), UNIT_TYPE_HERO) == true endfunction function Trig_Hero_Setup_Actions takes nothing returns nothing if ( GetUnitTypeId(GetSoldUnit()) == 'Hant' ) then //Dwarven Sniper call ExecuteFunc("Start_Sniper") call ExecuteFunc("Start_Lockon") call ExecuteFunc("Start_Observer_Trap") endif if ( GetUnitTypeId(GetSoldUnit()) == 'Nklj' ) then //Nether Surveillant call ExecuteFunc("Start_Shadow_Inducement") call ExecuteFunc("Start_Shadow_Inducement_Get") call ExecuteFunc("Start_Conduction") call ExecuteFunc("Start_Void_Darkness") call ExecuteFunc("Start_Cerberus_Aura") call ExecuteFunc("Start_Gate_of_Tartaros") endif if ( GetUnitTypeId(GetSoldUnit()) == 'Hmbr' ) then //King of Olympos call ExecuteFunc("Start_Thunder_Storm") call ExecuteFunc("Start_Judgment") call ExecuteFunc("Start_God_Pursuit") endif if ( GetUnitTypeId(GetSoldUnit()) == 'Emns' ) then //Ancient Hydra call ExecuteFunc("Start_Venom_Splash") call ExecuteFunc("Start_Devour") endif if ( GetUnitTypeId(GetSoldUnit()) == 'Umal' ) then //Fury Skeleton call ExecuteFunc("Start_Wild_Axes") call ExecuteFunc("Start_Axe_Storm") endif if ( GetUnitTypeId(GetSoldUnit()) == 'Ubal' ) then //Oblivion call ExecuteFunc("Start_Nether_Drain") call ExecuteFunc("Start_Decrepify") call ExecuteFunc("Start_DecrepifySlow") endif if ( GetUnitTypeId(GetSoldUnit()) == 'Uvar' ) then //Bone Fletcher call ExecuteFunc("Start_Backstab") endif if ( GetUnitTypeId(GetSoldUnit()) == 'Nman' ) then //Pit King call ExecuteFunc("Start_Volcano") call ExecuteFunc("Start_Graveyard_of_Tragedy") call ExecuteFunc("Start_Graveyard_of_Tragedy2") call ExecuteFunc("Start_Deth_Explosion") endif if ( GetUnitTypeId(GetSoldUnit()) == 'E005' ) then //Skeleton Lord call ExecuteFunc("Start_Shadow_Slash") endif if ( GetUnitTypeId(GetSoldUnit()) == 'Udth' ) then //Skeleton Warrior call ExecuteFunc("Start_Revitalization") endif if ( GetUnitTypeId(GetSoldUnit()) == 'H009' ) then //Lord Knight call ExecuteFunc("Start_Divine_Shield") call ExecuteFunc("Start_Redemption_Aura") endif if ( GetUnitTypeId(GetSoldUnit()) == 'H00C' ) then //Flame Thrower call ExecuteFunc("Start_Firewall") call ExecuteFunc("Start_Burning_Shot") endif if ( GetUnitTypeId(GetSoldUnit()) == 'Emfr' ) then //Great Ocean call ExecuteFunc("Start_Geyser") call ExecuteFunc("Start_Water_Barrier") call ExecuteFunc("Start_Waveform") call ExecuteFunc("Start_Atlantis") endif if ( GetUnitTypeId(GetSoldUnit()) == 'O001' ) then //Tauren Chieftain call ExecuteFunc("Start_Triple_Wave") call ExecuteFunc("Start_oyabun") endif if ( GetUnitTypeId(GetSoldUnit()) == 'O000' ) then //Enraged WildKin call ExecuteFunc("Start_The_law_of_the_jungle") endif if ( GetUnitTypeId(GetSoldUnit()) == 'H005' ) then //Archmage call ExecuteFunc("Start_Blizzard") call ExecuteFunc("Start_Swords_of_Revealing_Light") endif if ( GetUnitTypeId(GetSoldUnit()) == 'N000' ) then //John call ExecuteFunc("Start_Bakuniku") call ExecuteFunc("Start_BakunikuGet") call ExecuteFunc("Start_Muscle_Attack") call ExecuteFunc("Start_Muscle_Revolution") call ExecuteFunc("Start_YARANAIKA") endif if ( GetUnitTypeId(GetSoldUnit()) == 'H00B' ) then //Heavy Arms call ExecuteFunc("Start_Wild_Shot") call ExecuteFunc("Start_Destructive_Shot") endif if ( GetUnitTypeId(GetSoldUnit()) == 'H00V' ) then //Flandre call ExecuteFunc("Start_purge") call ExecuteFunc("Start_trap_Hero") call ExecuteFunc("Start_trap_Creep") endif if ( GetUnitTypeId(GetSoldUnit()) == 'H00W' ) then //Murloc Nightcrawler call ExecuteFunc("Start_Leap_Attack") endif if ( GetUnitTypeId(GetSoldUnit()) == 'N00Q' ) then //Earth Spirit call ExecuteFunc("Start_Endurance") call ExecuteFunc("Start_Vampire_Groan") endif if ( GetUnitTypeId(GetSoldUnit()) == 'U00K' ) then //Lich call ExecuteFunc("Start_Frost_Buster") endif endfunction function Start_Hero_Setup takes nothing returns nothing set gg_trg_Hero_Setup = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Hero_Setup, EVENT_PLAYER_UNIT_SELL ) call TriggerAddCondition( gg_trg_Hero_Setup, Condition( function Trig_Hero_Setup_Conditions ) ) call TriggerAddAction( gg_trg_Hero_Setup, function Trig_Hero_Setup_Actions ) endfunction function InitTrig_Hero_Setup takes nothing returns nothing endfunction//=========================================================================== // Trigger: AutoRevival //=========================================================================== function Trig_AutoRevival_Conditions takes nothing returns boolean return GetDyingUnit() == udg_PlayerX_Hero[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))] endfunction function Trig_AutoRevival_Actions takes nothing returns nothing local unit duni=GetDyingUnit() local integer num=GetConvertedPlayerId(GetOwningPlayer(duni)) call AdjustPlayerStateBJ( ( -30 * GetHeroLevel(duni) ), GetOwningPlayer(duni), PLAYER_STATE_RESOURCE_GOLD ) call StartTimerBJ( udg_AutoRevivalTimer[num], false, ( I2R(GetHeroLevel(duni)) * 4.00 ) ) call CreateTimerDialogBJ( udg_AutoRevivalTimer[num], "Revival Time" ) call TimerDialogDisplayBJ( false, GetLastCreatedTimerDialogBJ() ) set udg_AutoRevivalTimerWindow[num] = GetLastCreatedTimerDialogBJ() call TimerDialogDisplayForPlayerBJ( true, udg_AutoRevivalTimerWindow[num], GetOwningPlayer(duni) ) endfunction function Start_AutoRevival takes nothing returns nothing set gg_trg_AutoRevival = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_AutoRevival, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_AutoRevival, Condition( function Trig_AutoRevival_Conditions ) ) call TriggerAddAction( gg_trg_AutoRevival, function Trig_AutoRevival_Actions ) endfunction function InitTrig_AutoRevival takes nothing returns nothing endfunction//=========================================================================== // Trigger: AutoRevivalTimeOut2 //=========================================================================== function Trig_AutoRevivalTimeOut2_Conditions takes nothing returns boolean if ( not ( udg_GameEnd == 0 ) ) then return false endif return true endfunction function Trig_AutoRevivalTimeOut2_Actions takes nothing returns nothing call ReviveHeroLoc( udg_PlayerX_Hero[2], GetPlayerStartLocationLoc(Player(1)), true ) call SetUnitPositionLoc( GetRevivingUnit(), GetRectCenter(gg_rct_SENTINELS_Start) ) call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetRevivingUnit()), GetUnitLoc(GetRevivingUnit()), 0.00 ) call SetUnitManaBJ( GetRevivingUnit(), 0 ) call SelectUnitForPlayerSingle( GetRevivingUnit(), GetOwningPlayer(GetRevivingUnit()) ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[2] ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[2] ) endfunction //=========================================================================== function InitTrig_AutoRevivalTimeOut2 takes nothing returns nothing set gg_trg_AutoRevivalTimeOut2 = CreateTrigger( ) call TriggerRegisterTimerExpireEventBJ( gg_trg_AutoRevivalTimeOut2, udg_AutoRevivalTimer[2] ) call TriggerAddCondition( gg_trg_AutoRevivalTimeOut2, Condition( function Trig_AutoRevivalTimeOut2_Conditions ) ) call TriggerAddAction( gg_trg_AutoRevivalTimeOut2, function Trig_AutoRevivalTimeOut2_Actions ) endfunction //=========================================================================== // Trigger: AutoRevivalTimeOut3 //=========================================================================== function Trig_AutoRevivalTimeOut3_Conditions takes nothing returns boolean if ( not ( udg_GameEnd == 0 ) ) then return false endif return true endfunction function Trig_AutoRevivalTimeOut3_Actions takes nothing returns nothing call ReviveHeroLoc( udg_PlayerX_Hero[3], GetPlayerStartLocationLoc(Player(2)), true ) call SetUnitPositionLoc( GetRevivingUnit(), GetRectCenter(gg_rct_SENTINELS_Start) ) call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetRevivingUnit()), GetUnitLoc(GetRevivingUnit()), 0.00 ) call SetUnitManaBJ( GetRevivingUnit(), 0 ) call SelectUnitForPlayerSingle( GetRevivingUnit(), GetOwningPlayer(GetRevivingUnit()) ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[3] ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[3] ) endfunction //=========================================================================== function InitTrig_AutoRevivalTimeOut3 takes nothing returns nothing set gg_trg_AutoRevivalTimeOut3 = CreateTrigger( ) call TriggerRegisterTimerExpireEventBJ( gg_trg_AutoRevivalTimeOut3, udg_AutoRevivalTimer[3] ) call TriggerAddCondition( gg_trg_AutoRevivalTimeOut3, Condition( function Trig_AutoRevivalTimeOut3_Conditions ) ) call TriggerAddAction( gg_trg_AutoRevivalTimeOut3, function Trig_AutoRevivalTimeOut3_Actions ) endfunction //=========================================================================== // Trigger: AutoRevivalTimeOut4 //=========================================================================== function Trig_AutoRevivalTimeOut4_Conditions takes nothing returns boolean if ( not ( udg_GameEnd == 0 ) ) then return false endif return true endfunction function Trig_AutoRevivalTimeOut4_Actions takes nothing returns nothing call ReviveHeroLoc( udg_PlayerX_Hero[4], GetPlayerStartLocationLoc(Player(3)), true ) call SetUnitPositionLoc( GetRevivingUnit(), GetRectCenter(gg_rct_SENTINELS_Start) ) call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetRevivingUnit()), GetUnitLoc(GetRevivingUnit()), 0.00 ) call SetUnitManaBJ( GetRevivingUnit(), 0 ) call SelectUnitForPlayerSingle( GetRevivingUnit(), GetOwningPlayer(GetRevivingUnit()) ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[4] ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[4] ) endfunction //=========================================================================== function InitTrig_AutoRevivalTimeOut4 takes nothing returns nothing set gg_trg_AutoRevivalTimeOut4 = CreateTrigger( ) call TriggerRegisterTimerExpireEventBJ( gg_trg_AutoRevivalTimeOut4, udg_AutoRevivalTimer[4] ) call TriggerAddCondition( gg_trg_AutoRevivalTimeOut4, Condition( function Trig_AutoRevivalTimeOut4_Conditions ) ) call TriggerAddAction( gg_trg_AutoRevivalTimeOut4, function Trig_AutoRevivalTimeOut4_Actions ) endfunction //=========================================================================== // Trigger: AutoRevivalTimeOut5 //=========================================================================== function Trig_AutoRevivalTimeOut5_Conditions takes nothing returns boolean if ( not ( udg_GameEnd == 0 ) ) then return false endif return true endfunction function Trig_AutoRevivalTimeOut5_Actions takes nothing returns nothing call ReviveHeroLoc( udg_PlayerX_Hero[5], GetPlayerStartLocationLoc(Player(4)), true ) call SetUnitPositionLoc( GetRevivingUnit(), GetRectCenter(gg_rct_SENTINELS_Start) ) call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetRevivingUnit()), GetUnitLoc(GetRevivingUnit()), 0.00 ) call SetUnitManaBJ( GetRevivingUnit(), 0 ) call SelectUnitForPlayerSingle( GetRevivingUnit(), GetOwningPlayer(GetRevivingUnit()) ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[5] ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[5] ) endfunction //=========================================================================== function InitTrig_AutoRevivalTimeOut5 takes nothing returns nothing set gg_trg_AutoRevivalTimeOut5 = CreateTrigger( ) call TriggerRegisterTimerExpireEventBJ( gg_trg_AutoRevivalTimeOut5, udg_AutoRevivalTimer[5] ) call TriggerAddCondition( gg_trg_AutoRevivalTimeOut5, Condition( function Trig_AutoRevivalTimeOut5_Conditions ) ) call TriggerAddAction( gg_trg_AutoRevivalTimeOut5, function Trig_AutoRevivalTimeOut5_Actions ) endfunction //=========================================================================== // Trigger: AutoRevivalTimeOut6 //=========================================================================== function Trig_AutoRevivalTimeOut6_Conditions takes nothing returns boolean if ( not ( udg_GameEnd == 0 ) ) then return false endif return true endfunction function Trig_AutoRevivalTimeOut6_Actions takes nothing returns nothing call ReviveHeroLoc( udg_PlayerX_Hero[6], GetPlayerStartLocationLoc(Player(5)), true ) call SetUnitPositionLoc( GetRevivingUnit(), GetRectCenter(gg_rct_SENTINELS_Start) ) call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetRevivingUnit()), GetUnitLoc(GetRevivingUnit()), 0.00 ) call SetUnitManaBJ( GetRevivingUnit(), 0 ) call SelectUnitForPlayerSingle( GetRevivingUnit(), GetOwningPlayer(GetRevivingUnit()) ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[6] ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[6] ) endfunction //=========================================================================== function InitTrig_AutoRevivalTimeOut6 takes nothing returns nothing set gg_trg_AutoRevivalTimeOut6 = CreateTrigger( ) call TriggerRegisterTimerExpireEventBJ( gg_trg_AutoRevivalTimeOut6, udg_AutoRevivalTimer[6] ) call TriggerAddCondition( gg_trg_AutoRevivalTimeOut6, Condition( function Trig_AutoRevivalTimeOut6_Conditions ) ) call TriggerAddAction( gg_trg_AutoRevivalTimeOut6, function Trig_AutoRevivalTimeOut6_Actions ) endfunction //=========================================================================== // Trigger: AutoRevivalTimeOut8 //=========================================================================== function Trig_AutoRevivalTimeOut8_Conditions takes nothing returns boolean if ( not ( udg_GameEnd == 0 ) ) then return false endif return true endfunction function Trig_AutoRevivalTimeOut8_Actions takes nothing returns nothing call ReviveHeroLoc( udg_PlayerX_Hero[8], GetPlayerStartLocationLoc(Player(7)), true ) call SetUnitPositionLoc( GetRevivingUnit(), GetRectCenter(gg_rct_SCOURGES_Start) ) call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetRevivingUnit()), GetUnitLoc(GetRevivingUnit()), 0.00 ) call SetUnitManaBJ( GetRevivingUnit(), 0 ) call SelectUnitForPlayerSingle( GetRevivingUnit(), GetOwningPlayer(GetRevivingUnit()) ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[8] ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[8] ) endfunction //=========================================================================== function InitTrig_AutoRevivalTimeOut8 takes nothing returns nothing set gg_trg_AutoRevivalTimeOut8 = CreateTrigger( ) call TriggerRegisterTimerExpireEventBJ( gg_trg_AutoRevivalTimeOut8, udg_AutoRevivalTimer[8] ) call TriggerAddCondition( gg_trg_AutoRevivalTimeOut8, Condition( function Trig_AutoRevivalTimeOut8_Conditions ) ) call TriggerAddAction( gg_trg_AutoRevivalTimeOut8, function Trig_AutoRevivalTimeOut8_Actions ) endfunction //=========================================================================== // Trigger: AutoRevivalTimeOut9 //=========================================================================== function Trig_AutoRevivalTimeOut9_Conditions takes nothing returns boolean if ( not ( udg_GameEnd == 0 ) ) then return false endif return true endfunction function Trig_AutoRevivalTimeOut9_Actions takes nothing returns nothing call ReviveHeroLoc( udg_PlayerX_Hero[9], GetPlayerStartLocationLoc(Player(8)), true ) call SetUnitPositionLoc( GetRevivingUnit(), GetRectCenter(gg_rct_SCOURGES_Start) ) call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetRevivingUnit()), GetUnitLoc(GetRevivingUnit()), 0.00 ) call SetUnitManaBJ( GetRevivingUnit(), 0 ) call SelectUnitForPlayerSingle( GetRevivingUnit(), GetOwningPlayer(GetRevivingUnit()) ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[9] ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[9] ) endfunction //=========================================================================== function InitTrig_AutoRevivalTimeOut9 takes nothing returns nothing set gg_trg_AutoRevivalTimeOut9 = CreateTrigger( ) call TriggerRegisterTimerExpireEventBJ( gg_trg_AutoRevivalTimeOut9, udg_AutoRevivalTimer[9] ) call TriggerAddCondition( gg_trg_AutoRevivalTimeOut9, Condition( function Trig_AutoRevivalTimeOut9_Conditions ) ) call TriggerAddAction( gg_trg_AutoRevivalTimeOut9, function Trig_AutoRevivalTimeOut9_Actions ) endfunction //=========================================================================== // Trigger: AutoRevivalTimeOut10 //=========================================================================== function Trig_AutoRevivalTimeOut10_Conditions takes nothing returns boolean if ( not ( udg_GameEnd == 0 ) ) then return false endif return true endfunction function Trig_AutoRevivalTimeOut10_Actions takes nothing returns nothing call ReviveHeroLoc( udg_PlayerX_Hero[10], GetPlayerStartLocationLoc(Player(9)), true ) call SetUnitPositionLoc( GetRevivingUnit(), GetRectCenter(gg_rct_SCOURGES_Start) ) call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetRevivingUnit()), GetUnitLoc(GetRevivingUnit()), 0.00 ) call SetUnitManaBJ( GetRevivingUnit(), 0 ) call SelectUnitForPlayerSingle( GetRevivingUnit(), GetOwningPlayer(GetRevivingUnit()) ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[10] ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[10] ) endfunction //=========================================================================== function InitTrig_AutoRevivalTimeOut10 takes nothing returns nothing set gg_trg_AutoRevivalTimeOut10 = CreateTrigger( ) call TriggerRegisterTimerExpireEventBJ( gg_trg_AutoRevivalTimeOut10, udg_AutoRevivalTimer[10] ) call TriggerAddCondition( gg_trg_AutoRevivalTimeOut10, Condition( function Trig_AutoRevivalTimeOut10_Conditions ) ) call TriggerAddAction( gg_trg_AutoRevivalTimeOut10, function Trig_AutoRevivalTimeOut10_Actions ) endfunction //=========================================================================== // Trigger: AutoRevivalTimeOut11 //=========================================================================== function Trig_AutoRevivalTimeOut11_Conditions takes nothing returns boolean if ( not ( udg_GameEnd == 0 ) ) then return false endif return true endfunction function Trig_AutoRevivalTimeOut11_Actions takes nothing returns nothing call ReviveHeroLoc( udg_PlayerX_Hero[11], GetPlayerStartLocationLoc(Player(10)), true ) call SetUnitPositionLoc( GetRevivingUnit(), GetRectCenter(gg_rct_SCOURGES_Start) ) call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetRevivingUnit()), GetUnitLoc(GetRevivingUnit()), 0.00 ) call SetUnitManaBJ( GetRevivingUnit(), 0 ) call SelectUnitForPlayerSingle( GetRevivingUnit(), GetOwningPlayer(GetRevivingUnit()) ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[11] ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[11] ) endfunction //=========================================================================== function InitTrig_AutoRevivalTimeOut11 takes nothing returns nothing set gg_trg_AutoRevivalTimeOut11 = CreateTrigger( ) call TriggerRegisterTimerExpireEventBJ( gg_trg_AutoRevivalTimeOut11, udg_AutoRevivalTimer[11] ) call TriggerAddCondition( gg_trg_AutoRevivalTimeOut11, Condition( function Trig_AutoRevivalTimeOut11_Conditions ) ) call TriggerAddAction( gg_trg_AutoRevivalTimeOut11, function Trig_AutoRevivalTimeOut11_Actions ) endfunction //=========================================================================== // Trigger: AutoRevivalTimeOut12 //=========================================================================== function Trig_AutoRevivalTimeOut12_Conditions takes nothing returns boolean if ( not ( udg_GameEnd == 0 ) ) then return false endif return true endfunction function Trig_AutoRevivalTimeOut12_Actions takes nothing returns nothing call ReviveHeroLoc( udg_PlayerX_Hero[12], GetPlayerStartLocationLoc(Player(11)), true ) call SetUnitPositionLoc( GetRevivingUnit(), GetRectCenter(gg_rct_SCOURGES_Start) ) call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetRevivingUnit()), GetUnitLoc(GetRevivingUnit()), 0.00 ) call SetUnitManaBJ( GetRevivingUnit(), 0 ) call SelectUnitForPlayerSingle( GetRevivingUnit(), GetOwningPlayer(GetRevivingUnit()) ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[12] ) call DestroyTimerDialogBJ( udg_AutoRevivalTimerWindow[12] ) endfunction //=========================================================================== function InitTrig_AutoRevivalTimeOut12 takes nothing returns nothing set gg_trg_AutoRevivalTimeOut12 = CreateTrigger( ) call TriggerRegisterTimerExpireEventBJ( gg_trg_AutoRevivalTimeOut12, udg_AutoRevivalTimer[12] ) call TriggerAddCondition( gg_trg_AutoRevivalTimeOut12, Condition( function Trig_AutoRevivalTimeOut12_Conditions ) ) call TriggerAddAction( gg_trg_AutoRevivalTimeOut12, function Trig_AutoRevivalTimeOut12_Actions ) endfunction //=========================================================================== // Trigger: KillJudge //=========================================================================== function Trig_KillJudge_Conditions takes nothing returns boolean if ( not ( GetOwningPlayer(GetDyingUnit()) != GetOwningPlayer(GetKillingUnitBJ()) ) ) then return false endif if ( not ( IsUnitInForce(GetDyingUnit(), GetPlayersByMapControl(MAP_CONTROL_USER)) == true ) ) then return false endif return true endfunction function KillCount takes integer kpno returns integer if (kpno == 1) then return udg_Player01_Kill endif if (kpno == 2) then return udg_Player02_Kill endif if (kpno == 3) then return udg_Player03_Kill endif if (kpno == 4) then return udg_Player04_Kill endif if (kpno == 5) then return udg_Player05_Kill endif if (kpno == 7) then return udg_Player06_Kill endif if (kpno == 8) then return udg_Player07_Kill endif if (kpno == 9) then return udg_Player08_Kill endif if (kpno == 10) then return udg_Player09_Kill endif if (kpno == 11) then return udg_Player10_Kill endif return 0 endfunction function DeadCount takes integer dpno returns integer if (dpno == 1) then return udg_Player01_Dead endif if (dpno == 2) then return udg_Player02_Dead endif if (dpno == 3) then return udg_Player03_Dead endif if (dpno == 4) then return udg_Player04_Dead endif if (dpno == 5) then return udg_Player05_Dead endif if (dpno == 7) then return udg_Player06_Dead endif if (dpno == 8) then return udg_Player07_Dead endif if (dpno == 9) then return udg_Player08_Dead endif if (dpno == 10) then return udg_Player09_Dead endif if (dpno == 11) then return udg_Player10_Dead endif return 0 endfunction function Trig_KillJudge_Actions takes nothing returns nothing local integer sum=0 local integer playerx=GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))-1 local integer playery=GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))-1 // 1stBlood if ( udg_Flag_1st_Blood == false ) then call PlayThematicMusicBJ( "Sound\\Music\\mp3Music\\firstblood.mp3" ) call DisplayTextToForce( GetPlayersAll(), "|cffff0000First Blood!!|r" ) set sum=sum+200 set udg_Flag_1st_Blood = true endif // KillingSpree if ( KillCount(playerx) == 3 and DeadCount(playerx) == 0) then call PlayThematicMusicBJ( "Sound\\Music\\mp3Music\\Killing_Spree.mp3" ) call DisplayTextToForce( GetPlayersAll(), "|cffff0000KillingSpree!!|r" ) endif if ( KillCount(playery) == 3 and DeadCount(playery) == 1 ) then set sum=sum+50 endif // Dominating if ( KillCount(playerx) == 4 and DeadCount(playerx) == 0 ) then call PlayThematicMusicBJ( "Sound\\Music\\mp3Music\\Dominating.mp3" ) call DisplayTextToForce( GetPlayersAll(), "|cffff0000Dominating!!|r" ) endif if ( KillCount(playery) == 4 and DeadCount(playery) == 1 ) then set sum=sum+100 endif // MegaKill if ( KillCount(playerx) == 5 and DeadCount(playerx) == 0 ) then call PlayThematicMusicBJ( "Sound\\Music\\mp3Music\\MegaKill.mp3" ) call DisplayTextToForce( GetPlayersAll(), "|cffff0000MegaKill!!|r" ) endif if ( KillCount(playery) == 5 and DeadCount(playery) == 1 ) then set sum=sum+150 endif // Unstoppable if ( KillCount(playerx) == 6 and DeadCount(playerx) == 0 ) then call PlayThematicMusicBJ( "Sound\\Music\\mp3Music\\Unstoppable.mp3" ) call DisplayTextToForce( GetPlayersAll(), "|cffff0000Unstoppable!!|r" ) endif if ( KillCount(playery) == 6 and DeadCount(playery) == 1 ) then set sum=sum+200 endif // WickedSick if ( KillCount(playerx) == 7 and DeadCount(playerx) == 0 ) then call PlayThematicMusicBJ( "Sound\\Music\\mp3Music\\WhickedSick.mp3" ) call DisplayTextToForce( GetPlayersAll(), "|cffff0000WhickedSick!!|r" ) endif if ( KillCount(playery) == 7 and DeadCount(playery) == 1 ) then set sum=sum+250 endif // MonsterKill if ( KillCount(playerx) == 8 and DeadCount(playerx) == 0 ) then call PlayThematicMusicBJ( "Sound\\Music\\mp3Music\\MonsterKill.mp3" ) call DisplayTextToForce( GetPlayersAll(), "|cffff0000MonsterKill!!|r" ) endif if ( KillCount(playery) == 8 and DeadCount(playery) == 1 ) then set sum=sum+300 endif // GODLIKE if ( KillCount(playerx) == 9 and DeadCount(playerx) == 0 ) then call PlayThematicMusicBJ( "Sound\\Music\\mp3Music\\GodLike.mp3" ) call DisplayTextToForce( GetPlayersAll(), "|cffff0000GodLike!!|r" ) endif if ( KillCount(playery) == 9 and DeadCount(playery) == 1 ) then set sum=sum+350 endif // HolyShit if ( KillCount(playerx) == 10 and DeadCount(playerx) == 0 ) then call PlayThematicMusicBJ( "Sound\\Music\\mp3Music\\HolyShit.mp3" ) call DisplayTextToForce( GetPlayersAll(), "|cffff0000HolyShit!!|r" ) endif if ( KillCount(playery) >= 10 and DeadCount(playery) == 1 ) then set sum=sum+400 endif set sum=sum+200+( GetHeroLevel(GetDyingUnit()) * 5 ) call DisplayTextToForce( GetPlayersAll(), ColorGet(playerx) + GetPlayerName(GetOwningPlayer(GetKillingUnitBJ())) + "|r" + " just pawned " + ColorGet(playery) + GetPlayerName(GetOwningPlayer(GetDyingUnit())) + "'s|r head for an extra " + I2S(sum) + " |cffffff00Gold|r!!" ) call AdjustPlayerStateBJ(sum, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_GOLD ) endfunction //=========================================================================== function InitTrig_KillJudge takes nothing returns nothing set gg_trg_KillJudge = CreateTrigger( ) call TriggerAddCondition( gg_trg_KillJudge, Condition( function Trig_KillJudge_Conditions ) ) call TriggerAddAction( gg_trg_KillJudge, function Trig_KillJudge_Actions ) endfunction//=========================================================================== // Trigger: SetNeutralCreeps // // ナãƒãƒ¥ãƒ©ãƒ«è¿½åŠ æ³E // call SetNeutralCreeps( 'n017' , 'n015' , 'n015' , '0' , '0' ) // ・編æˆã‚’引数㸠// ・ãªã—ãE0を代入 //=========================================================================== function SetNeutralCreeps takes integer u1,integer u2,integer u3,integer u4,integer u5 returns nothing if(u1 != 0)then set udg_NeutralCreeps1[udg_X] = u1 endif if(u2 != 0)then set udg_NeutralCreeps2[udg_X] = u2 endif if(u3 != 0)then set udg_NeutralCreeps3[udg_X] = u3 endif if(u4 != 0)then set udg_NeutralCreeps4[udg_X] = u4 endif if(u5 != 0)then set udg_NeutralCreeps5[udg_X] = u5 endif set udg_X = udg_X+1 endfunction function PutNeutralCreeps takes nothing returns nothing set udg_X=1 call SetNeutralCreeps( 'ngns' , 'ngns' , 'ngns' , '0' , '0' ) call SetNeutralCreeps( 'nkol' , 'nkot' , 'nkob' , 'nkob' , 'nkob' ) call SetNeutralCreeps( 'nrog' , 'nrog' , 'nass' , '0' , '0' ) call SetNeutralCreeps( 'ntka' , 'ntkf' , 'ntkf' , '0' , '0' ) call SetNeutralCreeps( 'nfsh' , 'nftb' , 'nftb' , '0' , '0' ) call SetNeutralCreeps( 'nwwf' , 'nwlg' , 'nwlg' , '0' , '0' ) call SetNeutralCreeps( 'ngst' , 'ngst' , '0' , '0' , '0' ) call SetNeutralCreeps( 'nomg' , 'nogm' , 'nogm' , '0' , '0' ) call SetNeutralCreeps( 'nstl' , 'nstl' , 'nsat' , 'nsat' , '0' ) call SetNeutralCreeps( 'ncen' , 'ncnk' , '0' , '0' , '0' ) call SetNeutralCreeps( 'nfrg' , 'nfra' , '0' , '0' , '0' ) call SetNeutralCreeps( 'nhrw' , 'nhrw' , 'nhrh' , '0' , '0' ) call SetNeutralCreeps( 'nowb' , 'nowb' , 'nowe' , '0' , '0' ) call SetNeutralCreeps( 'ndtw' , 'ndtr' , 'ndtr' , '0' , '0' ) call SetNeutralCreeps( 'nsth' , 'nstl' , 'nsat' , '0' , '0' ) call SetNeutralCreeps( 'nbds' , 'nbds' , 'nbdo' , '0' , '0' ) call SetNeutralCreeps( 'nbwm' , 'nbdk' , 'nbdk' , '0' , '0' ) call SetNeutralCreeps( 'nggr' , 'ngst' , 'ngst' , '0' , '0' ) call SetNeutralCreeps( 'nbld' , 'nenf' , 'nenf' , '0' , '0' ) call SetNeutralCreeps( 'ntrs' , 'ntrs' , 'ntrg' , '0' , '0' ) endfunction function InitTrig_SetNeutralCreeps takes nothing returns nothing set gg_trg_SetNeutralCreeps = CreateTrigger( ) call PutNeutralCreeps() endfunction//=========================================================================== // Trigger: NeutralCreep_StartUp //=========================================================================== function PopNeutral takes integer x, rect loc returns nothing if(udg_NeutralCreeps1[x] != null)then call CreateNUnitsAtLoc( 1, udg_NeutralCreeps1[x], Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(loc), bj_UNIT_FACING ) endif if(udg_NeutralCreeps2[x] != null)then call CreateNUnitsAtLoc( 1, udg_NeutralCreeps2[x], Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(loc), bj_UNIT_FACING ) endif if(udg_NeutralCreeps3[x] != null)then call CreateNUnitsAtLoc( 1, udg_NeutralCreeps3[x], Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(loc), bj_UNIT_FACING ) endif if(udg_NeutralCreeps4[x] != null)then call CreateNUnitsAtLoc( 1, udg_NeutralCreeps4[x], Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(loc), bj_UNIT_FACING ) endif if(udg_NeutralCreeps5[x] != null)then call CreateNUnitsAtLoc( 1, udg_NeutralCreeps5[x], Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(loc), bj_UNIT_FACING ) endif endfunction function Sentinel1 takes nothing returns nothing local integer x=GetRandomInt(11, 15) if(CountUnitsInGroup(GetUnitsInRangeOfLocAll(600.00, GetRectCenter(gg_rct_SE_Natural_Creep_1))) == 0)then call PopNeutral(x,gg_rct_SE_Natural_Creep_1) endif endfunction function Sentinel2 takes nothing returns nothing local integer x=GetRandomInt(1, 5) if(CountUnitsInGroup(GetUnitsInRangeOfLocAll(600.00, GetRectCenter(gg_rct_SE_Natural_Creep_2))) == 0)then call PopNeutral(x,gg_rct_SE_Natural_Creep_2) endif endfunction function Sentinel3 takes nothing returns nothing local integer x=GetRandomInt(11, 15) if(CountUnitsInGroup(GetUnitsInRangeOfLocAll(600.00, GetRectCenter(gg_rct_SE_Natural_Creep_3))) == 0)then call PopNeutral(x,gg_rct_SE_Natural_Creep_3) endif endfunction function Sentinel4 takes nothing returns nothing local integer x=GetRandomInt(6, 10) if(CountUnitsInGroup(GetUnitsInRangeOfLocAll(600.00, GetRectCenter(gg_rct_SE_Natural_Creep_4))) == 0)then call PopNeutral(x,gg_rct_SE_Natural_Creep_4) endif endfunction function Sentinel5 takes nothing returns nothing local integer x=GetRandomInt(6, 10) if(CountUnitsInGroup(GetUnitsInRangeOfLocAll(600.00, GetRectCenter(gg_rct_SE_Natural_Creep_5))) == 0)then call PopNeutral(x,gg_rct_SE_Natural_Creep_5) endif endfunction function Scourge1 takes nothing returns nothing local integer x=GetRandomInt(11, 15) if(CountUnitsInGroup(GetUnitsInRangeOfLocAll(600.00, GetRectCenter(gg_rct_SC_Natural_Creep_1))) == 0)then call PopNeutral(x,gg_rct_SC_Natural_Creep_1) endif endfunction function Scourge2 takes nothing returns nothing local integer x=GetRandomInt(6, 10) if(CountUnitsInGroup(GetUnitsInRangeOfLocAll(600.00, GetRectCenter(gg_rct_SC_Natural_Creep_2))) == 0)then call PopNeutral(x,gg_rct_SC_Natural_Creep_2) endif endfunction function Scourge3 takes nothing returns nothing local integer x=GetRandomInt(6, 10) if(CountUnitsInGroup(GetUnitsInRangeOfLocAll(600.00, GetRectCenter(gg_rct_SC_Natural_Creep_3))) == 0)then call PopNeutral(x,gg_rct_SC_Natural_Creep_3) endif endfunction function Scourge4 takes nothing returns nothing local integer x=GetRandomInt(1, 5) if(CountUnitsInGroup(GetUnitsInRangeOfLocAll(600.00, GetRectCenter(gg_rct_SC_Natural_Creep_4))) == 0)then call PopNeutral(x,gg_rct_SC_Natural_Creep_4) endif endfunction function Scourge5 takes nothing returns nothing local integer x=GetRandomInt(11, 15) if(CountUnitsInGroup(GetUnitsInRangeOfLocAll(600.00, GetRectCenter(gg_rct_SC_Natural_Creep_5))) == 0)then call PopNeutral(x,gg_rct_SC_Natural_Creep_5) endif endfunction function SeBig takes nothing returns nothing local integer x=GetRandomInt(16, 20) if(CountUnitsInGroup(GetUnitsInRangeOfLocAll(600.00, GetRectCenter(gg_rct_SE_Natural_BigCreep))) == 0)then call PopNeutral(x,gg_rct_SE_Natural_BigCreep) endif endfunction function ScBig takes nothing returns nothing local integer x=GetRandomInt(16, 20) if(CountUnitsInGroup(GetUnitsInRangeOfLocAll(600.00, GetRectCenter(gg_rct_SC_Natural_BigCreep))) == 0)then call PopNeutral(x,gg_rct_SC_Natural_BigCreep) endif endfunction function NeutralCreep_StartUp_Actions takes nothing returns nothing local timer se1=CreateTimer() local timer se2=CreateTimer() local timer se3=CreateTimer() local timer se4=CreateTimer() local timer se5=CreateTimer() local timer sc1=CreateTimer() local timer sc2=CreateTimer() local timer sc3=CreateTimer() local timer sc4=CreateTimer() local timer sc5=CreateTimer() local timer seG=CreateTimer() local timer scG=CreateTimer() call TimerStart(se1,60,true,function Sentinel1) call TimerStart(se2,60,true,function Sentinel2) call TimerStart(se3,60,true,function Sentinel3) call TimerStart(se4,60,true,function Sentinel4) call TimerStart(se5,60,true,function Sentinel5) call TimerStart(sc1,60,true,function Scourge1) call TimerStart(sc2,60,true,function Scourge2) call TimerStart(sc3,60,true,function Scourge3) call TimerStart(sc4,60,true,function Scourge4) call TimerStart(sc5,60,true,function Scourge5) call TimerStart(seG,60,true,function SeBig) call TimerStart(scG,60,true,function ScBig) endfunction function NeutralCreep_StartUp takes nothing returns nothing set gg_trg_NeutralCreep_StartUp=CreateTrigger() call NeutralCreep_StartUp_Actions() endfunction function InitTrig_NeutralCreep_StartUp takes nothing returns nothing endfunction//=========================================================================== // Trigger: CreepDeny // // ゲームスタートã«ãƒªãƒ³ã‚¯ //=========================================================================== function Trig_CreepDeny_Conditions takes nothing returns boolean if ( not ( IsUnitAlly(GetDyingUnit(), GetOwningPlayer(GetKillingUnitBJ())) == true ) ) then return false endif if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == false ) ) then return false endif return true endfunction function Trig_CreepDeny_Actions takes nothing returns nothing local integer playerx=GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))-1 call PutText(ColorGet(playerx) + "!|r",GetUnitLoc(GetDyingUnit()) ) endfunction function Start_CreepDeny takes nothing returns nothing set gg_trg_CreepDeny = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_CreepDeny, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_CreepDeny, Condition( function Trig_CreepDeny_Conditions ) ) call TriggerAddAction( gg_trg_CreepDeny, function Trig_CreepDeny_Actions ) endfunction function InitTrig_CreepDeny takes nothing returns nothing endfunction//=========================================================================== // Trigger: DenyFlag // // ゲームスタートã«ãƒªãƒ³ã‚¯ //=========================================================================== function Trig_DenyFlag_Conditions takes nothing returns boolean return IsUnitAlly(GetAttacker(), GetOwningPlayer(GetAttackedUnitBJ())) == true endfunction function Trig_DenyFlag_Actions takes nothing returns nothing local real thp=GetUnitStateSwap(UNIT_STATE_LIFE, GetAttackedUnitBJ()) local real xhp=GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetAttackedUnitBJ()) if ( GetAttackedUnitBJ() == gg_unit_etol_0006 or GetAttackedUnitBJ() == gg_unit_unpl_0073 ) then call IssueImmediateOrder( GetAttacker(), "stop" ) else if ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == true ) then if ( thp >= ( xhp * 0.10 ) ) then call IssueImmediateOrder( GetAttacker(), "stop" ) endif else if ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_HERO) == true ) then if ( thp >= ( xhp * 0.05 ) ) then call IssueImmediateOrder( GetAttacker(), "stop" ) endif else if ( thp >= ( xhp * 0.50 ) ) then call IssueImmediateOrder( GetAttacker(), "stop" ) endif endif endif endif endfunction function Start_DenyFlag takes nothing returns nothing set gg_trg_DenyFlag = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_DenyFlag, EVENT_PLAYER_UNIT_ATTACKED ) call TriggerAddCondition( gg_trg_DenyFlag, Condition( function Trig_DenyFlag_Conditions ) ) call TriggerAddAction( gg_trg_DenyFlag, function Trig_DenyFlag_Actions ) endfunction function InitTrig_DenyFlag takes nothing returns nothing endfunction//=========================================================================== // Trigger: LvUP Creep // // åˆæœŸåŒ–ã§ãƒªãƒ³ã‚¯ //=========================================================================== function Trig_LvUP_Creep_Actions takes nothing returns nothing if ( GetPlayerTechCountSimple('Resw', Player(0)) <= 20 ) then call SetPlayerTechResearchedSwap( 'Resw', udg_CreepLv, Player(0) ) call SetPlayerTechResearchedSwap( 'Resw', udg_CreepLv, Player(1) ) call SetPlayerTechResearchedSwap( 'Resw', udg_CreepLv, Player(2) ) call SetPlayerTechResearchedSwap( 'Resw', udg_CreepLv, Player(3) ) call SetPlayerTechResearchedSwap( 'Resw', udg_CreepLv, Player(4) ) call SetPlayerTechResearchedSwap( 'Resw', udg_CreepLv, Player(5) ) call SetPlayerTechResearchedSwap( 'Resw', udg_CreepLv, Player(6) ) call SetPlayerTechResearchedSwap( 'Resw', udg_CreepLv, Player(7) ) call SetPlayerTechResearchedSwap( 'Resw', udg_CreepLv, Player(8) ) call SetPlayerTechResearchedSwap( 'Resw', udg_CreepLv, Player(9) ) call SetPlayerTechResearchedSwap( 'Resw', udg_CreepLv, Player(10) ) call SetPlayerTechResearchedSwap( 'Resw', udg_CreepLv, Player(11) ) endif if ( GetPlayerTechCountSimple('Rura', Player(6)) <= 20 ) then call SetPlayerTechResearchedSwap( 'Rura', udg_CreepLv, Player(0) ) call SetPlayerTechResearchedSwap( 'Rura', udg_CreepLv, Player(1) ) call SetPlayerTechResearchedSwap( 'Rura', udg_CreepLv, Player(2) ) call SetPlayerTechResearchedSwap( 'Rura', udg_CreepLv, Player(3) ) call SetPlayerTechResearchedSwap( 'Rura', udg_CreepLv, Player(4) ) call SetPlayerTechResearchedSwap( 'Rura', udg_CreepLv, Player(5) ) call SetPlayerTechResearchedSwap( 'Rura', udg_CreepLv, Player(6) ) call SetPlayerTechResearchedSwap( 'Rura', udg_CreepLv, Player(7) ) call SetPlayerTechResearchedSwap( 'Rura', udg_CreepLv, Player(8) ) call SetPlayerTechResearchedSwap( 'Rura', udg_CreepLv, Player(9) ) call SetPlayerTechResearchedSwap( 'Rura', udg_CreepLv, Player(10) ) call SetPlayerTechResearchedSwap( 'Rura', udg_CreepLv, Player(11) ) endif if ( ModuloReal(I2R(udg_CreepLv), 3.00) == 0.00 ) then set udg_Creep_Count_Melee = ( udg_Creep_Count_Melee + 1 ) endif if ( ModuloReal(I2R(udg_CreepLv), 4.00) == 0.00 ) then set udg_Creep_Count_Range = ( udg_Creep_Count_Range + 1 ) endif if ( ModuloReal(I2R(udg_CreepLv), 5.00) == 0.00 ) then set udg_Creep_Count_Siege = ( udg_Creep_Count_Siege + 1 ) endif set udg_CreepLv = ( udg_CreepLv + 1 ) endfunction function InitTrig_LvUP_Creep takes nothing returns nothing set gg_trg_LvUP_Creep = CreateTrigger( ) call TriggerRegisterTimerEventPeriodic( gg_trg_LvUP_Creep, 450.00 ) call TriggerAddAction( gg_trg_LvUP_Creep, function Trig_LvUP_Creep_Actions ) endfunction//=========================================================================== // Trigger: DeadCount // // ゲームスタートã«ãƒªãƒ³ã‚¯ //=========================================================================== function Trig_DeadCount_Conditions takes nothing returns boolean return IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true endfunction function Trig_DeadCount_Actions takes nothing returns nothing local integer pno= GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))-1 if(pno == 1)then set udg_Player01_Dead = ( udg_Player01_Dead + 1 ) return endif if(pno == 2)then set udg_Player02_Dead = ( udg_Player02_Dead + 1 ) return endif if(pno == 3)then set udg_Player03_Dead = ( udg_Player03_Dead + 1 ) return endif if(pno == 4)then set udg_Player04_Dead = ( udg_Player04_Dead + 1 ) return endif if(pno == 5)then set udg_Player05_Dead = ( udg_Player05_Dead + 1 ) return endif if(pno == 7)then set udg_Player06_Dead = ( udg_Player06_Dead + 1 ) return endif if(pno == 8)then set udg_Player07_Dead = ( udg_Player07_Dead + 1 ) return endif if(pno == 9)then set udg_Player08_Dead = ( udg_Player08_Dead + 1 ) return endif if(pno == 10)then set udg_Player09_Dead = ( udg_Player09_Dead + 1 ) return endif if(pno == 11)then set udg_Player10_Dead = ( udg_Player10_Dead + 1 ) return endif endfunction function Start_DeadCount takes nothing returns nothing set gg_trg_DeadCount = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_DeadCount, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_DeadCount, Condition( function Trig_DeadCount_Conditions ) ) call TriggerAddAction( gg_trg_DeadCount, function Trig_DeadCount_Actions ) endfunction function InitTrig_DeadCount takes nothing returns nothing endfunction//=========================================================================== // Trigger: Player1 Kill // // 変数PlayerX_Creep å†E¨³ // 0=LH, 1=Deny, 2=Neutral // ゲームスタートã«ãƒªãƒ³ã‚¯ //=========================================================================== function Trig_Player1_Kill_Conditions takes nothing returns boolean return GetOwningPlayer(GetKillingUnitBJ()) == Player(1) endfunction function Trig_Player1_Kill_Actions takes nothing returns nothing if ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) then set udg_Player01_Kill = udg_Player01_Kill + 1 call ConditionalTriggerExecute( gg_trg_KillJudge ) return endif if(GetOwningPlayer(GetDyingUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE)) then set udg_Player01_Creep[2] = udg_Player01_Creep[2] + 1 else if(IsUnitEnemy(GetDyingUnit(), GetOwningPlayer(GetKillingUnitBJ())) == true) then set udg_Player01_Creep[0] = udg_Player01_Creep[0] + 1 else set udg_Player01_Creep[1] = udg_Player01_Creep[1] + 1 endif endif endfunction function Start_Player1_Kill takes nothing returns nothing set gg_trg_Player1_Kill = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Player1_Kill, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_Player1_Kill, Condition( function Trig_Player1_Kill_Conditions ) ) call TriggerAddAction( gg_trg_Player1_Kill, function Trig_Player1_Kill_Actions ) endfunction function InitTrig_Player1_Kill takes nothing returns nothing endfunction//=========================================================================== // Trigger: Player2 Kill // // 変数PlayerX_Creep å†E¨³ // 0=LH, 1=Deny, 2=Neutral //=========================================================================== function Trig_Player2_Kill_Conditions takes nothing returns boolean return GetOwningPlayer(GetKillingUnitBJ()) == Player(2) endfunction function Trig_Player2_Kill_Actions takes nothing returns nothing if ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) then set udg_Player02_Kill = udg_Player02_Kill + 1 call ConditionalTriggerExecute( gg_trg_KillJudge ) return endif if(GetOwningPlayer(GetDyingUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE)) then set udg_Player02_Creep[2] = udg_Player02_Creep[2] + 1 else if(IsUnitEnemy(GetDyingUnit(), GetOwningPlayer(GetKillingUnitBJ())) == true) then set udg_Player02_Creep[0] = udg_Player02_Creep[0] + 1 else set udg_Player02_Creep[1] = udg_Player02_Creep[1] + 1 endif endif endfunction function Start_Player2_Kill takes nothing returns nothing set gg_trg_Player2_Kill = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Player2_Kill, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_Player2_Kill, Condition( function Trig_Player2_Kill_Conditions ) ) call TriggerAddAction( gg_trg_Player2_Kill, function Trig_Player2_Kill_Actions ) endfunction function InitTrig_Player2_Kill takes nothing returns nothing endfunction//=========================================================================== // Trigger: Player3 Kill // // 変数PlayerX_Creep å†E¨³ // 0=LH, 1=Deny, 2=Neutral //=========================================================================== function Trig_Player3_Kill_Conditions takes nothing returns boolean return GetOwningPlayer(GetKillingUnitBJ()) == Player(3) endfunction function Trig_Player3_Kill_Actions takes nothing returns nothing if ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) then set udg_Player03_Kill = udg_Player03_Kill + 1 call ConditionalTriggerExecute( gg_trg_KillJudge ) return endif if(GetOwningPlayer(GetDyingUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE)) then set udg_Player03_Creep[2] = udg_Player03_Creep[2] + 1 else if(IsUnitEnemy(GetDyingUnit(), GetOwningPlayer(GetKillingUnitBJ())) == true) then set udg_Player03_Creep[0] = udg_Player03_Creep[0] + 1 else set udg_Player03_Creep[1] = udg_Player03_Creep[1] + 1 endif endif endfunction function Start_Player3_Kill takes nothing returns nothing set gg_trg_Player3_Kill = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Player3_Kill, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_Player3_Kill, Condition( function Trig_Player3_Kill_Conditions ) ) call TriggerAddAction( gg_trg_Player3_Kill, function Trig_Player3_Kill_Actions ) endfunction function InitTrig_Player3_Kill takes nothing returns nothing endfunction//=========================================================================== // Trigger: Player4 Kill // // 変数PlayerX_Creep å†E¨³ // 0=LH, 1=Deny, 2=Neutral //=========================================================================== function Trig_Player4_Kill_Conditions takes nothing returns boolean return GetOwningPlayer(GetKillingUnitBJ()) == Player(4) endfunction function Trig_Player4_Kill_Actions takes nothing returns nothing if ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) then set udg_Player04_Kill = udg_Player04_Kill + 1 call ConditionalTriggerExecute( gg_trg_KillJudge ) return endif if(GetOwningPlayer(GetDyingUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE)) then set udg_Player04_Creep[2] = udg_Player04_Creep[2] + 1 else if(IsUnitEnemy(GetDyingUnit(), GetOwningPlayer(GetKillingUnitBJ())) == true) then set udg_Player04_Creep[0] = udg_Player04_Creep[0] + 1 else set udg_Player04_Creep[1] = udg_Player04_Creep[1] + 1 endif endif endfunction function Start_Player4_Kill takes nothing returns nothing set gg_trg_Player4_Kill = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Player4_Kill, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_Player4_Kill, Condition( function Trig_Player4_Kill_Conditions ) ) call TriggerAddAction( gg_trg_Player4_Kill, function Trig_Player4_Kill_Actions ) endfunction function InitTrig_Player4_Kill takes nothing returns nothing endfunction//=========================================================================== // Trigger: Player5 Kill // // 変数PlayerX_Creep å†E¨³ // 0=LH, 1=Deny, 2=Neutral //=========================================================================== function Trig_Player5_Kill_Conditions takes nothing returns boolean return GetOwningPlayer(GetKillingUnitBJ()) == Player(5) endfunction function Trig_Player5_Kill_Actions takes nothing returns nothing if ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) then set udg_Player05_Kill = udg_Player05_Kill + 1 call ConditionalTriggerExecute( gg_trg_KillJudge ) return endif if(GetOwningPlayer(GetDyingUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE)) then set udg_Player05_Creep[2] = udg_Player05_Creep[2] + 1 else if(IsUnitEnemy(GetDyingUnit(), GetOwningPlayer(GetKillingUnitBJ())) == true) then set udg_Player05_Creep[0] = udg_Player05_Creep[0] + 1 else set udg_Player05_Creep[1] = udg_Player05_Creep[1] + 1 endif endif endfunction function Start_Player5_Kill takes nothing returns nothing set gg_trg_Player5_Kill = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Player5_Kill, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_Player5_Kill, Condition( function Trig_Player5_Kill_Conditions ) ) call TriggerAddAction( gg_trg_Player5_Kill, function Trig_Player5_Kill_Actions ) endfunction function InitTrig_Player5_Kill takes nothing returns nothing endfunction//=========================================================================== // Trigger: Player6 Kill // // 変数PlayerX_Creep å†E¨³ // 0=LH, 1=Deny, 2=Neutral //=========================================================================== function Trig_Player6_Kill_Conditions takes nothing returns boolean return GetOwningPlayer(GetKillingUnitBJ()) == Player(7) endfunction function Trig_Player6_Kill_Actions takes nothing returns nothing if ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) then set udg_Player06_Kill = udg_Player06_Kill + 1 call ConditionalTriggerExecute( gg_trg_KillJudge ) return endif if(GetOwningPlayer(GetDyingUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE)) then set udg_Player06_Creep[2] = udg_Player06_Creep[2] + 1 else if(IsUnitEnemy(GetDyingUnit(), GetOwningPlayer(GetKillingUnitBJ())) == true) then set udg_Player06_Creep[0] = udg_Player06_Creep[0] + 1 else set udg_Player06_Creep[1] = udg_Player06_Creep[1] + 1 endif endif endfunction function Start_Player6_Kill takes nothing returns nothing set gg_trg_Player6_Kill = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Player6_Kill, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_Player6_Kill, Condition( function Trig_Player6_Kill_Conditions ) ) call TriggerAddAction( gg_trg_Player6_Kill, function Trig_Player6_Kill_Actions ) endfunction function InitTrig_Player6_Kill takes nothing returns nothing endfunction//=========================================================================== // Trigger: Player7 Kill // // 変数PlayerX_Creep å†E¨³ // 0=LH, 1=Deny, 2=Neutral //=========================================================================== function Trig_Player7_Kill_Conditions takes nothing returns boolean return GetOwningPlayer(GetKillingUnitBJ()) == Player(8) endfunction function Trig_Player7_Kill_Actions takes nothing returns nothing if ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) then set udg_Player07_Kill = udg_Player07_Kill + 1 call ConditionalTriggerExecute( gg_trg_KillJudge ) return endif if(GetOwningPlayer(GetDyingUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE)) then set udg_Player07_Creep[2] = udg_Player07_Creep[2] + 1 else if(IsUnitEnemy(GetDyingUnit(), GetOwningPlayer(GetKillingUnitBJ())) == true) then set udg_Player07_Creep[0] = udg_Player07_Creep[0] + 1 else set udg_Player07_Creep[1] = udg_Player07_Creep[1] + 1 endif endif endfunction function Start_Player7_Kill takes nothing returns nothing set gg_trg_Player7_Kill = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Player7_Kill, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_Player7_Kill, Condition( function Trig_Player7_Kill_Conditions ) ) call TriggerAddAction( gg_trg_Player7_Kill, function Trig_Player7_Kill_Actions ) endfunction function InitTrig_Player7_Kill takes nothing returns nothing endfunction//=========================================================================== // Trigger: Player8 Kill // // 変数PlayerX_Creep å†E¨³ // 0=LH, 1=Deny, 2=Neutral //=========================================================================== function Trig_Player8_Kill_Conditions takes nothing returns boolean return GetOwningPlayer(GetKillingUnitBJ()) == Player(9) endfunction function Trig_Player8_Kill_Actions takes nothing returns nothing if ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) then set udg_Player08_Kill = udg_Player08_Kill + 1 call ConditionalTriggerExecute( gg_trg_KillJudge ) return endif if(GetOwningPlayer(GetDyingUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE)) then set udg_Player08_Creep[2] = udg_Player08_Creep[2] + 1 else if(IsUnitEnemy(GetDyingUnit(), GetOwningPlayer(GetKillingUnitBJ())) == true) then set udg_Player08_Creep[0] = udg_Player08_Creep[0] + 1 else set udg_Player08_Creep[1] = udg_Player08_Creep[1] + 1 endif endif endfunction function Start_Player8_Kill takes nothing returns nothing set gg_trg_Player8_Kill = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Player8_Kill, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_Player8_Kill, Condition( function Trig_Player8_Kill_Conditions ) ) call TriggerAddAction( gg_trg_Player8_Kill, function Trig_Player8_Kill_Actions ) endfunction function InitTrig_Player8_Kill takes nothing returns nothing endfunction//=========================================================================== // Trigger: Player9 Kill // // 変数PlayerX_Creep å†E¨³ // 0=LH, 1=Deny, 2=Neutral //=========================================================================== function Trig_Player9_Kill_Conditions takes nothing returns boolean return GetOwningPlayer(GetKillingUnitBJ()) == Player(10) endfunction function Trig_Player9_Kill_Actions takes nothing returns nothing if ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) then set udg_Player09_Kill = udg_Player09_Kill + 1 call ConditionalTriggerExecute( gg_trg_KillJudge ) return endif if(GetOwningPlayer(GetDyingUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE)) then set udg_Player09_Creep[2] = udg_Player09_Creep[2] + 1 else if(IsUnitEnemy(GetDyingUnit(), GetOwningPlayer(GetKillingUnitBJ())) == true) then set udg_Player09_Creep[0] = udg_Player09_Creep[0] + 1 else set udg_Player09_Creep[1] = udg_Player09_Creep[1] + 1 endif endif endfunction function Start_Player9_Kill takes nothing returns nothing set gg_trg_Player9_Kill = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Player9_Kill, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_Player9_Kill, Condition( function Trig_Player9_Kill_Conditions ) ) call TriggerAddAction( gg_trg_Player9_Kill, function Trig_Player9_Kill_Actions ) endfunction function InitTrig_Player9_Kill takes nothing returns nothing endfunction//=========================================================================== // Trigger: Player10 Kill // // 変数PlayerX_Creep å†E¨³ // 0=LH, 1=Deny, 2=Neutral //=========================================================================== function Trig_Player10_Kill_Conditions takes nothing returns boolean return GetOwningPlayer(GetKillingUnitBJ()) == Player(11) endfunction function Trig_Player10_Kill_Actions takes nothing returns nothing if ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) then set udg_Player10_Kill = udg_Player10_Kill + 1 call ConditionalTriggerExecute( gg_trg_KillJudge ) return endif if(GetOwningPlayer(GetDyingUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE)) then set udg_Player10_Creep[2] = udg_Player10_Creep[2] + 1 else if(IsUnitEnemy(GetDyingUnit(), GetOwningPlayer(GetKillingUnitBJ())) == true) then set udg_Player10_Creep[0] = udg_Player10_Creep[0] + 1 else set udg_Player10_Creep[1] = udg_Player10_Creep[1] + 1 endif endif endfunction function Start_Player10_Kill takes nothing returns nothing set gg_trg_Player10_Kill = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Player10_Kill, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_Player10_Kill, Condition( function Trig_Player10_Kill_Conditions ) ) call TriggerAddAction( gg_trg_Player10_Kill, function Trig_Player10_Kill_Actions ) endfunction function InitTrig_Player10_Kill takes nothing returns nothing endfunction//=========================================================================== // Trigger: HeroKill Creep // // ゲームスタートã«ãƒªãƒ³ã‚¯ //=========================================================================== function Trig_HeroKill_Creep_Conditions takes nothing returns boolean if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then return false endif if ( not ( IsUnitAlly(GetKillingUnitBJ(), GetOwningPlayer(GetDyingUnit())) == false ) ) then return false endif if ( GetOwningPlayer(GetKillingUnitBJ()) == Player(0) or GetOwningPlayer(GetKillingUnitBJ()) == Player(6) ) then return true endif return false endfunction function Trig_HeroKill_Creep_Func002Func001A takes nothing returns nothing call AdjustPlayerStateBJ( ( ( 100 + ( GetHeroLevel(GetDyingUnit()) * 5 ) ) / CountPlayersInForceBJ(GetPlayersAllies(Player(6))) ), GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD ) endfunction function Trig_HeroKill_Creep_Func002Func002A takes nothing returns nothing call AdjustPlayerStateBJ( ( ( 100 + ( GetHeroLevel(GetDyingUnit()) * 5 ) ) / CountPlayersInForceBJ(GetPlayersAllies(Player(0))) ), GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD ) endfunction function Trig_HeroKill_Creep_Actions takes nothing returns nothing local integer sum=100+( GetUnitLevel(GetDyingUnit()) * 5 ) local integer playery=GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))-1 if ( IsUnitAlly(GetDyingUnit(), Player(0)) == true ) then call ForForce( GetPlayersEnemies(GetOwningPlayer(GetDyingUnit())), function Trig_HeroKill_Creep_Func002Func002A ) call DisplayTextToForce( GetPlayersAll(), "Scourge just pawned " + ColorGet(playery) + GetPlayerName(GetOwningPlayer(GetDyingUnit())) + "'s|r head for an extra " + I2S(sum) + " |cffffff00Gold|r!!" ) else call ForForce( GetPlayersEnemies(GetOwningPlayer(GetDyingUnit())), function Trig_HeroKill_Creep_Func002Func001A ) call DisplayTextToForce( GetPlayersAll(), "Sentinel just pawned " + ColorGet(playery) + GetPlayerName(GetOwningPlayer(GetDyingUnit())) + "'s|r head for an extra " + I2S(sum) + " |cffffff00Gold|r!!" ) endif endfunction function Start_HeroKill_Creep takes nothing returns nothing set gg_trg_HeroKill_Creep = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_HeroKill_Creep, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_HeroKill_Creep, Condition( function Trig_HeroKill_Creep_Conditions ) ) call TriggerAddAction( gg_trg_HeroKill_Creep, function Trig_HeroKill_Creep_Actions ) endfunction function InitTrig_HeroKill_Creep takes nothing returns nothing endfunction//=========================================================================== // Trigger: Charges_Connection //=========================================================================== function Trig_Charges_Connection_Conditions takes nothing returns boolean return GetItemType(GetManipulatedItem())==ITEM_TYPE_PURCHASABLE endfunction function Trig_Charges_Connection_Actions takes nothing returns nothing local item lF3=GetManipulatedItem() local item lF4 local unit lfU=GetTriggerUnit() call DisableTrigger(GetTriggeringTrigger()) call UnitRemoveItem(lfU,lF3) set lF4=GetItemOfTypeFromUnitBJ(lfU,GetItemTypeId(lF3)) call UnitRemoveItem(lfU,lF4) call SetItemCharges(lF3,GetItemCharges(lF3)+GetItemCharges(lF4)) call RemoveItem(lF4) call UnitAddItem(lfU,lF3) call EnableTrigger(GetTriggeringTrigger()) endfunction function Start_Charges_Connection takes nothing returns nothing set gg_trg_Charges_Connection=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(gg_trg_Charges_Connection,EVENT_PLAYER_UNIT_PICKUP_ITEM) call TriggerAddCondition(gg_trg_Charges_Connection,Condition(function Trig_Charges_Connection_Conditions)) call TriggerAddAction(gg_trg_Charges_Connection,function Trig_Charges_Connection_Actions) endfunction function InitTrig_Charges_Connection takes nothing returns nothing endfunction//=========================================================================== // Trigger: Undroppable_Cooldowns //=========================================================================== function Trig_Undroppable_Cooldowns_Conditions takes nothing returns boolean if(GetItemTypeId(GetManipulatedItem())=='I01Z')then //Mask of Madness set udg_Item_CoolDown_Time=30. return true endif if(GetItemTypeId(GetManipulatedItem())=='I02T')then //Refresher Orb set udg_Item_CoolDown_Time=210 return true endif if(GetItemTypeId(GetManipulatedItem())=='I022')then //Mekansm set udg_Item_CoolDown_Time=45. return true endif if(GetItemTypeId(GetManipulatedItem())=='I02G')then //Necronomicon Level 2 set udg_Item_CoolDown_Time=90. return true endif if(GetItemTypeId(GetManipulatedItem())=='I02H')then //Necronomicon Level 1 set udg_Item_CoolDown_Time=90. return true endif if(GetItemTypeId(GetManipulatedItem())=='I06B')then //Hand of Midas set udg_Item_CoolDown_Time=100. return true endif if(GetItemTypeId(GetManipulatedItem())=='I02I')then //Necronomicon Level 3 set udg_Item_CoolDown_Time=90. return true endif if(GetItemTypeId(GetManipulatedItem())=='I02O')then //Satanic set udg_Item_CoolDown_Time=50. return true endif if(GetItemTypeId(GetManipulatedItem())=='I01X')then //Diffusal Blade set udg_Item_CoolDown_Time=12. return true endif if(GetItemTypeId(GetManipulatedItem())=='I020')then //Eul's Scepter of Divinity set udg_Item_CoolDown_Time=5 return true endif if(GetItemTypeId(GetManipulatedItem())=='I02C')then //Dagon 2 set udg_Item_CoolDown_Time=40. return true endif if(GetItemTypeId(GetManipulatedItem())=='I02P')then //Guinsoo's Scythe of Vyse set udg_Item_CoolDown_Time=23. return true endif if(GetItemTypeId(GetManipulatedItem())=='I01Y')then //Helm of the Dominator set udg_Item_CoolDown_Time=300. return true endif if(GetItemTypeId(GetManipulatedItem())=='I01L')then //Boots of Travel set udg_Item_CoolDown_Time=60. return true endif if(GetItemTypeId(GetManipulatedItem())=='I01J')then //Nathrezim Buckler set udg_Item_CoolDown_Time=25. return true endif if(GetItemTypeId(GetManipulatedItem())=='I02E')then //Dagon 4 set udg_Item_CoolDown_Time=40. return true endif if(GetItemTypeId(GetManipulatedItem())=='I00D')then //Scroll of Town Portal set udg_Item_CoolDown_Time=65. return true endif if(GetItemTypeId(GetManipulatedItem())=='I028')then //Manta Style set udg_Item_CoolDown_Time=70. return true endif if(GetItemTypeId(GetManipulatedItem())=='I02F')then //Dagon 5 set udg_Item_CoolDown_Time=40. return true endif if(GetItemTypeId(GetManipulatedItem())=='I02A')then //Linken's Sphere set udg_Item_CoolDown_Time=60. return true endif if(GetItemTypeId(GetManipulatedItem())=='I02B')then //Dagon 1 set udg_Item_CoolDown_Time=40. return true endif if(GetItemTypeId(GetManipulatedItem())=='I029')then //Lothar's Edge set udg_Item_CoolDown_Time=26. return true endif if(GetItemTypeId(GetManipulatedItem())=='I02D')then //Dagon 3 set udg_Item_CoolDown_Time=40. return true endif if(GetItemTypeId(GetManipulatedItem())=='I002')then //Kelen's Dagger of Escape set udg_Item_CoolDown_Time=25. return true endif if(GetItemTypeId(GetManipulatedItem())=='I00C')then set udg_Item_CoolDown_Time=60. return true endif if(GetItemTypeId(GetManipulatedItem())=='I02W')then //Mjollnir set udg_Item_CoolDown_Time=45. return true endif if(GetItemTypeId(GetManipulatedItem())=='I02V')then //Arcane Ring set udg_Item_CoolDown_Time=30. return true endif return false endfunction function Trig_Undroppable_Cooldowns_Actions takes nothing returns nothing local integer lEq=1 local integer lEQ=6 local integer lk5=GetItemTypeId(GetManipulatedItem()) local unit lk6=GetManipulatingUnit() loop exitwhen lEq>lEQ set udg_Item_Search_Counter=UnitItemInSlotBJ(lk6,lEq) if(GetItemTypeId(udg_Item_Search_Counter)==lk5)then set udg_Iitem_Array_Counter=(udg_Iitem_Array_Counter+1) set udg_Item_CoolDown_Time_Array[udg_Iitem_Array_Counter]=udg_Item_CoolDown_Time set udg_Item_Array[udg_Iitem_Array_Counter]=udg_Item_Search_Counter call SetItemDroppable(udg_Item_Search_Counter,false) endif set lEq=lEq+1 endloop endfunction function Start_Undroppable_Cooldowns takes nothing returns nothing set gg_trg_Undroppable_Cooldowns=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(gg_trg_Undroppable_Cooldowns,EVENT_PLAYER_UNIT_USE_ITEM) call TriggerAddCondition(gg_trg_Undroppable_Cooldowns,Condition(function Trig_Undroppable_Cooldowns_Conditions)) call TriggerAddAction(gg_trg_Undroppable_Cooldowns,function Trig_Undroppable_Cooldowns_Actions) endfunction function InitTrig_Undroppable_Cooldowns takes nothing returns nothing endfunction//=========================================================================== // Trigger: Reset_Droppable_Status //=========================================================================== function Trig_Reset_Droppable_Status_Actions takes nothing returns nothing local integer lEq=2 local integer lEQ=udg_Iitem_Array_Counter if(udg_Iitem_Array_Counter>0 and udg_Item_CoolDown_Time_Array[1]<1.)then loop exitwhen lEq>lEQ set udg_Item_CoolDown_Time_Array[lEq-1]=udg_Item_CoolDown_Time_Array[lEq] set udg_Item_Array[lEq-1]=udg_Item_Array[lEq] set lEq=lEq+1 endloop set udg_Iitem_Array_Counter=udg_Iitem_Array_Counter-1 endif set lEq=1 set lEQ=udg_Iitem_Array_Counter loop exitwhen lEq>lEQ if(udg_Item_CoolDown_Time_Array[lEq]>=1.)then set udg_Item_CoolDown_Time_Array[lEq]=udg_Item_CoolDown_Time_Array[lEq]-1 if(udg_Item_CoolDown_Time_Array[lEq]<1.)then call SetItemDroppable(udg_Item_Array[lEq],true) endif endif set lEq=lEq+1 endloop endfunction function Start_Reset_Droppable_Status takes nothing returns nothing set gg_trg_Reset_Droppable_Status=CreateTrigger() call TriggerRegisterTimerEventPeriodic(gg_trg_Reset_Droppable_Status,1.) call TriggerAddAction(gg_trg_Reset_Droppable_Status,function Trig_Reset_Droppable_Status_Actions) endfunction function InitTrig_Reset_Droppable_Status takes nothing returns nothing endfunction//=========================================================================== // Trigger: Try_Apply_Reciepe //=========================================================================== function kVkV takes unit pfo,integer pF3,integer pF4,integer pF5,integer pF6,integer pkB,integer pkw returns boolean local effect lkW if(pkw==1)then if(UnitHasItemOfTypeBJ(pfo,pF3))then call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF3)) call UnitAddItemById(pfo,pkB) return true endif endif if(pkw==2)then if(UnitHasItemOfTypeBJ(pfo,pF3))then if(UnitHasItemOfTypeBJ(pfo,pF4))then call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF3)) call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF4)) set lkW=AddSpecialEffectTargetUnitBJ("origin",pfo,"Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl") call UnitAddItemById(pfo,pkB) call DestroyEffect(lkW) return true endif endif endif if(pkw==3)then if(UnitHasItemOfTypeBJ(pfo,pF3))then if(UnitHasItemOfTypeBJ(pfo,pF4))then if(UnitHasItemOfTypeBJ(pfo,pF5))then call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF3)) call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF4)) call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF5)) set lkW=AddSpecialEffectTargetUnitBJ("origin",pfo,"Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl") call UnitAddItemById(pfo,pkB) call DestroyEffect(lkW) return true endif endif endif endif if(pkw==4)then if(UnitHasItemOfTypeBJ(pfo,pF3))then if(UnitHasItemOfTypeBJ(pfo,pF4))then if(UnitHasItemOfTypeBJ(pfo,pF5))then if(UnitHasItemOfTypeBJ(pfo,pF6))then call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF3)) call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF4)) call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF5)) call RemoveItem(GetItemOfTypeFromUnitBJ(pfo,pF6)) set lkW=AddSpecialEffectTargetUnitBJ("origin",pfo,"Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl") call UnitAddItemById(pfo,pkB) call DestroyEffect(lkW) return true endif endif endif endif endif return false endfunction function Trig_Try_Apply_Reciepe_Actions takes nothing returns nothing local unit lfo=GetTriggerUnit() local integer lEq=1 local integer lEQ=udg_Reciepes_MaxCount loop exitwhen lEq>lEQ if(kVkV(lfo,udg_Reciepe_Item1[lEq],udg_Reciepe_Item2[lEq],udg_Reciepe_Item3[lEq],udg_Reciepe_Item4[lEq],udg_Reciepe_Result[lEq],udg_Reciepe_lenght[lEq]))then set lEq=lEQ+1 endif set lEq=lEq+1 endloop endfunction function Start_Try_Apply_Reciepe takes nothing returns nothing set gg_trg_Try_Apply_Reciepe=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(gg_trg_Try_Apply_Reciepe,EVENT_PLAYER_UNIT_PICKUP_ITEM) call TriggerAddAction(gg_trg_Try_Apply_Reciepe,function Trig_Try_Apply_Reciepe_Actions) endfunction function InitTrig_Try_Apply_Reciepe takes nothing returns nothing endfunction//=========================================================================== // Trigger: Specific_Reciepes //=========================================================================== function Trig_Specific_Reciepes_Actions takes nothing returns nothing local unit lfo=GetTriggerUnit() local integer lEq=0 local integer lk2=0 local item lRuneTempItem1 local item lRuneTempItem2 local item lRuneTempItem3 local item lkf call DisableTrigger(GetTriggeringTrigger()) loop exitwhen lEq>5 if(GetItemTypeId(UnitItemInSlot(lfo,lEq))=='I00T')then set lk2=lk2+1 endif set lEq=lEq+1 endloop if lk2>1 and GetItemOfTypeFromUnitBJ(lfo,'I04V')!=null then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",lfo,"origin")) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I04V')) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I00T')) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I00T')) call UnitAddItemById(lfo,'I024') endif set lk2=0 set lEq=0 loop exitwhen lEq>5 if(GetItemTypeId(UnitItemInSlot(lfo,lEq))=='I007')then set lk2=lk2+1 endif set lEq=lEq+1 endloop if lk2>1 and GetItemOfTypeFromUnitBJ(lfo,'I019')!=null and GetItemOfTypeFromUnitBJ(lfo,'I05H')!=null then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",lfo,"origin")) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I019')) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I05H')) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I007')) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I007')) call UnitAddItemById(lfo,'I02R') endif set lk2=0 set lEq=0 loop exitwhen lEq>5 if(GetItemTypeId(UnitItemInSlot(lfo,lEq))=='I00N')then set lk2=lk2+1 endif set lEq=lEq+1 endloop if lk2>1 and GetItemOfTypeFromUnitBJ(lfo,'I00S')!=null and GetItemOfTypeFromUnitBJ(lfo,'I05A')!=null then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",lfo,"origin")) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I00S')) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I05A')) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I00N')) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I00N')) call UnitAddItemById(lfo,'I029') endif set lk2=0 set lEq=0 loop exitwhen lEq>5 if(GetItemTypeId(UnitItemInSlot(lfo,lEq))=='I001')then set lk2=lk2+1 endif set lEq=lEq+1 endloop if lk2>1 and GetItemOfTypeFromUnitBJ(lfo,'I00X')!=null and GetItemOfTypeFromUnitBJ(lfo,'I00Y')!=null then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",lfo,"origin")) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I00X')) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I00Y')) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I001')) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I001')) call UnitAddItemById(lfo,'I030') endif set lk2=0 set lEq=0 loop exitwhen lEq>5 if(GetItemTypeId(UnitItemInSlot(lfo,lEq))=='I05Y')then set lk2=lk2+1 endif set lEq=lEq+1 endloop if lk2>1 and GetItemOfTypeFromUnitBJ(lfo,'I010')!=null then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",lfo,"origin")) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I010')) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I05Y')) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I05Y')) call UnitAddItemById(lfo,'I02J') endif set lk2=0 set lEq=0 loop exitwhen lEq>5 if(GetItemTypeId(UnitItemInSlot(lfo,lEq))=='I01O')then set lk2=lk2+1 endif set lEq=lEq+1 endloop if lk2>2 and GetItemOfTypeFromUnitBJ(lfo,'I01O')!=null then call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl",lfo,"origin")) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I01O')) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I01O')) call RemoveItem(GetItemOfTypeFromUnitBJ(lfo,'I01O')) call UnitAddItemById(lfo,'I060') endif call EnableTrigger(GetTriggeringTrigger()) endfunction function Start_Specific_Reciepes takes nothing returns nothing set gg_trg_Specific_Reciepes=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(gg_trg_Specific_Reciepes,EVENT_PLAYER_UNIT_PICKUP_ITEM) call TriggerAddAction(gg_trg_Specific_Reciepes,function Trig_Specific_Reciepes_Actions) endfunction function InitTrig_Specific_Reciepes takes nothing returns nothing endfunction//=========================================================================== // Trigger: SetUpReciepes // // 関数F8F8 //  引数('ç´ æï¼E,'ç´ æï¼E,'ç´ æï¼E,'ç´ æï¼E.'完æEå“E) を引ã渡ã—ã¦é…åEã«æ ¼ç´åEçE€€(ç´ æãªã—ãE0) //=========================================================================== function F2F2 takes integer pF3,integer pF4,integer pF5,integer pF6,integer pF7 returns nothing set udg_Reciepe_Item1[udg_Reciepes_Counter]=pF3 set udg_Reciepe_Item2[udg_Reciepes_Counter]=pF4 set udg_Reciepe_Item3[udg_Reciepes_Counter]=pF5 set udg_Reciepe_Item4[udg_Reciepes_Counter]=pF6 set udg_Reciepe_Result[udg_Reciepes_Counter]=pF7 set udg_Reciepe_lenght[udg_Reciepes_Counter]=4 if(pF3==0)then set udg_Reciepe_lenght[udg_Reciepes_Counter]=udg_Reciepe_lenght[udg_Reciepes_Counter]-1 endif if(pF4==0)then set udg_Reciepe_lenght[udg_Reciepes_Counter]=udg_Reciepe_lenght[udg_Reciepes_Counter]-1 endif if(pF5==0)then set udg_Reciepe_lenght[udg_Reciepes_Counter]=udg_Reciepe_lenght[udg_Reciepes_Counter]-1 endif if(pF6==0)then set udg_Reciepe_lenght[udg_Reciepes_Counter]=udg_Reciepe_lenght[udg_Reciepes_Counter]-1 endif set udg_Reciepes_Counter=udg_Reciepes_Counter+1 set udg_Reciepes_MaxCount=udg_Reciepes_Counter endfunction function F8F8 takes nothing returns nothing set udg_Reciepes_Counter=1 call F2F2('I04W','I01Y','I012',0,'I02O')//Satanic call F2F2('I017','I016','I007',0,'I02P')//Guinsoo's Scythe of Vyse call F2F2('I051','I005','I004','I00I','I01M')//Power TreadsS call F2F2('I051','I005','I004','I00J','I05W')//Power TreadsA call F2F2('I051','I005','I004','I00K','I05X')//Power TreadsI call F2F2('I00L','I052','I00G',0,'I01R')//Null Talisman call F2F2('I00E','I00L','I05O',0,'I01P')//Bracer call F2F2('I00L','I00F','I04S',0,'I01Q')//Wraith Band call F2F2('I00R','I00K','I003',0,'I01O')//Oblivion Staff call F2F2('I010','I013','I00S',0,'I02K')//Divine Rapier call F2F2('I00H','I00V','I054',0,'I01J')//Nathrezim Buckler call F2F2('I05J','I00N','I00K',0,'I01X')//Diffusal Blade call F2F2('I00U','I003',0,0,'I01K') //Ring of Basilius call F2F2('I00X','I000',0,0,'I01Y') //Helm of the Dominator call F2F2('I01I','I00Q','I00S',0,'I025')//Battle Fury call F2F2('I05L','I00Q','I00P',0,'I026')//Crystalys call F2F2('I016','I015',0,0,'I01I') //Perseverance call F2F2('I016','I00O','I00K','I05I','I020')//Eul's Scepter of Divinity call F2F2('I000','I057',0,0,'I01Z') //Mask of Madness call F2F2('I018','I019','I01A',0,'I021')//Soul Booster call F2F2('I01O','I01I','I04Z',0,'I02T')//Refresher Orb call F2F2('I00Q','I00M','I05R',0,'I027')//Black King Bar call F2F2('I013','I050',0,0,'I02M') //Radiance call F2F2('I00O','I00P','I05K',0,'I02B')//Dagon 1 call F2F2('I02B','I05K',0,0,'I02C') //Dagon 2 call F2F2('I02C','I05K',0,0,'I02D') //Dagon 3 call F2F2('I02D','I05K',0,0,'I02E') //Dagon 4 call F2F2('I02E','I05K',0,0,'I02F') //Dagon 5 call F2F2('I005','I05P',0,0,'I01L') //Boots of Travel call F2F2('I00H','I001','I05D',0,'I01H')//Headdress of Rejuvenation call F2F2('I00V','I00P','I05Q',0,'I01V')//Blade Mail call F2F2('I05E','I004',0,0,'I06B') //Hand of Midas call F2F2('I05B','I01I','I007',0,'I02A')//Linken's Sphere call F2F2('I056','I01H','I01J',0,'I022')//Mekansm call F2F2('I00J','I00T','I059',0,'I01W')//Maelstrom call F2F2('I01X','I058','I01A',0,'I028')//Manta Style call F2F2('I00I','I00O','I053',0,'I02H')//Necronomicon Level 1 call F2F2('I02H','I053',0,0,'I02G') //Necronomicon Level 2 call F2F2('I02G','I053',0,0,'I02I') //Necronomicon Level 3 call F2F2('I00Z','I015','I01A',0,'I02U')//Vanguard call F2F2('I05T','I018','I00U',0,'I02V')//Arcane Ring call F2F2('I011','I01W',0,0,'I02W') //Mjollnir call F2F2('I01K','I000','I04T','I001','I02X')//Vladmir's Offering call F2F2('I00W','I00V','I014','I05S','I02Y')//Assault Cuirass call F2F2('I021','I01I',0,0,'I02Z') //Bloodstone call F2F2('I015','I00Y','I00X',0,'I030')//Hood of Defiance call F2F2('I01B','I05G',0,0,'I031') //Flying Courier call F2F2('I04X','I00M','I00I',0,'I01T')//Sange call F2F2('I04R','I00N','I00J',0,'I01S')//Yasha call F2F2('I01T','I01S','I04Y',0,'I023')//Sange and Yasha call F2F2('I021','I017',0,0,'I02S') //Aghanim's Scepter call F2F2('I00T','I00E','I05M',0,'I01U')//Cranium Basher(melee) call F2F2('I011','I00R','I04U',0,'I02Q')//The Butterfly call F2F2('I012','I01A','I05C',0,'I02N')//Heart of Tarrasque call F2F2('I026','I010','I05N',0,'I02L')//Buriza-do Kyanon call F2F2('I017','I00W','I062',0,'I05Z')//Shiva's Guard call F2F2('I00X','I00P','I004','I068','I065')//Armlet of Mordiggian call F2F2('I01V','I02U','I06D',0,'I061')//Spike Shield //call F2F2('I01S','I06B','I010',0,'I06E')//Special Sord call F2F2('I01P','I01R','I01Q','I06G','I007')//Ultimate Orb call F2F2('I01A','I019','I007',0,'I06K')//Magatama call F2F2('I04A',0,0,0,'I05T') call F2F2('I04E',0,0,0,'I05S') call F2F2('I03T',0,0,0,'I05R') call F2F2('I03H',0,0,0,'I05Q') call F2F2('I037',0,0,0,'I05P') call F2F2('I03B',0,0,0,'I05O') call F2F2('I040',0,0,0,'I05N') call F2F2('I03G',0,0,0,'I05M') call F2F2('I03S',0,0,0,'I05L') call F2F2('I03W',0,0,0,'I05K') call F2F2('I03J',0,0,0,'I05J') call F2F2('I03M',0,0,0,'I05I') call F2F2('I045',0,0,0,'I05H') call F2F2('I04C',0,0,0,'I05G') call F2F2('I039',0,0,0,'I05E') call F2F2('I035',0,0,0,'I05D') call F2F2('I043',0,0,0,'I05C') call F2F2('I03Y',0,0,0,'I05B') call F2F2('I03V',0,0,0,'I05A') call F2F2('I03I',0,0,0,'I059') call F2F2('I03U',0,0,0,'I058') call F2F2('I03L',0,0,0,'I057') call F2F2('I03O',0,0,0,'I056') call F2F2('I033',0,0,0,'I054') call F2F2('I03X',0,0,0,'I053') call F2F2('I03D',0,0,0,'I052') call F2F2('I038',0,0,0,'I051') call F2F2('I042',0,0,0,'I050') call F2F2('I048',0,0,0,'I04Z') call F2F2('I03P',0,0,0,'I04Y') call F2F2('I03F',0,0,0,'I04X') call F2F2('I044',0,0,0,'I04W') call F2F2('I03Q',0,0,0,'I04V') call F2F2('I046',0,0,0,'I04U') call F2F2('I04D',0,0,0,'I04T') call F2F2('I03C',0,0,0,'I04S') call F2F2('I03E',0,0,0,'I04R') call F2F2('I063',0,0,0,'I062')//Shiva's Guard Recipi call F2F2('I067',0,0,0,'I068')//Armlet of Mordiggian Recipi call F2F2('I06C',0,0,0,'I06D')//Spike Shield Recipi call F2F2('I06H',0,0,0,'I06G')//Ultimate Orb Recipi endfunction function Start_SetUpReciepes takes nothing returns nothing set gg_trg_SetUpReciepes = CreateTrigger( ) call F8F8() endfunction function InitTrig_SetUpReciepes takes nothing returns nothing endfunction//=========================================================================== // Trigger: Rune //=========================================================================== function Trig_Rune_Conditions takes nothing returns boolean if ( not ( GetItemTypeId(RandomItemInRectSimpleBJ(RectFromCenterSizeBJ(GetRectCenter(gg_rct_Left_Rune), 300.00, 300.00))) != 'I04J' ) ) then return false endif if ( not ( GetItemTypeId(RandomItemInRectSimpleBJ(RectFromCenterSizeBJ(GetRectCenter(gg_rct_Left_Rune), 300.00, 300.00))) != 'I04L' ) ) then return false endif if ( not ( GetItemTypeId(RandomItemInRectSimpleBJ(RectFromCenterSizeBJ(GetRectCenter(gg_rct_Left_Rune), 300.00, 300.00))) != 'I04I' ) ) then return false endif if ( not ( GetItemTypeId(RandomItemInRectSimpleBJ(RectFromCenterSizeBJ(GetRectCenter(gg_rct_Left_Rune), 300.00, 300.00))) != 'I04K' ) ) then return false endif if ( not ( GetItemTypeId(RandomItemInRectSimpleBJ(RectFromCenterSizeBJ(GetRectCenter(gg_rct_Left_Rune), 300.00, 300.00))) != 'I04M' ) ) then return false endif if ( not ( GetItemTypeId(RandomItemInRectSimpleBJ(RectFromCenterSizeBJ(GetRectCenter(gg_rct_Right_Rune), 300.00, 300.00))) != 'I04J' ) ) then return false endif if ( not ( GetItemTypeId(RandomItemInRectSimpleBJ(RectFromCenterSizeBJ(GetRectCenter(gg_rct_Right_Rune), 300.00, 300.00))) != 'I04L' ) ) then return false endif if ( not ( GetItemTypeId(RandomItemInRectSimpleBJ(RectFromCenterSizeBJ(GetRectCenter(gg_rct_Right_Rune), 300.00, 300.00))) != 'I04I' ) ) then return false endif if ( not ( GetItemTypeId(RandomItemInRectSimpleBJ(RectFromCenterSizeBJ(GetRectCenter(gg_rct_Right_Rune), 300.00, 300.00))) != 'I04K' ) ) then return false endif if ( not ( GetItemTypeId(RandomItemInRectSimpleBJ(RectFromCenterSizeBJ(GetRectCenter(gg_rct_Right_Rune), 300.00, 300.00))) != 'I04M' ) ) then return false endif return true endfunction function Trig_Rune_Func012C takes nothing returns boolean if ( not ( GetRandomInt(1, 10) <= 5 ) ) then return false endif return true endfunction function Trig_Rune_Actions takes nothing returns nothing if ( Trig_Rune_Func012C() ) then call CreateItemLoc( udg_Rune[GetRandomInt(0, 4)], GetRectCenter(gg_rct_Left_Rune) ) else call CreateItemLoc( udg_Rune[GetRandomInt(0, 4)], GetRectCenter(gg_rct_Right_Rune) ) endif endfunction //=========================================================================== function InitTrig_Rune takes nothing returns nothing set gg_trg_Rune = CreateTrigger( ) call TriggerRegisterTimerEventPeriodic( gg_trg_Rune, 120.00 ) call TriggerAddCondition( gg_trg_Rune, Condition( function Trig_Rune_Conditions ) ) call TriggerAddAction( gg_trg_Rune, function Trig_Rune_Actions ) endfunction //=========================================================================== // Trigger: RuneTimeout // // ボトルタイマãE2åˆE‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒE // タイムアウトã—ãŸã‘ã©å¯¾è±¡ãƒœãƒˆãƒ«ãŒNull値 = 処çEªãE // 対象ボトルã«æ‰€æœ‰è€E‚ã‚E= 全ユニット検索→所æŒè€E«ãƒœãƒˆãƒ«å¼·åˆ¶ä½¿ç”¨å‘½ä»¤ // 対象ボトルã«æ‰€æŒè€EªãE= BottleFullã«å·®ã—替ãE //=========================================================================== function Trig_Bottle_in_Rune_Func012001002 takes nothing returns boolean return ( UnitHasItem(GetFilterUnit(), udg_Bottle_in_Rune[udg_X]) == true ) endfunction function Trig_Bottle_in_Rune_Func012A takes nothing returns nothing call UnitUseItem( GetEnumUnit(), udg_Bottle_in_Rune[udg_X] ) endfunction function Trig_RuneTimeout_Actions takes nothing returns nothing local integer btl=10 loop exitwhen btl<=0 if(TimerGetRemaining(udg_Bottle_in_Rune_Timer[btl]) <= 0.00 and udg_Bottle_in_Rune[btl] != null) then if(CheckItemStatus(udg_Bottle_in_Rune[btl], bj_ITEM_STATUS_OWNED) == true) then set udg_X = btl call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Bottle_in_Rune_Func012001002)), function Trig_Bottle_in_Rune_Func012A ) else //call CreateItemLoc( 'I01C', GetItemLoc(udg_Bottle_in_Rune[btl]) ) //call RemoveItem( udg_Bottle_in_Rune[btl] ) endif set btl=0 else set btl=btl-1 endif endloop endfunction //=========================================================================== function InitTrig_RuneTimeout takes nothing returns nothing set gg_trg_RuneTimeout = CreateTrigger( ) call TriggerRegisterTimerExpireEventBJ( gg_trg_RuneTimeout, udg_Bottle_in_Rune_Timer[0] ) call TriggerRegisterTimerExpireEventBJ( gg_trg_RuneTimeout, udg_Bottle_in_Rune_Timer[1] ) call TriggerRegisterTimerExpireEventBJ( gg_trg_RuneTimeout, udg_Bottle_in_Rune_Timer[2] ) call TriggerRegisterTimerExpireEventBJ( gg_trg_RuneTimeout, udg_Bottle_in_Rune_Timer[3] ) call TriggerRegisterTimerExpireEventBJ( gg_trg_RuneTimeout, udg_Bottle_in_Rune_Timer[4] ) call TriggerRegisterTimerExpireEventBJ( gg_trg_RuneTimeout, udg_Bottle_in_Rune_Timer[5] ) call TriggerRegisterTimerExpireEventBJ( gg_trg_RuneTimeout, udg_Bottle_in_Rune_Timer[6] ) call TriggerRegisterTimerExpireEventBJ( gg_trg_RuneTimeout, udg_Bottle_in_Rune_Timer[7] ) call TriggerRegisterTimerExpireEventBJ( gg_trg_RuneTimeout, udg_Bottle_in_Rune_Timer[8] ) call TriggerRegisterTimerExpireEventBJ( gg_trg_RuneTimeout, udg_Bottle_in_Rune_Timer[9] ) call TriggerRegisterTimerExpireEventBJ( gg_trg_RuneTimeout, udg_Bottle_in_Rune_Timer[10] ) call TriggerAddAction( gg_trg_RuneTimeout, function Trig_RuneTimeout_Actions ) endfunction //=========================================================================== // Trigger: Bottle Control // // ボトル使用時ãEé·ç§» // Fullâ†E/3â†E/3→空 // Runeâ†E/3â†E/3→空 //=========================================================================== function Trig_Bottle_Control_Func005C takes nothing returns boolean if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01C' ) ) then return true endif if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01D' ) ) then return true endif if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01E' ) ) then return true endif if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01F' ) ) then return true endif if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01G' ) ) then return true endif if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04Q' ) ) then return true endif if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04N' ) ) then return true endif if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04O' ) ) then return true endif if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04P' ) ) then return true endif return false endfunction function Trig_Bottle_Control_Conditions takes nothing returns boolean if ( not Trig_Bottle_Control_Func005C() ) then return false endif return true endfunction function Trig_Bottle_Control_Func001C takes nothing returns boolean if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01C' ) ) then return false endif return true endfunction function Trig_Bottle_Control_Func002C takes nothing returns boolean if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01D' ) ) then return false endif return true endfunction function Trig_Bottle_Control_Func003C takes nothing returns boolean if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01E' ) ) then return false endif return true endfunction function Trig_Bottle_Control_Func004Func001C takes nothing returns boolean if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01G' ) ) then return true endif if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04Q' ) ) then return true endif if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04N' ) ) then return true endif if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04O' ) ) then return true endif if ( ( GetItemTypeId(GetManipulatedItem()) == 'I04P' ) ) then return true endif return false endfunction function Trig_Bottle_Control_Func004Func004C takes nothing returns boolean if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I04O' ) ) then return false endif return true endfunction function Trig_Bottle_Control_Func004Func005C takes nothing returns boolean if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I04N' ) ) then return false endif return true endfunction function Trig_Bottle_Control_Func004C takes nothing returns boolean if ( not Trig_Bottle_Control_Func004Func001C() ) then return false endif return true endfunction function Trig_Bottle_Control_Actions takes nothing returns nothing if ( Trig_Bottle_Control_Func001C() ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I01D', GetTriggerUnit() ) return else endif if ( Trig_Bottle_Control_Func002C() ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I01E', GetTriggerUnit() ) return else endif if ( Trig_Bottle_Control_Func003C() ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I01F', GetTriggerUnit() ) return else endif if ( Trig_Bottle_Control_Func004C() ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I01D', GetTriggerUnit() ) if ( Trig_Bottle_Control_Func004Func004C() ) then call CreateNUnitsAtLoc( 1, 'h006', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call UnitAddAbilityBJ( 'A06Z', GetLastCreatedUnit() ) call IssueTargetOrder( GetLastCreatedUnit(), "invisibility", GetManipulatingUnit() ) else endif if ( Trig_Bottle_Control_Func004Func005C() ) then call CreateNUnitsAtLoc( 1, 'h006', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call UnitAddAbilityBJ( 'A06W', GetLastCreatedUnit() ) call IssueTargetOrderById( GetLastCreatedUnit(), String2OrderIdBJ("heal"), GetManipulatingUnit() ) else endif else endif endfunction //=========================================================================== function InitTrig_Bottle_Control takes nothing returns nothing set gg_trg_Bottle_Control = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Bottle_Control, EVENT_PLAYER_UNIT_USE_ITEM ) call TriggerAddCondition( gg_trg_Bottle_Control, Condition( function Trig_Bottle_Control_Conditions ) ) call TriggerAddAction( gg_trg_Bottle_Control, function Trig_Bottle_Control_Actions ) endfunction //=========================================================================== // Trigger: Bottle Control2 // // 空ボトル使用時ãEåˆE²E //=========================================================================== function Trig_Bottle_Control2_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A06Q' ) ) then return false endif return true endfunction function Trig_Bottle_Control2_Func002Func001C takes nothing returns boolean if ( not ( GetItemTypeId(GetSpellTargetItem()) == 'I04J' ) ) then return false endif return true endfunction function Trig_Bottle_Control2_Func002Func002C takes nothing returns boolean if ( not ( GetItemTypeId(GetSpellTargetItem()) == 'I04L' ) ) then return false endif return true endfunction function Trig_Bottle_Control2_Func002Func003C takes nothing returns boolean if ( not ( GetItemTypeId(GetSpellTargetItem()) == 'I04I' ) ) then return false endif return true endfunction function Trig_Bottle_Control2_Func002Func004C takes nothing returns boolean if ( not ( GetItemTypeId(GetSpellTargetItem()) == 'I04K' ) ) then return false endif return true endfunction function Trig_Bottle_Control2_Func002Func005C takes nothing returns boolean if ( not ( GetItemTypeId(GetSpellTargetItem()) == 'I04M' ) ) then return false endif return true endfunction function Trig_Bottle_Control2_Func002Func008001 takes nothing returns boolean return ( GetSpellTargetUnit() == gg_unit_n003_0051 ) endfunction function Trig_Bottle_Control2_Func002Func008002 takes nothing returns boolean return ( GetSpellTargetUnit() == gg_unit_n004_0001 ) endfunction function Trig_Bottle_Control2_Func002C takes nothing returns boolean if ( not GetBooleanOr( Trig_Bottle_Control2_Func002Func008001(), Trig_Bottle_Control2_Func002Func008002() ) ) then return false endif return true endfunction function Trig_Bottle_Control2_Actions takes nothing returns nothing if ( Trig_Bottle_Control2_Func002C() ) then call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I01F') ) call UnitAddItemByIdSwapped( 'I01C', GetTriggerUnit() ) else if ( Trig_Bottle_Control2_Func002Func001C() ) then call RemoveItem( GetSpellTargetItem() ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I01F') ) call UnitAddItemByIdSwapped( 'I01G', GetTriggerUnit() ) call ConditionalTriggerExecute( gg_trg_Bottle_in_Rune ) else endif if ( Trig_Bottle_Control2_Func002Func002C() ) then call RemoveItem( GetSpellTargetItem() ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I01F') ) call UnitAddItemByIdSwapped( 'I04Q', GetTriggerUnit() ) call ConditionalTriggerExecute( gg_trg_Bottle_in_Rune ) else endif if ( Trig_Bottle_Control2_Func002Func003C() ) then call RemoveItem( GetSpellTargetItem() ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I01F') ) call UnitAddItemByIdSwapped( 'I04N', GetTriggerUnit() ) call ConditionalTriggerExecute( gg_trg_Bottle_in_Rune ) else endif if ( Trig_Bottle_Control2_Func002Func004C() ) then call RemoveItem( GetSpellTargetItem() ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I01F') ) call UnitAddItemByIdSwapped( 'I04O', GetTriggerUnit() ) call ConditionalTriggerExecute( gg_trg_Bottle_in_Rune ) else endif if ( Trig_Bottle_Control2_Func002Func005C() ) then call RemoveItem( GetSpellTargetItem() ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I01F') ) call UnitAddItemByIdSwapped( 'I04P', GetTriggerUnit() ) call ConditionalTriggerExecute( gg_trg_Bottle_in_Rune ) else endif endif endfunction //=========================================================================== function InitTrig_Bottle_Control2 takes nothing returns nothing set gg_trg_Bottle_Control2 = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Bottle_Control2, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Bottle_Control2, Condition( function Trig_Bottle_Control2_Conditions ) ) call TriggerAddAction( gg_trg_Bottle_Control2, function Trig_Bottle_Control2_Actions ) endfunction //=========================================================================== // Trigger: Bottle in Rune // // アイãƒEƒ é…åEã«å¯¾è±¡ãƒ«ãƒ¼ãƒ³æ ¼ç´E // 2åˆEEタイマãEé–‹å§E // 空ãè¦ç´ ã¯ãƒ’ãEプソーãƒE //=========================================================================== function Trig_Bottle_in_Rune_Actions takes nothing returns nothing local integer btl=10 loop exitwhen btl<=0 if(TimerGetRemaining(udg_Bottle_in_Rune_Timer[btl]) <= 0.00) then set udg_Bottle_in_Rune[btl] = GetLastCreatedItem() call StartTimerBJ( udg_Bottle_in_Rune_Timer[btl], false, 120.00 ) set btl=0 else set btl=btl-1 endif endloop endfunction //=========================================================================== function InitTrig_Bottle_in_Rune takes nothing returns nothing set gg_trg_Bottle_in_Rune = CreateTrigger( ) call TriggerAddAction( gg_trg_Bottle_in_Rune, function Trig_Bottle_in_Rune_Actions ) endfunction //=========================================================================== // Trigger: Cranium Basher Flag //=========================================================================== function Trig_Cranium_Basher_Flag_Conditions takes nothing returns boolean if ( ( GetItemTypeId(GetManipulatedItem()) == 'I01U' ) ) then return true endif if ( ( GetItemTypeId(GetManipulatedItem()) == 'I032' ) ) then return true endif return false endfunction function Trig_Cranium_Basher_Flag_Actions takes nothing returns nothing if ( GetItemTypeId(GetManipulatedItem()) == 'I01U' and GetUnitDefaultAcquireRange(GetManipulatingUnit()) >= 600.00 ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I032', GetManipulatingUnit() ) elseif( GetItemTypeId(GetManipulatedItem()) == 'I032' and GetUnitDefaultAcquireRange(GetManipulatingUnit()) < 600.00 ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I01U', GetManipulatingUnit() ) endif endfunction function Start_Cranium_Basher_Flag takes nothing returns nothing set gg_trg_Cranium_Basher_Flag = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Cranium_Basher_Flag, EVENT_PLAYER_UNIT_PICKUP_ITEM ) call TriggerAddCondition( gg_trg_Cranium_Basher_Flag, Condition( function Trig_Cranium_Basher_Flag_Conditions ) ) call TriggerAddAction( gg_trg_Cranium_Basher_Flag, function Trig_Cranium_Basher_Flag_Actions ) endfunction function InitTrig_Cranium_Basher_Flag takes nothing returns nothing endfunction//=========================================================================== // Trigger: Eye of Skadi Flag //=========================================================================== function Trig_Eye_of_Skadi_Flag_Conditions takes nothing returns boolean if ( ( GetItemTypeId(GetManipulatedItem()) == 'I064' ) ) then return true endif if ( ( GetItemTypeId(GetManipulatedItem()) == 'I02R' ) ) then return true endif return false endfunction function Trig_Eye_of_Skadi_Flag_Actions takes nothing returns nothing if ( GetItemTypeId(GetManipulatedItem()) == 'I064' and GetUnitDefaultAcquireRange(GetManipulatingUnit()) >= 600.00 ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I02R', GetManipulatingUnit() ) elseif( GetItemTypeId(GetManipulatedItem()) == 'I02R' and GetUnitDefaultAcquireRange(GetManipulatingUnit()) < 600.00 ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I064', GetManipulatingUnit() ) endif endfunction function Start_Eye_of_Skadi_Flag takes nothing returns nothing set gg_trg_Eye_of_Skadi_Flag = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Eye_of_Skadi_Flag, EVENT_PLAYER_UNIT_PICKUP_ITEM ) call TriggerAddCondition( gg_trg_Eye_of_Skadi_Flag, Condition( function Trig_Eye_of_Skadi_Flag_Conditions ) ) call TriggerAddAction( gg_trg_Eye_of_Skadi_Flag, function Trig_Eye_of_Skadi_Flag_Actions ) endfunction function InitTrig_Eye_of_Skadi_Flag takes nothing returns nothing endfunction//=========================================================================== // Trigger: Refresher_Orb //=========================================================================== function Trig_Refresher_Orb_Conditions takes nothing returns boolean return GetSpellAbilityId()=='A09N' endfunction function Trig_Refresher_Orb_Actions takes nothing returns nothing call UnitResetCooldown(GetTriggerUnit()) endfunction function Start_Refresher_Orb takes nothing returns nothing set gg_trg_Refresher_Orb=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(gg_trg_Refresher_Orb,EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddCondition(gg_trg_Refresher_Orb,Condition(function Trig_Refresher_Orb_Conditions)) call TriggerAddAction(gg_trg_Refresher_Orb,function Trig_Refresher_Orb_Actions) endfunction function InitTrig_Refresher_Orb takes nothing returns nothing endfunction//=========================================================================== // Trigger: Aghanims Scepter //=========================================================================== function Trig_Aghanims_Scepter_Conditions takes nothing returns boolean if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I02S' ) ) then return false endif if ( not ( IsUnitType(GetManipulatingUnit(), UNIT_TYPE_HERO) == true ) ) then return false endif return true endfunction function Trig_Aghanims_Scepter_Func001C takes nothing returns boolean if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H000' ) ) then return false endif return true endfunction function Trig_Aghanims_Scepter_Func002C takes nothing returns boolean if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00B' ) ) then return false endif return true endfunction function Trig_Aghanims_Scepter_Func003C takes nothing returns boolean if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'E00D' ) ) then return false endif return true endfunction function Trig_Aghanims_Scepter_Func004C takes nothing returns boolean if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'Uwar' ) ) then return false endif return true endfunction function Trig_Aghanims_Scepter_Func005C takes nothing returns boolean if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'Umal' ) ) then return false endif return true endfunction function Trig_Aghanims_Scepter_Func006C takes nothing returns boolean if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'Hant' ) ) then return false endif return true endfunction function Trig_Aghanims_Scepter_Func007C takes nothing returns boolean if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H005' ) ) then return false endif return true endfunction function Trig_Aghanims_Scepter_Func008C takes nothing returns boolean if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'U00K' ) ) then return false endif return true endfunction function Trig_Aghanims_Scepter_Actions takes nothing returns nothing if ( Trig_Aghanims_Scepter_Func001C() ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I05U', GetManipulatingUnit() ) call UnitAddAbilityBJ( 'A009', GetManipulatingUnit() ) else endif if ( Trig_Aghanims_Scepter_Func002C() ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I05V', GetManipulatingUnit() ) call UnitAddAbilityBJ( 'A00A', GetManipulatingUnit() ) else endif if ( Trig_Aghanims_Scepter_Func003C() ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I069', GetManipulatingUnit() ) call UnitAddAbilityBJ( 'A0A2', GetManipulatingUnit() ) else endif if ( Trig_Aghanims_Scepter_Func004C() ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I06A', GetManipulatingUnit() ) call UnitAddAbilityBJ( 'A045', GetManipulatingUnit() ) else endif if ( Trig_Aghanims_Scepter_Func005C() ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I05F', GetManipulatingUnit() ) call UnitAddAbilityBJ( 'A0EJ', GetManipulatingUnit() ) else endif if ( Trig_Aghanims_Scepter_Func006C() ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I01N', GetManipulatingUnit() ) call UnitAddAbilityBJ( 'A0EI', GetManipulatingUnit() ) else endif if ( Trig_Aghanims_Scepter_Func007C() ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I06T', GetManipulatingUnit() ) else endif if ( Trig_Aghanims_Scepter_Func008C() ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I06X', GetManipulatingUnit() ) else endif endfunction //=========================================================================== function InitTrig_Aghanims_Scepter takes nothing returns nothing set gg_trg_Aghanims_Scepter = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Aghanims_Scepter, EVENT_PLAYER_UNIT_PICKUP_ITEM ) call TriggerAddCondition( gg_trg_Aghanims_Scepter, Condition( function Trig_Aghanims_Scepter_Conditions ) ) call TriggerAddAction( gg_trg_Aghanims_Scepter, function Trig_Aghanims_Scepter_Actions ) endfunction //=========================================================================== // Trigger: Power Treads //=========================================================================== function Trig_Power_Treads_Conditions takes nothing returns boolean if ( GetItemTypeId(GetManipulatedItem()) == 'I05X' ) then return true endif if ( GetItemTypeId(GetManipulatedItem()) == 'I05W' ) then return true endif if ( GetItemTypeId(GetManipulatedItem()) == 'I01M' ) then return true endif return false endfunction function Trig_Power_Treads_Actions takes nothing returns nothing call DisableTrigger( gg_trg_Footmans_Item_Get ) call DisableTrigger( gg_trg_Footmans_Item ) if ( GetItemTypeId(GetManipulatedItem()) == 'I05X' ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I05W', GetManipulatingUnit() ) endif if ( GetItemTypeId(GetManipulatedItem()) == 'I05W' ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I01M', GetManipulatingUnit() ) endif if ( GetItemTypeId(GetManipulatedItem()) == 'I01M' ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I05X', GetManipulatingUnit() ) endif call EnableTrigger( gg_trg_Footmans_Item_Get ) call EnableTrigger( gg_trg_Footmans_Item ) endfunction //=========================================================================== function InitTrig_Power_Treads takes nothing returns nothing set gg_trg_Power_Treads = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Power_Treads, EVENT_PLAYER_UNIT_USE_ITEM ) call TriggerAddCondition( gg_trg_Power_Treads, Condition( function Trig_Power_Treads_Conditions ) ) call TriggerAddAction( gg_trg_Power_Treads, function Trig_Power_Treads_Actions ) endfunction //=========================================================================== // Trigger: Orchid Malevolence //=========================================================================== function Trig_Orchid_Malevolence_Conditions takes nothing returns boolean return GetSpellAbilityId()=='A0AO' endfunction function Orchid_Malevolence_Damage takes nothing returns nothing local trigger ltt=GetTriggeringTrigger() local unit lKg=GetEventDamageSource() local unit lke=GetTriggerUnit() local real lnU=GetEventDamage()*.15 if(GetEventDamage()>10)then call DisableTrigger(ltt) call UnitDamageTargetBJ(lKg,lke,lnU,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL) call EnableTrigger(ltt) endif endfunction function Trig_Orchid_Malevolence_Actions takes nothing returns nothing local trigger lnV=CreateTrigger() local unit lfo=GetTriggerUnit() call TriggerRegisterUnitEvent(lnV,GetSpellTargetUnit(),EVENT_UNIT_DAMAGED) call TriggerAddAction(lnV,function Orchid_Malevolence_Damage) call PolledWait(4.5) call DisableTrigger(lnV) endfunction function Start_Orchid_Malevolence takes nothing returns nothing set gg_trg_Orchid_Malevolence=CreateTrigger() call TriggerRegisterAnyUnitEventBJ( gg_trg_Orchid_Malevolence, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition(gg_trg_Orchid_Malevolence,Condition(function Trig_Orchid_Malevolence_Conditions)) call TriggerAddAction(gg_trg_Orchid_Malevolence,function Trig_Orchid_Malevolence_Actions) endfunction function InitTrig_Orchid_Malevolence takes nothing returns nothing endfunction//=========================================================================== // Trigger: Shivas Guard //=========================================================================== // Objects used: // 'A0AD' = Poison Nova (Venomancer : Lesale Deathbringer) // 'B01A' = Arctic Blast // 'B01B' = Arctic Blast // 'e012' = Nova Missile // 'A0AP' = Poison Nova damage (Nova Missile) // 'o003' = Poison Nova Attack 1 // 'Aloc' = Locust (Dummy,ItemHolder,Vision Dummy,Dummy Ice,Lion Roar Effect,...) // DEBUG Trigger Number : 328 function Trig_Shivas_Guard_Conditions takes nothing returns boolean return GetSpellAbilityId()=='A0AD' endfunction function Shivas_Guard_Filter takes nothing returns boolean return GetBooleanAnd(GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),(IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))),GetBooleanAnd(GetBooleanAnd((UnitHasBuffBJ(GetFilterUnit(),'B01A')==false),(UnitHasBuffBJ(GetFilterUnit(),'B01B')==false)),GetBooleanAnd((IsUnitAliveBJ(GetFilterUnit())),(GetUnitAbilityLevelSwapped('A08E', GetFilterUnit())==0)))) endfunction function Trig_Shivas_Guard_Actions takes nothing returns nothing local integer lUY=GetUnitAbilityLevelSwapped('A0AD',GetTriggerUnit()) local integer lEq local integer lEQ local integer lUz=200 //local real array lPN local unit array lUZ local unit lU0=GetTriggerUnit() local unit lnX local location lU1=GetUnitLoc(GetTriggerUnit()) local location lU2 local location lU3 local group lU4 set lEq=1 set lEQ=18 loop exitwhen lEq>lEQ set lU2=GetUnitLoc(GetTriggerUnit()) call CreateNUnitsAtLoc(1,'e012',GetOwningPlayer(lU0),lU2,I2R(lEq)*20) set lUZ[lEq]=bj_lastCreatedUnit call IssuePointOrderByIdLoc(bj_lastCreatedUnit,OrderId("move"),PolarProjectionBJ(lU2,800.,(I2R(lEq)*20.))) call RemoveLocation(lU2) set lEq=lEq+1 endloop set lEq=1 set lEQ=5 loop exitwhen lEq>lEQ set lU4=GetUnitsInRangeOfLocMatching(lUz,lU1,Condition(function Shivas_Guard_Filter)) loop set lnX=FirstOfGroup(lU4) exitwhen lnX==null set lU3=GetUnitLoc(lnX) call CreateNUnitsAtLoc(1,'o003',GetOwningPlayer(lU0),lU3,bj_UNIT_FACING) call UnitApplyTimedLifeBJ(1.,'BTLF',bj_lastCreatedUnit) call IssueTargetOrderById(bj_lastCreatedUnit,OrderId("coldarrowstarg"),lnX) call SetUnitPathing(bj_lastCreatedUnit,false) call SetUnitInvulnerable(bj_lastCreatedUnit,true) call UnitAddAbility(bj_lastCreatedUnit,'Aloc') call RemoveLocation(lU3) call GroupRemoveUnit(lU4,lnX) endloop set lUz=lUz+200 call PolledWait(.25) set lEq=lEq+1 endloop set lEq=1 set lEQ=18 loop exitwhen lEq>lEQ call RemoveUnit(lUZ[lEq]) set lEq=lEq+1 endloop call RemoveLocation(lU1) call RemoveLocation(lU2) call DestroyGroup(lU4) endfunction function InitTrig_Shivas_Guard takes nothing returns nothing set gg_trg_Shivas_Guard=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(gg_trg_Shivas_Guard,EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddCondition(gg_trg_Shivas_Guard,Condition(function Trig_Shivas_Guard_Conditions)) call TriggerAddAction(gg_trg_Shivas_Guard,function Trig_Shivas_Guard_Actions) endfunction//=========================================================================== // Trigger: Armlet of Mordiggian //=========================================================================== function Trig_Armlet_of_Mordiggian_Func002C takes nothing returns boolean if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I065' ) ) then return false endif return true endfunction function Trig_Armlet_of_Mordiggian_Func003C takes nothing returns boolean if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I066' ) ) then return false endif return true endfunction function Trig_Armlet_of_Mordiggian_Actions takes nothing returns nothing call DisableTrigger( gg_trg_Footmans_Item ) if ( Trig_Armlet_of_Mordiggian_Func002C() ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I066', GetTriggerUnit() ) else endif if ( Trig_Armlet_of_Mordiggian_Func003C() ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I065', GetTriggerUnit() ) else endif call EnableTrigger( gg_trg_Footmans_Item ) endfunction //=========================================================================== function InitTrig_Armlet_of_Mordiggian takes nothing returns nothing set gg_trg_Armlet_of_Mordiggian = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Armlet_of_Mordiggian, EVENT_PLAYER_UNIT_USE_ITEM ) call TriggerAddAction( gg_trg_Armlet_of_Mordiggian, function Trig_Armlet_of_Mordiggian_Actions ) endfunction //=========================================================================== // Trigger: Item Skill Support // // スキルE”ã¤ã‚’オーãƒãEã—ãŸã¨ããE臨時追加処çE //  ・アイコンãŒè¡¨ç¤ºã•ã‚Œã‚‹ãEã¯ã‹ã£ã“悪ãE‹ã‚‰ãƒ€ãƒ¡ //  ・記述ã—ãŸã‚‰Dropã®ã»ãE«ã‚‚削除処çE‚’記述 //=========================================================================== function Trig_Item_Skill_Support_Actions takes nothing returns nothing if ( GetItemTypeId(GetManipulatedItem()) == 'I02Y' ) then //Assault Cuirass call UnitAddAbilityBJ( 'A01R', GetManipulatingUnit() ) //Armor+10 return endif if ( GetItemTypeId(GetManipulatedItem()) == 'I065' ) then //Armlet of Mordiggian call UnitAddAbilityBJ( 'A01O', GetManipulatingUnit() ) //Armor+5 return endif if ( GetItemTypeId(GetManipulatedItem()) == 'I066' ) then //Armlet of Mordiggian Active call UnitAddAbilityBJ( 'A01O', GetManipulatingUnit() ) //Armor+5 call UnitAddAbilityBJ( 'A0G1', GetManipulatingUnit() ) //Str+25 return endif if ( GetItemTypeId(GetManipulatedItem()) == 'I061' ) then //Spike Shield call UnitAddAbilityBJ( 'A017', GetManipulatingUnit() ) //Damage+25 return endif endfunction //=========================================================================== function InitTrig_Item_Skill_Support takes nothing returns nothing set gg_trg_Item_Skill_Support = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Item_Skill_Support, EVENT_PLAYER_UNIT_PICKUP_ITEM ) call TriggerAddAction( gg_trg_Item_Skill_Support, function Trig_Item_Skill_Support_Actions ) endfunction //=========================================================================== // Trigger: Item Skill Support Drop // // アイãƒEƒ ã‚’è½ã¨ã—ãŸã¨ãã«åŠ¹æžœã‚’消ã™å‡¦çE //=========================================================================== function Trig_Item_Skill_Support_Drop_Actions takes nothing returns nothing if ( GetItemTypeId(GetManipulatedItem()) == 'I02Y' ) then //Assault Cuirass call UnitRemoveAbilityBJ( 'A01R', GetManipulatingUnit() ) //Armor+10 return endif if ( GetItemTypeId(GetManipulatedItem()) == 'I065' ) then //Armlet of Mordiggian call UnitRemoveAbilityBJ( 'A01O', GetManipulatingUnit() ) //Armor+5 return endif if ( GetItemTypeId(GetManipulatedItem()) == 'I066' ) then //Armlet of Mordiggian Active call UnitRemoveAbilityBJ( 'A01O', GetManipulatingUnit() ) //Armor+5 call UnitRemoveAbilityBJ( 'A0G1', GetManipulatingUnit() ) //Str+25 return endif if ( GetItemTypeId(GetManipulatedItem()) == 'I061' ) then //Spike Shield call UnitRemoveAbilityBJ( 'A017', GetManipulatingUnit() ) //Damage+20 return endif endfunction //=========================================================================== function InitTrig_Item_Skill_Support_Drop takes nothing returns nothing set gg_trg_Item_Skill_Support_Drop = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Item_Skill_Support_Drop, EVENT_PLAYER_UNIT_DROP_ITEM ) call TriggerAddAction( gg_trg_Item_Skill_Support_Drop, function Trig_Item_Skill_Support_Drop_Actions ) endfunction //=========================================================================== // Trigger: Flying Courier1 //=========================================================================== function Trig_Flying_Courier1_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A0CV' ) ) then return false endif if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I05G') == true ) ) then return false endif return true endfunction function Trig_Flying_Courier1_Actions takes nothing returns nothing call CreateNUnitsAtLoc( 1, 'e00B', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I05G') ) call UnitAddItemSwapped( UnitItemInSlotBJ(GetTriggerUnit(), 1), GetLastCreatedUnit() ) call UnitAddItemSwapped( UnitItemInSlotBJ(GetTriggerUnit(), 2), GetLastCreatedUnit() ) call UnitAddItemSwapped( UnitItemInSlotBJ(GetTriggerUnit(), 3), GetLastCreatedUnit() ) call UnitAddItemSwapped( UnitItemInSlotBJ(GetTriggerUnit(), 4), GetLastCreatedUnit() ) call UnitAddItemSwapped( UnitItemInSlotBJ(GetTriggerUnit(), 5), GetLastCreatedUnit() ) call UnitAddItemSwapped( UnitItemInSlotBJ(GetTriggerUnit(), 6), GetLastCreatedUnit() ) call RemoveUnit( GetTriggerUnit() ) call AddSpecialEffectTargetUnitBJ( "origin", GetLastCreatedUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" ) endfunction //=========================================================================== function InitTrig_Flying_Courier1 takes nothing returns nothing set gg_trg_Flying_Courier1 = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Flying_Courier1, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Flying_Courier1, Condition( function Trig_Flying_Courier1_Conditions ) ) call TriggerAddAction( gg_trg_Flying_Courier1, function Trig_Flying_Courier1_Actions ) endfunction //=========================================================================== // Trigger: Flying Courier2 //=========================================================================== function Trig_Flying_Courier2_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A085' ) ) then return false endif if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I05G') == true ) ) then return false endif return true endfunction function Trig_Flying_Courier2_Actions takes nothing returns nothing call CreateNUnitsAtLoc( 1, 'e004', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'I05G') ) call UnitAddItemSwapped( UnitItemInSlotBJ(GetTriggerUnit(), 1), GetLastCreatedUnit() ) call UnitAddItemSwapped( UnitItemInSlotBJ(GetTriggerUnit(), 2), GetLastCreatedUnit() ) call UnitAddItemSwapped( UnitItemInSlotBJ(GetTriggerUnit(), 3), GetLastCreatedUnit() ) call UnitAddItemSwapped( UnitItemInSlotBJ(GetTriggerUnit(), 4), GetLastCreatedUnit() ) call UnitAddItemSwapped( UnitItemInSlotBJ(GetTriggerUnit(), 5), GetLastCreatedUnit() ) call UnitAddItemSwapped( UnitItemInSlotBJ(GetTriggerUnit(), 6), GetLastCreatedUnit() ) call RemoveUnit( GetTriggerUnit() ) call AddSpecialEffectTargetUnitBJ( "origin", GetLastCreatedUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" ) endfunction //=========================================================================== function InitTrig_Flying_Courier2 takes nothing returns nothing set gg_trg_Flying_Courier2 = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Flying_Courier2, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Flying_Courier2, Condition( function Trig_Flying_Courier2_Conditions ) ) call TriggerAddAction( gg_trg_Flying_Courier2, function Trig_Flying_Courier2_Actions ) endfunction //=========================================================================== // Trigger: Animal Style Change //=========================================================================== function Trig_Animal_Style_Change_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A0CI' endfunction function Trig_Animal_Style_Change_Actions takes nothing returns nothing local integer ran=GetRandomInt(1, 5) local integer slv=GetUnitAbilityLevel(GetTriggerUnit(),'A0CI') loop exitwhen ( ran != slv ) set ran=GetRandomInt(1, 5) endloop call SetUnitAbilityLevelSwapped( 'A0CI', GetTriggerUnit(), ran ) endfunction function Start_Animal_Style_Change takes nothing returns nothing set gg_trg_Animal_Style_Change = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Animal_Style_Change, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Animal_Style_Change, Condition( function Trig_Animal_Style_Change_Conditions ) ) call TriggerAddAction( gg_trg_Animal_Style_Change, function Trig_Animal_Style_Change_Actions ) endfunction function InitTrig_Animal_Style_Change takes nothing returns nothing endfunction//=========================================================================== // Trigger: Lightning Orb //=========================================================================== function Trig_Lightning_Orb_Conditions takes nothing returns boolean if ( not ( IsUnitType(GetAttacker(), UNIT_TYPE_STRUCTURE) == false ) ) then return false endif if ( not ( IsUnitIllusionBJ(GetAttacker()) == false ) ) then return false endif if( UnitHasItemOfTypeBJ(GetAttacker(), 'I01W') == true )then return true endif if( UnitHasItemOfTypeBJ(GetAttacker(), 'I02W') == true )then return true endif return false endfunction function Trig_Lightning_Orb_Actions takes nothing returns nothing local integer ran=GetRandomInt(1, 100) if( UnitHasItemOfTypeBJ(GetAttacker(), 'I01W') == true )then if( ran <= 20 )then call CreateNUnitsAtLoc( 1, 'h006', GetOwningPlayer(GetAttacker()), GetUnitLoc(GetAttacker()), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call UnitAddAbilityBJ( 'A04U', GetLastCreatedUnit() ) call IssueTargetOrder( GetLastCreatedUnit(), "chainlightning", GetAttackedUnitBJ() ) set ran = GetRandomInt(1, 100) endif endif if( UnitHasItemOfTypeBJ(GetAttacker(), 'I02W') == true )then if( ran <= 20 )then call CreateNUnitsAtLoc( 1, 'h006', GetOwningPlayer(GetAttacker()), GetUnitLoc(GetAttacker()), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call UnitAddAbilityBJ( 'A05K', GetLastCreatedUnit() ) call IssueTargetOrder( GetLastCreatedUnit(), "chainlightning", GetAttackedUnitBJ() ) endif endif endfunction function Start_Lightning_Orb takes nothing returns nothing set gg_trg_Lightning_Orb = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Lightning_Orb, EVENT_PLAYER_UNIT_ATTACKED ) call TriggerAddCondition( gg_trg_Lightning_Orb, Condition( function Trig_Lightning_Orb_Conditions ) ) call TriggerAddAction( gg_trg_Lightning_Orb, function Trig_Lightning_Orb_Actions ) endfunction function InitTrig_Lightning_Orb takes nothing returns nothing endfunction//=========================================================================== // Trigger: Speso //=========================================================================== function Trig_Speso_Conditions takes nothing returns boolean if ( not ( IsUnitType(GetAttacker(), UNIT_TYPE_STRUCTURE) == false ) ) then return false endif if ( not ( IsUnitIllusionBJ(GetAttacker()) == false ) ) then return false endif if( UnitHasItemOfTypeBJ(GetAttacker(), 'I06W') == true )then return true endif if( UnitHasItemOfTypeBJ(GetAttacker(), 'I06E') == true )then return true endif return false endfunction function Trig_Speso_Actions takes nothing returns nothing local integer ran=GetRandomInt(1, 100) if( UnitHasItemOfTypeBJ(GetAttacker(), 'I06W') == true )then if( ran <= 15 )then call CreateNUnitsAtLoc( 1, 'h006', GetOwningPlayer(GetAttacker()), GetUnitLoc(GetAttacker()), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call UnitAddAbilityBJ( 'A0EU', GetLastCreatedUnit() ) call IssueTargetOrder( GetLastCreatedUnit(), "chainlightning", GetAttackedUnitBJ() ) set ran = GetRandomInt(1, 100) endif endif if( UnitHasItemOfTypeBJ(GetAttacker(), 'I06E') == true )then if( ran <= 15 )then call CreateNUnitsAtLoc( 1, 'h006', GetOwningPlayer(GetAttacker()), GetUnitLoc(GetAttacker()), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call UnitAddAbilityBJ( 'A0EV', GetLastCreatedUnit() ) call IssueTargetOrder( GetLastCreatedUnit(), "chainlightning", GetAttackedUnitBJ() ) endif endif endfunction function Start_Speso takes nothing returns nothing set gg_trg_Speso = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Speso, EVENT_PLAYER_UNIT_ATTACKED ) call TriggerAddCondition( gg_trg_Speso, Condition( function Trig_Speso_Conditions ) ) call TriggerAddAction( gg_trg_Speso, function Trig_Speso_Actions ) endfunction function InitTrig_Speso takes nothing returns nothing endfunction//=========================================================================== // Trigger: Ring of Basilius //=========================================================================== function Trig_Ring_of_Basilius_Conditions takes nothing returns boolean if ( GetItemTypeId(GetManipulatedItem()) == 'I01K' ) then return true endif if ( GetItemTypeId(GetManipulatedItem()) == 'I06I' ) then return true endif return false endfunction function Trig_Ring_of_Basilius_Actions takes nothing returns nothing if ( GetItemTypeId(GetManipulatedItem()) == 'I01K' ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I06I', GetManipulatingUnit() ) endif if ( GetItemTypeId(GetManipulatedItem()) == 'I06I' ) then call RemoveItem( GetManipulatedItem() ) call UnitAddItemByIdSwapped( 'I01K', GetManipulatingUnit() ) endif endfunction //=========================================================================== function InitTrig_Ring_of_Basilius takes nothing returns nothing set gg_trg_Ring_of_Basilius = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Ring_of_Basilius, EVENT_PLAYER_UNIT_USE_ITEM ) call TriggerAddCondition( gg_trg_Ring_of_Basilius, Condition( function Trig_Ring_of_Basilius_Conditions ) ) call TriggerAddAction( gg_trg_Ring_of_Basilius, function Trig_Ring_of_Basilius_Actions ) endfunction //=========================================================================== // Trigger: Animal Courier //=========================================================================== function Trig_Animal_Courier_Conditions takes nothing returns boolean return GetItemTypeId(GetManipulatedItem()) == 'I01B' endfunction function GetAnimal takes integer x returns integer if ( x ==1 ) then return 'nrac' endif if ( x ==2 ) then return 'ndog' endif if ( x ==3 ) then return 'nalb' endif if ( x ==4 ) then return 'nsea' endif if ( x ==5 ) then return 'nech' endif return 'nech' endfunction function Trig_Animal_Courier_Actions takes nothing returns nothing local integer x=GetRandomInt(1,5) local integer ran=GetRandomInt(1,5) call CreateNUnitsAtLoc( 1, GetAnimal(x), GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING ) loop exitwhen ( x != ran ) set ran=GetRandomInt(1, 5) endloop call SetUnitAbilityLevelSwapped( 'A0CI', GetLastCreatedUnit(), ran) endfunction function InitTrig_Animal_Courier takes nothing returns nothing set gg_trg_Animal_Courier = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Animal_Courier, EVENT_PLAYER_UNIT_USE_ITEM ) call TriggerAddCondition( gg_trg_Animal_Courier, Condition( function Trig_Animal_Courier_Conditions ) ) call TriggerAddAction( gg_trg_Animal_Courier, function Trig_Animal_Courier_Actions ) endfunction//=========================================================================== // Trigger: Bo //=========================================================================== function Trig_Bo_Actions takes nothing returns nothing call CreateMultiboardBJ( 4, ( CountPlayersInForceBJ(GetPlayersByMapControl(MAP_CONTROL_USER)) + 3 ), "TRIGSTR_471" ) call MultiboardMinimize( GetLastCreatedMultiboard(), true ) call MultiboardSetItemsIcon( GetLastCreatedMultiboard(), "UI\\Minimap\\MinimapIconCreepLoc2.blp" ) call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 1, 1, 8.00 ) call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 2, 1, 4.00 ) call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 3, 1, 4.00 ) call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 4, 1, 4.00 ) call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 1, "TRIGSTR_1877" ) call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, 1, "TRIGSTR_2146" ) call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 1, "TRIGSTR_3376" ) call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, 1, "TRIGSTR_3377" ) endfunction //=========================================================================== function InitTrig_Bo takes nothing returns nothing set gg_trg_Bo = CreateTrigger( ) call TriggerRegisterPlayerChatEvent( gg_trg_Bo, Player(1), "-B", true ) call TriggerAddAction( gg_trg_Bo, function Trig_Bo_Actions ) endfunction //=========================================================================== // Trigger: Sudden death //=========================================================================== function Trig_Sudden_death_Actions takes nothing returns nothing local integer x=0 loop exitwhen x >= 12 set udg_Creep_Status[x] = udg_Creep_Status[x]+1 set x=x+1 endloop call DisplayTextToForce( GetPlayersAll(), "|c00ff0303Sudden Death Mode ON|r" ) endfunction function Start_Sudden_death takes nothing returns nothing set gg_trg_Sudden_death = CreateTrigger( ) call TriggerRegisterTimerEventSingle( gg_trg_Sudden_death, 4800.00 ) call TriggerAddAction( gg_trg_Sudden_death, function Trig_Sudden_death_Actions ) endfunction function InitTrig_Sudden_death takes nothing returns nothing endfunction//=========================================================================== // Trigger: WorldTimer //=========================================================================== function Trig_WorldTimer_Actions takes nothing returns nothing if ( GetPlayerState(Player(1), PLAYER_STATE_RESOURCE_FOOD_USED) < 59 ) then call AdjustPlayerStateBJ( 1, Player(1), PLAYER_STATE_RESOURCE_FOOD_USED ) call AdjustPlayerStateBJ( 1, Player(2), PLAYER_STATE_RESOURCE_FOOD_USED ) call AdjustPlayerStateBJ( 1, Player(3), PLAYER_STATE_RESOURCE_FOOD_USED ) call AdjustPlayerStateBJ( 1, Player(4), PLAYER_STATE_RESOURCE_FOOD_USED ) call AdjustPlayerStateBJ( 1, Player(5), PLAYER_STATE_RESOURCE_FOOD_USED ) call AdjustPlayerStateBJ( 1, Player(7), PLAYER_STATE_RESOURCE_FOOD_USED ) call AdjustPlayerStateBJ( 1, Player(8), PLAYER_STATE_RESOURCE_FOOD_USED ) call AdjustPlayerStateBJ( 1, Player(9), PLAYER_STATE_RESOURCE_FOOD_USED ) call AdjustPlayerStateBJ( 1, Player(10), PLAYER_STATE_RESOURCE_FOOD_USED ) call AdjustPlayerStateBJ( 1, Player(11), PLAYER_STATE_RESOURCE_FOOD_USED ) else call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_FOOD_USED, 0 ) call SetPlayerStateBJ( Player(2), PLAYER_STATE_RESOURCE_FOOD_USED, 0 ) call SetPlayerStateBJ( Player(3), PLAYER_STATE_RESOURCE_FOOD_USED, 0 ) call SetPlayerStateBJ( Player(4), PLAYER_STATE_RESOURCE_FOOD_USED, 0 ) call SetPlayerStateBJ( Player(5), PLAYER_STATE_RESOURCE_FOOD_USED, 0 ) call SetPlayerStateBJ( Player(7), PLAYER_STATE_RESOURCE_FOOD_USED, 0 ) call SetPlayerStateBJ( Player(8), PLAYER_STATE_RESOURCE_FOOD_USED, 0 ) call SetPlayerStateBJ( Player(9), PLAYER_STATE_RESOURCE_FOOD_USED, 0 ) call SetPlayerStateBJ( Player(10), PLAYER_STATE_RESOURCE_FOOD_USED, 0 ) call SetPlayerStateBJ( Player(11), PLAYER_STATE_RESOURCE_FOOD_USED, 0 ) call AdjustPlayerStateBJ( 1, Player(1), PLAYER_STATE_RESOURCE_LUMBER ) call AdjustPlayerStateBJ( 1, Player(2), PLAYER_STATE_RESOURCE_LUMBER ) call AdjustPlayerStateBJ( 1, Player(3), PLAYER_STATE_RESOURCE_LUMBER ) call AdjustPlayerStateBJ( 1, Player(4), PLAYER_STATE_RESOURCE_LUMBER ) call AdjustPlayerStateBJ( 1, Player(5), PLAYER_STATE_RESOURCE_LUMBER ) call AdjustPlayerStateBJ( 1, Player(7), PLAYER_STATE_RESOURCE_LUMBER ) call AdjustPlayerStateBJ( 1, Player(8), PLAYER_STATE_RESOURCE_LUMBER ) call AdjustPlayerStateBJ( 1, Player(9), PLAYER_STATE_RESOURCE_LUMBER ) call AdjustPlayerStateBJ( 1, Player(10), PLAYER_STATE_RESOURCE_LUMBER ) call AdjustPlayerStateBJ( 1, Player(11), PLAYER_STATE_RESOURCE_LUMBER ) endif endfunction //=========================================================================== function InitTrig_WorldTimer takes nothing returns nothing set gg_trg_WorldTimer = CreateTrigger( ) call TriggerRegisterTimerEventPeriodic( gg_trg_WorldTimer, 1.00 ) call TriggerAddAction( gg_trg_WorldTimer, function Trig_WorldTimer_Actions ) endfunction //=========================================================================== // Trigger: Afforestation // // ゲームスタートã«ãƒªãƒ³ã‚¯ //=========================================================================== function Trig_Afforestation_Func002A takes nothing returns nothing if ( IsDestructableDeadBJ(GetFilterDestructable()) == true and CountUnitsInGroup(GetUnitsInRectAll(RectFromCenterSizeBJ(GetDestructableLoc(GetFilterDestructable()), 300.00, 300.00))) == 0 ) then call DestructableRestoreLife( GetEnumDestructable(), GetDestructableMaxLife(GetEnumDestructable()), false ) endif endfunction function Trig_Afforestation_Actions takes nothing returns nothing call EnumDestructablesInRectAll( GetPlayableMapRect(), function Trig_Afforestation_Func002A ) endfunction function Start_Afforestation takes nothing returns nothing set gg_trg_Afforestation = CreateTrigger( ) call TriggerRegisterTimerEventPeriodic( gg_trg_Afforestation, 60.00 ) call TriggerAddAction( gg_trg_Afforestation, function Trig_Afforestation_Actions ) endfunction function InitTrig_Afforestation takes nothing returns nothing endfunction//=========================================================================== // Trigger: Periodical Income // // ゲームスタートã«ãƒªãƒ³ã‚¯ //=========================================================================== function Trig_Periodical_Income_Func001002 takes nothing returns nothing call AdjustPlayerStateBJ( 1, GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD ) endfunction function Trig_Periodical_Income_Actions takes nothing returns nothing call ForForce( GetPlayersByMapControl(MAP_CONTROL_USER), function Trig_Periodical_Income_Func001002 ) endfunction function Start_Periodical_Income takes nothing returns nothing set gg_trg_Periodical_Income = CreateTrigger( ) call TriggerRegisterTimerEventPeriodic( gg_trg_Periodical_Income, 1.00 ) call TriggerAddAction( gg_trg_Periodical_Income, function Trig_Periodical_Income_Actions ) endfunction function InitTrig_Periodical_Income takes nothing returns nothing endfunction//=========================================================================== // Trigger: StartUp // // ゲームローãƒE‚£ãƒ³ã‚°ç›´å¾ŒãEå‹•ä½E //=========================================================================== function CacheInit takes nothing returns nothing call FlushGameCache(InitGameCache("DotKCache.x")) set udg_Core=InitGameCache("DotKCache.x") endfunction function InitTrig_StartUp takes nothing returns nothing set gg_trg_StartUp = CreateTrigger( ) call CacheInit() call SetPlayerName( Player(0), "Sentinel" ) call SetPlayerName( Player(6), "Scourge" ) call SetCreepCampFilterState(true) call SetPlayerColorBJ( Player(0), PLAYER_COLOR_RED, true ) call SetPlayerColorBJ( Player(6), PLAYER_COLOR_GREEN, true ) 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) ) call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(3) ) call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(4) ) call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(5) ) call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(6) ) call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(7) ) call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(8) ) call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(9) ) call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(10) ) call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(11) ) call SetPlayerAllianceStateBJ( Player(0), Player(1), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(0), Player(2), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(0), Player(3), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(0), Player(4), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(0), Player(5), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(1), Player(0), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(2), Player(0), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(3), Player(0), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(4), Player(0), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(5), Player(0), bj_ALLIANCE_ALLIED_VISION ) call PanCameraToTimedLocForPlayer( Player(1), GetUnitLoc(gg_unit_n005_0095), 0 ) call PanCameraToTimedLocForPlayer( Player(2), GetUnitLoc(gg_unit_n005_0095), 0 ) call PanCameraToTimedLocForPlayer( Player(3), GetUnitLoc(gg_unit_n005_0095), 0 ) call PanCameraToTimedLocForPlayer( Player(4), GetUnitLoc(gg_unit_n005_0095), 0 ) call PanCameraToTimedLocForPlayer( Player(5), GetUnitLoc(gg_unit_n005_0095), 0 ) call SetPlayerAllianceStateBJ( Player(6), Player(7), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(6), Player(8), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(6), Player(9), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(6), Player(10), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(6), Player(11), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(7), Player(6), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(8), Player(6), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(9), Player(6), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(10), Player(6), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(11), Player(6), bj_ALLIANCE_ALLIED_VISION ) call PanCameraToTimedLocForPlayer( Player(7), GetUnitLoc(gg_unit_n005_0100), 0 ) call PanCameraToTimedLocForPlayer( Player(8), GetUnitLoc(gg_unit_n005_0100), 0 ) call PanCameraToTimedLocForPlayer( Player(9), GetUnitLoc(gg_unit_n005_0100), 0 ) call PanCameraToTimedLocForPlayer( Player(10), GetUnitLoc(gg_unit_n005_0100), 0 ) call PanCameraToTimedLocForPlayer( Player(11), GetUnitLoc(gg_unit_n005_0100), 0 ) endfunction//=========================================================================== // Trigger: StartUpx //=========================================================================== function Trig_StartUpx_Actions takes nothing returns nothing //RuneType set udg_Rune[0] = 'I04J' set udg_Rune[1] = 'I04L' set udg_Rune[2] = 'I04I' set udg_Rune[3] = 'I04K' set udg_Rune[4] = 'I04M' //CreepType set udg_SC_melee[0] = 'hkni' set udg_SC_range[0] = 'hmtm' set udg_SC_Siege = 'hmtt' set udg_SE_melee[0] = 'ehpr' set udg_SE_range[0] = 'edry' set udg_SE_Siege = 'ebal' set udg_SC_melee[1] = 'hfoo' set udg_SC_range[1] = 'hrif' set udg_SE_melee[1] = 'ehip' set udg_SE_range[1] = 'esen' set udg_SC_melee[2] = 'hgry' set udg_SC_range[2] = 'hmpr' set udg_SE_melee[2] = 'emtg' set udg_SE_range[2] = 'echm' call SetFloatGameState(GAME_STATE_TIME_OF_DAY,6.) call SetTimeOfDayScale(.5) call SetSkyModel("Environment\\Sky\\FoggedSky\\FoggedSky.mdl") endfunction function InitTrig_StartUpx takes nothing returns nothing set gg_trg_StartUpx = CreateTrigger( ) call TriggerRegisterTimerEventSingle( gg_trg_StartUpx, 0.10 ) call TriggerAddAction( gg_trg_StartUpx, function Trig_StartUpx_Actions ) endfunction //=========================================================================== // Trigger: StartUp2 //=========================================================================== //TESH.scrollpos=20 //TESH.alwaysfold=1 function Trig_StartUp2_Actions takes nothing returns nothing local integer x local integer semax=0 local integer scmax=0 if ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_PLAYING ) then set semax=semax+1 endif if ( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_PLAYING ) then set semax=semax+1 endif if ( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_PLAYING ) then set semax=semax+1 endif if ( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_PLAYING ) then set semax=semax+1 endif if ( GetPlayerSlotState(Player(5)) == PLAYER_SLOT_STATE_PLAYING ) then set semax=semax+1 endif if ( GetPlayerSlotState(Player(7)) == PLAYER_SLOT_STATE_PLAYING ) then set scmax=scmax+1 endif if ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_PLAYING ) then set scmax=scmax+1 endif if ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_PLAYING ) then set scmax=scmax+1 endif if ( GetPlayerSlotState(Player(10)) == PLAYER_SLOT_STATE_PLAYING ) then set scmax=scmax+1 endif if ( GetPlayerSlotState(Player(11)) == PLAYER_SLOT_STATE_PLAYING ) then set scmax=scmax+1 endif set x=5 loop exitwhen x<=0 call SetPlayerStateBJ( Player(x), PLAYER_STATE_RESOURCE_GOLD, ( 4265 / semax ) ) set x = x-1 endloop set x=11 loop exitwhen x<6 call SetPlayerStateBJ( Player(x), PLAYER_STATE_RESOURCE_GOLD, ( 4265 / scmax ) ) set x = x-1 endloop endfunction //=========================================================================== function InitTrig_StartUp2 takes nothing returns nothing set gg_trg_StartUp2 = CreateTrigger( ) call TriggerRegisterTimerEventSingle( gg_trg_StartUp2, 1.00 ) call TriggerAddAction( gg_trg_StartUp2, function Trig_StartUp2_Actions ) endfunction //=========================================================================== // Trigger: StartUp3 //=========================================================================== function Trig_StartUp3_Func002001002 takes nothing returns boolean return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == true ) endfunction function Trig_StartUp3_Func002002 takes nothing returns nothing call SetUnitInvulnerable( GetEnumUnit(), true ) endfunction function Trig_StartUp3_Actions takes nothing returns nothing call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_StartUp3_Func002001002)), function Trig_StartUp3_Func002002 ) endfunction //=========================================================================== function InitTrig_StartUp3 takes nothing returns nothing set gg_trg_StartUp3 = CreateTrigger( ) call TriggerRegisterTimerEventSingle( gg_trg_StartUp3, 2.00 ) call TriggerAddAction( gg_trg_StartUp3, function Trig_StartUp3_Actions ) endfunction //=========================================================================== // Trigger: StartUp4 //=========================================================================== function Trig_StartUp4_Actions takes nothing returns nothing call CreateNUnitsAtLoc( 1, 'h00G', Player(1), GetUnitLoc(gg_unit_n005_0100), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 120 ) call CreateNUnitsAtLoc( 1, 'h00G', Player(2), GetUnitLoc(gg_unit_n005_0100), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 120 ) call CreateNUnitsAtLoc( 1, 'h00G', Player(3), GetUnitLoc(gg_unit_n005_0100), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 120 ) call CreateNUnitsAtLoc( 1, 'h00G', Player(4), GetUnitLoc(gg_unit_n005_0100), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 120 ) call CreateNUnitsAtLoc( 1, 'h00G', Player(5), GetUnitLoc(gg_unit_n005_0100), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 120 ) call CreateNUnitsAtLoc( 1, 'h00G', Player(7), GetUnitLoc(gg_unit_n005_0095), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 120 ) call CreateNUnitsAtLoc( 1, 'h00G', Player(8), GetUnitLoc(gg_unit_n005_0095), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 120 ) call CreateNUnitsAtLoc( 1, 'h00G', Player(9), GetUnitLoc(gg_unit_n005_0095), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 120 ) call CreateNUnitsAtLoc( 1, 'h00G', Player(10), GetUnitLoc(gg_unit_n005_0095), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 120 ) call CreateNUnitsAtLoc( 1, 'h00G', Player(11), GetUnitLoc(gg_unit_n005_0095), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 120 ) call CreateLeaderboardBJ( GetForceOfPlayer(Player(1)), ( "CreepStatus " + "0" + "/" + "0" + " N " + "0") ) call CreateLeaderboardBJ( GetForceOfPlayer(Player(2)), ( "CreepStatus " + "0" + "/" + "0" + " N " + "0") ) call CreateLeaderboardBJ( GetForceOfPlayer(Player(3)), ( "CreepStatus " + "0" + "/" + "0" + " N " + "0") ) call CreateLeaderboardBJ( GetForceOfPlayer(Player(4)), ( "CreepStatus " + "0" + "/" + "0" + " N " + "0") ) call CreateLeaderboardBJ( GetForceOfPlayer(Player(5)), ( "CreepStatus " + "0" + "/" + "0" + " N " + "0") ) call CreateLeaderboardBJ( GetForceOfPlayer(Player(7)), ( "CreepStatus " + "0" + "/" + "0" + " N " + "0") ) call CreateLeaderboardBJ( GetForceOfPlayer(Player(8)), ( "CreepStatus " + "0" + "/" + "0" + " N " + "0") ) call CreateLeaderboardBJ( GetForceOfPlayer(Player(9)), ( "CreepStatus " + "0" + "/" + "0" + " N " + "0") ) call CreateLeaderboardBJ( GetForceOfPlayer(Player(10)), ( "CreepStatus " + "0" + "/" + "0" + " N " + "0") ) call CreateLeaderboardBJ( GetForceOfPlayer(Player(11)), ( "CreepStatus " + "0" + "/" + "0" + " N " + "0") ) call ExecuteFunc("Start_Charges_Connection") call ExecuteFunc("Start_SetUpReciepes") call ExecuteFunc("Start_DenyFlag") call ExecuteFunc("Start_Undroppable_Cooldowns") call ExecuteFunc("Start_Reset_Droppable_Status") call ExecuteFunc("Start_Hero_Setup") call ExecuteFunc("Start_AutoRevival") call ExecuteFunc("Start_Lightning_Orb") call ExecuteFunc("Start_Try_Apply_Reciepe") call ExecuteFunc("Start_Specific_Reciepes") call ExecuteFunc("Start_Cranium_Basher_Flag") call ExecuteFunc("Start_Eye_of_Skadi_Flag") call ExecuteFunc("Start_Refresher_Orb") call ExecuteFunc("Start_Orchid_Malevolence") call ExecuteFunc("Start_Animal_Style_Change") call ExecuteFunc("Start_Speso") endfunction function InitTrig_StartUp4 takes nothing returns nothing set gg_trg_StartUp4 = CreateTrigger( ) call TriggerRegisterTimerEventSingle( gg_trg_StartUp4, 6.00 ) call TriggerAddAction( gg_trg_StartUp4, function Trig_StartUp4_Actions ) endfunction//=========================================================================== // Trigger: LH Deny Counter //=========================================================================== function Trig_LH_Deny_Counter_Conditions takes nothing returns boolean return IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == false endfunction function Trig_LH_Deny_Counter_Actions takes nothing returns nothing local string cst="CreepStatus " if ( GetOwningPlayer(GetKillingUnitBJ()) == Player(1) ) then call LeaderboardSetLabelBJ( PlayerGetLeaderboardBJ(Player(1)), ( cst + I2S(udg_Player01_Creep[0]) + "/" + I2S(udg_Player01_Creep[1]) + " N " + I2S(udg_Player01_Creep[2]) ) ) return endif if ( GetOwningPlayer(GetKillingUnitBJ()) == Player(2) ) then call LeaderboardSetLabelBJ( PlayerGetLeaderboardBJ(Player(2)), ( cst + I2S(udg_Player02_Creep[0]) + "/" + I2S(udg_Player02_Creep[1]) + " N " + I2S(udg_Player02_Creep[2]) ) ) return endif if ( GetOwningPlayer(GetKillingUnitBJ()) == Player(3) ) then call LeaderboardSetLabelBJ( PlayerGetLeaderboardBJ(Player(3)), ( cst + I2S(udg_Player03_Creep[0]) + "/" + I2S(udg_Player03_Creep[1]) + " N " + I2S(udg_Player03_Creep[2]) ) ) return endif if ( GetOwningPlayer(GetKillingUnitBJ()) == Player(4) ) then call LeaderboardSetLabelBJ( PlayerGetLeaderboardBJ(Player(4)), ( cst + I2S(udg_Player04_Creep[0]) + "/" + I2S(udg_Player04_Creep[1]) + " N " + I2S(udg_Player04_Creep[2]) ) ) return endif if ( GetOwningPlayer(GetKillingUnitBJ()) == Player(5) ) then call LeaderboardSetLabelBJ( PlayerGetLeaderboardBJ(Player(5)), ( cst + I2S(udg_Player05_Creep[0]) + "/" + I2S(udg_Player05_Creep[1]) + " N " + I2S(udg_Player05_Creep[2]) ) ) return endif if ( GetOwningPlayer(GetKillingUnitBJ()) == Player(7) ) then call LeaderboardSetLabelBJ( PlayerGetLeaderboardBJ(Player(7)), ( cst + I2S(udg_Player06_Creep[0]) + "/" + I2S(udg_Player06_Creep[1]) + " N " + I2S(udg_Player06_Creep[2]) ) ) return endif if ( GetOwningPlayer(GetKillingUnitBJ()) == Player(8) ) then call LeaderboardSetLabelBJ( PlayerGetLeaderboardBJ(Player(8)), ( cst + I2S(udg_Player07_Creep[0]) + "/" + I2S(udg_Player07_Creep[1]) + " N " + I2S(udg_Player07_Creep[2]) ) ) return endif if ( GetOwningPlayer(GetKillingUnitBJ()) == Player(9) ) then call LeaderboardSetLabelBJ( PlayerGetLeaderboardBJ(Player(9)), ( cst + I2S(udg_Player08_Creep[0]) + "/" + I2S(udg_Player08_Creep[1]) + " N " + I2S(udg_Player08_Creep[2]) ) ) return endif if ( GetOwningPlayer(GetKillingUnitBJ()) == Player(10) ) then call LeaderboardSetLabelBJ( PlayerGetLeaderboardBJ(Player(10)), ( cst + I2S(udg_Player09_Creep[0]) + "/" + I2S(udg_Player09_Creep[1]) + " N " + I2S(udg_Player09_Creep[2]) ) ) return endif if ( GetOwningPlayer(GetKillingUnitBJ()) == Player(11) ) then call LeaderboardSetLabelBJ( PlayerGetLeaderboardBJ(Player(11)), ( cst + I2S(udg_Player10_Creep[0]) + "/" + I2S(udg_Player10_Creep[1]) + " N " + I2S(udg_Player10_Creep[2]) ) ) return endif endfunction function Start_LH_Deny_Counter takes nothing returns nothing set gg_trg_LH_Deny_Counter = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_LH_Deny_Counter, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_LH_Deny_Counter, Condition( function Trig_LH_Deny_Counter_Conditions ) ) call TriggerAddAction( gg_trg_LH_Deny_Counter, function Trig_LH_Deny_Counter_Actions ) endfunction function InitTrig_LH_Deny_Counter takes nothing returns nothing endfunction//=========================================================================== // Trigger: GameStart // // 開始ã‹ã‚EåˆE //=========================================================================== function Trig_GameStart_Actions takes nothing returns nothing call PlaySoundBJ( gg_snd_TheHornOfCenarius ) call SetUnitInvulnerable( gg_unit_e000_0032, false ) call SetUnitInvulnerable( gg_unit_e000_0033, false ) call SetUnitInvulnerable( gg_unit_e000_0034, false ) call SetUnitInvulnerable( gg_unit_u008_0042, false ) call SetUnitInvulnerable( gg_unit_u008_0045, false ) call SetUnitInvulnerable( gg_unit_u008_0050, false ) call SetUnitInvulnerable( gg_unit_n003_0051, false ) call SetUnitInvulnerable( gg_unit_n004_0001, false ) call DisableTrigger( GetTriggeringTrigger() ) call ExecuteFunc("Start_CreepDeny") call ExecuteFunc("Start_DeadCount") call ExecuteFunc("Start_Player1_Kill") call ExecuteFunc("Start_Player2_Kill") call ExecuteFunc("Start_Player3_Kill") call ExecuteFunc("Start_Player4_Kill") call ExecuteFunc("Start_Player5_Kill") call ExecuteFunc("Start_Player6_Kill") call ExecuteFunc("Start_Player7_Kill") call ExecuteFunc("Start_Player8_Kill") call ExecuteFunc("Start_Player9_Kill") call ExecuteFunc("Start_Player10_Kill") call ExecuteFunc("Start_HeroKill_Creep") call ExecuteFunc("Start_Afforestation") call ExecuteFunc("Start_Periodical_Income") call ExecuteFunc("Start_CreepInterval") call ExecuteFunc("Start_CreepTurnabout") call ExecuteFunc("NeutralCreep_StartUp") call ExecuteFunc("Start_LH_Deny_Counter") call ExecuteFunc("Start_CleepAI") call ExecuteFunc("Start_TowerAI") call ExecuteFunc("Start_SiegeCleep") call ExecuteFunc("Start_Sudden_death") //call ExecuteFunc("Start_CS_Board") endfunction function InitTrig_GameStart takes nothing returns nothing set gg_trg_GameStart = CreateTrigger( ) call TriggerRegisterTimerEventSingle( gg_trg_GameStart, 110.00 ) call TriggerAddAction( gg_trg_GameStart, function Trig_GameStart_Actions ) endfunction//=========================================================================== // Trigger: CreepInterval // // Creep_Status  0or1 // 0 = Se_Top Melee 3 = Sc_Top Melee // 1 = Se_Center Melee 4 = Sc_Center Melee // 2 = Se_Bottom Melee 5 = Sc_Bottom Melee // 6 = Se_Top Range 9 = Sc_Top Range // 7 = Se_Center Range 10 = Sc_Center Range // 8 = Se_Bottom Range 11 = Sc_Bottom Range //=========================================================================== function Trig_CreepInterval_Conditions takes nothing returns boolean return udg_GameEnd == 0 endfunction function Se_Top takes nothing returns nothing call UnitAddAbilityBJ( 'A09Q', GetEnumUnit() ) call IssuePointOrderLoc( GetEnumUnit(), "attack", GetUnitLoc(gg_unit_e00V_0080) ) endfunction function Se_Center takes nothing returns nothing call UnitAddAbilityBJ( 'A09R', GetEnumUnit() ) call IssuePointOrderLoc( GetEnumUnit(), "attack", GetUnitLoc(gg_unit_unpl_0073) ) endfunction function Se_Bottom takes nothing returns nothing call UnitAddAbilityBJ( 'A09S', GetEnumUnit() ) call IssuePointOrderLoc( GetEnumUnit(), "attack", GetUnitLoc(gg_unit_e00V_0081) ) endfunction function Sc_Top takes nothing returns nothing call UnitAddAbilityBJ( 'A09Q', GetEnumUnit() ) call IssuePointOrderLoc( GetEnumUnit(), "attack", GetUnitLoc(gg_unit_e00V_0080) ) endfunction function Sc_Center takes nothing returns nothing call UnitAddAbilityBJ( 'A09R', GetEnumUnit() ) call IssuePointOrderLoc( GetEnumUnit(), "attack", GetUnitLoc(gg_unit_etol_0006) ) endfunction function Sc_Bottom takes nothing returns nothing call UnitAddAbilityBJ( 'A09S', GetEnumUnit() ) call IssuePointOrderLoc( GetEnumUnit(), "attack", GetUnitLoc(gg_unit_e00V_0081) ) endfunction function Trig_CreepInterval_Actions takes nothing returns nothing local integer sgc=udg_Creep_Siege_Counter local integer mec=udg_Creep_Count_Melee local integer rac=udg_Creep_Count_Range local integer sic=udg_Creep_Count_Siege // Top call CreateNUnitsAtLoc( mec, udg_SE_melee[udg_Creep_Status[0]], Player(0), GetRandomLocInRect(gg_rct_SE_Top_Melee), bj_UNIT_FACING ) call CreateNUnitsAtLoc( rac, udg_SE_range[udg_Creep_Status[6]], Player(0), GetRandomLocInRect(gg_rct_SE_Top_Range), bj_UNIT_FACING ) if ( sgc > 3 ) then call CreateNUnitsAtLoc( sic, udg_SE_Siege, Player(0), GetRandomLocInRect(gg_rct_SE_Top_Range), bj_UNIT_FACING ) endif call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_SE_TopStartPoint, Player(0)), function Se_Top ) // Center call CreateNUnitsAtLoc( mec, udg_SE_melee[udg_Creep_Status[1]], Player(0), GetRandomLocInRect(gg_rct_SE_Center_Melee), bj_UNIT_FACING ) call CreateNUnitsAtLoc( rac, udg_SE_range[udg_Creep_Status[7]], Player(0), GetRandomLocInRect(gg_rct_SE_Center_Range), bj_UNIT_FACING ) if ( sgc > 3 ) then call CreateNUnitsAtLoc( sic, udg_SE_Siege, Player(0), GetRandomLocInRect(gg_rct_SE_Center_Range), bj_UNIT_FACING ) endif call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_SE_CenterStartPoint, Player(0)), function Se_Center ) // Bottom call CreateNUnitsAtLoc( mec, udg_SE_melee[udg_Creep_Status[2]], Player(0), GetRandomLocInRect(gg_rct_SE_Bottom_Melee), bj_UNIT_FACING ) call CreateNUnitsAtLoc( rac, udg_SE_range[udg_Creep_Status[8]], Player(0), GetRandomLocInRect(gg_rct_SE_Bottom_Range), bj_UNIT_FACING ) if ( sgc > 3 ) then call CreateNUnitsAtLoc( sic, udg_SE_Siege, Player(0), GetRandomLocInRect(gg_rct_SE_Bottom_Range), bj_UNIT_FACING ) endif call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_SE_BottomStartPoint, Player(0)), function Se_Bottom ) // Top call CreateNUnitsAtLoc( mec, udg_SC_melee[udg_Creep_Status[3]], Player(6), GetRandomLocInRect(gg_rct_SC_Top_Melee), bj_UNIT_FACING ) call CreateNUnitsAtLoc( rac, udg_SC_range[udg_Creep_Status[9]], Player(6), GetRandomLocInRect(gg_rct_SC_Top_Range), bj_UNIT_FACING ) if ( sgc > 3 ) then call CreateNUnitsAtLoc( sic, udg_SC_Siege, Player(6), GetRandomLocInRect(gg_rct_SC_Top_Range), bj_UNIT_FACING ) endif call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_SC_TopStartPoint, Player(6)), function Sc_Top ) // Center call CreateNUnitsAtLoc( mec, udg_SC_melee[udg_Creep_Status[4]], Player(6), GetRandomLocInRect(gg_rct_SC_Center_Melee), bj_UNIT_FACING ) call CreateNUnitsAtLoc( rac, udg_SC_range[udg_Creep_Status[10]], Player(6), GetRandomLocInRect(gg_rct_SC_Center_Range), bj_UNIT_FACING ) if ( sgc > 3 ) then call CreateNUnitsAtLoc( sic, udg_SC_Siege, Player(6), GetRandomLocInRect(gg_rct_SC_Center_Range), bj_UNIT_FACING ) endif call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_SC_CenterStartPoint, Player(6)), function Sc_Center ) // Bottom call CreateNUnitsAtLoc( mec, udg_SC_melee[udg_Creep_Status[5]], Player(6), GetRandomLocInRect(gg_rct_SC_Bottom_Melee), bj_UNIT_FACING ) call CreateNUnitsAtLoc( rac, udg_SC_range[udg_Creep_Status[11]], Player(6), GetRandomLocInRect(gg_rct_SC_Bottom_Range), bj_UNIT_FACING ) if ( sgc > 3 ) then call CreateNUnitsAtLoc( sic, udg_SC_Siege, Player(6), GetRandomLocInRect(gg_rct_SC_Bottom_Range), bj_UNIT_FACING ) endif call ForGroupBJ( GetUnitsInRectOfPlayer(gg_rct_SC_BottomStartPoint, Player(6)), function Sc_Bottom ) if ( sgc <= 3 ) then set udg_Creep_Siege_Counter = ( udg_Creep_Siege_Counter + 1 ) else set udg_Creep_Siege_Counter = 0 endif endfunction function Start_CreepInterval takes nothing returns nothing set gg_trg_CreepInterval = CreateTrigger( ) call TriggerRegisterTimerEventPeriodic( gg_trg_CreepInterval, 30.00 ) call TriggerAddCondition( gg_trg_CreepInterval, Condition( function Trig_CreepInterval_Conditions ) ) call TriggerAddAction( gg_trg_CreepInterval, function Trig_CreepInterval_Actions ) endfunction function InitTrig_CreepInterval takes nothing returns nothing endfunction//=========================================================================== // Trigger: CreepTurnabout //=========================================================================== function Trig_CreepTurnabout_Conditions takes nothing returns boolean if ( GetOwningPlayer(GetEnteringUnit()) == Player(0) or GetOwningPlayer(GetEnteringUnit()) == Player(6) ) then return true endif return false endfunction function Trig_CreepTurnabout_Actions takes nothing returns nothing call UnitRemoveAbilityBJ( 'A09S', GetEnteringUnit() ) call UnitRemoveAbilityBJ( 'A09Q', GetEnteringUnit() ) if ( GetOwningPlayer(GetEnteringUnit()) == Player(0) ) then call IssuePointOrderLoc( GetEnteringUnit(), "attack", GetUnitLoc(gg_unit_unpl_0073) ) else call IssuePointOrderLoc( GetEnteringUnit(), "attack", GetUnitLoc(gg_unit_etol_0006) ) endif endfunction function Start_CreepTurnabout takes nothing returns nothing set gg_trg_CreepTurnabout = CreateTrigger( ) call TriggerRegisterUnitInRangeSimple( gg_trg_CreepTurnabout, 400.00, gg_unit_e00V_0080 ) call TriggerRegisterUnitInRangeSimple( gg_trg_CreepTurnabout, 400.00, gg_unit_e00V_0081 ) call TriggerAddCondition( gg_trg_CreepTurnabout, Condition( function Trig_CreepTurnabout_Conditions ) ) call TriggerAddAction( gg_trg_CreepTurnabout, function Trig_CreepTurnabout_Actions ) endfunction function InitTrig_CreepTurnabout takes nothing returns nothing endfunction//=========================================================================== // Trigger: SiegeCleep //=========================================================================== function Trig_SiegeCleep_Conditions takes nothing returns boolean if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then return false endif if ( GetUnitTypeId(GetAttacker()) == udg_SC_Siege ) then return true endif if ( GetUnitTypeId(GetAttacker()) == udg_SE_Siege ) then return true endif return false endfunction function TargetFunc takes nothing returns boolean if ( not ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == true ) ) then return false endif if ( not ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetAttacker())) == true ) ) then return false endif if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetFilterUnit()) > 0.00 ) ) then return false endif return true endfunction function Trig_SiegeCleep_Actions takes nothing returns nothing set udg_Mechanical_Control_Temp_target = null call DisableTrigger( GetTriggeringTrigger() ) set udg_Mechanical_Control_Temp_target = GroupPickRandomUnit(GetUnitsInRangeOfLocMatching(1400.00, GetUnitLoc(GetAttacker()), Condition(function TargetFunc))) if ( udg_Mechanical_Control_Temp_target != null ) then call IssueTargetOrder( GetAttacker(), "attack", udg_Mechanical_Control_Temp_target ) endif call EnableTrigger( GetTriggeringTrigger() ) endfunction function Start_SiegeCleep takes nothing returns nothing set gg_trg_SiegeCleep = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_SiegeCleep, EVENT_PLAYER_UNIT_ATTACKED ) call TriggerAddCondition( gg_trg_SiegeCleep, Condition( function Trig_SiegeCleep_Conditions ) ) call TriggerAddAction( gg_trg_SiegeCleep, function Trig_SiegeCleep_Actions ) endfunction function InitTrig_SiegeCleep takes nothing returns nothing endfunction//=========================================================================== // Trigger: Siege2 //=========================================================================== function Trig_Siege2_Func002001002001 takes nothing returns boolean return ( GetUnitTypeId(GetFilterUnit()) == udg_SC_Siege ) endfunction function Trig_Siege2_Func002001002002 takes nothing returns boolean return ( GetUnitTypeId(GetFilterUnit()) == udg_SE_Siege ) endfunction function Trig_Siege2_Func002001002 takes nothing returns boolean return GetBooleanOr( Trig_Siege2_Func002001002001(), Trig_Siege2_Func002001002002() ) endfunction function Trig_Siege2_Func002Func001Func001Func001C takes nothing returns boolean if ( not ( GetUnitTypeId(GetEnumUnit()) == udg_SE_Siege ) ) then return false endif return true endfunction function Trig_Siege2_Func002Func001Func001C takes nothing returns boolean if ( not ( GetUnitAbilityLevelSwapped('A09S', GetEnumUnit()) > 0 ) ) then return false endif return true endfunction function Trig_Siege2_Func002Func001C takes nothing returns boolean if ( not ( GetUnitAbilityLevelSwapped('A09Q', GetEnumUnit()) > 0 ) ) then return false endif return true endfunction function Trig_Siege2_Func002A takes nothing returns nothing if ( Trig_Siege2_Func002Func001C() ) then call IssuePointOrderLoc( GetEnumUnit(), "attack", GetUnitLoc(gg_unit_e00V_0080) ) else if ( Trig_Siege2_Func002Func001Func001C() ) then call IssuePointOrderLoc( GetEnumUnit(), "attack", GetUnitLoc(gg_unit_e00V_0081) ) else if ( Trig_Siege2_Func002Func001Func001Func001C() ) then call IssuePointOrderLoc( GetEnumUnit(), "attack", GetUnitLoc(gg_unit_unpl_0073) ) else call IssuePointOrderLoc( GetEnumUnit(), "attack", GetUnitLoc(gg_unit_etol_0006) ) endif endif endif endfunction function Trig_Siege2_Actions takes nothing returns nothing call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Siege2_Func002001002)), function Trig_Siege2_Func002A ) endfunction //=========================================================================== function InitTrig_Siege2 takes nothing returns nothing set gg_trg_Siege2 = CreateTrigger( ) call TriggerRegisterTimerEventPeriodic( gg_trg_Siege2, 5.00 ) call TriggerAddAction( gg_trg_Siege2, function Trig_Siege2_Actions ) endfunction //=========================================================================== // Trigger: TowerAI //=========================================================================== function Trig_TowerAI_Conditions takes nothing returns boolean if ( not ( IsUnitType(GetAttacker(), UNIT_TYPE_STRUCTURE) == true ) ) then return false endif if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_HERO) == false ) ) then return false endif return true endfunction function Trig_TowerAI_Actions takes nothing returns nothing local group lGroup=CreateGroup() local unit pWho=GetAttacker() local unit lTMP local unit target=GetAttackedUnitBJ() local real pxx=GetUnitX(pWho) local real pyy=GetUnitY(pWho) call GroupEnumUnitsInRange(lGroup,pxx,pyy,700,null) loop set lTMP=FirstOfGroup(lGroup) exitwhen lTMP==null if(IsUnitEnemy(lTMP,GetOwningPlayer(pWho))and IsUnitVisible(lTMP,GetOwningPlayer(pWho)))then if(GetUnitState(lTMP,UNIT_STATE_LIFE)>0)then if(GetUnitStateSwap(UNIT_STATE_LIFE, lTMP) < GetUnitStateSwap(UNIT_STATE_LIFE, target))then set target = lTMP endif endif endif call GroupRemoveUnit(lGroup,lTMP) endloop if(target != GetAttackedUnitBJ())then call IssueTargetOrder( GetAttacker(), "attack", target ) endif call DestroyGroup(lGroup) endfunction function Start_TowerAI takes nothing returns nothing set gg_trg_TowerAI = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_TowerAI, EVENT_PLAYER_UNIT_ATTACKED ) call TriggerAddCondition( gg_trg_TowerAI, Condition( function Trig_TowerAI_Conditions ) ) call TriggerAddAction( gg_trg_TowerAI, function Trig_TowerAI_Actions ) endfunction function InitTrig_TowerAI takes nothing returns nothing endfunction//=========================================================================== // Trigger: CleepAI //=========================================================================== function Trig_CleepAI_Conditions takes nothing returns boolean if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_HERO) == true ) ) then return false endif if ( not ( IsUnitType(GetAttacker(), UNIT_TYPE_HERO) == true ) ) then return false endif return true endfunction function Trig_CleepAI_Conditions2 takes nothing returns boolean if ( not ( GetUnitAbilityLevelSwapped('A08E', GetFilterUnit()) == 0 ) ) then return false endif if ( not ( IsUnitAlly(GetFilterUnit(), GetOwningPlayer(GetAttackedUnitBJ())) == true ) ) then return false endif if ( not ( GetPlayerSlotState(GetOwningPlayer(GetFilterUnit())) != PLAYER_SLOT_STATE_PLAYING ) ) then return false endif return true endfunction function Trig_CleepAI_Actions takes nothing returns nothing local group lEw local location liD=GetUnitLoc(GetAttackedUnitBJ()) local real lxx=GetLocationX(liD) local real lyy=GetLocationY(liD) local boolexpr lEW local trigger ltt=GetTriggeringTrigger() local unit tmp call DisableTrigger(ltt) set lEw=CreateGroup() set lEW=Condition(function Trig_CleepAI_Conditions2) call GroupEnumUnitsInRange(lEw,lxx,lyy,600,lEW) call GroupTargetOrder( lEw, "attack", GetAttacker() ) call PolledWait( 2 ) set tmp=FirstOfGroup(lEw) if ( GetUnitAbilityLevelSwapped('A09Q', tmp) == 1 ) then call GroupPointOrderLoc( lEw, "attack", GetUnitLoc(gg_unit_e00V_0080) ) else if ( GetUnitAbilityLevelSwapped('A09S', tmp) == 1 ) then call GroupPointOrderLoc( lEw, "attack", GetUnitLoc(gg_unit_e00V_0081) ) else if(GetOwningPlayer(tmp) == Player(0))then call GroupPointOrderLoc( lEw, "attack", GetUnitLoc(gg_unit_unpl_0073) ) else call GroupPointOrderLoc( lEw, "attack", GetUnitLoc(gg_unit_etol_0006) ) endif endif endif call DestroyGroup(lEw) call EnableTrigger(ltt) endfunction function Start_CleepAI takes nothing returns nothing set gg_trg_CleepAI = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_CleepAI, EVENT_PLAYER_UNIT_ATTACKED ) call TriggerAddCondition( gg_trg_CleepAI, Condition( function Trig_CleepAI_Conditions ) ) call TriggerAddAction( gg_trg_CleepAI, function Trig_CleepAI_Actions ) endfunction function InitTrig_CleepAI takes nothing returns nothing endfunction//=========================================================================== // Trigger: TowerBonus //=========================================================================== function Trig_TowerBonus_Func001Func002001001001 takes nothing returns boolean return ( IsPlayerEnemy(GetFilterPlayer(), GetOwningPlayer(GetDyingUnit())) == true ) endfunction function Trig_TowerBonus_Func001Func002001001002 takes nothing returns boolean return ( GetFilterPlayer() != GetOwningPlayer(GetKillingUnitBJ()) ) endfunction function Trig_TowerBonus_Func001Func002001001 takes nothing returns boolean return GetBooleanAnd( Trig_TowerBonus_Func001Func002001001001(), Trig_TowerBonus_Func001Func002001001002() ) endfunction function Trig_TowerBonus_Func001Func002Func001001002 takes nothing returns boolean return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true ) endfunction function Trig_TowerBonus_Func001Func002Func001A takes nothing returns nothing call PlaySoundOnUnitBJ( gg_snd_ReceiveGold, 100, GetEnumUnit() ) endfunction function Trig_TowerBonus_Func001Func002A takes nothing returns nothing call ForGroupBJ( GetUnitsOfPlayerMatching(GetEnumPlayer(), Condition(function Trig_TowerBonus_Func001Func002Func001001002)), function Trig_TowerBonus_Func001Func002Func001A ) call AdjustPlayerStateBJ( 200, GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD ) endfunction function Trig_TowerBonus_Func001Func003C takes nothing returns boolean if ( not ( IsPlayerAlly(GetOwningPlayer(GetKillingUnitBJ()), Player(0)) == true ) ) then return false endif return true endfunction function Trig_TowerBonus_Func001C takes nothing returns boolean if ( not ( IsUnitEnemy(GetKillingUnitBJ(), GetOwningPlayer(GetDyingUnit())) == true ) ) then return false endif return true endfunction function Trig_TowerBonus_Actions takes nothing returns nothing if ( Trig_TowerBonus_Func001C() ) then call ForForce( GetPlayersMatching(Condition(function Trig_TowerBonus_Func001Func002001001)), function Trig_TowerBonus_Func001Func002A ) if ( Trig_TowerBonus_Func001Func003C() ) then call DisplayTextToForce( GetPlayersAll(), "|c0000b4ffTower|r has been killed by |c00ff0303Sentinel|r" ) else call DisplayTextToForce( GetPlayersAll(), "|c0000b4ffTower|r has been killed by |c0020c000Scourge|r" ) endif else call DisplayTextToForce( GetPlayersAll(), ColorGet(GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))-1)+GetPlayerName(GetOwningPlayer(GetKillingUnitBJ()))+"|r has denied a tower." ) endif endfunction //=========================================================================== function InitTrig_TowerBonus takes nothing returns nothing set gg_trg_TowerBonus = CreateTrigger( ) call TriggerAddAction( gg_trg_TowerBonus, function Trig_TowerBonus_Actions ) endfunction //=========================================================================== // Trigger: TowerCollapse1st // // 1本目ã®å¡”倒å£E //=========================================================================== function Trig_TowerCollapse1st_Func010001 takes nothing returns boolean return ( GetUnitTypeId(GetDyingUnit()) == 'e000' ) endfunction function Trig_TowerCollapse1st_Func010002 takes nothing returns boolean return ( GetUnitTypeId(GetDyingUnit()) == 'u008' ) endfunction function Trig_TowerCollapse1st_Conditions takes nothing returns boolean if ( not GetBooleanOr( Trig_TowerCollapse1st_Func010001(), Trig_TowerCollapse1st_Func010002() ) ) then return false endif return true endfunction function Trig_TowerCollapse1st_Actions takes nothing returns nothing // センãƒãƒãƒ«å´ if ( GetDyingUnit() == gg_unit_e000_0033 ) then call SetUnitInvulnerable( gg_unit_e003_0031, false ) endif if ( GetDyingUnit() == gg_unit_e000_0032 ) then call SetUnitInvulnerable( gg_unit_e003_0030, false ) endif if ( GetDyingUnit() == gg_unit_e000_0034 ) then call SetUnitInvulnerable( gg_unit_e003_0029, false ) endif // ã‚¹ã‚³ãƒ¼ã‚¸å´ if ( GetDyingUnit() == gg_unit_u008_0045 ) then call SetUnitInvulnerable( gg_unit_u009_0046, false ) endif if ( GetDyingUnit() == gg_unit_u008_0042 ) then call SetUnitInvulnerable( gg_unit_u009_0043, false ) endif if ( GetDyingUnit() == gg_unit_u008_0050 ) then call SetUnitInvulnerable( gg_unit_u009_0049, false ) endif call ConditionalTriggerExecute( gg_trg_TowerBonus ) endfunction //=========================================================================== function InitTrig_TowerCollapse1st takes nothing returns nothing set gg_trg_TowerCollapse1st = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_TowerCollapse1st, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_TowerCollapse1st, Condition( function Trig_TowerCollapse1st_Conditions ) ) call TriggerAddAction( gg_trg_TowerCollapse1st, function Trig_TowerCollapse1st_Actions ) endfunction //=========================================================================== // Trigger: TowerCollapse2nd // // 2本目ã®å¡”倒å£E //=========================================================================== function Trig_TowerCollapse2nd_Func010001 takes nothing returns boolean return ( GetUnitTypeId(GetDyingUnit()) == 'e003' ) endfunction function Trig_TowerCollapse2nd_Func010002 takes nothing returns boolean return ( GetUnitTypeId(GetDyingUnit()) == 'u009' ) endfunction function Trig_TowerCollapse2nd_Conditions takes nothing returns boolean if ( not GetBooleanOr( Trig_TowerCollapse2nd_Func010001(), Trig_TowerCollapse2nd_Func010002() ) ) then return false endif return true endfunction function Trig_TowerCollapse2nd_Actions takes nothing returns nothing // センãƒãƒãƒ«å´ if ( GetDyingUnit() == gg_unit_e003_0031 ) then call SetUnitInvulnerable( gg_unit_e001_0028, false ) endif if ( GetDyingUnit() == gg_unit_e003_0030 ) then call SetUnitInvulnerable( gg_unit_e001_0027, false ) endif if ( GetDyingUnit() == gg_unit_e003_0029 ) then call SetUnitInvulnerable( gg_unit_e001_0026, false ) endif // ã‚¹ã‚³ãƒ¼ã‚¸å´ if ( GetDyingUnit() == gg_unit_u009_0046 ) then call SetUnitInvulnerable( gg_unit_u00A_0047, false ) endif if ( GetDyingUnit() == gg_unit_u009_0043 ) then call SetUnitInvulnerable( gg_unit_u00A_0044, false ) endif if ( GetDyingUnit() == gg_unit_u009_0049 ) then call SetUnitInvulnerable( gg_unit_u00A_0048, false ) endif call ConditionalTriggerExecute( gg_trg_TowerBonus ) endfunction //=========================================================================== function InitTrig_TowerCollapse2nd takes nothing returns nothing set gg_trg_TowerCollapse2nd = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_TowerCollapse2nd, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_TowerCollapse2nd, Condition( function Trig_TowerCollapse2nd_Conditions ) ) call TriggerAddAction( gg_trg_TowerCollapse2nd, function Trig_TowerCollapse2nd_Actions ) endfunction //=========================================================================== // Trigger: TowerCollapse3rd // // 3本目ã®å¡”倒å£E //=========================================================================== function Trig_TowerCollapse3rd_Func012001 takes nothing returns boolean return ( GetUnitTypeId(GetDyingUnit()) == 'e001' ) endfunction function Trig_TowerCollapse3rd_Func012002 takes nothing returns boolean return ( GetUnitTypeId(GetDyingUnit()) == 'u00A' ) endfunction function Trig_TowerCollapse3rd_Conditions takes nothing returns boolean if ( not GetBooleanOr( Trig_TowerCollapse3rd_Func012001(), Trig_TowerCollapse3rd_Func012002() ) ) then return false endif return true endfunction function Trig_TowerCollapse3rd_Func002Func002001002001 takes nothing returns boolean return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == true ) endfunction function Trig_TowerCollapse3rd_Func002Func002001002002 takes nothing returns boolean return ( GetOwningPlayer(GetFilterUnit()) == Player(0) ) endfunction function Trig_TowerCollapse3rd_Func002Func002001002 takes nothing returns boolean return GetBooleanAnd( Trig_TowerCollapse3rd_Func002Func002001002001(), Trig_TowerCollapse3rd_Func002Func002001002002() ) endfunction function Trig_TowerCollapse3rd_Func002Func002Func001C takes nothing returns boolean if ( not ( GetUnitTypeId(GetEnumUnit()) != 'etol' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e003' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'e001' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'eaom' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'eaoe' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'h004' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'edos' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n007' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n006' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n008' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n009' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n00A' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n00B' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n00C' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n005' ) ) then return false endif return true endfunction function Trig_TowerCollapse3rd_Func002Func002A takes nothing returns nothing if ( Trig_TowerCollapse3rd_Func002Func002Func001C() ) then call SetUnitInvulnerable( GetEnumUnit(), false ) else call DoNothing( ) endif endfunction function Trig_TowerCollapse3rd_Func002C takes nothing returns boolean if ( not ( GetUnitTypeId(GetDyingUnit()) == 'e001' ) ) then return false endif return true endfunction function Trig_TowerCollapse3rd_Func003C takes nothing returns boolean if ( not ( GetDyingUnit() == gg_unit_e001_0028 ) ) then return false endif return true endfunction function Trig_TowerCollapse3rd_Func004C takes nothing returns boolean if ( not ( GetDyingUnit() == gg_unit_e001_0027 ) ) then return false endif return true endfunction function Trig_TowerCollapse3rd_Func005C takes nothing returns boolean if ( not ( GetDyingUnit() == gg_unit_e001_0026 ) ) then return false endif return true endfunction function Trig_TowerCollapse3rd_Func007Func002001002001 takes nothing returns boolean return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == true ) endfunction function Trig_TowerCollapse3rd_Func007Func002001002002 takes nothing returns boolean return ( GetOwningPlayer(GetFilterUnit()) == Player(6) ) endfunction function Trig_TowerCollapse3rd_Func007Func002001002 takes nothing returns boolean return GetBooleanAnd( Trig_TowerCollapse3rd_Func007Func002001002001(), Trig_TowerCollapse3rd_Func007Func002001002002() ) endfunction function Trig_TowerCollapse3rd_Func007Func002Func001C takes nothing returns boolean if ( not ( GetUnitTypeId(GetEnumUnit()) != 'unpl' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'u009' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'u00A' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'usep' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'utod' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n002' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'ugrv' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n007' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n006' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n008' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n009' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n00A' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n00B' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n00C' ) ) then return false endif if ( not ( GetUnitTypeId(GetEnumUnit()) != 'n005' ) ) then return false endif return true endfunction function Trig_TowerCollapse3rd_Func007Func002A takes nothing returns nothing if ( Trig_TowerCollapse3rd_Func007Func002Func001C() ) then call SetUnitInvulnerable( GetEnumUnit(), false ) else call DoNothing( ) endif endfunction function Trig_TowerCollapse3rd_Func007C takes nothing returns boolean if ( not ( GetUnitTypeId(GetDyingUnit()) == 'u00A' ) ) then return false endif return true endfunction function Trig_TowerCollapse3rd_Func008C takes nothing returns boolean if ( not ( GetDyingUnit() == gg_unit_u00A_0047 ) ) then return false endif return true endfunction function Trig_TowerCollapse3rd_Func009C takes nothing returns boolean if ( not ( GetDyingUnit() == gg_unit_u00A_0044 ) ) then return false endif return true endfunction function Trig_TowerCollapse3rd_Func010C takes nothing returns boolean if ( not ( GetDyingUnit() == gg_unit_u00A_0048 ) ) then return false endif return true endfunction function Trig_TowerCollapse3rd_Actions takes nothing returns nothing // センãƒãƒãƒ«å´ if ( Trig_TowerCollapse3rd_Func002C() ) then call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_TowerCollapse3rd_Func002Func002001002)), function Trig_TowerCollapse3rd_Func002Func002A ) else call DoNothing( ) endif if ( Trig_TowerCollapse3rd_Func003C() ) then call SetUnitInvulnerable( gg_unit_eaom_0023, false ) call SetUnitInvulnerable( gg_unit_eaoe_0022, false ) else call DoNothing( ) endif if ( Trig_TowerCollapse3rd_Func004C() ) then call SetUnitInvulnerable( gg_unit_eaom_0020, false ) call SetUnitInvulnerable( gg_unit_eaoe_0019, false ) else call DoNothing( ) endif if ( Trig_TowerCollapse3rd_Func005C() ) then call SetUnitInvulnerable( gg_unit_eaom_0008, false ) call SetUnitInvulnerable( gg_unit_eaoe_0009, false ) else call DoNothing( ) endif // ã‚¹ã‚³ãƒ¼ã‚¸å´ if ( Trig_TowerCollapse3rd_Func007C() ) then call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_TowerCollapse3rd_Func007Func002001002)), function Trig_TowerCollapse3rd_Func007Func002A ) else call DoNothing( ) endif if ( Trig_TowerCollapse3rd_Func008C() ) then call SetUnitInvulnerable( gg_unit_usep_0067, false ) call SetUnitInvulnerable( gg_unit_utod_0066, false ) else call DoNothing( ) endif if ( Trig_TowerCollapse3rd_Func009C() ) then call SetUnitInvulnerable( gg_unit_usep_0054, false ) call SetUnitInvulnerable( gg_unit_utod_0055, false ) else call DoNothing( ) endif if ( Trig_TowerCollapse3rd_Func010C() ) then call SetUnitInvulnerable( gg_unit_usep_0056, false ) call SetUnitInvulnerable( gg_unit_utod_0057, false ) else call DoNothing( ) endif call ConditionalTriggerExecute( gg_trg_TowerBonus ) endfunction //=========================================================================== function InitTrig_TowerCollapse3rd takes nothing returns nothing set gg_trg_TowerCollapse3rd = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_TowerCollapse3rd, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_TowerCollapse3rd, Condition( function Trig_TowerCollapse3rd_Conditions ) ) call TriggerAddAction( gg_trg_TowerCollapse3rd, function Trig_TowerCollapse3rd_Actions ) endfunction //=========================================================================== // Trigger: TowerCollapseLast // // å…¨ã¦ã®å¡”ãŒå€’å£E //=========================================================================== function Trig_TowerCollapseLast_Func006001 takes nothing returns boolean return ( GetUnitTypeId(GetDyingUnit()) == 'e002' ) endfunction function Trig_TowerCollapseLast_Func006002 takes nothing returns boolean return ( GetUnitTypeId(GetDyingUnit()) == 'u007' ) endfunction function Trig_TowerCollapseLast_Conditions takes nothing returns boolean if ( not GetBooleanOr( Trig_TowerCollapseLast_Func006001(), Trig_TowerCollapseLast_Func006002() ) ) then return false endif return true endfunction function Trig_TowerCollapseLast_Func002C takes nothing returns boolean if ( not ( CountLivingPlayerUnitsOfTypeId('e002', Player(0)) == 0 ) ) then return false endif return true endfunction function Trig_TowerCollapseLast_Func004C takes nothing returns boolean if ( not ( CountLivingPlayerUnitsOfTypeId('u007', Player(6)) == 0 ) ) then return false endif return true endfunction function Trig_TowerCollapseLast_Actions takes nothing returns nothing if ( Trig_TowerCollapseLast_Func002C() ) then call SetUnitInvulnerable( gg_unit_etol_0006, false ) endif if ( Trig_TowerCollapseLast_Func004C() ) then call SetUnitInvulnerable( gg_unit_unpl_0073, false ) endif call ConditionalTriggerExecute( gg_trg_TowerBonus ) endfunction //=========================================================================== function InitTrig_TowerCollapseLast takes nothing returns nothing set gg_trg_TowerCollapseLast = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_TowerCollapseLast, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_TowerCollapseLast, Condition( function Trig_TowerCollapseLast_Conditions ) ) call TriggerAddAction( gg_trg_TowerCollapseLast, function Trig_TowerCollapseLast_Actions ) endfunction //=========================================================================== // Trigger: RAX Collapse //=========================================================================== function Trig_RAX_Collapse_Func014C takes nothing returns boolean if ( ( GetDyingUnit() == gg_unit_eaom_0023 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_eaom_0020 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_eaom_0008 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_eaoe_0022 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_eaoe_0019 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_eaoe_0009 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_usep_0067 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_usep_0056 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_usep_0054 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_utod_0066 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_utod_0057 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_utod_0055 ) ) then return true endif return false endfunction function Trig_RAX_Collapse_Conditions takes nothing returns boolean if ( not Trig_RAX_Collapse_Func014C() ) then return false endif return true endfunction function Trig_RAX_Collapse_Func002001 takes nothing returns boolean return ( GetDyingUnit() == gg_unit_usep_0067 ) endfunction function Trig_RAX_Collapse_Func003001 takes nothing returns boolean return ( GetDyingUnit() == gg_unit_usep_0054 ) endfunction function Trig_RAX_Collapse_Func004001 takes nothing returns boolean return ( GetDyingUnit() == gg_unit_usep_0056 ) endfunction function Trig_RAX_Collapse_Func005001 takes nothing returns boolean return ( GetDyingUnit() == gg_unit_eaom_0023 ) endfunction function Trig_RAX_Collapse_Func006001 takes nothing returns boolean return ( GetDyingUnit() == gg_unit_eaom_0020 ) endfunction function Trig_RAX_Collapse_Func007001 takes nothing returns boolean return ( GetDyingUnit() == gg_unit_eaom_0008 ) endfunction function Trig_RAX_Collapse_Func008001 takes nothing returns boolean return ( GetDyingUnit() == gg_unit_utod_0066 ) endfunction function Trig_RAX_Collapse_Func009001 takes nothing returns boolean return ( GetDyingUnit() == gg_unit_utod_0055 ) endfunction function Trig_RAX_Collapse_Func010001 takes nothing returns boolean return ( GetDyingUnit() == gg_unit_utod_0057 ) endfunction function Trig_RAX_Collapse_Func011001 takes nothing returns boolean return ( GetDyingUnit() == gg_unit_eaoe_0022 ) endfunction function Trig_RAX_Collapse_Func012001 takes nothing returns boolean return ( GetDyingUnit() == gg_unit_eaoe_0019 ) endfunction function Trig_RAX_Collapse_Func013001 takes nothing returns boolean return ( GetDyingUnit() == gg_unit_eaoe_0009 ) endfunction function Trig_RAX_Collapse_Actions takes nothing returns nothing call DisplayTextToForce( GetPlayersAll(), "|c00ff0303The Mega-Creep will appear.|r" ) if ( Trig_RAX_Collapse_Func002001() ) then set udg_Creep_Status[0] = 1 else call DoNothing( ) endif if ( Trig_RAX_Collapse_Func003001() ) then set udg_Creep_Status[1] = udg_Creep_Status[1]+1 else call DoNothing( ) endif if ( Trig_RAX_Collapse_Func004001() ) then set udg_Creep_Status[2] = udg_Creep_Status[2]+1 else call DoNothing( ) endif if ( Trig_RAX_Collapse_Func005001() ) then set udg_Creep_Status[3] = udg_Creep_Status[3]+1 else call DoNothing( ) endif if ( Trig_RAX_Collapse_Func006001() ) then set udg_Creep_Status[4] = udg_Creep_Status[4]+1 else call DoNothing( ) endif if ( Trig_RAX_Collapse_Func007001() ) then set udg_Creep_Status[5] = udg_Creep_Status[5]+1 else call DoNothing( ) endif if ( Trig_RAX_Collapse_Func008001() ) then set udg_Creep_Status[6] = udg_Creep_Status[6]+1 else call DoNothing( ) endif if ( Trig_RAX_Collapse_Func009001() ) then set udg_Creep_Status[7] = udg_Creep_Status[7]+1 else call DoNothing( ) endif if ( Trig_RAX_Collapse_Func010001() ) then set udg_Creep_Status[8] = udg_Creep_Status[8]+1 else call DoNothing( ) endif if ( Trig_RAX_Collapse_Func011001() ) then set udg_Creep_Status[9] = udg_Creep_Status[9]+1 else call DoNothing( ) endif if ( Trig_RAX_Collapse_Func012001() ) then set udg_Creep_Status[10] = udg_Creep_Status[10]+1 else call DoNothing( ) endif if ( Trig_RAX_Collapse_Func013001() ) then set udg_Creep_Status[11] = udg_Creep_Status[11]+1 else call DoNothing( ) endif endfunction //=========================================================================== function InitTrig_RAX_Collapse takes nothing returns nothing set gg_trg_RAX_Collapse = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_RAX_Collapse, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_RAX_Collapse, Condition( function Trig_RAX_Collapse_Conditions ) ) call TriggerAddAction( gg_trg_RAX_Collapse, function Trig_RAX_Collapse_Actions ) endfunction //=========================================================================== // Trigger: RAX All Collapse SE //=========================================================================== function Trig_RAX_All_Collapse_SE_Func002C takes nothing returns boolean if ( ( GetDyingUnit() == gg_unit_eaom_0023 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_eaom_0020 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_eaom_0008 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_eaoe_0022 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_eaoe_0019 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_eaoe_0009 ) ) then return true endif return false endfunction function Trig_RAX_All_Collapse_SE_Conditions takes nothing returns boolean if ( not Trig_RAX_All_Collapse_SE_Func002C() ) then return false endif return true endfunction function Trig_RAX_All_Collapse_SE_Func001C takes nothing returns boolean if ( not ( IsUnitAliveBJ(gg_unit_eaom_0008) == false ) ) then return false endif if ( not ( IsUnitAliveBJ(gg_unit_eaom_0020) == false ) ) then return false endif if ( not ( IsUnitAliveBJ(gg_unit_eaom_0023) == false ) ) then return false endif if ( not ( IsUnitAliveBJ(gg_unit_eaoe_0009) == false ) ) then return false endif if ( not ( IsUnitAliveBJ(gg_unit_eaoe_0019) == false ) ) then return false endif if ( not ( IsUnitAliveBJ(gg_unit_eaoe_0022) == false ) ) then return false endif return true endfunction function Trig_RAX_All_Collapse_SE_Actions takes nothing returns nothing if ( Trig_RAX_All_Collapse_SE_Func001C() ) then call SetPlayerTechResearchedSwap( 'Rura', 20, Player(6) ) else endif endfunction //=========================================================================== function InitTrig_RAX_All_Collapse_SE takes nothing returns nothing set gg_trg_RAX_All_Collapse_SE = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_RAX_All_Collapse_SE, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_RAX_All_Collapse_SE, Condition( function Trig_RAX_All_Collapse_SE_Conditions ) ) call TriggerAddAction( gg_trg_RAX_All_Collapse_SE, function Trig_RAX_All_Collapse_SE_Actions ) endfunction //=========================================================================== // Trigger: RAX All Collapse SC //=========================================================================== function Trig_RAX_All_Collapse_SC_Func002C takes nothing returns boolean if ( ( GetDyingUnit() == gg_unit_usep_0067 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_usep_0056 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_usep_0054 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_utod_0066 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_utod_0057 ) ) then return true endif if ( ( GetDyingUnit() == gg_unit_utod_0055 ) ) then return true endif return false endfunction function Trig_RAX_All_Collapse_SC_Conditions takes nothing returns boolean if ( not Trig_RAX_All_Collapse_SC_Func002C() ) then return false endif return true endfunction function Trig_RAX_All_Collapse_SC_Func001C takes nothing returns boolean if ( not ( IsUnitAliveBJ(gg_unit_usep_0054) == false ) ) then return false endif if ( not ( IsUnitAliveBJ(gg_unit_usep_0056) == false ) ) then return false endif if ( not ( IsUnitAliveBJ(gg_unit_usep_0067) == false ) ) then return false endif if ( not ( IsUnitAliveBJ(gg_unit_utod_0055) == false ) ) then return false endif if ( not ( IsUnitAliveBJ(gg_unit_utod_0057) == false ) ) then return false endif if ( not ( IsUnitAliveBJ(gg_unit_utod_0066) == false ) ) then return false endif return true endfunction function Trig_RAX_All_Collapse_SC_Actions takes nothing returns nothing if ( Trig_RAX_All_Collapse_SC_Func001C() ) then call SetPlayerTechResearchedSwap( 'Resw', 20, Player(0) ) else endif endfunction //=========================================================================== function InitTrig_RAX_All_Collapse_SC takes nothing returns nothing set gg_trg_RAX_All_Collapse_SC = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_RAX_All_Collapse_SC, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_RAX_All_Collapse_SC, Condition( function Trig_RAX_All_Collapse_SC_Conditions ) ) call TriggerAddAction( gg_trg_RAX_All_Collapse_SC, function Trig_RAX_All_Collapse_SC_Actions ) endfunction //=========================================================================== // Trigger: Win //=========================================================================== function Trig_Win_Func003A takes nothing returns nothing call PauseUnitBJ( true, GetEnumUnit() ) endfunction function Trig_Win_Func004A takes nothing returns nothing call PanCameraToTimedLocForPlayer( GetEnumPlayer(), GetUnitLoc(GetDyingUnit()), 0 ) call CreateFogModifierRectBJ( true, GetEnumPlayer(), FOG_OF_WAR_VISIBLE, GetPlayableMapRect() ) endfunction function Trig_Win_Func005Func001001002 takes nothing returns boolean return ( IsUnitAlly(GetFilterUnit(), Player(0)) == true ) endfunction function Trig_Win_Func005Func001A takes nothing returns nothing call SetUnitAnimationWithRarity( GetEnumUnit(), "stand victory", RARITY_RARE ) call CustomVictoryBJ( GetEnumPlayer(), false, true ) endfunction function Trig_Win_Func005Func002001002 takes nothing returns boolean return ( IsUnitAlly(GetFilterUnit(), Player(6)) == true ) endfunction function Trig_Win_Func005Func002A takes nothing returns nothing call SetUnitAnimationWithRarity( GetEnumUnit(), "stand victory", RARITY_RARE ) call CustomVictoryBJ( GetEnumPlayer(), false, true ) endfunction function Trig_Win_Func005C takes nothing returns boolean if ( not ( GetDyingUnit() == gg_unit_unpl_0073 ) ) then return false endif return true endfunction function Trig_Win_Actions takes nothing returns nothing set udg_GameEnd = 1 call AddSpecialEffectLocBJ( GetUnitLoc(GetDyingUnit()), "Objects\\Spawnmodels\\NightElf\\NECancelDeath\\NECancelDeath.mdl" ) call ForGroupBJ( GetUnitsInRectAll(GetPlayableMapRect()), function Trig_Win_Func003A ) call ForForce( GetPlayersAll(), function Trig_Win_Func004A ) if ( Trig_Win_Func005C() ) then call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Win_Func005Func001001002)), function Trig_Win_Func005Func001A ) else call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Win_Func005Func002001002)), function Trig_Win_Func005Func002A ) endif endfunction //=========================================================================== function InitTrig_Win takes nothing returns nothing set gg_trg_Win = CreateTrigger( ) call TriggerRegisterUnitEvent( gg_trg_Win, gg_unit_unpl_0073, EVENT_UNIT_DEATH ) call TriggerRegisterUnitEvent( gg_trg_Win, gg_unit_etol_0006, EVENT_UNIT_DEATH ) call TriggerAddAction( gg_trg_Win, function Trig_Win_Actions ) endfunction //=========================================================================== // Trigger: Poison Territory //=========================================================================== function Trig_Poison_Territory_Conditions takes nothing returns boolean return GetLearnedSkillBJ() == 'A0DG' endfunction function Poison_TerritoryMain takes nothing returns nothing local timer ltt=GetExpiredTimer() local string lf5=H2Tx(ltt) local group lGroup=CreateGroup() local unit pWho=GetUnit(lf5,"Hero") local unit lTMP local real pxx=GetUnitX(pWho) local real pyy=GetUnitY(pWho) local real lmZ=0.01 if(GetUnitAbilityLevel(pWho,'A0DG') == 3)then set lmZ = 0.02 endif call GroupEnumUnitsInRange(lGroup,pxx,pyy,1000,null) loop set lTMP=FirstOfGroup(lGroup) exitwhen lTMP==null if(IsUnitEnemy(lTMP,GetOwningPlayer(pWho)) and GetUnitAbilityLevel(lTMP,'A08E')!=1 and GetUnitState(lTMP,UNIT_STATE_LIFE)>0)then call UnitDamageTargetBJ(pWho,lTMP,GetUnitState(lTMP,UNIT_STATE_MAX_LIFE)*lmZ,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC) endif call GroupRemoveUnit(lGroup,lTMP) endloop call DestroyGroup(lGroup) endfunction function Trig_Poison_Territory_Actions takes nothing returns nothing local unit lfU=GetTriggerUnit() local timer ltt=CreateTimer() local string lf5=H2Tx(ltt) if (GetUnitAbilityLevel(lfU,'A0DG')==1) then call SetHandle(lf5,"Hero",lfU) call TimerStart(ltt,1,true,function Poison_TerritoryMain) else call PauseTimer(ltt) call DestroyTimer(ltt) endif endfunction function InitTrig_Poison_Territory takes nothing returns nothing set gg_trg_Poison_Territory = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Poison_Territory, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_Poison_Territory, Condition( function Trig_Poison_Territory_Conditions ) ) call TriggerAddAction( gg_trg_Poison_Territory, function Trig_Poison_Territory_Actions ) endfunction//=========================================================================== // Trigger: Bakuniku //=========================================================================== function Trig_Bakuniku_Conditions takes nothing returns boolean if ( not ( GetUnitAbilityLevelSwapped('A0CD', GetKillingUnitBJ()) > 0 ) ) then return false endif if ( not ( IsUnitEnemy(GetAttacker(), GetOwningPlayer(GetAttackedUnitBJ())) == true ) ) then return false endif if ( not ( IsUnitIllusionBJ(GetAttacker()) == false ) ) then return false endif return true endfunction function Trig_Bakuniku_Actions takes nothing returns nothing local trigger tr=GetTriggeringTrigger() local string tt=H2Tx(tr) local real count=GetReal(tt,"count") local unit k=GetKillingUnitBJ() local unit d=GetDyingUnit() if ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) then set count = count + ( GetUnitAbilityLevel(k,'A0CD')*0.3 ) else set count = count + ( GetUnitAbilityLevel(k,'A0CD')*0.03 ) endif if ( count >= 1 ) then call ModifyHeroStat( bj_HEROSTAT_STR, k, bj_MODIFYMETHOD_ADD, 1 ) set count = count - 1 call AddSpecialEffectTargetUnitBJ( "chest", k, "Abilities\\Spells\\Human\\Avatar\\AvatarCaster.mdl" ) endif call SetReal(tt,"count",count) endfunction function Start_Bakuniku takes nothing returns nothing set gg_trg_Bakuniku = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Bakuniku, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_Bakuniku, Condition( function Trig_Bakuniku_Conditions ) ) call TriggerAddAction( gg_trg_Bakuniku, function Trig_Bakuniku_Actions ) call SetReal(H2Tx(gg_trg_Bakuniku),"count",0) endfunction function InitTrig_Bakuniku takes nothing returns nothing endfunction//=========================================================================== // Trigger: BakunikuGet //=========================================================================== function Trig_BakunikuGet_Conditions takes nothing returns boolean return GetLearnedSkillBJ() == 'A0CD' endfunction function Trig_BakunikuGet_Actions takes nothing returns nothing call ModifyHeroStat( bj_HEROSTAT_STR, GetLearningUnit(), bj_MODIFYMETHOD_ADD, 10 ) endfunction function Start_BakunikuGet takes nothing returns nothing set gg_trg_BakunikuGet = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_BakunikuGet, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_BakunikuGet, Condition( function Trig_BakunikuGet_Conditions ) ) call TriggerAddAction( gg_trg_BakunikuGet, function Trig_BakunikuGet_Actions ) endfunction function InitTrig_BakunikuGet takes nothing returns nothing endfunction//=========================================================================== // Trigger: Muscle Attack //=========================================================================== function Trig_Muscle_Attack_Conditions takes nothing returns boolean if ( not ( GetUnitAbilityLevelSwapped('A002', GetAttacker()) > 0 ) ) then return false endif if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then return false endif if ( not ( IsUnitEnemy(GetAttacker(), GetOwningPlayer(GetAttackedUnitBJ())) == true ) ) then return false endif if ( not ( IsUnitIllusionBJ(GetAttacker()) == false ) ) then return false endif return true endfunction function MuscleDamage takes unit c,real x,real y,real AOE,real dam returns nothing local group G=CreateGroup() local unit uTMP local location lTMP call GroupEnumUnitsInRange(G,x,y,AOE,null) loop set uTMP=FirstOfGroup(G) exitwhen uTMP==null if IsUnitEnemy(uTMP,GetOwningPlayer(c))and IsUnitDeadBJ(uTMP)==false and GetUnitAbilityLevel(uTMP,'A08E')==0 then if(IsUnitType(uTMP,UNIT_TYPE_STRUCTURE)==false)then call UnitDamageTargetBJ(c,uTMP,dam,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION) else call UnitDamageTargetBJ(c,uTMP,dam/3,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION) endif set lTMP=GetUnitLoc(uTMP) call RemoveLocation(lTMP) call GroupRemoveUnit(G,uTMP) else call GroupRemoveUnit(G,uTMP) endif endloop call GroupClear(G) call DestroyGroup(G) endfunction function Trig_Muscle_Attack_Actions takes nothing returns nothing local trigger tr=GetTriggeringTrigger() local string tt=H2Tx(tr) local unit at=GetAttacker() local unit tg=GetAttackedUnitBJ() local real count=GetReal(tt,"count") local real lim=6-GetUnitAbilityLevel(at,'A002') local real dam=GetHeroStatBJ(bj_HEROSTAT_STR, at, true)-GetHeroStatBJ(bj_HEROSTAT_STR, tg, true) if ( count >= lim ) then if ( dam > 0 ) then call AddSpecialEffectLocBJ( GetUnitLoc(tg), "Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl" ) call DestroyEffectBJ( GetLastCreatedEffectBJ() ) call MuscleDamage(at,GetUnitX(tg),GetUnitY(tg),250,dam) endif set count = count - lim else set count = count + 1 endif call SetReal(tt,"count",count) endfunction function Start_Muscle_Attack takes nothing returns nothing set gg_trg_Muscle_Attack = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Muscle_Attack, EVENT_PLAYER_UNIT_ATTACKED ) call TriggerAddCondition( gg_trg_Muscle_Attack, Condition( function Trig_Muscle_Attack_Conditions ) ) call TriggerAddAction( gg_trg_Muscle_Attack, function Trig_Muscle_Attack_Actions ) call SetReal(H2Tx(gg_trg_Muscle_Attack),"count",0) endfunction function InitTrig_Muscle_Attack takes nothing returns nothing endfunction//=========================================================================== // Trigger: Muscle Revolution //=========================================================================== function Trig_Muscle_Revolution_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A09P' endfunction function Trig_Muscle_Revolution_Actions takes nothing returns nothing local unit c=GetTriggerUnit() local integer str=R2I(GetHeroStatBJ(bj_HEROSTAT_STR, c, false)*(GetUnitAbilityLevel(c,'A09P')*0.5)) call ModifyHeroStat( bj_HEROSTAT_STR, c, bj_MODIFYMETHOD_ADD, str ) call PolledWait( 10 ) call ModifyHeroStat( bj_HEROSTAT_STR, c, bj_MODIFYMETHOD_SUB, str ) endfunction function Start_Muscle_Revolution takes nothing returns nothing set gg_trg_Muscle_Revolution = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Muscle_Revolution, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Muscle_Revolution, Condition( function Trig_Muscle_Revolution_Conditions ) ) call TriggerAddAction( gg_trg_Muscle_Revolution, function Trig_Muscle_Revolution_Actions ) endfunction function InitTrig_Muscle_Revolution takes nothing returns nothing endfunction//=========================================================================== // Trigger: YARANAIKA //=========================================================================== function Trig_YARANAIKA_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'S005' endfunction function YARANAIKA_Main takes nothing returns nothing local timer tm=GetExpiredTimer() local string tt=H2Tx(tm) local unit c=GetUnit(tt,"Caster") local unit t=GetUnit(tt,"Target") call IssueTargetOrder( t, "attack", c ) endfunction function Trig_YARANAIKA_Actions takes nothing returns nothing local timer tm=CreateTimer() local string lf5=H2Tx(tm) local real wait=GetUnitAbilityLevel(GetTriggerUnit(),'S005')*2 call SetHandle(lf5,"Caster",GetTriggerUnit()) call SetHandle(lf5,"Target",GetSpellTargetUnit()) call TimerStart(tm,1,true,function YARANAIKA_Main) call PolledWait(wait) call PauseTimer(tm) call PolledWait(.01) call FastFlush(lf5) call DestroyTimer(tm) endfunction function Start_YARANAIKA takes nothing returns nothing set gg_trg_YARANAIKA = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_YARANAIKA, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_YARANAIKA, Condition( function Trig_YARANAIKA_Conditions ) ) call TriggerAddAction( gg_trg_YARANAIKA, function Trig_YARANAIKA_Actions ) endfunction function InitTrig_YARANAIKA takes nothing returns nothing endfunction//=========================================================================== // Trigger: The law of the jungle //=========================================================================== function Trig_The_law_of_the_jungle_Conditions takes nothing returns boolean if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then return false endif if ( not ( GetUnitAbilityLevel(GetAttacker(),'A006') > 0 ) ) then return false endif if ( not ( IsUnitEnemy(GetAttacker(), GetOwningPlayer(GetAttackedUnitBJ())) == true ) ) then return false endif if ( not ( IsUnitIllusionBJ(GetAttacker()) == false ) ) then return false endif return true endfunction function Trig_The_law_of_the_jungle_Actions takes nothing returns nothing local trigger tr=GetTriggeringTrigger() local string tt=H2Tx(tr) local real count=GetReal(tt,"The_law_of_the_jungle") local unit at=GetAttacker() if ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'B02G') == true ) then call UnitDamageTargetBJ( at, GetAttackedUnitBJ(), count *( GetUnitAbilityLevel(at,'A006') * 2) , ATTACK_TYPE_HERO, DAMAGE_TYPE_UNKNOWN ) call SetUnitLifeBJ( at, GetUnitStateSwap(UNIT_STATE_LIFE, at) + count *( GetUnitAbilityLevel(at,'A006') * 2) ) call AddSpecialEffectTargetUnitBJ( "origin", at, "Abilities\\Spells\\Human\\Heal\\HealTarget.mdl" ) set count = count + 1 else set count = 0 endif call SetReal(tt,"The_law_of_the_jungle",count) endfunction function Start_The_law_of_the_jungle takes nothing returns nothing set gg_trg_The_law_of_the_jungle = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_The_law_of_the_jungle, EVENT_PLAYER_UNIT_ATTACKED ) call TriggerAddCondition( gg_trg_The_law_of_the_jungle, Condition( function Trig_The_law_of_the_jungle_Conditions ) ) call TriggerAddAction( gg_trg_The_law_of_the_jungle, function Trig_The_law_of_the_jungle_Actions ) call SetReal(H2Tx(gg_trg_The_law_of_the_jungle),"The_law_of_the_jungle",0) endfunction function InitTrig_The_law_of_the_jungle takes nothing returns nothing endfunction//=========================================================================== // Trigger: Velg Avestar //=========================================================================== function Trig_Velg_Avestar_Conditions takes nothing returns boolean if ( not ( GetLearnedSkillBJ() == 'A029' ) ) then return false endif return true endfunction function Trig_Velg_Avestar_Main takes nothing returns nothing if ( GetRandomInt(1, 100) <= GetUnitAbilityLevelSwapped('A029', GetAttackedUnitBJ()) * 10 ) then if(IsUnitType(udg_Velg_Avestar_Target, UNIT_TYPE_STRUCTURE) == false) then if ( GetUnitStateSwap(UNIT_STATE_LIFE, udg_Velg_Avestar_Target) <= GetEventDamage() ) then call SetUnitLifeBJ( udg_Velg_Avestar_Target, 1.00 ) else call SetUnitLifeBJ( udg_Velg_Avestar_Target, ( GetUnitStateSwap(UNIT_STATE_LIFE, udg_Velg_Avestar_Target) - GetEventDamage() ) ) endif call AddSpecialEffectLocBJ( GetUnitLoc(udg_Velg_Avestar_Target), "Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl" ) endif endif endfunction function Trig_Velg_Avestar_Actions takes nothing returns nothing local trigger ava if GetUnitAbilityLevel(GetTriggerUnit(),'A029')==1 then set ava=CreateTrigger() call TriggerRegisterUnitEvent(ava,GetTriggerUnit(),EVENT_UNIT_DAMAGED) call TriggerAddAction(ava,function Trig_Velg_Avestar_Main) endif endfunction //=========================================================================== function InitTrig_Velg_Avestar takes nothing returns nothing set gg_trg_Velg_Avestar = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Velg_Avestar, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_Velg_Avestar, Condition( function Trig_Velg_Avestar_Conditions ) ) call TriggerAddAction( gg_trg_Velg_Avestar, function Trig_Velg_Avestar_Actions ) endfunction //=========================================================================== // Trigger: Velg Avestar Startup //=========================================================================== function Trig_Velg_Avestar_Startup_Conditions takes nothing returns boolean if ( not ( GetUnitTypeId(GetAttackedUnitBJ()) == 'H000' ) ) then return false endif return true endfunction function Trig_Velg_Avestar_Startup_Func001C takes nothing returns boolean if ( not ( GetPlayerController(GetOwningPlayer(GetAttacker())) == MAP_CONTROL_USER ) ) then return false endif return true endfunction function Trig_Velg_Avestar_Startup_Actions takes nothing returns nothing if ( Trig_Velg_Avestar_Startup_Func001C() ) then set udg_Velg_Avestar_Target = udg_PlayerX_Hero[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] else set udg_Velg_Avestar_Target = GetAttacker() endif endfunction //=========================================================================== function InitTrig_Velg_Avestar_Startup takes nothing returns nothing set gg_trg_Velg_Avestar_Startup = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Velg_Avestar_Startup, EVENT_PLAYER_UNIT_ATTACKED ) call TriggerAddCondition( gg_trg_Velg_Avestar_Startup, Condition( function Trig_Velg_Avestar_Startup_Conditions ) ) call TriggerAddAction( gg_trg_Velg_Avestar_Startup, function Trig_Velg_Avestar_Startup_Actions ) endfunction //=========================================================================== // Trigger: Avenger //=========================================================================== function Trig_Avenger_Conditions takes nothing returns boolean if ( not ( GetUnitTypeId(GetAttacker()) == 'H000' ) ) then return false endif if ( not ( GetUnitAbilityLevelSwapped('A00C', GetAttacker()) > 0 ) ) then return false endif if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then return false endif return true endfunction function Trig_Avenger_Actions takes nothing returns nothing local real hpr=(GetUnitStateSwap(UNIT_STATE_LIFE, GetAttackedUnitBJ()) - GetUnitStateSwap(UNIT_STATE_LIFE, GetAttacker()) ) local real dam if(hpr > 0)then set dam=hpr * ( ( I2R(GetUnitAbilityLevelSwapped('A00C', GetAttacker())) * 5.00 ) / 100.00 ) if(dam>100)then set dam=100 endif call UnitDamageTargetBJ( GetAttacker(), GetAttackedUnitBJ(),dam, ATTACK_TYPE_HERO, DAMAGE_TYPE_UNKNOWN ) call AddSpecialEffectLocBJ( GetUnitLoc(GetAttackedUnitBJ()), "Abilities\\Spells\\Orc\\Disenchant\\DisenchantSpecialArt.mdl" ) endif endfunction //=========================================================================== function InitTrig_Avenger takes nothing returns nothing set gg_trg_Avenger = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Avenger, EVENT_PLAYER_UNIT_ATTACKED ) call TriggerAddCondition( gg_trg_Avenger, Condition( function Trig_Avenger_Conditions ) ) call TriggerAddAction( gg_trg_Avenger, function Trig_Avenger_Actions ) endfunction //=========================================================================== // Trigger: Avenger Dead //=========================================================================== function Trig_Avenger_Dead_Conditions takes nothing returns boolean if ( not ( GetUnitTypeId(GetDyingUnit()) == 'H000' ) ) then return false endif if ( not ( GetUnitAbilityLevelSwapped('A00C', GetDyingUnit()) > 0 ) ) then return false endif if ( not ( IsUnitType(GetKillingUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then return false endif return true endfunction function Trig_Avenger_Dead_Actions takes nothing returns nothing call UnitDamageTargetBJ( GetDyingUnit(), GetKillingUnitBJ(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetDyingUnit()) * ( ( I2R(GetUnitAbilityLevelSwapped('A00C', GetDyingUnit())) * 15.00 ) / 100.00 ) ), ATTACK_TYPE_HERO, DAMAGE_TYPE_UNKNOWN ) call AddSpecialEffectLocBJ( GetUnitLoc(GetKillingUnitBJ()), "Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl" ) endfunction //=========================================================================== function InitTrig_Avenger_Dead takes nothing returns nothing set gg_trg_Avenger_Dead = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Avenger_Dead, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_Avenger_Dead, Condition( function Trig_Avenger_Dead_Conditions ) ) call TriggerAddAction( gg_trg_Avenger_Dead, function Trig_Avenger_Dead_Actions ) endfunction //=========================================================================== // Trigger: NightmareStyle //=========================================================================== function Trig_NightmareStyle_Conditions takes nothing returns boolean return GetLearnedSkillBJ() == 'A00K' endfunction function NightmareStyle_Main takes nothing returns nothing local string ltt=H2Tx(GetExpiredTimer()) local unit Caster=GetUnit(ltt,"Ghost") if(udg_Night_Flag == true)then call SetUnitAbilityLevelSwapped( 'A008', Caster, GetUnitAbilityLevelSwapped('A00K', Caster) ) call SetUnitMoveSpeed( Caster, GetUnitDefaultMoveSpeed(Caster) + ( I2R(GetUnitAbilityLevel(Caster,'A00K')) * 20.00 ) ) else call SetUnitAbilityLevelSwapped( 'A008', Caster, 5 ) call SetUnitMoveSpeed( Caster, GetUnitDefaultMoveSpeed(Caster) ) endif endfunction function Trig_NightmareStyle_Actions takes nothing returns nothing local timer ltt=CreateTimer() local unit lCaster=GetTriggerUnit() local string lf5=H2Tx(ltt) if (GetUnitAbilityLevel(lCaster,'A00K')==1) then call UnitAddAbilityBJ( 'A008', lCaster ) call SetUnitAbilityLevelSwapped( 'A008', lCaster, 5 ) call SetHandle(lf5,"Ghost",lCaster) call TimerStart(ltt,1,true,function NightmareStyle_Main) endif endfunction function InitTrig_NightmareStyle takes nothing returns nothing set gg_trg_NightmareStyle = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_NightmareStyle, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_NightmareStyle, Condition( function Trig_NightmareStyle_Conditions ) ) call TriggerAddAction( gg_trg_NightmareStyle, function Trig_NightmareStyle_Actions ) endfunction//=========================================================================== // Trigger: Ghost Form //=========================================================================== function Trig_Ghost_Form_Conditions takes nothing returns boolean return GetLearnedSkillBJ() == 'A07V' endfunction function Ghost_Form_Main takes nothing returns nothing local string ltt=H2Tx(GetExpiredTimer()) local unit Caster=GetUnit(ltt,"Ghost") if(udg_Night_Flag == true)then call SetUnitPathing( Caster, false ) else call SetUnitPathing( Caster, true ) endif endfunction function Trig_Ghost_Form_Actions takes nothing returns nothing local timer ltt=CreateTimer() local unit lCaster=GetTriggerUnit() local string lf5=H2Tx(ltt) if (GetUnitAbilityLevel(lCaster,'A07V')==1) then call UnitAddAbilityBJ( 'A07U', lCaster ) call SetHandle(lf5,"Ghost",lCaster) call TimerStart(ltt,1,true,function Ghost_Form_Main) else call SetUnitAbilityLevelSwapped( 'A07U', lCaster, GetUnitAbilityLevelSwapped('A07V', lCaster) ) endif endfunction function InitTrig_Ghost_Form takes nothing returns nothing set gg_trg_Ghost_Form = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Ghost_Form, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_Ghost_Form, Condition( function Trig_Ghost_Form_Conditions ) ) call TriggerAddAction( gg_trg_Ghost_Form, function Trig_Ghost_Form_Actions ) endfunction//=========================================================================== // Trigger: SpiritShock //=========================================================================== function Trig_SpiritShock_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A00F' ) ) then return false endif if ( not ( udg_Night_Flag == true ) ) then return false endif return true endfunction function Trig_SpiritShock_Actions takes nothing returns nothing call CreateNUnitsAtLoc( 1, 'h001', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call SetUnitAbilityLevelSwapped( 'A00H', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A00F', GetTriggerUnit()) ) call IssuePointOrderLoc( GetLastCreatedUnit(), "silence", GetUnitLoc(GetSpellTargetUnit()) ) endfunction //=========================================================================== function InitTrig_SpiritShock takes nothing returns nothing set gg_trg_SpiritShock = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_SpiritShock, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_SpiritShock, Condition( function Trig_SpiritShock_Conditions ) ) call TriggerAddAction( gg_trg_SpiritShock, function Trig_SpiritShock_Actions ) endfunction //=========================================================================== // Trigger: Blizzard //=========================================================================== function Trig_Blizzard_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A041' endfunction function Trig_Blizzard_Actions takes nothing returns nothing local unit c=GetTriggerUnit() local unit dummy=CreateDummy(GetTriggerPlayer(), GetUnitLoc(c),10,'A040',GetUnitAbilityLevel(c,'A041')) call IssuePointOrderLoc( dummy, "blizzard", GetSpellTargetLoc() ) endfunction function Start_Blizzard takes nothing returns nothing set gg_trg_Blizzard = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Blizzard, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Blizzard, Condition( function Trig_Blizzard_Conditions ) ) call TriggerAddAction( gg_trg_Blizzard, function Trig_Blizzard_Actions ) endfunction function InitTrig_Blizzard takes nothing returns nothing endfunction//=========================================================================== // Trigger: Swords of Revealing Light //=========================================================================== function Trig_Swords_of_Revealing_Light_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A0EG' ) ) then return false endif return true endfunction function Trig_Swords_of_Revealing_Light_Actions takes nothing returns nothing local unit c=GetTriggerUnit() local integer life=GetUnitAbilityLevel(c,'A0EG')*2+3 local unit dummy local location Ptemp = GetUnitLoc(c) local location Ptemp2 local location Ptemp3 local location Ptemp4 local integer rlen = 400 local integer Pnum local integer A = 1 local integer AEnd call CreateNUnitsAtLoc( 1, 'Udre', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING ) set dummy=GetLastCreatedUnit() call UnitAddAbilityBJ( 'A0EH', dummy ) if ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I06T') == true ) then set rlen=600 call SetUnitAbilityLevelSwapped( 'I06T', dummy, 2 ) endif call IssueImmediateOrder( dummy, "voodoo" ) set AEnd = ( rlen / 10 ) loop exitwhen A > AEnd set Ptemp2 = PolarProjectionBJ(Ptemp, I2R(rlen), ( I2R(A) * ( 360.00 / ( I2R(rlen) / 10.00 ) ) )) call CreateNUnitsAtLocFacingLocBJ( 1, 'nnmg', GetOwningPlayer(c), Ptemp2, Ptemp ) call UnitApplyTimedLifeBJ( GetRandomReal(0, 1)+life, 'BTLF', GetLastCreatedUnit() ) call RemoveLocation(Ptemp2) set A = A + 1 endloop set Ptemp2 = PolarProjectionBJ(Ptemp, I2R(rlen), 234.00) set Ptemp3 = PolarProjectionBJ(Ptemp, I2R(rlen), 90.00) set Pnum = ( R2I(DistanceBetweenPoints(Ptemp2, Ptemp3)) / 40 ) set A = 1 set AEnd = Pnum loop exitwhen A > AEnd set Ptemp4 = PolarProjectionBJ(Ptemp2, ( I2R(A) * ( DistanceBetweenPoints(Ptemp2, Ptemp3) / I2R(Pnum) ) ), AngleBetweenPoints(Ptemp2, Ptemp3)) call CreateNUnitsAtLocFacingLocBJ( 1, 'nnmg', GetOwningPlayer(c), Ptemp4, Ptemp ) call UnitApplyTimedLifeBJ( GetRandomReal(0, 1)+life, 'BTLF', GetLastCreatedUnit() ) call RemoveLocation(Ptemp4) set A = A + 1 endloop call RemoveLocation(Ptemp2) call RemoveLocation(Ptemp3) set Ptemp2 = PolarProjectionBJ(Ptemp, I2R(rlen), 90.00) set Ptemp3 = PolarProjectionBJ(Ptemp, I2R(rlen), 306.00) set Pnum = ( R2I(DistanceBetweenPoints(Ptemp2, Ptemp3)) / 40 ) set A = 1 set AEnd = Pnum loop exitwhen A > AEnd set Ptemp4 = PolarProjectionBJ(Ptemp2, ( I2R(A) * ( DistanceBetweenPoints(Ptemp2, Ptemp3) / I2R(Pnum) ) ), AngleBetweenPoints(Ptemp2, Ptemp3)) call CreateNUnitsAtLocFacingLocBJ( 1, 'nnmg', GetOwningPlayer(c), Ptemp4, Ptemp ) call UnitApplyTimedLifeBJ( GetRandomReal(0, 1)+life, 'BTLF', GetLastCreatedUnit() ) call RemoveLocation(Ptemp4) set A = A + 1 endloop call RemoveLocation(Ptemp2) call RemoveLocation(Ptemp3) set Ptemp2 = PolarProjectionBJ(Ptemp, I2R(rlen), 306.00) set Ptemp3 = PolarProjectionBJ(Ptemp, I2R(rlen), 162.00) set Pnum = ( R2I(DistanceBetweenPoints(Ptemp2, Ptemp3)) / 40 ) set A = 1 set AEnd = Pnum loop exitwhen A > AEnd set Ptemp4 = PolarProjectionBJ(Ptemp2, ( I2R(A) * ( DistanceBetweenPoints(Ptemp2, Ptemp3) / I2R(Pnum) ) ), AngleBetweenPoints(Ptemp2, Ptemp3)) call CreateNUnitsAtLocFacingLocBJ( 1, 'nnmg', GetOwningPlayer(c), Ptemp4, Ptemp ) call UnitApplyTimedLifeBJ( GetRandomReal(0, 1)+life, 'BTLF', GetLastCreatedUnit() ) call RemoveLocation(Ptemp4) set A = A + 1 endloop call RemoveLocation(Ptemp2) call RemoveLocation(Ptemp3) set Ptemp2 = PolarProjectionBJ(Ptemp, I2R(rlen), 162.00) set Ptemp3 = PolarProjectionBJ(Ptemp, I2R(rlen), 19.00) set Pnum = ( R2I(DistanceBetweenPoints(Ptemp2, Ptemp3)) / 40 ) set A = 1 set AEnd = Pnum loop exitwhen A > AEnd set Ptemp4 = PolarProjectionBJ(Ptemp2, ( I2R(A) * ( DistanceBetweenPoints(Ptemp2, Ptemp3) / I2R(Pnum) ) ), AngleBetweenPoints(Ptemp2, Ptemp3)) call CreateNUnitsAtLocFacingLocBJ( 1, 'nnmg', GetOwningPlayer(c), Ptemp4, Ptemp ) call UnitApplyTimedLifeBJ( GetRandomReal(0, 1)+life, 'BTLF', GetLastCreatedUnit() ) call RemoveLocation(Ptemp4) set A = A + 1 endloop call RemoveLocation(Ptemp2) call RemoveLocation(Ptemp3) set Ptemp2 = PolarProjectionBJ(Ptemp, I2R(rlen), 19.00) set Ptemp3 = PolarProjectionBJ(Ptemp, I2R(rlen), 234.00) set Pnum = ( R2I(DistanceBetweenPoints(Ptemp2, Ptemp3)) / 40 ) set A = 1 set AEnd = Pnum loop exitwhen A > AEnd set Ptemp4 = PolarProjectionBJ(Ptemp2, ( I2R(A) * ( DistanceBetweenPoints(Ptemp2, Ptemp3) / I2R(Pnum) ) ), AngleBetweenPoints(Ptemp2, Ptemp3)) call CreateNUnitsAtLocFacingLocBJ( 1, 'nnmg', GetOwningPlayer(c), Ptemp4, Ptemp ) call UnitApplyTimedLifeBJ( GetRandomReal(0, 1)+life, 'BTLF', GetLastCreatedUnit() ) call RemoveLocation(Ptemp4) set A = A + 1 endloop call PolledWait(life) call RemoveUnit( dummy ) call RemoveLocation(Ptemp) call RemoveLocation(Ptemp2) call RemoveLocation(Ptemp3) endfunction function Start_Swords_of_Revealing_Light takes nothing returns nothing set gg_trg_Swords_of_Revealing_Light = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Swords_of_Revealing_Light, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Swords_of_Revealing_Light, Condition( function Trig_Swords_of_Revealing_Light_Conditions ) ) call TriggerAddAction( gg_trg_Swords_of_Revealing_Light, function Trig_Swords_of_Revealing_Light_Actions ) endfunction function InitTrig_Swords_of_Revealing_Light takes nothing returns nothing endfunction//=========================================================================== // Trigger: Like the gale //=========================================================================== //TESH.scrollpos=9 //TESH.alwaysfold=1 function Trig_Like_the_gale_Conditions takes nothing returns boolean if ( not ( GetLearnedSkillBJ() == 'A049' ) ) then return false endif return true endfunction function Trig_Like_the_gale_Main takes nothing returns nothing local timer ltt=GetExpiredTimer() local string lf5=H2Tx(ltt) local real gsp=GetReal(lf5,"GaleSpeed") local location lr9=GetLocation(lf5,"GaleOldLoc") local location lRa=GetUnitLoc(udg_GaleHunter) local real lQr=DistanceBetweenPoints(lr9,lRa) if(lQr>300)then set gsp = gsp+GetUnitAbilityLevel(udg_GaleHunter,'A049') else if(gsp > 20)then set gsp = gsp-20 else set gsp = 0 endif endif call SetUnitMoveSpeed( udg_GaleHunter, ( GetUnitDefaultMoveSpeed(udg_GaleHunter) + gsp ) ) call SetHandle(lf5,"GaleOldLoc",lRa) call SetReal(lf5,"GaleSpeed",gsp) endfunction function Trig_Like_the_gale_Actions takes nothing returns nothing local timer ltt=CreateTimer() local location lRb=GetUnitLoc(GetTriggerUnit()) local string lf5=H2Tx(ltt) if GetUnitAbilityLevel(GetTriggerUnit(),'A049')==1 then set udg_GaleHunter = GetTriggerUnit() call SetHandle(lf5,"GaleOldLoc",lRb) call SetReal(lf5,"GaleSpeed",0) call TimerStart(ltt,1,true,function Trig_Like_the_gale_Main) endif endfunction //=========================================================================== function InitTrig_Like_the_gale takes nothing returns nothing set gg_trg_Like_the_gale = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Like_the_gale, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_Like_the_gale, Condition( function Trig_Like_the_gale_Conditions ) ) call TriggerAddAction( gg_trg_Like_the_gale, function Trig_Like_the_gale_Actions ) endfunction //=========================================================================== // Trigger: Divine Shield // // A006=Skill Divine Shield // B00D=Buff Divine Shield(Caster) //=========================================================================== function Trig_Divine_Shield_Conditions takes nothing returns boolean return GetLearnedSkillBJ() == 'A066' endfunction function Trig_Divine_Shield_Main takes nothing returns nothing local integer random=GetRandomInt(1, 100) if ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'B00D') == true and random <= GetUnitAbilityLevel(GetAttackedUnitBJ(),'A066' ) * 20 ) then call SetUnitLifeBJ( GetAttackedUnitBJ(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetAttackedUnitBJ()) + GetEventDamage() ) ) endif endfunction function Trig_Divine_Shield_Actions takes nothing returns nothing local trigger ltt if GetUnitAbilityLevel(GetTriggerUnit(),'A066')==1 then set ltt=CreateTrigger() call TriggerRegisterUnitEvent(ltt,GetTriggerUnit(),EVENT_UNIT_DAMAGED) call TriggerAddAction(ltt,function Trig_Divine_Shield_Main) endif endfunction function Start_Divine_Shield takes nothing returns nothing set gg_trg_Divine_Shield = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Divine_Shield, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_Divine_Shield, Condition( function Trig_Divine_Shield_Conditions ) ) call TriggerAddAction( gg_trg_Divine_Shield, function Trig_Divine_Shield_Actions ) endfunction function InitTrig_Divine_Shield takes nothing returns nothing endfunction//=========================================================================== // Trigger: Redemption Aura //=========================================================================== function Trig_Redemption_Aura_Conditions takes nothing returns boolean return GetLearnedSkillBJ() == 'A06D' endfunction function Redemption_Sub takes integer flg,unit c returns nothing local timer tm=GetExpiredTimer() local group G local real x=GetUnitX(c) local real y=GetUnitY(c) local unit uTMP set G=CreateGroup() call GroupEnumUnitsInRange(G,x,y,350,null) loop set uTMP=FirstOfGroup(G) exitwhen uTMP==null if ( IsUnitDeadBJ(uTMP)==false and GetUnitAbilityLevel(uTMP,'A08E')==0 ) then if ( IsUnitEnemy(uTMP,GetOwningPlayer(c)) == false ) then if ( flg==1 ) then call SetUnitLifeBJ( uTMP, GetUnitStateSwap(UNIT_STATE_LIFE, uTMP) + ( GetUnitAbilityLevel(c,'A06D') * 5) ) call AddSpecialEffectTargetUnitBJ( "origin", uTMP, "Abilities\\Spells\\Human\\Heal\\HealTarget.mdl" ) else call SetUnitManaBJ( uTMP, GetUnitStateSwap(UNIT_STATE_MANA, uTMP) + ( GetUnitAbilityLevel(c,'A06D') * 3) ) call AddSpecialEffectTargetUnitBJ( "origin", uTMP, "Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl" ) endif endif endif call GroupRemoveUnit(G,uTMP) endloop call GroupClear(G) call DestroyGroup(G) endfunction function Redemption_Main takes nothing returns nothing local timer tm=GetExpiredTimer() local string tt=H2Tx(tm) local group G local unit c=GetUnit(tt,"Redemption") local real x=GetUnitX(c) local real y=GetUnitY(c) local unit uTMP local boolean End=false if ( UnitHasBuffBJ(c, 'B02H') == true ) then set G=CreateGroup() call GroupEnumUnitsInRange(G,x,y,350,null) loop set uTMP=FirstOfGroup(G) exitwhen uTMP==null or End==true if ( IsUnitDeadBJ(uTMP)==true and GetUnitAbilityLevel(uTMP,'A08E')==0 and IsUnitType(uTMP, UNIT_TYPE_HERO) == false) then if ( IsUnitEnemy(uTMP,GetOwningPlayer(c)) ) then call Redemption_Sub(1,c) else call Redemption_Sub(2,c) endif call AddSpecialEffectLocBJ( Location(GetUnitX(uTMP), GetUnitY(uTMP)), "Abilities\\Spells\\Orc\\EtherealForm\\SpiritWalkerChange.mdl" ) call RemoveUnit( uTMP ) set End = true endif call GroupRemoveUnit(G,uTMP) endloop call GroupClear(G) call DestroyGroup(G) endif endfunction function Trig_Redemption_Aura_Actions takes nothing returns nothing local timer tm local string lf5 if GetUnitAbilityLevel(GetTriggerUnit(),'A06D')==1 then set tm=CreateTimer() set lf5=H2Tx(tm) call SetHandle(lf5,"Redemption",GetTriggerUnit()) call TimerStart(tm,3,true,function Redemption_Main) endif endfunction function Start_Redemption_Aura takes nothing returns nothing set gg_trg_Redemption_Aura = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Redemption_Aura, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_Redemption_Aura, Condition( function Trig_Redemption_Aura_Conditions ) ) call TriggerAddAction( gg_trg_Redemption_Aura, function Trig_Redemption_Aura_Actions ) endfunction function InitTrig_Redemption_Aura takes nothing returns nothing endfunction//=========================================================================== // Trigger: Void //=========================================================================== function Trig_Void_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A067' ) ) then return false endif if ( not ( udg_Night_Flag == true ) ) then return false endif return true endfunction function Trig_Void_Actions takes nothing returns nothing call CreateNUnitsAtLoc( 1, 'h00A', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call IssueTargetOrder( GetLastCreatedUnit(), "slow", GetSpellTargetUnit() ) endfunction //=========================================================================== function InitTrig_Void takes nothing returns nothing set gg_trg_Void = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Void, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Void, Condition( function Trig_Void_Conditions ) ) call TriggerAddAction( gg_trg_Void, function Trig_Void_Actions ) endfunction //=========================================================================== // Trigger: Crippling Fear //=========================================================================== function Trig_Crippling_Fear_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A068' ) ) then return false endif return true endfunction function Trig_Crippling_Fear_Func003C takes nothing returns boolean if ( not ( udg_Night_Flag == true ) ) then return false endif return true endfunction function Trig_Crippling_Fear_Actions takes nothing returns nothing call CreateNUnitsAtLoc( 1, 'h00A', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) if ( Trig_Crippling_Fear_Func003C() ) then call SetUnitAbilityLevelSwapped( 'A06C', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A068', GetTriggerUnit()) ) else call SetUnitAbilityLevelSwapped( 'A06C', GetLastCreatedUnit(), 5 ) endif call IssuePointOrderLoc( GetLastCreatedUnit(), "silence", GetUnitLoc(GetSpellTargetUnit()) ) endfunction //=========================================================================== function InitTrig_Crippling_Fear takes nothing returns nothing set gg_trg_Crippling_Fear = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Crippling_Fear, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Crippling_Fear, Condition( function Trig_Crippling_Fear_Conditions ) ) call TriggerAddAction( gg_trg_Crippling_Fear, function Trig_Crippling_Fear_Actions ) endfunction //=========================================================================== // Trigger: Hunter in the Night //=========================================================================== function Trig_Hunter_in_the_Night_Conditions takes nothing returns boolean return GetLearnedSkillBJ() == 'A069' endfunction function Hunter_in_the_Night_Main takes nothing returns nothing local string ltt=H2Tx(GetExpiredTimer()) local unit Caster=GetUnit(ltt,"Night Stalker") if(udg_Night_Flag == true)then call SetUnitAbilityLevelSwapped( 'A06F', Caster, GetUnitAbilityLevelSwapped('A069', Caster) ) else call SetUnitAbilityLevelSwapped( 'A06F', Caster, 5 ) endif endfunction function Trig_Hunter_in_the_Night_Actions takes nothing returns nothing local timer ltt=CreateTimer() local unit lCaster=GetTriggerUnit() local string lf5=H2Tx(ltt) if (GetUnitAbilityLevel(lCaster,'A069')==1) then call UnitAddAbilityBJ( 'A06F', lCaster ) call SetUnitAbilityLevelSwapped( 'A06F', lCaster, 5 ) call SetHandle(lf5,"Night Stalker",lCaster) call TimerStart(ltt,1,true,function Hunter_in_the_Night_Main) endif endfunction function InitTrig_Hunter_in_the_Night takes nothing returns nothing set gg_trg_Hunter_in_the_Night = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Hunter_in_the_Night, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_Hunter_in_the_Night, Condition( function Trig_Hunter_in_the_Night_Conditions ) ) call TriggerAddAction( gg_trg_Hunter_in_the_Night, function Trig_Hunter_in_the_Night_Actions ) endfunction//=========================================================================== // Trigger: Justice Judgment //=========================================================================== function Trig_Justice_Judgment_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A073' ) ) then return false endif return true endfunction function Trig_Justice_Judgment_Func001001002001 takes nothing returns boolean return ( IsUnitAlly(GetFilterUnit(), GetTriggerPlayer()) == false ) endfunction function Trig_Justice_Judgment_Func001001002002 takes nothing returns boolean return ( UnitHasBuffBJ(GetFilterUnit(), 'B00M') == true ) endfunction function Trig_Justice_Judgment_Func001001002 takes nothing returns boolean return GetBooleanAnd( Trig_Justice_Judgment_Func001001002001(), Trig_Justice_Judgment_Func001001002002() ) endfunction function Trig_Justice_Judgment_Func001Func002C takes nothing returns boolean if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) <= ( GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetEnumUnit()) * ( ( I2R(GetUnitAbilityLevelSwapped('A073', GetTriggerUnit())) * 10.00 ) / 100.00 ) ) ) ) then return false endif return true endfunction function Trig_Justice_Judgment_Func001Func013001002001 takes nothing returns boolean return ( IsUnitAlly(GetFilterUnit(), GetTriggerPlayer()) == false ) endfunction function Trig_Justice_Judgment_Func001Func013001002002001 takes nothing returns boolean return ( IsUnitDeadBJ(GetFilterUnit()) == false ) endfunction function Trig_Justice_Judgment_Func001Func013001002002002 takes nothing returns boolean return ( GetUnitAbilityLevelSwapped('A08E', GetFilterUnit()) == 0 ) endfunction function Trig_Justice_Judgment_Func001Func013001002002 takes nothing returns boolean return GetBooleanAnd( Trig_Justice_Judgment_Func001Func013001002002001(), Trig_Justice_Judgment_Func001Func013001002002002() ) endfunction function Trig_Justice_Judgment_Func001Func013001002 takes nothing returns boolean return GetBooleanAnd( Trig_Justice_Judgment_Func001Func013001002001(), Trig_Justice_Judgment_Func001Func013001002002() ) endfunction function Trig_Justice_Judgment_Func001Func013A takes nothing returns nothing local location loc=GetUnitLoc(GetLastCreatedUnit()) call CreateNUnitsAtLoc( 1, 'h006', GetTriggerPlayer(), loc, bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 20 ) call UnitAddAbilityBJ( 'A07D', GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( 'A07D', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A073', GetTriggerUnit()) ) call IssueTargetOrder( GetLastCreatedUnit(), "chainlightning", GetEnumUnit() ) endfunction function Trig_Justice_Judgment_Func001A takes nothing returns nothing local integer x=5 if ( Trig_Justice_Judgment_Func001Func002C() ) then call SetUnitLifeBJ( GetEnumUnit(), 1.00 ) else call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - ( GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetEnumUnit()) * ( ( I2R(GetUnitAbilityLevelSwapped('A073', GetTriggerUnit())) * 10.00 ) / 100.00 ) ) ) ) endif loop exitwhen x<=0 call CreateNUnitsAtLoc( 1, 'e00H', GetTriggerPlayer(), GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetEnumUnit()), 1000.00, 1000.00)), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call UnitAddAbilityBJ( 'A0A9', GetLastCreatedUnit() ) call IssueTargetOrder( GetLastCreatedUnit(), "chainlightning", GetEnumUnit() ) set x=x-1 endloop call CreateNUnitsAtLoc( 1, 'h006', GetTriggerPlayer(), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 5 ) call ForGroupBJ( GetUnitsInRectMatching(RectFromCenterSizeBJ(GetUnitLoc(GetLastCreatedUnit()), 1000.00, 1000.00), Condition(function Trig_Justice_Judgment_Func001Func013001002)), function Trig_Justice_Judgment_Func001Func013A ) endfunction function Trig_Justice_Judgment_Actions takes nothing returns nothing call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Justice_Judgment_Func001001002)), function Trig_Justice_Judgment_Func001A ) endfunction //=========================================================================== function InitTrig_Justice_Judgment takes nothing returns nothing set gg_trg_Justice_Judgment = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Justice_Judgment, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Justice_Judgment, Condition( function Trig_Justice_Judgment_Conditions ) ) call TriggerAddAction( gg_trg_Justice_Judgment, function Trig_Justice_Judgment_Actions ) endfunction //=========================================================================== // Trigger: Blink_Strike //=========================================================================== // OpenDota 6.41 deprotected by NETRAT and DioD // inspired by everyone who posted on forum threads and feedback page // based on OpenDota 6.32b, deprotected by DimonT, NETRAT and TheBloodiest // http://dimon.xgm.ru/opendota/ // Visit our modmaking community at http://xgm.ru/ // Objects used: // 'A09W' = Blink Strike // DEBUG Trigger Number : 334 function Trig_Blink_Strike_Conditions takes nothing returns boolean return GetSpellAbilityId()=='A09W' endfunction function Trig_Blink_Strike_Actions takes nothing returns nothing local unit lfo=GetTriggerUnit() local unit lFB=GetSpellTargetUnit() local real lf7=30*GetUnitAbilityLevel(lfo,GetSpellAbilityId()) call SetUnitX(lfo,GetUnitX(lFB)) call SetUnitY(lfo,GetUnitY(lFB)) if IsUnitEnemy(lFB,GetOwningPlayer(lfo))then call UnitDamageTargetBJ(lfo,lFB,lf7,ATTACK_TYPE_MELEE,DAMAGE_TYPE_NORMAL) call IssueTargetOrderById(lfo,OrderId("attack"),lFB) endif endfunction function InitTrig_Blink_Strike takes nothing returns nothing set gg_trg_Blink_Strike=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(gg_trg_Blink_Strike,EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddCondition(gg_trg_Blink_Strike,Condition(function Trig_Blink_Strike_Conditions)) call TriggerAddAction(gg_trg_Blink_Strike,function Trig_Blink_Strike_Actions) endfunction//=========================================================================== // Trigger: Mana Burst //=========================================================================== function Trig_Mana_Burst_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A078' ) ) then return false endif return true endfunction function Trig_Mana_Burst_Actions takes nothing returns nothing call TriggerSleepAction( 0.10 ) call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) * ( ( I2R(GetUnitAbilityLevelSwapped('A078', GetTriggerUnit())) * 0.30 ) + 0.30 ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC ) call SetUnitManaBJ( GetTriggerUnit(), 0.00 ) endfunction //=========================================================================== function InitTrig_Mana_Burst takes nothing returns nothing set gg_trg_Mana_Burst = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Mana_Burst, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Mana_Burst, Condition( function Trig_Mana_Burst_Conditions ) ) call TriggerAddAction( gg_trg_Mana_Burst, function Trig_Mana_Burst_Actions ) endfunction //=========================================================================== // Trigger: Mana Burst X //=========================================================================== function Trig_Mana_Burst_X_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A0C5' ) ) then return false endif return true endfunction function Trig_Mana_Burst_X_Actions takes nothing returns nothing call TriggerSleepAction( 0.10 ) call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) * ( ( I2R(GetUnitAbilityLevelSwapped('A0C5', GetTriggerUnit())) * 0.40 ) + 0.30 ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC ) call SetUnitManaBJ( GetTriggerUnit(), 0.00 ) endfunction //=========================================================================== function InitTrig_Mana_Burst_X takes nothing returns nothing set gg_trg_Mana_Burst_X = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Mana_Burst_X, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Mana_Burst_X, Condition( function Trig_Mana_Burst_X_Conditions ) ) call TriggerAddAction( gg_trg_Mana_Burst_X, function Trig_Mana_Burst_X_Actions ) endfunction //=========================================================================== // Trigger: Mind Revolution //=========================================================================== function Trig_Mind_Revolution_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A077' endfunction function Trig_Mind_Revolution_Actions takes nothing returns nothing local unit tunit=GetTriggerUnit() local unit target=GetSpellTargetUnit() local real Mymp=GetUnitStateSwap(UNIT_STATE_MANA, tunit) local real Enmp=GetUnitStateSwap(UNIT_STATE_MANA, target) local real skill= I2R(GetUnitAbilityLevelSwapped('A077', tunit)) * 0.15 if( Mymp > Enmp ) then call UnitDamageTargetBJ( tunit, target, ( Mymp - Enmp ) * skill , ATTACK_TYPE_HERO, DAMAGE_TYPE_MAGIC ) call AddSpecialEffectTargetUnitBJ( "origin", target, "Abilities\\Spells\\Items\\TomeOfRetraining\\TomeOfRetrainingCaster.mdl" ) call PutText("|c007e6ff1"+ I2S(R2I(( Mymp - Enmp ) * skill))+"|r",GetUnitLoc(target)) else call SetUnitLifeBJ( tunit, ( GetUnitStateSwap(UNIT_STATE_LIFE, tunit) + ( ( Enmp - Mymp ) * skill ) ) ) call AddSpecialEffectTargetUnitBJ( "origin", tunit, "Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl" ) call PutText("|c007e6ff1"+ I2S(R2I(( Enmp - Mymp ) * skill)) +"|r",GetUnitLoc(tunit)) endif endfunction //=========================================================================== function InitTrig_Mind_Revolution takes nothing returns nothing set gg_trg_Mind_Revolution = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Mind_Revolution, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Mind_Revolution, Condition( function Trig_Mind_Revolution_Conditions ) ) call TriggerAddAction( gg_trg_Mind_Revolution, function Trig_Mind_Revolution_Actions ) endfunction //=========================================================================== // Trigger: Mana Flare //=========================================================================== function Trig_Mana_Flare_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A075' ) ) then return false endif return true endfunction function Trig_Mana_Flare_Actions takes nothing returns nothing call TriggerSleepAction( 0.20 ) call SetUnitAnimation( GetTriggerUnit(), "stand ready" ) endfunction //=========================================================================== function InitTrig_Mana_Flare takes nothing returns nothing set gg_trg_Mana_Flare = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Mana_Flare, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Mana_Flare, Condition( function Trig_Mana_Flare_Conditions ) ) call TriggerAddAction( gg_trg_Mana_Flare, function Trig_Mana_Flare_Actions ) endfunction //=========================================================================== // Trigger: oyabun //=========================================================================== function Trig_oyabun_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A07E' endfunction function Trig_oyabun_Actions takes nothing returns nothing local unit c=GetTriggerUnit() local unit tp=GetSpellTargetUnit() local location ef local real len=400+200*GetUnitAbilityLevelSwapped('A07E',c) local real lnM loop exitwhen len<=0 set lnM=Atan2(GetUnitY(tp)-GetUnitY(c),GetUnitX(tp)-GetUnitX(c)) set ef=Location(GetUnitX(tp)+100*Cos(lnM),GetUnitY(tp)+100*Sin(lnM)) call SetUnitPositionLoc(tp,ef) call AddSpecialEffectLocBJ( ef, "Abilities\\Spells\\Other\\Incinerate\\FireLordDeathExplode.mdl" ) call RemoveLocation(ef) set len=len-100 endloop endfunction function Start_oyabun takes nothing returns nothing set gg_trg_oyabun = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_oyabun, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_oyabun, Condition( function Trig_oyabun_Conditions ) ) call TriggerAddAction( gg_trg_oyabun, function Trig_oyabun_Actions ) endfunction function InitTrig_oyabun takes nothing returns nothing endfunction//=========================================================================== // Trigger: Triple Wave //=========================================================================== function Trig_Triple_Wave_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A079' endfunction function Trig_Triple_Wave_Actions takes nothing returns nothing local unit c=GetTriggerUnit() local unit dummy1=CreateDummy(GetTriggerPlayer(),GetUnitLoc(c),1,'A07A',GetUnitAbilityLevel(c,'A079')) local unit dummy2=CreateDummy(GetTriggerPlayer(),GetUnitLoc(c),1,'A07A',GetUnitAbilityLevel(c,'A079')) call SetUnitFacingTimed( dummy1, GetUnitFacing(c) + 90.00, 0 ) call SetUnitFacingTimed( dummy2, GetUnitFacing(c) - 90.00, 0 ) call IssuePointOrderLoc( dummy1, "shockwave", PolarProjectionBJ(PolarProjectionBJ(GetUnitLoc(c), 700.00, GetUnitFacing(c)), 350.00, GetUnitFacing(dummy1)) ) call IssuePointOrderLoc( dummy2, "shockwave", PolarProjectionBJ(PolarProjectionBJ(GetUnitLoc(c), 700.00, GetUnitFacing(c)), 350.00, GetUnitFacing(dummy2)) ) endfunction function Start_Triple_Wave takes nothing returns nothing set gg_trg_Triple_Wave = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Triple_Wave, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Triple_Wave, Condition( function Trig_Triple_Wave_Conditions ) ) call TriggerAddAction( gg_trg_Triple_Wave, function Trig_Triple_Wave_Actions ) endfunction function InitTrig_Triple_Wave takes nothing returns nothing endfunction//=========================================================================== // Trigger: Wild Shot //=========================================================================== function Trig_Wild_Shot_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A07H' endfunction function Trig_Wild_Shot_Actions takes nothing returns nothing local unit c=GetTriggerUnit() local integer lcc=4+4*GetUnitAbilityLevel(c,'A07H') local location lll=GetSpellTargetLoc() local location lmm loop exitwhen lcc<=0 set lmm=PolarProjectionBJ(lll,GetRandomReal(0,360),GetRandomReal(0,360)) call CreateNUnitsAtLoc( 1, 'e00E', GetTriggerPlayer(), GetUnitLoc(c), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call IssuePointOrderLoc( GetLastCreatedUnit(), "attackground", lmm ) set lcc=lcc-1 endloop call RemoveLocation(lll) call RemoveLocation(lmm) endfunction function Start_Wild_Shot takes nothing returns nothing set gg_trg_Wild_Shot = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Wild_Shot, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Wild_Shot, Condition( function Trig_Wild_Shot_Conditions ) ) call TriggerAddAction( gg_trg_Wild_Shot, function Trig_Wild_Shot_Actions ) endfunction function InitTrig_Wild_Shot takes nothing returns nothing endfunction//=========================================================================== // Trigger: Destructive Shot //=========================================================================== function Trig_Destructive_Shot_Conditions takes nothing returns boolean if ( GetSpellAbilityId() == 'A07I' ) then return true endif if ( GetSpellAbilityId() == 'A00E' ) then return true endif return false endfunction function Trig_Destructive_Shot_Actions takes nothing returns nothing local integer count local unit c=GetTriggerUnit() local location Target=GetSpellTargetLoc() local location Cpoint=GetUnitLoc(c) local location ranl local real cd=5+GetUnitAbilityLevel(c,'A00E') if ( UnitHasItemOfTypeBJ(c, 'I05V') == true ) then set count=20+30*GetUnitAbilityLevel(c,'A00E') else set count=30*GetUnitAbilityLevel(c,'A07I') endif loop exitwhen count<=0 if ( UnitHasItemOfTypeBJ(c, 'I05V') == true ) then set ranl=PolarProjectionBJ(Target,GetRandomReal(0,650),GetRandomReal(0,650)) else set ranl=PolarProjectionBJ(Target,GetRandomReal(0,800),GetRandomReal(0,800)) endif call CreateNUnitsAtLoc( 1, 'e00F', GetTriggerPlayer(), Cpoint, bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call IssuePointOrderLoc( GetLastCreatedUnit(), "attackground", ranl ) if ( ModuloReal(count, cd) == 0 ) then call PolledWait(0.01) endif set count=count-1 endloop call RemoveLocation(Target) call RemoveLocation(Cpoint) call RemoveLocation(ranl) endfunction function Start_Destructive_Shot takes nothing returns nothing set gg_trg_Destructive_Shot = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Destructive_Shot, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Destructive_Shot, Condition( function Trig_Destructive_Shot_Conditions ) ) call TriggerAddAction( gg_trg_Destructive_Shot, function Trig_Destructive_Shot_Actions ) endfunction function InitTrig_Destructive_Shot takes nothing returns nothing endfunction//=========================================================================== // Trigger: Explosion Impale //=========================================================================== function Trig_Explosion_Impale_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A07O' ) ) then return false endif return true endfunction function Trig_Explosion_Impale_Actions takes nothing returns nothing call CreateNUnitsAtLoc( 1, 'h006', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING ) call UnitAddAbilityBJ( 'A07P', GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( 'A07P', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A07O', GetTriggerUnit()) ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call IssueImmediateOrder( GetLastCreatedUnit(), "thunderclap" ) endfunction //=========================================================================== function InitTrig_Explosion_Impale takes nothing returns nothing set gg_trg_Explosion_Impale = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Explosion_Impale, EVENT_PLAYER_UNIT_SPELL_FINISH ) call TriggerAddCondition( gg_trg_Explosion_Impale, Condition( function Trig_Explosion_Impale_Conditions ) ) call TriggerAddAction( gg_trg_Explosion_Impale, function Trig_Explosion_Impale_Actions ) endfunction //=========================================================================== // Trigger: Dislike Stampede //=========================================================================== function Trig_Dislike_Stampede_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A07S' ) ) then return false endif return true endfunction function Trig_Dislike_Stampede_Actions takes nothing returns nothing call CreateNUnitsAtLoc( 1, 'h006', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) ) call UnitAddAbilityBJ( 'A07T', GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( 'A07T', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A07S', GetTriggerUnit()) ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 5 ) call IssuePointOrderLoc( GetLastCreatedUnit(), "stampede", PolarProjectionBJ(GetUnitLoc(GetLastCreatedUnit()), 100.00, GetUnitFacing(GetLastCreatedUnit())) ) endfunction //=========================================================================== function InitTrig_Dislike_Stampede takes nothing returns nothing set gg_trg_Dislike_Stampede = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Dislike_Stampede, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Dislike_Stampede, Condition( function Trig_Dislike_Stampede_Conditions ) ) call TriggerAddAction( gg_trg_Dislike_Stampede, function Trig_Dislike_Stampede_Actions ) endfunction //=========================================================================== // Trigger: wanwan //=========================================================================== function Trig_wanwan_Conditions takes nothing returns boolean if ( not ( GetLearnedSkillBJ() == 'A00N' ) ) then return false endif return true endfunction function Trig_wanwan_Actions takes nothing returns nothing call SetPlayerTechResearchedSwap( 'R000', GetUnitAbilityLevelSwapped('A00N', GetTriggerUnit()), GetTriggerPlayer() ) endfunction //=========================================================================== function InitTrig_wanwan takes nothing returns nothing set gg_trg_wanwan = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_wanwan, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_wanwan, Condition( function Trig_wanwan_Conditions ) ) call TriggerAddAction( gg_trg_wanwan, function Trig_wanwan_Actions ) endfunction //=========================================================================== // Trigger: Firewall //=========================================================================== function Trig_Firewall_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A084' endfunction function Trig_Firewall_Actions takes nothing returns nothing local unit caster=GetSpellAbilityUnit() local location target=GetSpellTargetLoc() local integer ltm=GetUnitAbilityLevel(caster,'A084')*2+2 local integer x call CreateNUnitsAtLoc( 1, 'nmys', GetOwningPlayer(caster), target, bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, ltm ) call SetUnitAbilityLevelSwapped( 'A0DZ', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A084', caster) ) set x = 0 loop exitwhen x > 10 call CreateNUnitsAtLoc( 1, 'nmys', GetOwningPlayer(caster), PolarProjectionBJ(target, ( I2R(x) * 50.00 ), ( GetUnitFacing(caster) + 90.00 )), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, ltm ) call SetUnitAbilityLevelSwapped( 'A0DZ', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A084', caster) ) set x = x+1 endloop set x = 0 loop exitwhen x>10 call CreateNUnitsAtLoc( 1, 'nmys', GetOwningPlayer(caster), PolarProjectionBJ(target, ( I2R(x) * 50.00 ), ( GetUnitFacing(caster) - 90.00 )), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, ltm ) call SetUnitAbilityLevelSwapped( 'A0DZ', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A084', caster) ) set x = x+1 endloop endfunction function Start_Firewall takes nothing returns nothing set gg_trg_Firewall = CreateTrigger() call TriggerRegisterAnyUnitEventBJ( gg_trg_Firewall, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Firewall, Condition( function Trig_Firewall_Conditions ) ) call TriggerAddAction( gg_trg_Firewall, function Trig_Firewall_Actions ) endfunction function InitTrig_Firewall takes nothing returns nothing endfunction//=========================================================================== // Trigger: Burning Shot //=========================================================================== function Trig_Burning_Shot_Conditions takes nothing returns boolean return GetUnitAbilityLevel(GetAttacker(),'A07G') > 0 endfunction function Trig_Burning_Shot_Actions takes nothing returns nothing local trigger ltt=GetTriggeringTrigger() local string lf5=H2Tx(ltt) local real count=GetReal(lf5,"Burning_Shot") local unit sfo=GetAttacker() if ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'BNic') == true ) then call UnitDamageTargetBJ( sfo, GetAttackedUnitBJ(), count *( GetUnitAbilityLevel(sfo,'A07G') * 3.00) , ATTACK_TYPE_HERO, DAMAGE_TYPE_UNKNOWN ) if ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'B025') == true ) then set count = count + 2 else set count = count + 1 endif else set count = 0 endif call SetReal(lf5,"Burning_Shot",count) endfunction function Start_Burning_Shot takes nothing returns nothing set gg_trg_Burning_Shot = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Burning_Shot, EVENT_PLAYER_UNIT_ATTACKED ) call TriggerAddCondition( gg_trg_Burning_Shot, Condition( function Trig_Burning_Shot_Conditions ) ) call TriggerAddAction( gg_trg_Burning_Shot, function Trig_Burning_Shot_Actions ) call SetReal(H2Tx(gg_trg_Burning_Shot),"Burning_Shot",0) endfunction function InitTrig_Burning_Shot takes nothing returns nothing endfunction//=========================================================================== // Trigger: Aurora Cannon //=========================================================================== function Trig_Aurora_Cannon_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A086' ) ) then return false endif return true endfunction function Trig_Aurora_Cannon_Func001C takes nothing returns boolean if ( not ( GetTriggerEventId() == EVENT_PLAYER_UNIT_SPELL_EFFECT ) ) then return false endif return true endfunction function Trig_Aurora_Cannon_Actions takes nothing returns nothing if ( Trig_Aurora_Cannon_Func001C() ) then call StartTimerBJ( udg_AuroraCannon_Timer, false, 5.00 ) else call CreateNUnitsAtLoc( 1, 'h006', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call UnitAddAbilityBJ( 'A087', GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( 'A087', GetLastCreatedUnit(), R2I(TimerGetElapsed(udg_AuroraCannon_Timer)) ) call IssuePointOrderLoc( GetLastCreatedUnit(), "breathoffire", PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 250.00, GetUnitFacing(GetTriggerUnit())) ) endif endfunction //=========================================================================== function InitTrig_Aurora_Cannon takes nothing returns nothing set gg_trg_Aurora_Cannon = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Aurora_Cannon, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Aurora_Cannon, EVENT_PLAYER_UNIT_SPELL_ENDCAST ) call TriggerAddCondition( gg_trg_Aurora_Cannon, Condition( function Trig_Aurora_Cannon_Conditions ) ) call TriggerAddAction( gg_trg_Aurora_Cannon, function Trig_Aurora_Cannon_Actions ) endfunction //=========================================================================== // Trigger: DeLay Flare //=========================================================================== function Trig_DeLay_Flare_Conditions takes nothing returns boolean if ( not ( GetLearnedSkillBJ() == 'A08A' ) ) then return false endif return true endfunction function Trig_DeLay_Flare_Func001C takes nothing returns boolean if ( not ( GetUnitAbilityLevelSwapped('A08B', GetTriggerUnit()) == 0 ) ) then return false endif return true endfunction function Trig_DeLay_Flare_Actions takes nothing returns nothing if ( Trig_DeLay_Flare_Func001C() ) then call UnitAddAbilityBJ( 'A08B', GetTriggerUnit() ) call UnitAddAbilityBJ( 'A08C', GetTriggerUnit() ) else call SetUnitAbilityLevelSwapped( 'A08B', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A08A', GetTriggerUnit()) ) call SetUnitAbilityLevelSwapped( 'A08C', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A08A', GetTriggerUnit()) ) endif endfunction //=========================================================================== function InitTrig_DeLay_Flare takes nothing returns nothing set gg_trg_DeLay_Flare = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_DeLay_Flare, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_DeLay_Flare, Condition( function Trig_DeLay_Flare_Conditions ) ) call TriggerAddAction( gg_trg_DeLay_Flare, function Trig_DeLay_Flare_Actions ) endfunction //=========================================================================== // Trigger: Fire Bolt //=========================================================================== function Trig_Fire_Bolt_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A08H' ) ) then return false endif return true endfunction function Trig_Fire_Bolt_Actions takes nothing returns nothing if(GetRandomInt(1, 100) <= GetUnitAbilityLevelSwapped('A0BU', GetTriggerUnit())*10)then if(GetUnitAbilityLevelSwapped('A08M', GetTriggerUnit()) == 0)then call UnitAddAbilityBJ( 'A08M', GetTriggerUnit() ) set udg_Elemental_Flag = udg_Elemental_Flag + 1 endif if(GetUnitAbilityLevelSwapped('A08N', GetTriggerUnit()) == 0)then call UnitAddAbilityBJ( 'A08N', GetTriggerUnit() ) set udg_Elemental_Flag = udg_Elemental_Flag + 1 endif if(GetUnitAbilityLevelSwapped('A08O', GetTriggerUnit()) == 0)then call UnitAddAbilityBJ( 'A08O', GetTriggerUnit() ) set udg_Elemental_Flag = udg_Elemental_Flag + 1 endif if(GetUnitAbilityLevelSwapped('A0BF', GetTriggerUnit()) == 0)then call UnitAddAbilityBJ( 'A0BF', GetTriggerUnit() ) set udg_Elemental_Flag = udg_Elemental_Flag + 1 endif if(GetUnitAbilityLevelSwapped('A0BG', GetTriggerUnit()) == 0)then call UnitAddAbilityBJ( 'A0BG', GetTriggerUnit() ) set udg_Elemental_Flag = udg_Elemental_Flag + 1 endif call PutText("|c00ff8000Chain Casting|r", GetUnitLoc(GetTriggerUnit())) else if(udg_Elemental_Flag < 10)then if(udg_Elemental_Flag < 5)then if(udg_Elemental_Flag == 0)then call UnitAddAbilityBJ( 'A08M', GetTriggerUnit() ) endif if(udg_Elemental_Flag == 1)then call UnitAddAbilityBJ( 'A08N', GetTriggerUnit() ) endif if(udg_Elemental_Flag == 2)then call UnitAddAbilityBJ( 'A08O', GetTriggerUnit() ) endif if(udg_Elemental_Flag == 3)then call UnitAddAbilityBJ( 'A0BF', GetTriggerUnit() ) endif if(udg_Elemental_Flag == 4)then call UnitAddAbilityBJ( 'A0BG', GetTriggerUnit() ) endif set udg_Elemental_Flag = udg_Elemental_Flag + 1 endif else set udg_Elemental_Flag = 1 call Elemental_Reset(GetTriggerUnit()) call UnitAddAbilityBJ( 'A08M', GetTriggerUnit() ) endif endif endfunction //=========================================================================== function InitTrig_Fire_Bolt takes nothing returns nothing set gg_trg_Fire_Bolt = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Fire_Bolt, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Fire_Bolt, Condition( function Trig_Fire_Bolt_Conditions ) ) call TriggerAddAction( gg_trg_Fire_Bolt, function Trig_Fire_Bolt_Actions ) endfunction //=========================================================================== // Trigger: Ice Bolt //=========================================================================== function Trig_Ice_Bolt_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A08G' ) ) then return false endif return true endfunction function Trig_Ice_Bolt_Actions takes nothing returns nothing if(GetRandomInt(1, 100) <= GetUnitAbilityLevelSwapped('A0BU', GetTriggerUnit())*10)then if(GetUnitAbilityLevelSwapped('A08P', GetTriggerUnit()) == 0)then call UnitAddAbilityBJ( 'A08P', GetTriggerUnit() ) set udg_Elemental_Flag = udg_Elemental_Flag + 10 endif if(GetUnitAbilityLevelSwapped('A08Q', GetTriggerUnit()) == 0)then call UnitAddAbilityBJ( 'A08Q', GetTriggerUnit() ) set udg_Elemental_Flag = udg_Elemental_Flag + 10 endif if(GetUnitAbilityLevelSwapped('A08R', GetTriggerUnit()) == 0)then call UnitAddAbilityBJ( 'A08R', GetTriggerUnit() ) set udg_Elemental_Flag = udg_Elemental_Flag + 10 endif if(GetUnitAbilityLevelSwapped('A0BH', GetTriggerUnit()) == 0)then call UnitAddAbilityBJ( 'A0BH', GetTriggerUnit() ) set udg_Elemental_Flag = udg_Elemental_Flag + 10 endif if(GetUnitAbilityLevelSwapped('A0BI', GetTriggerUnit()) == 0)then call UnitAddAbilityBJ( 'A0BI', GetTriggerUnit() ) set udg_Elemental_Flag = udg_Elemental_Flag + 10 endif call PutText("|c00ff8000Chain Casting|r", GetUnitLoc(GetTriggerUnit())) else if(udg_Elemental_Flag < 100 and udg_Elemental_Flag >= 10)then if(udg_Elemental_Flag < 50)then if(udg_Elemental_Flag == 10)then call UnitAddAbilityBJ( 'A08Q', GetTriggerUnit() ) endif if(udg_Elemental_Flag == 20)then call UnitAddAbilityBJ( 'A08R', GetTriggerUnit() ) endif if(udg_Elemental_Flag == 30)then call UnitAddAbilityBJ( 'A0BH', GetTriggerUnit() ) endif if(udg_Elemental_Flag == 40)then call UnitAddAbilityBJ( 'A0BI', GetTriggerUnit() ) endif set udg_Elemental_Flag = udg_Elemental_Flag + 10 endif else set udg_Elemental_Flag = 10 call Elemental_Reset(GetTriggerUnit()) call UnitAddAbilityBJ( 'A08P', GetTriggerUnit() ) endif endif endfunction //=========================================================================== function InitTrig_Ice_Bolt takes nothing returns nothing set gg_trg_Ice_Bolt = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Ice_Bolt, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Ice_Bolt, Condition( function Trig_Ice_Bolt_Conditions ) ) call TriggerAddAction( gg_trg_Ice_Bolt, function Trig_Ice_Bolt_Actions ) endfunction //=========================================================================== // Trigger: Lightning Bolt //=========================================================================== function Trig_Lightning_Bolt_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A08I' ) ) then return false endif return true endfunction function Trig_Lightning_Bolt_Actions takes nothing returns nothing if(GetRandomInt(1, 100) <= GetUnitAbilityLevelSwapped('A0BU', GetTriggerUnit())*10)then if(GetUnitAbilityLevelSwapped('A08S', GetTriggerUnit()) == 0)then call UnitAddAbilityBJ( 'A08S', GetTriggerUnit() ) set udg_Elemental_Flag = udg_Elemental_Flag + 100 endif if(GetUnitAbilityLevelSwapped('A08T', GetTriggerUnit()) == 0)then call UnitAddAbilityBJ( 'A08T', GetTriggerUnit() ) set udg_Elemental_Flag = udg_Elemental_Flag + 100 endif if(GetUnitAbilityLevelSwapped('A08U', GetTriggerUnit()) == 0)then call UnitAddAbilityBJ( 'A08U', GetTriggerUnit() ) set udg_Elemental_Flag = udg_Elemental_Flag + 100 endif if(GetUnitAbilityLevelSwapped('A0BJ', GetTriggerUnit()) == 0)then call UnitAddAbilityBJ( 'A0BJ', GetTriggerUnit() ) set udg_Elemental_Flag = udg_Elemental_Flag + 100 endif if(GetUnitAbilityLevelSwapped('A0BK', GetTriggerUnit()) == 0)then call UnitAddAbilityBJ( 'A0BK', GetTriggerUnit() ) set udg_Elemental_Flag = udg_Elemental_Flag + 100 endif call PutText("|c00ff8000Chain Casting|r", GetUnitLoc(GetTriggerUnit())) else if(udg_Elemental_Flag >= 100)then if(udg_Elemental_Flag < 500)then if(udg_Elemental_Flag == 100)then call UnitAddAbilityBJ( 'A08T', GetTriggerUnit() ) endif if(udg_Elemental_Flag == 200)then call UnitAddAbilityBJ( 'A08U', GetTriggerUnit() ) endif if(udg_Elemental_Flag == 300)then call UnitAddAbilityBJ( 'A0BJ', GetTriggerUnit() ) endif if(udg_Elemental_Flag == 400)then call UnitAddAbilityBJ( 'A0BK', GetTriggerUnit() ) endif set udg_Elemental_Flag = udg_Elemental_Flag + 100 endif else set udg_Elemental_Flag = 100 call Elemental_Reset(GetTriggerUnit()) call UnitAddAbilityBJ( 'A08S', GetTriggerUnit() ) endif endif endfunction //=========================================================================== function InitTrig_Lightning_Bolt takes nothing returns nothing set gg_trg_Lightning_Bolt = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Lightning_Bolt, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Lightning_Bolt, Condition( function Trig_Lightning_Bolt_Conditions ) ) call TriggerAddAction( gg_trg_Lightning_Bolt, function Trig_Lightning_Bolt_Actions ) endfunction //=========================================================================== // Trigger: Elemental Cast Get //=========================================================================== function Trig_Elemental_Cast_Get_Func003C takes nothing returns boolean if ( ( GetLearnedSkillBJ() == 'A08H' ) ) then return true endif if ( ( GetLearnedSkillBJ() == 'A08G' ) ) then return true endif if ( ( GetLearnedSkillBJ() == 'A08I' ) ) then return true endif return false endfunction function Trig_Elemental_Cast_Get_Conditions takes nothing returns boolean if ( not ( GetUnitAbilityLevelSwapped('A08J', GetTriggerUnit()) == 0 ) ) then return false endif if ( not Trig_Elemental_Cast_Get_Func003C() ) then return false endif return true endfunction function Trig_Elemental_Cast_Get_Actions takes nothing returns nothing call UnitAddAbilityBJ( 'A08J', GetTriggerUnit() ) endfunction //=========================================================================== function InitTrig_Elemental_Cast_Get takes nothing returns nothing set gg_trg_Elemental_Cast_Get = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Elemental_Cast_Get, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_Elemental_Cast_Get, Condition( function Trig_Elemental_Cast_Get_Conditions ) ) call TriggerAddAction( gg_trg_Elemental_Cast_Get, function Trig_Elemental_Cast_Get_Actions ) endfunction //=========================================================================== // Trigger: Elemental Cast //=========================================================================== function Get_Skill takes integer slv,integer Type returns nothing if(Type == 1)then if(slv == 1)then call UnitAddAbilityBJ( 'A0BL', GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( 'A0BL', GetLastCreatedUnit(), udg_Elemental_Flag ) return endif if(slv == 2)then call UnitAddAbilityBJ( 'A0BM', GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( 'A0BM', GetLastCreatedUnit(), udg_Elemental_Flag ) return endif if(slv == 3)then call UnitAddAbilityBJ( 'A0BN', GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( 'A0BN', GetLastCreatedUnit(), udg_Elemental_Flag ) return endif if(slv == 4)then call UnitAddAbilityBJ( 'A0BO', GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( 'A0BO', GetLastCreatedUnit(), udg_Elemental_Flag ) return endif endif if(Type == 2)then if(slv == 1)then call UnitAddAbilityBJ( 'A0BQ', GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( 'A0BQ', GetLastCreatedUnit(), udg_Elemental_Flag/100 ) return endif if(slv == 2)then call UnitAddAbilityBJ( 'A0BR', GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( 'A0BR', GetLastCreatedUnit(), udg_Elemental_Flag/100 ) return endif if(slv == 3)then call UnitAddAbilityBJ( 'A0BS', GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( 'A0BS', GetLastCreatedUnit(), udg_Elemental_Flag/100 ) return endif if(slv == 4)then call UnitAddAbilityBJ( 'A0BT', GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( 'A0BT', GetLastCreatedUnit(), udg_Elemental_Flag/100 ) return endif endif endfunction function Trig_Elemental_Cast_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A08J' ) ) then return false endif return true endfunction function Trig_Elemental_Cast_Actions takes nothing returns nothing local integer x = udg_Elemental_Flag local unit target = GetSpellTargetUnit() if(x < 10 and x != 0)then loop exitwhen x<=0 call CreateNUnitsAtLoc( 1, 'h006', GetTriggerPlayer(), GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 300.00, 300.00)), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call Get_Skill(GetUnitAbilityLevelSwapped('A08H', GetTriggerUnit()),1) call IssueTargetOrder( GetLastCreatedUnit(), "firebolt", target ) //call TriggerSleepAction( 0.01 ) set x = x - 1 endloop set udg_Elemental_Flag = 0 call Elemental_Reset(GetTriggerUnit()) endif if(x < 100 and x >= 10)then call CreateNUnitsAtLoc( 1, 'h006', GetTriggerPlayer(), GetRandomLocInRect(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 300.00, 300.00)), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call UnitAddAbilityBJ( 'A0BP', GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( 'A0BP', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A08G', GetTriggerUnit()) ) call IssueTargetOrder( GetLastCreatedUnit(), "frostnova", target ) if(udg_Elemental_Flag == 10)then call UnitRemoveAbilityBJ( 'A08P', GetTriggerUnit() ) endif if(udg_Elemental_Flag == 20)then call UnitRemoveAbilityBJ( 'A08Q', GetTriggerUnit() ) endif if(udg_Elemental_Flag == 30)then call UnitRemoveAbilityBJ( 'A08R', GetTriggerUnit() ) endif if(udg_Elemental_Flag == 40)then call UnitRemoveAbilityBJ( 'A0BH', GetTriggerUnit() ) endif if(udg_Elemental_Flag == 50)then call UnitRemoveAbilityBJ( 'A0BI', GetTriggerUnit() ) endif set udg_Elemental_Flag = udg_Elemental_Flag - 10 endif if(x >= 100)then call CreateNUnitsAtLoc( 1, 'h006', GetTriggerPlayer(),GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call Get_Skill(GetUnitAbilityLevelSwapped('A08I', GetTriggerUnit()),2) call IssueTargetOrder( GetLastCreatedUnit(), "forkedlightning", target ) set udg_Elemental_Flag = 0 call Elemental_Reset(GetTriggerUnit()) endif endfunction //=========================================================================== function InitTrig_Elemental_Cast takes nothing returns nothing set gg_trg_Elemental_Cast = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Elemental_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Elemental_Cast, Condition( function Trig_Elemental_Cast_Conditions ) ) call TriggerAddAction( gg_trg_Elemental_Cast, function Trig_Elemental_Cast_Actions ) endfunction //=========================================================================== // Trigger: Width Doom //=========================================================================== function Trig_Width_Doom_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A0A3' ) ) then return false endif return true endfunction function Trig_Width_Doom_Func001001002 takes nothing returns boolean return ( IsUnitEnemy(GetFilterUnit(), GetTriggerPlayer()) == true ) endfunction function Trig_Width_Doom_Func001Func002C takes nothing returns boolean if ( not ( GetUnitAbilityLevelSwapped('A0A3', GetTriggerUnit()) == 1 ) ) then return false endif return true endfunction function Trig_Width_Doom_Func001Func003C takes nothing returns boolean if ( not ( GetUnitAbilityLevelSwapped('A0A3', GetTriggerUnit()) == 2 ) ) then return false endif return true endfunction function Trig_Width_Doom_Func001Func004C takes nothing returns boolean if ( not ( GetUnitAbilityLevelSwapped('A0A3', GetTriggerUnit()) == 3 ) ) then return false endif return true endfunction function Trig_Width_Doom_Func001A takes nothing returns nothing call CreateNUnitsAtLoc( 1, 'h006', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING ) if ( Trig_Width_Doom_Func001Func002C() ) then call UnitAddAbilityBJ( 'A09Y', GetLastCreatedUnit() ) else endif if ( Trig_Width_Doom_Func001Func003C() ) then call UnitAddAbilityBJ( 'A09Z', GetLastCreatedUnit() ) else endif if ( Trig_Width_Doom_Func001Func004C() ) then call UnitAddAbilityBJ( 'A0A0', GetLastCreatedUnit() ) else endif call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call IssueTargetOrder( GetLastCreatedUnit(), "doom", GetEnumUnit() ) endfunction function Trig_Width_Doom_Actions takes nothing returns nothing call ForGroupBJ( GetUnitsInRectMatching(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 1200.00, 1200.00), Condition(function Trig_Width_Doom_Func001001002)), function Trig_Width_Doom_Func001A ) endfunction //=========================================================================== function InitTrig_Width_Doom takes nothing returns nothing set gg_trg_Width_Doom = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Width_Doom, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Width_Doom, Condition( function Trig_Width_Doom_Conditions ) ) call TriggerAddAction( gg_trg_Width_Doom, function Trig_Width_Doom_Actions ) endfunction //=========================================================================== // Trigger: Chaos Meteor //=========================================================================== function Trig_Chaos_Meteor_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'AHfs' ) ) then return false endif return true endfunction function Trig_Chaos_Meteor_Actions takes nothing returns nothing call CreateNUnitsAtLoc( 1, 'h003', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 3 ) call UnitAddAbilityBJ( 'AUin', GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( 'AUin', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('AHfs', GetTriggerUnit()) ) call IssuePointOrderLoc( GetLastCreatedUnit(), "dreadlordinferno", GetSpellTargetLoc() ) endfunction //=========================================================================== function InitTrig_Chaos_Meteor takes nothing returns nothing set gg_trg_Chaos_Meteor = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Chaos_Meteor, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Chaos_Meteor, Condition( function Trig_Chaos_Meteor_Conditions ) ) call TriggerAddAction( gg_trg_Chaos_Meteor, function Trig_Chaos_Meteor_Actions ) endfunction //=========================================================================== // Trigger: Legend Weapon //=========================================================================== function Trig_Legend_Weapon_Conditions takes nothing returns boolean return GetLearnedSkillBJ() == 'A0A1' endfunction function Legend_Weapon_Main takes nothing returns nothing local string ltt=H2Tx(GetExpiredTimer()) local unit Caster=GetUnit(ltt,"Lucifer") if(udg_Night_Flag == true)then if(GetUnitAbilityLevel(Caster,'A09V') > 0)then call SetUnitAbilityLevelSwapped( 'A09V', Caster, GetUnitAbilityLevel(Caster,'A0A1') ) else call UnitRemoveAbilityBJ( 'A09U', Caster ) call UnitAddAbilityBJ( 'A09V', Caster ) call SetUnitAbilityLevelSwapped( 'A09V', Caster, GetUnitAbilityLevel(Caster,'A0A1') ) endif else if(GetUnitAbilityLevel(Caster,'A09U') > 0)then call SetUnitAbilityLevelSwapped( 'A09U', Caster, GetUnitAbilityLevel(Caster,'A0A1') ) else call UnitRemoveAbilityBJ( 'A09V', Caster ) call UnitAddAbilityBJ( 'A09U', Caster ) call SetUnitAbilityLevelSwapped( 'A09U', Caster, GetUnitAbilityLevel(Caster,'A0A1') ) endif endif endfunction function Trig_Legend_Weapon_Actions takes nothing returns nothing local timer ltt=CreateTimer() local unit lCaster=GetTriggerUnit() local string lf5=H2Tx(ltt) if (GetUnitAbilityLevel(lCaster,'A0A1')==1) then if(udg_Night_Flag == true)then call UnitAddAbilityBJ( 'A09V', lCaster ) else call UnitAddAbilityBJ( 'A09U', lCaster ) endif call SetHandle(lf5,"Lucifer",lCaster) call TimerStart(ltt,1,true,function Legend_Weapon_Main) endif endfunction function InitTrig_Legend_Weapon takes nothing returns nothing set gg_trg_Legend_Weapon = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Legend_Weapon, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_Legend_Weapon, Condition( function Trig_Legend_Weapon_Conditions ) ) call TriggerAddAction( gg_trg_Legend_Weapon, function Trig_Legend_Weapon_Actions ) endfunction//=========================================================================== // Trigger: Battle Order //=========================================================================== function Trig_Battle_Order_Conditions takes nothing returns boolean if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'o002' ) ) then return false endif return true endfunction function Trig_Battle_Order_Actions takes nothing returns nothing call SetUnitAbilityLevelSwapped( 'A0A4', GetSummonedUnit(), GetUnitAbilityLevelSwapped('Ahwd', GetSummoningUnit()) ) call SetUnitAbilityLevelSwapped( 'A0A5', GetSummonedUnit(), GetUnitAbilityLevelSwapped('Ahwd', GetSummoningUnit()) ) call SetUnitAbilityLevelSwapped( 'A0A6', GetSummonedUnit(), GetUnitAbilityLevelSwapped('Ahwd', GetSummoningUnit()) ) call SetUnitAbilityLevelSwapped( 'A0A7', GetSummonedUnit(), GetUnitAbilityLevelSwapped('Ahwd', GetSummoningUnit()) ) endfunction //=========================================================================== function InitTrig_Battle_Order takes nothing returns nothing set gg_trg_Battle_Order = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Battle_Order, EVENT_PLAYER_UNIT_SUMMON ) call TriggerAddCondition( gg_trg_Battle_Order, Condition( function Trig_Battle_Order_Conditions ) ) call TriggerAddAction( gg_trg_Battle_Order, function Trig_Battle_Order_Actions ) endfunction //=========================================================================== // Trigger: Land Groan //=========================================================================== function Trig_Land_Groan_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'AOeq' ) ) then return false endif return true endfunction function Trig_Land_Groan_Actions takes nothing returns nothing call CreateNUnitsAtLoc( 1, 'h006', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 11 ) call UnitAddAbilityBJ( 'A0A8', GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( 'A0A8', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('AOeq', GetTriggerUnit()) ) call IssuePointOrderLoc( GetLastCreatedUnit(), "earthquake", GetSpellTargetLoc() ) endfunction //=========================================================================== function InitTrig_Land_Groan takes nothing returns nothing set gg_trg_Land_Groan = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Land_Groan, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Land_Groan, Condition( function Trig_Land_Groan_Conditions ) ) call TriggerAddAction( gg_trg_Land_Groan, function Trig_Land_Groan_Actions ) endfunction //=========================================================================== // Trigger: Moon Glaive //=========================================================================== function Trig_Moon_Glaive_Conditions takes nothing returns boolean if ( not ( GetLearnedSkillBJ() == 'Amgl' ) ) then return false endif return true endfunction function Trig_Moon_Glaive_Actions takes nothing returns nothing call SetPlayerTechResearchedSwap( 'Remg', GetUnitAbilityLevelSwapped('Amgl', GetTriggerUnit()), GetTriggerPlayer() ) endfunction //=========================================================================== function InitTrig_Moon_Glaive takes nothing returns nothing set gg_trg_Moon_Glaive = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Moon_Glaive, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_Moon_Glaive, Condition( function Trig_Moon_Glaive_Conditions ) ) call TriggerAddAction( gg_trg_Moon_Glaive, function Trig_Moon_Glaive_Actions ) endfunction //=========================================================================== // Trigger: Eclipse //=========================================================================== function Trig_Eclipse_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A08F' ) ) then return false endif return true endfunction function Trig_Eclipse_Flag takes nothing returns boolean if ( not ( IsUnitEnemy(GetFilterUnit(), GetTriggerPlayer()) == true ) ) then return false endif if ( not ( IsUnitDeadBJ(GetFilterUnit()) == false ) ) then return false endif if ( not ( GetUnitAbilityLevelSwapped('A08E', GetFilterUnit()) == 0 ) ) then return false endif return true endfunction function Trig_Eclipse_Func004C takes nothing returns boolean if ( not ( CountUnitsInGroup(GetUnitsInRectMatching(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 1200.00, 1200.00), Condition(function Trig_Eclipse_Flag))) > 0 ) ) then return false endif return true endfunction function Trig_Eclipse_Actions takes nothing returns nothing local integer lcc=1+3*GetUnitAbilityLevelSwapped('A08F', GetTriggerUnit()) local integer x=1 local integer y=0 local integer limit=0 local unit target local unit array hit local timer tim=CreateTimer() call StartTimerBJ( tim, false, 10.00 ) loop exitwhen lcc<=0 if ( Trig_Eclipse_Func004C() ) then set target = GroupPickRandomUnit(GetUnitsInRectMatching(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 1200.00, 1200.00), Condition(function Trig_Eclipse_Flag))) set limit=0 if(x == 1)then set hit[1] = target set x=x+1 else set y=x-1 loop exitwhen y<=1 if(target == hit[y])then set limit=limit+1 endif set y=y-1 endloop if(limit <= 4)then set hit[x] = target set x=x+1 endif endif if(limit <= 4)then call CreateNUnitsAtLoc( 1, 'h006', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING ) call UnitAddAbilityBJ( 'A0AE', GetLastCreatedUnit() ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call IssueTargetOrder( GetLastCreatedUnit(), "chainlightning", target ) set lcc=lcc-1 endif endif call TriggerSleepAction( 0.30 ) if (TimerGetRemaining(tim) <= 0.00 ) then set lcc=0 endif endloop endfunction //=========================================================================== function InitTrig_Eclipse takes nothing returns nothing set gg_trg_Eclipse = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Eclipse, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Eclipse, Condition( function Trig_Eclipse_Conditions ) ) call TriggerAddAction( gg_trg_Eclipse, function Trig_Eclipse_Actions ) endfunction//=========================================================================== // Trigger: Spectral_Dagger //=========================================================================== // Objects used: // 'A0AF' = Spectral Dagger (Spectre : Mercurial) // 'e00Z' = Shadow Path // 'A0AG' = Spectral Dagger (Shadow Path) // 'A0AH' = Spectral Dagger (Shadow Path) // 'I02K' = Divine Rapier // 'I006' = Gem of True Sight // 'B017' = Spectral Dagger // 'e00W' = Shadow Dagger function Spectral_Dagger_TrailSafe takes nothing returns nothing local timer ltt=GetExpiredTimer() local string lf5=H2Tx(ltt) local unit lfo=GetUnit(lf5,"UnitVar") local unit le3=GetUnit(lf5,"Owner") local unit lJV local real lOZ=GetReal(lf5,"Duration") local integer lmZ=GetUnitAbilityLevel(le3,'A0HW') local real lT7=GetReal(lf5,"x") local real lT8=GetReal(lf5,"y") local real lpC=GetUnitX(lfo) local real lpd=GetUnitY(lfo) if(lpC-lT7)*(lpC-lT7)+(lpd-lT8)*(lpd-lT8)>900 then set lJV=CreateUnit(GetOwningPlayer(le3),'e00Z',GetUnitX(lfo),GetUnitY(lfo),0) call SetUnitAbilityLevel(lJV,'A0I2',lmZ) call SetUnitAbilityLevel(lJV,'A0HY',lmZ) call UnitApplyTimedLife(lJV,'BTLF',7) call SetReal(lf5,"x",lpC) call SetReal(lf5,"y",lpd) endif set lOZ=lOZ+.2 call SetReal(lf5,"Duration",lOZ) if lOZ>7 or GetUnitState(lfo,UNIT_STATE_LIFE)<1 then call PauseTimer(ltt) call FastFlush(lf5) endif endfunction function Spectral_Dagger_Damage takes nothing returns nothing local unit lFB=GetEnumUnit() local sound lfG local timer ltt local string lf5 call UnitDamageTarget(udg_unit_temp,lFB,udg_Spectre_damage,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS) call GroupAddUnit(udg_UNKNOWN_group,lFB) if IsUnitType(lFB,UNIT_TYPE_HERO) then set ltt=CreateTimer() set lf5=H2Tx(ltt) set lfG=CreateSound("Sounds\\Spectral Dagger.mp3",false,true,true,10,10,"DefaultEAXON") call SetSoundPosition(lfG,GetUnitX(lFB),GetUnitY(lFB),0) call SetSoundDistanceCutoff(lfG,700) call StartSound(lfG) call KillSoundWhenDone(lfG) call SetHandle(lf5,"UnitVar",lFB) call SetHandle(lf5,"Owner",udg_unit_temp) call SetReal(lf5,"x",GetUnitX(lFB)) call SetReal(lf5,"y",GetUnitY(lFB)) call TimerStart(ltt,.2,true,function Spectral_Dagger_TrailSafe) endif endfunction function Spectral_Dagger_Filter takes nothing returns boolean return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(udg_unit_temp))and IsUnitInGroup(GetFilterUnit(),udg_UNKNOWN_group)==false and GetUnitAbilityLevel(GetFilterUnit(),'A04R')==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false endfunction // DEBUG Trigger Number : 100 function Spectral_Dagger_MoveClon takes nothing returns nothing local timer ltt=GetExpiredTimer() local string lf5=H2Tx(ltt) local group lMW=GetGroup(lf5,"AlreadyDamaged") local group lEw=CreateGroup() local boolexpr lEW=Condition(function Spectral_Dagger_Filter) local unit lfU=GetUnit(lf5,"Hero") local unit lpc=GetUnit(lf5,"Projectile") local unit lFB=GetUnit(lf5,"Target") local real lEv=GetUnitX(lFB) local real lEV=GetUnitY(lFB) local real lFC=GetUnitX(lpc) local real lFd=GetUnitY(lpc) local real lnM=Atan2(lEV-lFd,lEv-lFC) local real lpC=SafeX(GetUnitX(lpc)+30*Cos(lnM)) local real lpd=SafeY(GetUnitY(lpc)+30*Sin(lnM)) local unit lJV local integer lmZ=GetUnitAbilityLevel(lfU,'A0AF') if GetBoolean(lf5,"TrailNext")then call SetBoolean(lf5,"TrailNext",false) set lJV=CreateUnit(GetOwningPlayer(lfU),'e00Z',lFC,lFd,0) call SetUnitAbilityLevel(lJV,'A0AG',lmZ) call SetUnitAbilityLevel(lJV,'A0AH',lmZ) call UnitApplyTimedLife(lJV,'BTLF',12) else call SetBoolean(lf5,"TrailNext",true) endif call SetUnitX(lpc,lpC) call SetUnitY(lpc,lpd) call SetUnitFacing(lpc,lnM*bj_RADTODEG) set udg_UNKNOWN_group=lMW set udg_unit_temp=lfU set udg_Spectre_damage=50*GetUnitAbilityLevel(lfU,'A0AF') call GroupEnumUnitsInRange(lEw,lpC,lpd,150,lEW) call ForGroup(lEw,function Spectral_Dagger_Damage) call DestroyGroup(lEw) call DestroyBoolExpr(lEW) if(lpC-lEv)*(lpC-lEv)+(lpd-lEV)*(lpd-lEV)<1600 then call PauseTimer(ltt) call FastFlush(lf5) call KillUnit(lpc) call DestroyGroup(lMW) endif endfunction function Spectral_Dagger_Move takes nothing returns nothing local timer ltt=GetExpiredTimer() local string lf5=H2Tx(ltt) local group lMW=GetGroup(lf5,"AlreadyDamaged") local group lEw=CreateGroup() local boolexpr lEW=Condition(function Spectral_Dagger_Filter) local unit lfU=GetUnit(lf5,"Hero") local unit lpc=GetUnit(lf5,"Projectile") local real lEv=GetReal(lf5,"TargetX") local real lEV=GetReal(lf5,"TargetY") local real lFC=GetUnitX(lpc) local real lFd=GetUnitY(lpc) local real lnM=GetReal(lf5,"Angle") local real lpC=SafeX(GetUnitX(lpc)+30*Cos(lnM)) local real lpd=SafeY(GetUnitY(lpc)+30*Sin(lnM)) local unit lJV local integer lmZ=GetUnitAbilityLevel(lfU,'A0AF') if GetBoolean(lf5,"TrailNext")then call SetBoolean(lf5,"TrailNext",false) set lJV=CreateUnit(GetOwningPlayer(lfU),'e00Z',lFC,lFd,0) call SetUnitAbilityLevel(lJV,'A0AG',lmZ) call SetUnitAbilityLevel(lJV,'A0AH',lmZ) call UnitApplyTimedLife(lJV,'BTLF',12) else call SetBoolean(lf5,"TrailNext",true) endif call SetUnitX(lpc,lpC) call SetUnitY(lpc,lpd) set udg_UNKNOWN_group=lMW set udg_unit_temp=lfU set udg_Spectre_damage=50*GetUnitAbilityLevel(lfU,'A0AF') call GroupEnumUnitsInRange(lEw,lpC,lpd,150,lEW) call ForGroup(lEw,function Spectral_Dagger_Damage) call DestroyGroup(lEw) call DestroyBoolExpr(lEW) if(lpC-lEv)*(lpC-lEv)+(lpd-lEV)*(lpd-lEV)<1600 then call PauseTimer(ltt) call FastFlush(lf5) call KillUnit(lpc) call DestroyGroup(lMW) endif endfunction function IsItemDrops takes unit pfo,integer pfy returns boolean if(GetItemTypeId(UnitItemInSlot(pfo,pfy))=='I02K')then return true endif if(GetItemTypeId(UnitItemInSlot(pfo,pfy))=='I006')then return true endif return false endfunction function Spectral_Dagger_ItemsSafe takes nothing returns nothing local timer ltt=GetExpiredTimer() local string lf5=H2Tx(ltt) local unit lfU=GetUnit(lf5,"Hero") local real lOZ=GetReal(lf5,"Duration") local integer lEq=0 loop exitwhen lEq>5 if IsItemDrops(lfU,lEq)then if GetUnitAbilityLevel(lfU,'B017')==0 then call SetItemDropOnDeath(UnitItemInSlot(lfU,lEq),true) if GetItemTypeId(UnitItemInSlot(lfU,lEq))=='I006'then call SetItemDroppable(UnitItemInSlot(lfU,lEq),true) endif else call SetItemDropOnDeath(UnitItemInSlot(lfU,lEq),false) if GetItemTypeId(UnitItemInSlot(lfU,lEq))=='I006'then call SetItemDroppable(UnitItemInSlot(lfU,lEq),false) endif endif endif set lEq=lEq+1 endloop set lOZ=lOZ+.2 call SetReal(lf5,"Duration",lOZ) if GetUnitAbilityLevel(lfU,'B017')==0 then call SetUnitPathing(lfU,true) else call SetUnitPathing(lfU,false) endif if lOZ>20 then call PauseTimer(ltt) call FastFlush(lf5) call SetUnitPathing(lfU,true) set lEq=0 loop exitwhen lEq>5 if IsItemDrops(lfU,lEq)then call SetItemDropOnDeath(UnitItemInSlot(lfU,lEq),true) if GetItemTypeId(UnitItemInSlot(lfU,lEq))=='I006'then call SetItemDroppable(UnitItemInSlot(lfU,lEq),true) endif endif set lEq=lEq+1 endloop endif endfunction function Spectral_Dagger_Start takes nothing returns nothing local unit lfU=GetTriggerUnit() local unit lFB=GetSpellTargetUnit() local real lFC=SafeX(GetUnitX(lfU)) local real lFd=SafeY(GetUnitY(lfU)) local unit lpc=CreateUnit(GetOwningPlayer(lfU),'e00W',lFC,lFd,0) local timer ltt=CreateTimer() local string lf5=H2Tx(ltt) local group lMW=CreateGroup() local location ln3 local real lnM local real lEv local real lEV call SetUnitPathing(lpc,false) call SetHandle(lf5,"AlreadyDamaged",lMW) call SetHandle(lf5,"Hero",lfU) call SetHandle(lf5,"Projectile",lpc) if lFB!=null then call SetHandle(lf5,"Target",lFB) call TimerStart(ltt,.035,true,function Spectral_Dagger_MoveClon) else set ln3=GetSpellTargetLoc() set lEv=GetLocationX(ln3) set lEV=GetLocationY(ln3) set lnM=Atan2(lEV-lFd,lEv-lFC) call SetUnitFacing(lpc,lnM*bj_RADTODEG) set lEv=SafeX(lFC+2100*Cos(lnM)) set lEV=SafeY(lFd+2100*Sin(lnM)) call SetReal(lf5,"TargetX",lEv) call SetReal(lf5,"TargetY",lEV) call SetReal(lf5,"Angle",lnM) call TimerStart(ltt,.035,true,function Spectral_Dagger_Move) endif set ltt=CreateTimer() set lf5=H2Tx(ltt) call SetUnitPathing(lfU,false) call SetHandle(lf5,"Hero",lfU) call PolledWait(3) call TimerStart(ltt,.2,true,function Spectral_Dagger_ItemsSafe) endfunction function Spectral_Dagger_Spell takes nothing returns boolean return GetSpellAbilityId()=='A0AF' endfunction function InitTrig_Spectral_Dagger takes nothing returns nothing local trigger ltt=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddCondition(ltt,Condition(function Spectral_Dagger_Spell)) call TriggerAddAction(ltt,function Spectral_Dagger_Start) call CreateSound("Sound\\Music\\mp3Music\\Spectral Dagger.mp3",false,false,false,10,10,"DefaultEAXON") call SpellPreload('A0AG') call SpellPreload('A0AH') endfunction//=========================================================================== // Trigger: Desolate //=========================================================================== // OpenDota 6.41 deprotected by NETRAT and DioD // inspired by everyone who posted on forum threads and feedback page // based on OpenDota 6.32b, deprotected by DimonT, NETRAT and TheBloodiest // http://dimon.xgm.ru/opendota/ // Visit our modmaking community at http://xgm.ru/ // Objects used: // 'A0AI' = Desolate (Spectre : Mercurial) // 'A08E' = Marker (Nether Ward 4,Lightning Bolter,Nether Ward 3,Nether Ward 2,Vengeance Death caster,...) // DEBUG Trigger Number : 101 function DesolateCheck takes nothing returns boolean return IsUnitType(GetTriggerUnit(),UNIT_TYPE_HERO) and GetUnitAbilityLevel(GetAttacker(),'A0AI')>0 endfunction function DesolateSpell takes nothing returns boolean return IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))and GetUnitAbilityLevel(GetFilterUnit(),'A08E')==0 and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>1 and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false endfunction function DesolateMain takes nothing returns nothing local unit lKg=GetAttacker() local unit lnk=GetTriggerUnit() local group lEw=CreateGroup() local boolexpr lEW=Condition(function DesolateSpell) local string lf5 call GroupEnumUnitsInRange(lEw,GetUnitX(lnk),GetUnitY(lnk),900,lEW) call GroupRemoveUnit(lEw,lnk) if FirstOfGroup(lEw)==null then set lf5=H2Tx(lKg) if GetBoolean(lf5,"Desolate|InCooldown")==false then call UnitDamageTarget(lKg,lnk,5+10*GetUnitAbilityLevel(lKg,'A0AI'),true,true,ATTACK_TYPE_HERO,DAMAGE_TYPE_DIVINE,WEAPON_TYPE_WHOKNOWS) call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl",lnk,"overhead")) call SetBoolean(lf5,"Desolate|InCooldown",true) call PolledWait(.4) call SetBoolean(lf5,"Desolate|InCooldown",false) endif endif call DestroyGroup(lEw) call DestroyBoolExpr(lEW) endfunction function InitTrig_Desolate takes nothing returns nothing local trigger ltt=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_ATTACKED) call TriggerAddCondition(ltt,Condition(function DesolateCheck)) call TriggerAddAction(ltt,function DesolateMain) endfunction//=========================================================================== // Trigger: Dispersion //=========================================================================== // Objects used: // 'A08E' = Marker (Nether Ward 4,Lightning Bolter,Nether Ward 3,Nether Ward 2,Vengeance Death caster,...) // 'h006' = Spellcaster // 'A0AJ' = Dispersion Stun // 'e011' = Vengeance Death caster // 'A0AK' = Dispersion (Spectre : Mercurial) // 'n004' = Well of Life // 'n003' = Defiled Fountain of Life // DEBUG Trigger Number : 102 function DispersionFilter takes nothing returns boolean return IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A08E')==0 and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())) endfunction function DispersionDamage takes nothing returns nothing local unit lfU=GetTriggerUnit() local unit lFB=GetEnumUnit() local unit lJV=CreateUnit(GetOwningPlayer(lfU),'h006',GetUnitX(lfU),GetUnitY(lfU),0) local real lf7=udg_Spectre_damage call UnitAddAbility(lJV,'A0AJ') call IssueTargetOrderById(lJV,OrderId("thunderbolt"),lFB) call UnitDamageTarget(lfU,lFB,lf7,true,false,ATTACK_TYPE_HERO,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS) call RemoveUnit(lJV) endfunction function DispersionMain takes nothing returns nothing local unit lfU=GetTriggerUnit() local unit lJV local group lEw=CreateGroup() local real lf7=GetEventDamage() local boolexpr lEW=Condition(function DispersionFilter) local real lFa=GetUnitState(lfU,UNIT_STATE_LIFE) set udg_Spectre_damage=ReturnMinReal(lf7,lFa) call DelayedDamageCheck(lfU,lf7) call GroupEnumUnitsInRange(lEw,GetUnitX(lfU),GetUnitY(lfU),400,lEW) call ForGroup(lEw,function DispersionDamage) call DestroyGroup(lEw) call DestroyBoolExpr(lEW) set lJV=CreateUnit(GetOwningPlayer(lfU),'e011',GetUnitX(lfU),GetUnitY(lfU),0) call SetUnitPathing(lJV,false) call SetUnitInvulnerable(lJV,true) call SetUnitAnimation(lJV,"Death") call PolledWait(2) call RemoveUnit(lJV) endfunction function DispersionRoll takes nothing returns boolean return GetRandomInt(1,100)<=GetUnitAbilityLevel(GetTriggerUnit(),'A0AK')*4 and GetEventDamage()>5 and GetUnitTypeId(GetEventDamageSource())!='n004'and GetUnitTypeId(GetEventDamageSource())!='n003' endfunction function DispersionSet takes nothing returns nothing local trigger ltt=CreateTrigger() local unit lfU=GetTriggerUnit() call TriggerRegisterUnitEvent(ltt,lfU,EVENT_UNIT_DAMAGED) call TriggerAddCondition(ltt,Condition(function DispersionRoll)) call TriggerAddAction(ltt,function DispersionMain) endfunction function DispersionSpell takes nothing returns boolean return GetLearnedSkill()=='A0AK'and GetUnitAbilityLevel(GetTriggerUnit(),'A0AK')==1 and IsUnitIllusion(GetTriggerUnit())==false endfunction function InitTrig_Dispersion takes nothing returns nothing local trigger ltt=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_HERO_SKILL) call TriggerAddCondition(ltt,Condition(function DispersionSpell)) call TriggerAddAction(ltt,function DispersionSet) endfunction//=========================================================================== // Trigger: Haunt //=========================================================================== // Objects used: // 'A0AL' = Haunt (Spectre : Mercurial) // 'h006' = Spellcaster // 'A0AM' = Haunt Helper // 'B019' = Illusion // 'A0AN' = Reality // DEBUG Trigger Number : 103 function Haunt_Spell takes nothing returns boolean return GetSpellAbilityId()=='A0AL' endfunction function Haunt_MainFilter takes nothing returns boolean return IsUnitType(GetFilterUnit(),UNIT_TYPE_HERO) and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())) endfunction function Haunt_CreateImages takes nothing returns nothing local unit lFB=GetEnumUnit() local unit lfU=GetTriggerUnit() local unit lJV=CreateUnit(GetOwningPlayer(lfU),'h006',GetUnitX(lFB),GetUnitY(lFB),0) call SetHandle(H2Tx(lJV),"HauntTarget",lFB) call UnitAddAbility(lJV,'A0AM') call SetUnitAbilityLevel(lJV,'A0AM',GetUnitAbilityLevel(lfU,'A0AL')) call IssueTargetOrderById(lJV,852274,lfU) call RemoveUnit(lJV) endfunction function Haunt_MainAction takes nothing returns nothing local unit lfU=GetTriggerUnit() local group lEw=CreateGroup() local boolexpr lEW=Condition(function Haunt_MainFilter) local sound lfG call GroupEnumUnitsInRect(lEw,bj_mapInitialPlayableArea,lEW) call ForGroup(lEw,function Haunt_CreateImages) if FirstOfGroup(lEw)!=null then set lfG=CreateSound("Abilities\\Spells\\Other\\ANsa\\SacrificeUnit.wav",false,false,false,10,10,"DefaultEAXON") call StartSound(lfG) call KillSoundWhenDone(lfG) endif call DestroyBoolExpr(lEW) call DestroyGroup(lEw) endfunction function Haunt_IsImage takes nothing returns boolean return GetUnitAbilityLevel(GetSummonedUnit(),'B019')>0 endfunction function Haunt_End takes nothing returns nothing local string lf5=H2Tx(GetTriggeringTrigger()) local unit luk=GetUnit(lf5,"HauntImage") local unit lFB=GetUnit(lf5,"HauntTarget") if GetTriggerEventId()==EVENT_UNIT_DEATH then call DisableTrigger(GetTriggeringTrigger()) call FastFlush(H2Tx(GetTriggeringTrigger())) if lFB==GetTriggerUnit()then call KillUnit(luk) endif elseif IsUnitPaused(luk)==false then call DisableTrigger(GetTriggeringTrigger()) call IssueTargetOrderById(luk,OrderId("attack"),lFB) call EnableTrigger(GetTriggeringTrigger()) endif endfunction function Haunt_RegisterImages takes nothing returns nothing local unit lJV=GetSummoningUnit() local unit luk=GetSummonedUnit() local unit lFB=GetUnit(H2Tx(lJV),"HauntTarget") local trigger ltt=CreateTrigger() call SetHandle(H2Tx(udg_PlayerX_Hero[GetPlayerId(GetOwningPlayer(lJV))]),"HauntTarget"+H2Tx(luk),lFB) call SetUnitPathing(luk,false) call SetUnitMoveSpeed(luk,400) call SetUnitX(luk,GetUnitX(lFB)) call SetUnitY(luk,GetUnitY(lFB)) call IssueTargetOrderById(luk,OrderId("attack"),lFB) call TriggerRegisterUnitEvent(ltt,luk,EVENT_UNIT_ISSUED_TARGET_ORDER) call TriggerRegisterUnitEvent(ltt,luk,EVENT_UNIT_ISSUED_POINT_ORDER) call TriggerRegisterUnitEvent(ltt,luk,EVENT_UNIT_DEATH) call TriggerRegisterUnitEvent(ltt,lFB,EVENT_UNIT_DEATH) call TriggerRegisterTimerEvent(ltt,.5,true) call TriggerAddAction(ltt,function Haunt_End) call SetHandle(H2Tx(ltt),"HauntTarget",lFB) call SetHandle(H2Tx(ltt),"HauntImage",luk) call FastFlush(H2Tx(lJV)) endfunction function Haunt_AddRealityCheck takes nothing returns boolean return GetLearnedSkill()=='A0AL'and IsUnitIllusion(GetTriggerUnit())==false and GetUnitAbilityLevel(GetTriggerUnit(),'A0AL')==1 endfunction function Haunt_AddReality takes nothing returns nothing call UnitAddAbility(GetTriggerUnit(),'A0AN') endfunction function InitTrig_Haunt takes nothing returns nothing local trigger ltt=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddCondition(ltt,Condition(function Haunt_Spell)) call TriggerAddAction(ltt,function Haunt_MainAction) set ltt=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SUMMON) call TriggerAddCondition(ltt,Condition(function Haunt_IsImage)) call TriggerAddAction(ltt,function Haunt_RegisterImages) set ltt=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_HERO_SKILL) call TriggerAddCondition(ltt,Condition(function Haunt_AddRealityCheck)) call TriggerAddAction(ltt,function Haunt_AddReality) call CreateSound("Abilities\\Spells\\Other\\ANsa\\SacrificeUnit.wav",false,false,false,10,10,"DefaultEAXON") call SpellPreload('A0AM') endfunction//=========================================================================== // Trigger: Reality //=========================================================================== // Objects used: // 'A0AN' = Reality // DEBUG Trigger Number : 104 function Reality_ImageFilter takes nothing returns boolean return GetUnitAbilityLevel(GetFilterUnit(),'B019')>0 endfunction function SimError takes player pfH,string pfi returns nothing local sound lfI=CreateSoundFromLabel("InterfaceError",false,false,false,10,10) if(GetLocalPlayer()==pfH)then if(pfi!="")and(pfi!=null)then call ClearTextMessages() call DisplayTimedTextToPlayer(pfH,.5,-1.,2.,"|cffffcc00"+pfi+"|r") endif call StartSound(lfI) endif call KillSoundWhenDone(lfI) endfunction function Reality_NearestImage takes nothing returns nothing local unit lfo local real lFc=ReturnTrueRange(GetEnumUnit(),GetSpellTargetLoc()) if lFc 0)then call SelectHeroSkill( GetLastCreatedUnit(), 'ACs7' ) if(GetUnitAbilityLevelSwapped('ACs7', GetLearningUnit()) > 1)then call SelectHeroSkill( GetLastCreatedUnit(), 'ACs7' ) if(GetUnitAbilityLevelSwapped('ACs7', GetLearningUnit()) > 2)then call SelectHeroSkill( GetLastCreatedUnit(), 'ACs7' ) if(GetUnitAbilityLevelSwapped('ACs7', GetLearningUnit()) > 3)then call SelectHeroSkill( GetLastCreatedUnit(), 'ACs7' ) endif endif endif endif if(GetUnitAbilityLevelSwapped('Aven', GetLearningUnit()) > 0)then call SelectHeroSkill( GetLastCreatedUnit(), 'Aven' ) if(GetUnitAbilityLevelSwapped('Aven', GetLearningUnit()) > 1)then call SelectHeroSkill( GetLastCreatedUnit(), 'Aven' ) if(GetUnitAbilityLevelSwapped('Aven', GetLearningUnit()) > 2)then call SelectHeroSkill( GetLastCreatedUnit(), 'Aven' ) if(GetUnitAbilityLevelSwapped('Aven', GetLearningUnit()) > 3)then call SelectHeroSkill( GetLastCreatedUnit(), 'Aven' ) endif endif endif endif if(GetUnitAbilityLevelSwapped('A000', GetLearningUnit()) > 0)then call SelectHeroSkill( GetLastCreatedUnit(), 'A0AV' ) call SelectHeroSkill( GetLastCreatedUnit(), 'A0AW' ) call SelectHeroSkill( GetLastCreatedUnit(), 'A0AU' ) if(GetUnitAbilityLevelSwapped('A000', GetLearningUnit()) > 1)then call SelectHeroSkill( GetLastCreatedUnit(), 'A0AV' ) call SelectHeroSkill( GetLastCreatedUnit(), 'A0AW' ) call SelectHeroSkill( GetLastCreatedUnit(), 'A0AU' ) if(GetUnitAbilityLevelSwapped('A000', GetLearningUnit()) > 2)then call SelectHeroSkill( GetLastCreatedUnit(), 'A0AV' ) call SelectHeroSkill( GetLastCreatedUnit(), 'A0AW' ) call SelectHeroSkill( GetLastCreatedUnit(), 'A0AU' ) if(GetUnitAbilityLevelSwapped('A000', GetLearningUnit()) > 3)then call SelectHeroSkill( GetLastCreatedUnit(), 'A0AV' ) call SelectHeroSkill( GetLastCreatedUnit(), 'A0AW' ) call SelectHeroSkill( GetLastCreatedUnit(), 'A0AU' ) endif endif endif endif if(GetUnitAbilityLevelSwapped('Aamk', GetLearningUnit()) > 0)then call SelectHeroSkill( GetLastCreatedUnit(), 'Aamk' ) if(GetUnitAbilityLevelSwapped('Aamk', GetLearningUnit()) > 1)then call SelectHeroSkill( GetLastCreatedUnit(), 'Aamk' ) if(GetUnitAbilityLevelSwapped('Aamk', GetLearningUnit()) > 2)then call SelectHeroSkill( GetLastCreatedUnit(), 'Aamk' ) if(GetUnitAbilityLevelSwapped('Aamk', GetLearningUnit()) > 3)then call SelectHeroSkill( GetLastCreatedUnit(), 'Aamk' ) if(GetUnitAbilityLevelSwapped('Aamk', GetLearningUnit()) > 4)then call SelectHeroSkill( GetLastCreatedUnit(), 'Aamk' ) if(GetUnitAbilityLevelSwapped('Aamk', GetLearningUnit()) > 5)then call SelectHeroSkill( GetLastCreatedUnit(), 'Aamk' ) if(GetUnitAbilityLevelSwapped('Aamk', GetLearningUnit()) > 6)then call SelectHeroSkill( GetLastCreatedUnit(), 'Aamk' ) if(GetUnitAbilityLevelSwapped('Aamk', GetLearningUnit()) > 7)then call SelectHeroSkill( GetLastCreatedUnit(), 'Aamk' ) if(GetUnitAbilityLevelSwapped('Aamk', GetLearningUnit()) > 8)then call SelectHeroSkill( GetLastCreatedUnit(), 'Aamk' ) if(GetUnitAbilityLevelSwapped('Aamk', GetLearningUnit()) > 9)then call SelectHeroSkill( GetLastCreatedUnit(), 'Aamk' ) endif endif endif endif endif endif endif endif endif endif call UnitAddItemByIdSwapped( GetItemTypeId(UnitItemInSlotBJ(udg_Footmans[0], 1)), GetLastCreatedUnit() ) call UnitAddItemByIdSwapped( GetItemTypeId(UnitItemInSlotBJ(udg_Footmans[0], 2)), GetLastCreatedUnit() ) call EnableTrigger( gg_trg_Footmans_Skill ) call EnableTrigger( gg_trg_Footmans_Dead ) call EnableTrigger( gg_trg_Footmans_Item_Drop ) call EnableTrigger( gg_trg_Footmans_Item_Get ) call EnableTrigger( gg_trg_Footmans_Item ) call EnableTrigger( gg_trg_Footmans_Revival ) endfunction //=========================================================================== function InitTrig_Footmans_Pop takes nothing returns nothing set gg_trg_Footmans_Pop = CreateTrigger( ) call DisableTrigger( gg_trg_Footmans_Pop ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Footmans_Pop, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_Footmans_Pop, Condition( function Trig_Footmans_Pop_Conditions ) ) call TriggerAddAction( gg_trg_Footmans_Pop, function Trig_Footmans_Pop_Actions ) endfunction //=========================================================================== // Trigger: Footmans Skill //=========================================================================== function Trig_Footmans_Skill_Conditions takes nothing returns boolean if ( not ( IsUnitIllusionBJ(GetTriggerUnit()) == false ) ) then return false endif return true endfunction function Trig_Footmans_Skill_Actions takes nothing returns nothing call DisableTrigger( GetTriggeringTrigger() ) if(GetLearnedSkillBJ() == 'ACs7')then if(GetLearningUnit() == udg_Footmans[0])then call SelectHeroSkill( udg_Footmans[1], 'ACs7' ) call SelectHeroSkill( udg_Footmans[2], 'ACs7' ) call SelectHeroSkill( udg_Footmans[3], 'ACs7' ) endif if(GetLearningUnit() == udg_Footmans[1])then call SelectHeroSkill( udg_Footmans[0], 'ACs7' ) call SelectHeroSkill( udg_Footmans[2], 'ACs7' ) call SelectHeroSkill( udg_Footmans[3], 'ACs7' ) endif if(GetLearningUnit() == udg_Footmans[2])then call SelectHeroSkill( udg_Footmans[0], 'ACs7' ) call SelectHeroSkill( udg_Footmans[1], 'ACs7' ) call SelectHeroSkill( udg_Footmans[3], 'ACs7' ) endif if(GetLearningUnit() == udg_Footmans[3])then call SelectHeroSkill( udg_Footmans[0], 'ACs7' ) call SelectHeroSkill( udg_Footmans[1], 'ACs7' ) call SelectHeroSkill( udg_Footmans[2], 'ACs7' ) endif endif // ------- if(GetLearnedSkillBJ() == 'Aven')then if(GetLearningUnit() == udg_Footmans[0])then call SelectHeroSkill( udg_Footmans[1], 'Aven' ) call SelectHeroSkill( udg_Footmans[2], 'Aven' ) call SelectHeroSkill( udg_Footmans[3], 'Aven' ) endif if(GetLearningUnit() == udg_Footmans[1])then call SelectHeroSkill( udg_Footmans[0], 'Aven' ) call SelectHeroSkill( udg_Footmans[2], 'Aven' ) call SelectHeroSkill( udg_Footmans[3], 'Aven' ) endif if(GetLearningUnit() == udg_Footmans[2])then call SelectHeroSkill( udg_Footmans[0], 'Aven' ) call SelectHeroSkill( udg_Footmans[1], 'Aven' ) call SelectHeroSkill( udg_Footmans[3], 'Aven' ) endif if(GetLearningUnit() == udg_Footmans[3])then call SelectHeroSkill( udg_Footmans[0], 'Aven' ) call SelectHeroSkill( udg_Footmans[1], 'Aven' ) call SelectHeroSkill( udg_Footmans[2], 'Aven' ) endif endif // ------- if(GetLearnedSkillBJ() == 'Aven')then if(GetLearningUnit() == udg_Footmans[0])then call SelectHeroSkill( udg_Footmans[1], 'A0AX' ) call SelectHeroSkill( udg_Footmans[2], 'A0AX' ) call SelectHeroSkill( udg_Footmans[3], 'A0AX' ) endif if(GetLearningUnit() == udg_Footmans[1])then call SelectHeroSkill( udg_Footmans[0], 'A0AX' ) call SelectHeroSkill( udg_Footmans[2], 'A0AX' ) call SelectHeroSkill( udg_Footmans[3], 'A0AX' ) endif if(GetLearningUnit() == udg_Footmans[2])then call SelectHeroSkill( udg_Footmans[0], 'A0AX' ) call SelectHeroSkill( udg_Footmans[1], 'A0AX' ) call SelectHeroSkill( udg_Footmans[3], 'A0AX' ) endif if(GetLearningUnit() == udg_Footmans[3])then call SelectHeroSkill( udg_Footmans[0], 'A0AX' ) call SelectHeroSkill( udg_Footmans[1], 'A0AX' ) call SelectHeroSkill( udg_Footmans[2], 'A0AX' ) endif endif // ------- if(GetLearnedSkillBJ() == 'A000')then call SelectHeroSkill( udg_Footmans[1], 'A0AU' ) call SelectHeroSkill( udg_Footmans[2], 'A0AV' ) call SelectHeroSkill( udg_Footmans[3], 'A0AW' ) endif if(GetLearnedSkillBJ() == 'A0AU')then call SelectHeroSkill( udg_Footmans[0], 'A000' ) call SelectHeroSkill( udg_Footmans[2], 'A0AV' ) call SelectHeroSkill( udg_Footmans[3], 'A0AW' ) endif if(GetLearnedSkillBJ() == 'A0AV')then call SelectHeroSkill( udg_Footmans[0], 'A000' ) call SelectHeroSkill( udg_Footmans[1], 'A0AU' ) call SelectHeroSkill( udg_Footmans[3], 'A0AW' ) endif if(GetLearnedSkillBJ() == 'A0AW')then call SelectHeroSkill( udg_Footmans[0], 'A000' ) call SelectHeroSkill( udg_Footmans[1], 'A0AU' ) call SelectHeroSkill( udg_Footmans[2], 'A0AV' ) endif // ------- if(GetLearnedSkillBJ() == 'Aamk')then if(GetLearningUnit() == udg_Footmans[0])then call SelectHeroSkill( udg_Footmans[1], 'Aamk' ) call SelectHeroSkill( udg_Footmans[2], 'Aamk' ) call SelectHeroSkill( udg_Footmans[3], 'Aamk' ) endif if(GetLearningUnit() == udg_Footmans[1])then call SelectHeroSkill( udg_Footmans[0], 'Aamk' ) call SelectHeroSkill( udg_Footmans[2], 'Aamk' ) call SelectHeroSkill( udg_Footmans[3], 'Aamk' ) endif if(GetLearningUnit() == udg_Footmans[2])then call SelectHeroSkill( udg_Footmans[0], 'Aamk' ) call SelectHeroSkill( udg_Footmans[1], 'Aamk' ) call SelectHeroSkill( udg_Footmans[3], 'Aamk' ) endif if(GetLearningUnit() == udg_Footmans[3])then call SelectHeroSkill( udg_Footmans[0], 'Aamk' ) call SelectHeroSkill( udg_Footmans[1], 'Aamk' ) call SelectHeroSkill( udg_Footmans[2], 'Aamk' ) endif endif call EnableTrigger( GetTriggeringTrigger() ) endfunction //=========================================================================== function InitTrig_Footmans_Skill takes nothing returns nothing set gg_trg_Footmans_Skill = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Footmans_Skill, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_Footmans_Skill, Condition( function Trig_Footmans_Skill_Conditions )) call TriggerAddAction( gg_trg_Footmans_Skill, function Trig_Footmans_Skill_Actions ) endfunction//=========================================================================== // Trigger: Footmans Revival //=========================================================================== function Trig_Footmans_Revival_Func002C takes nothing returns boolean if ( ( GetUnitTypeId(GetRevivingUnit()) == 'H002' ) ) then return true endif if ( ( GetUnitTypeId(GetRevivingUnit()) == 'H00H' ) ) then return true endif if ( ( GetUnitTypeId(GetRevivingUnit()) == 'H00I' ) ) then return true endif if ( ( GetUnitTypeId(GetRevivingUnit()) == 'H00J' ) ) then return true endif return false endfunction function Trig_Footmans_Revival_Conditions takes nothing returns boolean if ( not Trig_Footmans_Revival_Func002C() ) then return false endif return true endfunction function Trig_Footmans_Revival_Func001001002001 takes nothing returns boolean return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true ) endfunction function Trig_Footmans_Revival_Func001001002002 takes nothing returns boolean return ( IsUnitDeadBJ(GetFilterUnit()) == true ) endfunction function Trig_Footmans_Revival_Func001001002 takes nothing returns boolean return GetBooleanAnd( Trig_Footmans_Revival_Func001001002001(), Trig_Footmans_Revival_Func001001002002() ) endfunction function Trig_Footmans_Revival_Func001A takes nothing returns nothing call ReviveHeroLoc( GetEnumUnit(), GetPlayerStartLocationLoc(GetTriggerPlayer()), true ) endfunction function Trig_Footmans_Revival_Actions takes nothing returns nothing call ForGroupBJ( GetUnitsOfPlayerMatching(GetOwningPlayer(GetRevivingUnit()), Condition(function Trig_Footmans_Revival_Func001001002)), function Trig_Footmans_Revival_Func001A ) endfunction //=========================================================================== function InitTrig_Footmans_Revival takes nothing returns nothing set gg_trg_Footmans_Revival = CreateTrigger( ) call DisableTrigger( gg_trg_Footmans_Revival ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Footmans_Revival, EVENT_PLAYER_HERO_REVIVE_FINISH ) call TriggerAddCondition( gg_trg_Footmans_Revival, Condition( function Trig_Footmans_Revival_Conditions ) ) call TriggerAddAction( gg_trg_Footmans_Revival, function Trig_Footmans_Revival_Actions ) endfunction //=========================================================================== // Trigger: Footmans Dead //=========================================================================== function Trig_Footmans_Dead_Func003C takes nothing returns boolean if ( ( GetUnitTypeId(GetDyingUnit()) == 'H002' ) ) then return true endif if ( ( GetUnitTypeId(GetDyingUnit()) == 'H00H' ) ) then return true endif if ( ( GetUnitTypeId(GetDyingUnit()) == 'H00I' ) ) then return true endif if ( ( GetUnitTypeId(GetDyingUnit()) == 'H00J' ) ) then return true endif return false endfunction function Trig_Footmans_Dead_Conditions takes nothing returns boolean if ( not ( IsUnitIllusionBJ(GetTriggerUnit()) == false ) ) then return false endif if ( not Trig_Footmans_Dead_Func003C() ) then return false endif return true endfunction function Trig_Footmans_Dead_Func002001002001 takes nothing returns boolean return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true ) endfunction function Trig_Footmans_Dead_Func002001002002 takes nothing returns boolean return ( IsUnitAliveBJ(GetFilterUnit()) == true ) endfunction function Trig_Footmans_Dead_Func002001002 takes nothing returns boolean return GetBooleanAnd( Trig_Footmans_Dead_Func002001002001(), Trig_Footmans_Dead_Func002001002002() ) endfunction function Trig_Footmans_Dead_Func002A takes nothing returns nothing call RemoveItem( GetItemOfTypeFromUnitBJ(GetEnumUnit(), 'I02K') ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetEnumUnit(), 'I02K') ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetEnumUnit(), 'I02K') ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetEnumUnit(), 'I02K') ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetEnumUnit(), 'I02K') ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetEnumUnit(), 'I02K') ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetEnumUnit(), 'I006') ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetEnumUnit(), 'I006') ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetEnumUnit(), 'I006') ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetEnumUnit(), 'I006') ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetEnumUnit(), 'I006') ) call RemoveItem( GetItemOfTypeFromUnitBJ(GetEnumUnit(), 'I006') ) call KillUnit( GetEnumUnit() ) endfunction function Trig_Footmans_Dead_Actions takes nothing returns nothing call ForGroupBJ( GetUnitsOfPlayerMatching(GetOwningPlayer(GetDyingUnit()), Condition(function Trig_Footmans_Dead_Func002001002)), function Trig_Footmans_Dead_Func002A ) endfunction //=========================================================================== function InitTrig_Footmans_Dead takes nothing returns nothing set gg_trg_Footmans_Dead = CreateTrigger( ) call DisableTrigger( gg_trg_Footmans_Dead ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Footmans_Dead, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_Footmans_Dead, Condition( function Trig_Footmans_Dead_Conditions ) ) call TriggerAddAction( gg_trg_Footmans_Dead, function Trig_Footmans_Dead_Actions ) endfunction //=========================================================================== // Trigger: Footmans Item //=========================================================================== function Trig_Footmans_Item_Func005C takes nothing returns boolean if ( ( GetManipulatingUnit() == udg_Footmans[1] ) ) then return true endif if ( ( GetManipulatingUnit() == udg_Footmans[2] ) ) then return true endif if ( ( GetManipulatingUnit() == udg_Footmans[3] ) ) then return true endif return false endfunction function Trig_Footmans_Item_Conditions takes nothing returns boolean if ( not Trig_Footmans_Item_Func005C() ) then return false endif return true endfunction function Trig_Footmans_Item_Func004Func002C takes nothing returns boolean if ( not ( GetManipulatedItem() == UnitItemInSlotBJ(GetManipulatingUnit(), 1) ) ) then return false endif return true endfunction function Trig_Footmans_Item_Func004Func005001 takes nothing returns boolean return ( IsUnitAliveBJ(udg_Footmans[0]) == true ) endfunction function Trig_Footmans_Item_Func004C takes nothing returns boolean if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I065' ) ) then return false endif if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I066' ) ) then return false endif if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I01L' ) ) then return false endif if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I027' ) ) then return false endif if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I02A' ) ) then return false endif if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I029' ) ) then return false endif if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I01Z' ) ) then return false endif if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I02O' ) ) then return false endif if ( not ( GetItemTypeId(GetManipulatedItem()) != 'I028' ) ) then return false endif return true endfunction function Trig_Footmans_Item_Actions takes nothing returns nothing local integer mskill=GetUnitAbilityLevelSwapped('A0AX',GetTriggerUnit()) local integer tmp local boolean inv if ( Trig_Footmans_Item_Func004C() ) then call DisableTrigger( gg_trg_Footmans_Item_Get ) if ( Trig_Footmans_Item_Func004Func002C() ) then set tmp=GetItemTypeId(UnitItemInSlotBJ(udg_Footmans[0], 1)) set inv=true loop exitwhen mskill<0 call RemoveItem( UnitItemInSlotBJ(udg_Footmans[mskill], 1) ) call UnitAddItemToSlotById( udg_Footmans[mskill], 'sclp', 0 ) set mskill=mskill-1 endloop else set tmp=GetItemTypeId(UnitItemInSlotBJ(udg_Footmans[0], 2)) set inv=false loop exitwhen mskill<0 call RemoveItem( UnitItemInSlotBJ(udg_Footmans[mskill], 2) ) call UnitAddItemToSlotById( udg_Footmans[mskill], 'sclp', 1 ) set mskill=mskill-1 endloop endif call EnableTrigger( gg_trg_Footmans_Item_Get ) call TriggerSleepAction( 25.00 ) loop exitwhen ( Trig_Footmans_Item_Func004Func005001() ) call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, 3.00)) endloop call DisableTrigger( gg_trg_Footmans_Item_Get ) set mskill=GetUnitAbilityLevelSwapped('A0AX',GetTriggerUnit()) if(inv == true)then loop exitwhen mskill<0 call RemoveItem( UnitItemInSlotBJ(udg_Footmans[mskill], 1) ) call UnitAddItemToSlotById( udg_Footmans[mskill], tmp, 0 ) set mskill=mskill-1 endloop else loop exitwhen mskill<0 call RemoveItem( UnitItemInSlotBJ(udg_Footmans[mskill], 2) ) call UnitAddItemToSlotById( udg_Footmans[mskill], tmp, 1 ) set mskill=mskill-1 endloop endif call EnableTrigger( gg_trg_Footmans_Item_Get ) else endif endfunction //=========================================================================== function InitTrig_Footmans_Item takes nothing returns nothing set gg_trg_Footmans_Item = CreateTrigger( ) call DisableTrigger( gg_trg_Footmans_Item ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Footmans_Item, EVENT_PLAYER_UNIT_USE_ITEM ) call TriggerAddCondition( gg_trg_Footmans_Item, Condition( function Trig_Footmans_Item_Conditions ) ) call TriggerAddAction( gg_trg_Footmans_Item, function Trig_Footmans_Item_Actions ) endfunction //=========================================================================== // Trigger: Footmans Item Get //=========================================================================== function Trig_Footmans_Item_Get_Func005C takes nothing returns boolean if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H002' ) ) then return true endif if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H00H' ) ) then return true endif if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H00I' ) ) then return true endif if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H00J' ) ) then return true endif return false endfunction function Trig_Footmans_Item_Get_Conditions takes nothing returns boolean if ( not Trig_Footmans_Item_Get_Func005C() ) then return false endif return true endfunction function Trig_Footmans_Item_Get_Func004Func004Func001C takes nothing returns boolean if ( not ( GetManipulatedItem() == UnitItemInSlotBJ(udg_Footmans[0], 2) ) ) then return false endif return true endfunction function Trig_Footmans_Item_Get_Func004Func004C takes nothing returns boolean if ( not ( GetManipulatedItem() == UnitItemInSlotBJ(udg_Footmans[0], 1) ) ) then return false endif return true endfunction function Trig_Footmans_Item_Get_Func004C takes nothing returns boolean if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H002' ) ) then return false endif return true endfunction function Trig_Footmans_Item_Get_Actions takes nothing returns nothing local integer mskill=GetUnitAbilityLevelSwapped('A0AX',GetTriggerUnit()) call DisableTrigger( GetTriggeringTrigger() ) if ( Trig_Footmans_Item_Get_Func004C() ) then if ( Trig_Footmans_Item_Get_Func004Func004C() ) then loop exitwhen mskill<=0 call RemoveItem( UnitItemInSlotBJ(udg_Footmans[mskill], 1) ) call UnitAddItemToSlotById( udg_Footmans[mskill], GetItemTypeId(GetManipulatedItem()), 0 ) call SetItemCharges( GetLastCreatedItem(), GetItemCharges(GetManipulatedItem()) ) set mskill=mskill-1 endloop call EnableTrigger( GetTriggeringTrigger() ) else if ( Trig_Footmans_Item_Get_Func004Func004Func001C() ) then loop exitwhen mskill<=0 call RemoveItem( UnitItemInSlotBJ(udg_Footmans[mskill], 2) ) call UnitAddItemToSlotById( udg_Footmans[mskill], GetItemTypeId(GetManipulatedItem()), 1 ) call SetItemCharges( GetLastCreatedItem(), GetItemCharges(GetManipulatedItem()) ) set mskill=mskill-1 endloop call EnableTrigger( GetTriggeringTrigger() ) else call EnableTrigger( GetTriggeringTrigger() ) endif endif else call EnableTrigger( GetTriggeringTrigger() ) call UnitAddItemSwapped( GetManipulatedItem(), udg_Footmans[0] ) endif endfunction //=========================================================================== function InitTrig_Footmans_Item_Get takes nothing returns nothing set gg_trg_Footmans_Item_Get = CreateTrigger( ) call DisableTrigger( gg_trg_Footmans_Item_Get ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Footmans_Item_Get, EVENT_PLAYER_UNIT_PICKUP_ITEM ) call TriggerAddCondition( gg_trg_Footmans_Item_Get, Condition( function Trig_Footmans_Item_Get_Conditions ) ) call TriggerAddAction( gg_trg_Footmans_Item_Get, function Trig_Footmans_Item_Get_Actions ) endfunction //=========================================================================== // Trigger: Footmans Exp //=========================================================================== function Trig_Footmans_Exp_Conditions takes nothing returns boolean if ( not ( IsUnitAliveBJ(udg_Footmans[0]) == true ) ) then return false endif return true endfunction function Trig_Footmans_Exp_Actions takes nothing returns nothing local integer expsum=GetHeroXP(udg_Footmans[0]) - udg_FootmansExp local integer unitMax call DisableTrigger( GetTriggeringTrigger() ) if(udg_Footmans[1] != null)then set expsum=expsum+(GetHeroXP(udg_Footmans[1]) - udg_FootmansExp) set unitMax=1 if(udg_Footmans[2] != null)then set expsum=expsum+(GetHeroXP(udg_Footmans[2]) - udg_FootmansExp) set unitMax=2 if(udg_Footmans[3] != null)then set expsum=expsum+(GetHeroXP(udg_Footmans[3]) - udg_FootmansExp) set unitMax=3 endif endif endif set udg_FootmansExp=udg_FootmansExp+expsum call EnableTrigger( GetTriggeringTrigger() ) loop exitwhen unitMax<0 call SetHeroXP( udg_Footmans[unitMax], udg_FootmansExp, true ) set unitMax=unitMax-1 endloop endfunction //=========================================================================== function InitTrig_Footmans_Exp takes nothing returns nothing set gg_trg_Footmans_Exp = CreateTrigger( ) call DisableTrigger( gg_trg_Footmans_Exp ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Footmans_Exp, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_Footmans_Exp, Condition( function Trig_Footmans_Exp_Conditions ) ) call TriggerAddAction( gg_trg_Footmans_Exp, function Trig_Footmans_Exp_Actions ) endfunction //=========================================================================== // Trigger: Darkness Shot //=========================================================================== function Trig_Darkness_Shot_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A0AZ' ) ) then return false endif return true endfunction function Trig_Darkness_Shot_Actions takes nothing returns nothing call CreateNUnitsAtLoc( 1, 'e010', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), AngleBetweenPoints(GetUnitLoc(GetTriggerUnit()), GetSpellTargetLoc()) ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 4 ) call SetUnitAbilityLevelSwapped( 'A0B1', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0AZ', GetTriggerUnit()) ) call IssuePointOrderLoc( GetLastCreatedUnit(), "move", PolarProjectionBJ(GetUnitLoc(GetLastCreatedUnit()), 1800.00, GetUnitFacing(GetLastCreatedUnit())) ) endfunction //=========================================================================== function InitTrig_Darkness_Shot takes nothing returns nothing set gg_trg_Darkness_Shot = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Darkness_Shot, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Darkness_Shot, Condition( function Trig_Darkness_Shot_Conditions ) ) call TriggerAddAction( gg_trg_Darkness_Shot, function Trig_Darkness_Shot_Actions ) endfunction //=========================================================================== // Trigger: Genocide Bash //=========================================================================== function Trig_Genocide_Bash_Conditions takes nothing returns boolean if ( not ( GetLearnedSkillBJ() == 'AHbh' ) ) then return false endif return true endfunction function Trig_Genocide_Bash_Actions takes nothing returns nothing call SetPlayerTechResearchedSwap( 'Rhgb', GetUnitAbilityLevelSwapped('AHbh', GetLearningUnit()), GetOwningPlayer(GetLearningUnit()) ) endfunction //=========================================================================== function InitTrig_Genocide_Bash takes nothing returns nothing set gg_trg_Genocide_Bash = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Genocide_Bash, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_Genocide_Bash, Condition( function Trig_Genocide_Bash_Conditions ) ) call TriggerAddAction( gg_trg_Genocide_Bash, function Trig_Genocide_Bash_Actions ) endfunction //=========================================================================== // Trigger: Chaos Panic //=========================================================================== function Trig_Chaos_Panic_Conditions takes nothing returns boolean if ( GetSpellAbilityId() == 'A0B0' ) then return true endif if ( GetSpellAbilityId() == 'A0CF' ) then return true endif return false endfunction function Trig_Chaos_Panic_Func002001002001 takes nothing returns boolean return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true ) endfunction function Trig_Chaos_Panic_Func002001002002 takes nothing returns boolean return ( IsUnitAliveBJ(GetFilterUnit()) == true ) endfunction function Trig_Chaos_Panic_Func002001002 takes nothing returns boolean return GetBooleanAnd( Trig_Chaos_Panic_Func002001002001(), Trig_Chaos_Panic_Func002001002002() ) endfunction function Trig_Chaos_Panic_Func002A takes nothing returns nothing set udg_Chaos_Panic_HP[udg_Chaos_Panic_Nam] = GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) set udg_Chaos_Panic_MP[udg_Chaos_Panic_Nam] = GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) set udg_Chaos_Panic_Nam = ( udg_Chaos_Panic_Nam + 1 ) call AddSpecialEffectLocBJ( GetUnitLoc(GetEnumUnit()), "Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosDone.mdl" ) endfunction function Trig_Chaos_Panic_Func005001002001 takes nothing returns boolean return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true ) endfunction function Trig_Chaos_Panic_Func005001002002 takes nothing returns boolean return ( IsUnitAliveBJ(GetFilterUnit()) == true ) endfunction function Trig_Chaos_Panic_Func005001002 takes nothing returns boolean return GetBooleanAnd( Trig_Chaos_Panic_Func005001002001(), Trig_Chaos_Panic_Func005001002002() ) endfunction function Trig_Chaos_Panic_Func005Func002C takes nothing returns boolean if ( not ( IsUnitAlly(GetEnumUnit(), GetTriggerPlayer()) == true ) ) then return false endif return true endfunction function Trig_Chaos_Panic_Func005A takes nothing returns nothing local integer hran=GetRandomInt(0, ( udg_Chaos_Panic_Nam - 1 )) local integer mran=GetRandomInt(0, ( udg_Chaos_Panic_Nam - 1 )) local integer slv=GetUnitAbilityLevelSwapped('A0B0', GetTriggerUnit())+GetUnitAbilityLevelSwapped('A0CF', GetTriggerUnit()) local real skill=(0.5 - (0.1 * slv)) if ( GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetEnumUnit()) * skill < udg_Chaos_Panic_HP[hran] ) then call SetUnitLifeBJ( GetEnumUnit(), udg_Chaos_Panic_HP[hran] ) else if ( GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetEnumUnit()) * skill < GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) ) then if(GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) < udg_Chaos_Panic_HP[hran])then call SetUnitLifeBJ( GetEnumUnit(), udg_Chaos_Panic_HP[hran] ) endif else call SetUnitLifeBJ( GetEnumUnit(), GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetEnumUnit()) * skill ) endif endif if ( GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) * skill < udg_Chaos_Panic_MP[mran] ) then call SetUnitLifeBJ( GetEnumUnit(), udg_Chaos_Panic_MP[mran] ) else if ( GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) * skill < GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) ) then if(GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) < udg_Chaos_Panic_MP[mran])then call SetUnitManaBJ( GetEnumUnit(), udg_Chaos_Panic_MP[mran] ) endif else call SetUnitManaBJ( GetEnumUnit(), GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetEnumUnit()) * skill ) endif endif endfunction function Trig_Chaos_Panic_Func005AX takes nothing returns nothing local integer hran=GetRandomInt(0, ( udg_Chaos_Panic_Nam - 1 )) local integer mran=GetRandomInt(0, ( udg_Chaos_Panic_Nam - 1 )) local integer slv=GetUnitAbilityLevelSwapped('A0B0', GetTriggerUnit())+GetUnitAbilityLevelSwapped('A0CF', GetTriggerUnit()) local real skill=(0.5 - (0.1 * slv)) if ( Trig_Chaos_Panic_Func005Func002C() ) then if ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) < udg_Chaos_Panic_HP[hran] ) then call SetUnitLifeBJ( GetEnumUnit(), udg_Chaos_Panic_HP[hran] ) endif if ( GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) < udg_Chaos_Panic_MP[mran] ) then call SetUnitManaBJ( GetEnumUnit(), udg_Chaos_Panic_MP[mran] ) endif else if ( GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetEnumUnit()) * skill < udg_Chaos_Panic_HP[hran] ) then call SetUnitLifeBJ( GetEnumUnit(), udg_Chaos_Panic_HP[hran] ) else if ( GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetEnumUnit()) * skill < GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) ) then if(GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) < udg_Chaos_Panic_HP[hran])then call SetUnitLifeBJ( GetEnumUnit(), udg_Chaos_Panic_HP[hran] ) endif else call SetUnitLifeBJ( GetEnumUnit(), GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetEnumUnit()) * skill ) endif endif if ( GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) * skill < udg_Chaos_Panic_MP[mran] ) then call SetUnitLifeBJ( GetEnumUnit(), udg_Chaos_Panic_MP[mran] ) else if ( GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetEnumUnit()) * skill < GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) ) then if(GetUnitStateSwap(UNIT_STATE_MANA, GetEnumUnit()) < udg_Chaos_Panic_MP[mran])then call SetUnitManaBJ( GetEnumUnit(), udg_Chaos_Panic_MP[mran] ) endif else call SetUnitManaBJ( GetEnumUnit(), GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetEnumUnit()) * skill ) endif endif endif endfunction function Trig_Chaos_Panic_Actions takes nothing returns nothing call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Chaos_Panic_Func002001002)), function Trig_Chaos_Panic_Func002A ) call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Chaos_Panic_Func005001002)), function Trig_Chaos_Panic_Func005A ) if(GetUnitAbilityLevelSwapped('A0CD', GetTriggerUnit()) > 0)then call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Chaos_Panic_Func005001002)), function Trig_Chaos_Panic_Func005AX ) endif set udg_Chaos_Panic_Nam = 0 endfunction //=========================================================================== function InitTrig_Chaos_Panic takes nothing returns nothing set gg_trg_Chaos_Panic = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Chaos_Panic, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Chaos_Panic, Condition( function Trig_Chaos_Panic_Conditions ) ) call TriggerAddAction( gg_trg_Chaos_Panic, function Trig_Chaos_Panic_Actions ) endfunction //=========================================================================== // Trigger: Volcano //=========================================================================== function Trig_Volcano_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A0D3' endfunction function Trig_Volcano_Actions takes nothing returns nothing local unit cst=GetTriggerUnit() local unit dummy=CreateDummy(GetTriggerPlayer(), GetSpellTargetLoc(),10,'A0B2',GetUnitAbilityLevel(cst,'A0D3')) if ( GetUnitStateSwap(UNIT_STATE_LIFE, cst) <= ( 105.00 + ( 15.00 * I2R(GetUnitAbilityLevel(cst,'A0B3')) ) ) ) then call SetUnitLifeBJ( cst, 1.00 ) else call SetUnitLifeBJ( cst, ( GetUnitStateSwap(UNIT_STATE_LIFE, cst) - ( 105.00 + ( 15.00 * I2R(GetUnitAbilityLevel(cst,'A0B3')) ) ) ) ) endif call IssuePointOrderByIdLoc( dummy, String2OrderIdBJ("volcano"), GetSpellTargetLoc() ) endfunction function Start_Volcano takes nothing returns nothing set gg_trg_Volcano = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Volcano, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Volcano, Condition( function Trig_Volcano_Conditions ) ) call TriggerAddAction( gg_trg_Volcano, function Trig_Volcano_Actions ) endfunction function InitTrig_Volcano takes nothing returns nothing endfunction//=========================================================================== // Trigger: Graveyard of Tragedy //=========================================================================== function Trig_Graveyard_of_Tragedy_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A0B6' endfunction function Graveyard_of_TragedyCheck takes nothing returns boolean return ( IsUnitDeadBJ(GetFilterUnit()) == true ) endfunction function Trig_Graveyard_of_Tragedy_Actions takes nothing returns nothing local unit dummy=CreateDummy(GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()),1,'A0B7',1) local integer unitnum=CountUnitsInGroup(GetUnitsInRectMatching(RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 1600.00, 1600.00), Condition(function Graveyard_of_TragedyCheck))) loop exitwhen unitnum<=0 call IssueImmediateOrder( dummy, "instant" ) set unitnum=unitnum-1 endloop endfunction function Start_Graveyard_of_Tragedy takes nothing returns nothing set gg_trg_Graveyard_of_Tragedy = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Graveyard_of_Tragedy, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Graveyard_of_Tragedy, Condition( function Trig_Graveyard_of_Tragedy_Conditions ) ) call TriggerAddAction( gg_trg_Graveyard_of_Tragedy, function Trig_Graveyard_of_Tragedy_Actions ) endfunction function InitTrig_Graveyard_of_Tragedy takes nothing returns nothing endfunction//=========================================================================== // Trigger: Graveyard of Tragedy2 //=========================================================================== function Trig_Graveyard_of_Tragedy2_Conditions takes nothing returns boolean return GetUnitTypeId(GetSummonedUnit()) == 'h00P' endfunction function Trig_Graveyard_of_Tragedy2_Actions takes nothing returns nothing call SetUnitAbilityLevelSwapped( 'A0B8', GetSummonedUnit(), GetUnitAbilityLevelSwapped('A0B6', udg_PlayerX_Hero[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))]) ) call SetUnitAbilityLevelSwapped( 'S003', GetSummonedUnit(), GetUnitAbilityLevelSwapped('A0B6', udg_PlayerX_Hero[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))]) ) endfunction function Start_Graveyard_of_Tragedy2 takes nothing returns nothing set gg_trg_Graveyard_of_Tragedy2 = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Graveyard_of_Tragedy2, EVENT_PLAYER_UNIT_SUMMON ) call TriggerAddCondition( gg_trg_Graveyard_of_Tragedy2, Condition( function Trig_Graveyard_of_Tragedy2_Conditions ) ) call TriggerAddAction( gg_trg_Graveyard_of_Tragedy2, function Trig_Graveyard_of_Tragedy2_Actions ) endfunction function InitTrig_Graveyard_of_Tragedy2 takes nothing returns nothing endfunction//=========================================================================== // Trigger: Deth Explosion //=========================================================================== function Trig_Deth_Explosion_Conditions takes nothing returns boolean return GetUnitTypeId(GetSummonedUnit()) == 'h00O' endfunction function Trig_Deth_Explosion_Actions takes nothing returns nothing call SetUnitAbilityLevelSwapped( 'A0B4', GetSummonedUnit(), GetUnitAbilityLevelSwapped('A0B5', udg_PlayerX_Hero[GetConvertedPlayerId(GetOwningPlayer(GetSummonedUnit()))]) ) call AddSpecialEffectLocBJ( GetUnitLoc(GetSummonedUnit()), "Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl" ) endfunction function Start_Deth_Explosion takes nothing returns nothing set gg_trg_Deth_Explosion = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Deth_Explosion, EVENT_PLAYER_UNIT_SUMMON ) call TriggerAddCondition( gg_trg_Deth_Explosion, Condition( function Trig_Deth_Explosion_Conditions ) ) call TriggerAddAction( gg_trg_Deth_Explosion, function Trig_Deth_Explosion_Actions ) endfunction function InitTrig_Deth_Explosion takes nothing returns nothing endfunction//=========================================================================== // Trigger: Collapsing Soul //=========================================================================== function Trig_Collapsing_Soul_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A0BB' ) ) then return false endif return true endfunction function Trig_Collapsing_Soul_Actions takes nothing returns nothing call CreateNUnitsAtLoc( 1, 'h006', GetTriggerPlayer(), GetPlayerStartLocationLoc(GetTriggerPlayer()), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 11 ) call UnitAddAbilityBJ( 'A0BC', GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( 'A0BC', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0BB', GetTriggerUnit()) ) call IssueTargetOrder( GetLastCreatedUnit(), "drain", GetSpellTargetUnit() ) endfunction //=========================================================================== function InitTrig_Collapsing_Soul takes nothing returns nothing set gg_trg_Collapsing_Soul = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Collapsing_Soul, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Collapsing_Soul, Condition( function Trig_Collapsing_Soul_Conditions ) ) call TriggerAddAction( gg_trg_Collapsing_Soul, function Trig_Collapsing_Soul_Actions ) endfunction //=========================================================================== // Trigger: Entangling Roots //=========================================================================== function Trig_Entangling_Roots_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'AEer' ) ) then return false endif return true endfunction function Trig_Entangling_Roots_Func001001003001 takes nothing returns boolean return ( IsUnitEnemy(GetFilterUnit(), GetTriggerPlayer()) == true ) endfunction function Trig_Entangling_Roots_Func001001003002 takes nothing returns boolean return ( GetUnitAbilityLevelSwapped('A08E', GetFilterUnit()) == 0 ) endfunction function Trig_Entangling_Roots_Func001001003 takes nothing returns boolean return GetBooleanAnd( Trig_Entangling_Roots_Func001001003001(), Trig_Entangling_Roots_Func001001003002() ) endfunction function Trig_Entangling_Roots_Func001A takes nothing returns nothing call CreateNUnitsAtLoc( 1, 'h006', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 11 ) call UnitAddAbilityBJ( 'A0BD', GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( 'A0BD', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('AEer', GetTriggerUnit()) ) call IssueTargetOrder( GetLastCreatedUnit(), "entanglingroots", GetEnumUnit() ) endfunction function Trig_Entangling_Roots_Actions takes nothing returns nothing call ForGroupBJ( GetUnitsInRangeOfLocMatching(300.00, GetUnitLoc(GetSpellTargetUnit()), Condition(function Trig_Entangling_Roots_Func001001003)), function Trig_Entangling_Roots_Func001A ) endfunction //=========================================================================== function InitTrig_Entangling_Roots takes nothing returns nothing set gg_trg_Entangling_Roots = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Entangling_Roots, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Entangling_Roots, Condition( function Trig_Entangling_Roots_Conditions ) ) call TriggerAddAction( gg_trg_Entangling_Roots, function Trig_Entangling_Roots_Actions ) endfunction //=========================================================================== // Trigger: Heaven Punisher //=========================================================================== function Trig_Heaven_Punisher_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A0BE' ) ) then return false endif return true endfunction function Trig_Heaven_Punisher_Actions takes nothing returns nothing local integer lcc=3+5*GetUnitAbilityLevelSwapped('A0BE',GetTriggerUnit()) local location lll=GetUnitLoc(GetTriggerUnit()) local location lmm local integer uni if(GetUnitAbilityLevelSwapped('A0BE',GetTriggerUnit()) == 1)then set uni = 'earc' else if(GetUnitAbilityLevelSwapped('A0BE',GetTriggerUnit()) == 2)then set uni = 'edoc' else set uni = 'edot' endif endif loop exitwhen lcc<=0 set lmm=PolarProjectionBJ(lll,GetRandomReal(0,800),GetRandomReal(0,800)) call CreateNUnitsAtLoc( 1, uni, GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call IssuePointOrderLoc( GetLastCreatedUnit(), "attackground", lmm ) if(ModuloReal(lcc, 2) == 0 ) then call TriggerSleepAction( 0.01 ) endif set lcc=lcc-1 endloop endfunction //=========================================================================== function InitTrig_Heaven_Punisher takes nothing returns nothing set gg_trg_Heaven_Punisher = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Heaven_Punisher, EVENT_PLAYER_UNIT_SPELL_FINISH ) call TriggerAddCondition( gg_trg_Heaven_Punisher, Condition( function Trig_Heaven_Punisher_Conditions ) ) call TriggerAddAction( gg_trg_Heaven_Punisher, function Trig_Heaven_Punisher_Actions ) endfunction //=========================================================================== // Trigger: Over Frost //=========================================================================== function Trig_Over_Frost_Conditions takes nothing returns boolean if ( not ( GetUnitAbilityLevelSwapped('A09J', GetAttacker()) > 0 ) ) then return false endif if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then return false endif return true endfunction function Trig_Over_Frost_Func004C takes nothing returns boolean if ( not ( GetUnitAbilityLevelSwapped('A09K', GetAttacker()) < ( 10 - GetUnitAbilityLevelSwapped('A09J', GetAttacker()) ) ) ) then return false endif return true endfunction function Trig_Over_Frost_Actions takes nothing returns nothing if ( Trig_Over_Frost_Func004C() ) then call SetUnitAbilityLevelSwapped( 'A09K', GetAttacker(), ( GetUnitAbilityLevelSwapped('A09K', GetAttacker()) + 1 ) ) else call CreateNUnitsAtLoc( 1, 'h006', GetOwningPlayer(GetAttacker()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 1 ) call UnitAddAbilityBJ( 'A0B9', GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( 'A0B9', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A09J', GetAttacker()) ) call IssueTargetOrder( GetLastCreatedUnit(), "frostnova", GetAttackedUnitBJ() ) call SetUnitAbilityLevelSwapped( 'A09K', GetAttacker(), 1 ) endif endfunction //=========================================================================== function InitTrig_Over_Frost takes nothing returns nothing set gg_trg_Over_Frost = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Over_Frost, EVENT_PLAYER_UNIT_ATTACKED ) call TriggerAddCondition( gg_trg_Over_Frost, Condition( function Trig_Over_Frost_Conditions ) ) call TriggerAddAction( gg_trg_Over_Frost, function Trig_Over_Frost_Actions ) endfunction //=========================================================================== // Trigger: Absolute //=========================================================================== function Trig_Absolute_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A0BV' ) ) then return false endif return true endfunction function Trig_Absolute_Actions takes nothing returns nothing local unit ska call CreateNUnitsAtLoc( 1, 'h003', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), ( GetUnitFacing(GetTriggerUnit()) + 60.00 ) ) set ska=GetLastCreatedUnit() call UnitApplyTimedLife( ska, 1, 1 ) call SetUnitAbilityLevelSwapped( 'A0BW', ska, GetUnitAbilityLevelSwapped('A0BV', GetTriggerUnit()) ) call IssuePointOrderLoc( ska, "impale", PolarProjectionBJ(GetUnitLoc(ska), 400.00, GetUnitFacing(ska)) ) call CreateNUnitsAtLoc( 1, 'h003', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), ( GetUnitFacing(GetTriggerUnit()) + 30.00 ) ) set ska=GetLastCreatedUnit() call UnitApplyTimedLife( ska, 1, 1 ) call SetUnitAbilityLevelSwapped( 'A0BW', ska, GetUnitAbilityLevelSwapped('A0BV', GetTriggerUnit()) ) call IssuePointOrderLoc( ska, "impale", PolarProjectionBJ(GetUnitLoc(ska), 400.00, GetUnitFacing(ska)) ) call CreateNUnitsAtLoc( 1, 'h003', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), ( GetUnitFacing(GetTriggerUnit()) - 60.00 ) ) set ska=GetLastCreatedUnit() call UnitApplyTimedLife( ska, 1, 1 ) call SetUnitAbilityLevelSwapped( 'A0BW', ska, GetUnitAbilityLevelSwapped('A0BV', GetTriggerUnit()) ) call IssuePointOrderLoc( ska, "impale", PolarProjectionBJ(GetUnitLoc(ska), 400.00, GetUnitFacing(ska)) ) call CreateNUnitsAtLoc( 1, 'h003', GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()), ( GetUnitFacing(GetTriggerUnit()) - 30.00 ) ) set ska=GetLastCreatedUnit() call UnitApplyTimedLife( ska, 1, 1 ) call SetUnitAbilityLevelSwapped( 'A0BW', ska, GetUnitAbilityLevelSwapped('A0BV', GetTriggerUnit()) ) call IssuePointOrderLoc( ska, "impale", PolarProjectionBJ(GetUnitLoc(ska), 400.00, GetUnitFacing(ska)) ) endfunction //=========================================================================== function InitTrig_Absolute takes nothing returns nothing set gg_trg_Absolute = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Absolute, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Absolute, Condition( function Trig_Absolute_Conditions ) ) call TriggerAddAction( gg_trg_Absolute, function Trig_Absolute_Actions ) endfunction //=========================================================================== // Trigger: Revitalization //=========================================================================== function Trig_Revitalization_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A097' endfunction function Trig_Revitalization_Actions takes nothing returns nothing call UnitRemoveBuffsBJ( bj_REMOVEBUFFS_ALL, GetSpellTargetUnit() ) call SetUnitLifeBJ( GetSpellTargetUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) + ( GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetSpellTargetUnit()) * ( 0.2 * I2R(GetUnitAbilityLevel(GetTriggerUnit(),'A097')) + 0.1 ) ) ) ) endfunction function Start_Revitalization takes nothing returns nothing set gg_trg_Revitalization = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Revitalization, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Revitalization, Condition( function Trig_Revitalization_Conditions ) ) call TriggerAddAction( gg_trg_Revitalization, function Trig_Revitalization_Actions ) endfunction function InitTrig_Revitalization takes nothing returns nothing endfunction//=========================================================================== // Trigger: Backstab //=========================================================================== function BackStab_Roll takes nothing returns boolean if((RAbsBJ((GetUnitFacing(GetTriggerUnit())-GetUnitFacing(GetAttacker())))<=105.))then return true endif return false endfunction function Backstab_Main_Conditions takes nothing returns boolean local string Tab=H2Tx(gg_trg_Backstab) local unit Caster=GetUnit(Tab,"Caster") return GetEventDamageSource()==Caster endfunction function Trig_Backstab_Conditions takes nothing returns boolean if(IsUnitAlly(GetTriggerUnit(),GetOwningPlayer(GetAttacker())))then return false endif if(not(GetUnitAbilityLevelSwapped('A089',GetAttacker())>0))then return false endif if(not(IsUnitType(GetTriggerUnit(),UNIT_TYPE_STRUCTURE)==false))then return false endif if(not BackStab_Roll())then return false endif return true endfunction function Trig_Backstab_Main takes nothing returns nothing local unit at=GetEventDamageSource() local real dam=(GetUnitAbilityLevel(at,'A089')*0.4) * GetHeroStatBJ(1,at,true) local effect lkW=AddSpecialEffectTargetUnitBJ("chest",GetTriggerUnit(),"Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl") call DisableTrigger( GetTriggeringTrigger() ) call UnitDamageTargetBJ( at, GetTriggerUnit(), dam, ATTACK_TYPE_HERO, DAMAGE_TYPE_UNKNOWN ) call DestroyEffect(lkW) call DestroyTrigger( GetTriggeringTrigger() ) endfunction function Trig_Backstab_Actions takes nothing returns nothing local trigger ltt=CreateTrigger() local string lf5=H2Tx(gg_trg_Backstab) call SetHandle(lf5,"Caster",GetAttacker()) call TriggerRegisterUnitEvent(ltt,GetTriggerUnit(),EVENT_UNIT_DAMAGED) call TriggerAddCondition(ltt,Condition(function Backstab_Main_Conditions)) call TriggerAddAction(ltt,function Trig_Backstab_Main) endfunction function Start_Backstab takes nothing returns nothing set gg_trg_Backstab=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(gg_trg_Backstab,EVENT_PLAYER_UNIT_ATTACKED) call TriggerAddCondition(gg_trg_Backstab,Condition(function Trig_Backstab_Conditions)) call TriggerAddAction(gg_trg_Backstab,function Trig_Backstab_Actions) endfunction function InitTrig_Backstab takes nothing returns nothing endfunction//=========================================================================== // Trigger: Nether Drain //=========================================================================== function Trig_Nether_Drain_Conditions takes nothing returns boolean if ( not ( GetPlayerController(GetOwningPlayer(GetKillingUnitBJ())) == MAP_CONTROL_USER ) ) then return false endif if ( not ( GetUnitAbilityLevelSwapped('A0C0', udg_PlayerX_Hero[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))]) > 0 ) ) then return false endif if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_STRUCTURE) == false ) ) then return false endif return true endfunction function Trig_Nether_Drain_Actions takes nothing returns nothing local unit Obl=udg_PlayerX_Hero[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))] call AddSpecialEffectTargetUnitBJ( "origin", Obl, "Abilities\\Spells\\Human\\Heal\\HealTarget.mdl" ) call SetUnitLifeBJ( Obl, GetUnitStateSwap(UNIT_STATE_LIFE, Obl) + ( GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetDyingUnit()) * ( I2R(GetUnitAbilityLevel(Obl,'A0C0')) * 0.04 ) ) ) endfunction function Start_Nether_Drain takes nothing returns nothing set gg_trg_Nether_Drain = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Nether_Drain, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( gg_trg_Nether_Drain, Condition( function Trig_Nether_Drain_Conditions ) ) call TriggerAddAction( gg_trg_Nether_Drain, function Trig_Nether_Drain_Actions ) endfunction function InitTrig_Nether_Drain takes nothing returns nothing endfunction//=========================================================================== // Trigger: Decrepify //=========================================================================== function Trig_Decrepify_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A0C1' endfunction function Trig_Decrepify_Actions takes nothing returns nothing local group lGroup=CreateGroup() local unit tru=GetTriggerUnit() local unit lTMP local unit dummy=CreateDummy(GetTriggerPlayer(),GetUnitLoc(GetTriggerUnit()),1,'A0CC',GetUnitAbilityLevelSwapped('A0C1', GetTriggerUnit())) local real pxx=GetUnitX(tru) local real pyy=GetUnitY(tru) call GroupEnumUnitsInRange(lGroup,pxx,pyy,450,null) loop set lTMP=FirstOfGroup(lGroup) exitwhen lTMP==null if(IsUnitEnemy(lTMP,GetOwningPlayer(tru))and IsUnitVisible(lTMP,GetOwningPlayer(tru)))then if(GetUnitAbilityLevel(lTMP,'A08E')!=1 and GetUnitState(lTMP,UNIT_STATE_LIFE)>0 and IsUnitType(lTMP,UNIT_TYPE_STRUCTURE)==false)then call IssueTargetOrder( dummy, "drunkenhaze", lTMP ) endif endif call GroupRemoveUnit(lGroup,lTMP) endloop call DestroyGroup(lGroup) endfunction function Start_Decrepify takes nothing returns nothing set gg_trg_Decrepify = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Decrepify, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Decrepify, Condition( function Trig_Decrepify_Conditions ) ) call TriggerAddAction( gg_trg_Decrepify, function Trig_Decrepify_Actions ) endfunction function InitTrig_Decrepify takes nothing returns nothing endfunction//=========================================================================== // Trigger: DecrepifySlow //=========================================================================== function Trig_DecrepifySlow_Conditions takes nothing returns boolean return GetSpellAbilityId()=='A0CC' endfunction function DecrepifySlow_Damage takes nothing returns nothing local trigger ltt=GetTriggeringTrigger() local unit lKg=GetEventDamageSource() local unit lke=GetTriggerUnit() local unit lnu=GetUnit(H2Tx(ltt),"Chen") local real lnU=GetEventDamage()*.1*GetUnitAbilityLevel(lnu,'A0CC') if(GetEventDamage()>10)then call DisableTrigger(ltt) call UnitDamageTargetBJ(lKg,lke,lnU,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL) call EnableTrigger(ltt) endif endfunction function Trig_DecrepifySlow_Actions takes nothing returns nothing local trigger lnV=CreateTrigger() local unit lfo=GetTriggerUnit() call TriggerRegisterUnitEvent(lnV,GetSpellTargetUnit(),EVENT_UNIT_DAMAGED) call TriggerAddAction(lnV,function DecrepifySlow_Damage) call SetHandle(H2Tx(lnV),"Chen",lfo) call PolledWait(10.) call DisableTrigger(lnV) endfunction function Start_DecrepifySlow takes nothing returns nothing set gg_trg_DecrepifySlow=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(gg_trg_DecrepifySlow,EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddCondition(gg_trg_DecrepifySlow,Condition(function Trig_DecrepifySlow_Conditions)) call TriggerAddAction(gg_trg_DecrepifySlow,function Trig_DecrepifySlow_Actions) endfunction function InitTrig_DecrepifySlow takes nothing returns nothing endfunction//=========================================================================== // Trigger: Wild_Axes //=========================================================================== // Objects used: // 'A0CG' = Wild Axes (Beastmaster : Rexxar) // 'A08E' = Marker (Nether Ward 4,Lightning Bolter,Nether Ward 3,Nether Ward 2,Vengeance Death caster,...) // 'hgyr' = Boomerang // 'Amrf' = Crow Form (Medivh) function WildAxesSpell takes nothing returns boolean return GetSpellAbilityId()=='A0CG' endfunction function WildAxesTreeCut takes nothing returns nothing call KillDestructable(GetEnumDestructable()) endfunction function WildAxesDamage takes unit pWho,real pxx,real pyy,group pVictims returns nothing local group lGroup=CreateGroup() local unit lTMP local rect lMx=Rect(pxx-150,pyy-150,pxx+150,pyy+150) call GroupEnumUnitsInRange(lGroup,pxx,pyy,150,null) loop set lTMP=FirstOfGroup(lGroup) exitwhen lTMP==null if(IsUnitInGroup(lTMP,pVictims)==false and IsUnitEnemy(lTMP,GetOwningPlayer(pWho))and IsUnitVisible(lTMP,GetOwningPlayer(pWho)))then if(GetUnitAbilityLevel(lTMP,'A08E')!=1 and GetUnitState(lTMP,UNIT_STATE_LIFE)>0 and IsUnitType(lTMP,UNIT_TYPE_STRUCTURE)==false)then call GroupAddUnit(pVictims,lTMP) call UnitDamageTarget(pWho,lTMP,60+GetUnitAbilityLevel(pWho,'A0CG')*30,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_METAL_HEAVY_SLICE) call AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",lTMP,"overhead") endif endif call GroupRemoveUnit(lGroup,lTMP) endloop call EnumDestructablesInRect(lMx,null,function WildAxesTreeCut) call RemoveRect(lMx) call DestroyGroup(lGroup) endfunction function WildAxesTimer takes nothing returns nothing local string lTable=H2Tx(GetExpiredTimer()) local unit lAxe=GetUnit(lTable,"Axe") local unit lCaster=GetUnit(lTable,"Hero") local real lAx=GetReal(lTable,"Ax") local real lAy=GetReal(lTable,"Ay") local real lCx=GetReal(lTable,"Cx") local real lCy=GetReal(lTable,"Cy") local real lBx=GetReal(lTable,"Bx") local real lBy=GetReal(lTable,"By") local real laa=GetReal(lTable,"a") local real lbb=1-laa local boolean lIsPassed=GetBoolean(lTable,"FirstPass") local group lCheckGroup=GetGroup(lTable,"AlreadyDamaged") call SetUnitX(lAxe,SafeX(lAx*laa*laa+lBx*2*laa*lbb+lCx*lbb*lbb)) call SetUnitY(lAxe,SafeY(lAy*laa*laa+lBy*2*laa*lbb+lCy*lbb*lbb)) call WildAxesDamage(lCaster,GetUnitX(lAxe),GetUnitY(lAxe),lCheckGroup) if(lIsPassed)then call SetReal(lTable,"a",laa-.02) else call SetReal(lTable,"a",laa+.02) call SetReal(lTable,"Ax",GetUnitX(lCaster)) call SetReal(lTable,"Ay",GetUnitY(lCaster)) endif if(laa<0 and lIsPassed)then call SetBoolean(lTable,"FirstPass",false) call SetReal(lTable,"Bx",lAx+650*Cos(Atan2(lCy-lAy,lCx-lAx)+GetReal(lTable,"AngleOffset"))) call SetReal(lTable,"By",lAy+650*Sin(Atan2(lCy-lAy,lCx-lAx)+GetReal(lTable,"AngleOffset"))) call SetHandle(lTable,"AlreadyDamaged",CreateGroup()) endif if(laa>1 and lIsPassed==false)then call PauseTimer(GetExpiredTimer()) call DestroyGroup(lCheckGroup) call FastFlush(lTable) call RemoveUnit(lAxe) call DestroyTimer(GetExpiredTimer()) endif endfunction function WildAxesSettings takes nothing returns nothing local unit lCaster=GetTriggerUnit() local real lCasterX=GetUnitX(lCaster) local real lCasterY=GetUnitY(lCaster) local real lTargetX=GetLocationX(GetSpellTargetLoc()) local real lTargetY=GetLocationY(GetSpellTargetLoc()) local unit lAxe1=CreateUnit(GetOwningPlayer(lCaster),'hgyr',lCasterX,lCasterY,270.) // local unit lAxe2=CreateUnit(GetOwningPlayer(lCaster),'hgyr',lCasterX,lCasterY,270.) local string lTable1 // local string lTable2 local timer lTimer1=CreateTimer() // local timer lTimer2=CreateTimer() if GetSpellTargetUnit()!=null then set lTargetX=GetUnitX(GetSpellTargetUnit()) // set lTargetY=GetUnitY(GetSpellTargetUnit()) endif call UnitAddAbility(lAxe1,'Amrf') call UnitRemoveAbility(lAxe1,'Amrf') call SetUnitFlyHeight(lAxe1,150,0) // call UnitAddAbility(lAxe2,'Amrf') // call UnitRemoveAbility(lAxe2,'Amrf') // call SetUnitFlyHeight(lAxe2,150,0) set lTable1=H2Tx(lTimer1) call SetHandle(lTable1,"Hero",lCaster) call SetHandle(lTable1,"Axe",lAxe1) call SetHandle(lTable1,"AlreadyDamaged",CreateGroup()) call SetReal(lTable1,"Ax",lCasterX) call SetReal(lTable1,"Ay",lCasterY) call SetReal(lTable1,"Cx",lTargetX) call SetReal(lTable1,"Cy",lTargetY) call SetReal(lTable1,"Bx",lCasterX+650*Cos(Atan2(lTargetY-lCasterY,lTargetX-lCasterX)+45)) call SetReal(lTable1,"By",lCasterY+650*Sin(Atan2(lTargetY-lCasterY,lTargetX-lCasterX)+45)) call SetReal(lTable1,"a",1) call SetReal(lTable1,"AngleOffset",-45) call SetBoolean(lTable1,"FirstPass",true) // set lTable2=H2Tx(lTimer2) // call SetHandle(lTable2,"Hero",lCaster) // call SetHandle(lTable2,"Axe",lAxe2) // call SetHandle(lTable2,"AlreadyDamaged",CreateGroup()) // call SetReal(lTable2,"Ax",lCasterX) // call SetReal(lTable2,"Ay",lCasterY) // call SetReal(lTable2,"Cx",lTargetX) // call SetReal(lTable2,"Cy",lTargetY) // call SetReal(lTable2,"Bx",lCasterX+300*Cos(Atan2(lTargetY-lCasterY,lTargetX-lCasterX)-45)) // call SetReal(lTable2,"By",lCasterY+300*Sin(Atan2(lTargetY-lCasterY,lTargetX-lCasterX)-45)) // call SetReal(lTable2,"a",1) // call SetReal(lTable2,"AngleOffset",45) // call SetBoolean(lTable2,"FirstPass",true) call TimerStart(lTimer1,.025,true,function WildAxesTimer) // call TimerStart(lTimer2,.025,true,function WildAxesTimer) endfunction function Start_Wild_Axes takes nothing returns nothing local trigger ltt=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddCondition(ltt,Condition(function WildAxesSpell)) call TriggerAddAction(ltt,function WildAxesSettings) endfunction function InitTrig_Wild_Axes takes nothing returns nothing endfunction//=========================================================================== // Trigger: Axe Storm //=========================================================================== // Objects used: // 'A0CH' = Wild Axes (Beastmaster : Rexxar) // 'A08E' = Marker (Nether Ward 4,Lightning Bolter,Nether Ward 3,Nether Ward 2,Vengeance Death caster,...) // 'hgyr' = Boomerang // 'Amrf' = Crow Form (Medivh) function Axe_StormSpell takes nothing returns boolean if(GetSpellAbilityId()=='A0CH')then return true endif if(GetSpellAbilityId()=='A0CJ')then return true endif return false endfunction function Axe_StormTreeCut takes nothing returns nothing call KillDestructable(GetEnumDestructable()) endfunction function Axe_StormDamage takes unit pWho,real pxx,real pyy,group pVictims returns nothing local group lGroup=CreateGroup() local unit lTMP local rect lMx=Rect(pxx-150,pyy-150,pxx+150,pyy+150) call GroupEnumUnitsInRange(lGroup,pxx,pyy,150,null) loop set lTMP=FirstOfGroup(lGroup) exitwhen lTMP==null if(IsUnitInGroup(lTMP,pVictims)==false and IsUnitEnemy(lTMP,GetOwningPlayer(pWho))and IsUnitVisible(lTMP,GetOwningPlayer(pWho)))then if(GetUnitAbilityLevel(lTMP,'A08E')!=1 and GetUnitState(lTMP,UNIT_STATE_LIFE)>0 and IsUnitType(lTMP,UNIT_TYPE_STRUCTURE)==false)then call GroupAddUnit(pVictims,lTMP) call UnitDamageTarget(pWho,lTMP,100+GetUnitAbilityLevel(pWho,'A0CI')*50,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_METAL_HEAVY_SLICE) call AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",lTMP,"overhead") endif endif call GroupRemoveUnit(lGroup,lTMP) endloop call EnumDestructablesInRect(lMx,null,function Axe_StormTreeCut) call RemoveRect(lMx) call DestroyGroup(lGroup) endfunction function Axe_StormTimer takes nothing returns nothing local string lTable=H2Tx(GetExpiredTimer()) local unit lAxe=GetUnit(lTable,"Axe") local unit lCaster=GetUnit(lTable,"Hero") local real lAx=GetReal(lTable,"Ax") local real lAy=GetReal(lTable,"Ay") local real lCx=GetLocationX(PolarProjectionBJ(GetUnitLoc(lCaster), 300.00, GetUnitFacing(lCaster))) local real lCy=GetLocationY(PolarProjectionBJ(GetUnitLoc(lCaster), 300.00, GetUnitFacing(lCaster))) local real lBx=GetReal(lTable,"Bx") local real lBy=GetReal(lTable,"By") local real laa=GetReal(lTable,"a") local real lbb=1-laa local integer count=GetInteger(lTable,"Count") local boolean lIsPassed=GetBoolean(lTable,"FirstPass") local group lCheckGroup=GetGroup(lTable,"AlreadyDamaged") call SetUnitX(lAxe,SafeX(lAx*laa*laa+lBx*2*laa*lbb+lCx*lbb*lbb)) call SetUnitY(lAxe,SafeY(lAy*laa*laa+lBy*2*laa*lbb+lCy*lbb*lbb)) call Axe_StormDamage(lCaster,GetUnitX(lAxe),GetUnitY(lAxe),lCheckGroup) if(lIsPassed)then call SetReal(lTable,"a",laa-.02) else call SetReal(lTable,"a",laa+.02) call SetReal(lTable,"Ax",GetUnitX(lCaster)) call SetReal(lTable,"Ay",GetUnitY(lCaster)) endif if(laa<0 and lIsPassed)then call SetBoolean(lTable,"FirstPass",false) call SetReal(lTable,"Bx",lAx+500*Cos(Atan2(lCy-lAy,lCx-lAx)+GetReal(lTable,"AngleOffset"))) call SetReal(lTable,"By",lAy+500*Sin(Atan2(lCy-lAy,lCx-lAx)+GetReal(lTable,"AngleOffset"))) call SetHandle(lTable,"AlreadyDamaged",CreateGroup()) endif if(laa>1 and lIsPassed==false)then call SetInteger(lTable,"Count",count-1) call SetBoolean(lTable,"FirstPass",true) endif if(count <= 0)then call PauseTimer(GetExpiredTimer()) call DestroyGroup(lCheckGroup) call FastFlush(lTable) call RemoveUnit(lAxe) call DestroyTimer(GetExpiredTimer()) endif endfunction function Axe_StormSettings takes nothing returns nothing local unit lCaster=GetTriggerUnit() local real lCasterX=GetUnitX(lCaster) local real lCasterY=GetUnitY(lCaster) local real lTargetX=GetLocationX(PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 300.00, GetUnitFacing(GetTriggerUnit()))) local real lTargetY=GetLocationY(PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 300.00, GetUnitFacing(GetTriggerUnit()))) local unit lAxe1=CreateUnit(GetOwningPlayer(lCaster),'hgyr',lCasterX,lCasterY,270.) local unit lAxe2=CreateUnit(GetOwningPlayer(lCaster),'hgyr',lCasterX,lCasterY,270.) local string lTable1 local string lTable2 local timer lTimer1=CreateTimer() local timer lTimer2=CreateTimer() call UnitAddAbility(lAxe1,'Amrf') call UnitRemoveAbility(lAxe1,'Amrf') call SetUnitFlyHeight(lAxe1,150,0) call UnitAddAbility(lAxe2,'Amrf') call UnitRemoveAbility(lAxe2,'Amrf') call SetUnitFlyHeight(lAxe2,150,0) set lTable1=H2Tx(lTimer1) call SetHandle(lTable1,"Hero",lCaster) call SetHandle(lTable1,"Axe",lAxe1) call SetHandle(lTable1,"AlreadyDamaged",CreateGroup()) call SetReal(lTable1,"Ax",lCasterX) call SetReal(lTable1,"Ay",lCasterY) call SetReal(lTable1,"Cx",lTargetX) call SetReal(lTable1,"Cy",lTargetY) call SetReal(lTable1,"Bx",lCasterX+500*Cos(Atan2(lTargetY-lCasterY,lTargetX-lCasterX)+90)) call SetReal(lTable1,"By",lCasterY+500*Sin(Atan2(lTargetY-lCasterY,lTargetX-lCasterX)+90)) call SetReal(lTable1,"a",1) call SetReal(lTable1,"AngleOffset",-90) call SetBoolean(lTable1,"FirstPass",true) call SetInteger(lTable1,"Count",(GetUnitAbilityLevel(GetTriggerUnit(),'A0CH')+GetUnitAbilityLevel(GetTriggerUnit(),'A0CJ'))) set lTable2=H2Tx(lTimer2) call SetHandle(lTable2,"Hero",lCaster) call SetHandle(lTable2,"Axe",lAxe2) call SetHandle(lTable2,"AlreadyDamaged",CreateGroup()) call SetReal(lTable2,"Ax",lCasterX) call SetReal(lTable2,"Ay",lCasterY) call SetReal(lTable2,"Cx",lTargetX) call SetReal(lTable2,"Cy",lTargetY) call SetReal(lTable2,"Bx",lCasterX+500*Cos(Atan2(lTargetY-lCasterY,lTargetX-lCasterX)-90)) call SetReal(lTable2,"By",lCasterY+500*Sin(Atan2(lTargetY-lCasterY,lTargetX-lCasterX)-90)) call SetReal(lTable2,"a",1) call SetReal(lTable2,"AngleOffset",90) call SetBoolean(lTable2,"FirstPass",true) call SetInteger(lTable2,"Count",(GetUnitAbilityLevel(GetTriggerUnit(),'A0CH')+GetUnitAbilityLevel(GetTriggerUnit(),'A0CJ'))) call TimerStart(lTimer1,.025,true,function Axe_StormTimer) call TimerStart(lTimer2,.025,true,function Axe_StormTimer) endfunction function Start_Axe_Storm takes nothing returns nothing local trigger ltt=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddCondition(ltt,Condition(function Axe_StormSpell)) call TriggerAddAction(ltt,function Axe_StormSettings) endfunction function InitTrig_Axe_Storm takes nothing returns nothing endfunction//=========================================================================== // Trigger: Observer Trap //=========================================================================== function Trig_Observer_Trap_Conditions takes nothing returns boolean return GetUnitTypeId(GetSummonedUnit()) == 'o004' endfunction function Trig_Observer_Trap_Main takes nothing returns nothing local trigger ltt=GetTriggeringTrigger() local unit lnu=GetUnit(H2Tx(ltt),"Observer") call KillUnit( lnu ) call EnableTrigger(ltt) endfunction function Trig_Observer_Trap_Actions takes nothing returns nothing local unit Trap=GetSummonedUnit() local unit damy local trigger ltt=CreateTrigger() call CreateNUnitsAtLoc( 1, 'h00E', GetTriggerPlayer(), GetUnitLoc(Trap), bj_UNIT_FACING ) set damy=GetLastCreatedUnit() call UnitAddAbilityBJ( 'A0CO', damy ) call SetUnitAbilityLevelSwapped( 'A0CO', damy, GetUnitAbilityLevelSwapped('Arsw', GetSummoningUnit()) ) call TriggerRegisterUnitEvent(ltt,Trap,EVENT_UNIT_DEATH) call TriggerAddAction(ltt,function Trig_Observer_Trap_Main) call SetHandle(H2Tx(ltt),"Observer",damy) endfunction function Start_Observer_Trap takes nothing returns nothing set gg_trg_Observer_Trap = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Observer_Trap, EVENT_PLAYER_UNIT_SUMMON ) call TriggerAddCondition( gg_trg_Observer_Trap, Condition( function Trig_Observer_Trap_Conditions ) ) call TriggerAddAction( gg_trg_Observer_Trap, function Trig_Observer_Trap_Actions ) endfunction function InitTrig_Observer_Trap takes nothing returns nothing endfunction//=========================================================================== // Trigger: Sniper // // 'A0CM' = Sniper // 'A08E' = Marker // 'u002' = Laser Rifle //=========================================================================== function Trig_Sniper_Conditions takes nothing returns boolean if(GetSpellAbilityId()=='A0CM')then return true endif if(GetSpellAbilityId()=='A0D6')then return true endif return false endfunction function SniperFilter takes nothing returns boolean if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE) or GetUnitAbilityLevel(GetFilterUnit(),'A08E')==1)or GetFilterUnit()==udg_unit_temp then return false endif if GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)<=0 or GetUnitTypeId(GetFilterUnit())=='u002'or GetUnitTypeId(GetFilterUnit())=='u00F'or IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT) then return false endif return true endfunction function SniperTimer takes nothing returns nothing local timer ltt=GetExpiredTimer() local timer lTk=GetTimer(H2Tx(ltt),"ExtendCache") local string lf5=H2Tx(lTk) local integer lTK=GetInteger(lf5,"LaserRifleNumber") local integer count=GetInteger(lf5,"SniperCt") local unit lFB=GetUnit(lf5,"SniperTarget") local unit lTl=GetUnit(lf5,"Sniper") local unit lgl=GetUnit(lf5,"LaserRifles"+I2S(count)) call RemoveUnit(lgl) call SetInteger(lf5,"SniperCt",count+1) if(lTK<=count)then call PauseTimer(ltt) call FastFlush(lf5) call FastFlush(H2Tx(ltt)) call PolledWait(1) call DestroyTimer(ltt) call DestroyTimer(lTk) endif endfunction function SniperDamage takes unit pWho,real pxx,real pyy,group pVictims,string lf5 returns nothing local group lGroup=CreateGroup() local unit lTMP local integer Dam=GetInteger(lf5,"SniperDamage") local rect lMx=Rect(pxx-150,pyy-150,pxx+150,pyy+150) local boolean flag=false call GroupEnumUnitsInRange(lGroup,pxx,pyy,150,null) loop set lTMP=FirstOfGroup(lGroup) exitwhen lTMP==null if(IsUnitInGroup(lTMP,pVictims)==false and IsUnitEnemy(lTMP,GetOwningPlayer(pWho))and IsUnitVisible(lTMP,GetOwningPlayer(pWho)))then if(GetUnitAbilityLevel(lTMP,'A08E')!=1 and GetUnitState(lTMP,UNIT_STATE_LIFE)>0 and IsUnitType(lTMP,UNIT_TYPE_STRUCTURE)==false)then call GroupAddUnit(pVictims,lTMP) call UnitDamageTarget(pWho,lTMP,Dam,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_ENHANCED,WEAPON_TYPE_METAL_HEAVY_SLICE) call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",lTMP,"origin")) set flag = true endif endif call GroupRemoveUnit(lGroup,lTMP) endloop call SetInteger(lf5,"SniperDamage",R2I(I2R(Dam)*0.9)) call RemoveRect(lMx) call DestroyGroup(lGroup) endfunction function SniperMain takes nothing returns nothing local timer ltt=GetExpiredTimer() local string lf5=H2Tx(ltt) local integer lTK=GetInteger(lf5,"LaserRifleNumber") local unit lTl=GetUnit(lf5,"Sniper") local real lnM=GetReal(lf5,"Angle") local integer Dam=GetInteger(lf5,"SniperDamage") local unit lgl local group lCheckGroup=GetGroup(lf5,"SniperDamaged") local group lEw local real lxx local real lyy local boolexpr lTM local timer lTn local string lCache2 if(lTK<400)then set lTK=lTK+1 set lxx=GetUnitX(lTl)+lTK*40*Cos(lnM*bj_DEGTORAD) set lyy=GetUnitY(lTl)+lTK*40*Sin(lnM*bj_DEGTORAD) set lgl=CreateUnit(GetOwningPlayer(lTl),'u002',lxx,lyy,lnM) call SetHandle(lf5,"LaserRifles"+I2S(lTK),lgl) call SetInteger(lf5,"LaserRifleNumber",lTK) set lEw=CreateGroup() set udg_unit_temp=lTl set lTM=Condition(function SniperFilter) call GroupEnumUnitsInRange(lEw,lxx,lyy,'}',lTM) call DestroyBoolExpr(lTM) set lgl=FirstOfGroup(lEw) call DestroyGroup(lEw) if(lTK==5)then set lTn=CreateTimer() call SetHandle(H2Tx(lTn),"ExtendCache",ltt) call TimerStart(lTn,.01,true,function SniperTimer) endif if(lgl!=null)then call SetHandle(lf5,"SniperTarget",lgl) if IsUnitEnemy(lgl,GetOwningPlayer(lTl))then if ( UnitHasItemOfTypeBJ(lTl, 'I01N') == true ) then call SniperDamage(lTl,lxx,lyy,lCheckGroup,lf5) else call UnitDamageTargetBJ(lTl,lgl,Dam,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_ENHANCED) call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",lgl,"origin")) call PauseTimer(ltt) endif if(lTK<5)then set lTn=CreateTimer() call SetHandle(H2Tx(lTn),"ExtendCache",ltt) call TimerStart(lTn,.01,true,function SniperTimer) endif endif endif else call PauseTimer(ltt) endif endfunction function Trig_Sniper_Actions takes nothing returns nothing local location lTo=GetUnitLoc(GetSpellAbilityUnit()) local location lng=GetSpellTargetLoc() local timer ltt=CreateTimer() local unit lTl=GetTriggerUnit() local real lnM=AngleBetweenPoints(lTo,lng) local string lf5=H2Tx(ltt) local integer lmZ=GetUnitAbilityLevel(lTl,'A0CM')+GetUnitAbilityLevel(lTl,'A0D6') call SetHandle(lf5,"Sniper",lTl) call SetReal(lf5,"Angle",lnM) call SetHandle(lf5,"SniperDamaged",CreateGroup()) call SetInteger(lf5,"SniperDamage",100+lmZ*300) call TimerStart(ltt,.01,true,function SniperMain) call RemoveLocation(lTo) call RemoveLocation(lng) endfunction function Start_Sniper takes nothing returns nothing set gg_trg_Sniper=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(gg_trg_Sniper,EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddCondition(gg_trg_Sniper,Condition(function Trig_Sniper_Conditions)) call TriggerAddAction(gg_trg_Sniper,function Trig_Sniper_Actions) endfunction function InitTrig_Sniper takes nothing returns nothing endfunction//=========================================================================== // Trigger: Lockon //=========================================================================== function Trig_Lockon_Conditions takes nothing returns boolean return GetSpellAbilityId()=='A0CN' endfunction function Lockon_Damage takes nothing returns nothing local trigger ltt=GetTriggeringTrigger() local unit lKg=GetEventDamageSource() local unit lke=GetTriggerUnit() local unit lnu=GetUnit(H2Tx(ltt),"Lockon") local real lnU=GetEventDamage()*0.5 local effect lkW if(GetEventDamage()>10 and UnitHasBuffBJ(lke, 'B01S') == true)then if ( GetRandomInt(1, 100) <= GetUnitAbilityLevel(lnu,'A0CN') * 5 + 5 ) then call DisableTrigger(ltt) call UnitDamageTargetBJ(lKg,lke,lnU,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL) call EnableTrigger(ltt) call AddSpecialEffectTargetUnitBJ("chest",lke,"Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl") call DestroyEffect(lkW) endif endif endfunction function Trig_Lockon_Actions takes nothing returns nothing local trigger lnV=CreateTrigger() local unit lfo=GetTriggerUnit() call SetHandle(H2Tx(lnV),"Lockon",lfo) call TriggerRegisterUnitEvent(lnV,GetSpellTargetUnit(),EVENT_UNIT_DAMAGED) call TriggerAddAction(lnV,function Lockon_Damage) call PolledWait(4*GetUnitAbilityLevel(lfo,'A0CN')) call DisableTrigger(lnV) endfunction function Start_Lockon takes nothing returns nothing set gg_trg_Lockon=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(gg_trg_Lockon,EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddCondition(gg_trg_Lockon,Condition(function Trig_Lockon_Conditions)) call TriggerAddAction(gg_trg_Lockon,function Trig_Lockon_Actions) endfunction function InitTrig_Lockon takes nothing returns nothing endfunction//=========================================================================== // Trigger: Venom Splash //=========================================================================== // Objects used: // 'A0CU' = Acid Spray (Alchemist : Razzil Darkbrew) // 'A08E' = Marker (Nether Ward 4,Lightning Bolter,Nether Ward 3,Nether Ward 2,Vengeance Death caster,...) // 'e016' = Acid Spray Model // 'A0CQ' = Acid Spray // 'Aloc' = Locust (Dummy,ItemHolder,Vision Dummy,Dummy Ice,Lion Roar Effect,...) function Venom_SplashSpell takes nothing returns boolean return GetSpellAbilityId()=='A0CU' endfunction function Venom_SplashFilter takes nothing returns boolean return IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(udg_unit_temp))and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(GetFilterUnit(),'A08E')==0 endfunction function Venom_SplashDamage takes nothing returns nothing call UnitDamageTarget(udg_unit_temp,GetEnumUnit(),udg_Spectre_damage,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS) endfunction function Venom_SplashMain takes nothing returns nothing local timer ltt=GetExpiredTimer() local string lf5=H2Tx(ltt) local unit lfU=GetUnit(lf5,"Hero") local unit lJV=GetUnit(lf5,"Caster") local integer lMa=GetInteger(lf5,"Counter") local real lxx=GetUnitX(lJV) local real lyy=GetUnitY(lJV) local boolexpr lEW local group lEw if lMa>12 then call KillUnit(lJV) call PauseTimer(ltt) call FastFlush(lf5) call DestroyTimer(ltt) else set udg_unit_temp=lfU set udg_Spectre_damage=GetUnitAbilityLevel(lfU,'A0CU')*60 set lEW=Condition(function Venom_SplashFilter) set lEw=CreateGroup() call GroupEnumUnitsInRange(lEw,lxx,lyy,700,lEW) call ForGroup(lEw,function Venom_SplashDamage) call DestroyGroup(lEw) call DestroyBoolExpr(lEW) set lMa=lMa+1 call SetInteger(lf5,"Counter",lMa) endif endfunction function Venom_SplashSetting takes nothing returns nothing local unit lfU=GetTriggerUnit() local location liD=GetSpellTargetLoc() local real lxx=GetLocationX(liD) local real lyy=GetLocationY(liD) local unit lJV=CreateUnit(GetOwningPlayer(lfU),'e016',lxx,lyy,0) local timer ltt=CreateTimer() local string lf5=H2Tx(ltt) call RemoveLocation(liD) call UnitAddAbility(lJV,'A0CQ') call SetUnitAbilityLevel(lJV,'A0CQ',GetUnitAbilityLevel(lfU,'A0CU')) call UnitAddAbility(lJV,'Aloc') call SetHandle(lf5,"Hero",lfU) call SetHandle(lf5,"Caster",lJV) call SetInteger(lf5,"Counter",0) call TimerStart(ltt,1,true,function Venom_SplashMain) endfunction function Start_Venom_Splash takes nothing returns nothing local trigger ltt=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddAction(ltt,function Venom_SplashSetting) call TriggerAddCondition(ltt,Condition(function Venom_SplashSpell)) call SpellPreload('A0CQ') endfunction function InitTrig_Venom_Splash takes nothing returns nothing endfunction//=========================================================================== // Trigger: Devour //=========================================================================== function Trig_Devour_Conditions takes nothing returns boolean return GetUnitTypeId(GetTransportUnit())=='Emns' endfunction function DevourCheck takes nothing returns boolean return IsUnitInTransport(GetTriggerUnit(),GetTransportUnit()) endfunction function Trig_Devour_Actions takes nothing returns nothing local texttag lgg call PolledWait(((GetUnitStateSwap(UNIT_STATE_LIFE,GetTriggerUnit())-20.)/20.)) if(DevourCheck())then call SetPlayerStateBJ(GetOwningPlayer(GetTransportUnit()),PLAYER_STATE_RESOURCE_GOLD,(GetPlayerState(GetOwningPlayer(GetTransportUnit()),PLAYER_STATE_RESOURCE_GOLD)+(10*GetUnitAbilityLevelSwapped('A0CR',GetTransportUnit())))) set lgg=CreateTextTagUnitBJ(("+"+I2S((GetUnitAbilityLevelSwapped('A0CR',GetTransportUnit())*10))),GetTransportUnit(),0,10,90.,84.,.0,0) call SetTextTagVelocityBJ(lgg,64,90) call PolledWait(2.) call DestroyTextTag(lgg) endif endfunction function Start_Devour takes nothing returns nothing set gg_trg_Devour=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(gg_trg_Devour,EVENT_PLAYER_UNIT_LOADED) call TriggerAddCondition(gg_trg_Devour,Condition(function Trig_Devour_Conditions)) call TriggerAddAction(gg_trg_Devour,function Trig_Devour_Actions) endfunction function InitTrig_Devour takes nothing returns nothing endfunction//=========================================================================== // Trigger: Thunder Storm //=========================================================================== function Trig_Thunder_Storm_Skill takes nothing returns boolean if ( ( GetSpellAbilityId() == 'A071' ) ) then return true endif if ( ( GetSpellAbilityId() == 'A0D0' ) ) then return true endif if ( ( GetSpellAbilityId() == 'A0D1' ) ) then return true endif return false endfunction function Trig_Thunder_Storm_Conditions takes nothing returns boolean if ( not (GetUnitAbilityLevel(udg_PlayerX_Hero[GetConvertedPlayerId(GetTriggerPlayer())],'A0CY') > 0) ) then return false endif if ( not Trig_Thunder_Storm_Skill() ) then return false endif return true endfunction function Trig_Thunder_Storm_Actions takes nothing returns nothing local location tr=GetSpellTargetLoc() local unit tmpu=CreateDummy(GetTriggerPlayer(),GetUnitLoc(GetTriggerUnit()),2,'A0CX',GetUnitAbilityLevel(udg_PlayerX_Hero[GetConvertedPlayerId(GetTriggerPlayer())],'A0CY')) call TriggerSleepAction( 1.50 ) call IssuePointOrderLoc( tmpu, "blizzard", tr ) endfunction function Start_Thunder_Storm takes nothing returns nothing set gg_trg_Thunder_Storm = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Thunder_Storm, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Thunder_Storm, Condition( function Trig_Thunder_Storm_Conditions ) ) call TriggerAddAction( gg_trg_Thunder_Storm, function Trig_Thunder_Storm_Actions ) endfunction function InitTrig_Thunder_Storm takes nothing returns nothing endfunction//=========================================================================== // Trigger: Judgment //=========================================================================== function Trig_Judgment_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A0D2' endfunction function JudgmentSelect takes nothing returns boolean if ( not (IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true ) ) then return false endif if ( not (IsUnitEnemy(GetFilterUnit(), GetTriggerPlayer()) == true) ) then return false endif return true endfunction function JudgmentDamage takes nothing returns nothing local unit tmp call CreateNUnitsAtLoc( 1, 'h00E', GetTriggerPlayer(), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING ) set tmp = GetLastCreatedUnit() call UnitApplyTimedLife( tmp, 1, 2 ) call UnitAddAbilityBJ( 'Atru', tmp ) call SetUnitAbilityLevelSwapped( 'Atru', tmp, GetUnitAbilityLevel(GetTriggerUnit(),'A0D2') ) call IssueTargetOrder( tmp, "chainlightning", GetEnumUnit() ) endfunction function Trig_Judgment_Actions takes nothing returns nothing call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function JudgmentSelect)), function JudgmentDamage ) endfunction function Start_Judgment takes nothing returns nothing set gg_trg_Judgment = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Judgment, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Judgment, Condition( function Trig_Judgment_Conditions ) ) call TriggerAddAction( gg_trg_Judgment, function Trig_Judgment_Actions ) endfunction function InitTrig_Judgment takes nothing returns nothing endfunction//=========================================================================== // Trigger: God Pursuit //=========================================================================== function Trig_God_Pursuit_Conditions takes nothing returns boolean return GetUnitAbilityLevel(GetAttacker(),'A0CZ') > 0 endfunction function Trig_God_Pursuit_Actions takes nothing returns nothing local unit dummy=CreateDummy(GetOwningPlayer(GetAttacker()), GetUnitLoc(GetAttacker()),1,'A0D0',GetUnitAbilityLevel(GetAttacker(),'A0CZ')) if ( GetRandomInt(1, 100) <= ( GetUnitAbilityLevel(GetAttacker(),'A0CZ') * 5 + 5 ) ) then call IssueTargetOrder( dummy, "chainlightning", GetAttackedUnitBJ() ) endif endfunction function Start_God_Pursuit takes nothing returns nothing set gg_trg_God_Pursuit = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_God_Pursuit, EVENT_PLAYER_UNIT_ATTACKED ) call TriggerAddCondition( gg_trg_God_Pursuit, Condition( function Trig_God_Pursuit_Conditions ) ) call TriggerAddAction( gg_trg_God_Pursuit, function Trig_God_Pursuit_Actions ) endfunction function InitTrig_God_Pursuit takes nothing returns nothing endfunction//=========================================================================== // Trigger: Shadow Inducement //=========================================================================== // Objects used: // 'A0B3' = Shadow Inducement // 'A08E' = Marker // 'e017' = Shadow function Trig_Shadow_Inducement_Conditions takes nothing returns boolean return GetSpellAbilityId()=='A0B3' endfunction function Shadow_InducementFilter takes nothing returns boolean if(IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE) or GetUnitAbilityLevel(GetFilterUnit(),'A08E')==1)or GetFilterUnit()==udg_unit_temp then return false endif if GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)<=0 or GetUnitTypeId(GetFilterUnit())=='e017'or GetUnitTypeId(GetFilterUnit())=='u00F'or IsUnitType(GetFilterUnit(),UNIT_TYPE_ANCIENT) then return false endif return true endfunction function Shadow_InducementTimer takes nothing returns nothing local timer ltt=GetExpiredTimer() local timer lTk=GetTimer(H2Tx(ltt),"ExtendCache") local string lf5=H2Tx(lTk) local integer lTK=GetInteger(lf5,"ShadowLinkNumber") local integer count=GetInteger(lf5,"Shadow_InducementCt") local unit lFB=GetUnit(lf5,"Target") local unit lTl=GetUnit(lf5,"Hades") local unit lgl=GetUnit(lf5,"ShadowLinks"+I2S(count)) local boolean flag=GetBoolean(lf5,"ConductionFlag") if(flag == true)then call SetUnitX(lTl,GetUnitX(lgl)) call SetUnitY(lTl,GetUnitY(lgl)) endif call RemoveUnit(lgl) call SetInteger(lf5,"Shadow_InducementCt",count+1) if(lTK<=count)then if(flag == true)then call ShowUnitShow( lTl ) call SelectUnitForPlayerSingle( lTl, GetOwningPlayer(lTl) ) endif call PauseTimer(ltt) call FastFlush(lf5) call FastFlush(H2Tx(ltt)) call PolledWait(1) call DestroyTimer(ltt) call DestroyTimer(lTk) endif endfunction function ShadowDamage takes unit pWho,real pxx,real pyy,group pVictims returns nothing local group lGroup=CreateGroup() local unit lTMP local integer lmZ=GetUnitAbilityLevel(pWho,'A0B3') local rect lMx=Rect(pxx-150,pyy-150,pxx+150,pyy+150) call GroupEnumUnitsInRange(lGroup,pxx,pyy,150,null) loop set lTMP=FirstOfGroup(lGroup) exitwhen lTMP==null if(IsUnitInGroup(lTMP,pVictims)==false and IsUnitEnemy(lTMP,GetOwningPlayer(pWho))and IsUnitVisible(lTMP,GetOwningPlayer(pWho)))then if(GetUnitAbilityLevel(lTMP,'A08E')!=1 and GetUnitState(lTMP,UNIT_STATE_LIFE)>0 and IsUnitType(lTMP,UNIT_TYPE_STRUCTURE)==false)then call GroupAddUnit(pVictims,lTMP) call UnitDamageTarget(pWho,lTMP,10+lmZ*10+lmZ*70,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_METAL_HEAVY_SLICE) endif endif call GroupRemoveUnit(lGroup,lTMP) endloop call RemoveRect(lMx) call DestroyGroup(lGroup) endfunction function Shadow_InducementMain takes nothing returns nothing local timer ltt=GetExpiredTimer() local string lf5=H2Tx(ltt) local integer lTK=GetInteger(lf5,"ShadowLinkNumber") local unit lTl=GetUnit(lf5,"Hades") local real lnM=GetReal(lf5,"Angle") local integer lmZ=GetUnitAbilityLevel(lTl,'A0B3') local unit lgl local group lEw local group lCheckGroup=GetGroup(lf5,"ShadowDamaged") local real lxx local real lyy local boolexpr lTM local timer lTn local string lCache2 if(udg_Shadow_Inducement == false)then if(lTK<80)then set lTK=lTK+1 set lxx=GetUnitX(lTl)+lTK*40*Cos(lnM*bj_DEGTORAD) set lyy=GetUnitY(lTl)+lTK*40*Sin(lnM*bj_DEGTORAD) set lgl=CreateUnit(GetOwningPlayer(lTl),'e017',lxx,lyy,lnM) call SetHandle(lf5,"ShadowLinks"+I2S(lTK),lgl) call SetInteger(lf5,"ShadowLinkNumber",lTK) set lEw=CreateGroup() set udg_unit_temp=lTl set lTM=Condition(function Shadow_InducementFilter) call GroupEnumUnitsInRange(lEw,lxx,lyy,'}',lTM) call DestroyBoolExpr(lTM) set lgl=FirstOfGroup(lEw) call DestroyGroup(lEw) if(lTK==75)then set lTn=CreateTimer() call SetHandle(H2Tx(lTn),"ExtendCache",ltt) call TimerStart(lTn,.05,true,function Shadow_InducementTimer) endif if(lgl!=null)then call SetHandle(lf5,"Target",lgl) if IsUnitEnemy(lgl,GetOwningPlayer(lTl))then call ShadowDamage(lTl,lxx,lyy,lCheckGroup) //call PauseTimer(ltt) endif endif else call PauseTimer(ltt) endif else call PauseTimer(ltt) if(lTK<75)then call SetBoolean(lf5,"ConductionFlag",true) set lTn=CreateTimer() call SetHandle(H2Tx(lTn),"ExtendCache",ltt) call AddSpecialEffectLocBJ( GetUnitLoc(lTl), "Abilities\\Spells\\Items\\SpellShieldAmulet\\SpellShieldCaster.mdl" ) call ShowUnitHide( lTl ) call TimerStart(lTn,.01,true,function Shadow_InducementTimer) endif endif endfunction function Trig_Shadow_Inducement_Actions takes nothing returns nothing local location lTo=GetUnitLoc(GetSpellAbilityUnit()) local location lng=GetSpellTargetLoc() local timer ltt=CreateTimer() local unit lTl=GetTriggerUnit() local real lnM=AngleBetweenPoints(lTo,lng) local string lf5=H2Tx(ltt) call SetInteger(lf5,"Shadow_InducementCt",0) set udg_Shadow_Inducement = false call SetBoolean(lf5,"ConductionFlag",false) call SetHandle(lf5,"Hades",lTl) call SetReal(lf5,"Angle",lnM) call SetHandle(lf5,"ShadowDamaged",CreateGroup()) call TimerStart(ltt,.05,true,function Shadow_InducementMain) call RemoveLocation(lTo) call RemoveLocation(lng) endfunction function Start_Shadow_Inducement takes nothing returns nothing set gg_trg_Shadow_Inducement=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(gg_trg_Shadow_Inducement,EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddCondition(gg_trg_Shadow_Inducement,Condition(function Trig_Shadow_Inducement_Conditions)) call TriggerAddAction(gg_trg_Shadow_Inducement,function Trig_Shadow_Inducement_Actions) endfunction function InitTrig_Shadow_Inducement takes nothing returns nothing endfunction//=========================================================================== // Trigger: Shadow Inducement Get //=========================================================================== function Trig_Shadow_Inducement_Get_Conditions takes nothing returns boolean return GetLearnedSkillBJ() == 'A0B3' endfunction function Trig_Shadow_Inducement_Get_Actions takes nothing returns nothing if ( GetUnitAbilityLevelSwapped('A0B3', GetTriggerUnit()) == 1 ) then call UnitAddAbilityBJ( 'A0D7', GetTriggerUnit() ) endif endfunction function Start_Shadow_Inducement_Get takes nothing returns nothing set gg_trg_Shadow_Inducement_Get = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Shadow_Inducement_Get, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_Shadow_Inducement_Get, Condition( function Trig_Shadow_Inducement_Get_Conditions ) ) call TriggerAddAction( gg_trg_Shadow_Inducement_Get, function Trig_Shadow_Inducement_Get_Actions ) endfunction function InitTrig_Shadow_Inducement_Get takes nothing returns nothing endfunction//=========================================================================== // Trigger: Conduction //=========================================================================== function Trig_Conduction_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A0D7' endfunction function Trig_Conduction_Actions takes nothing returns nothing set udg_Shadow_Inducement = true endfunction function Start_Conduction takes nothing returns nothing set gg_trg_Conduction = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Conduction, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Conduction, Condition( function Trig_Conduction_Conditions ) ) call TriggerAddAction( gg_trg_Conduction, function Trig_Conduction_Actions ) endfunction function InitTrig_Conduction takes nothing returns nothing endfunction//=========================================================================== // Trigger: Void Darkness //=========================================================================== function Trig_Void_Darkness_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A0D8' endfunction function Trig_Void_Darkness_Actions takes nothing returns nothing local group lGroup=CreateGroup() local unit tru=GetTriggerUnit() local unit lTMP local unit dummy=CreateDummy(GetTriggerPlayer(),GetUnitLoc(GetTriggerUnit()),1,'A0DN',GetUnitAbilityLevelSwapped('A0D8', GetTriggerUnit())) local real pxx=GetUnitX(tru) local real pyy=GetUnitY(tru) call GroupEnumUnitsInRange(lGroup,pxx,pyy,450,null) loop set lTMP=FirstOfGroup(lGroup) exitwhen lTMP==null if(IsUnitEnemy(lTMP,GetOwningPlayer(tru))and IsUnitVisible(lTMP,GetOwningPlayer(tru)))then if(GetUnitAbilityLevel(lTMP,'A08E')!=1 and GetUnitState(lTMP,UNIT_STATE_LIFE)>0 and IsUnitType(lTMP,UNIT_TYPE_STRUCTURE)==false)then call IssueTargetOrder( dummy, "curse", lTMP ) endif endif call GroupRemoveUnit(lGroup,lTMP) endloop call DestroyGroup(lGroup) endfunction function Start_Void_Darkness takes nothing returns nothing set gg_trg_Void_Darkness = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Void_Darkness, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Void_Darkness, Condition( function Trig_Void_Darkness_Conditions ) ) call TriggerAddAction( gg_trg_Void_Darkness, function Trig_Void_Darkness_Actions ) endfunction function InitTrig_Void_Darkness takes nothing returns nothing endfunction//=========================================================================== // Trigger: Cerberus Aura //=========================================================================== function Trig_Cerberus_Aura_Conditions takes nothing returns boolean return GetLearnedSkillBJ() == 'A0D9' endfunction function Trig_Cerberus_Aura_Actions takes nothing returns nothing if ( GetUnitAbilityLevelSwapped('A0D9', GetTriggerUnit()) == 1 ) then call UnitAddAbilityBJ( 'S004', GetTriggerUnit() ) else call SetUnitAbilityLevelSwapped( 'S004', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A0D9', GetTriggerUnit()) ) endif endfunction function Start_Cerberus_Aura takes nothing returns nothing set gg_trg_Cerberus_Aura = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Cerberus_Aura, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_Cerberus_Aura, Condition( function Trig_Cerberus_Aura_Conditions ) ) call TriggerAddAction( gg_trg_Cerberus_Aura, function Trig_Cerberus_Aura_Actions ) endfunction function InitTrig_Cerberus_Aura takes nothing returns nothing endfunction//=========================================================================== // Trigger: Gate of Tartaros //=========================================================================== function Trig_Gate_of_Tartaros_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A0DA' endfunction function Trig_Gate_of_Tartaros_Actions takes nothing returns nothing local trigger ltt=GetTriggeringTrigger() local string lf5=H2Tx(ltt) local unit lut=GetUnit(lf5,"Gate_of_Tartaros") if ( GetTriggerEventId() == EVENT_PLAYER_UNIT_SPELL_EFFECT ) then call CreateNUnitsAtLoc( 1, 'h006', GetTriggerPlayer(), GetSpellTargetLoc(), bj_UNIT_FACING ) call SetHandle(lf5,"Gate_of_Tartaros",GetLastCreatedUnit()) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 120 ) call UnitAddAbilityBJ( 'A0DB', GetLastCreatedUnit() ) call SetUnitAbilityLevelSwapped( 'A0DB', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0DA', GetTriggerUnit()) ) call IssueImmediateOrder( GetLastCreatedUnit(), "locustswarm" ) else call RemoveUnit( lut ) endif endfunction function Start_Gate_of_Tartaros takes nothing returns nothing set gg_trg_Gate_of_Tartaros = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Gate_of_Tartaros, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Gate_of_Tartaros, EVENT_PLAYER_UNIT_SPELL_ENDCAST ) call TriggerAddCondition( gg_trg_Gate_of_Tartaros, Condition( function Trig_Gate_of_Tartaros_Conditions ) ) call TriggerAddAction( gg_trg_Gate_of_Tartaros, function Trig_Gate_of_Tartaros_Actions ) endfunction function InitTrig_Gate_of_Tartaros takes nothing returns nothing endfunction//=========================================================================== // Trigger: Fire //=========================================================================== function Trig_Fire_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A0DW' ) ) then return false endif return true endfunction function Trig_Fire_Actions takes nothing returns nothing local integer Fujiwara_HP = R2I(GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit())) local unit dummy=CreateDummy(GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()),10,'A0DT',GetUnitAbilityLevel(GetTriggerUnit(),'A0DW')) call SetUnitLifePercentBJ( GetTriggerUnit(), 100 ) call IssuePointOrderLoc( dummy, "blizzard", GetUnitLoc(GetTriggerUnit()) ) call TriggerSleepAction( 0.50 ) call SetUnitAnimation( GetTriggerUnit(), "Morph" ) call SetUnitAnimation( GetTriggerUnit(), "stand alternate" ) call TriggerSleepAction( 1.50 ) call SetUnitLifeBJ( GetTriggerUnit(), I2R(Fujiwara_HP) ) endfunction //=========================================================================== function InitTrig_Fire takes nothing returns nothing set gg_trg_Fire = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Fire, EVENT_PLAYER_UNIT_SPELL_CAST ) call TriggerAddCondition( gg_trg_Fire, Condition( function Trig_Fire_Conditions ) ) call TriggerAddAction( gg_trg_Fire, function Trig_Fire_Actions ) endfunction //=========================================================================== // Trigger: Self // // GUIã ã¨ã“ã†ãªã‚E //=========================================================================== function Trig_Self_Conditions takes nothing returns boolean if ( not ( GetUnitAbilityLevelSwapped('A0DU', GetTriggerUnit()) > 0 ) ) then return false endif return true endfunction function Trig_Self_Func001Func001C takes nothing returns boolean if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("unimmolation") ) ) then return false endif return true endfunction function Trig_Self_Func001C takes nothing returns boolean if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("immolation") ) ) then return false endif return true endfunction function Trig_Self_Actions takes nothing returns nothing if ( Trig_Self_Func001C() ) then call UnitAddAbilityBJ( 'A0DD', GetTriggerUnit() ) else if ( Trig_Self_Func001Func001C() ) then call UnitRemoveAbilityBJ( 'A0DD', GetTriggerUnit() ) else endif endif endfunction //=========================================================================== function InitTrig_Self takes nothing returns nothing set gg_trg_Self = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Self, EVENT_PLAYER_UNIT_ISSUED_ORDER ) call TriggerAddCondition( gg_trg_Self, Condition( function Trig_Self_Conditions ) ) call TriggerAddAction( gg_trg_Self, function Trig_Self_Actions ) endfunction //=========================================================================== // Trigger: Dead //=========================================================================== function Trig_Dead_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A0DX' ) ) then return false endif if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'H00S' ) ) then return false endif return true endfunction function Trig_Dead_Actions takes nothing returns nothing local integer Fujiwara_CD= (4-GetUnitAbilityLevelSwapped('A0DX', GetTriggerUnit())) * 60 call CreateNUnitsAtLoc( 1, 'h00A', GetOwningPlayer(GetTriggerUnit()), GetPlayerStartLocationLoc(GetOwningPlayer(GetTriggerUnit())), GetUnitFacing(GetTriggerUnit()) ) call UnitAddAbilityBJ( 'A0DS', GetLastCreatedUnit() ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, Fujiwara_CD ) call CreateNUnitsAtLoc( 1, 'h006', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetUnitFacing(GetTriggerUnit()) ) call UnitApplyTimedLife( GetLastCreatedUnit(), 1, 10 ) call UnitAddAbilityBJ( 'A0DR', GetLastCreatedUnit() ) call IssueTargetOrder( GetLastCreatedUnit(), "doom", GetTriggerUnit() ) call UnitAddAbilityBJ( 'A0DQ', GetLastCreatedUnit() ) call IssuePointOrderLoc( GetLastCreatedUnit(), "rainoffire", GetUnitLoc(GetTriggerUnit()) ) endfunction //=========================================================================== function InitTrig_Dead takes nothing returns nothing set gg_trg_Dead = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Dead, EVENT_PLAYER_UNIT_SPELL_FINISH ) call TriggerAddCondition( gg_trg_Dead, Condition( function Trig_Dead_Conditions ) ) call TriggerAddAction( gg_trg_Dead, function Trig_Dead_Actions ) endfunction //=========================================================================== // Trigger: Icon //=========================================================================== function Trig_Icon_Conditions takes nothing returns boolean if ( not ( GetUnitAbilityLevelSwapped('A0DX', GetTriggerUnit()) > 0 ) ) then return false endif return true endfunction function Trig_Icon_Actions takes nothing returns nothing local integer Fujiwara_Lv= GetUnitAbilityLevelSwapped('A0DX', GetTriggerUnit())+1 call SetUnitAbilityLevelSwapped( 'A0DP', GetTriggerUnit(), Fujiwara_Lv ) endfunction //=========================================================================== function InitTrig_Icon takes nothing returns nothing set gg_trg_Icon = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Icon, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_Icon, Condition( function Trig_Icon_Conditions ) ) call TriggerAddAction( gg_trg_Icon, function Trig_Icon_Actions ) endfunction //=========================================================================== // Trigger: Shadow Slash //=========================================================================== function Trig_Shadow_Slash_Conditions takes nothing returns boolean if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then return false endif if ( not ( GetUnitAbilityLevelSwapped('A0E4', GetAttacker()) > 0 ) ) then return false endif if ( not ( IsUnitEnemy(GetAttacker(), GetOwningPlayer(GetAttackedUnitBJ())) == true ) ) then return false endif return true endfunction function Shadow_Slash_TreeCut takes nothing returns nothing call KillDestructable(GetEnumDestructable()) endfunction function Trig_Shadow_Slash_Actions takes nothing returns nothing local location tA = GetUnitLoc(GetAttackedUnitBJ()) local location tEF = GetUnitLoc(GetAttacker()) local location tB = PolarProjectionBJ(tA, -130.00, GetUnitFacing(GetAttackedUnitBJ())) local integer random = GetRandomInt(1, 100) local real damage=40.00 + ( 20.00 * I2R(GetUnitAbilityLevel(GetAttacker(),'A0E4')) ) local real x=GetLocationX(tB) local real y=GetLocationY(tB) local rect tC=Rect(x-150,y-150,x+150,y+150) if ( IsUnitIllusionBJ(GetAttacker()) == true ) then set damage=damage/2 endif if ( random <= (6+4*GetUnitAbilityLevel(GetAttacker(),'A0E4')) ) then call UnitDamageTargetBJ( GetAttacker(), GetAttackedUnitBJ(), damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL ) call SetUnitAnimation( GetAttacker(), "attack" ) call AddSpecialEffectLocBJ( tEF, "Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl" ) call SetUnitPositionLocFacingLocBJ( GetAttacker(), tB, tA ) call PutText("|c00ff0303" + I2S(R2I(damage)) + "!|r", GetUnitLoc(GetAttackedUnitBJ())) call AddSpecialEffectTargetUnitBJ( "chest", GetAttackedUnitBJ(), "Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl" ) call DestroyEffectBJ( GetLastCreatedEffectBJ() ) call EnumDestructablesInRect(tC,null,function Shadow_Slash_TreeCut) call RemoveRect(tC) endif call RemoveLocation(tA) call RemoveLocation(tB) call RemoveLocation(tEF) set tA = null set tB = null set tEF = null set random = 0 endfunction function Start_Shadow_Slash takes nothing returns nothing set gg_trg_Shadow_Slash = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Shadow_Slash, EVENT_PLAYER_UNIT_ATTACKED ) call TriggerAddCondition( gg_trg_Shadow_Slash, Condition( function Trig_Shadow_Slash_Conditions ) ) call TriggerAddAction( gg_trg_Shadow_Slash, function Trig_Shadow_Slash_Actions ) endfunction function InitTrig_Shadow_Slash takes nothing returns nothing endfunction//=========================================================================== // Trigger: Geyser //=========================================================================== function Trig_Geyser_Conditions takes nothing returns boolean if ( not ( GetUnitAbilityLevelSwapped('A0EA', GetAttacker()) > 0 ) ) then return false endif if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then return false endif if ( not ( IsUnitEnemy(GetAttacker(), GetOwningPlayer(GetAttackedUnitBJ())) == true ) ) then return false endif if ( not ( IsUnitIllusionBJ(GetAttacker()) == false ) ) then return false endif return true endfunction function GeyserDamage takes unit c,real x,real y,real AOE,real dam returns nothing local group G=CreateGroup() local unit uTMP local location lTMP call GroupEnumUnitsInRange(G,x,y,AOE,null) loop set uTMP=FirstOfGroup(G) exitwhen uTMP==null if IsUnitEnemy(uTMP,GetOwningPlayer(c))and IsUnitDeadBJ(uTMP)==false and GetUnitAbilityLevel(uTMP,'A08E')==0 then if(IsUnitType(uTMP,UNIT_TYPE_STRUCTURE)==false)then call UnitDamageTargetBJ(c,uTMP,dam,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION) else call UnitDamageTargetBJ(c,uTMP,dam/3,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION) endif set lTMP=GetUnitLoc(uTMP) call RemoveLocation(lTMP) call GroupRemoveUnit(G,uTMP) else call GroupRemoveUnit(G,uTMP) endif endloop call GroupClear(G) call DestroyGroup(G) endfunction function GeyserMain takes nothing returns nothing local timer Tm=GetExpiredTimer() local string Tab=H2Tx(Tm) local real Range=GetReal(Tab,"GeyserDistance") local real Angle=GetReal(Tab,"GeyserAngle") local integer Count=GetInteger(Tab,"GeyserCounter") local unit Target=GetUnit(Tab,"GeyserTarget") local unit Caster=GetUnit(Tab,"Geyser") local real Height=(Count-25)*(Count-25) local real AOE=180+20*GetUnitAbilityLevel(Caster,'A0EA') local real dam=45+35*GetUnitAbilityLevel(Caster,'A0EA') local real SpeedMod=Range*Count/50-Range local location LTarget=GetUnitLoc(Target) local location lDest=PolarProjectionBJ(LTarget,SpeedMod,Angle) if ( Count < 51 ) then call SetUnitPositionLoc(Target,lDest) call SetUnitFlyHeight(Target,775-Height,0) set Count=Count+1 if(GetRandomInt(1,4)==2)then call DestroyEffect(AddSpecialEffectTargetUnitBJ("origin",Target,"Abilities\\Spells\\Undead\\Cripple\\CrippleTarget.mdl")) endif endif if ( Count > 50 ) then call SetUnitFlyHeight(Target,GetUnitDefaultFlyHeight(Target),0) call PauseUnit(Target,false) call SetUnitPathing(Target,true) call TerrainDeformationRippleBJ(.2,true,LTarget,1.,300.,96.,1,64.) call DestroyEffect(AddSpecialEffectTargetUnitBJ("origin",Target,"Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl")) call GeyserDamage(Caster,GetUnitX(Target),GetUnitY(Target),AOE,dam) // call UnitDamageTargetBJ(Caster,Target,.2*75*GetUnitAbilityLevel(Caster,'A0EA'),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION) call PauseTimer(GetExpiredTimer()) call PolledWait(.01) call FastFlush(Tab) call DestroyTimer(GetExpiredTimer()) call RemoveLocation(LTarget) call PauseUnitBJ( false, Target ) endif call SetInteger(Tab,"GeyserCounter",Count) call RemoveLocation(lDest) endfunction function Trig_Geyser_Actions takes nothing returns nothing local timer Tm local unit Atk=GetAttacker() local unit Target=GetAttackedUnitBJ() local integer Ran = GetRandomInt(1, 100) local string lf5 local location Start=GetUnitLoc(Target) local real Range=DistanceBetweenPoints(Start,Start) local real Angle=AngleBetweenPoints(Start,Start) if ( Ran < 8+GetUnitAbilityLevel(Atk,'A0EA')*3 ) then call SetUnitPathing(Target,false) call UnitAddAbility(Target,'AEme') call UnitRemoveAbility(Target,'AEme') set Tm=CreateTimer() set lf5=H2Tx(Tm) call SetHandle(lf5,"Geyser",Atk) call SetInteger(lf5,"GeyserCounter",1) call SetHandle(lf5,"GeyserTarget",Target) call SetReal(lf5,"GeyserDistance",Range) call SetReal(lf5,"GeyserAngle",Angle) call TimerStart(Tm,.02,true,function GeyserMain) call DestroyEffect(AddSpecialEffectTargetUnitBJ("origin",Target,"Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl")) call PauseUnitBJ( true, Target ) endif endfunction function Start_Geyser takes nothing returns nothing set gg_trg_Geyser = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Geyser, EVENT_PLAYER_UNIT_ATTACKED ) call TriggerAddCondition( gg_trg_Geyser, Condition( function Trig_Geyser_Conditions ) ) call TriggerAddAction( gg_trg_Geyser, function Trig_Geyser_Actions ) endfunction function InitTrig_Geyser takes nothing returns nothing endfunction//=========================================================================== // Trigger: Water Barrier //=========================================================================== function Trig_Water_Barrier_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A0ED' endfunction function Water_Barrier_Damage takes nothing returns nothing local trigger tr=GetTriggeringTrigger() local unit t=GetTriggerUnit() local unit c=GetUnit(H2Tx(tr),"Water_Barrier") local real dam=GetEventDamage() * (0.4+0.1*GetUnitAbilityLevel(c,'A0ED')) if( GetEventDamage() >10 and UnitHasBuffBJ(t, 'B02D') == true )then call DisableTrigger(tr) call SetUnitLifeBJ( t, GetUnitStateSwap(UNIT_STATE_LIFE, t)+dam ) call EnableTrigger(tr) endif endfunction function Trig_Water_Barrier_Actions takes nothing returns nothing local trigger tr=CreateTrigger() local unit c=GetTriggerUnit() call SetHandle(H2Tx(tr),"Water_Barrier",c) call TriggerRegisterUnitEvent(tr,GetSpellTargetUnit(),EVENT_UNIT_DAMAGED) call TriggerAddAction(tr,function Water_Barrier_Damage) call PolledWait(8) call DisableTrigger(tr) endfunction function Start_Water_Barrier takes nothing returns nothing set gg_trg_Water_Barrier = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Water_Barrier, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Water_Barrier, Condition( function Trig_Water_Barrier_Conditions ) ) call TriggerAddAction( gg_trg_Water_Barrier, function Trig_Water_Barrier_Actions ) endfunction function InitTrig_Water_Barrier takes nothing returns nothing endfunction//=========================================================================== // Trigger: Waveform //=========================================================================== function Waveform_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A0EC' ) ) then return false endif return true endfunction function Waveform_Damage takes unit c,real x,real y,group CheckGroup returns nothing local group tGroup=CreateGroup() local unit TMP local integer dam=GetUnitAbilityLevel(c,'A0EC')*75+25 call GroupEnumUnitsInRange(tGroup,x,y,200,null) loop set TMP=FirstOfGroup(tGroup) exitwhen TMP==null if ( IsUnitInGroup(TMP,CheckGroup)==false and IsUnitEnemy(TMP,GetOwningPlayer(c) ) ) then if(GetUnitAbilityLevel(TMP,'A08E')!=1 and GetUnitState(TMP,UNIT_STATE_LIFE)>0 and IsUnitType(TMP,UNIT_TYPE_STRUCTURE)==false)then call GroupAddUnit(CheckGroup,TMP) call UnitDamageTarget(c,TMP,dam,true,true,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS) endif endif call GroupRemoveUnit(tGroup,TMP) endloop call DestroyGroup(tGroup) endfunction function Waveform_Main takes nothing returns nothing local timer tm=GetExpiredTimer() local string ch=H2Tx(tm) local unit c=GetUnit(ch,"Poseidon") local group CheckGroup=GetGroup(ch,"Damaged") local real ang=GetReal(ch,"Angle") local real bet=GetReal(ch,"BetweenPoints") local real x local real y local location tp=GetLocation(ch,"SpellTarget") if ( bet > 20 ) then set x=GetUnitX(c)+40*Cos(ang*bj_DEGTORAD) set y=GetUnitY(c)+40*Sin(ang*bj_DEGTORAD) call SetUnitX(c,x) call SetUnitY(c,y) call AddSpecialEffectLocBJ( Location(x, y), "Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl" ) call Waveform_Damage(c,x,y,CheckGroup) call SetReal(ch,"BetweenPoints",bet-40) else call PauseUnitBJ( false, c ) call PauseTimer(tm) call PolledWait(.01) call DestroyTimer(tm) endif call RemoveLocation(tp) endfunction function Waveform_Actions takes nothing returns nothing local location cloc=GetUnitLoc(GetSpellAbilityUnit()) local location tp=GetSpellTargetLoc() local timer tm=CreateTimer() local unit c=GetTriggerUnit() local string ch=H2Tx(tm) local real ang=AngleBetweenPoints(cloc,tp) local real bet=DistanceBetweenPoints(GetUnitLoc(c), tp) call SetHandle(ch,"SpellTarget",tp) call SetHandle(ch,"Poseidon",c) call SetReal(ch,"Angle",ang) call SetReal(ch,"BetweenPoints",bet) call SetHandle(ch,"Damaged",CreateGroup()) call PauseUnitBJ( true, c ) call TimerStart(tm,.02,true,function Waveform_Main) call RemoveLocation(cloc) call RemoveLocation(tp) endfunction function Start_Waveform takes nothing returns nothing set gg_trg_Waveform = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Waveform, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Waveform, Condition( function Waveform_Conditions ) ) call TriggerAddAction( gg_trg_Waveform, function Waveform_Actions ) endfunction function InitTrig_Waveform takes nothing returns nothing endfunction//=========================================================================== // Trigger: Atlantis //=========================================================================== function Trig_Atlantis_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A0EE' ) ) then return false endif return true endfunction function Atlantis_Main takes nothing returns nothing local timer tm=GetExpiredTimer() local string ch=H2Tx(tm) local location st=GetLocation(ch,"SpellTarget") local real x=GetLocationX(st) local real y=GetLocationY(st) local boolean end=GetBoolean(ch,"End") local group tGroup=CreateGroup() local unit TMP call GroupEnumUnitsInRange(tGroup,x,y,500,null) loop set TMP=FirstOfGroup(tGroup) exitwhen TMP==null if(GetUnitAbilityLevel(TMP,'A08E')!=1 and GetUnitState(TMP,UNIT_STATE_LIFE)>0 and IsUnitType(TMP,UNIT_TYPE_STRUCTURE)==false and GetUnitAbilityLevel(TMP,'Aloc')!=1)then call SetUnitPositionLoc( TMP, st ) endif call GroupRemoveUnit(tGroup,TMP) endloop call DestroyGroup(tGroup) if ( end != false ) then call RemoveLocation(st) call PauseTimer(tm) call PolledWait(.01) call FastFlush(ch) call DestroyTimer(tm) endif endfunction function Trig_Atlantis_Actions takes nothing returns nothing local unit caster = GetSpellAbilityUnit() local location st = GetSpellTargetLoc() local group eff=CreateGroup() local rect tp = RectFromCenterSizeBJ(st, 500.00, 500.00) local real ang=0 local integer life=GetUnitAbilityLevel(caster,'A0EE')*3+1 local integer x=0 local integer y=28 local unit TMP local unit dummy=CreateDummy(GetOwningPlayer(caster), st,life+2,'A0EF',GetUnitAbilityLevel(caster,'A0EE')) local timer tm=CreateTimer() local string ch=H2Tx(tm) call AddSpecialEffectLocBJ( st, "Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl" ) call TerrainDeformationCraterBJ( 3.00, true, st, 400.00, 400.00 ) call PolledWait(.03) loop exitwhen ( x > y ) call CreateNUnitsAtLocFacingLocBJ( 1, 'h00T', GetOwningPlayer(caster), PolarProjectionBJ(st, 400.00, ang), st ) call GroupAddUnit(eff,GetLastCreatedUnit()) set ang = ang + 20.00 set x = x + 1 endloop call PolledWait(1) call IssuePointOrderLoc( dummy, "blizzard", st ) call AddSpecialEffectLocBJ( PolarProjectionBJ(st, 200.00, 0), "Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl" ) call SetHandle(ch,"SpellTarget",st) call SetBoolean(ch,"End",false) call TimerStart(tm,1.1,true,function Atlantis_Main) call PolledWait(I2R(life)) call TerrainDeformationCraterBJ( 0.5, true, GetRectCenter(tp), 400.00, -400.00 ) set x = 0 loop exitwhen ( x > y ) set TMP=FirstOfGroup(eff) call GroupRemoveUnit(eff,TMP) call RemoveUnit( TMP ) set x = x + 1 endloop call DestroyGroup(eff) call SetBoolean(ch,"End",true) call RemoveRect(tp) endfunction function Start_Atlantis takes nothing returns nothing set gg_trg_Atlantis = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Atlantis, EVENT_PLAYER_UNIT_SPELL_CAST ) call TriggerAddCondition( gg_trg_Atlantis, Condition( function Trig_Atlantis_Conditions ) ) call TriggerAddAction( gg_trg_Atlantis, function Trig_Atlantis_Actions ) endfunction function InitTrig_Atlantis takes nothing returns nothing endfunction//=========================================================================== // Trigger: Breath of Terror //=========================================================================== function Trig_Breath_of_Terror_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A0EK' endfunction function Breath_of_Terror_End takes nothing returns nothing local trigger End=GetTriggeringTrigger() local string tt=H2Tx(End) local unit dummy=GetUnit(tt,"dummy") call RemoveUnit( dummy ) call FastFlush(tt) call DestroyTriggerEx(End) endfunction function Trig_Breath_of_Terror_Actions takes nothing returns nothing local unit c=GetTriggerUnit() local unit t=GetSpellTargetUnit() local unit dummy=CreateDummy(GetOwningPlayer(c), GetUnitLoc(c),5,'A0EP',GetUnitAbilityLevel(c,'A0EK')) local trigger End=CreateTrigger() local string tt=H2Tx(End) call SetHandle(tt,"dummy",dummy) call SetUnitTimeScalePercent( c, 10.00 ) call TriggerRegisterUnitEvent( End, t, EVENT_UNIT_DEATH ) call TriggerRegisterUnitEvent( End, c, EVENT_UNIT_DEATH ) call TriggerRegisterUnitEvent( End, c, EVENT_UNIT_SPELL_ENDCAST ) call TriggerRegisterUnitEvent( End, c, EVENT_UNIT_SPELL_FINISH ) call TriggerAddAction( End, function Breath_of_Terror_End ) loop exitwhen IsUnitAliveBJ(dummy) == false call SetUnitFacingToFaceUnitTimed( c, t, 0 ) call IssuePointOrderLoc( dummy, "carrionswarm", GetUnitLoc(t) ) call PolledWait( 0.05 ) endloop call SetUnitTimeScalePercent( c, 100.00 ) endfunction function InitTrig_Breath_of_Terror takes nothing returns nothing set gg_trg_Breath_of_Terror = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Breath_of_Terror, EVENT_PLAYER_UNIT_SPELL_CHANNEL ) call TriggerAddCondition( gg_trg_Breath_of_Terror, Condition( function Trig_Breath_of_Terror_Conditions ) ) call TriggerAddAction( gg_trg_Breath_of_Terror, function Trig_Breath_of_Terror_Actions ) endfunction//=========================================================================== // Trigger: Charge of Darkness //=========================================================================== //////////////////////ObjectSetting///////////////////////////// function MainSpell takes nothing returns integer return 'A0EN' endfunction function DummyStun takes nothing returns integer return 'A0EO' endfunction function DummySight takes nothing returns integer return 'A0EQ' endfunction function Buff takes nothing returns integer return 'B000' endfunction /////////////////////////////////////////////////////////////// function Trig_Charge_of_Darkness_Conditions takes nothing returns boolean return GetSpellAbilityId() == MainSpell() endfunction function Charge_AttackCheck takes nothing returns boolean return GetUnit(H2Tx(gg_trg_Charge_of_Darkness),"Caster")==GetAttacker() endfunction function Charge_End takes nothing returns nothing local trigger tr=GetTriggeringTrigger() local string tt=H2Tx(gg_trg_Charge_of_Darkness) local unit c=GetUnit(tt,"Caster") local unit t=GetUnit(tt,"Target") local unit dummy=CreateDummy(GetOwningPlayer(c),GetUnitLoc(t),1,DummyStun(),GetUnitAbilityLevel(c,MainSpell())) local timer a=GetTimer(tt,"Charge_Speed") local trigger b=GetTrigger(tt,"Charge_Expire") call IssueTargetOrderById(dummy,OrderId("thunderbolt"),t) call UnitRemoveBuffBJ( Buff(), t ) call PauseTimer(a) call PolledWait(.01) call SetUnitMoveSpeed( c, GetUnitDefaultMoveSpeed(c) ) call FastFlush(tt) call DestroyTimer(a) call DestroyTriggerEx(b) call DestroyTriggerEx(tr) endfunction function Charge_Speed takes nothing returns nothing local string tt=H2Tx(gg_trg_Charge_of_Darkness) local unit c=GetUnit(tt,"Caster") local unit t=GetUnit(tt,"Target") local integer alv=GetInteger(tt,"aLv") local real sp=GetReal(tt,"Speed")+1 local real speed=sp*alv call SetUnitMoveSpeed( c, GetUnitDefaultMoveSpeed(c) + speed ) call SetReal(tt,"Speed",sp) endfunction function Charge_Expire takes nothing returns nothing local trigger tr=GetTriggeringTrigger() local string tt=H2Tx(gg_trg_Charge_of_Darkness) local unit c=GetUnit(tt,"Caster") local unit t=GetUnit(tt,"Target") local timer a=GetTimer(tt,"Charge_Speed") local trigger b=GetTrigger(tt,"Charge_End") call UnitRemoveBuffBJ( Buff(), t ) call PauseTimer(a) call PolledWait(.01) call SetUnitMoveSpeed( c, GetUnitDefaultMoveSpeed(c) ) call FastFlush(tt) call DestroyTimer(a) call DestroyTriggerEx(b) call DestroyTriggerEx(tr) endfunction function Trig_Charge_of_Darkness_Actions takes nothing returns nothing local unit c=GetTriggerUnit() local unit t=GetSpellTargetUnit() local unit dummy=CreateDummy(GetOwningPlayer(c),GetUnitLoc(t),1,DummySight(),1) local timer tm=CreateTimer() local trigger Stun=CreateTrigger() local trigger End=CreateTrigger() local string ch=H2Tx(gg_trg_Charge_of_Darkness) local integer alv=GetUnitAbilityLevel(c,MainSpell()) call SetHandle(ch,"Caster",c) call SetHandle(ch,"Target",t) call SetReal(ch,"Speed",0) call SetInteger(ch,"aLv",alv) call IssueTargetOrderById(dummy,OrderId("faeriefire"),t) call IssueTargetOrderById(c,OrderId("attack"),t) call PolledWait(.1) call TimerStart(tm,0.1,true,function Charge_Speed) call SetHandle(ch,"Charge_Speed",tm) call TriggerRegisterUnitEvent(Stun,t,EVENT_UNIT_ATTACKED) call TriggerAddCondition(Stun,Condition(function Charge_AttackCheck)) call TriggerAddAction(Stun,function Charge_End) call SetHandle(ch,"Charge_End",Stun) call TriggerRegisterUnitEvent(End,c,EVENT_UNIT_ISSUED_ORDER) call TriggerRegisterUnitEvent(End,c,EVENT_UNIT_ISSUED_POINT_ORDER) call TriggerRegisterUnitEvent(End,c,EVENT_UNIT_ISSUED_TARGET_ORDER) call TriggerRegisterUnitEvent(End,c,EVENT_UNIT_DEATH) call TriggerRegisterUnitEvent(End,t,EVENT_UNIT_DEATH) call TriggerAddAction(End,function Charge_Expire) call SetHandle(ch,"Charge_Expire",End) endfunction function InitTrig_Charge_of_Darkness takes nothing returns nothing set gg_trg_Charge_of_Darkness = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Charge_of_Darkness, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Charge_of_Darkness, Condition( function Trig_Charge_of_Darkness_Conditions ) ) call TriggerAddAction( gg_trg_Charge_of_Darkness, function Trig_Charge_of_Darkness_Actions ) endfunction //=========================================================================== // Trigger: Fire Storm //=========================================================================== function Trig_Fire_Storm_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A0EL' ) ) then return false endif return true endfunction function Trig_Fire_Storm_Actions takes nothing returns nothing local unit cst = GetTriggerUnit() local unit dummy=CreateDummy(GetTriggerPlayer(), GetSpellTargetLoc(),10,'A0ER',GetUnitAbilityLevel(cst,'A0EL')) call IssuePointOrderLoc( GetLastCreatedUnit(), "flamestrike", PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 100.00, GetUnitFacing(GetTriggerUnit())) ) call PolledWait( 0.20 ) call IssuePointOrderLoc( GetLastCreatedUnit(), "flamestrike", PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 200.00, GetUnitFacing(GetTriggerUnit())) ) call PolledWait( 0.20 ) call IssuePointOrderLoc( GetLastCreatedUnit(), "flamestrike", PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 300.00, GetUnitFacing(GetTriggerUnit())) ) call PolledWait( 0.20 ) call IssuePointOrderLoc( GetLastCreatedUnit(), "flamestrike", PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 400.00, GetUnitFacing(GetTriggerUnit())) ) call PolledWait( 0.20 ) call IssuePointOrderLoc( GetLastCreatedUnit(), "flamestrike", PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 500.00, GetUnitFacing(GetTriggerUnit())) ) call PolledWait( 0.20 ) call IssuePointOrderLoc( GetLastCreatedUnit(), "flamestrike", PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 600.00, GetUnitFacing(GetTriggerUnit())) ) call PolledWait( 0.20 ) call IssuePointOrderLoc( GetLastCreatedUnit(), "flamestrike", PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 700.00, GetUnitFacing(GetTriggerUnit())) ) call PolledWait( 0.20 ) call IssuePointOrderLoc( GetLastCreatedUnit(), "flamestrike", PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 800.00, GetUnitFacing(GetTriggerUnit())) ) endfunction //=========================================================================== function InitTrig_Fire_Storm takes nothing returns nothing set gg_trg_Fire_Storm = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Fire_Storm, EVENT_PLAYER_UNIT_SPELL_CAST ) call TriggerAddCondition( gg_trg_Fire_Storm, Condition( function Trig_Fire_Storm_Conditions ) ) call TriggerAddAction( gg_trg_Fire_Storm, function Trig_Fire_Storm_Actions ) endfunction //=========================================================================== // Trigger: Frost Buster //=========================================================================== function Trig_Frost_Buster_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A06L' ) ) then return false endif return true endfunction function Trig_Frost_Buster_Func025A takes nothing returns nothing call CameraClearNoiseForPlayer( GetEnumPlayer() ) endfunction function Frost_Buster_Damage takes unit c,real x,real y,real AOE,real dam,group v returns nothing local group G=CreateGroup() local unit uTMP call GroupEnumUnitsInRange(G,x,y,AOE,null) loop set uTMP=FirstOfGroup(G) exitwhen uTMP==null if IsUnitInGroup(uTMP,v)==false and IsUnitEnemy(uTMP,GetOwningPlayer(c))and IsUnitDeadBJ(uTMP)==false and GetUnitAbilityLevel(uTMP,'A08E')==0 then call UnitDamageTargetBJ(c,uTMP,dam,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION) call GroupAddUnit(v,uTMP) call GroupRemoveUnit(G,uTMP) else call GroupRemoveUnit(G,uTMP) endif endloop call GroupClear(G) call DestroyGroup(G) endfunction function Trig_Frost_Buster_Actions takes nothing returns nothing local unit c=GetTriggerUnit() local location cLoc=GetUnitLoc(GetSpellAbilityUnit()) local location tLoc=GetSpellTargetLoc() local location tmpLoc=PolarProjectionBJ(cLoc, 50.00, AngleBetweenPoints(cLoc, tLoc)) local group G=CreateGroup() local effect ef1 local effect ef2 local real dm=I2R(GetHeroStatBJ(bj_HEROSTAT_INT, c, true)) * ( GetUnitAbilityLevel(c,GetSpellAbilityId()) * 2 + 2 ) local real sp=GetUnitAbilityLevel(GetSpellAbilityUnit(),GetSpellAbilityId()) * 10 + 250 local integer start=1 local integer end=5 if ( UnitHasItemOfTypeBJ(c, 'I06X') == true ) then set dm=dm+1 endif call AddSpecialEffectLocBJ( tmpLoc, "Objects\\Spawnmodels\\NightElf\\NEDeathSmall\\NEDeathSmall.mdl" ) set ef1 = GetLastCreatedEffectBJ() call AddSpecialEffectLocBJ( tmpLoc, "Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl" ) set ef2 = GetLastCreatedEffectBJ() call CreateNUnitsAtLoc( 1, 'h00U', GetOwningPlayer(GetSpellAbilityUnit()), tmpLoc, AngleBetweenPoints(cLoc, tLoc) ) call UnitApplyTimedLifeBJ( 3.00, 'BTLF', GetLastCreatedUnit() ) call SetUnitScalePercent( GetLastCreatedUnit(),sp,sp,sp ) call RemoveLocation( tmpLoc ) call IssuePointOrderLoc( GetLastCreatedUnit(), "move", tLoc ) loop exitwhen start > end set tmpLoc = PolarProjectionBJ(cLoc, ( I2R(start) * 200.00 ), AngleBetweenPoints(cLoc, tLoc)) call Frost_Buster_Damage(c,GetLocationX(tmpLoc),GetLocationY(tmpLoc),300,dm,G) call RemoveLocation( tmpLoc ) set start = start + 1 endloop call RemoveLocation( cLoc ) call RemoveLocation( tLoc ) call RemoveLocation( tmpLoc ) call TriggerSleepAction( 2 ) call DestroyEffectBJ( ef1 ) call DestroyEffectBJ( ef2 ) call ForForce( GetPlayersAll(), function Trig_Frost_Buster_Func025A ) endfunction function Start_Frost_Buster takes nothing returns nothing set gg_trg_Frost_Buster = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Frost_Buster, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Frost_Buster, Condition( function Trig_Frost_Buster_Conditions ) ) call TriggerAddAction( gg_trg_Frost_Buster, function Trig_Frost_Buster_Actions ) endfunction function InitTrig_Frost_Buster takes nothing returns nothing endfunction//=========================================================================== // Trigger: purge //=========================================================================== function Trig_purge_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A0F3' ) ) then return false endif if ( not ( UnitHasBuffBJ(GetSpellTargetUnit(), 'B02L') == true ) ) then return false endif return true endfunction function Trig_purge_Actions takes nothing returns nothing local unit dummy=CreateDummy(GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()),5,'A0EY',GetUnitAbilityLevel(GetTriggerUnit(),'A0F3')) call IssueTargetOrder( dummy, "doom", GetSpellTargetUnit() ) endfunction function Start_purge takes nothing returns nothing set gg_trg_purge = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_purge, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_purge, Condition( function Trig_purge_Conditions ) ) call TriggerAddAction( gg_trg_purge, function Trig_purge_Actions ) endfunction //=========================================================================== function InitTrig_purge takes nothing returns nothing endfunction //=========================================================================== // Trigger: trap Hero //=========================================================================== function Trig_trap_Hero_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A0F4' ) ) then return false endif if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_HERO) == true ) ) then return false endif return true endfunction function Trig_trap_Hero_Actions takes nothing returns nothing local unit dummy=CreateDummy(GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()),5,'A0F0',GetUnitAbilityLevelSwapped('A0F4', GetTriggerUnit())) call IssueTargetOrder( GetLastCreatedUnit(), "shadowstrike", GetSpellTargetUnit() ) endfunction function Start_trap_Hero takes nothing returns nothing set gg_trg_trap_Hero = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_trap_Hero, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_trap_Hero, Condition( function Trig_trap_Hero_Conditions ) ) call TriggerAddAction( gg_trg_trap_Hero, function Trig_trap_Hero_Actions ) endfunction //=========================================================================== function InitTrig_trap_Hero takes nothing returns nothing endfunction //=========================================================================== // Trigger: trap Creep //=========================================================================== function Trig_trap_Creep_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A0F4' ) ) then return false endif if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_HERO) == false ) ) then return false endif return true endfunction function Trig_trap_Creep_Actions takes nothing returns nothing local unit dummy=CreateDummy(GetTriggerPlayer(), GetUnitLoc(GetTriggerUnit()),5,'A0EZ',GetUnitAbilityLevelSwapped('A0F4', GetTriggerUnit())) call IssueTargetOrder( GetLastCreatedUnit(), "thunderbolt", GetSpellTargetUnit() ) endfunction function Start_trap_Creep takes nothing returns nothing set gg_trg_trap_Creep = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_trap_Creep, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_trap_Creep, Condition( function Trig_trap_Creep_Conditions ) ) call TriggerAddAction( gg_trg_trap_Creep, function Trig_trap_Creep_Actions ) endfunction //=========================================================================== function InitTrig_trap_Creep takes nothing returns nothing endfunction //=========================================================================== // Trigger: Vengence //=========================================================================== function Trig_Vengence_Conditions takes nothing returns boolean return GetLearnedSkillBJ() == 'A0F5' endfunction function Main_Conditions takes nothing returns boolean return UnitHasBuffBJ(GetKillingUnitBJ(), 'B02P') == true endfunction function Trig_Vengence_Main takes nothing returns nothing local trigger tr=GetTriggeringTrigger() local string tt=H2Tx(tr) local unit c=GetUnit(tt,"Revenant") local real alv=GetUnitAbilityLevel(c,'A0F5') local effect ef if ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) then if ( IsUnitIllusionBJ(GetDyingUnit()) == true ) then call UnitDamageTargetBJ(c,GetKillingUnitBJ(),alv*80,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION) else call UnitDamageTargetBJ(c,GetKillingUnitBJ(),alv*160,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION) endif set ef = AddSpecialEffectTargetUnitBJ( "origin", GetKillingUnitBJ(), "Abilities\\Spells\\Original\\FireTrapUp\\ShadowTrap.mdl" ) elseif ( IsUnitType(GetDyingUnit(), UNIT_TYPE_STRUCTURE) == false ) then call UnitDamageTargetBJ(c,GetKillingUnitBJ(),alv*30+10,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION) set ef = AddSpecialEffectTargetUnitBJ( "origin", GetKillingUnitBJ(), "Abilities\\Spells\\Original\\FireTrapUp\\ShadowTrap.mdl" ) endif call PolledWait( 1.00 ) call DestroyEffectBJ( ef ) endfunction function Trig_Vengence_Actions takes nothing returns nothing local trigger ltt local string ch if GetUnitAbilityLevel(GetTriggerUnit(),'A0F5')==1 then set ltt=CreateTrigger() set ch=H2Tx(ltt) call SetHandle(ch,"Revenant",GetTriggerUnit()) call TriggerRegisterAnyUnitEventBJ( ltt, EVENT_PLAYER_UNIT_DEATH ) call TriggerAddCondition( ltt, Condition( function Main_Conditions ) ) call TriggerAddAction(ltt,function Trig_Vengence_Main) endif endfunction function InitTrig_Vengence takes nothing returns nothing set gg_trg_Vengence = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Vengence, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_Vengence, Condition( function Trig_Vengence_Conditions ) ) call TriggerAddAction( gg_trg_Vengence, function Trig_Vengence_Actions ) endfunction//=========================================================================== // Trigger: Leap Attack //=========================================================================== function Trig_Leap_Attack_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A0F9' endfunction function Leap_Attack_Damage takes unit c,real x,real y,real AOE,real dam returns nothing local group G=CreateGroup() local unit uTMP local unit dummy call GroupEnumUnitsInRange(G,x,y,AOE,null) loop set uTMP=FirstOfGroup(G) exitwhen uTMP==null if IsUnitEnemy(uTMP,GetOwningPlayer(c))and IsUnitDeadBJ(uTMP)==false and GetUnitAbilityLevel(uTMP,'A04R')==0 then set dummy=CreateDummy(GetOwningPlayer(c),GetUnitLoc(c),1,'A0FA',GetUnitAbilityLevel(c,'A0F9')) call IssueTargetOrder( dummy, "thunderbolt", uTMP ) endif call GroupRemoveUnit(G,uTMP) endloop call GroupClear(G) call DestroyGroup(G) endfunction function Leap_Attack_Main takes nothing returns nothing local timer Tm=GetExpiredTimer() local string Tab=H2Tx(Tm) local real Range=GetReal(Tab,"Distance") local real Angle=GetReal(Tab,"Angle") local integer Count=GetInteger(Tab,"Counter") local unit Caster=GetUnit(Tab,"Caster") local real Height=(Count-25)*(Count-25) local real slv=GetUnitAbilityLevel(Caster,'A0F9') local real AOE=300+(slv*slv-slv)*50 local real alv=GetUnitAbilityLevel(Caster,'A009') local real SpeedMod=Range*Count/50-Range local location Target=GetLocation(Tab,"Target") local location lDest=PolarProjectionBJ(Target,SpeedMod,Angle) if ( Count < 51 ) then call SetUnitPositionLoc(Caster,lDest) call SetUnitFlyHeight(Caster,775-Height,0) set Count=Count+1 endif if ( Count > 50 ) then call SetUnitFlyHeight(Caster,GetUnitDefaultFlyHeight(Caster),0) call PauseUnit(Caster,false) call SetUnitInvulnerable( Caster, false ) call SetUnitPathing(Caster,true) call TerrainDeformationRippleBJ(.2,true,Target,1.,300.,96.,1,64.) call DestroyEffect(AddSpecialEffectTargetUnitBJ("origin",Caster,"Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl")) call Leap_Attack_Damage(Caster,GetUnitX(Caster),GetUnitY(Caster),AOE,alv) call PauseTimer(GetExpiredTimer()) call PolledWait(.01) call FastFlush(Tab) call DestroyTimer(GetExpiredTimer()) call RemoveLocation(Target) endif call SetInteger(Tab,"Counter",Count) call RemoveLocation(lDest) endfunction function Trig_Leap_Attack_Actions takes nothing returns nothing local timer Tm=CreateTimer() local string lf5=H2Tx(Tm) local unit c=GetTriggerUnit() local location Start=GetUnitLoc(c) local location tp=GetSpellTargetLoc() local real Range=DistanceBetweenPoints(Start,tp) local real Angle=AngleBetweenPoints(Start,tp) call SetUnitPathing(c,false) call UnitAddAbility(c,'AEme') call UnitRemoveAbility(c,'AEme') call SetHandle(lf5,"Caster",c) call SetHandle(lf5,"Target",tp) call SetReal(lf5,"Distance",Range) call SetReal(lf5,"Angle",Angle) call SetInteger(lf5,"Counter",1) call PauseUnitBJ( true, c ) call SetUnitInvulnerable( c, true ) call PlaySoundBJ( gg_snd_leapattack1 ) call TimerStart(Tm,.02,true,function Leap_Attack_Main) endfunction function Start_Leap_Attack takes nothing returns nothing set gg_trg_Leap_Attack = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Leap_Attack, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Leap_Attack, Condition( function Trig_Leap_Attack_Conditions ) ) call TriggerAddAction( gg_trg_Leap_Attack, function Trig_Leap_Attack_Actions ) endfunction function InitTrig_Leap_Attack takes nothing returns nothing endfunction//=========================================================================== // Trigger: Endurance //=========================================================================== function Trig_Endurance_Conditions takes nothing returns boolean return GetLearnedSkillBJ() == 'A0FD' endfunction function Trig_Endurance_Main takes nothing returns nothing local integer random=GetRandomInt(1, 100) local group G local unit uTMP local unit c=GetAttackedUnitBJ() local real dam=GetEventDamage()*(0.5+GetUnitAbilityLevel(c,'A0FD' )*0.5) local effect ef if ( random <= 10 ) then set ef=AddSpecialEffectTargetUnitBJ( "origin", c, "Abilities\\Spells\\Original\\ThunderclapCaster\\Magmaeruption.mdl" ) set G=CreateGroup() call GroupEnumUnitsInRange(G,GetUnitX(c),GetUnitY(c),350,null) loop set uTMP=FirstOfGroup(G) exitwhen uTMP==null if IsUnitEnemy(uTMP,GetOwningPlayer(c))and IsUnitDeadBJ(uTMP)==false and GetUnitAbilityLevel(uTMP,'A08E')==0 then call UnitDamageTargetBJ(c,uTMP,dam,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION) endif call GroupRemoveUnit(G,uTMP) endloop call GroupClear(G) call DestroyGroup(G) endif call TriggerSleepAction( 1 ) call DestroyEffectBJ( ef ) endfunction function Trig_Endurance_Actions takes nothing returns nothing local trigger ltt if GetUnitAbilityLevel(GetTriggerUnit(),'A0FD')==1 then set ltt=CreateTrigger() call TriggerRegisterUnitEvent(ltt,GetTriggerUnit(),EVENT_UNIT_DAMAGED) call TriggerAddAction(ltt,function Trig_Endurance_Main) endif endfunction function Start_Endurance takes nothing returns nothing set gg_trg_Endurance = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Endurance, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_Endurance, Condition( function Trig_Endurance_Conditions ) ) call TriggerAddAction( gg_trg_Endurance, function Trig_Endurance_Actions ) endfunction function InitTrig_Endurance takes nothing returns nothing endfunction//=========================================================================== // Trigger: Vampire Groan //=========================================================================== function Trig_Vampire_Groan_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A0FE' endfunction function Vampire_Groan_Main takes nothing returns nothing local timer Tm=GetExpiredTimer() local string Tab=H2Tx(Tm) local unit Caster=GetUnit(Tab,"Caster") local unit uTMP local group G=CreateGroup() local real dam=GetUnitAbilityLevel(Caster,'A0FE' )*10 call GroupEnumUnitsInRange(G,GetUnitX(Caster),GetUnitY(Caster),700,null) loop set uTMP=FirstOfGroup(G) exitwhen uTMP==null if IsUnitEnemy(uTMP,GetOwningPlayer(Caster))and GetUnitStateSwap(UNIT_STATE_LIFE, uTMP) > 0 and GetUnitAbilityLevel(uTMP,'A08E')==0 then call UnitDamageTargetBJ(Caster,uTMP,dam,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION) call SetUnitLifeBJ( Caster, GetUnitStateSwap(UNIT_STATE_LIFE, Caster) + dam ) endif call GroupRemoveUnit(G,uTMP) endloop call GroupClear(G) call DestroyGroup(G) endfunction function Trig_Vampire_Groan_Actions takes nothing returns nothing local timer Tm=CreateTimer() local string lf5=H2Tx(Tm) call SetHandle(lf5,"Caster",GetTriggerUnit()) call TimerStart(Tm,1,true,function Vampire_Groan_Main) call PolledWait(10) call PauseTimer(Tm) call PolledWait(.01) call FastFlush(lf5) call DestroyTimer(Tm) endfunction function Start_Vampire_Groan takes nothing returns nothing set gg_trg_Vampire_Groan = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Vampire_Groan, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Vampire_Groan, Condition( function Trig_Vampire_Groan_Conditions ) ) call TriggerAddAction( gg_trg_Vampire_Groan, function Trig_Vampire_Groan_Actions ) endfunction function InitTrig_Vampire_Groan takes nothing returns nothing endfunction//=========================================================================== // Trigger: Amateras //=========================================================================== function Trig_Amateras_Conditions takes nothing returns boolean return GetUnitAbilityLevel(GetTriggerUnit(),'A0FL') > 0 endfunction function Trig_Amateras_Actions takes nothing returns nothing if(GetIssuedOrderId()==OrderId("immolation"))then call UnitAddAbility(GetTriggerUnit(),'A0FK') call SetUnitAbilityLevelSwapped( 'A0FK', GetTriggerUnit(), GetUnitAbilityLevel(GetTriggerUnit(),'A0FL') ) endif if(GetIssuedOrderId()==OrderId("unimmolation"))then call UnitRemoveAbility(GetTriggerUnit(),'A0FK') endif endfunction function InitTrig_Amateras takes nothing returns nothing set gg_trg_Amateras = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Amateras, EVENT_PLAYER_UNIT_ISSUED_ORDER ) call TriggerAddCondition( gg_trg_Amateras, Condition( function Trig_Amateras_Conditions ) ) call TriggerAddAction( gg_trg_Amateras, function Trig_Amateras_Actions ) endfunction//=========================================================================== // Trigger: Meigoku //=========================================================================== function Trig_Meigoku_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A0FH' endfunction function Meigoku_TreeCut takes nothing returns nothing call KillDestructable(GetEnumDestructable()) endfunction function MeigokuDamage takes unit c,real x,real y,real AOE,real dam,group H returns nothing local group G=CreateGroup() local unit uTMP call GroupEnumUnitsInRange(G,x,y,AOE,null) loop set uTMP=FirstOfGroup(G) exitwhen uTMP==null if IsUnitInGroup(uTMP,H)==false and IsUnitEnemy(uTMP,GetOwningPlayer(c))and GetUnitState(uTMP,UNIT_STATE_LIFE)>0 and GetUnitAbilityLevel(uTMP,'A08E')==0 and IsUnitType(uTMP,UNIT_TYPE_STRUCTURE)==false then if (IsUnitType(uTMP, UNIT_TYPE_HERO) == true )then call UnitDamageTargetBJ( c, uTMP, GetUnitStateSwap(UNIT_STATE_MAX_LIFE, uTMP)*dam, ATTACK_TYPE_HERO, DAMAGE_TYPE_UNKNOWN ) else call UnitDamageTargetBJ( c, uTMP, GetUnitStateSwap(UNIT_STATE_MAX_LIFE, uTMP), ATTACK_TYPE_HERO, DAMAGE_TYPE_UNKNOWN ) endif call GroupAddUnit(H,uTMP) call GroupRemoveUnit(G,uTMP) else call GroupRemoveUnit(G,uTMP) endif endloop call GroupClear(G) call DestroyGroup(G) endfunction function Trig_Meigoku_Actions takes nothing returns nothing local unit uTMP local unit caster=GetTriggerUnit() local group G=CreateGroup() local real slv=GetUnitAbilityLevel(caster,'A0FH') local location tar local real angle=AngleBetweenPoints(GetUnitLoc(caster), GetSpellTargetLoc()) local real x local real y local real dam=slv*0.1+0.2 local real i=150 local rect tC call TriggerSleepAction( 0.02 ) call PauseUnitBJ( true, caster ) call UnitAddAbility(caster,'A0FG') call SetUnitTimeScalePercent( caster, 20.00 ) call SetUnitAnimation( caster, "birth" ) call TriggerSleepAction( 0.75 ) call SetUnitTimeScalePercent( caster, 100.00 ) call SetUnitAnimation( caster, "spell swim" ) set tar=PolarProjectionBJ(GetUnitLoc(caster), 150, angle) call TriggerSleepAction( 0.7 ) loop set x=GetLocationX(tar) set y=GetLocationY(tar) set tC=Rect(x-200,y-200,x+200,y+200) exitwhen i > slv*450 call SetUnitX(caster,GetLocationX(tar)) call SetUnitY(caster,GetLocationY(tar)) call MeigokuDamage(caster,GetLocationX(tar),GetLocationY(tar),250,dam,G) call EnumDestructablesInRect(tC,null,function Meigoku_TreeCut) call AddSpecialEffectLocBJ( tar, "Abilities\\Spells\\Original\\SparksExplosion\\NewSparksEX.mdl" ) set i = i + 150 set tar=PolarProjectionBJ(GetUnitLoc(caster), 150, angle) endloop call TriggerSleepAction( 1.40 ) call UnitRemoveAbility(caster,'A0FG') call PauseUnitBJ( false, caster ) call DestroyGroup(G) call RemoveLocation(tar) endfunction function InitTrig_Meigoku takes nothing returns nothing set gg_trg_Meigoku = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Meigoku, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Meigoku, Condition( function Trig_Meigoku_Conditions ) ) call TriggerAddAction( gg_trg_Meigoku, function Trig_Meigoku_Actions ) endfunction//=========================================================================== // Trigger: Overload //=========================================================================== function Trig_Overload_Conditions takes nothing returns boolean if ( not ( GetUnitAbilityLevelSwapped('A0FM', GetAttacker()) > 0 ) ) then return false endif if ( not ( UnitHasBuffBJ(GetAttacker(), 'B02V') == true ) ) then return false endif if( not ( IsUnitType( GetTriggerUnit(),UNIT_TYPE_STRUCTURE ) == false ) ) then return false endif return true endfunction function Overload_MainConditions takes nothing returns boolean local string Tab=H2Tx(gg_trg_Overload) local unit Caster=GetUnit(Tab,"Caster") return GetEventDamageSource()==Caster endfunction function Overload_Main takes nothing returns nothing local unit at=GetEventDamageSource() local real dam=GetEventDamage() * ( GetUnitAbilityLevel(at,'A0FM') * 0.15 ) local effect lkW=AddSpecialEffectTargetUnitBJ("origin",GetTriggerUnit(),"Abilities\\Spells\\Original\\WarStompCaster\\Ragingslam.mdl") local unit uTMP local group G=CreateGroup() call DisableTrigger( GetTriggeringTrigger() ) call GroupEnumUnitsInRange(G,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),250,null) call GroupRemoveUnit(G,GetTriggerUnit()) loop set uTMP=FirstOfGroup(G) exitwhen uTMP==null if IsUnitEnemy(uTMP,GetOwningPlayer(at))and GetUnitStateSwap(UNIT_STATE_LIFE, uTMP) > 0 and GetUnitAbilityLevel(uTMP,'A08E')==0 then call UnitDamageTargetBJ(at,uTMP,dam,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_DEMOLITION) endif call GroupRemoveUnit(G,uTMP) endloop call DestroyEffect(lkW) call GroupClear(G) call DestroyGroup(G) call DestroyTrigger( GetTriggeringTrigger() ) endfunction function Trig_Overload_Actions takes nothing returns nothing local trigger ltt=CreateTrigger() local string lf5=H2Tx(gg_trg_Overload) call SetHandle(lf5,"Caster",GetAttacker()) call TriggerRegisterUnitEvent(ltt,GetTriggerUnit(),EVENT_UNIT_DAMAGED) call TriggerAddCondition(ltt,Condition(function Overload_MainConditions)) call TriggerAddAction(ltt,function Overload_Main) call PolledWait(1.5) call DestroyTrigger( ltt ) endfunction function InitTrig_Overload takes nothing returns nothing set gg_trg_Overload = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Overload, EVENT_PLAYER_UNIT_ATTACKED ) call TriggerAddCondition( gg_trg_Overload, Condition( function Trig_Overload_Conditions ) ) call TriggerAddAction( gg_trg_Overload, function Trig_Overload_Actions ) endfunction//=========================================================================== // Trigger: Accelerate //=========================================================================== function Trig_Accelerate_Conditions takes nothing returns boolean if ( not ( GetUnitAbilityLevelSwapped('A0FO', GetAttacker()) > 0 ) ) then return false endif // if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then // return false // endif if ( not ( IsUnitEnemy(GetAttacker(), GetOwningPlayer(GetAttackedUnitBJ())) == true ) ) then return false endif if ( not ( IsUnitIllusionBJ(GetAttacker()) == false ) ) then return false endif return true endfunction function Accelerate_Del takes nothing returns nothing local timer Tm=GetExpiredTimer() local unit caster=GetUnit(H2Tx(gg_trg_Accelerate),"Caster") call UnitRemoveAbility(caster,'A0FP') call DestroyTimer(Tm) endfunction function Trig_Accelerate_Actions takes nothing returns nothing local timer tim=CreateTimer() local unit caster=GetAttacker() local unit target=GetAttackedUnitBJ() local unit Ltarget=GetUnit(H2Tx(gg_trg_Accelerate),"Ltarget") local integer slv=GetUnitAbilityLevel(caster,'A0FO') local integer cg=GetUnitAbilityLevel(caster,'A0FP')/4 local integer count=GetInteger(H2Tx(gg_trg_Accelerate),"Count")+1 local timer ltim=GetTimer(H2Tx(gg_trg_Accelerate),"Timer") call SetHandle(H2Tx(gg_trg_Accelerate),"Ltarget",target) if ( count > 2 and target == Ltarget ) then call SetInteger(H2Tx(gg_trg_Accelerate),"Count",0) call DestroyTimer(ltim) call TimerStart(tim,6,true,function Accelerate_Del) call SetHandle(H2Tx(gg_trg_Accelerate),"Caster",caster) call SetHandle(H2Tx(gg_trg_Accelerate),"Timer",tim) if ( GetUnitAbilityLevel(caster,'A0FP') == 0 ) then call UnitAddAbilityBJ( 'A0FP', caster ) else set cg = cg + 1 endif if ( cg > 4 ) then set cg = cg - 1 endif call SetUnitAbilityLevelSwapped( 'A0FP', caster, cg*4+slv ) else call SetInteger(H2Tx(gg_trg_Accelerate),"Count",count) call DestroyTimer(tim) endif endfunction function InitTrig_Accelerate takes nothing returns nothing set gg_trg_Accelerate = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Accelerate, EVENT_PLAYER_UNIT_ATTACKED ) call TriggerAddCondition( gg_trg_Accelerate, Condition( function Trig_Accelerate_Conditions ) ) call TriggerAddAction( gg_trg_Accelerate, function Trig_Accelerate_Actions ) call SetInteger(H2Tx(gg_trg_Accelerate),"Count",0) call SetHandle(H2Tx(gg_trg_Accelerate),"Ltarget",null) endfunction//=========================================================================== // Trigger: Absolute Observance //=========================================================================== function Trig_Absolute_Observance_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A0FT' endfunction function Absolute_Observance_Del takes nothing returns nothing local group G=GetGroup(H2Tx(gg_trg_Absolute_Observance),"Group") local integer count=GetInteger(H2Tx(gg_trg_Absolute_Observance),"Count") local unit dunit=GetTriggerUnit() call GroupRemoveUnit(G,dunit) call UnitRemoveAbility(dunit,'A0FU') call UnitRemoveAbility(dunit,'A039') call UnitRemoveAbility(dunit,'A03B') call UnitRemoveAbility(dunit,'A0FV') call SetInteger(H2Tx(gg_trg_Absolute_Observance),"Count",count-1) call DestroyTrigger( GetTriggeringTrigger() ) endfunction function TargetSkillLevel takes integer slv,group G returns nothing local group H=CreateGroup() local unit uTMP loop set uTMP=FirstOfGroup(G) exitwhen uTMP==null call GroupAddUnit(H,uTMP) call GroupRemoveUnit(G,uTMP) if ( slv == 2 ) then call UnitRemoveAbility(uTMP,'A0FU') call UnitAddAbilityBJ( 'A039', uTMP ) endif if ( slv == 3 ) then call UnitRemoveAbility(uTMP,'A039') call UnitAddAbilityBJ( 'A03B', uTMP ) endif if ( slv == 4 ) then call UnitRemoveAbility(uTMP,'A03B') call UnitAddAbilityBJ( 'A0FV', uTMP ) endif endloop call GroupClear(G) call DestroyGroup(G) call SetHandle(H2Tx(gg_trg_Absolute_Observance),"Group",H) endfunction function Trig_Absolute_Observance_Actions takes nothing returns nothing local trigger ltt local unit caster=GetTriggerUnit() local unit target=GetSpellTargetUnit() local integer count=GetInteger(H2Tx(gg_trg_Absolute_Observance),"Count") local integer slv=GetUnitAbilityLevel(caster,'A0FT') local group G=GetGroup(H2Tx(gg_trg_Absolute_Observance),"Group") if ( count >= slv ) then call UnitDamageTargetBJ( caster, target, GetUnitStateSwap(UNIT_STATE_MAX_LIFE, target), ATTACK_TYPE_HERO, DAMAGE_TYPE_UNKNOWN ) else call SetUnitOwner( target, GetTriggerPlayer(), true ) call UnitAddAbilityBJ( 'A0FU', target ) call GroupAddUnit(G,target) call SetInteger(H2Tx(gg_trg_Absolute_Observance),"Count",count+1) set ltt=CreateTrigger() call TriggerRegisterUnitEvent( ltt, target, EVENT_UNIT_DEATH ) call TriggerRegisterUnitEvent( ltt, target, EVENT_UNIT_CHANGE_OWNER ) call TriggerAddAction(ltt,function Absolute_Observance_Del) endif call TargetSkillLevel(slv,G) endfunction function InitTrig_Absolute_Observance takes nothing returns nothing local group G=CreateGroup() set gg_trg_Absolute_Observance = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Absolute_Observance, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Absolute_Observance, Condition( function Trig_Absolute_Observance_Conditions ) ) call TriggerAddAction( gg_trg_Absolute_Observance, function Trig_Absolute_Observance_Actions ) call SetInteger(H2Tx(gg_trg_Absolute_Observance),"Count",0) call SetHandle(H2Tx(gg_trg_Absolute_Observance),"Group",G) endfunction//=========================================================================== // Trigger: Marionette Control //=========================================================================== function Trig_Marionette_Control_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A0FW' endfunction function StatCheck takes integer a,integer b returns integer if ( a > b ) then return b-1 else return a endif endfunction function DeadFlag takes nothing returns nothing call SetBoolean(H2Tx(gg_trg_Marionette_Control),"DeadFlag",true) call DestroyTrigger( GetTriggeringTrigger() ) endfunction function DamageLink takes nothing returns nothing local unit target=GetUnit(H2Tx(gg_trg_Marionette_Control),"BUnit") call SetUnitLifeBJ( target, ( GetUnitStateSwap(UNIT_STATE_LIFE, target) - GetEventDamage() ) ) endfunction function LifeLain takes nothing returns nothing local unit caster=GetUnit(H2Tx(gg_trg_Marionette_Control),"caster") local unit target=GetUnit(H2Tx(gg_trg_Marionette_Control),"BUnit") local integer slv=GetUnitAbilityLevel(caster,'A0FW') local integer x=0 local integer Pstr=GetInteger(H2Tx(gg_trg_Marionette_Control),"String") local integer Pagi=GetInteger(H2Tx(gg_trg_Marionette_Control),"Agility") local integer Pint=GetInteger(H2Tx(gg_trg_Marionette_Control),"Intelligence") local lightning lt local trigger dd=GetTrigger(H2Tx(gg_trg_Marionette_Control),"DeadFlagT") local trigger dl=GetTrigger(H2Tx(gg_trg_Marionette_Control),"DamageLinkT") local effect ef=AddSpecialEffectTargetUnitBJ( "origin", target, "Abilities\\Spells\\Original\\NagaBirth\\HealingWater.mdl" ) loop exitwhen x >= slv*300 or GetBoolean(H2Tx(gg_trg_Marionette_Control),"DeadFlag") == true if ( x == 0 ) then set lt = AddLightningLoc( "SPLK", GetUnitLoc(caster), GetUnitLoc(target) ) else call MoveLightningLoc( lt, GetUnitLoc(caster), GetUnitLoc(target) ) endif set x = x + 1 call TriggerSleepAction( 0.1 ) endloop call ModifyHeroStat( bj_HEROSTAT_STR, target, bj_MODIFYMETHOD_SUB, Pstr ) call ModifyHeroStat( bj_HEROSTAT_AGI, target, bj_MODIFYMETHOD_SUB, Pagi ) call ModifyHeroStat( bj_HEROSTAT_INT, target, bj_MODIFYMETHOD_SUB, Pint ) call ModifyHeroStat( bj_HEROSTAT_STR, caster, bj_MODIFYMETHOD_ADD, Pstr ) call ModifyHeroStat( bj_HEROSTAT_AGI, caster, bj_MODIFYMETHOD_ADD, Pagi ) call ModifyHeroStat( bj_HEROSTAT_INT, caster, bj_MODIFYMETHOD_ADD, Pint ) call SetHandle(H2Tx(gg_trg_Marionette_Control),"BUnit",null) call DestroyLightningBJ( lt ) call DestroyEffect( ef ) call DestroyTrigger( dd ) call DestroyTrigger( dl ) call DestroyTrigger( GetTriggeringTrigger() ) endfunction function Trig_Marionette_Control_Actions takes nothing returns nothing local trigger ltt=CreateTrigger() local trigger dd=CreateTrigger() local trigger dl=CreateTrigger() local unit caster=GetTriggerUnit() local unit target=GetSpellTargetUnit() local integer Pstr=StatCheck(GetHeroStatBJ(bj_HEROSTAT_STR, caster, true)/2,GetHeroStatBJ(bj_HEROSTAT_STR, caster, false)) local integer Pagi=StatCheck(GetHeroStatBJ(bj_HEROSTAT_AGI, caster, true)/2,GetHeroStatBJ(bj_HEROSTAT_AGI, caster, false)) local integer Pint=StatCheck(GetHeroStatBJ(bj_HEROSTAT_INT, caster, true)/2,GetHeroStatBJ(bj_HEROSTAT_INT, caster, false)) call SetBoolean(H2Tx(gg_trg_Marionette_Control),"DeadFlag",false) call SetHandle(H2Tx(gg_trg_Marionette_Control),"caster",caster) call SetHandle(H2Tx(gg_trg_Marionette_Control),"BUnit",target) call SetHandle(H2Tx(gg_trg_Marionette_Control),"DeadFlagT",dd) call SetHandle(H2Tx(gg_trg_Marionette_Control),"DamageLinkT",dl) call SetInteger(H2Tx(gg_trg_Marionette_Control),"String",Pstr) call SetInteger(H2Tx(gg_trg_Marionette_Control),"Agility",Pagi) call SetInteger(H2Tx(gg_trg_Marionette_Control),"Intelligence",Pint) call ModifyHeroStat( bj_HEROSTAT_STR, target, bj_MODIFYMETHOD_ADD, Pstr ) call ModifyHeroStat( bj_HEROSTAT_AGI, target, bj_MODIFYMETHOD_ADD, Pagi ) call ModifyHeroStat( bj_HEROSTAT_INT, target, bj_MODIFYMETHOD_ADD, Pint ) call ModifyHeroStat( bj_HEROSTAT_STR, caster, bj_MODIFYMETHOD_SUB, Pstr ) call ModifyHeroStat( bj_HEROSTAT_AGI, caster, bj_MODIFYMETHOD_SUB, Pagi ) call ModifyHeroStat( bj_HEROSTAT_INT, caster, bj_MODIFYMETHOD_SUB, Pint ) call TriggerAddAction(dd,function DeadFlag) call TriggerRegisterUnitEvent( dd, caster, EVENT_UNIT_DEATH ) call TriggerRegisterUnitEvent( dd, target, EVENT_UNIT_DEATH ) call TriggerAddAction(dl,function DamageLink) call TriggerRegisterUnitEvent(dl,caster,EVENT_UNIT_DAMAGED) call TriggerAddAction(ltt,function LifeLain) call TriggerExecute( ltt ) endfunction function InitTrig_Marionette_Control takes nothing returns nothing set gg_trg_Marionette_Control = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Marionette_Control, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Marionette_Control, Condition( function Trig_Marionette_Control_Conditions ) ) call TriggerAddAction( gg_trg_Marionette_Control, function Trig_Marionette_Control_Actions ) endfunction//=========================================================================== // Trigger: Recall //=========================================================================== function Trig_Recall_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A0FX' endfunction function Trig_Recall_Actions takes nothing returns nothing local group G=GetGroup(H2Tx(gg_trg_Absolute_Observance),"Group") local group H=CreateGroup() local unit caster=GetTriggerUnit() local unit BU=GetUnit(H2Tx(gg_trg_Marionette_Control),"BUnit") local unit uTMP local integer slv=GetUnitAbilityLevel(caster,'A0FX') if ( BU != null ) then call SetUnitX(BU,GetUnitX(caster)) call SetUnitY(BU,GetUnitY(caster)) call IssueImmediateOrder( BU, "stop" ) endif loop set uTMP=FirstOfGroup(G) exitwhen uTMP==null call SetUnitX(uTMP,GetUnitX(caster)) call SetUnitY(uTMP,GetUnitY(caster)) call SetUnitLifeBJ( uTMP, ( GetUnitStateSwap(UNIT_STATE_LIFE, uTMP) + slv*80 ) ) call GroupAddUnit(H,uTMP) call GroupRemoveUnit(G,uTMP) call IssueImmediateOrder( uTMP, "stop" ) endloop call GroupClear(G) call DestroyGroup(G) call SetHandle(H2Tx(gg_trg_Absolute_Observance),"Group",H) endfunction function InitTrig_Recall takes nothing returns nothing set gg_trg_Recall = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Recall, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Recall, Condition( function Trig_Recall_Conditions ) ) call TriggerAddAction( gg_trg_Recall, function Trig_Recall_Actions ) endfunction//=========================================================================== // Trigger: Boost of Marionette //=========================================================================== function Trig_Boost_of_Marionette_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A0FY' endfunction function Trig_Boost_of_Marionette_Actions takes nothing returns nothing local group G=GetGroup(H2Tx(gg_trg_Absolute_Observance),"Group") local group H=CreateGroup() local unit caster=GetTriggerUnit() local unit BU=GetUnit(H2Tx(gg_trg_Marionette_Control),"BUnit") local unit uTMP local integer slv=GetUnitAbilityLevel(caster,'A0FX') local unit dummy=CreateDummy(GetTriggerPlayer(),GetUnitLoc(caster),1,'A0FZ',slv) if ( BU != null ) then call IssueTargetOrder( dummy, "bloodlust", BU ) endif loop set uTMP=FirstOfGroup(G) exitwhen uTMP==null call IssueTargetOrder( dummy, "bloodlust", uTMP ) call GroupAddUnit(H,uTMP) call GroupRemoveUnit(G,uTMP) endloop call GroupClear(G) call DestroyGroup(G) call SetHandle(H2Tx(gg_trg_Absolute_Observance),"Group",H) endfunction function InitTrig_Boost_of_Marionette takes nothing returns nothing set gg_trg_Boost_of_Marionette = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Boost_of_Marionette, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Boost_of_Marionette, Condition( function Trig_Boost_of_Marionette_Conditions ) ) call TriggerAddAction( gg_trg_Boost_of_Marionette, function Trig_Boost_of_Marionette_Actions ) endfunction//=========================================================================== // Trigger: Lex Aeterna //=========================================================================== function Trig_Lex_Aeterna_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'S006' endfunction function Trig_Lex_Aeterna_Main takes nothing returns nothing local trigger tr=GetTriggeringTrigger() local unit dmu=GetUnit(H2Tx(tr),"Lex_Aeterna") local unit target=GetTriggerUnit() local real dam=GetEventDamage() local effect ef if(GetEventDamage()>10 and UnitHasBuffBJ(target, 'B02Y') == true)then set ef=AddSpecialEffectTargetUnitBJ( "origin", target, "Abilities\\Spells\\Original\\WispExplode\\TheHolyBomb.mdl" ) call DisableTrigger(tr) call UnitDamageTargetBJ(dmu,target,dam,ATTACK_TYPE_HERO,DAMAGE_TYPE_NORMAL) call UnitRemoveBuffBJ( 'B02Y', target ) call DestroyEffect(ef) call DestroyTrigger( tr ) endif endfunction function Trig_Lex_Aeterna_Actions takes nothing returns nothing local trigger tr=CreateTrigger() local unit caster=GetTriggerUnit() call SetHandle(H2Tx(tr),"Lex_Aeterna",caster) call TriggerRegisterUnitEvent(tr,GetSpellTargetUnit(),EVENT_UNIT_DAMAGED) call TriggerAddAction(tr,function Trig_Lex_Aeterna_Main) call PolledWait(20) call DisableTrigger(tr) endfunction function InitTrig_Lex_Aeterna takes nothing returns nothing set gg_trg_Lex_Aeterna = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Lex_Aeterna, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Lex_Aeterna, Condition( function Trig_Lex_Aeterna_Conditions ) ) call TriggerAddAction( gg_trg_Lex_Aeterna, function Trig_Lex_Aeterna_Actions ) endfunction//=========================================================================== // Trigger: Kyrie Eleison //=========================================================================== function Trig_Kyrie_Eleison_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A0G4' endfunction function Trig_Kyrie_Eleison_Actions takes nothing returns nothing local group G=CreateGroup() local unit caster=GetTriggerUnit() local unit uTMP local integer slv=GetUnitAbilityLevel(caster,'A0G4') local unit dummy=CreateDummy(GetTriggerPlayer(),GetUnitLoc(caster),1,'A0G5',slv) call GroupEnumUnitsInRange(G,GetUnitX(caster),GetUnitY(caster),700,null) loop set uTMP=FirstOfGroup(G) exitwhen uTMP==null if ( IsUnitAlly(caster, GetOwningPlayer(uTMP)) and GetUnitState(uTMP,UNIT_STATE_LIFE) > 0 and GetUnitAbilityLevel(uTMP,'A08E')==0 and IsUnitType(uTMP,UNIT_TYPE_STRUCTURE)==false ) then call IssueTargetOrder( dummy, "innerfire", uTMP ) endif call GroupRemoveUnit(G,uTMP) endloop call GroupClear(G) call DestroyGroup(G) endfunction function InitTrig_Kyrie_Eleison takes nothing returns nothing set gg_trg_Kyrie_Eleison = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Kyrie_Eleison, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Kyrie_Eleison, Condition( function Trig_Kyrie_Eleison_Conditions ) ) call TriggerAddAction( gg_trg_Kyrie_Eleison, function Trig_Kyrie_Eleison_Actions ) endfunction//=========================================================================== // Trigger: Fissure //=========================================================================== function Fissure_Spell takes nothing returns boolean return GetSpellAbilityId()=='A0G8' endfunction function Fissure_Main takes nothing returns nothing local location ln3=GetSpellTargetLoc() local location lNf=GetUnitLoc(GetTriggerUnit()) local location liD local effect lfx local destructable array lNF local player lEk=GetOwningPlayer(GetTriggerUnit()) local real lNg=AngleBetweenPoints(lNf,ln3) local integer lk2=20 local integer lNG=R2I(1200/lk2) local integer lEq=1 local integer lEQ=lk2 loop exitwhen lEq>lEQ set liD=PolarProjectionBJ(lNf,lEq*lNG,lNg) call MoveLocation(liD,SafeX(GetLocationX(liD)),SafeY(GetLocationY(liD))) set lNF[lEq]=CreateDestructableLoc('B000',liD,GetRandomReal(0,360),.5,GetRandomInt(0,2)) set lfx=AddSpecialEffectLoc("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl",liD) call RemoveLocation(liD) call DestroyEffect(lfx) set lEq=lEq+1 endloop call PolledWait(8.) set lEq=1 loop exitwhen lEq>lEQ call RemoveDestructable(lNF[lEq]) set lEq=lEq+1 endloop call RemoveLocation(ln3) call RemoveLocation(lNf) endfunction function InitTrig_Fissure takes nothing returns nothing local trigger ltt=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(ltt,EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddCondition(ltt,Condition(function Fissure_Spell)) call TriggerAddAction(ltt,function Fissure_Main) endfunction//=========================================================================== // Trigger: Echo_Slam //=========================================================================== function Trig_Echo_Slam_Conditions takes nothing returns boolean if(not(GetSpellAbilityId()=='A0G6'))then return false endif return true endfunction function Echo_Slam_FilterII takes nothing returns boolean return GetBooleanAnd((IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit()))),GetBooleanAnd((IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false),(GetUnitAbilityLevelSwapped('A08E',GetFilterUnit())!=1))) endfunction function Echo_Slam_Main takes nothing returns nothing local location lnG=GetUnitLoc(GetEnumUnit()) local unit dummy=CreateDummy(GetOwningPlayer(GetTriggerUnit()),lnG,1,'A0G7',GetUnitAbilityLevel(GetTriggerUnit(),'A0G6')) call SetUnitScalePercent(dummy,25.,25.,25.) call IssueImmediateOrderById(dummy,OrderId("fanofknives")) call RemoveLocation(lnG) endfunction function Trig_Echo_Slam_Actions takes nothing returns nothing local location lnG=GetUnitLoc(GetTriggerUnit()) local group lND=GetUnitsInRangeOfLocMatching(500.,lnG,Condition(function Echo_Slam_FilterII)) call PolledWait(.3) call ForGroupBJ(lND,function Echo_Slam_Main) call RemoveLocation(lnG) call DestroyGroup(lND) endfunction function InitTrig_Echo_Slam takes nothing returns nothing set gg_trg_Echo_Slam=CreateTrigger() call TriggerRegisterAnyUnitEventBJ(gg_trg_Echo_Slam,EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddCondition(gg_trg_Echo_Slam,Condition(function Trig_Echo_Slam_Conditions)) call TriggerAddAction(gg_trg_Echo_Slam,function Trig_Echo_Slam_Actions) endfunction//=========================================================================== // Trigger: Burst Tackle Back //=========================================================================== function BashMoving takes nothing returns nothing local timer tm=GetExpiredTimer() local string lf5=H2Tx(tm) local unit target=GetUnit(lf5,"Defender") local real angle=GetReal(lf5,"Angle") local integer brake=GetInteger(lf5,"Brake") local real luz=GetReal(lf5,"Movement") local location luZ if ( brake==1 ) then call SetReal(lf5,"Movement",luz*.98) endif if(GetUnitState(target,UNIT_STATE_LIFE)>0)then set luZ=GetUnitLoc(target) call EnumDestructablesInCircleBJ(150.,luZ,function KillDestructableEnum) call DestroyEffect(AddSpellEffectByIdLoc('A0G5',EFFECT_TYPE_SPECIAL,luZ)) call RemoveLocation(luZ) call SetUnitPosition(target,GetUnitX(target)+luz*Cos(angle),GetUnitY(target)+luz*Sin(angle)) endif endfunction function BashSetting takes nothing returns nothing local timer tm=CreateTimer() local string lf5=H2Tx(tm) local unit caster=GetUnit(H2Tx(gg_trg_Burst_Tackle),"Caster") local unit target=GetUnit(H2Tx(gg_trg_Burst_Tackle),"Target") local real angle=Atan2(GetUnitY(target)-GetUnitY(caster),GetUnitX(target)-GetUnitX(caster)) call DestroyEffect(AddSpecialEffectTargetUnitBJ("weapon",caster,"Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl")) call SetHandle(lf5,"Defender",target) call SetReal(lf5,"Angle",angle) call SetReal(lf5,"Movement",2) call SetInteger(lf5,"Brake",0) call TimerStart(tm,.01,true,function BashMoving) call PolledWait(.1) call SetInteger(lf5,"Brake",1) call PolledWait(1.75) call PauseTimer(tm) call PolledWait(1) call FastFlush(lf5) call DestroyTimer(tm) endfunction function InitTrig_Burst_Tackle_Back takes nothing returns nothing endfunction//=========================================================================== // Trigger: Burst Tackle //=========================================================================== //TESH.scrollpos=36 //TESH.alwaysfold=1 function Burst_Tackle_Spell takes nothing returns boolean return GetSpellAbilityId()=='A0GE' endfunction function Burst_Tackle_FadeIn takes nothing returns nothing local string lf5=H2Tx(GetExpiredTimer()) local integer inv=GetInteger(lf5,"Fade") call SetUnitVertexColorBJ(GetUnit(lf5,"caster"),100,100,100,inv) call SetInteger(lf5,"Fade",inv+1) endfunction function Burst_Tackle_Damage takes nothing returns nothing local unit caster=GetUnit(H2Tx(GetTriggeringTrigger()),"caster") if(GetEventDamageSource()==caster)then call DisableTrigger(GetTriggeringTrigger()) call UnitDamageTargetBJ(caster,GetTriggerUnit(),40*I2R(GetUnitAbilityLevel(caster,'A0GE')),ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL) endif endfunction function Burst_Tackle_FadeOff takes nothing returns nothing local string lf5=H2Tx(GetExpiredTimer()) local integer inv=GetInteger(lf5,"Fade") call SetUnitVertexColorBJ(GetUnit(lf5,"caster"),100,100,100,inv) call SetInteger(lf5,"Fade",inv-1) endfunction function Burst_Tackle_Setting takes nothing returns nothing local unit caster=GetTriggerUnit() local unit target=GetSpellTargetUnit() local timer tm1=CreateTimer() local timer tm2=CreateTimer() local location tLoc local location cLoc local trigger tr=CreateTrigger() call UnitShareVision(target,GetOwningPlayer(caster),true) call IssueImmediateOrder(caster,"halt") call SetInteger(H2Tx(tm1),"Fade",0) call SetHandle(H2Tx(tm1),"caster",caster) call TimerStart(tm1,.01,true,function Burst_Tackle_FadeIn) call PolledWait(1) call PauseTimer(tm1) set tLoc=GetUnitLoc(target) set cLoc=GetUnitLoc(caster) call SetUnitPositionLocFacingLocBJ(caster,PolarProjectionBJ(tLoc,80.,AngleBetweenPoints(tLoc,cLoc)),tLoc) call SetHandle(H2Tx(gg_trg_Burst_Tackle),"Caster",caster) call SetHandle(H2Tx(gg_trg_Burst_Tackle),"Target",target) call ExecuteFunc("BashSetting") call SetUnitAnimation(caster,"attack") call IssueTargetOrderById(caster,OrderId("attack"),target) call TriggerRegisterUnitEvent(tr,target,EVENT_UNIT_DAMAGED) call TriggerAddAction(tr,function Burst_Tackle_Damage) call SetHandle(H2Tx(tr),"caster",caster) call SetInteger(H2Tx(tm2),"Fade",100) call SetHandle(H2Tx(tm2),"caster",caster) call TimerStart(tm2,.01,true,function Burst_Tackle_FadeOff) call PolledWait(1) call PauseTimer(tm2) call SetUnitVertexColorBJ(caster,100,100,100,0) call UnitShareVision(target,GetOwningPlayer(caster),false) call PolledWait(.01) call DestroyTimer(tm1) call DestroyTimer(tm2) call RemoveLocation(tLoc) call RemoveLocation(cLoc) endfunction function InitTrig_Burst_Tackle takes nothing returns nothing set gg_trg_Burst_Tackle = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ(gg_trg_Burst_Tackle,EVENT_PLAYER_UNIT_SPELL_EFFECT) call TriggerAddCondition(gg_trg_Burst_Tackle,Condition(function Burst_Tackle_Spell)) call TriggerAddAction(gg_trg_Burst_Tackle,function Burst_Tackle_Setting) endfunction//=========================================================================== // Trigger: Arm Brack //=========================================================================== function Trig_Arm_Brack_Conditions takes nothing returns boolean return GetSpellAbilityId() == 'A0GF' endfunction function Trig_Arm_Brack_Actions takes nothing returns nothing local location lnG=GetUnitLoc(GetTriggerUnit()) local unit dummy=CreateDummy(GetOwningPlayer(GetTriggerUnit()),lnG,1,'A0GG',GetUnitAbilityLevel(GetTriggerUnit(),'A0GF')) call IssuePointOrderLoc( dummy, "silence", GetSpellTargetLoc() ) endfunction function InitTrig_Arm_Brack takes nothing returns nothing set gg_trg_Arm_Brack = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Arm_Brack, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Arm_Brack, Condition( function Trig_Arm_Brack_Conditions ) ) call TriggerAddAction( gg_trg_Arm_Brack, function Trig_Arm_Brack_Actions ) endfunction//=========================================================================== // Trigger: Blur //=========================================================================== //TESH.scrollpos=0 //TESH.alwaysfold=0 scope Blur globals private real blur private unit caster endglobals private function Trig_Blur_Conditions takes nothing returns boolean if ( not ( GetSpellAbilityId() == 'A0GK' ) ) then return false endif return true endfunction private function Blur_Main takes nothing returns nothing local real MaxC = GetUnitAbilityLevel(caster,'A0GK') * 25 local real MinC = ( GetUnitAbilityLevel(caster,'A0GK') - 1 ) * 25 set blur = GetRandomReal(MinC,MaxC) call DisplayTextToForce( GetPlayersAll(), GetUnitName(caster) ) call SetUnitVertexColorBJ(caster,100,100,100,blur) endfunction private function Trig_Blur_Actions takes nothing returns nothing local timer tm if ( GetUnitAbilityLevel(GetTrainedUnit(),'A0GK') == 1 ) then set caster = GetTrainedUnit() set tm = CreateTimer() call TimerStart(tm,0.2,true,function Blur_Main) endif endfunction function InitTrig_Blur takes nothing returns nothing set gg_trg_Blur = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Blur, EVENT_PLAYER_HERO_SKILL ) call TriggerAddCondition( gg_trg_Blur, Condition( function Trig_Blur_Conditions ) ) call TriggerAddAction( gg_trg_Blur, function Trig_Blur_Actions ) endfunction endscope//=========================================================================== function InitCustomTriggers takes nothing returns nothing call InitTrig_MoveSpeed( ) call InitTrig_TestMode( ) call InitTrig_Gold( ) call InitTrig_lvlup( ) call InitTrig_wtf( ) call InitTrig_wtf_Skill( ) call InitTrig_testStart( ) call InitTrig_ReHero( ) call InitTrig_HeroRecall( ) call InitTrig_HeroRevival( ) call InitTrig_Day_and_night( ) call InitTrig_PlayerTimeOut( ) call InitTrig_Hero_Setup( ) call InitTrig_AutoRevival( ) call InitTrig_AutoRevivalTimeOut2( ) call InitTrig_AutoRevivalTimeOut3( ) call InitTrig_AutoRevivalTimeOut4( ) call InitTrig_AutoRevivalTimeOut5( ) call InitTrig_AutoRevivalTimeOut6( ) call InitTrig_AutoRevivalTimeOut8( ) call InitTrig_AutoRevivalTimeOut9( ) call InitTrig_AutoRevivalTimeOut10( ) call InitTrig_AutoRevivalTimeOut11( ) call InitTrig_AutoRevivalTimeOut12( ) call InitTrig_KillJudge( ) call InitTrig_SetNeutralCreeps( ) call InitTrig_NeutralCreep_StartUp( ) call InitTrig_CreepDeny( ) call InitTrig_DenyFlag( ) call InitTrig_LvUP_Creep( ) call InitTrig_DeadCount( ) call InitTrig_Player1_Kill( ) call InitTrig_Player2_Kill( ) call InitTrig_Player3_Kill( ) call InitTrig_Player4_Kill( ) call InitTrig_Player5_Kill( ) call InitTrig_Player6_Kill( ) call InitTrig_Player7_Kill( ) call InitTrig_Player8_Kill( ) call InitTrig_Player9_Kill( ) call InitTrig_Player10_Kill( ) call InitTrig_HeroKill_Creep( ) call InitTrig_Charges_Connection( ) call InitTrig_Undroppable_Cooldowns( ) call InitTrig_Reset_Droppable_Status( ) call InitTrig_Try_Apply_Reciepe( ) call InitTrig_Specific_Reciepes( ) call InitTrig_SetUpReciepes( ) call InitTrig_Rune( ) call InitTrig_RuneTimeout( ) call InitTrig_Bottle_Control( ) call InitTrig_Bottle_Control2( ) call InitTrig_Bottle_in_Rune( ) call InitTrig_Cranium_Basher_Flag( ) call InitTrig_Eye_of_Skadi_Flag( ) call InitTrig_Refresher_Orb( ) call InitTrig_Aghanims_Scepter( ) call InitTrig_Power_Treads( ) call InitTrig_Orchid_Malevolence( ) call InitTrig_Shivas_Guard( ) call InitTrig_Armlet_of_Mordiggian( ) call InitTrig_Item_Skill_Support( ) call InitTrig_Item_Skill_Support_Drop( ) call InitTrig_Flying_Courier1( ) call InitTrig_Flying_Courier2( ) call InitTrig_Animal_Style_Change( ) call InitTrig_Lightning_Orb( ) call InitTrig_Speso( ) call InitTrig_Ring_of_Basilius( ) call InitTrig_Animal_Courier( ) call InitTrig_Bo( ) call InitTrig_Sudden_death( ) call InitTrig_WorldTimer( ) call InitTrig_Afforestation( ) call InitTrig_Periodical_Income( ) call InitTrig_StartUp( ) call InitTrig_StartUpx( ) call InitTrig_StartUp2( ) call InitTrig_StartUp3( ) call InitTrig_StartUp4( ) call InitTrig_LH_Deny_Counter( ) call InitTrig_GameStart( ) call InitTrig_CreepInterval( ) call InitTrig_CreepTurnabout( ) call InitTrig_SiegeCleep( ) call InitTrig_Siege2( ) call InitTrig_TowerAI( ) call InitTrig_CleepAI( ) call InitTrig_TowerBonus( ) call InitTrig_TowerCollapse1st( ) call InitTrig_TowerCollapse2nd( ) call InitTrig_TowerCollapse3rd( ) call InitTrig_TowerCollapseLast( ) call InitTrig_RAX_Collapse( ) call InitTrig_RAX_All_Collapse_SE( ) call InitTrig_RAX_All_Collapse_SC( ) call InitTrig_Win( ) call InitTrig_Poison_Territory( ) call InitTrig_Bakuniku( ) call InitTrig_BakunikuGet( ) call InitTrig_Muscle_Attack( ) call InitTrig_Muscle_Revolution( ) call InitTrig_YARANAIKA( ) call InitTrig_The_law_of_the_jungle( ) call InitTrig_Velg_Avestar( ) call InitTrig_Velg_Avestar_Startup( ) call InitTrig_Avenger( ) call InitTrig_Avenger_Dead( ) call InitTrig_NightmareStyle( ) call InitTrig_Ghost_Form( ) call InitTrig_SpiritShock( ) call InitTrig_Blizzard( ) call InitTrig_Swords_of_Revealing_Light( ) call InitTrig_Like_the_gale( ) call InitTrig_Divine_Shield( ) call InitTrig_Redemption_Aura( ) call InitTrig_Void( ) call InitTrig_Crippling_Fear( ) call InitTrig_Hunter_in_the_Night( ) call InitTrig_Justice_Judgment( ) call InitTrig_Blink_Strike( ) call InitTrig_Mana_Burst( ) call InitTrig_Mana_Burst_X( ) call InitTrig_Mind_Revolution( ) call InitTrig_Mana_Flare( ) call InitTrig_oyabun( ) call InitTrig_Triple_Wave( ) call InitTrig_Wild_Shot( ) call InitTrig_Destructive_Shot( ) call InitTrig_Explosion_Impale( ) call InitTrig_Dislike_Stampede( ) call InitTrig_wanwan( ) call InitTrig_Firewall( ) call InitTrig_Burning_Shot( ) call InitTrig_Aurora_Cannon( ) call InitTrig_DeLay_Flare( ) call InitTrig_Fire_Bolt( ) call InitTrig_Ice_Bolt( ) call InitTrig_Lightning_Bolt( ) call InitTrig_Elemental_Cast_Get( ) call InitTrig_Elemental_Cast( ) call InitTrig_Width_Doom( ) call InitTrig_Chaos_Meteor( ) call InitTrig_Legend_Weapon( ) call InitTrig_Battle_Order( ) call InitTrig_Land_Groan( ) call InitTrig_Moon_Glaive( ) call InitTrig_Eclipse( ) call InitTrig_Spectral_Dagger( ) call InitTrig_Desolate( ) call InitTrig_Dispersion( ) call InitTrig_Haunt( ) call InitTrig_Reality( ) call InitTrig_Footmans_Sommon( ) call InitTrig_Footmans_Pop( ) call InitTrig_Footmans_Skill( ) call InitTrig_Footmans_Revival( ) call InitTrig_Footmans_Dead( ) call InitTrig_Footmans_Item( ) call InitTrig_Footmans_Item_Get( ) call InitTrig_Footmans_Exp( ) call InitTrig_Darkness_Shot( ) call InitTrig_Genocide_Bash( ) call InitTrig_Chaos_Panic( ) call InitTrig_Volcano( ) call InitTrig_Graveyard_of_Tragedy( ) call InitTrig_Graveyard_of_Tragedy2( ) call InitTrig_Deth_Explosion( ) call InitTrig_Collapsing_Soul( ) call InitTrig_Entangling_Roots( ) call InitTrig_Heaven_Punisher( ) call InitTrig_Over_Frost( ) call InitTrig_Absolute( ) call InitTrig_Revitalization( ) call InitTrig_Backstab( ) call InitTrig_Nether_Drain( ) call InitTrig_Decrepify( ) call InitTrig_DecrepifySlow( ) call InitTrig_Wild_Axes( ) call InitTrig_Axe_Storm( ) call InitTrig_Observer_Trap( ) call InitTrig_Sniper( ) call InitTrig_Lockon( ) call InitTrig_Venom_Splash( ) call InitTrig_Devour( ) call InitTrig_Thunder_Storm( ) call InitTrig_Judgment( ) call InitTrig_God_Pursuit( ) call InitTrig_Shadow_Inducement( ) call InitTrig_Shadow_Inducement_Get( ) call InitTrig_Conduction( ) call InitTrig_Void_Darkness( ) call InitTrig_Cerberus_Aura( ) call InitTrig_Gate_of_Tartaros( ) call InitTrig_Fire( ) call InitTrig_Self( ) call InitTrig_Dead( ) call InitTrig_Icon( ) call InitTrig_Shadow_Slash( ) call InitTrig_Geyser( ) call InitTrig_Water_Barrier( ) call InitTrig_Waveform( ) call InitTrig_Atlantis( ) call InitTrig_Breath_of_Terror( ) call InitTrig_Charge_of_Darkness( ) call InitTrig_Fire_Storm( ) call InitTrig_Frost_Buster( ) call InitTrig_purge( ) call InitTrig_trap_Hero( ) call InitTrig_trap_Creep( ) call InitTrig_Vengence( ) call InitTrig_Leap_Attack( ) call InitTrig_Endurance( ) call InitTrig_Vampire_Groan( ) call InitTrig_Amateras( ) call InitTrig_Meigoku( ) call InitTrig_Overload( ) call InitTrig_Accelerate( ) call InitTrig_Absolute_Observance( ) call InitTrig_Marionette_Control( ) call InitTrig_Recall( ) call InitTrig_Boost_of_Marionette( ) call InitTrig_Lex_Aeterna( ) call InitTrig_Kyrie_Eleison( ) call InitTrig_Fissure( ) call InitTrig_Echo_Slam( ) call InitTrig_Burst_Tackle_Back( ) call InitTrig_Burst_Tackle( ) call InitTrig_Arm_Brack( ) call InitTrig_Blur( ) endfunction //=========================================================================== function RunInitializationTriggers takes nothing returns nothing call ConditionalTriggerExecute( gg_trg_StartUp ) endfunction //*************************************************************************** //* //* Players //* //*************************************************************************** function InitCustomPlayerSlots takes nothing returns nothing // Player 1 call SetPlayerStartLocation( Player(1), 0 ) call ForcePlayerStartLocation( Player(1), 0 ) call SetPlayerColor( Player(1), ConvertPlayerColor(1) ) call SetPlayerRacePreference( Player(1), RACE_PREF_NIGHTELF ) call SetPlayerRaceSelectable( Player(1), false ) call SetPlayerController( Player(1), MAP_CONTROL_USER ) // Player 2 call SetPlayerStartLocation( Player(2), 1 ) call ForcePlayerStartLocation( Player(2), 1 ) call SetPlayerColor( Player(2), ConvertPlayerColor(2) ) call SetPlayerRacePreference( Player(2), RACE_PREF_NIGHTELF ) call SetPlayerRaceSelectable( Player(2), false ) call SetPlayerController( Player(2), MAP_CONTROL_USER ) // Player 3 call SetPlayerStartLocation( Player(3), 2 ) call ForcePlayerStartLocation( Player(3), 2 ) call SetPlayerColor( Player(3), ConvertPlayerColor(3) ) call SetPlayerRacePreference( Player(3), RACE_PREF_NIGHTELF ) call SetPlayerRaceSelectable( Player(3), false ) call SetPlayerController( Player(3), MAP_CONTROL_USER ) // Player 4 call SetPlayerStartLocation( Player(4), 3 ) call ForcePlayerStartLocation( Player(4), 3 ) call SetPlayerColor( Player(4), ConvertPlayerColor(4) ) call SetPlayerRacePreference( Player(4), RACE_PREF_NIGHTELF ) call SetPlayerRaceSelectable( Player(4), false ) call SetPlayerController( Player(4), MAP_CONTROL_USER ) // Player 5 call SetPlayerStartLocation( Player(5), 4 ) call ForcePlayerStartLocation( Player(5), 4 ) call SetPlayerColor( Player(5), ConvertPlayerColor(5) ) call SetPlayerRacePreference( Player(5), RACE_PREF_NIGHTELF ) call SetPlayerRaceSelectable( Player(5), false ) call SetPlayerController( Player(5), MAP_CONTROL_USER ) // Player 7 call SetPlayerStartLocation( Player(7), 5 ) call ForcePlayerStartLocation( Player(7), 5 ) call SetPlayerColor( Player(7), ConvertPlayerColor(7) ) call SetPlayerRacePreference( Player(7), RACE_PREF_UNDEAD ) call SetPlayerRaceSelectable( Player(7), false ) call SetPlayerController( Player(7), MAP_CONTROL_USER ) // Player 8 call SetPlayerStartLocation( Player(8), 6 ) call ForcePlayerStartLocation( Player(8), 6 ) call SetPlayerColor( Player(8), ConvertPlayerColor(8) ) call SetPlayerRacePreference( Player(8), RACE_PREF_UNDEAD ) call SetPlayerRaceSelectable( Player(8), false ) call SetPlayerController( Player(8), MAP_CONTROL_USER ) // Player 9 call SetPlayerStartLocation( Player(9), 7 ) call ForcePlayerStartLocation( Player(9), 7 ) call SetPlayerColor( Player(9), ConvertPlayerColor(9) ) call SetPlayerRacePreference( Player(9), RACE_PREF_UNDEAD ) call SetPlayerRaceSelectable( Player(9), false ) call SetPlayerController( Player(9), MAP_CONTROL_USER ) // Player 10 call SetPlayerStartLocation( Player(10), 8 ) call ForcePlayerStartLocation( Player(10), 8 ) call SetPlayerColor( Player(10), ConvertPlayerColor(10) ) call SetPlayerRacePreference( Player(10), RACE_PREF_UNDEAD ) call SetPlayerRaceSelectable( Player(10), false ) call SetPlayerController( Player(10), MAP_CONTROL_USER ) // Player 11 call SetPlayerStartLocation( Player(11), 9 ) call ForcePlayerStartLocation( Player(11), 9 ) call SetPlayerColor( Player(11), ConvertPlayerColor(11) ) call SetPlayerRacePreference( Player(11), RACE_PREF_UNDEAD ) call SetPlayerRaceSelectable( Player(11), false ) call SetPlayerController( Player(11), MAP_CONTROL_USER ) endfunction function InitCustomTeams takes nothing returns nothing // Force: TRIGSTR_120 call SetPlayerTeam( Player(1), 0 ) call SetPlayerTeam( Player(2), 0 ) call SetPlayerTeam( Player(3), 0 ) call SetPlayerTeam( Player(4), 0 ) call SetPlayerTeam( Player(5), 0 ) // Allied call SetPlayerAllianceStateAllyBJ( Player(1), Player(2), true ) call SetPlayerAllianceStateAllyBJ( Player(1), Player(3), true ) call SetPlayerAllianceStateAllyBJ( Player(1), Player(4), true ) call SetPlayerAllianceStateAllyBJ( Player(1), Player(5), true ) call SetPlayerAllianceStateAllyBJ( Player(2), Player(1), true ) call SetPlayerAllianceStateAllyBJ( Player(2), Player(3), true ) call SetPlayerAllianceStateAllyBJ( Player(2), Player(4), true ) call SetPlayerAllianceStateAllyBJ( Player(2), Player(5), true ) call SetPlayerAllianceStateAllyBJ( Player(3), Player(1), true ) call SetPlayerAllianceStateAllyBJ( Player(3), Player(2), true ) call SetPlayerAllianceStateAllyBJ( Player(3), Player(4), true ) call SetPlayerAllianceStateAllyBJ( Player(3), Player(5), true ) call SetPlayerAllianceStateAllyBJ( Player(4), Player(1), true ) call SetPlayerAllianceStateAllyBJ( Player(4), Player(2), true ) call SetPlayerAllianceStateAllyBJ( Player(4), Player(3), true ) call SetPlayerAllianceStateAllyBJ( Player(4), Player(5), true ) call SetPlayerAllianceStateAllyBJ( Player(5), Player(1), true ) call SetPlayerAllianceStateAllyBJ( Player(5), Player(2), true ) call SetPlayerAllianceStateAllyBJ( Player(5), Player(3), true ) call SetPlayerAllianceStateAllyBJ( Player(5), Player(4), true ) // Shared Vision call SetPlayerAllianceStateVisionBJ( Player(1), Player(2), true ) call SetPlayerAllianceStateVisionBJ( Player(1), Player(3), true ) call SetPlayerAllianceStateVisionBJ( Player(1), Player(4), true ) call SetPlayerAllianceStateVisionBJ( Player(1), Player(5), true ) call SetPlayerAllianceStateVisionBJ( Player(2), Player(1), true ) call SetPlayerAllianceStateVisionBJ( Player(2), Player(3), true ) call SetPlayerAllianceStateVisionBJ( Player(2), Player(4), true ) call SetPlayerAllianceStateVisionBJ( Player(2), Player(5), true ) call SetPlayerAllianceStateVisionBJ( Player(3), Player(1), true ) call SetPlayerAllianceStateVisionBJ( Player(3), Player(2), true ) call SetPlayerAllianceStateVisionBJ( Player(3), Player(4), true ) call SetPlayerAllianceStateVisionBJ( Player(3), Player(5), true ) call SetPlayerAllianceStateVisionBJ( Player(4), Player(1), true ) call SetPlayerAllianceStateVisionBJ( Player(4), Player(2), true ) call SetPlayerAllianceStateVisionBJ( Player(4), Player(3), true ) call SetPlayerAllianceStateVisionBJ( Player(4), Player(5), true ) call SetPlayerAllianceStateVisionBJ( Player(5), Player(1), true ) call SetPlayerAllianceStateVisionBJ( Player(5), Player(2), true ) call SetPlayerAllianceStateVisionBJ( Player(5), Player(3), true ) call SetPlayerAllianceStateVisionBJ( Player(5), Player(4), true ) // Force: TRIGSTR_121 call SetPlayerTeam( Player(7), 1 ) call SetPlayerTeam( Player(8), 1 ) call SetPlayerTeam( Player(9), 1 ) call SetPlayerTeam( Player(10), 1 ) call SetPlayerTeam( Player(11), 1 ) // Allied call SetPlayerAllianceStateAllyBJ( Player(7), Player(8), true ) call SetPlayerAllianceStateAllyBJ( Player(7), Player(9), true ) call SetPlayerAllianceStateAllyBJ( Player(7), Player(10), true ) call SetPlayerAllianceStateAllyBJ( Player(7), Player(11), true ) call SetPlayerAllianceStateAllyBJ( Player(8), Player(7), true ) call SetPlayerAllianceStateAllyBJ( Player(8), Player(9), true ) call SetPlayerAllianceStateAllyBJ( Player(8), Player(10), true ) call SetPlayerAllianceStateAllyBJ( Player(8), Player(11), true ) call SetPlayerAllianceStateAllyBJ( Player(9), Player(7), true ) call SetPlayerAllianceStateAllyBJ( Player(9), Player(8), true ) call SetPlayerAllianceStateAllyBJ( Player(9), Player(10), true ) call SetPlayerAllianceStateAllyBJ( Player(9), Player(11), true ) call SetPlayerAllianceStateAllyBJ( Player(10), Player(7), true ) call SetPlayerAllianceStateAllyBJ( Player(10), Player(8), true ) call SetPlayerAllianceStateAllyBJ( Player(10), Player(9), true ) call SetPlayerAllianceStateAllyBJ( Player(10), Player(11), true ) call SetPlayerAllianceStateAllyBJ( Player(11), Player(7), true ) call SetPlayerAllianceStateAllyBJ( Player(11), Player(8), true ) call SetPlayerAllianceStateAllyBJ( Player(11), Player(9), true ) call SetPlayerAllianceStateAllyBJ( Player(11), Player(10), true ) // Shared Vision call SetPlayerAllianceStateVisionBJ( Player(7), Player(8), true ) call SetPlayerAllianceStateVisionBJ( Player(7), Player(9), true ) call SetPlayerAllianceStateVisionBJ( Player(7), Player(10), true ) call SetPlayerAllianceStateVisionBJ( Player(7), Player(11), true ) call SetPlayerAllianceStateVisionBJ( Player(8), Player(7), true ) call SetPlayerAllianceStateVisionBJ( Player(8), Player(9), true ) call SetPlayerAllianceStateVisionBJ( Player(8), Player(10), true ) call SetPlayerAllianceStateVisionBJ( Player(8), Player(11), true ) call SetPlayerAllianceStateVisionBJ( Player(9), Player(7), true ) call SetPlayerAllianceStateVisionBJ( Player(9), Player(8), true ) call SetPlayerAllianceStateVisionBJ( Player(9), Player(10), true ) call SetPlayerAllianceStateVisionBJ( Player(9), Player(11), true ) call SetPlayerAllianceStateVisionBJ( Player(10), Player(7), true ) call SetPlayerAllianceStateVisionBJ( Player(10), Player(8), true ) call SetPlayerAllianceStateVisionBJ( Player(10), Player(9), true ) call SetPlayerAllianceStateVisionBJ( Player(10), Player(11), true ) call SetPlayerAllianceStateVisionBJ( Player(11), Player(7), true ) call SetPlayerAllianceStateVisionBJ( Player(11), Player(8), true ) call SetPlayerAllianceStateVisionBJ( Player(11), Player(9), true ) call SetPlayerAllianceStateVisionBJ( Player(11), Player(10), true ) endfunction function InitAllyPriorities takes nothing returns nothing call SetStartLocPrioCount( 0, 4 ) call SetStartLocPrio( 0, 0, 1, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 0, 1, 2, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 0, 2, 3, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 0, 3, 4, MAP_LOC_PRIO_HIGH ) call SetStartLocPrioCount( 1, 4 ) call SetStartLocPrio( 1, 0, 0, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 1, 1, 2, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 1, 2, 3, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 1, 3, 4, MAP_LOC_PRIO_HIGH ) call SetStartLocPrioCount( 2, 4 ) call SetStartLocPrio( 2, 0, 0, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 2, 1, 1, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 2, 2, 3, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 2, 3, 4, MAP_LOC_PRIO_HIGH ) call SetStartLocPrioCount( 3, 4 ) call SetStartLocPrio( 3, 0, 0, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 3, 1, 1, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 3, 2, 2, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 3, 3, 4, MAP_LOC_PRIO_HIGH ) call SetStartLocPrioCount( 4, 4 ) call SetStartLocPrio( 4, 0, 0, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 4, 1, 1, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 4, 2, 2, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 4, 3, 3, MAP_LOC_PRIO_HIGH ) call SetStartLocPrioCount( 5, 4 ) call SetStartLocPrio( 5, 0, 6, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 5, 1, 7, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 5, 2, 8, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 5, 3, 9, MAP_LOC_PRIO_HIGH ) call SetStartLocPrioCount( 6, 4 ) call SetStartLocPrio( 6, 0, 5, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 6, 1, 7, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 6, 2, 8, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 6, 3, 9, MAP_LOC_PRIO_HIGH ) call SetStartLocPrioCount( 7, 4 ) call SetStartLocPrio( 7, 0, 5, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 7, 1, 6, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 7, 2, 8, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 7, 3, 9, MAP_LOC_PRIO_HIGH ) call SetStartLocPrioCount( 8, 4 ) call SetStartLocPrio( 8, 0, 5, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 8, 1, 6, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 8, 2, 7, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 8, 3, 9, MAP_LOC_PRIO_HIGH ) call SetStartLocPrioCount( 9, 4 ) call SetStartLocPrio( 9, 0, 5, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 9, 1, 6, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 9, 2, 7, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 9, 3, 8, MAP_LOC_PRIO_HIGH ) endfunction //*************************************************************************** //* //* Main Initialization //* //*************************************************************************** //=========================================================================== function main takes nothing returns nothing call SetCameraBounds( -7424.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), -7680.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 7424.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 7168.0 - GetCameraMargin(CAMERA_MARGIN_TOP), -7424.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 7168.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 7424.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), -7680.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) ) call SetDayNightModels( "Environment\\DNC\\DNCAshenvale\\DNCAshenvaleTerrain\\DNCAshenvaleTerrain.mdl", "Environment\\DNC\\DNCAshenvale\\DNCAshenvaleUnit\\DNCAshenvaleUnit.mdl" ) call SetWaterBaseColor( 100, 100, 200, 255 ) call NewSoundEnvironment( "Default" ) call SetAmbientDaySound( "AshenvaleDay" ) call SetAmbientNightSound( "AshenvaleNight" ) call SetMapMusic( "Music", true, 0 ) call InitSounds( ) call CreateRegions( ) call CreateAllUnits( ) call InitBlizzard( ) call InitGlobals( ) call InitCustomTriggers( ) call RunInitializationTriggers( ) endfunction //*************************************************************************** //* //* Map Configuration //* //*************************************************************************** function config takes nothing returns nothing call SetMapName( "TRIGSTR_000" ) call SetMapDescription( "" ) call SetPlayers( 10 ) call SetTeams( 10 ) call SetGamePlacement( MAP_PLACEMENT_TEAMS_TOGETHER ) call DefineStartLocation( 0, -6272.0, -6848.0 ) call DefineStartLocation( 1, -6272.0, -6848.0 ) call DefineStartLocation( 2, -6272.0, -6848.0 ) call DefineStartLocation( 3, -6272.0, -6848.0 ) call DefineStartLocation( 4, -6272.0, -6848.0 ) call DefineStartLocation( 5, 6080.0, 6400.0 ) call DefineStartLocation( 6, 6080.0, 6400.0 ) call DefineStartLocation( 7, 6080.0, 6400.0 ) call DefineStartLocation( 8, 6080.0, 6400.0 ) call DefineStartLocation( 9, 6080.0, 6400.0 ) // Player setup call InitCustomPlayerSlots( ) call InitCustomTeams( ) call InitAllyPriorities( ) endfunction