function SpellBossCheck takes unit u returns boolean
if ( GetUnitAbilityLevel(u, 'BOhx') >= 1 ) then
return false
endif
if ( GetUnitAbilityLevel(u, 'B00P') >= 1 ) then
return false
endif
if ( GetUnitAbilityLevel(u, 'BEer') >= 1 ) then
return false
endif
if ( GetUnitAbilityLevel(u, 'Bcyc') >= 1 ) then
return false
endif
if ( GetUnitAbilityLevel(u, 'Bcy2') >= 1 ) then
return false
endif
if ( GetUnitAbilityLevel(u, 'B003') >= 1 ) then
return false
endif
if ( GetUnitAbilityLevel(u, 'BSTN') >= 1 ) then
return false
endif
if ( GetUnitAbilityLevel(u, 'BPSE') >= 1 ) then
return false
endif
if ( GetUnitAbilityLevel(u, 'B008') >= 1 ) then
return false
endif
if ( GetUnitAbilityLevel(u, 'B00M') >= 1 ) then
return false
endif
if ( GetUnitAbilityLevel(u, 'B009') >= 1 ) then
return false
endif
if ( GetUnitAbilityLevel(u, 'BUim') >= 1 ) then
return false
endif
if (udg_Medusa == true) then
return false
endif
if (udg_Stopper == true) then
return false
endif
return true
endfunction
Name | Type | is_array | initial_value |
BersTalent1 | boolean | No | false |
BerTrig | trigger | No | |
BombCaster | unit | No | |
BossLogic | boolean | No | false |
Boulder | unit | No | |
BoulderLoc | location | Yes | |
BoulderLogic | integer | No | |
CastelStop | boolean | No | false |
CastleBoss | unit | No | |
CastleGroup | group | No | |
CastleLogic | boolean | No | |
CaveBoss | unit | No | |
ChiefTalent1 | boolean | No | false |
Cooldawn | real | Yes | |
CritDamage | real | Yes | 2.00 |
CritHit | integer | Yes | |
DeadReady | boolean | No | false |
DeathBoss | unit | No | |
DeathN | integer | No | |
DeathTalent1 | boolean | No | false |
DemonTalent1 | boolean | No | false |
DemTrigger | trigger | No | |
DragonA | integer | No | |
DruGroup | group | No | |
DruidTalent1 | boolean | No | false |
DruNumber | integer | No | |
DruPoint | location | No | |
Elevator | boolean | No | false |
EntDist | real | No | |
Evasion | integer | Yes | |
FireTalent1 | boolean | No | false |
Firetrap | unit | Yes | |
Fish | unit | No | |
FishTalent1 | boolean | No | false |
FishTrigger | trigger | No | |
ForestArmor | integer | No | 0 |
ForestAttack | integer | No | 0 |
ForestBoss | unit | No | |
ForestCrit | integer | No | 0 |
ForestHP | integer | No | 0 |
ForestLoc | location | No | |
ForestN | integer | No | |
ForestPot | integer | No | |
ForestResist | integer | No | |
ForestRune | integer | No | |
Fruit | integer | No | |
GraveFactor | integer | No | 1 |
GraveN | integer | No | |
GraveTimer | timer | No | |
Hero1 | unit | No | |
Hero2 | unit | No | |
Hero3 | unit | No | |
Hero4 | unit | No | |
HeroNumber1 | integer | No | 1 |
HeroNumber2 | integer | No | 1 |
HeroNumber3 | integer | No | 1 |
HeroNumber4 | integer | No | 1 |
IceTalent1 | boolean | No | false |
IslandA | integer | No | |
IslandBoss | unit | No | |
IslandN | integer | No | |
IslandReady | boolean | No | |
ItemBallH | unit | No | |
ItemBallL | lightning | No | |
ItemBallN | integer | No | |
ItemBallT | trigger | No | |
ItemBallU | unit | No | |
ItemHero | unit | No | |
JuraBoss | unit | No | |
JuraLogic | boolean | No | false |
JuraN | integer | No | 0 |
JuraRex | integer | No | 0 |
KtuGroup | group | No | |
KtuR | integer | No | |
Light | unit | No | |
Light2 | unit | No | |
LightEffect | lightning | No | |
LightLoc | location | Yes | |
LightLoc2 | location | Yes | |
LightLogic | integer | No | |
LightLogic2 | integer | No | |
MapN | integer | No | |
MaxLevel | integer | No | 3 |
MedTalent1 | boolean | No | false |
Medusa | boolean | No | false |
MineEffect | effect | No | |
MineGroup | group | No | |
MineNumber | integer | No | |
MinePoint | location | No | |
MineR | integer | No | |
MonDam | real | No | |
MonkTalent1 | boolean | No | false |
MonTrigger | trigger | No | |
NecrTalent1 | boolean | No | false |
Orange | unit | Yes | |
PalDamage | real | No | |
PalEffect | effect | No | |
Palm | destructable | Yes | |
PalTalent1 | boolean | No | false |
PalTrig | trigger | No | |
PiratTalent1 | boolean | No | false |
PirLoc | location | No | |
PirLoc2 | location | No | |
PirShip | unit | No | |
PitTalent1 | boolean | No | false |
Player1 | boolean | No | |
Player2 | boolean | No | |
Player3 | boolean | No | |
Player4 | boolean | No | |
PlayerFactor | integer | No | 0 |
Power | integer | Yes | |
Random | integer | No | |
Ready | boolean | No | false |
Resist | integer | Yes | |
RifDamage | real | No | |
RifGroup | group | No | |
RifleTalent1 | boolean | No | false |
RifNumber | integer | No | |
RifPoint | location | No | |
RifTrigger | trigger | No | |
RoboGroup | group | No | |
RoboLoc | location | No | |
RoboN | integer | No | |
RobotTalent1 | boolean | No | false |
SacText | string | No | |
SandGroup | group | No | |
SandLoc | location | No | |
SandN | real | No | |
Score1 | integer | No | |
Score2 | integer | No | |
Score3 | integer | No | |
Score4 | integer | No | |
ScorpTalent1 | boolean | No | false |
Seafruit | integer | Yes | |
SeaTalent1 | boolean | No | false |
Secret | integer | No | 0 |
SecretB | boolean | No | false |
ShadTalent1 | boolean | No | false |
ShamTalent1 | boolean | No | false |
ShaN | integer | No | |
SiegeGroup | group | No | |
SiegeTalent1 | boolean | No | false |
SpaceBoss | unit | No | |
SpaceLogic | boolean | No | false |
SpaceM | integer | No | |
StarDamage | real | No | |
StarLoc | location | No | |
StarPoint | integer | No | |
StarTalent1 | boolean | No | false |
StartReady | integer | No | |
Stopper | boolean | No | false |
STR | string | No | |
STR1 | string | No | |
STR2 | string | No | |
STR3 | string | No | |
STR4 | string | No | |
SunAngle | real | No | |
SunDis | real | No | |
Switch | integer | No | |
TeleportPoint | location | No | |
TimeGroup | group | No | |
TimeGroup2 | group | No | |
TimeTalent1 | boolean | No | false |
Tree | destructable | No | |
TreeN | integer | No | |
TW | timerdialog | No | |
WarlDam | real | No | |
WarlGroup | group | No | |
WarlLoc | location | No | |
WarlN | integer | No | |
WarlTalent1 | boolean | No | false |
function Trig_VoidBlock_Actions takes nothing returns nothing
local integer i = GetRandomInt(1, 100)
local effect e
local unit u = GetTriggerUnit()
if (i <= 20) then
call DisableTrigger( GetTriggeringTrigger() )
call BlzSetEventDamage( 0.0 )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\SpellShieldAmulet\\SpellShieldCaster.mdl" , u, "origin")
call DestroyEffect(e)
call EnableTrigger( GetTriggeringTrigger() )
endif
set e = null
set u = null
endfunction
//===========================================================================
function InitTrig_VoidBlock takes nothing returns nothing
set gg_trg_VoidBlock = CreateTrigger( )
call TriggerAddAction( gg_trg_VoidBlock, function Trig_VoidBlock_Actions )
endfunction
function Trig_SpaceAttackers_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'n02F' ) ) then
return false
endif
return true
endfunction
function Trig_SpaceAttackers_Actions takes nothing returns nothing
local unit u = GetAttacker()
local unit u2 = GetTriggerUnit()
call DisableTrigger( GetTriggeringTrigger() )
call IssueTargetOrder(u, "entanglingroots", u2)
call PolledWait( 1.00 )
call IssueTargetOrder(u, "attack", u2)
call PolledWait( 2.00 )
call EnableTrigger( GetTriggeringTrigger() )
set u = null
set u2 = null
endfunction
//===========================================================================
function InitTrig_SpaceAttackers takes nothing returns nothing
set gg_trg_SpaceAttackers = CreateTrigger( )
call DisableTrigger( gg_trg_SpaceAttackers )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SpaceAttackers, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_SpaceAttackers, Condition( function Trig_SpaceAttackers_Conditions ) )
call TriggerAddAction( gg_trg_SpaceAttackers, function Trig_SpaceAttackers_Actions )
endfunction
function Trig_SpaceAttackers2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'n02G' ) ) then
return false
endif
return true
endfunction
function Trig_SpaceAttackers2_Actions takes nothing returns nothing
local unit u = GetAttacker()
local unit u2 = GetTriggerUnit()
local location l = GetUnitLoc(u2)
call DisableTrigger( GetTriggeringTrigger() )
call IssuePointOrderLoc(u, "blizzard", l)
call PolledWait( 1.50 )
call IssueTargetOrder(u, "attack", u2)
call PolledWait( 1.00 )
call EnableTrigger( GetTriggeringTrigger() )
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_SpaceAttackers2 takes nothing returns nothing
set gg_trg_SpaceAttackers2 = CreateTrigger( )
call DisableTrigger( gg_trg_SpaceAttackers2 )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SpaceAttackers2, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_SpaceAttackers2, Condition( function Trig_SpaceAttackers2_Conditions ) )
call TriggerAddAction( gg_trg_SpaceAttackers2, function Trig_SpaceAttackers2_Actions )
endfunction
function Trig_SpaceSpawn_Actions takes nothing returns nothing
local real x
local real y
local integer a = 0
local unit u
local string s
if (udg_SpaceM == 1) then
loop
exitwhen a > 7 + 2*udg_PlayerFactor
set x = GetRandomReal(-2130, 1120)
set y = GetRandomReal(10160, 14000)
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n02E', x, y, GetRandomReal(0, 360))
call TriggerRegisterUnitEvent( gg_trg_VoidBlock, u, EVENT_UNIT_DAMAGED )
set u = null
call PolledWait(0.4)
set a = a + 1
endloop
call EnableTrigger(gg_trg_SpaceCheck)
endif
if (udg_SpaceM == 2) then
loop
exitwhen a > 5 + 2*udg_PlayerFactor
set x = GetRandomReal(-2130, 1120)
set y = GetRandomReal(10160, 14000)
call CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n02F', x, y, GetRandomReal(0, 360))
call PolledWait(0.4)
set a = a + 1
endloop
call EnableTrigger(gg_trg_SpaceCheck)
endif
if (udg_SpaceM == 3) then
loop
exitwhen a > 4 + 1*udg_PlayerFactor
set x = GetRandomReal(-2130, 1120)
set y = GetRandomReal(10160, 14000)
call CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n02G', x, y, GetRandomReal(0, 360))
call PolledWait(0.4)
set a = a + 1
endloop
call EnableTrigger(gg_trg_SpaceCheck)
endif
if (udg_SpaceM == 4) then
call DisableTrigger( gg_trg_SpaceAttackers )
call DisableTrigger( gg_trg_SpaceAttackers2 )
call DisableTrigger( gg_trg_SpaceCheck )
call DisableTrigger( gg_trg_VoidBlock )
call CreateFogModifierRectBJ( true, Player(0), FOG_OF_WAR_VISIBLE, gg_rct_VisionCB2 )
call FogModifierStart( GetLastCreatedFogModifier() )
call CreateFogModifierRectBJ( true, Player(1), FOG_OF_WAR_VISIBLE, gg_rct_VisionCB2 )
call FogModifierStart( GetLastCreatedFogModifier() )
call CreateFogModifierRectBJ( true, Player(2), FOG_OF_WAR_VISIBLE, gg_rct_VisionCB2 )
call FogModifierStart( GetLastCreatedFogModifier() )
call CreateFogModifierRectBJ( true, Player(3), FOG_OF_WAR_VISIBLE, gg_rct_VisionCB2 )
call FogModifierStart( GetLastCreatedFogModifier() )
call DisableTrigger(gg_trg_NeutralPotions)
set udg_SpaceBoss = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n02H', -520, 12000, 270)
set s = "|cffff00ffН|r|cffea00ffе|r|cffd500ffи|r|cffc000ffз|r|cffaa00ffв|r|cff9500ffе|r|cff8000ffс|r|cff6b00ffт|r|cff5500ffн|r|cff4000ffо|r|cff2b00ffс|r|cff1600ffт|r|cff0000ffь|r"
call DisplayTextToForce( GetPlayersAll(), s )
set s = "|cffffff00Способности:|r 'Космический пресс', 'Сквозь пространство и время', 'Астральный барьер', 'Высший разум' и 'Сопротивление магии'"
call DisplayTextToForce( GetPlayersAll(), s )
if (udg_Player1 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero1, GetRandomLocInRect(gg_rct_Boss8), 90 )
call SetCameraTargetControllerNoZForPlayer( Player(0), udg_Hero1, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(0), 0 )
endif
if (udg_Player2 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero2, GetRandomLocInRect(gg_rct_Boss8), 90 )
call SetCameraTargetControllerNoZForPlayer( Player(1), udg_Hero2, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(1), 0 )
endif
if (udg_Player3 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero3, GetRandomLocInRect(gg_rct_Boss8), 90 )
call SetCameraTargetControllerNoZForPlayer( Player(2), udg_Hero3, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(2), 0 )
endif
if (udg_Player4 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero4, GetRandomLocInRect(gg_rct_Boss8), 90 )
call SetCameraTargetControllerNoZForPlayer( Player(3), udg_Hero4, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(3), 0 )
endif
call PauseAllUnitsBJ( true )
call PolledWait(5)
call PauseAllUnitsBJ( false )
call TriggerExecute( gg_trg_SpacePattern )
call EnableTrigger( gg_trg_SpaceLog )
call EnableTrigger( gg_trg_SpaceDier )
call EnableTrigger( gg_trg_Final )
endif
endfunction
//===========================================================================
function InitTrig_SpaceSpawn takes nothing returns nothing
set gg_trg_SpaceSpawn = CreateTrigger( )
call TriggerAddAction( gg_trg_SpaceSpawn, function Trig_SpaceSpawn_Actions )
endfunction
function VoidCon takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (GetOwningPlayer(GetFilterUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE))
return b1 and b2
endfunction
function Trig_SpaceCheck_Actions takes nothing returns nothing
local rect r = Rect(-2130, 10160, 1120, 14000)
local group g = CreateGroup()
local unit u
call GroupEnumUnitsInRect(g, r, Condition(function VoidCon))
set u = FirstOfGroup(g)
if (u == null) then
set udg_SpaceM = udg_SpaceM + 1
call DisableTrigger(gg_trg_SpaceCheck)
call TriggerExecute(gg_trg_SpaceSpawn)
endif
set u = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_SpaceCheck takes nothing returns nothing
set gg_trg_SpaceCheck = CreateTrigger( )
call DisableTrigger(gg_trg_SpaceCheck)
call TriggerRegisterTimerEvent( gg_trg_SpaceCheck, 2.00, true )
call TriggerAddAction( gg_trg_SpaceCheck, function Trig_SpaceCheck_Actions )
endfunction
function VoidCon2 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_SpaceBoss)) == true)
return b1 and b2
endfunction
function Trig_SpaceLog_Actions takes nothing returns nothing
local rect r = Rect(-2130, 10160, 1120, 14000)
local group g = CreateGroup()
local unit u
call GroupEnumUnitsInRect(g, r, Condition(function VoidCon2))
set u = FirstOfGroup(g)
if (u == null) then
set udg_SpaceLogic = false
else
set udg_SpaceLogic = true
endif
set u = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_SpaceLog takes nothing returns nothing
set gg_trg_SpaceLog = CreateTrigger( )
call DisableTrigger( gg_trg_SpaceLog )
call TriggerRegisterTimerEvent( gg_trg_SpaceLog, 1.00, true )
call TriggerAddAction( gg_trg_SpaceLog, function Trig_SpaceLog_Actions )
endfunction
function VoidCon3 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_SpaceBoss)) == true)
return b1 and b2
endfunction
function Trig_SpacePattern_Actions takes nothing returns nothing
local location l = GetUnitLoc(udg_SpaceBoss)
local group g = CreateGroup()
local unit u
local integer i = 0
call PolledWait(2.0)
call GroupEnumUnitsInRangeOfLoc(g, l, 1000, Condition(function VoidCon3))
set u = FirstOfGroup(g)
if (u != null) then
set l = GetUnitLoc(u)
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u019', GetLocationX(l) + 500, GetLocationY(l), 225)
call SetUnitAnimation(u, "Spell")
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u019', GetLocationX(l) - 500, GetLocationY(l), 45)
call SetUnitAnimation(u, "Spell")
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u019', GetLocationX(l), GetLocationY(l) + 500, 315)
call SetUnitAnimation(u, "Spell")
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u019', GetLocationX(l), GetLocationY(l) - 500, 135)
call SetUnitAnimation(u, "Spell")
call PolledWait(5.5)
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u000', GetLocationX(l) + 500, GetLocationY(l), 180)
call UnitAddAbility(u, 'A0AJ')
call IssuePointOrderLoc( u, "carrionswarm", l )
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u000', GetLocationX(l) - 500, GetLocationY(l), 0)
call UnitAddAbility(u, 'A0AJ')
call IssuePointOrderLoc( u, "carrionswarm", l )
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u000', GetLocationX(l), GetLocationY(l) + 500, 270)
call UnitAddAbility(u, 'A0AJ')
call IssuePointOrderLoc( u, "carrionswarm", l )
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u000', GetLocationX(l), GetLocationY(l) - 500, 90)
call UnitAddAbility(u, 'A0AJ')
call IssuePointOrderLoc( u, "carrionswarm", l )
endif
call PolledWait(5)
loop
exitwhen udg_SpaceLogic == true
call PolledWait(0.5)
endloop
call PauseUnit(udg_SpaceBoss, true)
call SetUnitPositionLoc(udg_SpaceBoss, Location(-15000, 10000))
set i = 0
loop
exitwhen i > 12
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u01A', -2370 + 256*i, 14017, 270)
set l = Location(-2370 + 256*i, 11017 )
call IssuePointOrderLoc( u, "move", l )
call PolledWait(0.3)
set i = i + 1
endloop
set i = 0
loop
exitwhen i > 12
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u01A', 1083, 14276 - 256*i, 180)
set l = Location(-2200, 14276 - 256*i )
call IssuePointOrderLoc( u, "move", l )
call PolledWait(0.3)
set i = i + 1
endloop
set i = 0
loop
exitwhen i > 12
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u01A', 1341 - 256*i, 10175, 90)
set l = Location(1341 - 256*i, 14000 )
call IssuePointOrderLoc( u, "move", l )
call PolledWait(0.3)
set i = i + 1
endloop
set i = 0
loop
exitwhen i > 12
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u01A', -2106, 9921 + 256*i, 180)
set l = Location(1300, 9921 + 256*i )
call IssuePointOrderLoc( u, "move", l )
call PolledWait(0.3)
set i = i + 1
endloop
call PauseUnit(udg_SpaceBoss, false)
call SetUnitPositionLoc(udg_SpaceBoss, Location(-520, 12000))
set l = GetUnitLoc(udg_SpaceBoss)
call GroupClear(g)
call GroupEnumUnitsInRangeOfLoc(g, l, 1000, Condition(function VoidCon3))
set u = FirstOfGroup(g)
if (u != null) then
set l = GetUnitLoc(u)
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u019', GetLocationX(l) + 500, GetLocationY(l), 225)
call SetUnitAnimation(u, "Spell")
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u019', GetLocationX(l) - 500, GetLocationY(l), 45)
call SetUnitAnimation(u, "Spell")
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u019', GetLocationX(l), GetLocationY(l) + 500, 315)
call SetUnitAnimation(u, "Spell")
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u019', GetLocationX(l), GetLocationY(l) - 500, 135)
call SetUnitAnimation(u, "Spell")
call PolledWait(5.5)
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u000', GetLocationX(l) + 500, GetLocationY(l), 180)
call UnitAddAbility(u, 'A0AJ')
call IssuePointOrderLoc( u, "carrionswarm", l )
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u000', GetLocationX(l) - 500, GetLocationY(l), 0)
call UnitAddAbility(u, 'A0AJ')
call IssuePointOrderLoc( u, "carrionswarm", l )
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u000', GetLocationX(l), GetLocationY(l) + 500, 270)
call UnitAddAbility(u, 'A0AJ')
call IssuePointOrderLoc( u, "carrionswarm", l )
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u000', GetLocationX(l), GetLocationY(l) - 500, 90)
call UnitAddAbility(u, 'A0AJ')
call IssuePointOrderLoc( u, "carrionswarm", l )
endif
call PolledWait(5)
loop
exitwhen udg_SpaceLogic == true
call PolledWait(0.5)
endloop
set i = 0
loop
exitwhen i > 26
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u01B', -2370 + 128*i, 14017, 270)
set l = Location(-2370 + 128*i, 11017 )
call IssuePointOrderLoc( u, "move", l )
set i = i + 1
endloop
set i = 0
loop
exitwhen i > 26
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u01B', 1083, 14276 - 128*i, 180)
set l = Location(-2200, 14276 - 128*i )
call IssuePointOrderLoc( u, "move", l )
set i = i + 1
endloop
set i = 0
loop
exitwhen i > 26
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u01B', 1341 - 128*i, 10175, 90)
set l = Location(1341 - 128*i, 14000 )
call IssuePointOrderLoc( u, "move", l )
set i = i + 1
endloop
set i = 0
loop
exitwhen i > 26
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u01B', -2106, 9921 + 128*i, 180)
set l = Location(1300, 9921 + 128*i )
call IssuePointOrderLoc( u, "move", l )
set i = i + 1
endloop
call PolledWait(1)
if (GetUnitState(udg_SpaceBoss, UNIT_STATE_LIFE) >= 0.405) then
call TriggerExecute(gg_trg_SpacePattern)
else
call DisableTrigger(gg_trg_SpacePattern)
endif
set u = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_SpacePattern takes nothing returns nothing
set gg_trg_SpacePattern = CreateTrigger( )
call DisableTrigger( gg_trg_SpacePattern )
call TriggerAddAction( gg_trg_SpacePattern, function Trig_SpacePattern_Actions )
endfunction
function Trig_Final_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_SpaceBoss ) ) then
return false
endif
return true
endfunction
function Trig_Final_Actions takes nothing returns nothing
call PolledWait(2)
call DisplayTextToForce( GetPlayersAll(), "Congratulations! You win the game! =)" )
if (udg_Player1 == true) then
call SetUnitPositionLoc(udg_Hero1, Location(-5500, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(0), udg_Hero1, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(0), 0 )
endif
if (udg_Player2 == true) then
call SetUnitPositionLoc(udg_Hero2, Location(-3250, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(1), udg_Hero2, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(1), 0 )
endif
if (udg_Player3 == true) then
call SetUnitPositionLoc(udg_Hero3, Location(-950, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(2), udg_Hero3, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(2), 0 )
endif
if (udg_Player4 == true) then
call SetUnitPositionLoc(udg_Hero4, Location(1330, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(3), udg_Hero4, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(3), 0 )
endif
call PolledWait(5)
call CustomVictoryBJ( Player(0), true, true )
endfunction
//===========================================================================
function InitTrig_Final takes nothing returns nothing
set gg_trg_Final = CreateTrigger( )
call DisableTrigger( gg_trg_Final )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Final, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Final, Condition( function Trig_Final_Conditions ) )
call TriggerAddAction( gg_trg_Final, function Trig_Final_Actions )
endfunction
function Trig_JuraSpawn_Actions takes nothing returns nothing
local unit u
local real dx
local real dy
local integer i = GetRandomInt(1, 100)
local integer ut
local integer a = GetRandomInt(1, 2)
if (a == 1) then
set dx = GetRandomReal(-273, 5726)
set dy = GetRandomReal(-2258, 2258)
else
set dx = GetRandomReal(800, 3666)
set dy = GetRandomReal(-3600, 3000)
endif
if (i <= 22) then
set ut = 'n025'
endif
if ((i >= 23) and (i <= 44)) then
set ut = 'n027'
endif
if ((i >= 45) and (i <= 65)) then
set ut = 'n02A'
endif
if ((i >= 66) and (i <= 77)) then
set ut = 'n026'
endif
if ((i >= 78) and (i <= 89)) then
set ut = 'n028'
endif
if ((i >= 90) and (i <= 94)) then
set ut = 'n029'
endif
if (i >= 95) then
set ut = 'n02C'
endif
if (udg_JuraN <= (10 + 6*udg_PlayerFactor) ) then
set udg_JuraN = udg_JuraN + 1
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), ut, dx, dy, GetRandomReal(0, 360))
endif
set u = null
endfunction
//===========================================================================
function InitTrig_JuraSpawn takes nothing returns nothing
set gg_trg_JuraSpawn = CreateTrigger( )
call DisableTrigger( gg_trg_JuraSpawn )
call TriggerRegisterTimerEvent( gg_trg_JuraSpawn, 2, true )
call TriggerAddAction( gg_trg_JuraSpawn, function Trig_JuraSpawn_Actions )
endfunction
function Trig_JurassicScore_Actions takes nothing returns nothing
set udg_JuraN = ( udg_JuraN - 1 )
set udg_JuraRex = ( udg_JuraRex + 1 )
if ( udg_JuraRex >= (20 + 10*udg_PlayerFactor)) then
call DisableTrigger(gg_trg_JurassicScore)
call TriggerExecute(gg_trg_JuraBoss)
endif
endfunction
//===========================================================================
function InitTrig_JurassicScore takes nothing returns nothing
set gg_trg_JurassicScore = CreateTrigger( )
call DisableTrigger( gg_trg_JurassicScore )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_JurassicScore, Player(PLAYER_NEUTRAL_AGGRESSIVE), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_JurassicScore, function Trig_JurassicScore_Actions )
endfunction
function JuraeCon takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (GetOwningPlayer(GetFilterUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE))
return b1 and b2
endfunction
function JuraRemove takes nothing returns nothing
local unit u = GetEnumUnit()
call RemoveUnit(u)
set u = null
endfunction
function Trig_JuraBoss_Actions takes nothing returns nothing
local group g = CreateGroup()
local string s
local rect r = Rect(-1500, -3700, 7000, 3400)
call GroupEnumUnitsInRect(g, r, Condition(function JuraeCon))
call ForGroup(g, function JuraRemove)
call DisableTrigger(gg_trg_JuraSpawn)
call DisableTrigger(gg_trg_JurassicScore)
call DisableTrigger(gg_trg_MeteorShower)
set udg_ForestPot = 0
set udg_ForestHP = 0
set udg_ForestAttack = 0
set udg_ForestArmor = 0
set udg_ForestRune = 0
set udg_ForestResist = 0
set udg_TeleportPoint = Location(760, 5400)
call PolledWait(2)
set udg_JuraBoss = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n02D', 685, 6067, 270)
call DisableTrigger(gg_trg_NeutralPotions)
set s = "|cff008000Boss: T-REX!|r "
call DisplayTextToForce( GetPlayersAll(), s )
set s = "|cffffff00Abilities:|r 'Devour', 'Terror' и 'Ancient Scale' и 'Magic resistance'"
call DisplayTextToForce( GetPlayersAll(), s )
if (udg_Player1 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero1, GetRandomLocInRect(gg_rct_Boss7), 90.00 )
call SetCameraTargetControllerNoZForPlayer( Player(0), udg_Hero1, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(0), 0 )
endif
if (udg_Player2 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero2, GetRandomLocInRect(gg_rct_Boss7), 90.00 )
call SetCameraTargetControllerNoZForPlayer( Player(1), udg_Hero2, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(1), 0 )
endif
if (udg_Player3 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero3, GetRandomLocInRect(gg_rct_Boss7), 90.00 )
call SetCameraTargetControllerNoZForPlayer( Player(2), udg_Hero3, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(2), 0 )
endif
if (udg_Player4 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero4, GetRandomLocInRect(gg_rct_Boss7), 90.00 )
call SetCameraTargetControllerNoZForPlayer( Player(3), udg_Hero4, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(3), 0 )
endif
call PauseAllUnitsBJ( true )
call PolledWait(5)
call PauseAllUnitsBJ( false )
call EnableTrigger(gg_trg_JuraAttack)
call EnableTrigger(gg_trg_JuraBossDie)
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_JuraBoss takes nothing returns nothing
set gg_trg_JuraBoss = CreateTrigger( )
call DisableTrigger( gg_trg_JuraBoss )
call TriggerAddAction( gg_trg_JuraBoss, function Trig_JuraBoss_Actions )
endfunction
function Trig_JuraAttack_Conditions takes nothing returns boolean
if ( not ( GetAttacker() == udg_JuraBoss ) ) then
return false
endif
return true
endfunction
function Trig_JuraAttack_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
call DisableTrigger(gg_trg_JuraAttack)
call PolledWait(1)
loop
exitwhen SpellBossCheck(udg_JuraBoss) == true
call PolledWait(0.3)
endloop
call IssueTargetOrder(udg_JuraBoss, "magicleash", u)
call PolledWait(12)
loop
exitwhen SpellBossCheck(udg_JuraBoss) == true
call PolledWait(0.3)
endloop
call IssueImmediateOrder(udg_JuraBoss, "howlofterror")
call PolledWait(12)
if (GetUnitState(udg_JuraBoss, UNIT_STATE_LIFE) >= 0.405) then
call EnableTrigger(gg_trg_JuraAttack)
endif
set u = null
endfunction
//===========================================================================
function InitTrig_JuraAttack takes nothing returns nothing
set gg_trg_JuraAttack = CreateTrigger( )
call DisableTrigger(gg_trg_JuraAttack)
call TriggerRegisterAnyUnitEventBJ( gg_trg_JuraAttack, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_JuraAttack, Condition( function Trig_JuraAttack_Conditions ) )
call TriggerAddAction( gg_trg_JuraAttack, function Trig_JuraAttack_Actions )
endfunction
function Trig_JuraUlt_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AF' ) ) then
return false
endif
return true
endfunction
function JuraCheck11 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_JuraBoss)) == true)
return b1 and b2
endfunction
function JuraAct11 takes nothing returns nothing
local unit u = GetEnumUnit()
call UnitDamageTarget(udg_JuraBoss, u, 1200, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function Trig_JuraUlt_Actions takes nothing returns nothing
local location l = GetUnitLoc(udg_JuraBoss)
local group g = CreateGroup()
local effect e = AddSpecialEffectLoc("Abilities\\Spells\\Other\\HowlOfTerror\\HowlCaster.mdl", l)
call BlzSetSpecialEffectScale( e, 2.00 )
call DestroyEffect(e)
call GroupEnumUnitsInRangeOfLoc(g, l, 1000, Condition(function JuraCheck11))
call ForGroup(g, function JuraAct11)
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
set e = null
endfunction
//===========================================================================
function InitTrig_JuraUlt takes nothing returns nothing
set gg_trg_JuraUlt = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_JuraUlt, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_JuraUlt, Condition( function Trig_JuraUlt_Conditions ) )
call TriggerAddAction( gg_trg_JuraUlt, function Trig_JuraUlt_Actions )
endfunction
function Trig_JuraBossDie_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_JuraBoss ) ) then
return false
endif
return true
endfunction
function Trig_JuraBossDie_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_JuraUlt )
call DisableTrigger( gg_trg_JuraAttack )
call DisableTrigger( gg_trg_JuraUlt )
call PolledWait(2)
call TriggerExecute( gg_trg_StopMUSIC )
if (udg_Player1 == true) then
call SetUnitPositionLoc(udg_Hero1, Location(-5500, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(0), udg_Hero1, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(0), 0 )
endif
if (udg_Player2 == true) then
call SetUnitPositionLoc(udg_Hero2, Location(-3250, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(1), udg_Hero2, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(1), 0 )
endif
if (udg_Player3 == true) then
call SetUnitPositionLoc(udg_Hero3, Location(-950, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(2), udg_Hero3, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(2), 0 )
endif
if (udg_Player4 == true) then
call SetUnitPositionLoc(udg_Hero4, Location(1330, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(3), udg_Hero4, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(3), 0 )
endif
if (udg_SecretB == true) then
call TriggerExecute( gg_trg_StartSpace )
else
call DisplayTextToForce( GetPlayersAll(), "Congratulations! You win! :)" )
call PolledWait(5)
call CustomVictoryBJ( Player(0), true, true )
endif
endfunction
//===========================================================================
function InitTrig_JuraBossDie takes nothing returns nothing
set gg_trg_JuraBossDie = CreateTrigger( )
call DisableTrigger( gg_trg_JuraBossDie )
call TriggerRegisterAnyUnitEventBJ( gg_trg_JuraBossDie, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_JuraBossDie, Condition( function Trig_JuraBossDie_Conditions ) )
call TriggerAddAction( gg_trg_JuraBossDie, function Trig_JuraBossDie_Actions )
endfunction
function MeteorCheck21 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE)) == true)
return b1 and b2
endfunction
function MeteorAct21 takes nothing returns nothing
local unit u = GetEnumUnit()
call UnitDamageTarget(u, u, 600, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function Trig_MeteorShower_Actions takes nothing returns nothing
local real dx
local real dy
local integer a = GetRandomInt(1, 2)
local effect e
local location l
local group g = CreateGroup()
if (a == 1) then
set dx = GetRandomReal(-273, 5726)
set dy = GetRandomReal(-2258, 2258)
else
set dx = GetRandomReal(800, 3666)
set dy = GetRandomReal(-3600, 3000)
endif
set l = Location(dx, dy)
set e = AddSpecialEffectLoc("Units\\Demon\\Infernal\\InfernalBirth.mdl", l)
call DestroyEffect(e)
call PolledWait(1)
call GroupEnumUnitsInRangeOfLoc(g, l, 250, Condition(function MeteorCheck21))
call ForGroup(g, function MeteorAct21)
set e = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_MeteorShower takes nothing returns nothing
set gg_trg_MeteorShower = CreateTrigger( )
call DisableTrigger( gg_trg_MeteorShower )
call TriggerRegisterTimerEvent( gg_trg_MeteorShower, 0.75, true )
call TriggerAddAction( gg_trg_MeteorShower, function Trig_MeteorShower_Actions )
endfunction
function Trig_PoisonPlants_Actions takes nothing returns nothing
local real dx
local real dy
local integer a
local integer b = 0
loop
exitwhen (b > 6)
set a = GetRandomInt(1, 2)
if (a == 1) then
set dx = GetRandomReal(-273, 5726)
set dy = GetRandomReal(-2258, 2258)
else
set dx = GetRandomReal(800, 3666)
set dy = GetRandomReal(-3600, 3000)
endif
call CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'o009', dx, dy, 0)
call PolledWait(0.3)
set b = b + 1
endloop
endfunction
//===========================================================================
function InitTrig_PoisonPlants takes nothing returns nothing
set gg_trg_PoisonPlants = CreateTrigger( )
call DisableTrigger( gg_trg_PoisonPlants )
call TriggerAddAction( gg_trg_PoisonPlants, function Trig_PoisonPlants_Actions )
endfunction
function CaveUpgrade2 takes unit u returns nothing
local real atk
local real arm
local real hp
local integer res
if (udg_ForestArmor >= 1) then
set arm = BlzGetUnitArmor(u) + udg_ForestArmor
call BlzSetUnitArmor( u, arm )
endif
if (udg_ForestAttack >= 1) then
set atk = 0.01*BlzGetUnitBaseDamage(u, 0)*(100 + udg_ForestAttack)
call BlzSetUnitBaseDamage( u, R2I(atk), 0 )
endif
if (udg_ForestHP >= 1) then
set hp = 0.01*GetUnitState(u, UNIT_STATE_MAX_LIFE)*(100 + udg_ForestHP)
call BlzSetUnitMaxHP( u, R2I(hp))
call SetUnitState( u, UNIT_STATE_LIFE, hp)
endif
if (udg_ForestResist >= 1) then
call UnitAddAbility(u, 'A0A1')
endif
if (udg_ForestCrit >= 1) then
call UnitAddAbility(u, 'ACct')
endif
endfunction
function BoostTCon2 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) )
endfunction
function BoostTAct2 takes nothing returns nothing
local unit u = GetEnumUnit()
call CaveUpgrade2(u)
set u = null
endfunction
function Trig_CaveSpawn_Actions takes nothing returns nothing
local location l
local unit u
local integer a = 0
local integer i
local rect r = Rect(6100, 2400, 15400, 14400)
local group g = CreateGroup()
set udg_ForestArmor = 10
call GroupEnumUnitsInRect(g, r, Condition(function BoostTCon2))
call ForGroup(g, function BoostTAct2)
call PolledWait(5)
call DestroyGroup(g)
set g = null
set a = 0
loop
exitwhen a >= udg_PlayerFactor
set l = Location(GetRandomReal(6400, 7300), GetRandomReal(7500, 8000))
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01U', l, GetRandomReal(0, 360))
call CaveUpgrade2(u)
set l = Location(GetRandomReal(6400, 7300), GetRandomReal(7500, 8000))
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01U', l, GetRandomReal(0, 360))
call CaveUpgrade2(u)
set l = Location(GetRandomReal(6400, 7300), GetRandomReal(7500, 8000))
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01U', l, GetRandomReal(0, 360))
call CaveUpgrade2(u)
set l = Location(GetRandomReal(6400, 7300), GetRandomReal(7500, 8000))
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01U', l, GetRandomReal(0, 360))
call CaveUpgrade2(u)
set l = Location(GetRandomReal(6400, 7300), GetRandomReal(7500, 8000))
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01W', l, GetRandomReal(0, 360))
call CaveUpgrade2(u)
set l = Location(GetRandomReal(12900, 13450), GetRandomReal(9330, 9770))
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01V', l, GetRandomReal(0, 360))
call CaveUpgrade2(u)
set l = Location(GetRandomReal(12900, 13450), GetRandomReal(9330, 9770))
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01V', l, GetRandomReal(0, 360))
call CaveUpgrade2(u)
set l = Location(GetRandomReal(12900, 13450), GetRandomReal(9330, 9770))
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01V', l, GetRandomReal(0, 360))
call CaveUpgrade2(u)
set l = Location(GetRandomReal(12900, 13450), GetRandomReal(9330, 9770))
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01V', l, GetRandomReal(0, 360))
call CaveUpgrade2(u)
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 3 + 3*udg_PlayerFactor
set l = Location(GetRandomReal(8350, 13840), GetRandomReal(13200, 13600))
set i = GetRandomInt(1, 2)
if (i == 1) then
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01X', l, GetRandomReal(0, 360))
else
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Y', l, GetRandomReal(0, 360))
endif
call CaveUpgrade2(u)
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 2 + 2*udg_PlayerFactor
set l = Location(GetRandomReal(10340, 13450), GetRandomReal(11000, 11200))
set i = GetRandomInt(1, 2)
if (i == 1) then
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01X', l, GetRandomReal(0, 360))
else
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Y', l, GetRandomReal(0, 360))
endif
call CaveUpgrade2(u)
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 3 + 2*udg_PlayerFactor
set l = Location(GetRandomReal(6400, 10200), GetRandomReal(9900, 10200))
set i = GetRandomInt(1, 2)
if (i == 1) then
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01X', l, GetRandomReal(0, 360))
else
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Y', l, GetRandomReal(0, 360))
endif
call CaveUpgrade2(u)
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 2 + udg_PlayerFactor
set l = Location(GetRandomReal(6360, 8000), GetRandomReal(11450, 11800))
set i = GetRandomInt(1, 2)
if (i == 1) then
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01X', l, GetRandomReal(0, 360))
else
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Y', l, GetRandomReal(0, 360))
endif
call CaveUpgrade2(u)
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 1 + udg_PlayerFactor
set l = Location(GetRandomReal(14000, 14350), GetRandomReal(11350, 13100))
set i = GetRandomInt(1, 2)
if (i == 1) then
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01X', l, GetRandomReal(0, 360))
else
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Y', l, GetRandomReal(0, 360))
endif
call CaveUpgrade2(u)
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= udg_PlayerFactor
set l = Location(GetRandomReal(7900, 8200), GetRandomReal(12000, 13000))
set i = GetRandomInt(1, 2)
if (i == 1) then
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01X', l, GetRandomReal(0, 360))
else
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Y', l, GetRandomReal(0, 360))
endif
call CaveUpgrade2(u)
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= udg_PlayerFactor
set l = Location(GetRandomReal(8050, 8900), GetRandomReal(2750, 3600))
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01U', l, GetRandomReal(0, 360))
call CaveUpgrade2(u)
set l = Location(GetRandomReal(8050, 8900), GetRandomReal(2750, 3600))
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01U', l, GetRandomReal(0, 360))
call CaveUpgrade2(u)
set l = Location(GetRandomReal(8050, 8900), GetRandomReal(2750, 3600))
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01W', l, GetRandomReal(0, 360))
call CaveUpgrade2(u)
set l = Location(GetRandomReal(8050, 8900), GetRandomReal(2750, 3600))
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01V', l, GetRandomReal(0, 360))
call CaveUpgrade2(u)
set l = Location(GetRandomReal(8050, 8900), GetRandomReal(2750, 3600))
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01V', l, GetRandomReal(0, 360))
call CaveUpgrade2(u)
set a = a + 1
call PolledWait(1)
endloop
set u = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_CaveSpawn takes nothing returns nothing
set gg_trg_CaveSpawn = CreateTrigger( )
call TriggerAddAction( gg_trg_CaveSpawn, function Trig_CaveSpawn_Actions )
endfunction
function CaveUpgrade takes unit u returns nothing
local real atk
local real arm
local real hp
local integer res
if (udg_ForestArmor >= 1) then
set arm = BlzGetUnitArmor(u) + udg_ForestArmor
call BlzSetUnitArmor( u, arm )
endif
if (udg_ForestAttack >= 1) then
set atk = 0.01*BlzGetUnitBaseDamage(u, 0)*(100 + udg_ForestAttack)
call BlzSetUnitBaseDamage( u, R2I(atk), 0 )
endif
if (udg_ForestHP >= 1) then
set hp = 0.01*GetUnitState(u, UNIT_STATE_MAX_LIFE)*(100 + udg_ForestHP)
call BlzSetUnitMaxHP( u, R2I(hp))
call SetUnitState( u, UNIT_STATE_LIFE, hp)
endif
if (udg_ForestResist >= 1) then
call UnitAddAbility(u, 'A0A1')
endif
if (udg_ForestCrit >= 1) then
call UnitAddAbility(u, 'ACct')
endif
endfunction
function Trig_Spider_Actions takes nothing returns nothing
local location l
local unit u
call DisableTrigger( GetTriggeringTrigger() )
if (udg_Player1 == true) then
call KillDestructable( gg_dest_DTes_10270 )
set l = GetDestructableLoc(gg_dest_DTes_10270)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Z', l, bj_UNIT_FACING)
call CaveUpgrade(u)
call PolledWait(0.7)
call KillDestructable( gg_dest_DTes_10278 )
set l = GetDestructableLoc(gg_dest_DTes_10278)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Z', l, bj_UNIT_FACING)
call CaveUpgrade(u)
call PolledWait(0.7)
call KillDestructable( gg_dest_DTes_10273 )
set l = GetDestructableLoc(gg_dest_DTes_10273)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Z', l, bj_UNIT_FACING)
call CaveUpgrade(u)
call PolledWait(0.7)
call KillDestructable( gg_dest_DTes_10265 )
set l = GetDestructableLoc(gg_dest_DTes_10265)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Z', l, bj_UNIT_FACING)
call CaveUpgrade(u)
call PolledWait(0.7)
endif
if (udg_Player2 == true) then
call KillDestructable( gg_dest_DTes_10287 )
set l = GetDestructableLoc(gg_dest_DTes_10287)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Z', l, bj_UNIT_FACING)
call CaveUpgrade(u)
call PolledWait(0.7)
call KillDestructable( gg_dest_DTes_10269 )
set l = GetDestructableLoc(gg_dest_DTes_10269)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Z', l, bj_UNIT_FACING)
call CaveUpgrade(u)
call PolledWait(0.7)
call KillDestructable( gg_dest_DTes_10288 )
set l = GetDestructableLoc(gg_dest_DTes_10288)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Z', l, bj_UNIT_FACING)
call CaveUpgrade(u)
call PolledWait(0.7)
call KillDestructable( gg_dest_DTes_10113 )
set l = GetDestructableLoc(gg_dest_DTes_10113)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Z', l, bj_UNIT_FACING)
call CaveUpgrade(u)
call PolledWait(0.7)
endif
if (udg_Player3 == true) then
call KillDestructable( gg_dest_DTes_10284 )
set l = GetDestructableLoc(gg_dest_DTes_10284)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Z', l, bj_UNIT_FACING)
call CaveUpgrade(u)
call PolledWait(0.7)
call KillDestructable( gg_dest_DTes_10271 )
set l = GetDestructableLoc(gg_dest_DTes_10271)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Z', l, bj_UNIT_FACING)
call CaveUpgrade(u)
call PolledWait(0.7)
call KillDestructable( gg_dest_DTes_10286 )
set l = GetDestructableLoc(gg_dest_DTes_10286)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Z', l, bj_UNIT_FACING)
call CaveUpgrade(u)
call PolledWait(0.7)
call KillDestructable( gg_dest_DTes_10276 )
set l = GetDestructableLoc(gg_dest_DTes_10276)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Z', l, bj_UNIT_FACING)
call CaveUpgrade(u)
call PolledWait(0.7)
endif
if (udg_Player4 == true) then
call KillDestructable( gg_dest_DTes_10279 )
set l = GetDestructableLoc(gg_dest_DTes_10279)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Z', l, bj_UNIT_FACING)
call CaveUpgrade(u)
call PolledWait(0.7)
call KillDestructable( gg_dest_DTes_10266 )
set l = GetDestructableLoc(gg_dest_DTes_10266)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Z', l, bj_UNIT_FACING)
call CaveUpgrade(u)
call PolledWait(0.7)
call KillDestructable( gg_dest_DTes_10275 )
set l = GetDestructableLoc(gg_dest_DTes_10275)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Z', l, bj_UNIT_FACING)
call CaveUpgrade(u)
call PolledWait(0.7)
call KillDestructable( gg_dest_DTes_10283 )
set l = GetDestructableLoc(gg_dest_DTes_10283)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01Z', l, bj_UNIT_FACING)
call CaveUpgrade(u)
call PolledWait(0.7)
endif
set u = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_Spider takes nothing returns nothing
set gg_trg_Spider = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Spider, gg_rct_Spider )
call TriggerAddAction( gg_trg_Spider, function Trig_Spider_Actions )
endfunction
function Trig_CaveBoss_Conditions takes nothing returns boolean
if ( ( GetTriggerUnit() == udg_Hero1 ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Hero2 ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Hero3 ) ) then
return true
endif
if ( ( GetTriggerUnit() == udg_Hero4 ) ) then
return true
endif
return false
endfunction
function Trig_CaveBoss_Actions takes nothing returns nothing
local integer i = GetRandomInt(1, 3)
local string s
call DisableTrigger( GetTriggeringTrigger() )
call DisableTrigger(gg_trg_MiceCaveEvent)
call DisableTrigger(gg_trg_NeutralPotions)
set udg_TeleportPoint = Location(4200, 13000)
set udg_ForestPot = 0
set udg_ForestHP = 0
set udg_ForestAttack = 0
set udg_ForestArmor = 0
set udg_ForestRune = 0
set udg_ForestResist = 0
set udg_ForestCrit = 0
call CreateFogModifierRectBJ( true, Player(0), FOG_OF_WAR_VISIBLE, gg_rct_VisionCB )
call FogModifierStart( GetLastCreatedFogModifier() )
call CreateFogModifierRectBJ( true, Player(1), FOG_OF_WAR_VISIBLE, gg_rct_VisionCB )
call FogModifierStart( GetLastCreatedFogModifier() )
call CreateFogModifierRectBJ( true, Player(2), FOG_OF_WAR_VISIBLE, gg_rct_VisionCB )
call FogModifierStart( GetLastCreatedFogModifier() )
call CreateFogModifierRectBJ( true, Player(3), FOG_OF_WAR_VISIBLE, gg_rct_VisionCB )
call FogModifierStart( GetLastCreatedFogModifier() )
if (i == 1) then
set udg_CaveBoss = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n020', 3431, 13000, 0)
set s = "|cff00ffffBoss: Spider Queen!|r "
call DisplayTextToForce( GetPlayersAll(), s )
set s = "|cffffff00Abilities:|r 'Little Spiders', 'Poison Spit', 'Web' и 'Evasion'"
call DisplayTextToForce( GetPlayersAll(), s )
endif
if (i == 2) then
set udg_CaveBoss = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n021', 3431, 13000, 0)
set s = "|cff00ffffBoss: Cyclope!|r "
call DisplayTextToForce( GetPlayersAll(), s )
set s = "|cffffff00Abilities:|r 'Boulders', 'Bloodlust', 'Earthquake' и 'Heavy Strike'"
call DisplayTextToForce( GetPlayersAll(), s )
endif
if (i == 3) then
set udg_CaveBoss = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n022', 3300, 13000, 0)
call IssueImmediateOrder(udg_CaveBoss, "holdposition")
set s = "|cff00ffffBoss: Destroyer!|r "
call DisplayTextToForce( GetPlayersAll(), s )
set s = "|cffffff00Abilities:|r 'Flamethrower', 'Danger Zone', 'Rockets' и 'Magic Resistance'"
call DisplayTextToForce( GetPlayersAll(), s )
endif
if (udg_Player1 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero1, GetRandomLocInRect(gg_rct_Boss6), 180.00 )
call SetCameraTargetControllerNoZForPlayer( Player(0), udg_Hero1, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(0), 0 )
endif
if (udg_Player2 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero2, GetRandomLocInRect(gg_rct_Boss6), 180.00 )
call SetCameraTargetControllerNoZForPlayer( Player(1), udg_Hero2, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(1), 0 )
endif
if (udg_Player3 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero3, GetRandomLocInRect(gg_rct_Boss6), 180.00 )
call SetCameraTargetControllerNoZForPlayer( Player(2), udg_Hero3, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(2), 0 )
endif
if (udg_Player4 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero4, GetRandomLocInRect(gg_rct_Boss6), 180.00 )
call SetCameraTargetControllerNoZForPlayer( Player(3), udg_Hero4, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(3), 0 )
endif
call PauseAllUnitsBJ( true )
call PolledWait(5)
call PauseAllUnitsBJ( false )
if (i == 1) then
call TriggerExecute(gg_trg_CaveSpiderAttack)
endif
if (i == 2) then
call TriggerExecute(gg_trg_CaveCyclopAttack)
endif
if (i == 3) then
call TriggerExecute(gg_trg_CaveTankAttack)
call EnableTrigger(gg_trg_CaveDie)
endif
call EnableTrigger( gg_trg_CaveBossDie )
endfunction
//===========================================================================
function InitTrig_CaveBoss takes nothing returns nothing
set gg_trg_CaveBoss = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_CaveBoss, gg_rct_CaveEnterBoss )
call TriggerAddCondition( gg_trg_CaveBoss, Condition( function Trig_CaveBoss_Conditions ) )
call TriggerAddAction( gg_trg_CaveBoss, function Trig_CaveBoss_Actions )
endfunction
function Trig_MineBomb_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A09X' ) ) then
return false
endif
return true
endfunction
function PowderCon1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_BombCaster)) == true)
return b1 and b2
endfunction
function PowderAct2 takes nothing returns nothing
local unit u = GetEnumUnit()
call UnitDamageTarget(udg_BombCaster, u, 500, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function Trig_MineBomb_Actions takes nothing returns nothing
local location l = GetSpellTargetLoc()
local group g = CreateGroup()
local unit u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u00C', l, bj_UNIT_FACING)
local unit u2 = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u00D', l, bj_UNIT_FACING)
local effect e
set udg_BombCaster = GetTriggerUnit()
call PolledWait(4)
set e = AddSpecialEffectLoc("Objects\\Spawnmodels\\Human\\HCancelDeath\\HCancelDeath.mdl", l)
call BlzSetSpecialEffectScale( e, 1.00 )
call DestroyEffect(e)
call GroupEnumUnitsInRangeOfLoc(g, l, 300, Condition(function PowderCon1))
call ForGroup(g, function PowderAct2)
call RemoveUnit(u)
call RemoveUnit(u2)
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
set e = null
endfunction
//===========================================================================
function InitTrig_MineBomb takes nothing returns nothing
set gg_trg_MineBomb = CreateTrigger( )
call DisableTrigger( gg_trg_MineBomb )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MineBomb, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_MineBomb, Condition( function Trig_MineBomb_Conditions ) )
call TriggerAddAction( gg_trg_MineBomb, function Trig_MineBomb_Actions )
endfunction
function Trig_MineAttackers_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetAttacker()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_MineAttackers_Actions takes nothing returns nothing
local unit u = GetAttacker()
local unit u2 = GetTriggerUnit()
local unit u3
local location l = GetUnitLoc(u2)
if ( GetUnitTypeId(u) == 'n01W' ) then
call DisableTrigger( gg_trg_MineAttackers )
call IssuePointOrderLoc( u, "carrionswarm", l )
call PolledWait(1)
call IssueTargetOrder(u, "attack", u2)
call PolledWait(1)
call EnableTrigger(gg_trg_MineAttackers)
endif
if ( GetUnitTypeId(u) == 'u015' ) then
set u3 = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u000', l, 270)
call UnitAddAbility(u3, 'A0A3')
call IssueTargetOrder( u3, "ensnare", u2 )
call RemoveUnit(u)
endif
set u = null
set u2 = null
set u3 = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_MineAttackers takes nothing returns nothing
set gg_trg_MineAttackers = CreateTrigger( )
call DisableTrigger( gg_trg_MineAttackers )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MineAttackers, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_MineAttackers, Condition( function Trig_MineAttackers_Conditions ) )
call TriggerAddAction( gg_trg_MineAttackers, function Trig_MineAttackers_Actions )
endfunction
function Trig_MineAttacked_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n01V' ) ) then
return false
endif
return true
endfunction
function Trig_MineAttacked_Actions takes nothing returns nothing
local unit u = GetAttacker()
local unit u2 = GetTriggerUnit()
call DisableTrigger( GetTriggeringTrigger() )
call IssueTargetOrder( u2, "creepthunderbolt", u )
call PolledWait(1)
call EnableTrigger( GetTriggeringTrigger() )
set u = null
set u2 = null
endfunction
//===========================================================================
function InitTrig_MineAttacked takes nothing returns nothing
set gg_trg_MineAttacked = CreateTrigger( )
call DisableTrigger( gg_trg_MineAttacked )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MineAttacked, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_MineAttacked, Condition( function Trig_MineAttacked_Conditions ) )
call TriggerAddAction( gg_trg_MineAttacked, function Trig_MineAttacked_Actions )
endfunction
function AliveBolders takes nothing returns boolean
return (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
endfunction
function BoldersFall takes nothing returns nothing
local unit u = GetEnumUnit()
local location l = GetUnitLoc(u)
local real a = GetUnitFlyHeight(u) - 15
call SetUnitFlyHeight( u, a, 99999 )
if (a <= 15) then
call GroupRemoveUnit(udg_MineGroup, u)
call UnitDamagePoint(u, 0, 150, GetLocationX(l), GetLocationY(l), 250, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
call KillUnit(u)
endif
set u = null
call RemoveLocation(l)
set l = null
endfunction
function Trig_MineCaveTimer_Actions takes nothing returns nothing
local integer i = GetRandomInt(1, 100)
local real x
local real y
local unit u
local unit u2
if ((i <= 7) and (udg_MineNumber <= 30)) then
set x = GetLocationX(udg_MinePoint) + GetRandomReal(-300, 300)
set y = GetLocationY(udg_MinePoint) + GetRandomReal(-300, 300)
set u2 = CreateUnit(Player(7), 'u013', x, y, GetRandomReal(0, 360))
set udg_MineNumber = udg_MineNumber + 1
call GroupAddUnit(udg_MineGroup, u2)
endif
set u = FirstOfGroup(udg_MineGroup)
if (u != null) then
call ForGroup(udg_MineGroup, function BoldersFall)
else
if (udg_MineNumber > 30) then
call DisableTrigger(gg_trg_MineCaveTimer)
call EnableTrigger(gg_trg_MiceCaveEvent)
call DestroyEffect(udg_MineEffect)
endif
endif
set u = null
set u2 = null
endfunction
//===========================================================================
function InitTrig_MineCaveTimer takes nothing returns nothing
set gg_trg_MineCaveTimer = CreateTrigger( )
call DisableTrigger( gg_trg_MineCaveTimer )
call TriggerRegisterTimerEvent( gg_trg_MineCaveTimer, 0.03, true )
call TriggerAddAction( gg_trg_MineCaveTimer, function Trig_MineCaveTimer_Actions )
endfunction
function Trig_MineMushrooms_Actions takes nothing returns nothing
local integer a = 0
local real dx
local real dy
local location l
loop
exitwhen a > 7
set dx = GetRandomReal(6100, 15300)
set dy = GetRandomReal(2800, 10400)
if (GetTerrainType(dx, dy) == 'Vdrr') then
set l = Location(dx ,dy)
call CreateItemLoc( 'I04Y', l )
set a = a + 1
endif
call PolledWait(0.1)
endloop
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_MineMushrooms takes nothing returns nothing
set gg_trg_MineMushrooms = CreateTrigger( )
call DisableTrigger( gg_trg_MineMushrooms )
call TriggerAddAction( gg_trg_MineMushrooms, function Trig_MineMushrooms_Actions )
endfunction
function SpiderCon takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_CaveBoss)) == true)
return b1 and b2
endfunction
function Trig_CaveSpiderAttack_Actions takes nothing returns nothing
local location l
local real a
local integer b
local unit u
local group g = CreateGroup()
call PolledWait(1)
loop
exitwhen SpellBossCheck(udg_CaveBoss) == true
call PolledWait(0.3)
endloop
set a = GetUnitState(udg_CaveBoss, UNIT_STATE_MANA)
if (a >= 150) then
set l = GetUnitLoc(udg_CaveBoss)
call SetUnitState(udg_CaveBoss, UNIT_STATE_MANA, (a - 150))
call GroupEnumUnitsInRangeOfLoc(g, l, 500, Condition(function SpiderCon))
set u = FirstOfGroup(g)
if (u != null) then
call IssueTargetOrder( udg_CaveBoss, "acidbomb", u )
endif
endif
call PolledWait(5)
loop
exitwhen SpellBossCheck(udg_CaveBoss) == true
call PolledWait(0.3)
endloop
set a = GetUnitState(udg_CaveBoss, UNIT_STATE_MANA)
if (a >= 250) then
call SetUnitState(udg_CaveBoss, UNIT_STATE_MANA, (a - 250))
call EnableTrigger(gg_trg_SpiderTimer)
call PolledWait(4)
call DisableTrigger(gg_trg_SpiderTimer)
endif
call PolledWait(5)
loop
exitwhen SpellBossCheck(udg_CaveBoss) == true
call PolledWait(0.3)
endloop
set a = GetUnitState(udg_CaveBoss, UNIT_STATE_MANA)
if (a >= 200) then
call SetUnitState(udg_CaveBoss, UNIT_STATE_MANA, (a - 200))
set b = 0
loop
exitwhen b > 9
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u015', GetRandomReal(3370, 4444), GetRandomReal(12450, 13550), 270 )
call IssueImmediateOrder(u, "holdposition")
call UnitApplyTimedLife( u, 'BTLF', 20 )
call PolledWait(0.2)
set b = b + 1
endloop
endif
call PolledWait(4)
if (GetUnitState(udg_CaveBoss, UNIT_STATE_LIFE) >= 0.405) then
call TriggerExecute(gg_trg_CaveSpiderAttack)
else
call DisableTrigger(gg_trg_CaveSpiderAttack)
endif
set u = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_CaveSpiderAttack takes nothing returns nothing
set gg_trg_CaveSpiderAttack = CreateTrigger( )
call TriggerAddAction( gg_trg_CaveSpiderAttack, function Trig_CaveSpiderAttack_Actions )
endfunction
function Trig_CaveCyclopAttack_Actions takes nothing returns nothing
local location l
local real a
local integer b
local real angle
local unit u
local real x
local real y
local location l2 = Location(3938, 13000)
local effect e
call PolledWait(1)
call IssueTargetOrder( udg_CaveBoss, "bloodlust", udg_CaveBoss )
call PolledWait(5)
loop
exitwhen SpellBossCheck(udg_CaveBoss) == true
call PolledWait(0.3)
endloop
set a = GetUnitState(udg_CaveBoss, UNIT_STATE_MANA)
if (a >= 100) then
set e = AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\BattleRoar\\RoarCaster.mdl" , udg_CaveBoss, "origin")
call DestroyEffect(e)
call SetUnitState(udg_CaveBoss, UNIT_STATE_MANA, (a - 100))
set b = 0
loop
exitwhen b > 9
set angle = GetRandomReal(0, 360)
set x = 3938 + 1500 * Cos(angle * 0.01745)
set y = 13000 + 1500 * Sin(angle * 0.01745)
set l = Location(x, y)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u016', l, angle + 180)
call IssuePointOrderLoc(u, "move", l2 )
call PolledWait(0.3)
set b = b + 1
endloop
endif
call PolledWait(5)
loop
exitwhen SpellBossCheck(udg_CaveBoss) == true
call PolledWait(0.3)
endloop
set a = GetUnitState(udg_CaveBoss, UNIT_STATE_MANA)
if (a >= 100) then
call SetUnitState(udg_CaveBoss, UNIT_STATE_MANA, (a - 100))
set l = Location(3938, 13000)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u00B', l, angle + 180)
call UnitAddAbility(u, 'A0A6')
call IssuePointOrderLoc( u, "earthquake", l )
endif
call PolledWait(4)
if (GetUnitState(udg_CaveBoss, UNIT_STATE_LIFE) >= 0.405) then
call TriggerExecute(gg_trg_CaveCyclopAttack)
else
call DisableTrigger(gg_trg_CaveCyclopAttack)
endif
set u = null
call RemoveLocation(l)
set l = null
call RemoveLocation(l2)
set l2 = null
set e = null
endfunction
//===========================================================================
function InitTrig_CaveCyclopAttack takes nothing returns nothing
set gg_trg_CaveCyclopAttack = CreateTrigger( )
call TriggerAddAction( gg_trg_CaveCyclopAttack, function Trig_CaveCyclopAttack_Actions )
endfunction
function Trig_CaveTankAttack_Actions takes nothing returns nothing
local location l = GetUnitLoc(udg_CaveBoss)
local real x
local real y
local real a
local integer b = 0
local unit u
local location l2
local real angle
call PolledWait(3)
loop
exitwhen SpellBossCheck(udg_CaveBoss) == true
call PolledWait(0.3)
endloop
set a = GetUnitState(udg_CaveBoss, UNIT_STATE_MANA)
if (a >= 200) then
set b = 0
call SetUnitState(udg_CaveBoss, UNIT_STATE_MANA, (a - 200))
loop
exitwhen b > 14
set angle = GetRandomReal(-50, 50)
set x = 3300 + 150 * Cos(angle * 0.01745)
set y = 13000 + 150 * Sin(angle * 0.01745)
set l2 = Location(x, y)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u000', l, angle)
call UnitAddAbility(u, 'A0A9')
call IssuePointOrderLoc(u, "breathoffire", l2 )
call PolledWait(0.3)
set b = b + 1
endloop
endif
call PolledWait(6)
loop
exitwhen SpellBossCheck(udg_CaveBoss) == true
call PolledWait(0.3)
endloop
set a = GetUnitState(udg_CaveBoss, UNIT_STATE_MANA)
if (a >= 200) then
set b = 0
call SetUnitState(udg_CaveBoss, UNIT_STATE_MANA, (a - 200))
loop
exitwhen b > 9
set angle = GetRandomReal(-50, 50)
set x = GetRandomReal(3480, 4340)
set y = GetRandomReal(12333, 13650)
set l2 = Location(x, y)
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u017', l, angle)
call IssuePointOrderLoc(u, "attackground", l2 )
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u018', l2, angle)
call PolledWait(0.3)
set b = b + 1
endloop
endif
call PolledWait(6)
if (GetUnitState(udg_CaveBoss, UNIT_STATE_LIFE) >= 0.405) then
call TriggerExecute(gg_trg_CaveTankAttack)
else
call DisableTrigger(gg_trg_CaveTankAttack)
endif
set u = null
call RemoveLocation(l)
set l = null
call RemoveLocation(l2)
set l2 = null
endfunction
//===========================================================================
function InitTrig_CaveTankAttack takes nothing returns nothing
set gg_trg_CaveTankAttack = CreateTrigger( )
call TriggerAddAction( gg_trg_CaveTankAttack, function Trig_CaveTankAttack_Actions )
endfunction
function Trig_CaveDie_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'u018' ) ) then
return false
endif
return true
endfunction
function Trig_CaveDie_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetUnitLoc(u)
local effect e = AddSpecialEffectLoc("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl", l)
call DestroyEffect(e)
call UnitDamagePoint(udg_CaveBoss, 0, 110, GetLocationX(l), GetLocationY(l), 500, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set e = null
call RemoveUnit(u)
call RemoveLocation(l)
set l = null
set u = null
endfunction
//===========================================================================
function InitTrig_CaveDie takes nothing returns nothing
set gg_trg_CaveDie = CreateTrigger( )
call DisableTrigger(gg_trg_CaveDie)
call TriggerRegisterAnyUnitEventBJ( gg_trg_CaveDie, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_CaveDie, Condition( function Trig_CaveDie_Conditions ) )
call TriggerAddAction( gg_trg_CaveDie, function Trig_CaveDie_Actions )
endfunction
function Trig_SpiderTimer_Actions takes nothing returns nothing
local location l = GetUnitLoc(udg_CaveBoss)
local unit u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u014', l, 270 )
local location l2 = Location(GetLocationX(l) + GetRandomReal(-350, 350), GetLocationY(l) + GetRandomReal(-350, 350))
call IssuePointOrderLoc( u, "attackground", l2 )
set u = null
call RemoveLocation(l)
set l = null
call RemoveLocation(l2)
set l2 = null
endfunction
//===========================================================================
function InitTrig_SpiderTimer takes nothing returns nothing
set gg_trg_SpiderTimer = CreateTrigger()
call DisableTrigger(gg_trg_SpiderTimer)
call TriggerRegisterTimerEvent( gg_trg_SpiderTimer, 0.04, true )
call TriggerAddAction( gg_trg_SpiderTimer, function Trig_SpiderTimer_Actions )
endfunction
function Trig_CaveBossDie_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_CaveBoss ) ) then
return false
endif
return true
endfunction
function Trig_CaveBossDie_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_CaveSpiderAttack )
call DisableTrigger( gg_trg_CaveCyclopAttack )
call DisableTrigger( gg_trg_CaveTankAttack )
call DisableTrigger( gg_trg_CaveDie )
call DisableTrigger( gg_trg_CaveBossDie )
call DisableTrigger( gg_trg_SpiderTimer )
call PolledWait(2)
call TriggerExecute( gg_trg_StopMUSIC )
call DisplayTextToForce( GetPlayersAll(), "Congratulations! Take your reward: |cffffff001500 gold!|r" )
if (udg_Player1 == true) then
call AdjustPlayerStateBJ( 1500, Player(0), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero1, Location(-5500, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(0), udg_Hero1, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(0), 0 )
endif
if (udg_Player2 == true) then
call AdjustPlayerStateBJ( 1500, Player(1), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero2, Location(-3250, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(1), udg_Hero2, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(1), 0 )
endif
if (udg_Player3 == true) then
call AdjustPlayerStateBJ( 1500, Player(2), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero3, Location(-950, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(2), udg_Hero3, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(2), 0 )
endif
if (udg_Player4 == true) then
call AdjustPlayerStateBJ( 1500, Player(3), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero4, Location(1330, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(3), udg_Hero4, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(3), 0 )
endif
set udg_ForestAttack = 0
set udg_ForestHP = 0
set udg_ForestArmor = 0
set udg_ForestPot = 0
set udg_ForestResist = 0
set udg_ForestRune = 0
set udg_ForestCrit = 0
call TriggerExecute( gg_trg_JurassicStart )
endfunction
//===========================================================================
function InitTrig_CaveBossDie takes nothing returns nothing
set gg_trg_CaveBossDie = CreateTrigger( )
call DisableTrigger( gg_trg_CaveBossDie )
call TriggerRegisterAnyUnitEventBJ( gg_trg_CaveBossDie, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_CaveBossDie, Condition( function Trig_CaveBossDie_Conditions ) )
call TriggerAddAction( gg_trg_CaveBossDie, function Trig_CaveBossDie_Actions )
endfunction
function UnitUpgrade takes unit u returns nothing
local real atk
local real arm
local real hp
if (udg_ForestArmor >= 1) then
set arm = BlzGetUnitArmor(u) + udg_ForestArmor
call BlzSetUnitArmor( u, arm )
endif
if (udg_ForestAttack >= 1) then
set atk = 0.01*BlzGetUnitBaseDamage(u, 0)*(100 + udg_ForestAttack)
call BlzSetUnitBaseDamage( u, R2I(atk), 0 )
endif
if (udg_ForestHP >= 1) then
set hp = 0.01*GetUnitState(u, UNIT_STATE_MAX_LIFE)*(100 + udg_ForestHP)
call BlzSetUnitMaxHP( u, R2I(hp))
call SetUnitState( u, UNIT_STATE_LIFE, hp)
endif
if (udg_ForestResist >= 1) then
call UnitAddAbility(u, 'A098')
endif
endfunction
function Trig_DemonArmySpawn_Actions takes nothing returns nothing
local location l = Location(10994, -1010)
local unit u
local real a
local real time = 35
call PolledWait(time)
call SetMusicVolumeBJ( 100 )
call PlayMusicBJ( gg_snd_Assault )
//-----------WAVE1----------
call DisplayTextToForce( GetPlayersAll(), "|cffff0000Wave 1: Demons|r" )
set a = 0
loop
exitwhen a >= 6*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01M', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
call PolledWait(time)
//-----------WAVE2----------
if (udg_CastelStop == true) then
return
endif
call DisplayTextToForce( GetPlayersAll(), "|cffff0000Wave 2: Demons and Fallen Archers|r" )
set a = 0
loop
exitwhen a >= 5*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01M', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 2*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01N', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
call PolledWait(time)
//-----------WAVE3----------
if (udg_CastelStop == true) then
return
endif
call DisplayTextToForce( GetPlayersAll(), "|cffff0000Wave 3: Fallen Archers|r" )
set a = 0
loop
exitwhen a >= 6*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01N', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
call PolledWait(time)
//-----------WAVE4----------
if (udg_CastelStop == true) then
return
endif
call DisplayTextToForce( GetPlayersAll(), "|cffff0000Wave 4: Fire Golems and Demons|r" )
set a = 0
loop
exitwhen a >= 1*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01O', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 5*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01M', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
call PolledWait(time)
//-----------WAVE5----------
if (udg_CastelStop == true) then
return
endif
call DisplayTextToForce( GetPlayersAll(), "|cffff0000Wave 5: Fire Golems and Fallen Archers|r" )
set a = 0
loop
exitwhen a >= 2*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01O', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 6*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01N', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
call PolledWait(time)
//-----------WAVE6----------
if (udg_CastelStop == true) then
return
endif
call DisplayTextToForce( GetPlayersAll(), "|cffff0000Wave 6: Fire Golems|r" )
set a = 0
loop
exitwhen a >= 6*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01O', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
call PolledWait(time)
//-----------WAVE7----------
if (udg_CastelStop == true) then
return
endif
call DisplayTextToForce( GetPlayersAll(), "|cffff0000Wave 7: Dark Casters, Fallen Archers and Demons|r" )
set a = 0
loop
exitwhen a >= 3*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01M', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 3*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01N', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 1*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01P', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
call PolledWait(time)
//-----------WAVE8----------
if (udg_CastelStop == true) then
return
endif
call DisplayTextToForce( GetPlayersAll(), "|cffff0000Wave 8: Dark Casters, Fallen Archers and Fire Golems|r" )
set a = 0
loop
exitwhen a >= 1*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01O', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 5*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01N', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 2*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01P', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
call PolledWait(time)
//-----------WAVE9----------
if (udg_CastelStop == true) then
return
endif
call DisplayTextToForce( GetPlayersAll(), "|cffff0000Wave 9: Dark Casters and Fire Golems|r" )
set a = 0
loop
exitwhen a >= 3*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01O', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 3*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01P', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
call PolledWait(time)
//-----------WAVE10----------
if (udg_CastelStop == true) then
return
endif
call DisplayTextToForce( GetPlayersAll(), "|cffff0000Wave 10: Fire Golems and Hell Siphons|r" )
set a = 0
loop
exitwhen a >= 5*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01O', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 1*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01Q', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
call PolledWait(time)
//-----------WAVE11----------
if (udg_CastelStop == true) then
return
endif
call DisplayTextToForce( GetPlayersAll(), "|cffff0000Wave 11: Dark Casters, Fire Golems and Hell Siphons|r" )
set a = 0
loop
exitwhen a >= 3*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01O', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 3*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01P', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 1*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01Q', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
call PolledWait(time)
//-----------WAVE12----------
if (udg_CastelStop == true) then
return
endif
call DisplayTextToForce( GetPlayersAll(), "|cffff0000Wave 12: Hell Siphons|r" )
set a = 0
loop
exitwhen a >= 6*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01Q', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
call PolledWait(time)
//-----------WAVE13----------
if (udg_CastelStop == true) then
return
endif
call DisplayTextToForce( GetPlayersAll(), "|cffff0000Wave 13: Nightmares and Dark Casters|r" )
set a = 0
loop
exitwhen a >= 1*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01R', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 6*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01P', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
call PolledWait(time)
//-----------WAVE14----------
if (udg_CastelStop == true) then
return
endif
call DisplayTextToForce( GetPlayersAll(), "|cffff0000Wave 14: Nightmares, Hell Siphons and Fire Golems|r" )
set a = 0
loop
exitwhen a >= 2*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01R', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 4*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01O', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 2*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01Q', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
call PolledWait(time)
//-----------WAVE15----------
if (udg_CastelStop == true) then
return
endif
call DisplayTextToForce( GetPlayersAll(), "|cffff0000Wave 15: Nightmares and Hell Siphons|r" )
set a = 0
loop
exitwhen a >= 4*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01R', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
set a = 0
loop
exitwhen a >= 4*udg_PlayerFactor
set u = CreateUnit(Player(4), 'n01Q', 12300, 700, 225)
call UnitUpgrade(u)
call IssuePointOrderLoc( u, "attack", l )
set u = null
set a = a + 1
call PolledWait(1)
endloop
call PolledWait(time)
//-----------WAVEBOSS----------
if (udg_CastelStop == true) then
return
endif
set udg_CastleBoss = CreateUnit(Player(4), 'n01S', 12300, 700, 225)
call IssuePointOrderLoc( udg_CastleBoss, "attack", l )
call DisplayTextToForce( GetPlayersAll(), "|cffff0000BOSS!!!|r" )
call DisplayTextToForce( GetPlayersAll(), "|cffffff00Abilities:|r 'Hellfire', 'Magic Resistance' и 'Earthquake'" )
call EnableTrigger(gg_trg_CastleBoss1)
call EnableTrigger(gg_trg_CastelBoss2)
call EnableTrigger(gg_trg_CastleBossDie)
call EnableTrigger(gg_trg_CastleBossBug)
endfunction
//===========================================================================
function InitTrig_DemonArmySpawn takes nothing returns nothing
set gg_trg_DemonArmySpawn = CreateTrigger( )
call DisableTrigger( gg_trg_DemonArmySpawn )
call TriggerAddAction( gg_trg_DemonArmySpawn, function Trig_DemonArmySpawn_Actions )
endfunction
function Trig_DemonArmyAttack_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(4) ) ) then
return false
endif
return true
endfunction
function Trig_DemonArmyAttack_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = Location(11500, -7000)
call IssuePointOrderLoc( u, "attack", l )
set u = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_DemonArmyAttack takes nothing returns nothing
set gg_trg_DemonArmyAttack = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_DemonArmyAttack, gg_rct_GoArmy )
call TriggerAddCondition( gg_trg_DemonArmyAttack, Condition( function Trig_DemonArmyAttack_Conditions ) )
call TriggerAddAction( gg_trg_DemonArmyAttack, function Trig_DemonArmyAttack_Actions )
endfunction
function Trig_DemonAttackers_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetAttacker()) == Player(4) ) ) then
return false
endif
return true
endfunction
function Trig_DemonAttackers_Actions takes nothing returns nothing
local unit u = GetAttacker()
local unit u2 = GetTriggerUnit()
local location l = GetUnitLoc(u2)
local unit u3
local real a
local integer i
if (( GetUnitTypeId(u) == 'n01P' ) and (SpellBossCheck(u) == true)) then
set a = GetUnitState(u, UNIT_STATE_MANA) - 200
set i = GetRandomInt(1, 100)
if ((a > 0) and (i <= 30)) then
call SetUnitState(u, UNIT_STATE_MANA, a)
set u3 = CreateUnitAtLoc(Player(4), 'u012', l, 0)
call UnitAddAbility(u3, 'A09E')
call IssuePointOrderLoc( u3, "rainoffire", l )
else
call SetUnitState(u, UNIT_STATE_MANA, a + 100)
set u3 = CreateUnitAtLoc(Player(4), 'u012', l, 0)
call UnitAddAbility(u3, 'A09F')
call IssueTargetOrder(u3, "cripple", u2)
endif
endif
if (( GetUnitTypeId(u) == 'n01R' ) and (SpellBossCheck(u) == true)) then
set a = GetUnitState(u, UNIT_STATE_MANA) - 200
set i = GetRandomInt(1, 100)
if ((a > 0) and (i <= 35)) then
call SetUnitState(u, UNIT_STATE_MANA, a)
set u3 = CreateUnitAtLoc(Player(4), 'u012', l, 0)
call UnitAddAbility(u3, 'A09H')
call IssueTargetOrder(u3, "chainlightning", u2)
endif
endif
set u = null
set u2 = null
set u3 = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_DemonAttackers takes nothing returns nothing
set gg_trg_DemonAttackers = CreateTrigger( )
call DisableTrigger( gg_trg_DemonAttackers )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DemonAttackers, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_DemonAttackers, Condition( function Trig_DemonAttackers_Conditions ) )
call TriggerAddAction( gg_trg_DemonAttackers, function Trig_DemonAttackers_Actions )
endfunction
function Trig_XPEnemy_Conditions takes nothing returns boolean
local boolean b1 = ( GetOwningPlayer(GetTriggerUnit()) == Player(4) )
local boolean b2 = ( GetUnitTypeId(GetTriggerUnit()) != 'u012' )
return b1 and b2
endfunction
function Trig_XPEnemy_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetUnitLoc(u)
local integer i = GetRandomInt(1, 100)
local integer r = GetRandomInt(1, 100)
local integer a = GetRandomInt(1, 7)
if (i <= (12 + udg_ForestPot)) then
call CreateItemLoc( 'I04E', l )
endif
if (i >= (92 - udg_ForestPot)) then
call CreateItemLoc( 'I04F', l )
endif
if (r <= (5 + udg_ForestRune)) then
if (a == 1) then
call CreateItemLoc( 'I04K', l )
endif
if (a == 2) then
call CreateItemLoc( 'I04L', l )
endif
if (a == 3) then
call CreateItemLoc( 'I04M', l )
endif
if (a == 4) then
call CreateItemLoc( 'I04N', l )
endif
if (a == 5) then
call CreateItemLoc( 'I04J', l )
endif
if (a == 6) then
call CreateItemLoc( 'I04I', l )
endif
if (a == 7) then
call CreateItemLoc( 'I04H', l )
endif
endif
call RemoveLocation(l)
set l = null
set u = null
endfunction
//===========================================================================
function InitTrig_XPEnemy takes nothing returns nothing
set gg_trg_XPEnemy = CreateTrigger( )
call DisableTrigger( gg_trg_XPEnemy )
call TriggerRegisterAnyUnitEventBJ( gg_trg_XPEnemy, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_XPEnemy, Condition( function Trig_XPEnemy_Conditions ) )
call TriggerAddAction( gg_trg_XPEnemy, function Trig_XPEnemy_Actions )
endfunction
function Trig_CastleBoss1_Conditions takes nothing returns boolean
if ( not ( GetAttacker() == udg_CastleBoss ) ) then
return false
endif
return true
endfunction
function KILLALL takes nothing returns nothing
local unit u = GetEnumUnit()
if (u != gg_unit_nmgv_0287 ) then
call KillUnit(u)
endif
set u = null
endfunction
function Trig_CastleBoss1_Actions takes nothing returns nothing
local location l = GetUnitLoc(udg_CastleBoss)
local unit u
local real t
loop
exitwhen SpellBossCheck(udg_CastleBoss) == true
call PolledWait(0.3)
endloop
set t = GetUnitState(udg_CastleBoss, UNIT_STATE_MANA)
if (t >= 400) then
set u = CreateUnitAtLoc(Player(4), 'u012', l, 0)
call UnitAddAbility(u, 'A0AL')
call IssuePointOrderLoc( u, "earthquake", l )
call ForGroup(udg_CastleGroup, function KILLALL)
call DisableTrigger(gg_trg_CastleBoss1)
call SetUnitState(udg_CastleBoss, UNIT_STATE_MANA, (t - 400))
set u = CreateUnitAtLoc(Player(4), 'u012', l, 0)
call UnitAddAbility(u, 'A09J')
call IssueImmediateOrder(u, "creepthunderclap")
call PolledWait(30)
if (GetUnitState(udg_CastleBoss, UNIT_STATE_LIFE) >= 0.405) then
call EnableTrigger(gg_trg_CastleBoss1)
endif
endif
call RemoveLocation(l)
set l = null
set u = null
endfunction
//===========================================================================
function InitTrig_CastleBoss1 takes nothing returns nothing
set gg_trg_CastleBoss1 = CreateTrigger( )
call DisableTrigger( gg_trg_CastleBoss1 )
call TriggerRegisterAnyUnitEventBJ( gg_trg_CastleBoss1, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_CastleBoss1, Condition( function Trig_CastleBoss1_Conditions ) )
call TriggerAddAction( gg_trg_CastleBoss1, function Trig_CastleBoss1_Actions )
endfunction
function Trig_CastelBoss2_Conditions takes nothing returns boolean
if ( not ( GetAttacker() == udg_CastleBoss ) ) then
return false
endif
return true
endfunction
function Trig_CastelBoss2_Actions takes nothing returns nothing
local location l
local unit u
local real t = GetUnitState(udg_CastleBoss, UNIT_STATE_MANA)
local real a = 0
local location l2
loop
exitwhen SpellBossCheck(udg_CastleBoss) == true
call PolledWait(0.3)
endloop
set t = GetUnitState(udg_CastleBoss, UNIT_STATE_MANA)
if (t >= 200) then
call DisableTrigger(gg_trg_CastelBoss2)
call PolledWait(5)
set l = GetUnitLoc(udg_CastleBoss)
call SetUnitState(udg_CastleBoss, UNIT_STATE_MANA, (t - 200))
loop
exitwhen a > 10
set u = CreateUnitAtLoc(Player(4), 'u012', l, 0)
set l2 = Location(GetLocationX(l) + GetRandomReal(-500, 500), GetLocationY(l) + GetRandomReal(-500, 500))
call UnitAddAbility(u, 'A09K')
call IssuePointOrderLoc(u, "flamestrike", l2)
call RemoveLocation(l2)
set l2 = null
set u = null
set a = a + 1
endloop
call PolledWait(9)
if (GetUnitState(udg_CastleBoss, UNIT_STATE_LIFE) >= 0.405) then
call EnableTrigger(gg_trg_CastelBoss2)
endif
endif
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_CastelBoss2 takes nothing returns nothing
set gg_trg_CastelBoss2 = CreateTrigger( )
call DisableTrigger( gg_trg_CastelBoss2 )
call TriggerRegisterAnyUnitEventBJ( gg_trg_CastelBoss2, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_CastelBoss2, Condition( function Trig_CastelBoss2_Conditions ) )
call TriggerAddAction( gg_trg_CastelBoss2, function Trig_CastelBoss2_Actions )
endfunction
function Trig_CastleBossDie_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_CastleBoss ) ) then
return false
endif
return true
endfunction
function Trig_CastleBossDie_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_CastleBoss1)
call DisableTrigger( gg_trg_CastelBoss2)
call DisableTrigger( gg_trg_CastleBossDie )
call DisableTrigger( gg_trg_DemonAttackers )
call DisableTrigger( gg_trg_CastleLose )
call DisableTrigger( gg_trg_CastleBossBug )
call PolledWait(2)
call TriggerExecute( gg_trg_StopMUSIC )
call DisplayTextToForce( GetPlayersAll(), "Congratulations! Take your reward: |cffffff003000 gold!|r" )
if (udg_Player1 == true) then
call AdjustPlayerStateBJ( 3000, Player(0), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero1, Location(-5500, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(0), udg_Hero1, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(0), 0 )
endif
if (udg_Player2 == true) then
call AdjustPlayerStateBJ( 3000, Player(1), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero2, Location(-3250, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(1), udg_Hero2, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(1), 0 )
endif
if (udg_Player3 == true) then
call AdjustPlayerStateBJ( 3000, Player(2), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero3, Location(-950, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(2), udg_Hero3, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(2), 0 )
endif
if (udg_Player4 == true) then
call AdjustPlayerStateBJ( 3000, Player(3), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero4, Location(1330, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(3), udg_Hero4, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(3), 0 )
endif
set udg_ForestAttack = 0
set udg_ForestHP = 0
set udg_ForestArmor = 0
set udg_ForestPot = 0
set udg_ForestResist = 0
set udg_ForestRune = 0
call PolledWait(8)
call TriggerExecute( gg_trg_CaveStarter )
endfunction
//===========================================================================
function InitTrig_CastleBossDie takes nothing returns nothing
set gg_trg_CastleBossDie = CreateTrigger( )
call DisableTrigger( gg_trg_CastleBossDie )
call TriggerRegisterAnyUnitEventBJ( gg_trg_CastleBossDie, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_CastleBossDie, Condition( function Trig_CastleBossDie_Conditions ) )
call TriggerAddAction( gg_trg_CastleBossDie, function Trig_CastleBossDie_Actions )
endfunction
function Trig_CastleLose_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_CastleBoss1)
call DisableTrigger( gg_trg_CastelBoss2)
call DisableTrigger( gg_trg_CastleBossDie )
call DisableTrigger( gg_trg_DemonAttackers )
call DisableTrigger( gg_trg_CastleLose )
call DisableTrigger( gg_trg_CastleBossBug )
set udg_CastelStop = true
call TriggerExecute( gg_trg_StopMUSIC )
call DisplayTextToForce( GetPlayersAll(), "You failed the mission... You will get only 1000 gold this time." )
if (udg_Player1 == true) then
call AdjustPlayerStateBJ( 1000, Player(0), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero1, Location(-5500, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(0), udg_Hero1, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(0), 0 )
endif
if (udg_Player2 == true) then
call AdjustPlayerStateBJ( 1000, Player(1), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero2, Location(-3250, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(1), udg_Hero2, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(1), 0 )
endif
if (udg_Player3 == true) then
call AdjustPlayerStateBJ( 1000, Player(2), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero3, Location(-950, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(2), udg_Hero3, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(2), 0 )
endif
if (udg_Player4 == true) then
call AdjustPlayerStateBJ( 1000, Player(3), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero4, Location(1330, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(3), udg_Hero4, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(3), 0 )
endif
set udg_ForestAttack = 0
set udg_ForestHP = 0
set udg_ForestArmor = 0
set udg_ForestPot = 0
set udg_ForestResist = 0
set udg_ForestRune = 0
call PolledWait(8)
call TriggerExecute( gg_trg_CaveStarter )
endfunction
//===========================================================================
function InitTrig_CastleLose takes nothing returns nothing
set gg_trg_CastleLose = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_CastleLose, gg_unit_nmgv_0287, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_CastleLose, function Trig_CastleLose_Actions )
endfunction
function Trig_Boulder_Actions takes nothing returns nothing
set udg_BoulderLogic = 1
set udg_BoulderLoc[1] = Location(-11258, -640)
set udg_BoulderLoc[2] = Location(-11258, 379)
set udg_BoulderLoc[3] = Location(-10240, 379)
set udg_BoulderLoc[4] = Location(-10240, -640)
set udg_Boulder = CreateUnit(Player(4), 'u00W', -11258, -640, 90)
call IssuePointOrderLoc( udg_Boulder, "move", udg_BoulderLoc[2] )
call EnableTrigger(gg_trg_Bouldertimer)
endfunction
//===========================================================================
function InitTrig_Boulder takes nothing returns nothing
set gg_trg_Boulder = CreateTrigger( )
call DisableTrigger( gg_trg_Boulder )
call TriggerAddAction( gg_trg_Boulder, function Trig_Boulder_Actions )
endfunction
function Trig_Bouldertimer_Actions takes nothing returns nothing
local location l = GetUnitLoc(udg_Boulder)
local integer next
local integer next2
local location l2
local real x
local real y
local real z
if (udg_BoulderLogic == 4) then
set next = 1
else
set next = udg_BoulderLogic + 1
endif
set x = GetLocationX(udg_BoulderLoc[next]) - GetLocationX(l)
set y = GetLocationY(udg_BoulderLoc[next]) - GetLocationY(l)
set z = SquareRoot(x * x + y * y)
if (next == 4) then
set next2 = 1
else
set next2 = next + 1
endif
if (z <= 40) then
call IssuePointOrderLoc( udg_Boulder, "move", udg_BoulderLoc[next2] )
set udg_BoulderLogic = udg_BoulderLogic + 1
if (udg_BoulderLogic >= 5) then
set udg_BoulderLogic = 1
endif
endif
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_Bouldertimer takes nothing returns nothing
set gg_trg_Bouldertimer = CreateTrigger( )
call DisableTrigger(gg_trg_Bouldertimer)
call TriggerRegisterTimerEvent( gg_trg_Bouldertimer, 0.10, true )
call TriggerAddAction( gg_trg_Bouldertimer, function Trig_Bouldertimer_Actions )
endfunction
function Trig_SpikeTrap_Actions takes nothing returns nothing
local effect e
local real a
local location l1
local location l2
local location l3
local location l4
local location l5
set a = 256*GetRandomInt(0, 4)
set l1 = Location(-13058, 2180 - a)
set a = 256*GetRandomInt(0, 4)
set l2 = Location(-12802, 2180 - a)
set a = 256*GetRandomInt(0, 4)
set l3 = Location(-12546, 2180 - a)
set a = 256*GetRandomInt(0, 4)
set l4 = Location(-12290, 2180 - a)
set a = 256*GetRandomInt(0, 4)
set l5 = Location(-12034, 2180 - a)
set e = AddSpecialEffectLoc("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl", l1)
call DestroyEffect(e)
set e = AddSpecialEffectLoc("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl", l2)
call DestroyEffect(e)
set e = AddSpecialEffectLoc("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl", l3)
call DestroyEffect(e)
set e = AddSpecialEffectLoc("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl", l4)
call DestroyEffect(e)
set e = AddSpecialEffectLoc("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl", l5)
call DestroyEffect(e)
call UnitDamagePoint(udg_Boulder, 0, 100, GetLocationX(l1), GetLocationY(l1), 300, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
call UnitDamagePoint(udg_Boulder, 0, 100, GetLocationX(l2), GetLocationY(l2), 300, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
call UnitDamagePoint(udg_Boulder, 0, 100, GetLocationX(l3), GetLocationY(l3), 300, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
call UnitDamagePoint(udg_Boulder, 0, 100, GetLocationX(l4), GetLocationY(l4), 300, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
call UnitDamagePoint(udg_Boulder, 0, 100, GetLocationX(l5), GetLocationY(l5), 300, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set a = 256*GetRandomInt(0, 3)
set l1 = Location(-12930, 2052 - a)
set l2 = Location(-12674, 2052 - a)
set l3 = Location(-12418, 2052 - a)
set l4 = Location(-12162, 2052 - a)
set e = AddSpecialEffectLoc("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl", l1)
call DestroyEffect(e)
set e = AddSpecialEffectLoc("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl", l2)
call DestroyEffect(e)
set e = AddSpecialEffectLoc("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl", l3)
call DestroyEffect(e)
set e = AddSpecialEffectLoc("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl", l4)
call DestroyEffect(e)
call UnitDamagePoint(udg_Boulder, 0, 100, GetLocationX(l1), GetLocationY(l1), 300, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
call UnitDamagePoint(udg_Boulder, 0, 100, GetLocationX(l2), GetLocationY(l2), 300, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
call UnitDamagePoint(udg_Boulder, 0, 100, GetLocationX(l3), GetLocationY(l3), 300, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
call UnitDamagePoint(udg_Boulder, 0, 100, GetLocationX(l4), GetLocationY(l4), 300, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set e = null
call RemoveLocation(l1)
set l1 = null
call RemoveLocation(l2)
set l2 = null
call RemoveLocation(l3)
set l3 = null
call RemoveLocation(l4)
set l4 = null
call RemoveLocation(l5)
set l5 = null
endfunction
//===========================================================================
function InitTrig_SpikeTrap takes nothing returns nothing
set gg_trg_SpikeTrap = CreateTrigger( )
call DisableTrigger( gg_trg_SpikeTrap )
call TriggerRegisterTimerEvent( gg_trg_SpikeTrap, 1.00, true )
call TriggerAddAction( gg_trg_SpikeTrap, function Trig_SpikeTrap_Actions )
endfunction
function Trig_SliceTrap_Actions takes nothing returns nothing
local unit u = CreateUnit(Player(4), 'u00X', -11270, 6524, 90)
local unit u2 = CreateUnit(Player(4), 'u00X', -10753, 7533, 270)
local unit u3 = CreateUnit(Player(4), 'u00X', -10249, 6524, 90)
call IssuePointOrderLoc( u, "patrol", Location(-11270, 7533) )
call IssuePointOrderLoc( u2, "patrol", Location(-10753, 6524) )
call IssuePointOrderLoc( u3, "patrol", Location(-10249, 7533) )
set u = null
set u2 = null
set u3 = null
endfunction
//===========================================================================
function InitTrig_SliceTrap takes nothing returns nothing
set gg_trg_SliceTrap = CreateTrigger( )
call DisableTrigger( gg_trg_SliceTrap )
call TriggerAddAction( gg_trg_SliceTrap, function Trig_SliceTrap_Actions )
endfunction
function Trig_LightTrap_Actions takes nothing returns nothing
set udg_LightLogic = 1
set udg_LightLoc[1] = Location(-7730, 6484)
set udg_LightLoc[2] = Location(-7730, 7600)
set udg_LightLoc[3] = Location(-6621, 7600)
set udg_LightLoc[4] = Location(-6621, 6484)
set udg_Light = CreateUnit(Player(4), 'u00Y', -7730, 6484, 90)
call IssuePointOrderLoc( udg_Light, "move", udg_LightLoc[2] )
set udg_LightLogic2 = 1
set udg_LightLoc2[1] = Location(-6954, 7259)
set udg_LightLoc2[2] = Location(-6954, 6836)
set udg_LightLoc2[3] = Location(-7378, 6836)
set udg_LightLoc2[4] = Location(-7378, 7259)
set udg_Light2 = CreateUnit(Player(4), 'u00Y', -6954, 7259, 270)
call IssuePointOrderLoc( udg_Light2, "move", udg_LightLoc2[2] )
call EnableTrigger(gg_trg_Lighttimer)
call EnableTrigger(gg_trg_Lighttimer2)
call EnableTrigger(gg_trg_Lightattack2)
endfunction
//===========================================================================
function InitTrig_LightTrap takes nothing returns nothing
set gg_trg_LightTrap = CreateTrigger( )
call DisableTrigger( gg_trg_LightTrap )
call TriggerAddAction( gg_trg_LightTrap, function Trig_LightTrap_Actions )
endfunction
function Trig_Lighttimer_Actions takes nothing returns nothing
local location l = GetUnitLoc(udg_Light)
local integer next
local integer next2
local location l2
local real x
local real y
local real z
if (udg_LightLogic == 4) then
set next = 1
else
set next = udg_LightLogic + 1
endif
set x = GetLocationX(udg_LightLoc[next]) - GetLocationX(l)
set y = GetLocationY(udg_LightLoc[next]) - GetLocationY(l)
set z = SquareRoot(x * x + y * y)
if (next == 4) then
set next2 = 1
else
set next2 = next + 1
endif
if (z <= 40) then
call IssuePointOrderLoc( udg_Light, "move", udg_LightLoc[next2] )
set udg_LightLogic = udg_LightLogic + 1
if (udg_LightLogic >= 5) then
set udg_LightLogic = 1
endif
endif
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_Lighttimer takes nothing returns nothing
set gg_trg_Lighttimer = CreateTrigger( )
call DisableTrigger( gg_trg_Lighttimer )
call TriggerRegisterTimerEvent( gg_trg_Lighttimer, 0.1, true )
call TriggerAddAction( gg_trg_Lighttimer, function Trig_Lighttimer_Actions )
endfunction
function Trig_Lighttimer2_Actions takes nothing returns nothing
local location l = GetUnitLoc(udg_Light2)
local integer next
local integer next2
local location l2
local real x
local real y
local real z
if (udg_LightLogic2 == 4) then
set next = 1
else
set next = udg_LightLogic2 + 1
endif
set x = GetLocationX(udg_LightLoc2[next]) - GetLocationX(l)
set y = GetLocationY(udg_LightLoc2[next]) - GetLocationY(l)
set z = SquareRoot(x * x + y * y)
if (next == 4) then
set next2 = 1
else
set next2 = next + 1
endif
if (z <= 40) then
call IssuePointOrderLoc( udg_Light2, "move", udg_LightLoc2[next2] )
set udg_LightLogic2 = udg_LightLogic2 + 1
if (udg_LightLogic2 >= 5) then
set udg_LightLogic2 = 1
endif
endif
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_Lighttimer2 takes nothing returns nothing
set gg_trg_Lighttimer2 = CreateTrigger( )
call DisableTrigger( gg_trg_Lighttimer2 )
call TriggerRegisterTimerEvent( gg_trg_Lighttimer2, 0.10, true )
call TriggerAddAction( gg_trg_Lighttimer2, function Trig_Lighttimer2_Actions )
endfunction
function LightCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), Player(4)) == true)
return b1 and b2
endfunction
function LightAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
local unit u2 = CreateUnit(Player(4), 'u00Z', -7170, 7074, 90)
call IssueTargetOrder(u2, "attack", u)
set u = null
set u2 = null
endfunction
function Trig_Lightattack2_Actions takes nothing returns nothing
local group g = CreateGroup()
local location l = GetUnitLoc(udg_Light)
local group g2 = CreateGroup()
local location l2 = GetUnitLoc(udg_Light2)
call GroupEnumUnitsInRangeOfLoc(g, l, 250, Condition(function LightCheck1))
call ForGroup(g, function LightAct1)
call GroupEnumUnitsInRangeOfLoc(g2, l2, 250, Condition(function LightCheck1))
call ForGroup(g2, function LightAct1)
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
call RemoveLocation(l2)
set l2 = null
call DestroyGroup(g2)
set g2 = null
endfunction
//===========================================================================
function InitTrig_Lightattack2 takes nothing returns nothing
set gg_trg_Lightattack2 = CreateTrigger( )
call DisableTrigger( gg_trg_Lightattack2 )
call TriggerRegisterTimerEvent( gg_trg_Lightattack2, 0.20, true )
call TriggerAddAction( gg_trg_Lightattack2, function Trig_Lightattack2_Actions )
endfunction
function Trig_KnifesTrap_Actions takes nothing returns nothing
local integer i = GetRandomInt(1, 4)
local effect e
local location l
if (i == 1) then
set l = Location(-5760, 1290)
set e = AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\FanOfKnives\\FanOfKnivesCaster.mdl", l)
call UnitDamagePoint(udg_Boulder, 0, 250, GetLocationX(l), GetLocationY(l), 350, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
endif
if (i == 2) then
set l = Location(-5000, 2043)
set e = AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\FanOfKnives\\FanOfKnivesCaster.mdl", l)
call UnitDamagePoint(udg_Boulder, 0, 250, GetLocationX(l), GetLocationY(l), 350, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
endif
if (i == 3) then
set l = Location(-5000, 1290)
set e = AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\FanOfKnives\\FanOfKnivesCaster.mdl", l)
call UnitDamagePoint(udg_Boulder, 0, 250, GetLocationX(l), GetLocationY(l), 350, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
endif
if (i == 4) then
set l = Location(-5760, 2043)
set e = AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\FanOfKnives\\FanOfKnivesCaster.mdl", l)
call UnitDamagePoint(udg_Boulder, 0, 250, GetLocationX(l), GetLocationY(l), 350, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
endif
call PolledWait(2)
call DestroyEffect(e)
set e = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_KnifesTrap takes nothing returns nothing
set gg_trg_KnifesTrap = CreateTrigger( )
call DisableTrigger( gg_trg_KnifesTrap )
call TriggerRegisterTimerEvent( gg_trg_KnifesTrap, 1.00, true )
call TriggerAddAction( gg_trg_KnifesTrap, function Trig_KnifesTrap_Actions )
endfunction
function Trig_FireTrap_Actions takes nothing returns nothing
set udg_Firetrap[1] = CreateUnit(Player(4), 'u010', -5892, 4736, 0)
set udg_Firetrap[2] = CreateUnit(Player(4), 'u010', -5892, 4997, 0)
set udg_Firetrap[3] = CreateUnit(Player(4), 'u010', -5892, 5249, 0)
set udg_Firetrap[4] = CreateUnit(Player(4), 'u010', -5892, 5509, 0)
set udg_Firetrap[5] = CreateUnit(Player(4), 'u010', -5892, 5762, 0)
call EnableTrigger(gg_trg_FireTimer)
endfunction
//===========================================================================
function InitTrig_FireTrap takes nothing returns nothing
set gg_trg_FireTrap = CreateTrigger( )
call DisableTrigger( gg_trg_FireTrap )
call TriggerAddAction( gg_trg_FireTrap, function Trig_FireTrap_Actions )
endfunction
function Trig_FireTimer_Actions takes nothing returns nothing
local location l1 = Location(-5892 + GetRandomReal(450,1000), 4736)
local location l2 = Location(-5892 + GetRandomReal(450,1000), 4997)
local location l3 = Location(-5892 + GetRandomReal(450,1000), 5249)
local location l4 = Location(-5892 + GetRandomReal(450,1000), 5509)
local location l5 = Location(-5892 + GetRandomReal(450,1000), 5762)
call IssuePointOrderLoc( udg_Firetrap[1], "attackground", l1 )
call IssuePointOrderLoc( udg_Firetrap[2], "attackground", l2 )
call IssuePointOrderLoc( udg_Firetrap[3], "attackground", l3 )
call IssuePointOrderLoc( udg_Firetrap[4], "attackground", l4 )
call IssuePointOrderLoc( udg_Firetrap[5], "attackground", l5 )
call RemoveLocation(l1)
set l1 = null
call RemoveLocation(l2)
set l2 = null
call RemoveLocation(l3)
set l3 = null
call RemoveLocation(l4)
set l4 = null
call RemoveLocation(l5)
set l5 = null
endfunction
//===========================================================================
function InitTrig_FireTimer takes nothing returns nothing
set gg_trg_FireTimer = CreateTrigger( )
call DisableTrigger( gg_trg_FireTimer )
call TriggerRegisterTimerEvent( gg_trg_FireTimer, 1.50, true )
call TriggerAddAction( gg_trg_FireTimer, function Trig_FireTimer_Actions )
endfunction
function Trig_XPGained_Conditions takes nothing returns boolean
local boolean b1 =( GetOwningPlayer(GetTriggerUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) or GetOwningPlayer(GetTriggerUnit()) == Player(4) )
local boolean b2 =( GetUnitAbilityLevel(GetTriggerUnit(), 'Aloc') <= 0 )
return b1 and b2
endfunction
function Trig_XPGained_Actions takes nothing returns nothing
local integer a = 6 - udg_PlayerFactor
if ((udg_Player1 == true) and (GetHeroLevel(udg_Hero1) < udg_MaxLevel)) then
call AddHeroXP( udg_Hero1, a, false )
endif
if ((udg_Player2 == true) and (GetHeroLevel(udg_Hero2) < udg_MaxLevel)) then
call AddHeroXP( udg_Hero2, a, false )
endif
if ((udg_Player3 == true) and (GetHeroLevel(udg_Hero3) < udg_MaxLevel)) then
call AddHeroXP( udg_Hero3, a, false )
endif
if ((udg_Player4 == true) and (GetHeroLevel(udg_Hero4) < udg_MaxLevel)) then
call AddHeroXP( udg_Hero4, a, false )
endif
endfunction
//===========================================================================
function InitTrig_XPGained takes nothing returns nothing
set gg_trg_XPGained = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_XPGained, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_XPGained, Condition( function Trig_XPGained_Conditions ) )
call TriggerAddAction( gg_trg_XPGained, function Trig_XPGained_Actions )
endfunction
function Trig_TempleBossDie_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_SunAttack)
call DisableTrigger( gg_trg_TempleAttackers )
call DisableTrigger( gg_trg_TempleBossDie )
call PolledWait(2)
call TriggerExecute( gg_trg_StopMUSIC )
call DisplayTextToForce( GetPlayersAll(), "Congratulations! Take your reward: |cffffff001000 gold!|r" )
if (udg_Player1 == true) then
call AdjustPlayerStateBJ( 1000, Player(0), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero1, Location(-5500, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(0), udg_Hero1, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(0), 0 )
endif
if (udg_Player2 == true) then
call AdjustPlayerStateBJ( 1000, Player(1), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero2, Location(-3250, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(1), udg_Hero2, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(1), 0 )
endif
if (udg_Player3 == true) then
call AdjustPlayerStateBJ( 1000, Player(2), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero3, Location(-950, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(2), udg_Hero3, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(2), 0 )
endif
if (udg_Player4 == true) then
call AdjustPlayerStateBJ( 1000, Player(3), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero4, Location(1330, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(3), udg_Hero4, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(3), 0 )
endif
set udg_ForestAttack = 0
set udg_ForestHP = 0
set udg_ForestArmor = 0
set udg_ForestPot = 0
set udg_ForestResist = 0
set udg_ForestRune = 0
call PolledWait(8)
call TriggerExecute( gg_trg_StartCastle )
endfunction
//===========================================================================
function InitTrig_TempleBossDie takes nothing returns nothing
set gg_trg_TempleBossDie = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_TempleBossDie, gg_unit_n01K_0273, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_TempleBossDie, function Trig_TempleBossDie_Actions )
endfunction
function Trig_SunAttack_Conditions takes nothing returns boolean
if ( not ( GetAttacker() == gg_unit_n01K_0273 ) ) then
return false
endif
return true
endfunction
function Trig_SunAttack_Actions takes nothing returns nothing
local real a = GetUnitState(gg_unit_n01K_0273, UNIT_STATE_MANA)
set udg_SunDis = 0
set udg_SunAngle = GetRandomReal(0, 300)
loop
exitwhen SpellBossCheck(gg_unit_n01K_0273) == true
call PolledWait(0.3)
endloop
set a = GetUnitState(gg_unit_n01K_0273, UNIT_STATE_MANA)
if (a >= 150) then
call SetUnitState(gg_unit_n01K_0273, UNIT_STATE_MANA, (a - 150))
call EnableTrigger( gg_trg_SunGodRage )
call DisableTrigger( GetTriggeringTrigger() )
call PolledWait( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endif
endfunction
//===========================================================================
function InitTrig_SunAttack takes nothing returns nothing
set gg_trg_SunAttack = CreateTrigger( )
call DisableTrigger( gg_trg_SunAttack )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SunAttack, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_SunAttack, Condition( function Trig_SunAttack_Conditions ) )
call TriggerAddAction( gg_trg_SunAttack, function Trig_SunAttack_Actions )
endfunction
function SunBoss1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_n01K_0273)) == true)
return b1 and b2
endfunction
function SunBossAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
call UnitDamageTarget(gg_unit_n01K_0273, u, 250, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function Trig_SunGodRage_Actions takes nothing returns nothing
local location l = GetUnitLoc(gg_unit_n01K_0273)
local real x
local real y
local location l2
local effect e
local group g = CreateGroup()
set udg_SunDis = udg_SunDis + 20
set udg_SunAngle = udg_SunAngle + 24
if (udg_SunAngle > 360) then
set udg_SunAngle = udg_SunAngle - 360
endif
if (udg_SunDis >= 480) then
call DisableTrigger( gg_trg_SunGodRage )
endif
set x = GetLocationX(l) + udg_SunDis * Cos(udg_SunAngle * 0.01745)
set y = GetLocationY(l) + udg_SunDis * Sin(udg_SunAngle * 0.01745)
set l2 = Location(x, y)
call GroupEnumUnitsInRangeOfLoc(g, l2, 100, Condition(function SunBoss1))
call ForGroup(g, function SunBossAct1)
set e = AddSpecialEffectLoc("war3mapImported\\Shining Flare.mdx", l2)
call DestroyEffect(e)
set e = null
call RemoveLocation(l2)
set l2 = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_SunGodRage takes nothing returns nothing
set gg_trg_SunGodRage = CreateTrigger( )
call DisableTrigger( gg_trg_SunGodRage )
call TriggerRegisterTimerEvent( gg_trg_SunGodRage, 0.08, true )
call TriggerAddAction( gg_trg_SunGodRage, function Trig_SunGodRage_Actions )
endfunction
function Trig_TempleBossSpawn_Actions takes nothing returns nothing
local integer i
local real a = 0
local location l
local unit u
local effect e
local integer ut
local location l2
call DisableTrigger( GetTriggeringTrigger() )
call UnitAddAbility( gg_unit_n01K_0273, 'Amrf' )
call UnitRemoveAbility( gg_unit_n01K_0273, 'Amrf' )
call PauseUnit(gg_unit_n01K_0273, true)
call SetUnitFlyHeight( gg_unit_n01K_0273, 1200, 1000)
call PolledWait(1.3)
set l2 = GetUnitLoc(gg_unit_n01K_0273)
call SetUnitPositionLoc(gg_unit_n01K_0273, Location(-13280,9870))
loop
exitwhen a >= 4 + 4*udg_PlayerFactor
set a = a + 1
set l = Location(10200 + GetRandomReal(-500, 500), -11368 + GetRandomReal(-500, 500))
set i = GetRandomInt(1, 100)
if (i <= 70) then
set ut = 'n01C'
else
set ut = 'n01G'
endif
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), ut, GetLocationX(l), GetLocationY(l), GetRandomReal(0, 360))
set e = AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\FaerieDragonInvis\\FaerieDragon_Invis.mdl", l)
call DestroyEffect(e)
call RemoveLocation(l)
set l = null
set u = null
set e = null
call PolledWait(1.5)
endloop
call PolledWait(1.3)
call SetUnitPositionLoc(gg_unit_n01K_0273, l2)
call SetUnitFlyHeight( gg_unit_n01K_0273, 300, 1000)
call PauseUnit(gg_unit_n01K_0273, false)
call RemoveLocation(l2)
set l2 = null
endfunction
//===========================================================================
function InitTrig_TempleBossSpawn takes nothing returns nothing
set gg_trg_TempleBossSpawn = CreateTrigger( )
call TriggerRegisterUnitLifeEvent( gg_trg_TempleBossSpawn, gg_unit_n01K_0273, LESS_THAN, 4000.00 )
call TriggerAddAction( gg_trg_TempleBossSpawn, function Trig_TempleBossSpawn_Actions )
endfunction
function Trig_TempleBoss_Actions takes nothing returns nothing
local string s
set udg_TeleportPoint = Location(10232, -11500)
set udg_ForestPot = 0
set udg_ForestHP = 0
set udg_ForestAttack = 0
set udg_ForestArmor = 0
set udg_ForestRune = 0
set udg_ForestResist = 0
call CreateFogModifierRectBJ( true, Player(0), FOG_OF_WAR_VISIBLE, gg_rct_GodArea )
call FogModifierStart( GetLastCreatedFogModifier() )
call CreateFogModifierRectBJ( true, Player(1), FOG_OF_WAR_VISIBLE, gg_rct_GodArea )
call FogModifierStart( GetLastCreatedFogModifier() )
call CreateFogModifierRectBJ( true, Player(2), FOG_OF_WAR_VISIBLE, gg_rct_GodArea )
call FogModifierStart( GetLastCreatedFogModifier() )
call CreateFogModifierRectBJ( true, Player(3), FOG_OF_WAR_VISIBLE, gg_rct_GodArea )
call FogModifierStart( GetLastCreatedFogModifier() )
call DisableTrigger(gg_trg_NeutralPotions)
call DisableTrigger( gg_trg_Cam14 )
call CinematicModeBJ( true, GetPlayersAll() )
if (udg_Player1 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero1, GetRandomLocInRect(gg_rct_Boss4), 90.00 )
call CameraSetupApplyForPlayer( true, gg_cam_Camera_025, Player(0), 0 )
endif
if (udg_Player2 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero2, GetRandomLocInRect(gg_rct_Boss4), 90.00 )
call CameraSetupApplyForPlayer( true, gg_cam_Camera_025, Player(1), 0 )
endif
if (udg_Player3 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero3, GetRandomLocInRect(gg_rct_Boss4), 90.00 )
call CameraSetupApplyForPlayer( true, gg_cam_Camera_025, Player(2), 0 )
endif
if (udg_Player4 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero4, GetRandomLocInRect(gg_rct_Boss4), 90.00 )
call CameraSetupApplyForPlayer( true, gg_cam_Camera_025, Player(3), 0 )
endif
call PauseAllUnitsBJ( true )
call PolledWait( 1.00 )
if (udg_Player1 == true) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_026, Player(0), 5.00 )
endif
if (udg_Player2 == true) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_026, Player(0), 5.00 )
endif
if (udg_Player3 == true) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_026, Player(0), 5.00 )
endif
if (udg_Player4 == true) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_026, Player(0), 5.00 )
endif
call PolledWait(5)
call CinematicModeBJ( false, GetPlayersAll() )
set s = "|cffffff00Boss: Quetzalcoatl!|r "
call DisplayTextToForce( GetPlayersAll(), s )
set s = "|cffffff00Abilities:|r 'Sunstrike', 'Magic Resistance', 'Elite Lizards' и 'Incineration'"
call DisplayTextToForce( GetPlayersAll(), s )
call PolledWait(4)
call EnableTrigger( gg_trg_Cam14 )
call PauseAllUnitsBJ( false )
call EnableTrigger( gg_trg_SunAttack )
call UnitAddAbility(gg_unit_n01K_0273, 'A09L')
endfunction
//===========================================================================
function InitTrig_TempleBoss takes nothing returns nothing
set gg_trg_TempleBoss = CreateTrigger( )
call TriggerAddAction( gg_trg_TempleBoss, function Trig_TempleBoss_Actions )
endfunction
function Trig_DeadRegion_Actions takes nothing returns nothing
local real x
local real y
local integer a = 0
local effect e
call DisableTrigger( GetTriggeringTrigger() )
loop
exitwhen a > 10
set a = a + 1
set x = GetRandomReal(-11170, -10254)
set y = GetRandomReal(-2208, -1811)
call CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01J', x, y, GetRandomReal(0, 360))
set e = AddSpecialEffectLoc("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl", Location(x, y))
call DestroyEffect(e)
set e = null
call PolledWait(1)
endloop
endfunction
//===========================================================================
function InitTrig_DeadRegion takes nothing returns nothing
set gg_trg_DeadRegion = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_DeadRegion, gg_rct_Switch7 )
call TriggerAddAction( gg_trg_DeadRegion, function Trig_DeadRegion_Actions )
endfunction
function Trig_CreateItemRoom_Actions takes nothing returns nothing
local location l1 = Location(-11250, 8400)
local location l2 = Location(-10245, 8842)
local location l3 = Location(-11250, 9353)
local integer a = GetRandomInt(1, 8)
call CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'u011', -7162, -1909, 0)
if (a == 1) then
call CreateItemLoc( 'I004', l1 )
endif
if (a == 2) then
call CreateItemLoc( 'I001', l1 )
endif
if (a == 3) then
call CreateItemLoc( 'I00G', l1 )
endif
if (a == 4) then
call CreateItemLoc( 'I00D', l1 )
endif
if (a == 5) then
call CreateItemLoc( 'I003', l1 )
endif
if (a == 6) then
call CreateItemLoc( 'I00C', l1 )
endif
if (a == 7) then
call CreateItemLoc( 'I005', l1 )
endif
if (a == 8) then
call CreateItemLoc( 'I000', l1 )
endif
set a = GetRandomInt(1, 8)
if (a == 1) then
call CreateItemLoc( 'I004', l3 )
endif
if (a == 2) then
call CreateItemLoc( 'I001', l3 )
endif
if (a == 3) then
call CreateItemLoc( 'I00G', l3 )
endif
if (a == 4) then
call CreateItemLoc( 'I00D', l3 )
endif
if (a == 5) then
call CreateItemLoc( 'I003', l3 )
endif
if (a == 6) then
call CreateItemLoc( 'I00C', l3 )
endif
if (a == 7) then
call CreateItemLoc( 'I005', l3 )
endif
if (a == 8) then
call CreateItemLoc( 'I000', l3 )
endif
set a = GetRandomInt(1, 8)
if (a == 1) then
call CreateItemLoc( 'I00R', l2 )
endif
if (a == 2) then
call CreateItemLoc( 'I00S', l2 )
endif
if (a == 3) then
call CreateItemLoc( 'I00Y', l2 )
endif
if (a == 4) then
call CreateItemLoc( 'I019', l2 )
endif
if (a == 5) then
call CreateItemLoc( 'I013', l2 )
endif
if (a == 6) then
call CreateItemLoc( 'I017', l2 )
endif
if (a == 7) then
call CreateItemLoc( 'I01V', l2 )
endif
if (a == 8) then
call CreateItemLoc( 'I00X', l2 )
endif
call RemoveLocation(l1)
set l1 = null
call RemoveLocation(l2)
set l2 = null
call RemoveLocation(l3)
set l3 = null
endfunction
//===========================================================================
function InitTrig_CreateItemRoom takes nothing returns nothing
set gg_trg_CreateItemRoom = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_CreateItemRoom, 0.00 )
call TriggerAddAction( gg_trg_CreateItemRoom, function Trig_CreateItemRoom_Actions )
endfunction
function Trig_TempleAttackers_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetAttacker()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_TempleAttackers_Actions takes nothing returns nothing
local unit u = GetAttacker()
local unit u2 = GetTriggerUnit()
local location l = GetUnitLoc(u2)
if ( GetUnitTypeId(u) == 'n01G' ) then
call DisableTrigger(gg_trg_TempleAttackers)
call IssueTargetOrder(u, "manaburn", u2)
call PolledWait(1)
call IssueTargetOrder(u, "attack", u2)
call PolledWait(1)
call EnableTrigger(gg_trg_TempleAttackers)
endif
if ( GetUnitTypeId(u) == 'n01H' ) then
call DisableTrigger(gg_trg_TempleAttackers)
call IssuePointOrderLoc( u, "breathoffire", l )
call PolledWait(1)
call IssueTargetOrder(u, "attack", u2)
call PolledWait(1)
call EnableTrigger(gg_trg_TempleAttackers)
endif
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_TempleAttackers takes nothing returns nothing
set gg_trg_TempleAttackers = CreateTrigger( )
call EnableTrigger( gg_trg_TempleAttackers )
call TriggerRegisterAnyUnitEventBJ( gg_trg_TempleAttackers, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_TempleAttackers, Condition( function Trig_TempleAttackers_Conditions ) )
call TriggerAddAction( gg_trg_TempleAttackers, function Trig_TempleAttackers_Actions )
endfunction
function Trig_TempleSpawn1_Actions takes nothing returns nothing
local integer i
local real a = 0
local location l
local unit u
local effect e
local integer ut
local real atk
local real arm
local real hp
local integer res
call DisableTrigger( GetTriggeringTrigger() )
loop
exitwhen a >= 3 + 3*udg_PlayerFactor
set a = a + 1
set l = Location(-12550 + GetRandomReal(-500, 500), 7050 + GetRandomReal(-500, 500))
set i = GetRandomInt(1, 100)
if (i <= 70) then
set ut = 'n01C'
else
set ut = 'n01H'
endif
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), ut, GetLocationX(l), GetLocationY(l), GetRandomReal(0, 360))
if (udg_ForestArmor >= 1) then
set arm = BlzGetUnitArmor(u) + udg_ForestArmor
call BlzSetUnitArmor( u, arm )
endif
if (udg_ForestAttack >= 1) then
set atk = 0.01*BlzGetUnitBaseDamage(u, 0)*(100 + udg_ForestAttack)
call BlzSetUnitBaseDamage( u, R2I(atk), 0 )
endif
if (udg_ForestHP >= 1) then
set hp = 0.01*GetUnitState(u, UNIT_STATE_MAX_LIFE)*(100 + udg_ForestHP)
call BlzSetUnitMaxHP( u, R2I(hp))
call SetUnitState( u, UNIT_STATE_LIFE, hp)
endif
if (udg_ForestResist >= 1) then
call UnitAddAbility(u, 'A098')
endif
set e = AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\FaerieDragonInvis\\FaerieDragon_Invis.mdl", l)
call DestroyEffect(e)
call RemoveLocation(l)
set l = null
set u = null
set e = null
call PolledWait(1.5)
endloop
endfunction
//===========================================================================
function InitTrig_TempleSpawn1 takes nothing returns nothing
set gg_trg_TempleSpawn1 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_TempleSpawn1, gg_rct_TrapEnter32 )
call TriggerRegisterEnterRectSimple( gg_trg_TempleSpawn1, gg_rct_TrapEnter41 )
call TriggerAddAction( gg_trg_TempleSpawn1, function Trig_TempleSpawn1_Actions )
endfunction
function Trig_TempleSpawn2_Actions takes nothing returns nothing
local integer i
local real a = 0
local location l
local unit u
local effect e
local integer ut
local real atk
local real arm
local real hp
local integer res
call DisableTrigger( GetTriggeringTrigger() )
loop
exitwhen a >= 3 + 3*udg_PlayerFactor
set a = a + 1
set l = Location(-12550 + GetRandomReal(-500, 500), -120 + GetRandomReal(-500, 500))
set i = GetRandomInt(1, 100)
if (i <= 70) then
set ut = 'n01F'
else
set ut = 'n01D'
endif
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), ut, GetLocationX(l), GetLocationY(l), GetRandomReal(0, 360))
if (udg_ForestArmor >= 1) then
set arm = BlzGetUnitArmor(u) + udg_ForestArmor
call BlzSetUnitArmor( u, arm )
endif
if (udg_ForestAttack >= 1) then
set atk = 0.01*BlzGetUnitBaseDamage(u, 0)*(100 + udg_ForestAttack)
call BlzSetUnitBaseDamage( u, R2I(atk), 0 )
endif
if (udg_ForestHP >= 1) then
set hp = 0.01*GetUnitState(u, UNIT_STATE_MAX_LIFE)*(100 + udg_ForestHP)
call BlzSetUnitMaxHP( u, R2I(hp))
call SetUnitState( u, UNIT_STATE_LIFE, hp)
endif
if (udg_ForestResist >= 1) then
call UnitAddAbility(u, 'A098')
endif
set e = AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\FaerieDragonInvis\\FaerieDragon_Invis.mdl", l)
call DestroyEffect(e)
call RemoveLocation(l)
set l = null
set u = null
set e = null
call PolledWait(1.5)
endloop
endfunction
//===========================================================================
function InitTrig_TempleSpawn2 takes nothing returns nothing
set gg_trg_TempleSpawn2 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_TempleSpawn2, gg_rct_TrapEnter52 )
call TriggerRegisterEnterRectSimple( gg_trg_TempleSpawn2, gg_rct_TrapEnter61 )
call TriggerAddAction( gg_trg_TempleSpawn2, function Trig_TempleSpawn2_Actions )
endfunction
function Trig_TempleSpawn3_Actions takes nothing returns nothing
local integer i
local real a = 0
local location l
local unit u
local effect e
local integer ut
local real atk
local real arm
local real hp
local integer res
call DisableTrigger( GetTriggeringTrigger() )
loop
exitwhen a >= 3 + 3*udg_PlayerFactor
set a = a + 1
set l = Location(-5370 + GetRandomReal(-500, 500), 7050 + GetRandomReal(-500, 500))
set i = GetRandomInt(1, 100)
if (i <= 70) then
set ut = 'n01F'
else
set ut = 'n01G'
endif
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), ut, GetLocationX(l), GetLocationY(l), GetRandomReal(0, 360))
if (udg_ForestArmor >= 1) then
set arm = BlzGetUnitArmor(u) + udg_ForestArmor
call BlzSetUnitArmor( u, arm )
endif
if (udg_ForestAttack >= 1) then
set atk = 0.01*BlzGetUnitBaseDamage(u, 0)*(100 + udg_ForestAttack)
call BlzSetUnitBaseDamage( u, R2I(atk), 0 )
endif
if (udg_ForestHP >= 1) then
set hp = 0.01*GetUnitState(u, UNIT_STATE_MAX_LIFE)*(100 + udg_ForestHP)
call BlzSetUnitMaxHP( u, R2I(hp))
call SetUnitState( u, UNIT_STATE_LIFE, hp)
endif
if (udg_ForestResist >= 1) then
call UnitAddAbility(u, 'A098')
endif
set e = AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\FaerieDragonInvis\\FaerieDragon_Invis.mdl", l)
call DestroyEffect(e)
call RemoveLocation(l)
set l = null
set u = null
set e = null
call PolledWait(1.5)
endloop
endfunction
//===========================================================================
function InitTrig_TempleSpawn3 takes nothing returns nothing
set gg_trg_TempleSpawn3 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_TempleSpawn3, gg_rct_TrapEnter21 )
call TriggerRegisterEnterRectSimple( gg_trg_TempleSpawn3, gg_rct_TrapEnter12 )
call TriggerAddAction( gg_trg_TempleSpawn3, function Trig_TempleSpawn3_Actions )
endfunction
function Trig_TempleSpawn4_Actions takes nothing returns nothing
local integer i
local real a = 0
local location l
local unit u
local effect e
local integer ut
local real atk
local real arm
local real hp
local integer res
call DisableTrigger( GetTriggeringTrigger() )
loop
exitwhen a >= 3 + 3*udg_PlayerFactor
set a = a + 1
set l = Location(-5370 + GetRandomReal(-500, 500), -120 + GetRandomReal(-500, 500))
set i = GetRandomInt(1, 100)
if (i <= 70) then
set ut = 'n01C'
else
set ut = 'n01G'
endif
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), ut, GetLocationX(l), GetLocationY(l), GetRandomReal(0, 360))
if (udg_ForestArmor >= 1) then
set arm = BlzGetUnitArmor(u) + udg_ForestArmor
call BlzSetUnitArmor( u, arm )
endif
if (udg_ForestAttack >= 1) then
set atk = 0.01*BlzGetUnitBaseDamage(u, 0)*(100 + udg_ForestAttack)
call BlzSetUnitBaseDamage( u, R2I(atk), 0 )
endif
if (udg_ForestHP >= 1) then
set hp = 0.01*GetUnitState(u, UNIT_STATE_MAX_LIFE)*(100 + udg_ForestHP)
call BlzSetUnitMaxHP( u, R2I(hp))
call SetUnitState( u, UNIT_STATE_LIFE, hp)
endif
if (udg_ForestResist >= 1) then
call UnitAddAbility(u, 'A098')
endif
set e = AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\FaerieDragonInvis\\FaerieDragon_Invis.mdl", l)
call DestroyEffect(e)
call RemoveLocation(l)
set l = null
set u = null
set e = null
call PolledWait(1.5)
endloop
endfunction
//===========================================================================
function InitTrig_TempleSpawn4 takes nothing returns nothing
set gg_trg_TempleSpawn4 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_TempleSpawn4, gg_rct_TrapEnter81 )
call TriggerRegisterEnterRectSimple( gg_trg_TempleSpawn4, gg_rct_TrapEnter72 )
call TriggerAddAction( gg_trg_TempleSpawn4, function Trig_TempleSpawn4_Actions )
endfunction
function Trig_TempleSpawn5_Actions takes nothing returns nothing
local integer i
local real a = 0
local location l
local unit u
local effect e
local integer ut
local real atk
local real arm
local real hp
local integer res
call DisableTrigger( GetTriggeringTrigger() )
loop
exitwhen a >= 3 + 3*udg_PlayerFactor
set a = a + 1
set l = Location(-8950 + GetRandomReal(-500, 500), 7050 + GetRandomReal(-500, 500))
set i = GetRandomInt(1, 100)
if (i <= 65) then
set ut = 'n01E'
else
set ut = 'n01H'
endif
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), ut, GetLocationX(l), GetLocationY(l), GetRandomReal(0, 360))
if (udg_ForestArmor >= 1) then
set arm = BlzGetUnitArmor(u) + udg_ForestArmor
call BlzSetUnitArmor( u, arm )
endif
if (udg_ForestAttack >= 1) then
set atk = 0.01*BlzGetUnitBaseDamage(u, 0)*(100 + udg_ForestAttack)
call BlzSetUnitBaseDamage( u, R2I(atk), 0 )
endif
if (udg_ForestHP >= 1) then
set hp = 0.01*GetUnitState(u, UNIT_STATE_MAX_LIFE)*(100 + udg_ForestHP)
call BlzSetUnitMaxHP( u, R2I(hp))
call SetUnitState( u, UNIT_STATE_LIFE, hp)
endif
if (udg_ForestResist >= 1) then
call UnitAddAbility(u, 'A098')
endif
set e = AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\FaerieDragonInvis\\FaerieDragon_Invis.mdl", l)
call DestroyEffect(e)
call RemoveLocation(l)
set l = null
set u = null
set e = null
call PolledWait(1.5)
endloop
endfunction
//===========================================================================
function InitTrig_TempleSpawn5 takes nothing returns nothing
set gg_trg_TempleSpawn5 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_TempleSpawn5, gg_rct_TrapEnter31 )
call TriggerRegisterEnterRectSimple( gg_trg_TempleSpawn5, gg_rct_TrapEnter22 )
call TriggerAddAction( gg_trg_TempleSpawn5, function Trig_TempleSpawn5_Actions )
endfunction
function Trig_TempleSpawn6_Actions takes nothing returns nothing
local integer i
local real a = 0
local location l
local unit u
local effect e
local integer ut
local real atk
local real arm
local real hp
local integer res
call DisableTrigger( GetTriggeringTrigger() )
loop
exitwhen a >= 3 + 3*udg_PlayerFactor
set a = a + 1
set l = Location(-8950 + GetRandomReal(-500, 500), -125 + GetRandomReal(-500, 500))
set i = GetRandomInt(1, 100)
if (i <= 65) then
set ut = 'n01E'
else
set ut = 'n01D'
endif
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), ut, GetLocationX(l), GetLocationY(l), GetRandomReal(0, 360))
if (udg_ForestArmor >= 1) then
set arm = BlzGetUnitArmor(u) + udg_ForestArmor
call BlzSetUnitArmor( u, arm )
endif
if (udg_ForestAttack >= 1) then
set atk = 0.01*BlzGetUnitBaseDamage(u, 0)*(100 + udg_ForestAttack)
call BlzSetUnitBaseDamage( u, R2I(atk), 0 )
endif
if (udg_ForestHP >= 1) then
set hp = 0.01*GetUnitState(u, UNIT_STATE_MAX_LIFE)*(100 + udg_ForestHP)
call BlzSetUnitMaxHP( u, R2I(hp))
call SetUnitState( u, UNIT_STATE_LIFE, hp)
endif
if (udg_ForestResist >= 1) then
call UnitAddAbility(u, 'A098')
endif
set e = AddSpecialEffectLoc("Abilities\\Spells\\NightElf\\FaerieDragonInvis\\FaerieDragon_Invis.mdl", l)
call DestroyEffect(e)
call RemoveLocation(l)
set l = null
set u = null
set e = null
call PolledWait(1.5)
endloop
endfunction
//===========================================================================
function InitTrig_TempleSpawn6 takes nothing returns nothing
set gg_trg_TempleSpawn6 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_TempleSpawn6, gg_rct_TrapEnter62 )
call TriggerRegisterEnterRectSimple( gg_trg_TempleSpawn6, gg_rct_TrapEnter71 )
call TriggerAddAction( gg_trg_TempleSpawn6, function Trig_TempleSpawn6_Actions )
endfunction
function BoostTCon takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) )
endfunction
function BoostTAct takes nothing returns nothing
local unit u = GetEnumUnit()
local real atk
local real arm
local real hp
local integer res
if (udg_ForestArmor >= 1) then
set arm = BlzGetUnitArmor(u) + udg_ForestArmor
call BlzSetUnitArmor( u, arm )
endif
if (udg_ForestAttack >= 1) then
set atk = 0.01*BlzGetUnitBaseDamage(u, 0)*(100 + udg_ForestAttack)
call BlzSetUnitBaseDamage( u, R2I(atk), 0 )
endif
if (udg_ForestHP >= 1) then
set hp = 0.01*GetUnitState(u, UNIT_STATE_MAX_LIFE)*(100 + udg_ForestHP)
call BlzSetUnitMaxHP( u, R2I(hp))
call SetUnitState( u, UNIT_STATE_LIFE, hp)
endif
if (udg_ForestResist >= 1) then
call UnitAddAbility(u, 'A098')
endif
set u = null
endfunction
function Trig_BoostMonsters_Actions takes nothing returns nothing
local group g = CreateGroup()
local rect r = Rect(-15457, -2888, -2701, 9957)
call GroupEnumUnitsInRect(g, r, Condition(function BoostTCon))
call ForGroup(g, function BoostTAct)
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_BoostMonsters takes nothing returns nothing
set gg_trg_BoostMonsters = CreateTrigger( )
call DisableTrigger( gg_trg_BoostMonsters )
call TriggerAddAction( gg_trg_BoostMonsters, function Trig_BoostMonsters_Actions )
endfunction
function Trig_Sacrifice1_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_Hero1 ) ) then
return false
endif
return true
endfunction
function Trig_Sacrifice1_Actions takes nothing returns nothing
local real a = GetUnitState(udg_Hero1, UNIT_STATE_MAX_LIFE) - 150
local integer d = BlzGetUnitBaseDamage(udg_Hero1, 0) + 30
local integer i = GetRandomInt(1, 5)
local string s
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl", udg_Hero1, "origin")
call DestroyEffect(e)
call BlzSetUnitMaxHP( udg_Hero1, R2I(a))
call DisableTrigger( GetTriggeringTrigger() )
call DisplayTextToForce( GetForceOfPlayer(Player(0)), "|cffff0000You have sacrificed your own blood! Your max health is decreased by 150|r" )
call PolledWait( 2 )
set s = "And now you will get..."
call DisplayTextToForce( GetForceOfPlayer(Player(0)), s )
call PolledWait( 2 )
if (i == 1) then
set s = "|cffffff00+30 damage!|r"
call BlzSetUnitBaseDamage( udg_Hero1, d, 0 )
call DisplayTextToForce( GetForceOfPlayer(Player(0)), s )
endif
if (i == 2) then
set s = "|cffffff00+50 power!|r"
set udg_Power[GetConvertedPlayerId(Player(0))] = ( udg_Power[GetConvertedPlayerId(Player(0))] + 50 )
call DisplayTextToForce( GetForceOfPlayer(Player(0)), s )
endif
if (i == 3) then
set s = "|cffffff00+15% concentration!|r"
set udg_Cooldawn[GetConvertedPlayerId(Player(0))] = ( udg_Cooldawn[GetConvertedPlayerId(Player(0))] + 0.20 )
call DisplayTextToForce( GetForceOfPlayer(Player(0)), s )
endif
if (i == 4) then
set s = "|cffffff00+15% resistance!|r"
set udg_Resist[GetConvertedPlayerId(Player(0))] = ( udg_Resist[GetConvertedPlayerId(Player(0))] + 15 )
call DisplayTextToForce( GetForceOfPlayer(Player(0)), s )
endif
if (i == 5) then
set s = "|cffffff00+75% critical damage!|r"
set udg_CritDamage[GetConvertedPlayerId(Player(0))] = ( udg_CritDamage[GetConvertedPlayerId(Player(0))] + 0.75 )
call DisplayTextToForce( GetForceOfPlayer(Player(0)), s )
endif
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl", udg_Hero1, "origin")
call DestroyEffect(e)
set e = null
endfunction
//===========================================================================
function InitTrig_Sacrifice1 takes nothing returns nothing
set gg_trg_Sacrifice1 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Sacrifice1, gg_rct_SACRIFICE )
call TriggerAddCondition( gg_trg_Sacrifice1, Condition( function Trig_Sacrifice1_Conditions ) )
call TriggerAddAction( gg_trg_Sacrifice1, function Trig_Sacrifice1_Actions )
endfunction
function Trig_Sacrifice2_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_Hero2 ) ) then
return false
endif
return true
endfunction
function Trig_Sacrifice2_Actions takes nothing returns nothing
local real a = GetUnitState(udg_Hero2, UNIT_STATE_MAX_LIFE) - 150
local integer d = BlzGetUnitBaseDamage(udg_Hero2, 0) + 30
local integer i = GetRandomInt(1, 5)
local string s
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl", udg_Hero2, "origin")
call DestroyEffect(e)
call BlzSetUnitMaxHP( udg_Hero2, R2I(a))
call DisableTrigger( GetTriggeringTrigger() )
call DisplayTextToForce( GetForceOfPlayer(Player(1)), "|cffff0000You have sacrificed your own blood! Your max health is decreased by 150|r" )
call PolledWait( 2 )
set s = "And now you will get..."
call DisplayTextToForce( GetForceOfPlayer(Player(1)), s )
call PolledWait( 2 )
if (i == 1) then
set s = "|cffffff00+30 damage!|r"
call BlzSetUnitBaseDamage( udg_Hero2, d, 0 )
call DisplayTextToForce( GetForceOfPlayer(Player(1)), s )
endif
if (i == 2) then
set s = "|cffffff00+50 power!|r"
set udg_Power[GetConvertedPlayerId(Player(1))] = ( udg_Power[GetConvertedPlayerId(Player(1))] + 50 )
call DisplayTextToForce( GetForceOfPlayer(Player(1)), s )
endif
if (i == 3) then
set s = "|cffffff00+15% concentration!|r"
set udg_Cooldawn[GetConvertedPlayerId(Player(1))] = ( udg_Cooldawn[GetConvertedPlayerId(Player(1))] + 0.20 )
call DisplayTextToForce( GetForceOfPlayer(Player(1)), s )
endif
if (i == 4) then
set s = "|cffffff00+15% resistance!|r"
set udg_Resist[GetConvertedPlayerId(Player(1))] = ( udg_Resist[GetConvertedPlayerId(Player(1))] + 15 )
call DisplayTextToForce( GetForceOfPlayer(Player(1)), s )
endif
if (i == 5) then
set s = "|cffffff00+75% critical damage!|r"
set udg_CritDamage[GetConvertedPlayerId(Player(1))] = ( udg_CritDamage[GetConvertedPlayerId(Player(1))] + 0.75 )
call DisplayTextToForce( GetForceOfPlayer(Player(1)), s )
endif
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl", udg_Hero2, "origin")
call DestroyEffect(e)
set e = null
endfunction
//===========================================================================
function InitTrig_Sacrifice2 takes nothing returns nothing
set gg_trg_Sacrifice2 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Sacrifice2, gg_rct_SACRIFICE )
call TriggerAddCondition( gg_trg_Sacrifice2, Condition( function Trig_Sacrifice2_Conditions ) )
call TriggerAddAction( gg_trg_Sacrifice2, function Trig_Sacrifice2_Actions )
endfunction
function Trig_Sacrifice3_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_Hero3 ) ) then
return false
endif
return true
endfunction
function Trig_Sacrifice3_Actions takes nothing returns nothing
local real a = GetUnitState(udg_Hero3, UNIT_STATE_MAX_LIFE) - 150
local integer d = BlzGetUnitBaseDamage(udg_Hero3, 0) + 30
local integer i = GetRandomInt(1, 5)
local string s
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl", udg_Hero3, "origin")
call DestroyEffect(e)
call BlzSetUnitMaxHP( udg_Hero3, R2I(a))
call DisableTrigger( GetTriggeringTrigger() )
call DisplayTextToForce( GetForceOfPlayer(Player(2)), "|cffff0000You have sacrificed your own blood! Your max health is decreased by 150|r" )
call PolledWait( 2 )
set s = "And now you will get..."
call DisplayTextToForce( GetForceOfPlayer(Player(2)), s )
call PolledWait( 2 )
if (i == 1) then
set s = "|cffffff00+30 damage!|r"
call BlzSetUnitBaseDamage( udg_Hero3, d, 0 )
call DisplayTextToForce( GetForceOfPlayer(Player(2)), s )
endif
if (i == 2) then
set s = "|cffffff00+50 power!|r"
set udg_Power[GetConvertedPlayerId(Player(2))] = ( udg_Power[GetConvertedPlayerId(Player(2))] + 50 )
call DisplayTextToForce( GetForceOfPlayer(Player(2)), s )
endif
if (i == 3) then
set s = "|cffffff00+15% concentration!|r"
set udg_Cooldawn[GetConvertedPlayerId(Player(2))] = ( udg_Cooldawn[GetConvertedPlayerId(Player(2))] + 0.20 )
call DisplayTextToForce( GetForceOfPlayer(Player(2)), s )
endif
if (i == 4) then
set s = "|cffffff00+15% resistance!|r"
set udg_Resist[GetConvertedPlayerId(Player(2))] = ( udg_Resist[GetConvertedPlayerId(Player(2))] + 15 )
call DisplayTextToForce( GetForceOfPlayer(Player(2)), s )
endif
if (i == 5) then
set s = "|cffffff00+75% critical damage!|r"
set udg_CritDamage[GetConvertedPlayerId(Player(2))] = ( udg_CritDamage[GetConvertedPlayerId(Player(2))] + 0.75 )
call DisplayTextToForce( GetForceOfPlayer(Player(2)), s )
endif
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl", udg_Hero3, "origin")
call DestroyEffect(e)
set e = null
endfunction
//===========================================================================
function InitTrig_Sacrifice3 takes nothing returns nothing
set gg_trg_Sacrifice3 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Sacrifice3, gg_rct_SACRIFICE )
call TriggerAddCondition( gg_trg_Sacrifice3, Condition( function Trig_Sacrifice3_Conditions ) )
call TriggerAddAction( gg_trg_Sacrifice3, function Trig_Sacrifice3_Actions )
endfunction
function Trig_Sacrifice4_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_Hero4 ) ) then
return false
endif
return true
endfunction
function Trig_Sacrifice4_Actions takes nothing returns nothing
local real a = GetUnitState(udg_Hero4, UNIT_STATE_MAX_LIFE) - 150
local integer d = BlzGetUnitBaseDamage(udg_Hero4, 0) + 30
local integer i = GetRandomInt(1, 5)
local string s
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl", udg_Hero4, "origin")
call DestroyEffect(e)
call BlzSetUnitMaxHP( udg_Hero4, R2I(a))
call DisableTrigger( GetTriggeringTrigger() )
call DisplayTextToForce( GetForceOfPlayer(Player(3)), "|cffff0000You have sacrificed your own blood! Your max health is decreased by 150|r" )
call PolledWait( 2 )
set s = "And now you will get..."
call DisplayTextToForce( GetForceOfPlayer(Player(3)), s )
call PolledWait( 2 )
if (i == 1) then
set s = "|cffffff00+30 damage!|r"
call BlzSetUnitBaseDamage( udg_Hero4, d, 0 )
call DisplayTextToForce( GetForceOfPlayer(Player(3)), s )
endif
if (i == 2) then
set s = "|cffffff00+50 power!|r"
set udg_Power[GetConvertedPlayerId(Player(3))] = ( udg_Power[GetConvertedPlayerId(Player(3))] + 50 )
call DisplayTextToForce( GetForceOfPlayer(Player(3)), s )
endif
if (i == 3) then
set s = "|cffffff00+15% concentration!|r"
set udg_Cooldawn[GetConvertedPlayerId(Player(3))] = ( udg_Cooldawn[GetConvertedPlayerId(Player(3))] + 0.20 )
call DisplayTextToForce( GetForceOfPlayer(Player(3)), s )
endif
if (i == 4) then
set s = "|cffffff00+15% resistance!|r"
set udg_Resist[GetConvertedPlayerId(Player(3))] = ( udg_Resist[GetConvertedPlayerId(Player(3))] + 15 )
call DisplayTextToForce( GetForceOfPlayer(Player(3)), s )
endif
if (i == 5) then
set s = "|cffffff00+75% critical damage!|r"
set udg_CritDamage[GetConvertedPlayerId(Player(3))] = ( udg_CritDamage[GetConvertedPlayerId(Player(3))] + 0.75 )
call DisplayTextToForce( GetForceOfPlayer(Player(3)), s )
endif
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl", udg_Hero4, "origin")
call DestroyEffect(e)
set e = null
endfunction
//===========================================================================
function InitTrig_Sacrifice4 takes nothing returns nothing
set gg_trg_Sacrifice4 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Sacrifice4, gg_rct_SACRIFICE )
call TriggerAddCondition( gg_trg_Sacrifice4, Condition( function Trig_Sacrifice4_Conditions ) )
call TriggerAddAction( gg_trg_Sacrifice4, function Trig_Sacrifice4_Actions )
endfunction
function Trig_TreasureChests_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n01L' ) ) then
return false
endif
return true
endfunction
function Trig_TreasureChests_Actions takes nothing returns nothing
local integer g = GetRandomInt(1, 400)
local integer a = GetRandomInt(1, 100)
local integer b = GetRandomInt(1, 7)
local location l1 = GetUnitLoc(GetTriggerUnit())
call AdjustPlayerStateBJ( g, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_GOLD )
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetKillingUnitBJ())), "|cffffff00You have found some gold: |r" + I2S(g) )
if (a <= 10) then
call DisplayTextToForce( GetForceOfPlayer(GetOwningPlayer(GetKillingUnitBJ())), "|cffffff00You have found an artifact in the chest!|r" )
if (b == 1) then
call CreateItemLoc( 'I018', l1 )
endif
if (b == 2) then
call CreateItemLoc( 'I00I', l1 )
endif
if (b == 3) then
call CreateItemLoc( 'I00O', l1 )
endif
if (b == 4) then
call CreateItemLoc( 'I015', l1 )
endif
if (b == 5) then
call CreateItemLoc( 'I012', l1 )
endif
if (b == 6) then
call CreateItemLoc( 'I00N', l1 )
endif
if (b == 7) then
call CreateItemLoc( 'I00Q', l1 )
endif
endif
call RemoveLocation(l1)
set l1 = null
endfunction
//===========================================================================
function InitTrig_TreasureChests takes nothing returns nothing
set gg_trg_TreasureChests = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_TreasureChests, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_TreasureChests, Condition( function Trig_TreasureChests_Conditions ) )
call TriggerAddAction( gg_trg_TreasureChests, function Trig_TreasureChests_Actions )
endfunction
function Trig_IslandSpawn_Actions takes nothing returns nothing
local unit u
local real dx = GetRandomReal(500, 5000)
local real dy = GetRandomReal(-11500, -6500)
local integer i = GetRandomInt(1, 81)
local integer ut
local real atk
local real arm
local real hp
local integer res
local effect e
if (i <= 22) then
set ut = 'n00L'
endif
if ((i >= 23) and (i <= 44)) then
set ut = 'n00M'
endif
if ((i >= 45) and (i <= 53)) then
set ut = 'n00N'
endif
if ((i >= 54) and (i <= 65)) then
set ut = 'h00Z'
endif
if ((i >= 66) and (i <= 72)) then
set ut = 'n015'
endif
if ((i >= 73) and (i <= 81)) then
set ut = 'n016'
endif
if (udg_IslandN <= (14 + 8*udg_PlayerFactor) ) then
set udg_IslandN = udg_IslandN + 1
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), ut, dx, dy, GetRandomReal(0, 360))
if (udg_ForestArmor >= 1) then
set arm = BlzGetUnitArmor(u) + udg_ForestArmor
call BlzSetUnitArmor( u, arm )
endif
if (udg_ForestAttack >= 1) then
set atk = 0.01*BlzGetUnitBaseDamage(u, 0)*(100 + udg_ForestAttack)
call BlzSetUnitBaseDamage( u, R2I(atk), 0 )
endif
if (udg_ForestHP >= 1) then
set hp = 0.01*GetUnitState(u, UNIT_STATE_MAX_LIFE)*(100 + udg_ForestHP)
call BlzSetUnitMaxHP( u, R2I(hp))
call SetUnitState( u, UNIT_STATE_LIFE, hp)
endif
if (udg_ForestResist >= 1) then
call UnitAddAbility(u, 'A07F')
endif
endif
set u = null
endfunction
//===========================================================================
function InitTrig_IslandSpawn takes nothing returns nothing
set gg_trg_IslandSpawn = CreateTrigger( )
call DisableTrigger( gg_trg_IslandSpawn )
call TriggerRegisterTimerEvent( gg_trg_IslandSpawn, 3.00, true )
call TriggerAddAction( gg_trg_IslandSpawn, function Trig_IslandSpawn_Actions )
endfunction
function Trig_IslandAttackers_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetAttacker()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_IslandAttackers_Actions takes nothing returns nothing
local unit u = GetAttacker()
local unit u2 = GetTriggerUnit()
local location l = GetUnitLoc(u2)
if ( GetUnitTypeId(u) == 'h00Z' ) then
call DisableTrigger(gg_trg_IslandAttackers)
call IssuePointOrderLoc( u, "carrionswarm", l )
call PolledWait(1)
call IssueTargetOrder(u, "attack", u2)
call PolledWait(1)
call EnableTrigger(gg_trg_IslandAttackers)
endif
if ( GetUnitTypeId(u) == 'n016' ) then
call DisableTrigger(gg_trg_IslandAttackers)
call IssueImmediateOrder(u, "spiritwolf")
call PolledWait(1)
call IssueTargetOrder(u, "attack", u2)
call PolledWait(1)
call EnableTrigger(gg_trg_IslandAttackers)
endif
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_IslandAttackers takes nothing returns nothing
set gg_trg_IslandAttackers = CreateTrigger( )
call DisableTrigger( gg_trg_IslandAttackers )
call TriggerRegisterAnyUnitEventBJ( gg_trg_IslandAttackers, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_IslandAttackers, Condition( function Trig_IslandAttackers_Conditions ) )
call TriggerAddAction( gg_trg_IslandAttackers, function Trig_IslandAttackers_Actions )
endfunction
function Trig_IslandNumbers_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_IslandNumbers_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local integer i = GetRandomInt(1, 100)
local location l = GetUnitLoc(u)
if (i <= (9 - udg_PlayerFactor)) then
set udg_MapN = udg_MapN + 1
if (udg_MapN > 5) then
call DisableTrigger(gg_trg_IslandSpawn)
else
call CreateItemLoc( 'I04U', l )
endif
endif
set udg_IslandN = ( udg_IslandN - 1 )
if ( GetUnitTypeId(u) == 'n017' ) then
call TriggerSleepAction( 15.00 )
call RemoveUnit(u)
set u = null
else
set u = null
endif
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_IslandNumbers takes nothing returns nothing
set gg_trg_IslandNumbers = CreateTrigger( )
call DisableTrigger( gg_trg_IslandNumbers )
call TriggerRegisterAnyUnitEventBJ( gg_trg_IslandNumbers, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_IslandNumbers, Condition( function Trig_IslandNumbers_Conditions ) )
call TriggerAddAction( gg_trg_IslandNumbers, function Trig_IslandNumbers_Actions )
endfunction
function Trig_IslandFruit_Actions takes nothing returns nothing
local integer a = 0
local real dx
local real dy
local location l
loop
exitwhen a > 6
set dx = GetRandomReal(500, 5000)
set dy = GetRandomReal(-11500, -6500)
if (GetTerrainType(dx, dy) == 'Zdrg') then
set l = Location(dx ,dy)
call CreateItemLoc( 'I04O', l )
set a = a + 1
endif
call PolledWait(0.3)
endloop
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_IslandFruit takes nothing returns nothing
set gg_trg_IslandFruit = CreateTrigger( )
call DisableTrigger( gg_trg_IslandFruit )
call TriggerAddAction( gg_trg_IslandFruit, function Trig_IslandFruit_Actions )
endfunction
function Trig_IslandChests_Actions takes nothing returns nothing
local integer a = 0
local real dx
local real dy
loop
exitwhen a > 4
set a = a + 1
set dx = GetRandomReal(600, 4750)
set dy = GetRandomReal(-11200, -6360)
call CreateUnitAtLoc(Player(PLAYER_NEUTRAL_PASSIVE), 'n01L', Location(dx, dy), bj_UNIT_FACING)
call PolledWait(0.3)
endloop
endfunction
//===========================================================================
function InitTrig_IslandChests takes nothing returns nothing
set gg_trg_IslandChests = CreateTrigger( )
call DisableTrigger( gg_trg_IslandChests )
call TriggerAddAction( gg_trg_IslandChests, function Trig_IslandChests_Actions )
endfunction
function PalmTreeCon takes nothing returns boolean
local boolean b1 = ( GetDestructableTypeId(GetFilterDestructable()) == 'ZTtw' )
local boolean b2 = ( GetDestructableTypeId(GetFilterDestructable()) == 'ZTtc' )
return b1 or b2
endfunction
function PalmDie1 takes nothing returns nothing
call CreateItemLoc('I04P', GetUnitLoc(udg_Orange[1]))
call CreateItemLoc('I04P', GetUnitLoc(udg_Orange[2]))
call CreateItemLoc('I04P', GetUnitLoc(udg_Orange[3]))
call RemoveUnit(udg_Orange[1])
call RemoveUnit(udg_Orange[2])
call RemoveUnit(udg_Orange[3])
endfunction
function PalmDie2 takes nothing returns nothing
call CreateItemLoc('I04P', GetUnitLoc(udg_Orange[4]))
call CreateItemLoc('I04P', GetUnitLoc(udg_Orange[5]))
call CreateItemLoc('I04P', GetUnitLoc(udg_Orange[6]))
call RemoveUnit(udg_Orange[4])
call RemoveUnit(udg_Orange[5])
call RemoveUnit(udg_Orange[6])
endfunction
function PalmDie3 takes nothing returns nothing
call CreateItemLoc('I04P', GetUnitLoc(udg_Orange[7]))
call CreateItemLoc('I04P', GetUnitLoc(udg_Orange[8]))
call CreateItemLoc('I04P', GetUnitLoc(udg_Orange[9]))
call RemoveUnit(udg_Orange[7])
call RemoveUnit(udg_Orange[8])
call RemoveUnit(udg_Orange[9])
endfunction
function PalmTree takes nothing returns nothing
set udg_Fruit = udg_Fruit + 1
endfunction
function PalmTree2 takes nothing returns nothing
local real a
local real x
local real y
local location ld
local trigger t1 = CreateTrigger()
local trigger t2 = CreateTrigger()
local trigger t3 = CreateTrigger()
set udg_Fruit = udg_Fruit + 1
if (udg_Seafruit[1] == udg_Fruit) then
set udg_Palm[1] = GetEnumDestructable()
set ld = GetDestructableLoc(udg_Palm[1])
set a = GetRandomReal(0, 360)
set x = GetLocationX(ld) + 30*Cos(a * 0.01745)
set y = GetLocationY(ld) + 30*Sin(a * 0.01745)
set udg_Orange[1] = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'u00V', x, y, GetRandomReal(0, 360))
set a = a + 120
set x = GetLocationX(ld) + 30*Cos(a * 0.01745)
set y = GetLocationY(ld) + 30*Sin(a * 0.01745)
set udg_Orange[2] = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'u00V', x, y, GetRandomReal(0, 360))
set a = a + 120
set x = GetLocationX(ld) + 30*Cos(a * 0.01745)
set y = GetLocationY(ld) + 30*Sin(a * 0.01745)
set udg_Orange[3] = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'u00V', x, y, GetRandomReal(0, 360))
call TriggerRegisterDeathEvent( t1, udg_Palm[1] )
call TriggerAddAction( t1, function PalmDie1 )
endif
if (udg_Seafruit[2] == udg_Fruit) then
set udg_Palm[2] = GetEnumDestructable()
set ld = GetDestructableLoc(udg_Palm[2])
set a = GetRandomReal(0, 360)
set x = GetLocationX(ld) + 30*Cos(a * 0.01745)
set y = GetLocationY(ld) + 30*Sin(a * 0.01745)
set udg_Orange[4] = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'u00V', x, y, GetRandomReal(0, 360))
set a = a + 120
set x = GetLocationX(ld) + 30*Cos(a * 0.01745)
set y = GetLocationY(ld) + 30*Sin(a * 0.01745)
set udg_Orange[5] = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'u00V', x, y, GetRandomReal(0, 360))
set a = a + 120
set x = GetLocationX(ld) + 30*Cos(a * 0.01745)
set y = GetLocationY(ld) + 30*Sin(a * 0.01745)
set udg_Orange[6] = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'u00V', x, y, GetRandomReal(0, 360))
call TriggerRegisterDeathEvent( t2, udg_Palm[2] )
call TriggerAddAction( t2, function PalmDie2 )
endif
if (udg_Seafruit[3] == udg_Fruit) then
set udg_Palm[3] = GetEnumDestructable()
set ld = GetDestructableLoc(udg_Palm[3])
set a = GetRandomReal(0, 360)
set x = GetLocationX(ld) + 30*Cos(a * 0.01745)
set y = GetLocationY(ld) + 30*Sin(a * 0.01745)
set udg_Orange[7] = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'u00V', x, y, GetRandomReal(0, 360))
set a = a + 120
set x = GetLocationX(ld) + 30*Cos(a * 0.01745)
set y = GetLocationY(ld) + 30*Sin(a * 0.01745)
set udg_Orange[8] = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'u00V', x, y, GetRandomReal(0, 360))
set a = a + 120
set x = GetLocationX(ld) + 30*Cos(a * 0.01745)
set y = GetLocationY(ld) + 30*Sin(a * 0.01745)
set udg_Orange[9] = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'u00V', x, y, GetRandomReal(0, 360))
call TriggerRegisterDeathEvent( t3, udg_Palm[3] )
call TriggerAddAction( t3, function PalmDie3 )
endif
call RemoveLocation(ld)
set ld = null
endfunction
function Trig_IslandOrange_Actions takes nothing returns nothing
local rect r = Rect(-182, -11773, 5952, -5555 )
local integer i
local integer a = 0
local integer b = 0
local integer c = 0
set udg_Fruit = 0
call EnumDestructablesInRect(r, Condition(function PalmTreeCon), function PalmTree)
set i = GetRandomInt(1, udg_Fruit)
set a = i
loop
exitwhen b > 0
set i = GetRandomInt(1, udg_Fruit)
if (i != a) then
set b = i
endif
endloop
loop
exitwhen c > 0
set i = GetRandomInt(1, udg_Fruit)
if ((i != a) and (i != b)) then
set c = i
endif
endloop
set udg_Seafruit[1] = a
set udg_Seafruit[2] = b
set udg_Seafruit[3] = c
set udg_Fruit = 0
call EnumDestructablesInRect(r, Condition(function PalmTreeCon), function PalmTree2)
endfunction
//===========================================================================
function InitTrig_IslandOrange takes nothing returns nothing
set gg_trg_IslandOrange = CreateTrigger( )
call DisableTrigger( gg_trg_IslandOrange )
call TriggerAddAction( gg_trg_IslandOrange, function Trig_IslandOrange_Actions )
endfunction
function BossNRemoveCon3 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (GetOwningPlayer(GetFilterUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE))
return b1 and b2
endfunction
function BossNRemove3 takes nothing returns nothing
local unit u = GetEnumUnit()
call RemoveUnit(u)
set u = null
endfunction
function Trig_BossSpawn3_Actions takes nothing returns nothing
local integer i = GetRandomInt(1, 3)
local location l = Location(2500, -8900 )
local group g = CreateGroup()
local string s
call GroupEnumUnitsInRangeOfLoc(g, l, 5000, Condition(function BossNRemoveCon3))
call ForGroup(g, function BossNRemove3)
call PolledWait(2)
call DisableTrigger(gg_trg_IslandSpawn)
set udg_TeleportPoint = Location(-6000, 13000)
set udg_ForestPot = 0
set udg_ForestHP = 0
set udg_ForestAttack = 0
set udg_ForestArmor = 0
set udg_ForestRune = 0
set udg_ForestResist = 0
if (i == 1) then
set udg_IslandBoss = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n018', -6048, 13333, 270)
call DisableTrigger(gg_trg_NeutralPotions)
set s = "|cffff00ffBoss: Hydra!|r "
call DisplayTextToForce( GetPlayersAll(), s )
set s = "|cffffff00Abilities:|r 'Poison Pool', 'Regeneration' и 'Acid Breath'"
call DisplayTextToForce( GetPlayersAll(), s )
endif
if (i == 2) then
set udg_IslandBoss = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n019', -6048, 13333, 270)
call DisableTrigger(gg_trg_NeutralPotions)
set s = "|cffff00ffBoss: Sea King!|r "
call DisplayTextToForce( GetPlayersAll(), s )
set s = "|cffffff00Abilities:|r 'Sea Strike', 'Tide' и 'Magic Resistance'"
call DisplayTextToForce( GetPlayersAll(), s )
call UnitAddAbility( udg_IslandBoss, 'Amrf' )
call UnitRemoveAbility( udg_IslandBoss, 'Amrf' )
endif
if (i == 3) then
set udg_IslandBoss = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n01A', -6048, 13333, 270)
call DisableTrigger(gg_trg_NeutralPotions)
set s = "|cffff00ffBoss: Deep Ocean Priest!|r "
call DisplayTextToForce( GetPlayersAll(), s )
set s = "|cffffff00Abilities:|r 'Shallow Army', 'Deep Ocean Bombs' и 'Hex'"
call DisplayTextToForce( GetPlayersAll(), s )
endif
if (udg_Player1 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero1, GetRandomLocInRect(gg_rct_Boss3), 90.00 )
call SetCameraTargetControllerNoZForPlayer( Player(0), udg_Hero1, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(0), 0 )
endif
if (udg_Player2 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero2, GetRandomLocInRect(gg_rct_Boss3), 90.00 )
call SetCameraTargetControllerNoZForPlayer( Player(1), udg_Hero2, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(1), 0 )
endif
if (udg_Player3 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero3, GetRandomLocInRect(gg_rct_Boss3), 90.00 )
call SetCameraTargetControllerNoZForPlayer( Player(2), udg_Hero3, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(2), 0 )
endif
if (udg_Player4 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero4, GetRandomLocInRect(gg_rct_Boss3), 90.00 )
call SetCameraTargetControllerNoZForPlayer( Player(3), udg_Hero4, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(3), 0 )
endif
call PauseAllUnitsBJ( true )
call PolledWait(5)
call PauseAllUnitsBJ( false )
if (i == 1) then
call EnableTrigger(gg_trg_IslandHydra)
call EnableTrigger(gg_trg_HydraAttack)
endif
if (i == 2) then
call TriggerExecute(gg_trg_IslandKing1)
endif
if (i == 3) then
call TriggerExecute(gg_trg_IslandWiz)
call EnableTrigger(gg_trg_IslandGrenade)
call EnableTrigger(gg_trg_IslandWizA)
endif
call EnableTrigger(gg_trg_IslandBossDie)
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_BossSpawn3 takes nothing returns nothing
set gg_trg_BossSpawn3 = CreateTrigger( )
call DisableTrigger( gg_trg_BossSpawn3 )
call TriggerAddAction( gg_trg_BossSpawn3, function Trig_BossSpawn3_Actions )
endfunction
function IslandBossCon takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_IslandBoss)) == true)
return b1 and b2
endfunction
function IslandBossAct takes nothing returns nothing
local unit u = GetEnumUnit()
call UnitDamageTarget(udg_IslandBoss, u, 150, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function Trig_IslandKing1_Actions takes nothing returns nothing
local real x
local real y
local real b
local location l
local location l2
local real a = GetUnitState(udg_IslandBoss, UNIT_STATE_MANA)
local effect e
local group g = CreateGroup()
call PolledWait(4)
loop
exitwhen SpellBossCheck(udg_IslandBoss) == true
call PolledWait(0.3)
endloop
set a = GetUnitState(udg_IslandBoss, UNIT_STATE_MANA)
if (a >= 110) then
call SetUnitState(udg_IslandBoss, UNIT_STATE_MANA, (a - 110))
call EnableTrigger(gg_trg_IslandKingTimer)
call PolledWait(2)
call DisableTrigger(gg_trg_IslandKingTimer)
endif
call PolledWait(7)
loop
exitwhen SpellBossCheck(udg_IslandBoss) == true
call PolledWait(0.3)
endloop
set a = GetUnitState(udg_IslandBoss, UNIT_STATE_MANA)
if (a >= 50) then
call SetUnitState(udg_IslandBoss, UNIT_STATE_MANA, (a - 50))
set b = GetUnitFacing(udg_IslandBoss)
set l = GetUnitLoc(udg_IslandBoss)
set x = GetLocationX(l) + 200 * Cos(b * 0.01745)
set y = GetLocationY(l) + 200 * Sin(b * 0.01745)
set l2 = Location(x, y)
call PauseUnit(udg_IslandBoss, true)
call SetUnitAnimation(udg_IslandBoss, "attack slam")
call PolledWait(0.7)
set e = AddSpecialEffectLoc("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl", l2)
call DestroyEffect(e)
set e = AddSpecialEffectLoc("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl", l2)
call DestroyEffect(e)
call GroupEnumUnitsInRangeOfLoc(g, l2, 200, Condition(function IslandBossCon))
call ForGroup(g, function IslandBossAct)
call PauseUnit(udg_IslandBoss, false)
call SetUnitAnimation(udg_IslandBoss, "stand")
endif
call PolledWait(4)
if (GetUnitState(udg_IslandBoss, UNIT_STATE_LIFE) >= 0.405) then
call TriggerExecute(gg_trg_IslandKing1)
else
call DisableTrigger(gg_trg_IslandKing1)
endif
call DestroyGroup(g)
set g = null
set e = null
call RemoveLocation(l)
set l = null
call RemoveLocation(l2)
set l2 = null
endfunction
//===========================================================================
function InitTrig_IslandKing1 takes nothing returns nothing
set gg_trg_IslandKing1 = CreateTrigger( )
call DisableTrigger( gg_trg_IslandKing1 )
call TriggerAddAction( gg_trg_IslandKing1, function Trig_IslandKing1_Actions )
endfunction
function Trig_IslandWiz_Actions takes nothing returns nothing
local real a = 0
local real x
local real y
local real b
local unit u
local location l = Location(-6043, 13280)
local real t = GetUnitState(udg_IslandBoss, UNIT_STATE_MANA)
call PolledWait(6)
loop
exitwhen SpellBossCheck(udg_IslandBoss) == true
call PolledWait(0.3)
endloop
set t = GetUnitState(udg_IslandBoss, UNIT_STATE_MANA)
if (t >= 90) then
call SetUnitState(udg_IslandBoss, UNIT_STATE_MANA, (t - 90))
loop
exitwhen a > 11
set a = a + 1
set x = GetRandomReal(-6600, -5500)
set y = GetRandomReal(12680, 13900)
call CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u00U', x, y, 270)
endloop
endif
call PolledWait(6)
loop
exitwhen SpellBossCheck(udg_IslandBoss) == true
call PolledWait(0.3)
endloop
set t = GetUnitState(udg_IslandBoss, UNIT_STATE_MANA)
if (t >= 120) then
call SetUnitState(udg_IslandBoss, UNIT_STATE_MANA, (t - 120))
set a = 0
loop
exitwhen a > 24
set a = a + 1
set b = a*15
set x = -6043 + 1100 * Cos(b * 0.01745)
set y = 13280 + 1100 * Sin(b * 0.01745)
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n017', x, y, b+180)
call UnitApplyTimedLife( u, 'BTLF', 7 )
call IssuePointOrderLoc( u, "attack", l)
endloop
endif
call PolledWait(6)
if (GetUnitState(udg_IslandBoss, UNIT_STATE_LIFE) >= 0.405) then
call TriggerExecute(gg_trg_IslandWiz)
else
call DisableTrigger(gg_trg_IslandWiz)
endif
set u = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_IslandWiz takes nothing returns nothing
set gg_trg_IslandWiz = CreateTrigger( )
call DisableTrigger( gg_trg_IslandWiz )
call TriggerAddAction( gg_trg_IslandWiz, function Trig_IslandWiz_Actions )
endfunction
function Trig_IslandWizA_Conditions takes nothing returns boolean
if ( not ( GetAttacker() == udg_IslandBoss ) ) then
return false
endif
return true
endfunction
function Trig_IslandWizA_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
call DisableTrigger(gg_trg_IslandWizA)
loop
exitwhen SpellBossCheck(udg_IslandBoss) == true
call PolledWait(0.3)
endloop
call IssueTargetOrder(udg_IslandBoss, "hex", u)
call PolledWait(10)
if (GetUnitState(udg_IslandBoss, UNIT_STATE_LIFE) >= 0.405) then
call EnableTrigger(gg_trg_IslandWizA)
endif
set u = null
endfunction
//===========================================================================
function InitTrig_IslandWizA takes nothing returns nothing
set gg_trg_IslandWizA = CreateTrigger( )
call DisableTrigger( gg_trg_IslandWizA )
call TriggerRegisterAnyUnitEventBJ( gg_trg_IslandWizA, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_IslandWizA, Condition( function Trig_IslandWizA_Conditions ) )
call TriggerAddAction( gg_trg_IslandWizA, function Trig_IslandWizA_Actions )
endfunction
function Trig_HydraAttack_Conditions takes nothing returns boolean
if ( not ( GetAttacker() == udg_IslandBoss ) ) then
return false
endif
return true
endfunction
function Trig_HydraAttack_Actions takes nothing returns nothing
local unit u = GetAttacker()
local unit u2 = GetTriggerUnit()
local location l = GetUnitLoc(u2)
loop
exitwhen SpellBossCheck(udg_IslandBoss) == true
call PolledWait(0.3)
endloop
call IssuePointOrderLoc( u, "breathoffire", l )
call DisableTrigger( gg_trg_HydraAttack )
call PolledWait( 22.00 )
if (GetUnitState(udg_IslandBoss, UNIT_STATE_LIFE) >= 0.405) then
call EnableTrigger( gg_trg_HydraAttack )
endif
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_HydraAttack takes nothing returns nothing
set gg_trg_HydraAttack = CreateTrigger( )
call DisableTrigger( gg_trg_HydraAttack )
call TriggerRegisterAnyUnitEventBJ( gg_trg_HydraAttack, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_HydraAttack, Condition( function Trig_HydraAttack_Conditions ) )
call TriggerAddAction( gg_trg_HydraAttack, function Trig_HydraAttack_Actions )
endfunction
function Trig_IslandGrenade_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'u00U' ) ) then
return false
endif
return true
endfunction
function GreandeCon takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_IslandBoss)) == true)
return b1 and b2
endfunction
function GreandeAct takes nothing returns nothing
local unit u = GetEnumUnit()
call UnitDamageTarget(udg_IslandBoss, u, 175, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function Trig_IslandGrenade_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetUnitLoc(u)
local group g = CreateGroup()
local effect e = AddSpecialEffectLoc("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl", l)
call DestroyEffect(e)
call GroupEnumUnitsInRangeOfLoc(g, l, 200, Condition(function GreandeCon))
call ForGroup(g, function GreandeAct)
call DestroyGroup(g)
call RemoveUnit(u)
set g = null
set e = null
call RemoveLocation(l)
set l = null
set u = null
endfunction
//===========================================================================
function InitTrig_IslandGrenade takes nothing returns nothing
set gg_trg_IslandGrenade = CreateTrigger( )
call DisableTrigger( gg_trg_IslandGrenade )
call TriggerRegisterAnyUnitEventBJ( gg_trg_IslandGrenade, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_IslandGrenade, Condition( function Trig_IslandGrenade_Conditions ) )
call TriggerAddAction( gg_trg_IslandGrenade, function Trig_IslandGrenade_Actions )
endfunction
function Trig_IslandHydra_Conditions takes nothing returns boolean
if ( not ( GetAttacker() == udg_IslandBoss ) ) then
return false
endif
return true
endfunction
function Trig_IslandHydra_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetUnitLoc(u)
local location l2 = GetUnitLoc(udg_IslandBoss)
local real a = GetUnitState(udg_IslandBoss, UNIT_STATE_MANA)
local unit u2
loop
exitwhen SpellBossCheck(udg_IslandBoss) == true
call PolledWait(0.3)
endloop
set a = GetUnitState(udg_IslandBoss, UNIT_STATE_MANA)
if (a >= 90) then
call SetUnitState(udg_IslandBoss, UNIT_STATE_MANA, (a - 90))
call DisableTrigger(gg_trg_IslandHydra)
set u2 = CreateUnitAtLoc(GetOwningPlayer(udg_IslandBoss), 'u00B', l2, 0)
call UnitAddAbility(u2, 'A08U')
call IssuePointOrderLoc( u2, "clusterrockets", l )
call PolledWait(1)
set u2 = CreateUnitAtLoc(GetOwningPlayer(udg_IslandBoss), 'u00B', l2, 0)
call UnitAddAbility(u2, 'A08T')
call IssuePointOrderLoc( u2, "rainoffire", l )
endif
call PolledWait(15)
if (GetUnitState(udg_IslandBoss, UNIT_STATE_LIFE) >= 0.405) then
call EnableTrigger(gg_trg_IslandHydra)
endif
set u = null
call RemoveLocation(l)
set l = null
call RemoveLocation(l2)
set l2 = null
set u2 = null
endfunction
//===========================================================================
function InitTrig_IslandHydra takes nothing returns nothing
set gg_trg_IslandHydra = CreateTrigger( )
call DisableTrigger( gg_trg_IslandHydra )
call TriggerRegisterAnyUnitEventBJ( gg_trg_IslandHydra, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_IslandHydra, Condition( function Trig_IslandHydra_Conditions ) )
call TriggerAddAction( gg_trg_IslandHydra, function Trig_IslandHydra_Actions )
endfunction
function Trig_IslandKingTimer_Actions takes nothing returns nothing
local real a = GetRandomReal(0, 360)
local real x = -6043 + 1000 * Cos(a * 0.01745)
local real y = 13280 + 1000 * Sin(a * 0.01745)
local location l = Location(x, y)
local unit u = CreateUnitAtLoc(GetOwningPlayer(udg_IslandBoss), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u, 'A08S')
call IssuePointOrderLoc( u, "carrionswarm", Location(-6043, 13280) )
set u = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_IslandKingTimer takes nothing returns nothing
set gg_trg_IslandKingTimer = CreateTrigger( )
call DisableTrigger( gg_trg_IslandKingTimer )
call TriggerRegisterTimerEvent( gg_trg_IslandKingTimer, 0.15, true )
call TriggerAddAction( gg_trg_IslandKingTimer, function Trig_IslandKingTimer_Actions )
endfunction
function Trig_IslandBossDie_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_IslandBoss ) ) then
return false
endif
return true
endfunction
function Trig_IslandBossDie_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_IslandHydra )
call DisableTrigger( gg_trg_IslandKing1 )
call DisableTrigger( gg_trg_IslandWizA )
call DisableTrigger( gg_trg_IslandWiz )
call DisableTrigger( gg_trg_IslandAttackers )
call DisableTrigger( gg_trg_IslandBossDie )
call DisableTrigger( gg_trg_IslandKingTimer )
call DisableTrigger( gg_trg_IslandNumbers )
call PolledWait(2)
call TriggerExecute( gg_trg_StopMUSIC )
call DisplayTextToForce( GetPlayersAll(), "Congratulations! Take your reward: |cffffff00800 gold!|r" )
if (udg_Player1 == true) then
call AdjustPlayerStateBJ( 800, Player(0), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero1, Location(-5500, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(0), udg_Hero1, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(0), 0 )
endif
if (udg_Player2 == true) then
call AdjustPlayerStateBJ( 800, Player(1), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero2, Location(-3250, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(1), udg_Hero2, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(1), 0 )
endif
if (udg_Player3 == true) then
call AdjustPlayerStateBJ( 800, Player(2), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero3, Location(-950, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(2), udg_Hero3, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(2), 0 )
endif
if (udg_Player4 == true) then
call AdjustPlayerStateBJ( 800, Player(3), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero4, Location(1330, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(3), udg_Hero4, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(3), 0 )
endif
set udg_ForestAttack = 0
set udg_ForestHP = 0
set udg_ForestArmor = 0
set udg_ForestPot = 0
set udg_ForestResist = 0
set udg_ForestRune = 0
call SetWaterBaseColorBJ( 100, 100, 100, 0 )
call TriggerExecute( gg_trg_StartTemple )
endfunction
//===========================================================================
function InitTrig_IslandBossDie takes nothing returns nothing
set gg_trg_IslandBossDie = CreateTrigger( )
call DisableTrigger( gg_trg_IslandBossDie )
call TriggerRegisterAnyUnitEventBJ( gg_trg_IslandBossDie, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_IslandBossDie, Condition( function Trig_IslandBossDie_Conditions ) )
call TriggerAddAction( gg_trg_IslandBossDie, function Trig_IslandBossDie_Actions )
endfunction
function Trig_DeathSpawn_Actions takes nothing returns nothing
local unit u
local real dx = GetRandomReal(-5850, -2500)
local real dy = GetRandomReal(-11650, -5200)
local integer i = GetRandomInt(1, 100)
local integer ut
local real atk
local real arm
local real hp
local integer res
local effect e
if (udg_GraveFactor == 1) then
if (i <= 67) then
set ut = 'n00U'
endif
if ((i >= 68) and (i <= 91)) then
set ut = 'n00W'
endif
if (i >= 92) then
set ut = 'n00V'
endif
endif
if (udg_GraveFactor == 2) then
if (i <= 67) then
set ut = 'n00X'
endif
if ((i >= 68) and (i <= 91)) then
set ut = 'h00X'
endif
if (i >= 92) then
set ut = 'n00Y'
endif
endif
if (udg_GraveFactor == 3) then
if (i <= 67) then
set ut = 'n00Z'
endif
if ((i >= 68) and (i <= 91)) then
set ut = 'n011'
endif
if (i >= 92) then
set ut = 'n010'
endif
endif
if (udg_GraveN <= (15 + 9*udg_PlayerFactor) ) then
set udg_GraveN = udg_GraveN + 1
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), ut, dx, dy, GetRandomReal(0, 360))
set e = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl" , u, "origin")
call DestroyEffect(e)
if (udg_ForestArmor >= 1) then
set arm = BlzGetUnitArmor(u) + udg_ForestArmor
call BlzSetUnitArmor( u, arm )
endif
if (udg_ForestAttack >= 1) then
set atk = 0.01*BlzGetUnitBaseDamage(u, 0)*(100 + udg_ForestAttack)
call BlzSetUnitBaseDamage( u, R2I(atk), 0 )
endif
if (udg_ForestHP >= 1) then
set hp = 0.01*GetUnitState(u, UNIT_STATE_MAX_LIFE)*(100 + udg_ForestHP)
call BlzSetUnitMaxHP( u, R2I(hp))
call SetUnitState( u, UNIT_STATE_LIFE, hp)
endif
if (udg_ForestResist >= 1) then
call UnitAddAbility(u, 'A08Q')
endif
endif
set u = null
set e = null
endfunction
//===========================================================================
function InitTrig_DeathSpawn takes nothing returns nothing
set gg_trg_DeathSpawn = CreateTrigger( )
call DisableTrigger( gg_trg_DeathSpawn )
call TriggerRegisterTimerEvent( gg_trg_DeathSpawn, 2.00, true )
call TriggerAddAction( gg_trg_DeathSpawn, function Trig_DeathSpawn_Actions )
endfunction
function Trig_DeathAttackers_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetAttacker()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_DeathAttackers_Actions takes nothing returns nothing
local unit u = GetAttacker()
local unit u2 = GetTriggerUnit()
if ( GetUnitTypeId(u) == 'n00Y' ) then
call DisableTrigger(gg_trg_DeathAttackers)
call IssueTargetOrder(u, "magicleash", u2)
call PolledWait(1)
call IssueTargetOrder(u, "attack", u2)
call PolledWait(1)
call EnableTrigger(gg_trg_DeathAttackers)
endif
if ( GetUnitTypeId(u) == 'n011' ) then
call DisableTrigger(gg_trg_DeathAttackers)
call IssueTargetOrder(u, "shadowstrike", u2)
call PolledWait(1)
call IssueTargetOrder(u, "attack", u2)
call PolledWait(1)
call EnableTrigger(gg_trg_DeathAttackers)
endif
set u = null
set u2 = null
endfunction
//===========================================================================
function InitTrig_DeathAttackers takes nothing returns nothing
set gg_trg_DeathAttackers = CreateTrigger( )
call DisableTrigger( gg_trg_DeathAttackers )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DeathAttackers, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_DeathAttackers, Condition( function Trig_DeathAttackers_Conditions ) )
call TriggerAddAction( gg_trg_DeathAttackers, function Trig_DeathAttackers_Actions )
endfunction
function BossNRemoveCon2 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (GetOwningPlayer(GetFilterUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE))
return b1 and b2
endfunction
function BossNRemove2 takes nothing returns nothing
local unit u = GetEnumUnit()
call RemoveUnit(u)
set u = null
endfunction
function Trig_BossSpawn2_Actions takes nothing returns nothing
local integer i = GetRandomInt(1, 3)
local location l = Location(-4300, -8300 )
local group g = CreateGroup()
local string s
call SetWaterBaseColorBJ( 100, 0.00, 0.00, 0 )
call PolledWait(1)
call GroupEnumUnitsInRangeOfLoc(g, l, 5000, Condition(function BossNRemoveCon2))
call ForGroup(g, function BossNRemove2)
call DisableTrigger(gg_trg_DeathSpawn)
call PolledWait(2)
set udg_TeleportPoint = Location(-10160, 13460)
set udg_ForestPot = 0
set udg_ForestHP = 0
set udg_ForestAttack = 0
set udg_ForestArmor = 0
set udg_ForestRune = 0
set udg_ForestResist = 0
if (i == 1) then
set udg_DeathBoss = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n012', -10140, 13420, 270)
call DisableTrigger(gg_trg_NeutralPotions)
set s = "|cff8080ffBoss: Vampire Lord!|r "
call DisplayTextToForce( GetPlayersAll(), s )
set s = "|cffffff00Способности:|r 'Drain', 'Horde of Bats' и 'Vampirism'"
call DisplayTextToForce( GetPlayersAll(), s )
call SetUnitColor( udg_DeathBoss, PLAYER_COLOR_RED )
endif
if (i == 2) then
set udg_DeathBoss = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n013', -10140, 13420, 270)
call DisableTrigger(gg_trg_NeutralPotions)
set s = "|cff8080ffBoss: Tormented Soul!|r "
call DisplayTextToForce( GetPlayersAll(), s )
set s = "|cffffff00Abilities:|r 'Sharp Pain', 'Silence' и 'Blink'"
call DisplayTextToForce( GetPlayersAll(), s )
call SetUnitColor( udg_DeathBoss, PLAYER_COLOR_RED )
endif
if (i == 3) then
set udg_DeathBoss = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n014', -10140, 13420, 270)
call DisableTrigger(gg_trg_NeutralPotions)
set s = "|cff8080ffBoss: Bone Dragon!|r "
call DisplayTextToForce( GetPlayersAll(), s )
set s = "|cffffff00Abilities:|r 'Frozen Fly', 'Skeleton Knights' и 'Magic Resistance'"
call DisplayTextToForce( GetPlayersAll(), s )
call UnitAddAbility( udg_DeathBoss, 'Amrf' )
call UnitRemoveAbility( udg_DeathBoss, 'Amrf' )
call SetUnitColor( udg_DeathBoss, PLAYER_COLOR_LIGHT_BLUE )
endif
if (udg_Player1 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero1, GetRandomLocInRect(gg_rct_Boss2), 90.00 )
call SetCameraTargetControllerNoZForPlayer( Player(0), udg_Hero1, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(0), 0 )
endif
if (udg_Player2 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero2, GetRandomLocInRect(gg_rct_Boss2), 90.00 )
call SetCameraTargetControllerNoZForPlayer( Player(1), udg_Hero2, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(1), 0 )
endif
if (udg_Player3 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero3, GetRandomLocInRect(gg_rct_Boss2), 90.00 )
call SetCameraTargetControllerNoZForPlayer( Player(2), udg_Hero3, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(2), 0 )
endif
if (udg_Player4 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero4, GetRandomLocInRect(gg_rct_Boss2), 90.00 )
call SetCameraTargetControllerNoZForPlayer( Player(3), udg_Hero4, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(3), 0 )
endif
call PauseAllUnitsBJ( true )
call PolledWait(5)
call PauseAllUnitsBJ( false )
if (i == 1) then
call EnableTrigger(gg_trg_DeathVampire)
call EnableTrigger(gg_trg_DeathVampire2)
endif
if (i == 2) then
call EnableTrigger(gg_trg_DeathGhost)
call EnableTrigger(gg_trg_DeathGhost2)
call TriggerExecute(gg_trg_DeathGhost3)
endif
if (i == 3) then
call TriggerExecute(gg_trg_DeathDragon)
call TriggerExecute(gg_trg_DeathDragon2)
endif
call EnableTrigger(gg_trg_DeathBossDie)
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_BossSpawn2 takes nothing returns nothing
set gg_trg_BossSpawn2 = CreateTrigger( )
call DisableTrigger( gg_trg_BossSpawn2 )
call TriggerAddAction( gg_trg_BossSpawn2, function Trig_BossSpawn2_Actions )
endfunction
function Trig_DeathVampire_Conditions takes nothing returns boolean
if ( not ( GetAttacker() == udg_DeathBoss ) ) then
return false
endif
return true
endfunction
function Trig_DeathVampire_Actions takes nothing returns nothing
local unit u = GetAttacker()
local unit u2 = GetTriggerUnit()
local location l = GetUnitLoc(u2)
loop
exitwhen SpellBossCheck(udg_DeathBoss) == true
call PolledWait(0.3)
endloop
call IssuePointOrderLoc( u, "carrionswarm", l )
call DisableTrigger( gg_trg_DeathVampire )
call PolledWait( 12.00 )
call EnableTrigger( gg_trg_DeathVampire )
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_DeathVampire takes nothing returns nothing
set gg_trg_DeathVampire = CreateTrigger( )
call DisableTrigger( gg_trg_DeathVampire )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DeathVampire, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_DeathVampire, Condition( function Trig_DeathVampire_Conditions ) )
call TriggerAddAction( gg_trg_DeathVampire, function Trig_DeathVampire_Actions )
endfunction
function Trig_DeathVampire2_Conditions takes nothing returns boolean
if ( not ( GetAttacker() == udg_DeathBoss ) ) then
return false
endif
return true
endfunction
function Trig_DeathVampire2_Actions takes nothing returns nothing
local unit u = GetAttacker()
local unit u2 = GetTriggerUnit()
if (GetUnitState(u, UNIT_STATE_LIFE) <= 900) then
loop
exitwhen SpellBossCheck(udg_DeathBoss) == true
call PolledWait(0.3)
endloop
call IssueTargetOrder(u, "drain", u2)
call DisableTrigger( gg_trg_DeathVampire2 )
call PolledWait( 20.00 )
call EnableTrigger( gg_trg_DeathVampire2 )
endif
set u = null
set u2 = null
endfunction
//===========================================================================
function InitTrig_DeathVampire2 takes nothing returns nothing
set gg_trg_DeathVampire2 = CreateTrigger( )
call DisableTrigger( gg_trg_DeathVampire2 )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DeathVampire2, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_DeathVampire2, Condition( function Trig_DeathVampire2_Conditions ) )
call TriggerAddAction( gg_trg_DeathVampire2, function Trig_DeathVampire2_Actions )
endfunction
function Trig_DeathGhost_Conditions takes nothing returns boolean
if ( not ( GetAttacker() == udg_DeathBoss ) ) then
return false
endif
return true
endfunction
function Trig_DeathGhost_Actions takes nothing returns nothing
local unit u = GetAttacker()
local unit u2 = GetTriggerUnit()
local location l = GetUnitLoc(u2)
call IssuePointOrderLoc( u, "silence", l )
call DisableTrigger( gg_trg_DeathGhost )
call PolledWait( 15.00 )
call EnableTrigger( gg_trg_DeathGhost )
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_DeathGhost takes nothing returns nothing
set gg_trg_DeathGhost = CreateTrigger( )
call DisableTrigger( gg_trg_DeathGhost )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DeathGhost, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_DeathGhost, Condition( function Trig_DeathGhost_Conditions ) )
call TriggerAddAction( gg_trg_DeathGhost, function Trig_DeathGhost_Actions )
endfunction
function Trig_DeathGhost2_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_DeathBoss ) ) then
return false
endif
return true
endfunction
function Trig_DeathGhost2_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local real x = GetRandomReal(-10700, -9600)
local real y = GetRandomReal(12600, 13800)
local location l = Location(x, y)
call IssuePointOrderLoc( u, "blink", l )
call DisableTrigger( gg_trg_DeathGhost2 )
call PolledWait( 10.00 )
call EnableTrigger( gg_trg_DeathGhost2 )
set u = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_DeathGhost2 takes nothing returns nothing
set gg_trg_DeathGhost2 = CreateTrigger( )
call DisableTrigger( gg_trg_DeathGhost2 )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DeathGhost2, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_DeathGhost2, Condition( function Trig_DeathGhost2_Conditions ) )
call TriggerAddAction( gg_trg_DeathGhost2, function Trig_DeathGhost2_Actions )
endfunction
function Trig_DeathGhost3_Actions takes nothing returns nothing
local real a = GetUnitState(udg_DeathBoss, UNIT_STATE_MANA)
call PolledWait(5.0)
loop
exitwhen SpellBossCheck(udg_DeathBoss) == true
call PolledWait(0.3)
endloop
set a = GetUnitState(udg_DeathBoss, UNIT_STATE_MANA)
if (a >= 125) then
call SetUnitState(udg_DeathBoss, UNIT_STATE_MANA, (a - 125))
call EnableTrigger(gg_trg_GhostSpikes)
call PolledWait(3.0)
call DisableTrigger(gg_trg_GhostSpikes)
endif
call PolledWait(5.0)
if (GetUnitState(udg_DeathBoss, UNIT_STATE_LIFE) >= 0.405) then
call TriggerExecute(gg_trg_DeathGhost3)
else
call DisableTrigger(gg_trg_DeathGhost3)
endif
endfunction
//===========================================================================
function InitTrig_DeathGhost3 takes nothing returns nothing
set gg_trg_DeathGhost3 = CreateTrigger( )
call DisableTrigger( gg_trg_DeathGhost3 )
call TriggerAddAction( gg_trg_DeathGhost3, function Trig_DeathGhost3_Actions )
endfunction
function GhostBoss1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_DeathBoss)) == true)
return b1 and b2
endfunction
function GhostBossAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
call UnitDamageTarget(udg_DeathBoss, u, 200, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function Trig_GhostSpikes_Actions takes nothing returns nothing
local real x = GetRandomReal(-10700, -9600)
local real y = GetRandomReal(12600, 13800)
local location l = Location(x, y)
local group g = CreateGroup()
local effect e = AddSpecialEffectLoc("Abilities\\Spells\\Undead\\Impale\\ImpaleHitTarget.mdl", l)
call DestroyEffect(e)
call GroupEnumUnitsInRangeOfLoc(g, l, 125, Condition(function GhostBoss1))
call ForGroup(g, function GhostBossAct1)
set e = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_GhostSpikes takes nothing returns nothing
set gg_trg_GhostSpikes = CreateTrigger( )
call DisableTrigger( gg_trg_GhostSpikes )
call TriggerRegisterTimerEventPeriodic( gg_trg_GhostSpikes, 0.10 )
call TriggerAddAction( gg_trg_GhostSpikes, function Trig_GhostSpikes_Actions )
endfunction
function Trig_DeathDragon_Actions takes nothing returns nothing
local real x
local real y
local location l
local real a = GetUnitState(udg_DeathBoss, UNIT_STATE_MANA)
local unit u
local effect e
call PolledWait(7)
loop
exitwhen SpellBossCheck(udg_DeathBoss) == true
call PolledWait(0.3)
endloop
set a = GetUnitState(udg_DeathBoss, UNIT_STATE_MANA)
if (a >= 125) then
call SetUnitState(udg_DeathBoss, UNIT_STATE_MANA, (a - 125))
set x = GetRandomReal(-10700, -9600)
set y = GetRandomReal(12600, 13800)
set l = Location(x, y)
set u = CreateUnitAtLoc(GetOwningPlayer(udg_DeathBoss), 'n00U', l, GetRandomReal(0,360))
call UnitApplyTimedLife( u, 'BTLF', 20 )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl" , u, "origin")
call DestroyEffect(e)
call PolledWait(1)
set x = GetRandomReal(-10700, -9600)
set y = GetRandomReal(12600, 13800)
set l = Location(x, y)
set u = CreateUnitAtLoc(GetOwningPlayer(udg_DeathBoss), 'n00U', l, GetRandomReal(0,360))
call UnitApplyTimedLife( u, 'BTLF', 20 )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl" , u, "origin")
call DestroyEffect(e)
call PolledWait(1)
set x = GetRandomReal(-10700, -9600)
set y = GetRandomReal(12600, 13800)
set l = Location(x, y)
set u = CreateUnitAtLoc(GetOwningPlayer(udg_DeathBoss), 'n00U', l, GetRandomReal(0,360))
call UnitApplyTimedLife( u, 'BTLF', 20 )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl" , u, "origin")
call DestroyEffect(e)
call PolledWait(1)
set x = GetRandomReal(-10700, -9600)
set y = GetRandomReal(12600, 13800)
set l = Location(x, y)
set u = CreateUnitAtLoc(GetOwningPlayer(udg_DeathBoss), 'n00U', l, GetRandomReal(0,360))
call UnitApplyTimedLife( u, 'BTLF', 20 )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl" , u, "origin")
call DestroyEffect(e)
endif
call PolledWait(21)
if (GetUnitState(udg_DeathBoss, UNIT_STATE_LIFE) >= 0.405) then
call TriggerExecute(gg_trg_DeathDragon)
else
call DisableTrigger(gg_trg_DeathDragon)
endif
set e = null
set u = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_DeathDragon takes nothing returns nothing
set gg_trg_DeathDragon = CreateTrigger( )
call DisableTrigger( gg_trg_DeathDragon )
call TriggerAddAction( gg_trg_DeathDragon, function Trig_DeathDragon_Actions )
endfunction
function Trig_DeathDragon2_Actions takes nothing returns nothing
local real a = GetUnitState(udg_DeathBoss, UNIT_STATE_MANA)
call PolledWait(3)
loop
exitwhen SpellBossCheck(udg_DeathBoss) == true
call PolledWait(0.3)
endloop
if (a >= 70) then
set udg_DragonA = 0
call SetUnitState(udg_DeathBoss, UNIT_STATE_MANA, (a - 70))
call PauseUnit(udg_DeathBoss, true)
call SetUnitFlyHeight( udg_DeathBoss, 1200, 1000)
call PolledWait(1.3)
call EnableTrigger(gg_trg_DeathDragonTimer)
call PolledWait(1.3)
call SetUnitFlyHeight( udg_DeathBoss, 140, 1000)
call PauseUnit(udg_DeathBoss, false)
endif
call PolledWait(7)
if (GetUnitState(udg_DeathBoss, UNIT_STATE_LIFE) >= 0.405) then
call TriggerExecute(gg_trg_DeathDragon2)
else
call DisableTrigger(gg_trg_DeathDragon2)
endif
endfunction
//===========================================================================
function InitTrig_DeathDragon2 takes nothing returns nothing
set gg_trg_DeathDragon2 = CreateTrigger( )
call DisableTrigger( gg_trg_DeathDragon2 )
call TriggerAddAction( gg_trg_DeathDragon2, function Trig_DeathDragon2_Actions )
endfunction
function Trig_DeathDragonTimer_Actions takes nothing returns nothing
local location l = Location(-10170, 13250)
local location l2
local real x
local real y
local real a
local unit u
local real b
local location l3 = Location(GetRandomReal(-10600,-9600), GetRandomReal(12700,13840))
set udg_DragonA = udg_DragonA + 1
set a = 10*udg_DragonA
set x = GetLocationX(l) + 700 * Cos(a * 0.01745)
set y = GetLocationY(l) + 700 * Sin(a * 0.01745)
set l2 = Location(x, y)
call SetUnitPositionLoc(udg_DeathBoss, l2)
call SetUnitFacing(udg_DeathBoss, (a+90))
set b = 57.2958 * Atan2(GetLocationY(l3) - GetLocationY(l2), GetLocationX(l3) - GetLocationX(l2))
set u = CreateUnitAtLoc(GetOwningPlayer(udg_DeathBoss), 'u00T', l2, b)
call IssuePointOrderLoc( u, "attackground", l3 )
if (udg_DragonA <= 18) then
call SetUnitFlyHeight( udg_DeathBoss, GetUnitFlyHeight(udg_DeathBoss) - 60, 99999 )
else
call SetUnitFlyHeight( udg_DeathBoss, GetUnitFlyHeight(udg_DeathBoss) + 60, 99999 )
endif
if (udg_DragonA >= 36) then
call DisableTrigger(gg_trg_DeathDragonTimer)
call SetUnitPositionLoc(udg_DeathBoss, l)
call SetUnitFacing(udg_DeathBoss, 270)
endif
call RemoveLocation(l)
set l = null
call RemoveLocation(l3)
set l3 = null
call RemoveLocation(l2)
set l2 = null
set u = null
endfunction
//===========================================================================
function InitTrig_DeathDragonTimer takes nothing returns nothing
set gg_trg_DeathDragonTimer = CreateTrigger( )
call DisableTrigger( gg_trg_DeathDragonTimer )
call TriggerRegisterTimerEvent( gg_trg_DeathDragonTimer, 0.03, true )
call TriggerAddAction( gg_trg_DeathDragonTimer, function Trig_DeathDragonTimer_Actions )
endfunction
function Trig_DeathBossDie_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_DeathBoss ) ) then
return false
endif
return true
endfunction
function Trig_DeathBossDie_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_DeathGhost )
call DisableTrigger( gg_trg_DeathGhost2 )
call DisableTrigger( gg_trg_DeathVampire)
call DisableTrigger( gg_trg_DeathVampire2 )
call DisableTrigger( gg_trg_DeathAttackers )
call DisableTrigger( gg_trg_DeathBossDie )
call DisableTrigger( gg_trg_DeathNumbers )
call PolledWait(2)
call TriggerExecute( gg_trg_StopMUSIC )
call DisplayTextToForce( GetPlayersAll(), "Congratulations! Take your reward: |cffffff00600 gold!|r" )
if (udg_Player1 == true) then
call AdjustPlayerStateBJ( 600, Player(0), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero1, Location(-5500, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(0), udg_Hero1, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(0), 0 )
endif
if (udg_Player2 == true) then
call AdjustPlayerStateBJ( 600, Player(1), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero2, Location(-3250, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(1), udg_Hero2, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(1), 0 )
endif
if (udg_Player3 == true) then
call AdjustPlayerStateBJ( 600, Player(2), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero3, Location(-950, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(2), udg_Hero3, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(2), 0 )
endif
if (udg_Player4 == true) then
call AdjustPlayerStateBJ( 600, Player(3), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero4, Location(1330, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(3), udg_Hero4, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(3), 0 )
endif
set udg_ForestAttack = 0
set udg_ForestHP = 0
set udg_ForestArmor = 0
set udg_ForestPot = 0
set udg_ForestResist = 0
set udg_ForestRune = 0
call SetWaterBaseColorBJ( 100, 100, 100, 50 )
call TriggerExecute( gg_trg_StartIsland )
endfunction
//===========================================================================
function InitTrig_DeathBossDie takes nothing returns nothing
set gg_trg_DeathBossDie = CreateTrigger( )
call DisableTrigger( gg_trg_DeathBossDie )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DeathBossDie, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_DeathBossDie, Condition( function Trig_DeathBossDie_Conditions ) )
call TriggerAddAction( gg_trg_DeathBossDie, function Trig_DeathBossDie_Actions )
endfunction
function AntilagUnit takes unit u returns nothing
call BlzSetUnitArmor( u, 8 )
call BlzSetUnitBaseDamage( u, 10, 0 )
call BlzSetUnitMaxHP( u, 50)
endfunction
function Trig_AntilagTrigger_Actions takes nothing returns nothing
local unit u1 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00F', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u2 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00G', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u3 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00H', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u4 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00I', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u5 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00J', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u6 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00K', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u7 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00P', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u8 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00O', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u9 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00U', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u10 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00V', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u11 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00W', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u12 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00X', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u13 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00Y', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u14 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'h00X', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u15 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00Z', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u16 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n010', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u17 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n011', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u18 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00L', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u19 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00M', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u20 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00N', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u21 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'h00Z', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u22 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n015', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
local unit u23 = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n016', GetRandomReal(-15000, -14000), GetRandomReal(9000, 10000), 0)
call AntilagUnit(u1)
call AntilagUnit(u2)
call AntilagUnit(u3)
call AntilagUnit(u4)
call AntilagUnit(u5)
call AntilagUnit(u6)
call AntilagUnit(u7)
call AntilagUnit(u8)
call PolledWait(2)
call AntilagUnit(u9)
call AntilagUnit(u10)
call AntilagUnit(u11)
call AntilagUnit(u12)
call AntilagUnit(u13)
call AntilagUnit(u14)
call AntilagUnit(u15)
call AntilagUnit(u16)
call PolledWait(2)
call AntilagUnit(u17)
call AntilagUnit(u18)
call AntilagUnit(u19)
call AntilagUnit(u20)
call AntilagUnit(u21)
call AntilagUnit(u22)
call AntilagUnit(u23)
call PolledWait(2)
call RemoveUnit(u1)
call RemoveUnit(u2)
call RemoveUnit(u3)
call RemoveUnit(u4)
call RemoveUnit(u5)
call RemoveUnit(u6)
call RemoveUnit(u7)
call RemoveUnit(u8)
call RemoveUnit(u9)
call RemoveUnit(u10)
call RemoveUnit(u11)
call RemoveUnit(u12)
call RemoveUnit(u13)
call RemoveUnit(u14)
call RemoveUnit(u15)
call RemoveUnit(u16)
call RemoveUnit(u17)
call RemoveUnit(u18)
call RemoveUnit(u19)
call RemoveUnit(u20)
call RemoveUnit(u21)
call RemoveUnit(u22)
call RemoveUnit(u23)
set u1 = null
set u2 = null
set u3 = null
set u4 = null
set u5 = null
set u6 = null
set u7 = null
set u8 = null
set u9 = null
set u10 = null
set u11 = null
set u12 = null
set u13 = null
set u14 = null
set u15 = null
set u16 = null
set u17 = null
set u18 = null
set u19 = null
set u20 = null
set u21 = null
set u22 = null
set u23 = null
endfunction
//===========================================================================
function InitTrig_AntilagTrigger takes nothing returns nothing
set gg_trg_AntilagTrigger = CreateTrigger( )
call TriggerAddAction( gg_trg_AntilagTrigger, function Trig_AntilagTrigger_Actions )
endfunction
function Trig_NeutralPotions_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_NeutralPotions_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetUnitLoc(u)
local integer i = GetRandomInt(1, 100)
local integer r = GetRandomInt(1, 100)
local integer a = GetRandomInt(1, 7)
if (i <= (12 + udg_ForestPot)) then
call CreateItemLoc( 'I04E', l )
endif
if (i >= (92 - udg_ForestPot)) then
call CreateItemLoc( 'I04F', l )
endif
if (r <= (5 + udg_ForestRune)) then
if (a == 1) then
call CreateItemLoc( 'I04K', l )
endif
if (a == 2) then
call CreateItemLoc( 'I04L', l )
endif
if (a == 3) then
call CreateItemLoc( 'I04M', l )
endif
if (a == 4) then
call CreateItemLoc( 'I04N', l )
endif
if (a == 5) then
call CreateItemLoc( 'I04J', l )
endif
if (a == 6) then
call CreateItemLoc( 'I04I', l )
endif
if (a == 7) then
call CreateItemLoc( 'I04H', l )
endif
endif
call RemoveLocation(l)
set l = null
set u = null
endfunction
//===========================================================================
function InitTrig_NeutralPotions takes nothing returns nothing
set gg_trg_NeutralPotions = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NeutralPotions, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_NeutralPotions, Condition( function Trig_NeutralPotions_Conditions ) )
call TriggerAddAction( gg_trg_NeutralPotions, function Trig_NeutralPotions_Actions )
endfunction
function Trig_MonsterDieScore_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_MonsterDieScore_Actions takes nothing returns nothing
local unit u = GetKillingUnit()
set udg_ForestN = udg_ForestN - 1
if ( GetOwningPlayer(u) == Player(0) ) then
set udg_Score1 = udg_Score1 + 1
endif
if ( GetOwningPlayer(u) == Player(1) ) then
set udg_Score2 = udg_Score2 + 1
endif
if ( GetOwningPlayer(u) == Player(2) ) then
set udg_Score3 = udg_Score3 + 1
endif
if ( GetOwningPlayer(u) == Player(3) ) then
set udg_Score4 = udg_Score4 + 1
endif
if (((udg_Score1 + udg_Score2 + udg_Score3 + udg_Score4) >= 60*udg_PlayerFactor) and (udg_BossLogic == false) ) then
call TriggerExecute(gg_trg_BossSpawn)
set udg_BossLogic = true
endif
set u = null
endfunction
//===========================================================================
function InitTrig_MonsterDieScore takes nothing returns nothing
set gg_trg_MonsterDieScore = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MonsterDieScore, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_MonsterDieScore, Condition( function Trig_MonsterDieScore_Conditions ) )
call TriggerAddAction( gg_trg_MonsterDieScore, function Trig_MonsterDieScore_Actions )
endfunction
function Trig_ForestAttackers_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetAttacker()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) ) ) then
return false
endif
return true
endfunction
function Trig_ForestAttackers_Actions takes nothing returns nothing
local unit u = GetAttacker()
local unit u2 = GetTriggerUnit()
if ( GetUnitTypeId(u) == 'n00K' ) then
call DisableTrigger(gg_trg_ForestAttackers)
call IssueTargetOrder(u, "ensnare", u2)
call PolledWait(1)
call IssueTargetOrder(u, "attack", u2)
call PolledWait(1)
call EnableTrigger(gg_trg_ForestAttackers)
endif
if ( GetUnitTypeId(u) == 'n00G' ) then
call DisableTrigger(gg_trg_ForestAttackers)
call IssueTargetOrder(u, "chainlightning", u2)
call PolledWait(1)
call IssueTargetOrder(u, "attack", u2)
call PolledWait(1)
call EnableTrigger(gg_trg_ForestAttackers)
endif
if ( GetUnitTypeId(u) == 'e000' ) then
call DisableTrigger(gg_trg_ForestAttackers)
call IssueTargetOrder(u, "entanglingroots", u2)
call PolledWait(1)
call IssueTargetOrder(u, "attack", u2)
call PolledWait(1)
call EnableTrigger(gg_trg_ForestAttackers)
endif
set u = null
set u2 = null
endfunction
//===========================================================================
function InitTrig_ForestAttackers takes nothing returns nothing
set gg_trg_ForestAttackers = CreateTrigger( )
call DisableTrigger( gg_trg_ForestAttackers )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ForestAttackers, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_ForestAttackers, Condition( function Trig_ForestAttackers_Conditions ) )
call TriggerAddAction( gg_trg_ForestAttackers, function Trig_ForestAttackers_Actions )
endfunction
function Trig_ForestSpawn_Actions takes nothing returns nothing
local unit u
local real dx = GetRandomReal(-14274, -8952)
local real dy = GetRandomReal(-11262, -4792)
local integer i = GetRandomInt(1, 100)
local integer ut
local boolean b1 = (dx >= -12900) and (dx <= -10900)
local boolean b2 = (dy >= -9300) and (dy <= -7300)
local real atk
local real arm
local real hp
if (i <= 22) then
set ut = 'n00I'
endif
if ((i >= 23) and (i <= 44)) then
set ut = 'n00P'
endif
if ((i >= 45) and (i <= 66)) then
set ut = 'n00F'
endif
if ((i >= 67) and (i <= 74)) then
set ut = 'n00O'
endif
if ((i >= 75) and (i <= 82)) then
set ut = 'n00G'
endif
if ((i >= 83) and (i <= 90)) then
set ut = 'n00J'
endif
if ((i >= 91) and (i <= 95)) then
set ut = 'n00K'
endif
if (i >= 96) then
set ut = 'n00H'
endif
if (b1 and b2) then
else
if (udg_ForestN <= (12 + 8*udg_PlayerFactor) ) then
set udg_ForestN = udg_ForestN + 1
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), ut, dx, dy, GetRandomReal(0, 360))
if (udg_ForestArmor >= 1) then
set arm = BlzGetUnitArmor(u) + udg_ForestArmor
call BlzSetUnitArmor( u, arm )
endif
if (udg_ForestAttack >= 1) then
set atk = 0.01*BlzGetUnitBaseDamage(u, 0)*(100 + udg_ForestAttack)
call BlzSetUnitBaseDamage( u, R2I(atk), 0 )
endif
if (udg_ForestHP >= 1) then
set hp = 0.01*GetUnitState(u, UNIT_STATE_MAX_LIFE)*(100 + udg_ForestHP)
call BlzSetUnitMaxHP( u, R2I(hp))
call SetUnitState( u, UNIT_STATE_LIFE, hp)
endif
else
endif
endif
set u = null
endfunction
//===========================================================================
function InitTrig_ForestSpawn takes nothing returns nothing
set gg_trg_ForestSpawn = CreateTrigger( )
call DisableTrigger( gg_trg_ForestSpawn )
call TriggerRegisterTimerEvent( gg_trg_ForestSpawn, 2, true )
call TriggerAddAction( gg_trg_ForestSpawn, function Trig_ForestSpawn_Actions )
endfunction
function CondForest1 takes nothing returns boolean
local boolean b = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b1 = (GetOwningPlayer(GetFilterUnit()) == Player(0))
local boolean b2 = (GetOwningPlayer(GetFilterUnit()) == Player(1))
local boolean b3 = (GetOwningPlayer(GetFilterUnit()) == Player(2))
local boolean b4 = (GetOwningPlayer(GetFilterUnit()) == Player(3))
return (b and (b1 or b2 or b3 or b4))
endfunction
function Trig_ForestEnt_Actions takes nothing returns nothing
local group g = CreateGroup()
local unit u
local unit u2
local location l
call GroupEnumUnitsInRect(g, gg_rct_ForestFull, Condition(function CondForest1))
set u = FirstOfGroup(g)
set l = GetUnitLoc(u)
set u2 = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u00R', l, 0)
call UnitAddAbility(u2, 'A079')
call IssuePointOrderLoc( u2, "forceofnature", l )
call PolledWait(1)
call RemoveUnit(u2)
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_ForestEnt takes nothing returns nothing
set gg_trg_ForestEnt = CreateTrigger( )
call DisableTrigger( gg_trg_ForestEnt )
call TriggerRegisterTimerEvent( gg_trg_ForestEnt, 27.00, true )
call TriggerAddAction( gg_trg_ForestEnt, function Trig_ForestEnt_Actions )
endfunction
function GetPumpkinLoc takes integer i returns location l
local real x
local real y
if (i == 1) then
set x = GetRandomReal(-14600, -13000)
set y = GetRandomReal(-9600, -4700)
return Location(x,y)
endif
if (i == 2) then
set x = GetRandomReal(-10900, -9100)
set y = GetRandomReal(-11700, -7500)
return Location(x,y)
endif
if (i == 3) then
set x = GetRandomReal(-14600, -11000)
set y = GetRandomReal(-11400, -9600)
return Location(x,y)
endif
if (i == 4) then
set x = GetRandomReal(-13000, -9000)
set y = GetRandomReal(-7200, -4800)
return Location(x,y)
endif
return Location(0, 0)
endfunction
function Trig_ForestPumpkin_Actions takes nothing returns nothing
local integer i
local location l
set i = GetRandomInt(1, 4)
set l = GetPumpkinLoc(i)
call CreateItemLoc( 'I04G', l )
set i = GetRandomInt(1, 4)
set l = GetPumpkinLoc(i)
call CreateItemLoc( 'I04G', l )
set i = GetRandomInt(1, 4)
set l = GetPumpkinLoc(i)
call CreateItemLoc( 'I04G', l )
set i = GetRandomInt(1, 4)
set l = GetPumpkinLoc(i)
call CreateItemLoc( 'I04G', l )
set i = GetRandomInt(1, 4)
set l = GetPumpkinLoc(i)
call CreateItemLoc( 'I04G', l )
set i = GetRandomInt(1, 4)
set l = GetPumpkinLoc(i)
call CreateItemLoc( 'I04G', l )
set i = GetRandomInt(1, 4)
set l = GetPumpkinLoc(i)
call CreateItemLoc( 'I04G', l )
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_ForestPumpkin takes nothing returns nothing
set gg_trg_ForestPumpkin = CreateTrigger( )
call DisableTrigger( gg_trg_ForestPumpkin )
call TriggerAddAction( gg_trg_ForestPumpkin, function Trig_ForestPumpkin_Actions )
endfunction
function Trig_ForestFontan_Actions takes nothing returns nothing
local integer i = GetRandomInt(1, 4)
local real x
local real y
local location l
if (i == 1) then
set x = GetRandomReal(-14600, -13000)
set y = GetRandomReal(-9600, -4700)
set l = Location(x,y)
endif
if (i == 2) then
set x = GetRandomReal(-10900, -9100)
set y = GetRandomReal(-11700, -7500)
set l = Location(x,y)
endif
if (i == 3) then
set x = GetRandomReal(-14600, -11000)
set y = GetRandomReal(-11400, -9600)
set l = Location(x,y)
endif
if (i == 4) then
set x = GetRandomReal(-13000, -9000)
set y = GetRandomReal(-7200, -4800)
set l = Location(x,y)
endif
call CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE), 'n00Q', GetLocationX(l), GetLocationY(l), 270)
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_ForestFontan takes nothing returns nothing
set gg_trg_ForestFontan = CreateTrigger( )
call DisableTrigger( gg_trg_ForestFontan )
call TriggerAddAction( gg_trg_ForestFontan, function Trig_ForestFontan_Actions )
endfunction
function BossNRemoveCon takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (GetOwningPlayer(GetFilterUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE))
return b1 and b2
endfunction
function BossNRemove takes nothing returns nothing
local unit u = GetEnumUnit()
call RemoveUnit(u)
set u = null
endfunction
function Trig_BossSpawn_Actions takes nothing returns nothing
local integer i = GetRandomInt(1, 3)
local location l = Location(-11900, -8200 )
local group g = CreateGroup()
local string s
call GroupEnumUnitsInRangeOfLoc(g, l, 5000, Condition(function BossNRemoveCon))
call ForGroup(g, function BossNRemove)
call PolledWait(2)
call DisableTrigger(gg_trg_ForestSpawn)
call DisableTrigger(gg_trg_ForestEnt)
set udg_TeleportPoint = Location(-14200, 14200)
set udg_ForestPot = 0
set udg_ForestHP = 0
set udg_ForestAttack = 0
set udg_ForestArmor = 0
set udg_ForestRune = 0
set udg_ForestResist = 0
if (i == 1) then
set udg_ForestBoss = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00R', -14205, 14205, 270)
call DisableTrigger(gg_trg_NeutralPotions)
set s = "|cff00ff00Boss: Ancient Ent!|r "
call DisplayTextToForce( GetPlayersAll(), s )
set s = "|cffffff00Abilities:|r 'Lot of Stones', 'Summon Ent' и 'Wooden Skin'"
call DisplayTextToForce( GetPlayersAll(), s )
endif
if (i == 2) then
set udg_ForestBoss = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00S', -14205, 14205, 270)
call DisableTrigger(gg_trg_NeutralPotions)
set s = "|cff00ff00Boss: Beast!|r "
call DisplayTextToForce( GetPlayersAll(), s )
set s = "|cffffff00Abilities:|r 'Bloodlust', 'Magic Resistance' и 'Roar'"
call DisplayTextToForce( GetPlayersAll(), s )
endif
if (i == 3) then
set udg_ForestBoss = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'n00T', -14205, 14205, 270)
call DisableTrigger(gg_trg_NeutralPotions)
set s = "|cff00ff00Boss: Forest Guardian!|r"
call DisplayTextToForce( GetPlayersAll(), s )
set s = "|cffffff00Abilities:|r 'Mass Roots', 'Lightning Bolt' и 'Healing'"
call DisplayTextToForce( GetPlayersAll(), s )
endif
if (udg_Player1 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero1, GetRandomLocInRect(gg_rct_Boss1), 90.00 )
call SetCameraTargetControllerNoZForPlayer( Player(0), udg_Hero1, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(0), 0 )
endif
if (udg_Player2 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero2, GetRandomLocInRect(gg_rct_Boss1), 90.00 )
call SetCameraTargetControllerNoZForPlayer( Player(1), udg_Hero2, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(1), 0 )
endif
if (udg_Player3 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero3, GetRandomLocInRect(gg_rct_Boss1), 90.00 )
call SetCameraTargetControllerNoZForPlayer( Player(2), udg_Hero3, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(2), 0 )
endif
if (udg_Player4 == true) then
call SetUnitPositionLocFacingBJ( udg_Hero4, GetRandomLocInRect(gg_rct_Boss1), 90.00 )
call SetCameraTargetControllerNoZForPlayer( Player(3), udg_Hero4, 0, 0, false )
call PolledWait(0.2)
call ResetToGameCameraForPlayer( Player(3), 0 )
endif
call PauseAllUnitsBJ( true )
call PolledWait(5)
call PauseAllUnitsBJ( false )
if (i == 1) then
call TriggerExecute(gg_trg_ForestEntSpells)
endif
if (i == 2) then
call EnableTrigger(gg_trg_ForestEntStrike)
endif
if (i == 3) then
call TriggerExecute(gg_trg_ForestEntGuard)
call EnableTrigger(gg_trg_ForestHeal)
endif
call EnableTrigger(gg_trg_ForestBossDie)
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_BossSpawn takes nothing returns nothing
set gg_trg_BossSpawn = CreateTrigger( )
call DisableTrigger( gg_trg_BossSpawn )
call TriggerAddAction( gg_trg_BossSpawn, function Trig_BossSpawn_Actions )
endfunction
function CloseTree takes nothing returns boolean
return ( GetDestructableTypeId(GetFilterDestructable()) == 'CTtr' )
endfunction
function DistTree takes nothing returns nothing
local location l = GetUnitLoc(udg_ForestBoss)
local real x = GetDestructableX(GetEnumDestructable())
local real y = GetDestructableY(GetEnumDestructable())
local location l2 = Location(x, y)
local real dx = GetLocationX(l2) - GetLocationX(l)
local real dy = GetLocationY(l2) - GetLocationY(l)
local real z = SquareRoot(dx * dx + dy * dy)
if (z <= udg_EntDist) then
set udg_EntDist = z
set udg_Tree = GetEnumDestructable()
endif
call RemoveLocation(l)
set l = null
call RemoveLocation(l2)
set l2 = null
endfunction
function Trig_ForestEntSpells_Actions takes nothing returns nothing
local location l = GetUnitLoc(udg_ForestBoss)
local unit u
local location l2
local real a = GetUnitState(udg_ForestBoss, UNIT_STATE_MANA)
local rect r = Rect(GetLocationX(l) - 400, GetLocationY(l) - 400, GetLocationX(l) + 400, GetLocationY(l) + 400 )
set udg_EntDist = 10000
loop
exitwhen SpellBossCheck(udg_ForestBoss) == true
call PolledWait(0.3)
endloop
set a = GetUnitState(udg_ForestBoss, UNIT_STATE_MANA)
if ((GetUnitState(udg_ForestBoss, UNIT_STATE_LIFE) >= 0.405) and (a >= 75)) then
call SetUnitState(udg_ForestBoss, UNIT_STATE_MANA, (a - 75))
call EnumDestructablesInRect(r, Condition(function CloseTree), function DistTree)
set l2 = GetDestructableLoc(udg_Tree)
set u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u000', GetLocationX(l), GetLocationY(l), 270)
call UnitAddAbility(u, 'A07E' )
call IssuePointOrderLoc( u, "forceofnature", l2 )
endif
call PolledWait (10)
loop
exitwhen SpellBossCheck(udg_ForestBoss) == true
call PolledWait(0.3)
endloop
set a = GetUnitState(udg_ForestBoss, UNIT_STATE_MANA)
if ((GetUnitState(udg_ForestBoss, UNIT_STATE_LIFE) >= 0.405) and (a >= 75)) then
call SetUnitState(udg_ForestBoss, UNIT_STATE_MANA, (a - 75))
call EnableTrigger(gg_trg_ForestEntStones)
call PolledWait(3)
call DisableTrigger(gg_trg_ForestEntStones)
endif
call PolledWait(10)
if (GetUnitState(udg_ForestBoss, UNIT_STATE_LIFE) >= 0.405) then
call TriggerExecute(gg_trg_ForestEntSpells)
else
call DisableTrigger(gg_trg_ForestEntSpells)
endif
call RemoveLocation(l)
set l = null
call RemoveLocation(l2)
set l2 = null
set u = null
endfunction
//===========================================================================
function InitTrig_ForestEntSpells takes nothing returns nothing
set gg_trg_ForestEntSpells = CreateTrigger( )
call DisableTrigger( gg_trg_ForestEntSpells )
call TriggerRegisterTimerEvent( gg_trg_ForestEntSpells, 1, false )
call TriggerAddAction( gg_trg_ForestEntSpells, function Trig_ForestEntSpells_Actions )
endfunction
function Trig_ForestEntStones_Actions takes nothing returns nothing
local location l = GetUnitLoc(udg_ForestBoss)
local real x = GetLocationX(l) + GetRandomReal(-500, 500)
local real y = GetLocationY(l) + GetRandomReal(-500, 500)
local location l2 = Location(x ,y)
local unit u = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), 'u00S', GetLocationX(l), GetLocationY(l), 270)
call IssuePointOrderLoc( u, "attackground", l2 )
call PolledWait(1.5)
call RemoveUnit(u)
call RemoveLocation(l)
set l = null
call RemoveLocation(l2)
set l2 = null
set u = null
endfunction
//===========================================================================
function InitTrig_ForestEntStones takes nothing returns nothing
set gg_trg_ForestEntStones = CreateTrigger( )
call DisableTrigger( gg_trg_ForestEntStones )
call TriggerRegisterTimerEvent( gg_trg_ForestEntStones, 0.30, true )
call TriggerAddAction( gg_trg_ForestEntStones, function Trig_ForestEntStones_Actions )
endfunction
function Trig_ForestEntStrike_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'n00S' ) ) then
return false
endif
return true
endfunction
function Trig_ForestEntStrike_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call IssueImmediateOrder( GetAttacker(), "creepthunderclap" )
call PolledWait( 12.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_ForestEntStrike takes nothing returns nothing
set gg_trg_ForestEntStrike = CreateTrigger( )
call DisableTrigger( gg_trg_ForestEntStrike )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ForestEntStrike, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_ForestEntStrike, Condition( function Trig_ForestEntStrike_Conditions ) )
call TriggerAddAction( gg_trg_ForestEntStrike, function Trig_ForestEntStrike_Actions )
endfunction
function ForestBossCon takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_ForestBoss)) == true)
return b1 and b2
endfunction
function ForestBossAct takes nothing returns nothing
local unit u = GetEnumUnit()
local location l = GetUnitLoc(u)
local unit u3 = CreateUnitAtLoc(GetOwningPlayer(udg_ForestBoss), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u3, 'A07A')
call IssueTargetOrder(u3, "entanglingroots", u)
set u = null
set u3 = null
call RemoveLocation(l)
set l = null
endfunction
function ForestBossAct2 takes nothing returns nothing
local unit u = GetEnumUnit()
call UnitDamageTarget(udg_ForestBoss, u, 200, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function Trig_ForestEntGuard_Actions takes nothing returns nothing
local group g = CreateGroup()
local location l = GetUnitLoc(udg_ForestBoss)
local real x
local real y
local effect e1
local effect e2
local effect e3
local unit u
local real a
loop
exitwhen SpellBossCheck(udg_ForestBoss) == true
call PolledWait(0.3)
endloop
set a = GetUnitState(udg_ForestBoss, UNIT_STATE_MANA)
if (a >= 100) then
call SetUnitState(udg_ForestBoss, UNIT_STATE_MANA, (a - 100))
call GroupEnumUnitsInRangeOfLoc(g, l, 600, Condition(function ForestBossCon))
call ForGroup(g, function ForestBossAct)
endif
call PolledWait(6)
call GroupClear(g)
loop
exitwhen SpellBossCheck(udg_ForestBoss) == true
call PolledWait(0.3)
endloop
call GroupEnumUnitsInRangeOfLoc(g, l, 600, Condition(function ForestBossCon))
set u = FirstOfGroup(g)
set a = GetUnitState(udg_ForestBoss, UNIT_STATE_MANA)
if ((u != null) and (a >= 50)) then
call SetUnitState(udg_ForestBoss, UNIT_STATE_MANA, (a - 50))
set l = GetUnitLoc(u)
call GroupClear(g)
set e1 = AddSpecialEffectLoc("Abilities\\Spells\\Human\\ManaShield\\ManaShieldCaster.mdl", l)
call PolledWait(2.3)
call DestroyEffect(e1)
set e3 = AddSpecialEffectLoc("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl", l)
call DestroyEffect(e3)
set e2 = AddSpecialEffectLoc("Abilities\\Spells\\Other\\Monsoon\\MonsoonBoltTarget.mdl", l)
call DestroyEffect(e2)
call GroupClear(g)
call GroupEnumUnitsInRangeOfLoc(g, l, 240, Condition(function ForestBossCon))
call ForGroup(g, function ForestBossAct2)
endif
call PolledWait(6)
if (GetUnitState(udg_ForestBoss, UNIT_STATE_LIFE) >= 0.405) then
call TriggerExecute(gg_trg_ForestEntGuard)
else
call DisableTrigger(gg_trg_ForestEntGuard)
endif
set u = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
set e1 = null
set e2 = null
set e3 = null
endfunction
//===========================================================================
function InitTrig_ForestEntGuard takes nothing returns nothing
set gg_trg_ForestEntGuard = CreateTrigger( )
call DisableTrigger( gg_trg_ForestEntGuard )
call TriggerRegisterTimerEvent( gg_trg_ForestEntGuard, 1.00, false )
call TriggerAddAction( gg_trg_ForestEntGuard, function Trig_ForestEntGuard_Actions )
endfunction
function Trig_ForestBossDie_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_ForestBoss ) ) then
return false
endif
return true
endfunction
function Trig_ForestBossDie_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_ForestEntSpells )
call DisableTrigger( gg_trg_ForestEntStrike )
call DisableTrigger( gg_trg_ForestEntStones )
call DisableTrigger( gg_trg_ForestEntGuard )
call DisableTrigger( gg_trg_ForestAttackers )
call DisableTrigger( gg_trg_ForestBossDie )
call PolledWait(2)
call TriggerExecute( gg_trg_StopMUSIC )
call DisplayTextToForce( GetPlayersAll(), "Congratulations! Take your reward: |cffffff00400 gold!|r" )
if (udg_Player1 == true) then
call AdjustPlayerStateBJ( 400, Player(0), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero1, Location(-5500, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(0), udg_Hero1, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(0), 0 )
endif
if (udg_Player2 == true) then
call AdjustPlayerStateBJ( 400, Player(1), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero2, Location(-3250, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(1), udg_Hero2, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(1), 0 )
endif
if (udg_Player3 == true) then
call AdjustPlayerStateBJ( 400, Player(2), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero3, Location(-950, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(2), udg_Hero3, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(2), 0 )
endif
if (udg_Player4 == true) then
call AdjustPlayerStateBJ( 400, Player(3), PLAYER_STATE_RESOURCE_GOLD )
call SetUnitPositionLoc(udg_Hero4, Location(1330, -14600))
call SetCameraTargetControllerNoZForPlayer( Player(3), udg_Hero4, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(3), 0 )
endif
set udg_ForestAttack = 0
set udg_ForestHP = 0
set udg_ForestArmor = 0
set udg_ForestPot = 0
set udg_ForestResist = 0
set udg_ForestRune = 0
call TriggerExecute( gg_trg_StartDeath )
endfunction
//===========================================================================
function InitTrig_ForestBossDie takes nothing returns nothing
set gg_trg_ForestBossDie = CreateTrigger( )
call DisableTrigger( gg_trg_ForestBossDie )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ForestBossDie, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_ForestBossDie, Condition( function Trig_ForestBossDie_Conditions ) )
call TriggerAddAction( gg_trg_ForestBossDie, function Trig_ForestBossDie_Actions )
endfunction
function Trig_ITEffect1_Conditions takes nothing returns boolean
local boolean b1 = (GetInventoryIndexOfItemTypeBJ(GetTriggerUnit(), 'I01B') > 0)
local boolean b2 = (GetInventoryIndexOfItemTypeBJ(GetTriggerUnit(), 'I020') > 0)
return (b1 or b2)
endfunction
function ItemHeroCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_ItemHero)) == true)
return b1 and b2
endfunction
function ItemHeroAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
call UnitDamageTarget(udg_ItemHero, u, 100, true, false, ATTACK_TYPE_MELEE, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function Trig_ITEffect1_Actions takes nothing returns nothing
local group g = CreateGroup()
local location l
local integer i = GetRandomInt(1, 100)
local effect e
if (i <= 20) then
call DisableTrigger(gg_trg_ITEffect1)
set udg_ItemHero = GetTriggerUnit()
set l = GetUnitLoc(udg_ItemHero)
call GroupEnumUnitsInRangeOfLoc(g, l, 325, Condition(function ItemHeroCheck1))
call ForGroup(g, function ItemHeroAct1)
set e = AddSpecialEffectTarget("war3mapImported\\Demolitionboulder.mdl" , udg_ItemHero, "origin")
call PolledWait(0.5)
call DestroyEffect(e)
call EnableTrigger(gg_trg_ITEffect1)
endif
set e = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_ITEffect1 takes nothing returns nothing
set gg_trg_ITEffect1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ITEffect1, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_ITEffect1, Condition( function Trig_ITEffect1_Conditions ) )
call TriggerAddAction( gg_trg_ITEffect1, function Trig_ITEffect1_Actions )
endfunction
function Trig_ITEffect2_Conditions takes nothing returns boolean
return (GetInventoryIndexOfItemTypeBJ(GetAttacker(), 'I020') > 0)
endfunction
function Trig_ITEffect2ACT takes nothing returns nothing
local real a = GetUnitFacing(udg_ItemBallU)
local location l = GetUnitLoc(udg_ItemBallU)
local real x
local real y
local location l2
local location l3 = GetUnitLoc(udg_ItemBallH)
set udg_ItemBallN = udg_ItemBallN + 1
if (udg_ItemBallN <= 30) then
set x = GetLocationX(l) + 20 * Cos(a * 0.01745)
set y = GetLocationY(l) + 20 * Sin(a * 0.01745)
set l2 = Location(x, y)
else
set x = GetLocationX(l) - 20 * Cos(a * 0.01745)
set y = GetLocationY(l) - 20 * Sin(a * 0.01745)
set l2 = Location(x, y)
endif
call MoveLightningEx(udg_ItemBallL, true, GetLocationX(l3), GetLocationY(l3), 50, GetLocationX(l2), GetLocationY(l2), 50)
call SetUnitPositionLoc(udg_ItemBallU, l2)
if (udg_ItemBallN >= 60) then
call DisableTrigger(udg_ItemBallT)
call EnableTrigger(gg_trg_ITEffect2)
call RemoveUnit(udg_ItemBallU)
call DestroyLightning(udg_ItemBallL)
endif
call RemoveLocation(l)
set l = null
call RemoveLocation(l2)
set l2 = null
endfunction
function Trig_ITEffect2_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local unit u2 = GetAttacker()
local location l = GetUnitLoc(u)
local location l2 = GetUnitLoc(u2)
local real a = 57.2958 * Atan2(GetLocationY(l2) - GetLocationY(l), GetLocationX(l2) - GetLocationX(l)) + 180
local integer i = GetRandomInt(1, 100)
local unit u3
if (i <= 17) then
set u3 = CreateUnitAtLoc(GetOwningPlayer(u2), 'u000', l2, a)
call UnitAddAbility(u3, 'A05T')
call IssuePointOrderLoc( u3, "impale", l )
set udg_ItemBallU = CreateUnitAtLoc(GetOwningPlayer(u2), 'u00Q', l2, a)
set udg_ItemBallN = 1
set udg_ItemBallH = GetAttacker()
set udg_ItemBallL = AddLightningEx("BLUE", true, GetLocationX(l2), GetLocationY(l2), 50, GetLocationX(l2)+2, GetLocationY(l2)+2, 50)
call DisableTrigger(gg_trg_ITEffect2)
call EnableTrigger(udg_ItemBallT)
endif
call RemoveLocation(l)
set l = null
call RemoveLocation(l2)
set l2 = null
set u = null
set u2 = null
set u3 = null
endfunction
//===========================================================================
function InitTrig_ITEffect2 takes nothing returns nothing
set gg_trg_ITEffect2 = CreateTrigger( )
set udg_ItemBallT = CreateTrigger( )
call DisableTrigger(udg_ItemBallT)
call TriggerRegisterTimerEvent( udg_ItemBallT, 0.02, true )
call TriggerAddAction( udg_ItemBallT, function Trig_ITEffect2ACT )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ITEffect2, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_ITEffect2, Condition( function Trig_ITEffect2_Conditions ) )
call TriggerAddAction( gg_trg_ITEffect2, function Trig_ITEffect2_Actions )
endfunction
function Trig_ITEffect3_Conditions takes nothing returns boolean
return (GetInventoryIndexOfItemTypeBJ(GetTriggerUnit(), 'I01K') > 0)
endfunction
function Trig_ITEffect3_Actions takes nothing returns nothing
local unit u0 = GetTriggerUnit()
local unit u = GetAttacker()
local location l = GetUnitLoc(u0)
local unit u2
local integer i = GetRandomInt(1, 100)
if ( i <= 15 ) then
set u2 = CreateUnitAtLoc(GetOwningPlayer(u0), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u2, 'A012')
call IssueTargetOrder(u2, "entanglingroots", u)
endif
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
set u0 = null
endfunction
//===========================================================================
function InitTrig_ITEffect3 takes nothing returns nothing
set gg_trg_ITEffect3 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ITEffect3, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_ITEffect3, Condition( function Trig_ITEffect3_Conditions ) )
call TriggerAddAction( gg_trg_ITEffect3, function Trig_ITEffect3_Actions )
endfunction
function Trig_ITEffect4_Conditions takes nothing returns boolean
return (GetInventoryIndexOfItemTypeBJ(GetTriggerUnit(), 'I01J') > 0)
endfunction
function ItemSCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_ItemHero)) == true)
return b1 and b2
endfunction
function ItemSAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathPact\\DeathPactTarget.mdl" , u, "origin")
call UnitDamageTarget(udg_ItemHero, u, 175, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(e)
set u = null
set e = null
endfunction
function Trig_ITEffect4_Actions takes nothing returns nothing
local location l
local group g = CreateGroup()
set udg_ItemHero = GetTriggerUnit()
set l = GetUnitLoc(udg_ItemHero)
call GroupEnumUnitsInRangeOfLoc(g, l, 600, Condition(function ItemSCheck1))
call ForGroup(g, function ItemSAct1)
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_ITEffect4 takes nothing returns nothing
set gg_trg_ITEffect4 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ITEffect4, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ITEffect4, Condition( function Trig_ITEffect4_Conditions ) )
call TriggerAddAction( gg_trg_ITEffect4, function Trig_ITEffect4_Actions )
endfunction
function Trig_ITEffect5_Conditions takes nothing returns boolean
local boolean a1 = (GetInventoryIndexOfItemTypeBJ(udg_Hero1, 'I01H') > 0)
local boolean a2 = GetOwningPlayer(GetKillingUnit()) == Player(0)
local boolean a = a1 and a2
local boolean b1 = (GetInventoryIndexOfItemTypeBJ(udg_Hero2, 'I01H') > 0)
local boolean b2 = GetOwningPlayer(GetKillingUnit()) == Player(1)
local boolean b = b1 and b2
local boolean c1 = (GetInventoryIndexOfItemTypeBJ(udg_Hero3, 'I01H') > 0)
local boolean c2 = GetOwningPlayer(GetKillingUnit()) == Player(2)
local boolean c = c1 and c2
local boolean d1 = (GetInventoryIndexOfItemTypeBJ(udg_Hero4, 'I01H') > 0)
local boolean d2 = GetOwningPlayer(GetKillingUnit()) == Player(3)
local boolean d = d1 and d2
return (a or b or c or d)
endfunction
function Trig_ITEffect5_Actions takes nothing returns nothing
local unit u
local real a
local real b
local effect e
if (GetOwningPlayer(GetKillingUnit()) == Player(0)) then
set u = udg_Hero1
endif
if (GetOwningPlayer(GetKillingUnit()) == Player(1)) then
set u = udg_Hero2
endif
if (GetOwningPlayer(GetKillingUnit()) == Player(2)) then
set u = udg_Hero3
endif
if (GetOwningPlayer(GetKillingUnit()) == Player(3)) then
set u = udg_Hero4
endif
set a = GetUnitState(u, UNIT_STATE_LIFE) + 50
set b = GetUnitState(u, UNIT_STATE_MANA) + 25
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIma\\AImaTarget.mdl" , u, "origin")
call SetUnitState(u, UNIT_STATE_MANA, b)
call SetUnitState(u, UNIT_STATE_LIFE, a)
call DestroyEffect(e)
set e = null
set u = null
endfunction
//===========================================================================
function InitTrig_ITEffect5 takes nothing returns nothing
set gg_trg_ITEffect5 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ITEffect5, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_ITEffect5, Condition( function Trig_ITEffect5_Conditions ) )
call TriggerAddAction( gg_trg_ITEffect5, function Trig_ITEffect5_Actions )
endfunction
function Trig_ITEffect6_Conditions takes nothing returns boolean
return (GetInventoryIndexOfItemTypeBJ(GetTriggerUnit(), 'I01P') > 0)
endfunction
function Trig_ITEffect6_Actions takes nothing returns nothing
local unit u3 = GetAttacker()
local unit u2 = GetTriggerUnit()
local unit u
local location l = GetUnitLoc(u2)
local integer i = GetRandomInt(1, 100)
if (i <= 15) then
set u = CreateUnitAtLoc(GetOwningPlayer(u2), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u, 'A001')
call IssueTargetOrder(u, "curse", u3)
endif
set u = null
set u2 = null
set u3 = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_ITEffect6 takes nothing returns nothing
set gg_trg_ITEffect6 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ITEffect6, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_ITEffect6, Condition( function Trig_ITEffect6_Conditions ) )
call TriggerAddAction( gg_trg_ITEffect6, function Trig_ITEffect6_Actions )
endfunction
function Trig_ITEffect7_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01N' ) ) then
return false
endif
return true
endfunction
function Trig_ITEffect7_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local real r = GetUnitState(u, UNIT_STATE_LIFE)*0.7
local integer a = GetHeroInt(u, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(u))]
local effect e = AddSpecialEffectTarget("Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl" , u, "origin")
call SetUnitState(u, UNIT_STATE_LIFE, r)
call DestroyEffect(e)
set udg_Power[GetConvertedPlayerId(GetOwningPlayer(u))] = udg_Power[GetConvertedPlayerId(GetOwningPlayer(u))] + a
call PolledWait(10)
set udg_Power[GetConvertedPlayerId(GetOwningPlayer(u))] = udg_Power[GetConvertedPlayerId(GetOwningPlayer(u))] - a
set u = null
set e = null
endfunction
//===========================================================================
function InitTrig_ITEffect7 takes nothing returns nothing
set gg_trg_ITEffect7 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ITEffect7, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_ITEffect7, Condition( function Trig_ITEffect7_Conditions ) )
call TriggerAddAction( gg_trg_ITEffect7, function Trig_ITEffect7_Actions )
endfunction
function Trig_ITEffect8_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I01I' ) ) then
return false
endif
return true
endfunction
function Trig_ITEffect8_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetUnitLoc(u)
local unit u2
local integer i = GetRandomInt(1, 5)
local effect e
if (i == 1) then
set u2 = CreateUnitAtLoc(GetOwningPlayer(u), 'h00V', l, bj_UNIT_FACING)
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl", u2, "origin")
call UnitApplyTimedLife( u2, 'BTLF', 50 )
call DestroyEffect(e)
endif
if (i == 2) then
set u2 = CreateUnitAtLoc(GetOwningPlayer(u), 'h00S', l, bj_UNIT_FACING)
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl", u2, "origin")
call UnitApplyTimedLife( u2, 'BTLF', 50 )
call DestroyEffect(e)
endif
if (i == 3) then
set u2 = CreateUnitAtLoc(GetOwningPlayer(u), 'h00U', l, bj_UNIT_FACING)
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl", u2, "origin")
call UnitApplyTimedLife( u2, 'BTLF', 50 )
call DestroyEffect(e)
endif
if (i == 4) then
set u2 = CreateUnitAtLoc(GetOwningPlayer(u), 'h00T', l, bj_UNIT_FACING)
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl", u2, "origin")
call UnitApplyTimedLife( u2, 'BTLF', 50 )
call DestroyEffect(e)
endif
if (i == 5) then
set u2 = CreateUnitAtLoc(GetOwningPlayer(u), 'n004', l, bj_UNIT_FACING)
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIil\\AIilTarget.mdl", u2, "origin")
call UnitApplyTimedLife( u2, 'BTLF', 50 )
call DestroyEffect(e)
endif
set u = null
set u2 = null
set e = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_ITEffect8 takes nothing returns nothing
set gg_trg_ITEffect8 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ITEffect8, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_ITEffect8, Condition( function Trig_ITEffect8_Conditions ) )
call TriggerAddAction( gg_trg_ITEffect8, function Trig_ITEffect8_Actions )
endfunction
function Trig_ITEffect9_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06H' ) ) then
return false
endif
return true
endfunction
function Trig_ITEffect9_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local unit u2 = GetSpellTargetUnit()
local unit u3
local location l = GetUnitLoc(u)
local integer i = GetRandomInt(1, 6)
if (i == 1) then
set u3 = CreateUnitAtLoc(GetOwningPlayer(u), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u3, 'A06C')
call IssueTargetOrder(u3, "curse", u2)
endif
if (i == 2) then
set u3 = CreateUnitAtLoc(GetOwningPlayer(u), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u3, 'A06D')
call IssueTargetOrderById(u3, 852230, u2)
endif
if (i == 3) then
set u3 = CreateUnitAtLoc(GetOwningPlayer(u), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u3, 'A06F')
call IssueTargetOrder(u3, "polymorph", u2)
endif
if (i == 4) then
set u3 = CreateUnitAtLoc(GetOwningPlayer(u), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u3, 'A06G')
call IssueTargetOrder(u3, "sleep", u2)
endif
if (i == 5) then
set u3 = CreateUnitAtLoc(GetOwningPlayer(u), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u3, 'A06A')
call IssueTargetOrder(u3, "slow", u2)
endif
if (i == 6) then
set u3 = CreateUnitAtLoc(GetOwningPlayer(u), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u3, 'A06E')
call IssueTargetOrder(u3, "creepthunderbolt", u2)
endif
set u = null
set u2 = null
set u3 = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_ITEffect9 takes nothing returns nothing
set gg_trg_ITEffect9 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ITEffect9, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ITEffect9, Condition( function Trig_ITEffect9_Conditions ) )
call TriggerAddAction( gg_trg_ITEffect9, function Trig_ITEffect9_Actions )
endfunction
function Trig_ITEffect10_Conditions takes nothing returns boolean
return (GetInventoryIndexOfItemTypeBJ(GetAttacker(), 'I01C') > 0)
endfunction
function Trig_ITEffect10_Actions takes nothing returns nothing
local unit u = GetAttacker()
local unit u2 = GetTriggerUnit()
local location l = GetUnitLoc(u)
local location l2 = GetUnitLoc(u2)
local real a = 57.2958 * Atan2(GetLocationY(l2) - GetLocationY(l), GetLocationX(l2) - GetLocationX(l))
local integer i = GetRandomInt(1, 100)
local unit u3
if (i <= 25) then
set u3 = CreateUnitAtLoc(GetOwningPlayer(u), 'u000', l, a)
call UnitAddAbility(u3, 'A06M')
call IssueTargetOrder(u3, "chainlightning", u2)
endif
set u = null
set u2 = null
set u3 = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_ITEffect10 takes nothing returns nothing
set gg_trg_ITEffect10 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ITEffect10, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_ITEffect10, Condition( function Trig_ITEffect10_Conditions ) )
call TriggerAddAction( gg_trg_ITEffect10, function Trig_ITEffect10_Actions )
endfunction
function Trig_ITEffect11_Conditions takes nothing returns boolean
return (GetInventoryIndexOfItemTypeBJ(GetAttacker(), 'I021') > 0)
endfunction
function Trig_ITEffect11_Actions takes nothing returns nothing
local unit u = GetAttacker()
local unit u2 = GetTriggerUnit()
local location l = GetUnitLoc(u)
local location l2 = GetUnitLoc(u2)
local real a = 57.2958 * Atan2(GetLocationY(l2) - GetLocationY(l), GetLocationX(l2) - GetLocationX(l))
local integer i = GetRandomInt(1, 100)
local unit u3
if (i <= 35) then
set u3 = CreateUnitAtLoc(GetOwningPlayer(u), 'u000', l, a)
call UnitAddAbility(u3, 'A06N')
call IssueTargetOrder(u3, "forkedlightning", u2)
endif
set u = null
set u2 = null
set u3 = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_ITEffect11 takes nothing returns nothing
set gg_trg_ITEffect11 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ITEffect11, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_ITEffect11, Condition( function Trig_ITEffect11_Conditions ) )
call TriggerAddAction( gg_trg_ITEffect11, function Trig_ITEffect11_Actions )
endfunction
function Trig_ITEffect12_Conditions takes nothing returns boolean
return (GetInventoryIndexOfItemTypeBJ(GetTriggerUnit(), 'I023') > 0)
endfunction
function ItemHeroCheck7 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_ItemHero)) == true)
return b1 and b2
endfunction
function ItemHeroAct7 takes nothing returns nothing
local unit u = GetEnumUnit()
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl" , u, "origin")
call DestroyEffect(e)
call UnitDamageTarget(udg_ItemHero, u, 300, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS)
set u = null
set e = null
endfunction
function Trig_ITEffect12_Actions takes nothing returns nothing
local group g = CreateGroup()
local location l
local integer i = GetRandomInt(1, 100)
local effect e
local real a
set udg_ItemHero = GetTriggerUnit()
set l = GetUnitLoc(udg_ItemHero)
set a = GetUnitState(udg_ItemHero, UNIT_STATE_LIFE) + 300
call SetUnitState(udg_ItemHero, UNIT_STATE_LIFE, a)
call GroupEnumUnitsInRangeOfLoc(g, l, 600, Condition(function ItemHeroCheck7))
call ForGroup(g, function ItemHeroAct7)
set e = AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl" , udg_ItemHero, "origin")
call DestroyEffect(e)
set e = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_ITEffect12 takes nothing returns nothing
set gg_trg_ITEffect12 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ITEffect12, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ITEffect12, Condition( function Trig_ITEffect12_Conditions ) )
call TriggerAddAction( gg_trg_ITEffect12, function Trig_ITEffect12_Actions )
endfunction
function Trig_ITEffect13_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I052' ) ) then
return false
endif
return true
endfunction
function ItemHeroCheck13 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_ItemHero)) == true)
return b1 and b2
endfunction
function ItemHeroAct13 takes nothing returns nothing
local unit u = GetEnumUnit()
local integer a = GetUnitLevel(u)
local integer i = GetRandomInt(1, 100)
local effect e
local location l = GetUnitLoc(u)
if (i <= (1 + 4*(20 - a)) ) then
set e = AddSpecialEffectLoc("Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl", l)
call DestroyEffect(e)
call UnitDamageTarget(udg_ItemHero, u, 99999, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS)
endif
set u = null
set e = null
call RemoveLocation(l)
set l = null
endfunction
function Trig_ITEffect13_Actions takes nothing returns nothing
local group g = CreateGroup()
local location l
set udg_ItemHero = GetTriggerUnit()
set l = GetUnitLoc(udg_ItemHero)
call GroupEnumUnitsInRangeOfLoc(g, l, 1000, Condition(function ItemHeroCheck13))
call ForGroup(g, function ItemHeroAct13)
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_ITEffect13 takes nothing returns nothing
set gg_trg_ITEffect13 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ITEffect13, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_ITEffect13, Condition( function Trig_ITEffect13_Conditions ) )
call TriggerAddAction( gg_trg_ITEffect13, function Trig_ITEffect13_Actions )
endfunction
function Trig_ITHealth_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I04E' ) ) then
return false
endif
return true
endfunction
function Trig_ITHealth_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local real a = 0.35*GetUnitState(u, UNIT_STATE_MAX_LIFE)
local real x = GetUnitState(u, UNIT_STATE_LIFE) + a
call SetUnitState(u, UNIT_STATE_LIFE, x)
set u = null
endfunction
//===========================================================================
function InitTrig_ITHealth takes nothing returns nothing
set gg_trg_ITHealth = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ITHealth, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_ITHealth, Condition( function Trig_ITHealth_Conditions ) )
call TriggerAddAction( gg_trg_ITHealth, function Trig_ITHealth_Actions )
endfunction
function Trig_ITMana_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I04F' ) ) then
return false
endif
return true
endfunction
function Trig_ITMana_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local real a = 0.35*GetUnitState(u, UNIT_STATE_MAX_MANA)
local real x = GetUnitState(u, UNIT_STATE_MANA) + a
call SetUnitState(u, UNIT_STATE_MANA, x)
set u = null
endfunction
//===========================================================================
function InitTrig_ITMana takes nothing returns nothing
set gg_trg_ITMana = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ITMana, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_ITMana, Condition( function Trig_ITMana_Conditions ) )
call TriggerAddAction( gg_trg_ITMana, function Trig_ITMana_Actions )
endfunction
function Trig_ITMush_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I04Y' ) ) then
return false
endif
return true
endfunction
function Trig_ITMush_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetUnitLoc(u)
local unit u2
local real a = 0.35*GetUnitState(u, UNIT_STATE_MAX_LIFE)
local real x = GetUnitState(u, UNIT_STATE_LIFE) + a
local real b = 0.35*GetUnitState(u, UNIT_STATE_MAX_MANA)
local real y = GetUnitState(u, UNIT_STATE_MANA) + a
local integer i = GetRandomInt(1, 3)
if (i == 1) then
call SetUnitState(u, UNIT_STATE_MANA, y)
endif
if (i == 2) then
call SetUnitState(u, UNIT_STATE_LIFE, x)
endif
if (i == 3) then
set u2 = CreateUnitAtLoc(GetOwningPlayer(u), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u2, 'A0A2')
call IssueTargetOrder(u2, "bloodlust", u)
endif
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_ITMush takes nothing returns nothing
set gg_trg_ITMush = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ITMush, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_ITMush, Condition( function Trig_ITMush_Conditions ) )
call TriggerAddAction( gg_trg_ITMush, function Trig_ITMush_Actions )
endfunction
function Trig_RuneAttack_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I04K' ) ) then
return false
endif
return true
endfunction
function Trig_RuneAttack_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local integer a = BlzGetUnitBaseDamage(u, 0) + 3
call BlzSetUnitBaseDamage( u, a, 0 )
endfunction
//===========================================================================
function InitTrig_RuneAttack takes nothing returns nothing
set gg_trg_RuneAttack = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_RuneAttack, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_RuneAttack, Condition( function Trig_RuneAttack_Conditions ) )
call TriggerAddAction( gg_trg_RuneAttack, function Trig_RuneAttack_Actions )
endfunction
function Trig_Recipe_Conditions takes nothing returns boolean
local boolean b1 = ( GetTriggerUnit() == udg_Hero1 )
local boolean b2 = ( GetTriggerUnit() == udg_Hero2 )
local boolean b3 = ( GetTriggerUnit() == udg_Hero3 )
local boolean b4 = ( GetTriggerUnit() == udg_Hero4 )
return (b1 or b2 or b3 or b4)
endfunction
function GetInventoryIndexOfItemTypeX takes unit hero, integer id returns integer
local integer i = 0
local item it
loop
set it = UnitItemInSlot(hero, i)
if (it != null) and (GetItemTypeId(it) == id) then
return i + 1
endif
set i = i + 1
exitwhen i >= 6
endloop
return 0
endfunction
function GetItemOfTypeFromUnitX takes unit hero, integer id returns item
local integer i = 0
local item it
loop
set it = UnitItemInSlot(hero, i)
if (it != null) and (GetItemTypeId(it) == id) then
return UnitItemInSlot(hero, i)
endif
set i = i + 1
exitwhen i >= 6
endloop
return null
endfunction
function Trig_Recipe_Actions takes nothing returns nothing
local boolean b1
local boolean b2
local boolean b3
local boolean b4
local boolean b5
local real r
local effect e
local integer a
local unit u = GetTriggerUnit()
local item i
//-----------GIVERECIPES----------
if (GetInventoryIndexOfItemTypeX(u, 'I033') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I033') )
call UnitAddItemById(u, 'I027' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I034') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I034') )
call UnitAddItemById(u, 'I026' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I037') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I037') )
call UnitAddItemById(u, 'I028' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I038') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I038') )
call UnitAddItemById(u, 'I029' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I03H') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I03H') )
call UnitAddItemById(u, 'I02A' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I03K') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I03K') )
call UnitAddItemById(u, 'I02B' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I03M') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I03M') )
call UnitAddItemById(u, 'I02C' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I03N') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I03N') )
call UnitAddItemById(u, 'I02D' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I03O') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I03O') )
call UnitAddItemById(u, 'I02E' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I03Q') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I03Q') )
call UnitAddItemById(u, 'I02G' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I03R') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I03R') )
call UnitAddItemById(u, 'I02P' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I03T') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I03T') )
call UnitAddItemById(u, 'I02H' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I03V') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I03V') )
call UnitAddItemById(u, 'I02I' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I03W') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I03W') )
call UnitAddItemById(u, 'I02J' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I03X') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I03X') )
call UnitAddItemById(u, 'I02K' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I03Y') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I03Y') )
call UnitAddItemById(u, 'I02L' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I040') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I040') )
call UnitAddItemById(u, 'I02M' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I041') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I041') )
call UnitAddItemById(u, 'I02N' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I042') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I042') )
call UnitAddItemById(u, 'I02O' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I043') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I043') )
call UnitAddItemById(u, 'I02Q' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I045') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I045') )
call UnitAddItemById(u, 'I02T' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I047') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I047') )
call UnitAddItemById(u, 'I02S' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I048') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I048') )
call UnitAddItemById(u, 'I02U' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I049') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I049') )
call UnitAddItemById(u, 'I02V' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I04A') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I04A') )
call UnitAddItemById(u, 'I02W' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I04B') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I04B') )
call UnitAddItemById(u, 'I02X' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I04C') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I04C') )
call UnitAddItemById(u, 'I02Y' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I04D') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I04D') )
call UnitAddItemById(u, 'I02Z' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I044') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I044') )
call UnitAddItemById(u, 'I02R' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I050') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I050') )
call UnitAddItemById(u, 'I051' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I053') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I053') )
call UnitAddItemById(u, 'I054' )
endif
if (GetInventoryIndexOfItemTypeX(u, 'I057') > 0) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I057') )
call UnitAddItemById(u, 'I056' )
endif
//-----------ITEM1----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I00I') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
if (b1 == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00I') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00I') )
call UnitAddItemById(u, 'I018' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM2----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I007') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
if (b1 == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I007') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I007') )
call UnitAddItemById(u, 'I00S' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM3----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I005') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I00C') > 0)
if (b1 and b2 == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I005') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I005') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00C') )
call UnitAddItemById(u, 'I00R' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM4----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I004') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
if (b1 == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I004') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I004') )
call UnitAddItemById(u, 'I00X' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM5----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I002') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 3)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I027') > 0)
if (b1 and b2 == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I002') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I002') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I002') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I027') )
call UnitAddItemById(u, 'I014' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM6----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I00P') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I00Q') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b2 = (r >= 2)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I00E') > 0)
set b4 = (GetInventoryIndexOfItemTypeX(u, 'I026') > 0)
if ((b1 and b2 and b3 and b4) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00P') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00P') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00Q') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00Q') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00E') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I026') )
call UnitAddItemById(u, 'I016' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM7----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I00I') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I00F') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I00N') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00I') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00F') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00N') )
call UnitAddItemById(u, 'I012' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM8----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I00C') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I003') > 0)
if (b1 and b2 == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00C') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00C') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I003') )
call UnitAddItemById(u, 'I01V' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM9----------
set a = 0
set r = 0
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I009') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I00D') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I028') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I009') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00D') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I028') )
call UnitAddItemById(u, 'I01X' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM10----------
set a = 0
set r = 0
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I00E') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I014') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I029') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00E') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I014') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I029') )
call UnitAddItemById(u, 'I01O' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM11----------
set a = 0
set r = 0
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I001') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I006') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I00X') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I001') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I006') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00X') )
call UnitAddItemById(u, 'I019' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM12----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I003') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I004') > 0)
if (b1 and b2 == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I003') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I003') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I004') )
call UnitAddItemById(u, 'I00Y' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM13----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I008') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
if (b1 == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I008') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I008') )
call UnitAddItemById(u, 'I010' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM14----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I00F') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
if (b1 == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00F') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00F') )
call UnitAddItemById(u, 'I01W' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM15----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I00G') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
if (b1 == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00G') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00G') )
call UnitAddItemById(u, 'I017' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM16----------
set a = 0
set r = 0
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I00B') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I00G') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I00K') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00B') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00G') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00K') )
call UnitAddItemById(u, 'I00V' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM17----------
set a = 0
set r = 0
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I00B') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I010') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I00L') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00B') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I010') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00L') )
call UnitAddItemById(u, 'I00U' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM18----------
set a = 0
set r = 0
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I00A') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I00K') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I00G') > 0)
set b4 = (GetInventoryIndexOfItemTypeX(u, 'I00H') > 0)
if ((b1 and b2 and b3 and b4) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00A') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00K') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00G') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00H') )
call UnitAddItemById(u, 'I00W' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM19----------
set a = 0
set r = 0
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I00O') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I00K') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I00L') > 0)
set b4 = (GetInventoryIndexOfItemTypeX(u, 'I02A') > 0)
if ((b1 and b2 and b3 and b4) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00O') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00K') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00L') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02A') )
call UnitAddItemById(u, 'I00Z' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM20----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I00C') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I00B') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I00D') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00C') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00C') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00B') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00D') )
call UnitAddItemById(u, 'I00T' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM21----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I00O') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
if (b1 == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00O') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00O') )
call UnitAddItemById(u, 'I015' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM22----------
set a = 0
set r = 0
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I00J') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I009') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I02B') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00J') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I009') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02B') )
call UnitAddItemById(u, 'I011' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM23----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I000') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 3)
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I00C') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b2 = (r >= 2)
if ((b1 and b2) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00C') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00C') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I000') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I000') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I000') )
call UnitAddItemById(u, 'I013' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM24----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I00M') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 4)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I02C') > 0)
if (b1 and b2 == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00M') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00M') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00M') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00M') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02C') )
call UnitAddItemById(u, 'I01Y' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM25----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I00R') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I02D') > 0)
if ((b1 and b2) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00R') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00R') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02D') )
call UnitAddItemById(u, 'I01E' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM26----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I02E') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I014') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I013') > 0)
set b4 = (GetInventoryIndexOfItemTypeX(u, 'I00C') > 0)
if ((b1 and b2 and b3 and b4) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02E') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00C') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I014') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I013') )
call UnitAddItemById(u, 'I01F' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM27----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I017') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I00G') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I01W') > 0)
set b4 = (GetInventoryIndexOfItemTypeX(u, 'I00X') > 0)
if ((b1 and b2 and b3 and b4) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I017') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00G') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01W') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00X') )
call UnitAddItemById(u, 'I01Q' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM28----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I00R') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I00Y') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I02G') > 0)
set b4 = (GetInventoryIndexOfItemTypeX(u, 'I00X') > 0)
if ((b1 and b2 and b3 and b4) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00R') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02G') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00Y') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00X') )
call UnitAddItemById(u, 'I01A' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM29----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I02P') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I014') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I018') > 0)
set b4 = (GetInventoryIndexOfItemTypeX(u, 'I015') > 0)
if ((b1 and b2 and b3 and b4) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02P') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I014') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I018') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I015') )
call UnitAddItemById(u, 'I01L' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM30----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I006') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I003') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I01V') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I006') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I006') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I003') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01V') )
call UnitAddItemById(u, 'I01U' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM31----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I000') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I019') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I02H') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I000') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I000') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I019') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02H') )
call UnitAddItemById(u, 'I01D' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM32----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I010') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I018') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I017') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I010') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I010') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I018') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I017') )
call UnitAddItemById(u, 'I01K' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM33----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I013') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I003') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I009') > 0)
set b4 = (GetInventoryIndexOfItemTypeX(u, 'I02I') > 0)
if ((b1 and b2 and b3 and b4) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I013') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I003') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I009') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02I') )
call UnitAddItemById(u, 'I01C' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM34----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I017') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I00S') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I00D') > 0)
set b4 = (GetInventoryIndexOfItemTypeX(u, 'I02J') > 0)
if ((b1 and b2 and b3 and b4) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I017') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00S') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00D') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02J') )
call UnitAddItemById(u, 'I01M' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM35----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I006') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I02K') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I019') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I006') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I006') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02K') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I019') )
call UnitAddItemById(u, 'I01G' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM36----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I010') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I00L') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I015') > 0)
set b4 = (GetInventoryIndexOfItemTypeX(u, 'I02L') > 0)
if ((b1 and b2 and b3 and b4) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I010') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I010') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00L') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I015') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02L') )
call UnitAddItemById(u, 'I01J' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM37----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I010') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I014') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I012') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I010') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I010') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I014') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I012') )
call UnitAddItemById(u, 'I01H' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM38----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I01X') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I02M') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I00E') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01X') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01X') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02M') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00E') )
call UnitAddItemById(u, 'I01T' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM39----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I02N') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I015') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I00Z') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02N') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I015') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00Z') )
call UnitAddItemById(u, 'I01N' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM40----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I00G') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I019') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I02O') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00G') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I019') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02O') )
call UnitAddItemById(u, 'I01B' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM41----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I00W') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I00G') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I02Q') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00W') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00G') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02Q') )
call UnitAddItemById(u, 'I01P' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM42----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I01O') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I014') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I00X') > 0)
set b4 = (GetInventoryIndexOfItemTypeX(u, 'I02R') > 0)
if ((b1 and b2 and b3 and b4) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01O') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I014') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00X') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02R') )
call UnitAddItemById(u, 'I01I' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM43----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I006') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I00E') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b2 = (r >= 2)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I01W') > 0)
set b4 = (GetInventoryIndexOfItemTypeX(u, 'I02T') > 0)
if ((b1 and b2 and b3 and b4) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00E') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I00E') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I006') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I006') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01W') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02T') )
call UnitAddItemById(u, 'I01S' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM44----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I01O') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I016') > 0)
if ((b1 and b2) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01O') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I016') )
call UnitAddItemById(u, 'I01R' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM45----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I014') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I01V') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I02S') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I014') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01V') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02S') )
call UnitAddItemById(u, 'I01Z' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM46----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I01B') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I01U') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I02Z') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01B') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01U') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02Z') )
call UnitAddItemById(u, 'I020' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM47----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I01C') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I01A') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I02U') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01C') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01A') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02U') )
call UnitAddItemById(u, 'I021' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM48----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I01M') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I01R') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I02V') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01M') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01R') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02V') )
call UnitAddItemById(u, 'I024' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM49----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I01F') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I01I') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I02W') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01F') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01I') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02W') )
call UnitAddItemById(u, 'I025' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM50----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I01P') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I01Q') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I02X') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01P') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01Q') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02X') )
call UnitAddItemById(u, 'I022' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM51----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I01L') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I01J') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I02Y') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01L') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01J') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I02Y') )
call UnitAddItemById(u, 'I023' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM52----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I01G') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I01S') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I056') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01G') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01S') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I056') )
call UnitAddItemById(u, 'I055' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM53----------
set b1 = (GetInventoryIndexOfItemTypeX(u, 'I01H') > 0)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I01Y') > 0)
set b3 = (GetInventoryIndexOfItemTypeX(u, 'I054') > 0)
if ((b1 and b2 and b3) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01H') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01Y') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I054') )
call UnitAddItemById(u, 'I052' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
//-----------ITEM54----------
set a = 0
set r = 0
loop
set i = UnitItemInSlot(u, a)
set a = a + 1
if (i != null) and (GetItemTypeId(i) == 'I01D') then
set r = r + 1
endif
exitwhen a >= 6
endloop
set b1 = (r >= 2)
set b2 = (GetInventoryIndexOfItemTypeX(u, 'I051') > 0)
if ((b1 and b2) == true) then
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01D') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I01D') )
call RemoveItem( GetItemOfTypeFromUnitX(u, 'I051') )
call UnitAddItemById(u, 'I04Z' )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" , u, "origin")
call DestroyEffect(e)
endif
set e = null
set u = null
endfunction
//===========================================================================
function InitTrig_Recipe takes nothing returns nothing
set gg_trg_Recipe = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Recipe, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Recipe, Condition( function Trig_Recipe_Conditions ) )
call TriggerAddAction( gg_trg_Recipe, function Trig_Recipe_Actions )
endfunction
function Trig_CdnPaladin_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H000_0001))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H000_0001))]
endif
set a = 10*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H000_0001, 'A000'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H000_0001, 'A000'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H000_0001, 'A000'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 25*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H000_0001, 'A004'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H000_0001, 'A004'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H000_0001, 'A004'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 90*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H000_0001, 'A005'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CdnPaladin takes nothing returns nothing
set gg_trg_CdnPaladin = CreateTrigger( )
call DisableTrigger( gg_trg_CdnPaladin )
call TriggerRegisterTimerEvent( gg_trg_CdnPaladin, 1.00, true )
call TriggerAddAction( gg_trg_CdnPaladin, function Trig_CdnPaladin_Actions )
endfunction
function Trig_CdnBerserk_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H001_0012))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H001_0012))]
endif
set a = 8*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H001_0012, 'A006'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H001_0012, 'A006'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H001_0012, 'A006'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 10*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H001_0012, 'A008'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H001_0012, 'A008'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H001_0012, 'A008'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 80*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H001_0012, 'A009'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CdnBerserk takes nothing returns nothing
set gg_trg_CdnBerserk = CreateTrigger( )
call DisableTrigger( gg_trg_CdnBerserk )
call TriggerRegisterTimerEvent( gg_trg_CdnBerserk, 1.00, true )
call TriggerAddAction( gg_trg_CdnBerserk, function Trig_CdnBerserk_Actions )
endfunction
function Trig_CdnPirate_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H002_0022))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H002_0022))]
endif
set a = 40*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H002_0022, 'A00C'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H002_0022, 'A00C'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H002_0022, 'A00C'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 19*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H002_0022, 'A00D'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H002_0022, 'A00D'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H002_0022, 'A00D'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 85*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H002_0022, 'A00E'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CdnPirate takes nothing returns nothing
set gg_trg_CdnPirate = CreateTrigger( )
call DisableTrigger( gg_trg_CdnPirate )
call TriggerRegisterTimerEvent( gg_trg_CdnPirate, 1.00, true )
call TriggerAddAction( gg_trg_CdnPirate, function Trig_CdnPirate_Actions )
endfunction
function Trig_CdnDruid_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H006_0027))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H006_0027))]
endif
set a = 14*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H006_0027, 'A00F'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H006_0027, 'A00F'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H006_0027, 'A00F'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 8*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H006_0027, 'A00H'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H006_0027, 'A00H'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H006_0027, 'A00H'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 95*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H006_0027, 'A00K'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CdnDruid takes nothing returns nothing
set gg_trg_CdnDruid = CreateTrigger( )
call DisableTrigger( gg_trg_CdnDruid )
call TriggerRegisterTimerEvent( gg_trg_CdnDruid, 1.00, true )
call TriggerAddAction( gg_trg_CdnDruid, function Trig_CdnDruid_Actions )
endfunction
function Trig_CduNecro_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H007_0042))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H007_0042))]
endif
set a = 60*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H007_0042, 'A00M'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H007_0042, 'A00M'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H007_0042, 'A00M'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 25*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H007_0042, 'A00O'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H007_0042, 'A00O'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H007_0042, 'A00O'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 60*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H007_0042, 'A00R'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CduNecro takes nothing returns nothing
set gg_trg_CduNecro = CreateTrigger( )
call DisableTrigger( gg_trg_CduNecro )
call TriggerRegisterTimerEvent( gg_trg_CduNecro, 1.00, true )
call TriggerAddAction( gg_trg_CduNecro, function Trig_CduNecro_Actions )
endfunction
function Trig_CduPit_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H008_0043))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H008_0043))]
endif
set a = 13*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H008_0043, 'A00T'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H008_0043, 'A00T'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H008_0043, 'A00T'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 17*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H008_0043, 'A00V'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H008_0043, 'A00V'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H008_0043, 'A00V'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 90*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H008_0043, 'A00W'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CduPit takes nothing returns nothing
set gg_trg_CduPit = CreateTrigger( )
call DisableTrigger( gg_trg_CduPit )
call TriggerRegisterTimerEvent( gg_trg_CduPit, 1.00, true )
call TriggerAddAction( gg_trg_CduPit, function Trig_CduPit_Actions )
endfunction
function Trig_CduIce_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H009_0047))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H009_0047))]
endif
set a = 11*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H009_0047, 'A00X'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H009_0047, 'A00X'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H009_0047, 'A00X'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 30*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H009_0047, 'A010'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H009_0047, 'A010'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H009_0047, 'A010'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 100*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H009_0047, 'A015'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CduIce takes nothing returns nothing
set gg_trg_CduIce = CreateTrigger( )
call DisableTrigger( gg_trg_CduIce )
call TriggerRegisterTimerEvent( gg_trg_CduIce, 1.00, true )
call TriggerAddAction( gg_trg_CduIce, function Trig_CduIce_Actions )
endfunction
function Trig_CduStar_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00A_0048))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00A_0048))]
endif
set a = 4*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00A_0048, 'A016'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00A_0048, 'A016'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00A_0048, 'A016'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 20*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00A_0048, 'A019'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00A_0048, 'A019'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00A_0048, 'A019'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 100*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00A_0048, 'A01A'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CduStar takes nothing returns nothing
set gg_trg_CduStar = CreateTrigger( )
call DisableTrigger( gg_trg_CduStar )
call TriggerRegisterTimerEvent( gg_trg_CduStar, 1.00, true )
call TriggerAddAction( gg_trg_CduStar, function Trig_CduStar_Actions )
endfunction
function Trig_CduChief_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00B_0049))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00B_0049))]
endif
set a = 10*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00B_0049, 'A01C'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00B_0049, 'A01C'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00B_0049, 'A01C'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 40*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00B_0049, 'A01D'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00B_0049, 'A01D'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00B_0049, 'A01D'), ABILITY_RLF_COOLDOWN, 2, a )
endfunction
//===========================================================================
function InitTrig_CduChief takes nothing returns nothing
set gg_trg_CduChief = CreateTrigger( )
call DisableTrigger( gg_trg_CduChief )
call TriggerRegisterTimerEvent( gg_trg_CduChief, 1.00, true )
call TriggerAddAction( gg_trg_CduChief, function Trig_CduChief_Actions )
endfunction
function Trig_CduScorp_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00C_0050))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00C_0050))]
endif
set a = 25*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00C_0050, 'A01G'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00C_0050, 'A01G'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00C_0050, 'A01G'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 75*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00C_0050, 'A01J'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CduScorp takes nothing returns nothing
set gg_trg_CduScorp = CreateTrigger( )
call DisableTrigger( gg_trg_CduScorp )
call TriggerRegisterTimerEvent( gg_trg_CduScorp, 1.00, true )
call TriggerAddAction( gg_trg_CduScorp, function Trig_CduScorp_Actions )
endfunction
function Trig_CduRifle_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00D_0051))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00D_0051))]
endif
set a = 20*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00D_0051, 'A01K'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00D_0051, 'A01K'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00D_0051, 'A01K'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 24*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00D_0051, 'A01N'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00D_0051, 'A01N'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00D_0051, 'A01N'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 70*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00D_0051, 'A01M'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CduRifle takes nothing returns nothing
set gg_trg_CduRifle = CreateTrigger( )
call DisableTrigger( gg_trg_CduRifle )
call TriggerRegisterTimerEvent( gg_trg_CduRifle, 1.00, true )
call TriggerAddAction( gg_trg_CduRifle, function Trig_CduRifle_Actions )
endfunction
function Trig_CduMonk_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00E_0052))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00E_0052))]
endif
set a = 30*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00E_0052, 'A01Q'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00E_0052, 'A01Q'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00E_0052, 'A01Q'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 10*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00E_0052, 'A01P'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00E_0052, 'A01P'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00E_0052, 'A01P'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 90*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00E_0052, 'A01S'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CduMonk takes nothing returns nothing
set gg_trg_CduMonk = CreateTrigger( )
call DisableTrigger( gg_trg_CduMonk )
call TriggerRegisterTimerEvent( gg_trg_CduMonk, 1.00, true )
call TriggerAddAction( gg_trg_CduMonk, function Trig_CduMonk_Actions )
endfunction
function Trig_CduMedusa_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00F_0053))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00F_0053))]
endif
set a = 17*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00F_0053, 'A01R'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00F_0053, 'A01R'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00F_0053, 'A01R'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 75*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00F_0053, 'A01V'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CduMedusa takes nothing returns nothing
set gg_trg_CduMedusa = CreateTrigger( )
call DisableTrigger( gg_trg_CduMedusa )
call TriggerRegisterTimerEvent( gg_trg_CduMedusa, 1.00, true )
call TriggerAddAction( gg_trg_CduMedusa, function Trig_CduMedusa_Actions )
endfunction
function Trig_CduWarlock_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00G_0055))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00G_0055))]
endif
set a = 7*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00G_0055, 'A01X'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00G_0055, 'A01X'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00G_0055, 'A01X'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 7*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00G_0055, 'A01Z'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00G_0055, 'A01Z'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00G_0055, 'A01Z'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 60*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00G_0055, 'A022'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CduWarlock takes nothing returns nothing
set gg_trg_CduWarlock = CreateTrigger( )
call DisableTrigger( gg_trg_CduWarlock )
call TriggerRegisterTimerEvent( gg_trg_CduWarlock, 1.00, true )
call TriggerAddAction( gg_trg_CduWarlock, function Trig_CduWarlock_Actions )
endfunction
function Trig_CduDeahK_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00H_0054))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00H_0054))]
endif
set a = 15*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00H_0054, 'A025'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00H_0054, 'A025'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00H_0054, 'A025'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 12*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00H_0054, 'A024'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00H_0054, 'A024'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00H_0054, 'A024'), ABILITY_RLF_COOLDOWN, 2, a )
endfunction
//===========================================================================
function InitTrig_CduDeahK takes nothing returns nothing
set gg_trg_CduDeahK = CreateTrigger( )
call DisableTrigger( gg_trg_CduDeahK )
call TriggerRegisterTimerEvent( gg_trg_CduDeahK, 1.00, true )
call TriggerAddAction( gg_trg_CduDeahK, function Trig_CduDeahK_Actions )
endfunction
function Trig_CduOcean_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00I_0056))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00I_0056))]
endif
set a = 10*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00I_0056, 'A028'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00I_0056, 'A028'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00I_0056, 'A028'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 105*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00I_0056, 'A02A'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CduOcean takes nothing returns nothing
set gg_trg_CduOcean = CreateTrigger( )
call DisableTrigger( gg_trg_CduOcean )
call TriggerRegisterTimerEvent( gg_trg_CduOcean, 1.00, true )
call TriggerAddAction( gg_trg_CduOcean, function Trig_CduOcean_Actions )
endfunction
function Trig_CduSahdow_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00J_0057))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00J_0057))]
endif
set a = 5*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00J_0057, 'A02E'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00J_0057, 'A02E'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00J_0057, 'A02E'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 15*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00J_0057, 'A02G'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00J_0057, 'A02G'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00J_0057, 'A02G'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 18*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00J_0057, 'A02H'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00J_0057, 'A02H'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00J_0057, 'A02H'), ABILITY_RLF_COOLDOWN, 2, a )
endfunction
//===========================================================================
function InitTrig_CduSahdow takes nothing returns nothing
set gg_trg_CduSahdow = CreateTrigger( )
call DisableTrigger( gg_trg_CduSahdow )
call TriggerRegisterTimerEvent( gg_trg_CduSahdow, 1.00, true )
call TriggerAddAction( gg_trg_CduSahdow, function Trig_CduSahdow_Actions )
endfunction
function Trig_CduRobot_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00K_0058))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00K_0058))]
endif
set a = 15*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00K_0058, 'A02J'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00K_0058, 'A02J'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00K_0058, 'A02J'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 70*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00K_0058, 'A02N'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CduRobot takes nothing returns nothing
set gg_trg_CduRobot = CreateTrigger( )
call DisableTrigger( gg_trg_CduRobot )
call TriggerRegisterTimerEvent( gg_trg_CduRobot, 1.00, true )
call TriggerAddAction( gg_trg_CduRobot, function Trig_CduRobot_Actions )
endfunction
function Trig_CduDemon_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00L_0059))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00L_0059))]
endif
set a = 22*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00L_0059, 'A02Q'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00L_0059, 'A02Q'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00L_0059, 'A02Q'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 15*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00L_0059, 'A02S'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00L_0059, 'A02S'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00L_0059, 'A02S'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 45*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00L_0059, 'A02O'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CduDemon takes nothing returns nothing
set gg_trg_CduDemon = CreateTrigger( )
call DisableTrigger( gg_trg_CduDemon )
call TriggerRegisterTimerEvent( gg_trg_CduDemon, 1.00, true )
call TriggerAddAction( gg_trg_CduDemon, function Trig_CduDemon_Actions )
endfunction
function Trig_CduShaman_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00M_0060))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00M_0060))]
endif
set a = 7*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00M_0060, 'A02W'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00M_0060, 'A02W'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00M_0060, 'A02W'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 22*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00M_0060, 'A02X'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00M_0060, 'A02X'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00M_0060, 'A02X'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 25*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00M_0060, 'A02Z'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00M_0060, 'A02Z'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00M_0060, 'A02Z'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 100*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00M_0060, 'A031'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CduShaman takes nothing returns nothing
set gg_trg_CduShaman = CreateTrigger( )
call DisableTrigger( gg_trg_CduShaman )
call TriggerRegisterTimerEvent( gg_trg_CduShaman, 1.00, true )
call TriggerAddAction( gg_trg_CduShaman, function Trig_CduShaman_Actions )
endfunction
function Trig_CduFisher_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00N_0061))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00N_0061))]
endif
set a = 14*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00N_0061, 'A032'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00N_0061, 'A032'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00N_0061, 'A032'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 45*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00N_0061, 'A03N'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00N_0061, 'A03N'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00N_0061, 'A03N'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 100*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00N_0061, 'A037'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CduFisher takes nothing returns nothing
set gg_trg_CduFisher = CreateTrigger( )
call DisableTrigger( gg_trg_CduFisher )
call TriggerRegisterTimerEvent( gg_trg_CduFisher, 1.00, true )
call TriggerAddAction( gg_trg_CduFisher, function Trig_CduFisher_Actions )
endfunction
function Trig_CduFiregod_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00O_0062))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00O_0062))]
endif
set a = 13*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00O_0062, 'A039'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00O_0062, 'A039'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00O_0062, 'A039'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 30*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00O_0062, 'A03E'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00O_0062, 'A03E'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00O_0062, 'A03E'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 75*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00O_0062, 'A03B'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CduFiregod takes nothing returns nothing
set gg_trg_CduFiregod = CreateTrigger( )
call DisableTrigger( gg_trg_CduFiregod )
call TriggerRegisterTimerEvent( gg_trg_CduFiregod, 1.00, true )
call TriggerAddAction( gg_trg_CduFiregod, function Trig_CduFiregod_Actions )
endfunction
function Trig_CduTime_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00P_0063))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00P_0063))]
endif
set a = 4*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00P_0063, 'A03D'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00P_0063, 'A03D'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00P_0063, 'A03D'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 20*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00P_0063, 'A03G'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00P_0063, 'A03G'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00P_0063, 'A03G'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 100*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00P_0063, 'A03H'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CduTime takes nothing returns nothing
set gg_trg_CduTime = CreateTrigger( )
call DisableTrigger( gg_trg_CduTime )
call TriggerRegisterTimerEvent( gg_trg_CduTime, 1.00, true )
call TriggerAddAction( gg_trg_CduTime, function Trig_CduTime_Actions )
endfunction
function Trig_CduSiege_Actions takes nothing returns nothing
local real a
local real b
if (udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00Q_0064))] > 0.5 ) then
set b = 0.5
else
set b = udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00Q_0064))]
endif
set a = 10*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00Q_0064, 'A03L'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00Q_0064, 'A03L'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00Q_0064, 'A03L'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 14*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00Q_0064, 'A03I'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00Q_0064, 'A03I'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00Q_0064, 'A03I'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 20*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00Q_0064, 'A03J'), ABILITY_RLF_COOLDOWN, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00Q_0064, 'A03J'), ABILITY_RLF_COOLDOWN, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00Q_0064, 'A03J'), ABILITY_RLF_COOLDOWN, 2, a )
set a = 90*(1 - b)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00Q_0064, 'A03M'), ABILITY_RLF_COOLDOWN, 0, a )
endfunction
//===========================================================================
function InitTrig_CduSiege takes nothing returns nothing
set gg_trg_CduSiege = CreateTrigger( )
call DisableTrigger( gg_trg_CduSiege )
call TriggerRegisterTimerEvent( gg_trg_CduSiege, 1.00, true )
call TriggerAddAction( gg_trg_CduSiege, function Trig_CduSiege_Actions )
endfunction
function Trig_SieCrossbow_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03I' ) ) then
return false
endif
return true
endfunction
function Trig_SieCrossbow_Actions takes nothing returns nothing
local location l = GetSpellTargetLoc()
local location l1 = Location(GetLocationX(l), GetLocationY(l) + 275)
local location l2 = Location(GetLocationX(l), GetLocationY(l) - 275)
local location l3 = Location(GetLocationX(l) + 275, GetLocationY(l))
local location l4 = Location(GetLocationX(l) - 275, GetLocationY(l))
local unit u
local real a = 0.01*(GetHeroInt(gg_unit_H00Q_0064, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00Q_0064))] + 100)
if (GetUnitAbilityLevel(gg_unit_H00Q_0064, 'A03I') == 1) then
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00Q_0064), 'o007', l1, 90)
call BlzSetUnitBaseDamage( u, R2I(11*a), 0 )
call UnitApplyTimedLife( u, 'BTLF', 8 )
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00Q_0064), 'o007', l2, 90)
call BlzSetUnitBaseDamage( u, R2I(11*a), 0 )
call UnitApplyTimedLife( u, 'BTLF', 8 )
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00Q_0064), 'o007', l3, 90)
call BlzSetUnitBaseDamage( u, R2I(11*a), 0 )
call UnitApplyTimedLife( u, 'BTLF', 8 )
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00Q_0064), 'o007', l4, 90)
call BlzSetUnitBaseDamage( u, R2I(11*a), 0 )
call UnitApplyTimedLife( u, 'BTLF', 8 )
endif
if (GetUnitAbilityLevel(gg_unit_H00Q_0064, 'A03I') == 2) then
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00Q_0064), 'o006', l1, 90)
call BlzSetUnitBaseDamage( u, R2I(23*a), 0 )
call UnitApplyTimedLife( u, 'BTLF', 8 )
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00Q_0064), 'o006', l2, 90)
call BlzSetUnitBaseDamage( u, R2I(23*a), 0 )
call UnitApplyTimedLife( u, 'BTLF', 8 )
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00Q_0064), 'o006', l3, 90)
call BlzSetUnitBaseDamage( u, R2I(23*a), 0 )
call UnitApplyTimedLife( u, 'BTLF', 8 )
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00Q_0064), 'o006', l4, 90)
call BlzSetUnitBaseDamage( u, R2I(23*a), 0 )
call UnitApplyTimedLife( u, 'BTLF', 8 )
endif
if (GetUnitAbilityLevel(gg_unit_H00Q_0064, 'A03I') == 3) then
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00Q_0064), 'o005', l1, 90)
call BlzSetUnitBaseDamage( u, R2I(39*a), 0 )
call UnitApplyTimedLife( u, 'BTLF', 8 )
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00Q_0064), 'o005', l2, 90)
call BlzSetUnitBaseDamage( u, R2I(39*a), 0 )
call UnitApplyTimedLife( u, 'BTLF', 8 )
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00Q_0064), 'o005', l3, 90)
call BlzSetUnitBaseDamage( u, R2I(39*a), 0 )
call UnitApplyTimedLife( u, 'BTLF', 8 )
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00Q_0064), 'o005', l4, 90)
call BlzSetUnitBaseDamage( u, R2I(39*a), 0 )
call UnitApplyTimedLife( u, 'BTLF', 8 )
endif
set u = null
call RemoveLocation(l)
set l = null
call RemoveLocation(l1)
set l1 = null
call RemoveLocation(l2)
set l2 = null
call RemoveLocation(l3)
set l3 = null
call RemoveLocation(l4)
set l4 = null
endfunction
//===========================================================================
function InitTrig_SieCrossbow takes nothing returns nothing
set gg_trg_SieCrossbow = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_SieCrossbow, gg_unit_H00Q_0064, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_SieCrossbow, Condition( function Trig_SieCrossbow_Conditions ) )
call TriggerAddAction( gg_trg_SieCrossbow, function Trig_SieCrossbow_Actions )
endfunction
function Trig_SieTrebuchet_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03J' ) ) then
return false
endif
return true
endfunction
function Trig_SieTrebuchet_Actions takes nothing returns nothing
local unit u = FirstOfGroup(udg_SiegeGroup)
local unit u2
local location l = GetUnitLoc(gg_unit_H00Q_0064)
local real a = 0.01*(GetHeroInt(gg_unit_H00Q_0064, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00Q_0064))] + 100)
local real b = 48*GetUnitAbilityLevel(gg_unit_H00Q_0064, 'A03J')
if (u != null) then
call KillUnit(u)
endif
set u2 = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_PASSIVE), 'o008', l, 90)
call SetUnitAnimation(u2, "birth")
call BlzPauseUnitEx (gg_unit_H00Q_0064, true)
call SetUnitAnimation(gg_unit_H00Q_0064, "stand work")
call PolledWait(1.7)
call BlzPauseUnitEx (gg_unit_H00Q_0064, false)
call SetUnitAnimation(gg_unit_H00Q_0064, "stand")
call SetUnitAnimation(u2, "stand")
call SetUnitOwner( u2, GetOwningPlayer(gg_unit_H00Q_0064), true )
call BlzSetUnitBaseDamage( u2, R2I(b*a), 0 )
if (udg_SiegeTalent1 == true) then
call UnitAddAbility(u2, 'A09T')
endif
call GroupAddUnit(udg_SiegeGroup, u2)
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_SieTrebuchet takes nothing returns nothing
set gg_trg_SieTrebuchet = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_SieTrebuchet, gg_unit_H00Q_0064, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_SieTrebuchet, Condition( function Trig_SieTrebuchet_Conditions ) )
call TriggerAddAction( gg_trg_SieTrebuchet, function Trig_SieTrebuchet_Actions )
endfunction
function Trig_Siemine_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'nglm' ) ) then
return false
endif
return true
endfunction
function Trig_Siemine_Actions takes nothing returns nothing
local unit u = GetSummonedUnit()
local real a = (GetHeroInt(gg_unit_H00Q_0064, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00Q_0064))] + 100)
local real b = a*GetUnitAbilityLevel(gg_unit_H00Q_0064, 'A03L')
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A03K'), ABILITY_RLF_FULL_DAMAGE_AMOUNT_DDA2, 0, b )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A03K'), ABILITY_RLF_PARTIAL_DAMAGE_AMOUNT, 0, b )
set u = null
endfunction
//===========================================================================
function InitTrig_Siemine takes nothing returns nothing
set gg_trg_Siemine = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Siemine, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Siemine, Condition( function Trig_Siemine_Conditions ) )
call TriggerAddAction( gg_trg_Siemine, function Trig_Siemine_Actions )
endfunction
function Trig_TimeDamage_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03D' ) ) then
return false
endif
return true
endfunction
function TimeCon1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00P_0063)) == true)
return b1 and b2
endfunction
function TimeAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
local real x = 0.01*(GetHeroInt(gg_unit_H00P_0063, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00P_0063))] + 100)
local real a = GetUnitAbilityLevel(gg_unit_H00P_0063, 'A03D')
local real b = x*(1 + a)*GetHeroInt(gg_unit_H00P_0063, true)
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl" , u, "origin")
call UnitDamageTarget(gg_unit_H00P_0063, u, b, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(e)
set u = null
set e = null
endfunction
function Trig_TimeDamage_Actions takes nothing returns nothing
local unit u = GetSpellTargetUnit()
local group g = CreateGroup()
local location l = GetUnitLoc(u)
call GroupEnumUnitsInRangeOfLoc(g, l, 300, Condition(function TimeCon1))
call ForGroup(g, function TimeAct1)
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
set u = null
endfunction
//===========================================================================
function InitTrig_TimeDamage takes nothing returns nothing
set gg_trg_TimeDamage = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_TimeDamage, gg_unit_H00P_0063, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_TimeDamage, Condition( function Trig_TimeDamage_Conditions ) )
call TriggerAddAction( gg_trg_TimeDamage, function Trig_TimeDamage_Actions )
endfunction
function Trig_TimeStop_Conditions takes nothing returns boolean
return( GetUnitAbilityLevel(gg_unit_H00P_0063, 'A03F') >= 1 )
endfunction
function TimeCon3 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00P_0063)) == true)
return b1 and b2
endfunction
function TimeAct3 takes nothing returns nothing
local unit u = GetEnumUnit()
call BlzPauseUnitEx (u, true)
call SetUnitTimeScale( u, 0 )
set u = null
endfunction
function TimeAct4 takes nothing returns nothing
local unit u = GetEnumUnit()
call BlzPauseUnitEx (u, false)
call SetUnitTimeScale( u, 1 )
set u = null
endfunction
function Trig_TimeStop_Actions takes nothing returns nothing
local location l = GetUnitLoc(gg_unit_H00P_0063)
local unit u
local effect e
local integer i = GetRandomInt(1, 100)
if ( i <= (8 + 6*GetUnitAbilityLevel(gg_unit_H00P_0063, 'A03F')) ) then
set udg_Stopper = true
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_PASSIVE), 'u00N', l, 90)
set e = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AbsorbMana\\AbsorbManaBirthMissile.mdl" , u, "origin")
call DestroyEffect(e)
call SetUnitTimeScale( u, 3 )
call DisableTrigger(gg_trg_TimeStop)
call GroupClear(udg_TimeGroup)
call GroupEnumUnitsInRangeOfLoc(udg_TimeGroup, l, 800, Condition(function TimeCon3))
call ForGroup(udg_TimeGroup, function TimeAct3)
call PolledWait(3.2)
call ForGroup(udg_TimeGroup, function TimeAct4)
call EnableTrigger(gg_trg_TimeStop)
call RemoveLocation(l)
call RemoveUnit(u)
set udg_Stopper = false
endif
set l = null
set e = null
set u = null
endfunction
//===========================================================================
function InitTrig_TimeStop takes nothing returns nothing
set gg_trg_TimeStop = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_TimeStop, gg_unit_H00P_0063, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_TimeStop, Condition( function Trig_TimeStop_Conditions ) )
call TriggerAddAction( gg_trg_TimeStop, function Trig_TimeStop_Actions )
endfunction
function Trig_TimeOld_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03G' ) ) then
return false
endif
return true
endfunction
function Trig_TimeOld_Actions takes nothing returns nothing
local unit u = GetSpellTargetUnit()
local real a = GetUnitState(u, UNIT_STATE_MAX_LIFE)
local real b = (80 - 10*GetUnitAbilityLevel(gg_unit_H00P_0063, 'A03G'))*0.01
local real p
set p = (GetUnitState(u, UNIT_STATE_LIFE)/GetUnitState(u, UNIT_STATE_MAX_LIFE))
call BlzSetUnitMaxHP(u, R2I(a*b))
call SetUnitState(u, UNIT_STATE_LIFE, a*b*p)
call PolledWait(10)
if ( udg_TimeTalent1 == true) then
call PolledWait(4)
endif
if (GetUnitState(u, UNIT_STATE_LIFE) >= 0.405) then
set p = (GetUnitState(u, UNIT_STATE_LIFE)/GetUnitState(u, UNIT_STATE_MAX_LIFE))
call BlzSetUnitMaxHP(u, R2I(a))
call SetUnitState(u, UNIT_STATE_LIFE, a*p)
endif
set u = null
endfunction
//===========================================================================
function InitTrig_TimeOld takes nothing returns nothing
set gg_trg_TimeOld = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_TimeOld, gg_unit_H00P_0063, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_TimeOld, Condition( function Trig_TimeOld_Conditions ) )
call TriggerAddAction( gg_trg_TimeOld, function Trig_TimeOld_Actions )
endfunction
function Trig_TimeUlt_Actions takes nothing returns nothing
local location l = GetUnitLoc(gg_unit_H00P_0063)
local real x = GetLocationX(l) + GetRandomReal(-500, 500)
local real y = GetLocationY(l) + GetRandomReal(-500, 500)
local location l2 = Location(x, y)
local unit u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00P_0063), 'u00O', l2, GetRandomReal(0, 360))
local real x2 = GetLocationX(l) + GetRandomReal(-500, 500)
local real y2 = GetLocationY(l) + GetRandomReal(-500, 500)
local location l3 = Location(x2, y2)
local real b = GetHeroInt(gg_unit_H00P_0063, true) + BlzGetUnitBaseDamage(gg_unit_H00P_0063, 0)
call BlzSetUnitBaseDamage( u, R2I(0.3*b), 0 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A018'), ABILITY_RLF_CHANCE_TO_CRITICAL_STRIKE, 0, (udg_CritHit[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00P_0063))] + GetHeroAgi(gg_unit_H00P_0063, true)) )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A018'), ABILITY_RLF_DAMAGE_MULTIPLIER_OCR2, 0, udg_CritDamage[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00P_0063))] )
call IssuePointOrderLoc( u, "attack", l3 )
call GroupAddUnit(udg_TimeGroup2, u)
set u = null
call RemoveLocation(l)
set l = null
call RemoveLocation(l2)
set l2 = null
call RemoveLocation(l3)
set l3 = null
endfunction
//===========================================================================
function InitTrig_TimeUlt takes nothing returns nothing
set gg_trg_TimeUlt = CreateTrigger( )
call DisableTrigger( gg_trg_TimeUlt )
call TriggerRegisterTimerEvent( gg_trg_TimeUlt, 0.15, true )
call TriggerAddAction( gg_trg_TimeUlt, function Trig_TimeUlt_Actions )
endfunction
function TimeColor takes nothing returns nothing
local unit u = GetEnumUnit()
local real a = 255*(GetUnitState(u, UNIT_STATE_LIFE)/GetUnitState(u, UNIT_STATE_MAX_LIFE))
call SetUnitVertexColor( u, 255, 255, 255, R2I(a) )
set u = null
endfunction
function Trig_TimeAlpha_Actions takes nothing returns nothing
local unit u = FirstOfGroup(udg_TimeGroup2)
if ( u != null) then
call ForGroup(udg_TimeGroup2, function TimeColor)
endif
set u = null
endfunction
//===========================================================================
function InitTrig_TimeAlpha takes nothing returns nothing
set gg_trg_TimeAlpha = CreateTrigger( )
call DisableTrigger( gg_trg_TimeAlpha )
call TriggerRegisterTimerEvent( gg_trg_TimeAlpha, 0.04, true )
call TriggerAddAction( gg_trg_TimeAlpha, function Trig_TimeAlpha_Actions )
endfunction
function Trig_FireBreath_Conditions takes nothing returns boolean
return ( GetUnitAbilityLevel(gg_unit_H00O_0062, 'A039') >= 1 )
endfunction
function Trig_FireBreath_Actions takes nothing returns nothing
local real x = 0.01*(GetHeroInt(gg_unit_H00O_0062, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00O_0062))] + 100)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00O_0062, 'A039'), ABILITY_RLF_DAMAGE_UCS1, 0, 125*x )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00O_0062, 'A039'), ABILITY_RLF_DAMAGE_UCS1, 1, 200*x )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00O_0062, 'A039'), ABILITY_RLF_DAMAGE_UCS1, 2, 275*x )
endfunction
//===========================================================================
function InitTrig_FireBreath takes nothing returns nothing
set gg_trg_FireBreath = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_FireBreath, 1.00 )
call TriggerAddCondition( gg_trg_FireBreath, Condition( function Trig_FireBreath_Conditions ) )
call TriggerAddAction( gg_trg_FireBreath, function Trig_FireBreath_Actions )
endfunction
function Trig_FireStrom_Conditions takes nothing returns boolean
local boolean b1 = ( GetUnitAbilityLevel(gg_unit_H00O_0062, 'A03A') >= 1 )
local boolean b2 = ( GetAttacker() == gg_unit_H00O_0062 )
return b1 and b2
endfunction
function FlameCon1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00O_0062)) == true)
local boolean b3 = ( GetTriggerUnit() != GetFilterUnit() )
return b1 and b2 and b3
endfunction
function FlameAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
local location l = GetUnitLoc(u)
local location l2 = GetUnitLoc(gg_unit_H00O_0062)
local real a = 57.2958 * Atan2(GetLocationY(l2) - GetLocationY(l), GetLocationX(l2) - GetLocationX(l)) + 180
local unit u2 = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00O_0062), 'u00M', l2, a)
local real b = BlzGetUnitBaseDamage(gg_unit_H00O_0062, 0) + GetHeroAgi(gg_unit_H00O_0062, true)
call BlzSetUnitBaseDamage( u2, R2I(b), 0 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u2, 'A018'), ABILITY_RLF_CHANCE_TO_CRITICAL_STRIKE, 0, (udg_CritHit[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00O_0062))] + GetHeroAgi(gg_unit_H00O_0062, true)) )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u2, 'A018'), ABILITY_RLF_DAMAGE_MULTIPLIER_OCR2, 0, udg_CritDamage[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00O_0062))] )
call IssueTargetOrder(u2, "attack", u)
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
call RemoveLocation(l2)
set l2 = null
endfunction
function Trig_FireStrom_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local group g = CreateGroup()
local location l = GetUnitLoc(u)
local integer i = GetRandomInt(1, 100)
if (i <= (9 + 6*GetUnitAbilityLevel(gg_unit_H00O_0062, 'A03A')) ) then
call GroupEnumUnitsInRangeOfLoc(g, l, 300, Condition(function FlameCon1))
call ForGroup(g, function FlameAct1)
endif
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
set u = null
endfunction
//===========================================================================
function InitTrig_FireStrom takes nothing returns nothing
set gg_trg_FireStrom = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_FireStrom, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_FireStrom, Condition( function Trig_FireStrom_Conditions ) )
call TriggerAddAction( gg_trg_FireStrom, function Trig_FireStrom_Actions )
endfunction
function FlameCon2 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00O_0062)) == true)
return b1 and b2
endfunction
function FlameAct2 takes nothing returns nothing
local unit u = GetEnumUnit()
local real x = 0.01*(GetHeroInt(gg_unit_H00O_0062, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00O_0062))] + 100)
call UnitDamageTarget(gg_unit_H00O_0062, u, 50*x, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function Trig_FirePeriod_Actions takes nothing returns nothing
local effect e
local location l = GetUnitLoc(gg_unit_H00O_0062)
local integer i = GetRandomInt(1,3)
local group g = CreateGroup()
local real x = GetLocationX(l) + GetRandomReal(-400, 400)
local real y = GetLocationY(l) + GetRandomReal(-400, 400)
local location l2 = Location(x, y)
call GroupEnumUnitsInRangeOfLoc(g, l2, 150, Condition(function FlameCon2))
call ForGroup(g, function FlameAct2)
if (i == 1) then
set e = AddSpecialEffectLoc("Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl", l2)
call DestroyEffect(e)
endif
if (i == 2) then
set e = AddSpecialEffectLoc("Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl", l2)
call DestroyEffect(e)
endif
if (i == 3) then
set e = AddSpecialEffectLoc("Abilities\\Spells\\Other\\Incinerate\\FireLordDeathExplode.mdl", l2)
call DestroyEffect(e)
endif
if ( GetUnitAbilityLevel(gg_unit_H00O_0062, 'B00R') <= 0 ) then
call DisableTrigger( gg_trg_FirePeriod )
call SetUnitVertexColor( gg_unit_H00O_0062, 255, 255, 255, 255 )
endif
call RemoveLocation(l)
set l = null
call RemoveLocation(l2)
set l2 = null
call DestroyGroup(g)
set g = null
set e = null
endfunction
//===========================================================================
function InitTrig_FirePeriod takes nothing returns nothing
set gg_trg_FirePeriod = CreateTrigger( )
call DisableTrigger( gg_trg_FirePeriod )
call TriggerRegisterTimerEvent( gg_trg_FirePeriod, 0.08, true )
call TriggerAddAction( gg_trg_FirePeriod, function Trig_FirePeriod_Actions )
endfunction
function Trig_FireShield_Conditions takes nothing returns boolean
return ( GetUnitAbilityLevel(gg_unit_H00O_0062, 'B00S') >= 1 )
endfunction
function FlameCon4 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00O_0062)) == true)
return b1 and b2
endfunction
function FlameAct4 takes nothing returns nothing
local unit u = GetEnumUnit()
local real x = 0.01*(GetHeroInt(gg_unit_H00O_0062, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00O_0062))] + 100)
local real b = 8 + 8*GetUnitAbilityLevel(gg_unit_H00O_0062, 'A03E')
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Items\\AIfb\\AIfbSpecialArt.mdl" , u, "origin")
call UnitDamageTarget(gg_unit_H00O_0062, u, b*x, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(e)
set u = null
set e = null
endfunction
function Trig_FireShield_Actions takes nothing returns nothing
local location l = GetUnitLoc(gg_unit_H00O_0062)
local group g = CreateGroup()
call GroupEnumUnitsInRangeOfLoc(g, l, 200, Condition(function FlameCon4))
call ForGroup(g, function FlameAct4)
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_FireShield takes nothing returns nothing
set gg_trg_FireShield = CreateTrigger( )
call TriggerRegisterTimerEvent( gg_trg_FireShield, 1.00, true )
call TriggerAddCondition( gg_trg_FireShield, Condition( function Trig_FireShield_Conditions ) )
call TriggerAddAction( gg_trg_FireShield, function Trig_FireShield_Actions )
endfunction
function Trig_FireBless_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03E' ) ) then
return false
endif
return true
endfunction
function Trig_FireBless_Actions takes nothing returns nothing
local location l = GetUnitLoc(gg_unit_H00O_0062)
local unit u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00O_0062), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u, 'A03C')
call SetUnitAbilityLevel(u, 'A03C', GetUnitAbilityLevel(gg_unit_H00O_0062,'A03E') )
if (udg_FireTalent1 == true) then
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A03C'), ABILITY_RLF_DAMAGE_INCREASE_PERCENT_INF1, 0, 0.40 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A03C'), ABILITY_RLF_DAMAGE_INCREASE_PERCENT_INF1, 1, 0.40 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A03C'), ABILITY_RLF_DAMAGE_INCREASE_PERCENT_INF1, 2, 0.40 )
endif
call IssueTargetOrder(u, "innerfire", gg_unit_H00O_0062)
call RemoveLocation(l)
set l = null
set u = null
endfunction
//===========================================================================
function InitTrig_FireBless takes nothing returns nothing
set gg_trg_FireBless = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_FireBless, gg_unit_H00O_0062, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_FireBless, Condition( function Trig_FireBless_Conditions ) )
call TriggerAddAction( gg_trg_FireBless, function Trig_FireBless_Actions )
endfunction
function Trig_FisNet_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A032' ) ) then
return false
endif
return true
endfunction
function FishCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00N_0061)) == true)
return b1 and b2
endfunction
function FishAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
local location l = GetUnitLoc(u)
local unit u2 = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00N_0061), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u2, 'A033')
call SetUnitAbilityLevel(u2, 'A033', GetUnitAbilityLevel(gg_unit_H00N_0061,'A032') )
call IssueTargetOrder(u2, "ensnare", u)
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
endfunction
function Trig_FisNet_Actions takes nothing returns nothing
local group g = CreateGroup()
local location l = GetSpellTargetLoc()
call GroupEnumUnitsInRangeOfLoc(g, l, 325, Condition(function FishCheck1))
call ForGroup(g, function FishAct1)
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_FisNet takes nothing returns nothing
set gg_trg_FisNet = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_FisNet, gg_unit_H00N_0061, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_FisNet, Condition( function Trig_FisNet_Conditions ) )
call TriggerAddAction( gg_trg_FisNet, function Trig_FisNet_Actions )
endfunction
function Trig_FisSpear_Conditions takes nothing returns boolean
local boolean b1 = ( GetAttacker() == gg_unit_H00N_0061 )
local boolean b2 =( GetUnitAbilityLevel(gg_unit_H00N_0061, 'A034') >= 1 )
return b1 and b2
endfunction
function FishCon2 takes nothing returns boolean
local boolean b1 = ( GetEventDamageSource() == gg_unit_H00N_0061 )
return b1
endfunction
function FishAct2 takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetUnitLoc(u)
local unit u2 = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00N_0061), 'u000', l, bj_UNIT_FACING)
local real a = 1.75*GetEventDamage()
call BlzSetEventDamage( a )
call UnitAddAbility(u2, 'A036' )
if (udg_FishTalent1 == true) then
call BlzSetAbilityIntegerLevelField( BlzGetUnitAbility(u2, 'A036'), ABILITY_ILF_ARMOR_PENALTY_NAB3, 0, 7 )
endif
call IssueTargetOrder(u2, "acidbomb", u)
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
endfunction
function Trig_FisSpear_Actions takes nothing returns nothing
local unit u1 = GetAttacker()
local unit u2 = GetTriggerUnit()
local integer i = GetRandomInt(1,100)
call DestroyTrigger(udg_FishTrigger)
set udg_FishTrigger = CreateTrigger()
if (i <= (6 + 8*GetUnitAbilityLevel(u1, 'A034'))) then
call TriggerRegisterUnitEvent( udg_FishTrigger, u2, EVENT_UNIT_DAMAGED )
call TriggerAddCondition( udg_FishTrigger, Condition( function FishCon2 ) )
call TriggerAddAction( udg_FishTrigger, function FishAct2 )
endif
set u1 = null
set u2 = null
endfunction
//===========================================================================
function InitTrig_FisSpear takes nothing returns nothing
set gg_trg_FisSpear = CreateTrigger( )
set udg_FishTrigger = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_FisSpear, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_FisSpear, Condition( function Trig_FisSpear_Conditions ) )
call TriggerAddAction( gg_trg_FisSpear, function Trig_FisSpear_Actions )
endfunction
function Trig_FisTrap_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'o004' ) ) then
return false
endif
return true
endfunction
function FishCheck3 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00N_0061)) == true)
return b1 and b2
endfunction
function FishAct3 takes nothing returns nothing
local unit u = GetEnumUnit()
local real x = 5*(GetHeroInt(gg_unit_H00N_0061, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00N_0061))] + 100)
call UnitDamageTarget(gg_unit_H00N_0061, u, x, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function Trig_FisTrap_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetUnitLoc(u)
local effect e = AddSpecialEffectLoc("Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl", l)
local unit u2 = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00N_0061), 'u00L', l, bj_UNIT_FACING)
local group g = CreateGroup()
call SetUnitAnimation(u2, "Spell Third")
call GroupEnumUnitsInRangeOfLoc(g, l, 380, Condition(function FishCheck3))
call ForGroup(g, function FishAct3)
call PolledWait(1.3)
call RemoveUnit(u2)
call DestroyEffect(e)
set e = null
set u = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_FisTrap takes nothing returns nothing
set gg_trg_FisTrap = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_FisTrap, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_FisTrap, Condition( function Trig_FisTrap_Conditions ) )
call TriggerAddAction( gg_trg_FisTrap, function Trig_FisTrap_Actions )
endfunction
function Trig_FisSummon_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'o004' ) ) then
return false
endif
return true
endfunction
function FishCheck4 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00N_0061)) == true)
return b1 and b2
endfunction
function FishAct4 takes nothing returns nothing
local unit u = GetEnumUnit()
call IssueTargetOrder(u, "attack", udg_Fish)
set u = null
endfunction
function Trig_FisSummon_Actions takes nothing returns nothing
local location l
local group g = CreateGroup()
set udg_Fish = GetSummonedUnit()
set l = GetUnitLoc(udg_Fish)
call IssueImmediateOrder(udg_Fish, "taunt")
call GroupEnumUnitsInRangeOfLoc(g, l, 500, Condition(function FishCheck4))
call ForGroup(g, function FishAct4)
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_FisSummon takes nothing returns nothing
set gg_trg_FisSummon = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_FisSummon, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_FisSummon, Condition( function Trig_FisSummon_Conditions ) )
call TriggerAddAction( gg_trg_FisSummon, function Trig_FisSummon_Actions )
endfunction
function FishCatch takes location l returns nothing
local integer i = GetRandomInt(1, 100)
if (GetUnitAbilityLevel(gg_unit_H00N_0061,'A03N') == 1) then
if (i <= 65) then
call CreateItemLoc( 'I04R', l )
endif
if ((i >= 66) and (i <= 100)) then
call CreateItemLoc( 'I04S', l )
endif
endif
if (GetUnitAbilityLevel(gg_unit_H00N_0061,'A03N') == 2) then
if (i <= 60) then
call CreateItemLoc( 'I04R', l )
endif
if ((i >= 61) and (i <= 90)) then
call CreateItemLoc( 'I04S', l )
endif
if (i >= 91) then
call CreateItemLoc( 'I04T', l )
endif
endif
if (GetUnitAbilityLevel(gg_unit_H00N_0061,'A03N') == 3) then
if (i <= 55) then
call CreateItemLoc( 'I04R', l )
endif
if ((i >= 56) and (i <= 80)) then
call CreateItemLoc( 'I04S', l )
endif
if ((i >= 81) and (i <= 90)) then
call CreateItemLoc( 'I04T', l )
endif
if ((i >= 91) and (i <= 100)) then
call CreateUnitAtLoc(Player(PLAYER_NEUTRAL_PASSIVE), 'n01L', l, bj_UNIT_FACING)
endif
endif
endfunction
function Trig_Fishing_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03N' ) ) then
return false
endif
return true
endfunction
function Trig_Fishing_Actions takes nothing returns nothing
local real a = GetUnitFacing(gg_unit_H00N_0061)
local location l = GetUnitLoc(gg_unit_H00N_0061)
local real x = GetLocationX(l) + 50 * Cos(a * 0.01745)
local real y = GetLocationY(l) + 50 * Sin(a * 0.01745)
local location l2 = Location(x, y)
local real x2 = GetLocationX(l) + 300 * Cos(a * 0.01745)
local real y2 = GetLocationY(l) + 300 * Sin(a * 0.01745)
local location l3 = Location(x2, y2)
local unit u
if (IsTerrainPathable(GetLocationX(l3), GetLocationY(l3), PATHING_TYPE_FLOATABILITY) == false) then
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00N_0061), 'u00P', l2, a)
call PolledWait(1)
call BlzPauseUnitEx (gg_unit_H00N_0061, true)
call PolledWait(3)
call BlzPauseUnitEx (gg_unit_H00N_0061, false)
call RemoveUnit(u)
call FishCatch(l)
endif
call RemoveLocation(l)
set l = null
call RemoveLocation(l2)
set l2 = null
call RemoveLocation(l3)
set l3 = null
set u = null
endfunction
//===========================================================================
function InitTrig_Fishing takes nothing returns nothing
set gg_trg_Fishing = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Fishing, gg_unit_H00N_0061, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Fishing, Condition( function Trig_Fishing_Conditions ) )
call TriggerAddAction( gg_trg_Fishing, function Trig_Fishing_Actions )
endfunction
function Trig_ShaHex_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02X' ) ) then
return false
endif
return true
endfunction
function ShamCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00M_0060)) == true)
return b1 and b2
endfunction
function ShamAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
local location l = GetUnitLoc(u)
local unit u2 = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00M_0060), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u2, 'A02Y')
call SetUnitAbilityLevel(u2, 'A02Y', GetUnitAbilityLevel(gg_unit_H00M_0060,'A02X') )
call IssueTargetOrder(u2, "hex", u)
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
endfunction
function Trig_ShaHex_Actions takes nothing returns nothing
local group g = CreateGroup()
local location l = GetSpellTargetLoc()
call GroupEnumUnitsInRangeOfLoc(g, l, 300, Condition(function ShamCheck1))
call ForGroup(g, function ShamAct1)
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_ShaHex takes nothing returns nothing
set gg_trg_ShaHex = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_ShaHex, gg_unit_H00M_0060, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ShaHex, Condition( function Trig_ShaHex_Conditions ) )
call TriggerAddAction( gg_trg_ShaHex, function Trig_ShaHex_Actions )
endfunction
function Trig_ShaTotem_Conditions takes nothing returns boolean
local boolean b1 = ( GetUnitTypeId(GetSummonedUnit()) == 'o000' )
local boolean b2 = ( GetUnitTypeId(GetSummonedUnit()) == 'o001' )
local boolean b3 = ( GetUnitTypeId(GetSummonedUnit()) == 'o002' )
return (b1 or b2 or b3)
endfunction
function Trig_ShaTotem_Actions takes nothing returns nothing
local unit u = GetSummonedUnit()
local real x = 0.16*(GetHeroInt(gg_unit_H00M_0060, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00M_0060))] + 100)
local real a = x*GetUnitAbilityLevel(gg_unit_H00M_0060, 'A02W')
if (udg_ShamTalent1 == true) then
set a = a*1.5
endif
call BlzSetUnitBaseDamage( u, R2I(a), 0 )
endfunction
//===========================================================================
function InitTrig_ShaTotem takes nothing returns nothing
set gg_trg_ShaTotem = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ShaTotem, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_ShaTotem, Condition( function Trig_ShaTotem_Conditions ) )
call TriggerAddAction( gg_trg_ShaTotem, function Trig_ShaTotem_Actions )
endfunction
function Trig_ShaRitual_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02Z' ) ) then
return false
endif
return true
endfunction
function Trig_ShaRitual_Actions takes nothing returns nothing
local unit u = GetSpellTargetUnit()
local effect e
local real x = 0.01*(GetHeroInt(gg_unit_H00M_0060, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00M_0060))] + 100)
local real a = GetUnitState(u, UNIT_STATE_LIFE)
call PolledWait(8)
set a = (a - GetUnitState(u, UNIT_STATE_LIFE))*(0.25+0.25*GetUnitAbilityLevel(gg_unit_H00M_0060, 'A02Z'))
set a = a*x
if (GetUnitAbilityLevel(u, 'B00P') >= 1 ) then
if (a >= 0) then
call UnitDamageTarget(gg_unit_H00M_0060, u, a, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
endif
set e = AddSpecialEffectTarget("Abilities\\Spells\\Human\\Feedback\\SpellBreakerAttack.mdl", u, "overhead")
call DestroyEffect(e)
call UnitRemoveAbility(u, 'B00P')
endif
set u = null
set e = null
endfunction
//===========================================================================
function InitTrig_ShaRitual takes nothing returns nothing
set gg_trg_ShaRitual = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_ShaRitual, gg_unit_H00M_0060, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ShaRitual, Condition( function Trig_ShaRitual_Conditions ) )
call TriggerAddAction( gg_trg_ShaRitual, function Trig_ShaRitual_Actions )
endfunction
function Trig_ShaEyes_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A031' ) ) then
return false
endif
return true
endfunction
function Trig_ShaEyes_Actions takes nothing returns nothing
set udg_ShaN = 0
call EnableTrigger(gg_trg_ShaPeriod)
endfunction
//===========================================================================
function InitTrig_ShaEyes takes nothing returns nothing
set gg_trg_ShaEyes = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ShaEyes, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ShaEyes, Condition( function Trig_ShaEyes_Conditions ) )
call TriggerAddAction( gg_trg_ShaEyes, function Trig_ShaEyes_Actions )
endfunction
function Trig_ShaPeriod_Actions takes nothing returns nothing
local location l = GetUnitLoc(gg_unit_H00M_0060)
local real x = GetLocationX(l) + GetRandomReal(-400, 400)
local real y = GetLocationY(l) + GetRandomReal(-400, 400)
local location l2 = Location(x, y)
local unit u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00M_0060), 'o003', l2, GetRandomReal(0, 360))
local real a = 0.06*(GetHeroInt(gg_unit_H00M_0060, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00M_0060))] + 100)
set udg_ShaN = udg_ShaN + 1
call BlzSetUnitBaseDamage( u, R2I(a), 0 )
call UnitApplyTimedLife( u, 'BTLF', 17 )
call IssueImmediateOrder(u, "holdposition")
if (udg_ShaN >= 35) then
call DisableTrigger(gg_trg_ShaPeriod)
endif
call RemoveLocation(l)
set l = null
call RemoveLocation(l2)
set l2 = null
set u = null
endfunction
//===========================================================================
function InitTrig_ShaPeriod takes nothing returns nothing
set gg_trg_ShaPeriod = CreateTrigger( )
call DisableTrigger( gg_trg_ShaPeriod )
call TriggerRegisterTimerEvent( gg_trg_ShaPeriod, 0.05, true )
call TriggerAddAction( gg_trg_ShaPeriod, function Trig_ShaPeriod_Actions )
endfunction
function Trig_DemPain_Conditions takes nothing returns boolean
return (GetUnitAbilityLevel(GetAttacker(), 'B00N') >= 1 )
endfunction
function Trig_DemPain_Actions takes nothing returns nothing
local unit u = GetAttacker()
local real x = 0.01*(GetHeroInt(gg_unit_H00L_0059, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00L_0059))] + 100)
local real a = x*(6 + 10*GetUnitAbilityLevel(gg_unit_H00L_0059, 'A02P'))
call UnitDamageTarget(gg_unit_H00L_0059, u, a, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
//===========================================================================
function InitTrig_DemPain takes nothing returns nothing
set gg_trg_DemPain = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DemPain, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_DemPain, Condition( function Trig_DemPain_Conditions ) )
call TriggerAddAction( gg_trg_DemPain, function Trig_DemPain_Actions )
endfunction
function Trig_DemPain2_Conditions takes nothing returns boolean
return (GetUnitAbilityLevel(GetTriggerUnit(), 'B00N') >= 1 )
endfunction
function Trig_DemPain2_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local real x = 0.01*(GetHeroInt(gg_unit_H00L_0059, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00L_0059))] + 100)
local real a = x*(30 + 50*GetUnitAbilityLevel(gg_unit_H00L_0059, 'A02P'))
call UnitDamageTarget(gg_unit_H00L_0059, u, a, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
//===========================================================================
function InitTrig_DemPain2 takes nothing returns nothing
set gg_trg_DemPain2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DemPain2, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_DemPain2, Condition( function Trig_DemPain2_Conditions ) )
call TriggerAddAction( gg_trg_DemPain2, function Trig_DemPain2_Actions )
endfunction
function Trig_DemDeath_Conditions takes nothing returns boolean
return (GetUnitAbilityLevel(gg_unit_H00L_0059, 'A02O') >= 1 )
endfunction
function Trig_DemDeath_Actions takes nothing returns nothing
local real x = 9*(GetHeroInt(gg_unit_H00L_0059, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00L_0059))] + 100)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00L_0059, 'A02O'), ABILITY_RLF_DAMAGE_NFD3, 0, x )
endfunction
//===========================================================================
function InitTrig_DemDeath takes nothing returns nothing
set gg_trg_DemDeath = CreateTrigger( )
call TriggerRegisterTimerEvent( gg_trg_DemDeath, 1.00, true )
call TriggerAddCondition( gg_trg_DemDeath, Condition( function Trig_DemDeath_Conditions ) )
call TriggerAddAction( gg_trg_DemDeath, function Trig_DemDeath_Actions )
endfunction
function DemCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00L_0059)) == true)
return b1 and b2
endfunction
function DemAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
local unit u2
local location l = GetUnitLoc(u)
call TriggerRegisterUnitEvent( udg_DemTrigger, u, EVENT_UNIT_DAMAGED )
set u2 = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00L_0059), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u2, 'A02R')
call IssueTargetOrder(u2, "slow", u)
set u = null
call RemoveLocation(l)
set l = null
endfunction
function DemAct2 takes nothing returns nothing
local unit u = GetTriggerUnit()
local real b = GetEventDamage()
local real a
if (udg_DemonTalent1 == true) then
set a = b*(1.45 + 0.1*(GetUnitAbilityLevel(gg_unit_H00L_0059, 'A02Q')))
else
set a = b*(1.2 + 0.1*(GetUnitAbilityLevel(gg_unit_H00L_0059, 'A02Q')))
endif
if (GetUnitAbilityLevel(u, 'B00O') >= 1 ) then
call BlzSetEventDamage( a )
endif
set u = null
endfunction
function Trig_DemCurse_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02Q' ) ) then
return false
endif
return true
endfunction
function Trig_DemCurse_Actions takes nothing returns nothing
local group g = CreateGroup()
local location l = GetSpellTargetLoc()
call DestroyTrigger(udg_DemTrigger)
set udg_DemTrigger = CreateTrigger()
call GroupEnumUnitsInRangeOfLoc(g, l, 250, Condition(function DemCheck1))
call ForGroup(g, function DemAct1)
call TriggerAddAction( udg_DemTrigger, function DemAct2 )
call PolledWait(10)
call DisableTrigger(udg_DemTrigger)
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_DemCurse takes nothing returns nothing
set gg_trg_DemCurse = CreateTrigger( )
set udg_DemTrigger = CreateTrigger()
call TriggerRegisterUnitEvent( gg_trg_DemCurse, gg_unit_H00L_0059, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_DemCurse, Condition( function Trig_DemCurse_Conditions ) )
call TriggerAddAction( gg_trg_DemCurse, function Trig_DemCurse_Actions )
endfunction
function Trig_DemBlood_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02S' ) ) then
return false
endif
return true
endfunction
function DemCheck3 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00L_0059)) == true)
return b1 and b2
endfunction
function DemAct3 takes nothing returns nothing
local unit u = GetEnumUnit()
local effect e = AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\HumanBloodLarge0.mdl", u, "origin")
local real x = 0.01*(GetHeroInt(gg_unit_H00L_0059, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00L_0059))] + 100)
local real a = x*(20 + 15*GetUnitAbilityLevel(gg_unit_H00L_0059, 'A02S'))
local real b = a*(2 - (GetUnitState(u, UNIT_STATE_LIFE)/GetUnitState(u, UNIT_STATE_MAX_LIFE)))
call UnitDamageTarget(gg_unit_H00L_0059, u, b, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(e)
set u = null
set e = null
endfunction
function Trig_DemBlood_Actions takes nothing returns nothing
local group g = CreateGroup()
local location l = GetSpellTargetLoc()
call GroupEnumUnitsInRangeOfLoc(g, l, 375, Condition(function DemCheck3))
call PolledWait(1)
call ForGroup(g, function DemAct3)
call PolledWait(1)
call ForGroup(g, function DemAct3)
call PolledWait(1)
call ForGroup(g, function DemAct3)
call PolledWait(1)
call ForGroup(g, function DemAct3)
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_DemBlood takes nothing returns nothing
set gg_trg_DemBlood = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_DemBlood, gg_unit_H00L_0059, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_DemBlood, Condition( function Trig_DemBlood_Conditions ) )
call TriggerAddAction( gg_trg_DemBlood, function Trig_DemBlood_Actions )
endfunction
function Trig_Robosaw_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02J' ) ) then
return false
endif
return true
endfunction
function Trig_Robosaw_Actions takes nothing returns nothing
local location l = GetSpellTargetLoc()
local location l2 = GetUnitLoc(gg_unit_H00K_0058)
local real z = 0.01*(GetHeroInt(gg_unit_H00K_0058, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00K_0058))] + 100)
local real a = z*(2+16*GetUnitAbilityLevel(gg_unit_H00K_0058, 'A02J'))
local real b = 57.2958 * Atan2(GetLocationY(l) - GetLocationY(l2), GetLocationX(l) - GetLocationX(l2))
local unit u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00K_0058), 'u00B', l, 0)
local real x = GetLocationX(l) + 300 * Cos(b * 0.01745)
local real y = GetLocationY(l) + 300 * Sin(b * 0.01745)
local location l3 = Location(x, y)
call UnitAddAbility(u, 'A02K')
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A02K'), ABILITY_RLF_DAMAGE_AMOUNT_NST3, 0, a )
if (udg_RobotTalent1 == true) then
call BlzSetAbilityIntegerLevelField( BlzGetUnitAbility(u, 'A02K'), ABILITY_ILF_BEASTS_PER_SECOND, 0, 14 )
endif
call IssuePointOrderLoc( u, "stampede", l3 )
set u = null
call RemoveLocation(l)
set l = null
call RemoveLocation(l2)
set l2 = null
call RemoveLocation(l3)
set l3 = null
endfunction
//===========================================================================
function InitTrig_Robosaw takes nothing returns nothing
set gg_trg_Robosaw = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Robosaw, gg_unit_H00K_0058, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Robosaw, Condition( function Trig_Robosaw_Conditions ) )
call TriggerAddAction( gg_trg_Robosaw, function Trig_Robosaw_Actions )
endfunction
function Trig_RoboElectric_Conditions takes nothing returns boolean
return (GetUnitAbilityLevel(gg_unit_H00K_0058, 'A02M') >= 1 )
endfunction
function Trig_RoboElectric_Actions takes nothing returns nothing
local real x = 0.01*(GetHeroInt(gg_unit_H00K_0058, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00K_0058))] + 100)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00K_0058, 'A02M'), ABILITY_RLF_DAMAGE_PER_INTERVAL, 0, 18*x )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00K_0058, 'A02M'), ABILITY_RLF_DAMAGE_PER_INTERVAL, 1, 27*x )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00K_0058, 'A02M'), ABILITY_RLF_DAMAGE_PER_INTERVAL, 2, 36*x )
endfunction
//===========================================================================
function InitTrig_RoboElectric takes nothing returns nothing
set gg_trg_RoboElectric = CreateTrigger( )
call TriggerRegisterTimerEvent( gg_trg_RoboElectric, 1.00, true )
call TriggerAddCondition( gg_trg_RoboElectric, Condition( function Trig_RoboElectric_Conditions ) )
call TriggerAddAction( gg_trg_RoboElectric, function Trig_RoboElectric_Actions )
endfunction
function Trig_RoboVacuum_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02N' ) ) then
return false
endif
return true
endfunction
function RoboCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00K_0058)) == true)
return b1 and b2
endfunction
function Trig_RoboVacuum_Actions takes nothing returns nothing
set udg_RoboLoc = GetSpellTargetLoc()
call GroupClear(udg_RoboGroup)
set udg_RoboN = 0
call GroupEnumUnitsInRangeOfLoc(udg_RoboGroup, udg_RoboLoc, 500, Condition(function RoboCheck1))
call EnableTrigger( gg_trg_RoboPeriod )
endfunction
//===========================================================================
function InitTrig_RoboVacuum takes nothing returns nothing
set gg_trg_RoboVacuum = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_RoboVacuum, gg_unit_H00K_0058, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_RoboVacuum, Condition( function Trig_RoboVacuum_Conditions ) )
call TriggerAddAction( gg_trg_RoboVacuum, function Trig_RoboVacuum_Actions )
endfunction
function RoboAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
local location l2 = GetUnitLoc(u)
local real a = (57.2958 * Atan2(GetLocationY(l2) - GetLocationY(udg_RoboLoc), GetLocationX(l2) - GetLocationX(udg_RoboLoc)) + 4)
local real dx = GetLocationX(l2) - GetLocationX(udg_RoboLoc)
local real dy = GetLocationY(l2) - GetLocationY(udg_RoboLoc)
local real d = SquareRoot(dx * dx + dy * dy) - 4
local real x = GetLocationX(udg_RoboLoc) + d * Cos(a * 0.01745)
local real y = GetLocationY(udg_RoboLoc) + d * Sin(a * 0.01745)
local location l3 = Location(x, y)
call SetUnitPositionLoc(u, l3)
set u = null
call RemoveLocation(l2)
call RemoveLocation(l3)
set l3 = null
set l2 = null
endfunction
function Trig_RoboPeriod_Actions takes nothing returns nothing
call ForGroup( udg_RoboGroup, function RoboAct1 )
set udg_RoboN = udg_RoboN + 1
if ( udg_RoboN >= 50) then
call DisableTrigger( gg_trg_RoboPeriod )
endif
endfunction
//===========================================================================
function InitTrig_RoboPeriod takes nothing returns nothing
set gg_trg_RoboPeriod = CreateTrigger( )
call DisableTrigger( gg_trg_RoboPeriod )
call TriggerRegisterTimerEvent( gg_trg_RoboPeriod, 0.02, true )
call TriggerAddAction( gg_trg_RoboPeriod, function Trig_RoboPeriod_Actions )
endfunction
function Trig_ShaShu_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02E' ) ) then
return false
endif
return true
endfunction
function Trig_ShaShu_Actions takes nothing returns nothing
local unit u2 = GetSpellTargetUnit()
local location l = GetUnitLoc(gg_unit_H00J_0057)
local unit u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00J_0057), 'u00I', l, bj_UNIT_FACING)
local integer i = GetRandomInt(1, 100)
local real a = 100*GetUnitAbilityLevel(gg_unit_H00J_0057, 'A02E')
local texttag t = CreateTextTag()
if (udg_ShadTalent1 == true) then
if (i <= udg_CritHit[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00J_0057))]) then
set a = a*udg_CritDamage[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00J_0057))]
call SetTextTagText(t, "Critical Hit!", 0.0345)
call SetTextTagPos(t, GetLocationX(l), GetLocationY(l), 90)
call SetTextTagColor(t, 100, 30, 30, 0)
call SetTextTagVelocity( t, 0.05*Cos(1.57), 0.05*Sin(1.57) )
endif
endif
call BlzSetUnitBaseDamage( u, R2I(a), 0 )
call IssueTargetOrder(u, "attack", u2)
call PolledWait(3)
call SetTextTagText(t, "", 0.0345)
call DestroyTextTag(t)
call RemoveLocation(l)
set l = null
set u = null
set u2 = null
endfunction
//===========================================================================
function InitTrig_ShaShu takes nothing returns nothing
set gg_trg_ShaShu = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_ShaShu, gg_unit_H00J_0057, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ShaShu, Condition( function Trig_ShaShu_Conditions ) )
call TriggerAddAction( gg_trg_ShaShu, function Trig_ShaShu_Actions )
endfunction
function Trig_ShaCurse_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02G' ) ) then
return false
endif
return true
endfunction
function ShaCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00J_0057)) == true)
return b1 and b2
endfunction
function ShaAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
local location l = GetUnitLoc(u)
local unit u2 = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00J_0057), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u2, 'A02F')
call SetUnitAbilityLevel(u2, 'A02F', GetUnitAbilityLevel(gg_unit_H00J_0057,'A02G') )
call IssueTargetOrder(u2, "faeriefire", u)
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
endfunction
function Trig_ShaCurse_Actions takes nothing returns nothing
local group g = CreateGroup()
local location l = GetSpellTargetLoc()
call GroupEnumUnitsInRangeOfLoc(g, l, 250, Condition(function ShaCheck1))
call ForGroup(g, function ShaAct1)
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_ShaCurse takes nothing returns nothing
set gg_trg_ShaCurse = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_ShaCurse, gg_unit_H00J_0057, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ShaCurse, Condition( function Trig_ShaCurse_Conditions ) )
call TriggerAddAction( gg_trg_ShaCurse, function Trig_ShaCurse_Actions )
endfunction
function Trig_ShaInvis_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02H' ) ) then
return false
endif
return true
endfunction
function Trig_ShaInvis_Actions takes nothing returns nothing
local real a = 5 + GetUnitAbilityLevel(gg_unit_H00J_0057, 'A02H')
local integer b = GetUnitAbilityLevel(gg_unit_H00J_0057, 'A02H')
call UnitAddAbility(gg_unit_H00J_0057, 'A02I')
set udg_CritDamage[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00J_0057))] = udg_CritDamage[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00J_0057))] + 0.5*I2R(b)
call PolledWait(a)
set udg_CritDamage[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00J_0057))] = udg_CritDamage[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00J_0057))] - 0.5*I2R(b)
call UnitRemoveAbility(gg_unit_H00J_0057, 'A02I')
endfunction
//===========================================================================
function InitTrig_ShaInvis takes nothing returns nothing
set gg_trg_ShaInvis = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_ShaInvis, gg_unit_H00J_0057, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ShaInvis, Condition( function Trig_ShaInvis_Conditions ) )
call TriggerAddAction( gg_trg_ShaInvis, function Trig_ShaInvis_Actions )
endfunction
function Trig_Shaillusion_Conditions takes nothing returns boolean
return (GetUnitAbilityLevel(gg_unit_H00J_0057, 'A02D') >= 1 )
endfunction
function Trig_Shaillusion_Actions takes nothing returns nothing
local location l = GetUnitLoc(gg_unit_H00J_0057)
local unit u
local integer i = GetRandomInt(1, 100)
if (i <= 10) then
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00J_0057), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u, 'A062')
call IssueTargetOrderById(u, 852274, gg_unit_H00J_0057)
endif
call RemoveLocation(l)
set l = null
set u = null
endfunction
//===========================================================================
function InitTrig_Shaillusion takes nothing returns nothing
set gg_trg_Shaillusion = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Shaillusion, gg_unit_H00J_0057, EVENT_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Shaillusion, Condition( function Trig_Shaillusion_Conditions ) )
call TriggerAddAction( gg_trg_Shaillusion, function Trig_Shaillusion_Actions )
endfunction
function Trig_OceWave_Conditions takes nothing returns boolean
return (GetUnitAbilityLevel(gg_unit_H00I_0056, 'A028') >= 1 )
endfunction
function Trig_OceWave_Actions takes nothing returns nothing
local real x = 0.01*(GetHeroInt(gg_unit_H00I_0056, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00I_0056))] + 100)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00I_0056, 'A028'), ABILITY_RLF_DAMAGE_UCS1, 0, 125*x )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00I_0056, 'A028'), ABILITY_RLF_DAMAGE_UCS1, 1, 225*x )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00I_0056, 'A028'), ABILITY_RLF_DAMAGE_UCS1, 2, 325*x )
endfunction
//===========================================================================
function InitTrig_OceWave takes nothing returns nothing
set gg_trg_OceWave = CreateTrigger( )
call TriggerRegisterTimerEvent( gg_trg_OceWave, 1.00, true )
call TriggerAddCondition( gg_trg_OceWave, Condition( function Trig_OceWave_Conditions ) )
call TriggerAddAction( gg_trg_OceWave, function Trig_OceWave_Actions )
endfunction
function Trig_OceResist_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A02C' ) ) then
return false
endif
return true
endfunction
function Trig_OceResist_Actions takes nothing returns nothing
set udg_Resist[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00I_0056))] = udg_Resist[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00I_0056))] + 6
endfunction
//===========================================================================
function InitTrig_OceResist takes nothing returns nothing
set gg_trg_OceResist = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_OceResist, gg_unit_H00I_0056, EVENT_UNIT_HERO_SKILL )
call TriggerAddCondition( gg_trg_OceResist, Condition( function Trig_OceResist_Conditions ) )
call TriggerAddAction( gg_trg_OceResist, function Trig_OceResist_Actions )
endfunction
function Trig_OceRegen_Conditions takes nothing returns boolean
return (GetUnitAbilityLevel(gg_unit_H00I_0056, 'A02C') >= 1 )
endfunction
function Trig_OceRegen_Actions takes nothing returns nothing
local integer i = GetUnitAbilityLevel(gg_unit_H00I_0056, 'A02C')
set udg_KtuR = udg_KtuR + i
call PolledWait(3.5)
if (udg_SeaTalent1 == true) then
call PolledWait(3.5)
set udg_KtuR = udg_KtuR - i
else
set udg_KtuR = udg_KtuR - i
endif
endfunction
//===========================================================================
function InitTrig_OceRegen takes nothing returns nothing
set gg_trg_OceRegen = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_OceRegen, gg_unit_H00I_0056, EVENT_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_OceRegen, Condition( function Trig_OceRegen_Conditions ) )
call TriggerAddAction( gg_trg_OceRegen, function Trig_OceRegen_Actions )
endfunction
function Trig_OceRegen2_Conditions takes nothing returns boolean
return (GetUnitAbilityLevel(gg_unit_H00I_0056, 'A028') >= 1 )
endfunction
function Trig_OceRegen2_Actions takes nothing returns nothing
local real a = GetUnitState(gg_unit_H00I_0056, UNIT_STATE_LIFE) + 0.5*udg_KtuR
call SetUnitState(gg_unit_H00I_0056, UNIT_STATE_LIFE, a)
endfunction
//===========================================================================
function InitTrig_OceRegen2 takes nothing returns nothing
set gg_trg_OceRegen2 = CreateTrigger( )
call TriggerRegisterTimerEvent( gg_trg_OceRegen2, 0.50, true )
call TriggerAddCondition( gg_trg_OceRegen2, Condition( function Trig_OceRegen2_Conditions ) )
call TriggerAddAction( gg_trg_OceRegen2, function Trig_OceRegen2_Actions )
endfunction
function Trig_KTULHU_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02A' ) ) then
return false
endif
return true
endfunction
function Trig_KTULHU_Actions takes nothing returns nothing
local location l = GetSpellTargetLoc()
local unit u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_PASSIVE), 'u00G', l, bj_UNIT_FACING)
local unit u2 = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_PASSIVE), 'u00H', l, bj_UNIT_FACING)
local unit u3 = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00I_0056), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u3, 'A02B')
call IssueImmediateOrder(u3, "howlofterror")
call TerrainDeformCrater(GetLocationX(l), GetLocationY(l), 250, 140, 1000, true)
call SetUnitAnimation(u, "birth")
call PolledWait(1.3)
call SetUnitOwner( u, GetOwningPlayer(gg_unit_H00I_0056), true )
call SetUnitAnimation(u, "stand")
call PolledWait(10.0)
call KillUnit(u)
call TerrainDeformCrater(GetLocationX(l), GetLocationY(l), 250, -140, 500, true)
call PolledWait(0.3)
call RemoveUnit(u2)
call RemoveLocation(l)
set l = null
set u = null
set u2 = null
set u3 = null
endfunction
//===========================================================================
function InitTrig_KTULHU takes nothing returns nothing
set gg_trg_KTULHU = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_KTULHU, gg_unit_H00I_0056, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_KTULHU, Condition( function Trig_KTULHU_Conditions ) )
call TriggerAddAction( gg_trg_KTULHU, function Trig_KTULHU_Actions )
endfunction
function Trig_KTULHUAttack_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'u00G' ) ) then
return false
endif
return true
endfunction
function KtuCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00I_0056)) == true)
return b1 and b2
endfunction
function KtuAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
call GroupAddUnit(udg_KtuGroup, u)
set u = null
endfunction
function KtuAct2 takes nothing returns nothing
local unit u = GetEnumUnit()
local real z = 0.01*(GetHeroInt(gg_unit_H00I_0056, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00I_0056))] + 100)
local real a = z*GetRandomReal(100, 200)
call UnitDamageTarget(gg_unit_H00I_0056, u, a, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function Trig_KTULHUAttack_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local unit u2 = GetAttacker()
local location l = GetUnitLoc(u)
local location l2 = GetUnitLoc(u2)
local location l3
local location l4
local location l5
local group g = CreateGroup()
local effect e
local real a = 57.2958 * Atan2(GetLocationY(l2) - GetLocationY(l), GetLocationX(l2) - GetLocationX(l)) + 180
local real x
local real y
call GroupClear(udg_KtuGroup)
set x = GetLocationX(l) + 200 * Cos(a * 0.01745)
set y = GetLocationY(l) + 200 * Sin(a * 0.01745)
set l3 = Location(x, y)
set x = GetLocationX(l) + 400 * Cos(a * 0.01745)
set y = GetLocationY(l) + 400 * Sin(a * 0.01745)
set l4 = Location(x, y)
set x = GetLocationX(l) + 600 * Cos(a * 0.01745)
set y = GetLocationY(l) + 600 * Sin(a * 0.01745)
set l5 = Location(x, y)
call PolledWait(0.3)
set e = AddSpecialEffectLoc("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl", l3)
call DestroyEffect(e)
set e = AddSpecialEffectLoc("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl", l4)
call DestroyEffect(e)
set e = AddSpecialEffectLoc("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl", l5)
call DestroyEffect(e)
call GroupEnumUnitsInRangeOfLoc(g, l3, 300, Condition(function KtuCheck1))
call ForGroup(g, function KtuAct1)
call GroupEnumUnitsInRangeOfLoc(g, l4, 300, Condition(function KtuCheck1))
call ForGroup(g, function KtuAct1)
call GroupEnumUnitsInRangeOfLoc(g, l5, 300, Condition(function KtuCheck1))
call ForGroup(g, function KtuAct1)
call ForGroup(udg_KtuGroup, function KtuAct2)
set e = null
call RemoveLocation(l)
set l = null
call RemoveLocation(l2)
set l2 = null
call RemoveLocation(l3)
set l3 = null
call RemoveLocation(l4)
set l4 = null
call RemoveLocation(l5)
set l5 = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_KTULHUAttack takes nothing returns nothing
set gg_trg_KTULHUAttack = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_KTULHUAttack, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_KTULHUAttack, Condition( function Trig_KTULHUAttack_Conditions ) )
call TriggerAddAction( gg_trg_KTULHUAttack, function Trig_KTULHUAttack_Actions )
endfunction
function Trig_DeaSteal_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A025' ) ) then
return false
endif
return true
endfunction
function DeathCon1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00H_0054)) == true)
return b1 and b2
endfunction
function DeathAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
local real x = 0.01*(GetHeroInt(gg_unit_H00H_0054, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00H_0054))] + 100)
local real a = x*(25+75*GetUnitAbilityLevel(gg_unit_H00H_0054, 'A025'))
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl" , u, "origin")
call UnitDamageTarget(gg_unit_H00H_0054, u, a, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(e)
set udg_DeathN = udg_DeathN + 1
set u = null
set e = null
endfunction
function Trig_DeaSteal_Actions takes nothing returns nothing
local group g = CreateGroup()
local effect e
local location l = GetSpellTargetLoc()
local real x = 0.01*(GetHeroInt(gg_unit_H00H_0054, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00H_0054))] + 100)
local real a = x*(5+15*GetUnitAbilityLevel(gg_unit_H00H_0054, 'A025'))
set udg_DeathN = 0
call GroupEnumUnitsInRangeOfLoc(g, l, 300, Condition(function DeathCon1))
call ForGroup(g, function DeathAct1)
set e = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl" , gg_unit_H00H_0054, "origin")
call DestroyEffect(e)
call SetUnitState(gg_unit_H00H_0054 , UNIT_STATE_LIFE, (GetUnitState(gg_unit_H00H_0054 , UNIT_STATE_LIFE) + a*udg_DeathN))
set e = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_DeaSteal takes nothing returns nothing
set gg_trg_DeaSteal = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_DeaSteal, gg_unit_H00H_0054, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_DeaSteal, Condition( function Trig_DeaSteal_Conditions ) )
call TriggerAddAction( gg_trg_DeaSteal, function Trig_DeaSteal_Actions )
endfunction
function Trig_DeaRage_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A024' ) ) then
return false
endif
return true
endfunction
function Trig_DeaRage_Actions takes nothing returns nothing
local location l = GetUnitLoc(gg_unit_H00H_0054)
local unit u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00H_0054), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u, 'A026')
call SetUnitAbilityLevel(u, 'A026', GetUnitAbilityLevel(gg_unit_H00H_0054,'A024') )
if (udg_DeathTalent1 == true) then
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A026'), ABILITY_RLF_DAMAGE_PER_SECOND_UHF2, 0, 0.00 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A026'), ABILITY_RLF_DAMAGE_PER_SECOND_UHF2, 1, 0.00 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A026'), ABILITY_RLF_DAMAGE_PER_SECOND_UHF2, 2, 0.00 )
endif
call IssueTargetOrder(u, "unholyfrenzy", gg_unit_H00H_0054)
call RemoveLocation(l)
set l = null
set u = null
endfunction
//===========================================================================
function InitTrig_DeaRage takes nothing returns nothing
set gg_trg_DeaRage = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_DeaRage, gg_unit_H00H_0054, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_DeaRage, Condition( function Trig_DeaRage_Conditions ) )
call TriggerAddAction( gg_trg_DeaRage, function Trig_DeaRage_Actions )
endfunction
function Trig_DeaStr_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A023' ) ) then
return false
endif
return true
endfunction
function Trig_DeaStr_Actions takes nothing returns nothing
call ModifyHeroStat( bj_HEROSTAT_STR, gg_unit_H00H_0054, bj_MODIFYMETHOD_ADD, 3 )
endfunction
//===========================================================================
function InitTrig_DeaStr takes nothing returns nothing
set gg_trg_DeaStr = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_DeaStr, gg_unit_H00H_0054, EVENT_UNIT_HERO_SKILL )
call TriggerAddCondition( gg_trg_DeaStr, Condition( function Trig_DeaStr_Conditions ) )
call TriggerAddAction( gg_trg_DeaStr, function Trig_DeaStr_Actions )
endfunction
function Trig_WarSun_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01X' ) ) then
return false
endif
return true
endfunction
function Trig_WarSun_Actions takes nothing returns nothing
local location l = GetSpellTargetLoc()
local integer i = GetRandomInt(1, 100)
local real r =(GetHeroInt(gg_unit_H00G_0055, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00G_0055))] + 100)*0.01
local real b = r*(80*GetUnitAbilityLevel(gg_unit_H00G_0055, 'A01X'))
local unit u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00G_0055), 'u000', l, 0)
local texttag t = CreateTextTag()
if ((GetUnitAbilityLevel(gg_unit_H00G_0055, 'A021') >= 1) and (i <= (10 + 5*GetUnitAbilityLevel(gg_unit_H00G_0055, 'A021')))) then
set b = b*2
call SetTextTagText(t, "Echo Magic!", 0.0345)
call SetTextTagPos(t, GetLocationX(l), GetLocationY(l), 90)
call SetTextTagColor(t, 15, 80, 100, 0)
call SetTextTagVelocity( t, 0.05*Cos(1.57), 0.05*Sin(1.57) )
endif
call UnitAddAbility(u, 'A01Y')
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A01Y'), ABILITY_RLF_DAMAGE_HBZ2, 0, b )
call IssuePointOrderLoc( u, "blizzard", l )
set u = null
call RemoveLocation(l)
set l = null
call PolledWait(3)
call SetTextTagText(t, "", 0.0345)
call DestroyTextTag(t)
endfunction
//===========================================================================
function InitTrig_WarSun takes nothing returns nothing
set gg_trg_WarSun = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_WarSun, gg_unit_H00G_0055, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_WarSun, Condition( function Trig_WarSun_Conditions ) )
call TriggerAddAction( gg_trg_WarSun, function Trig_WarSun_Actions )
endfunction
function Trig_WarLight_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01Z' ) ) then
return false
endif
return true
endfunction
function Trig_WarLight_Actions takes nothing returns nothing
local unit u2 = GetSpellTargetUnit()
local location l = GetUnitLoc(u2)
local integer i = GetRandomInt(1, 100)
local unit u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00G_0055), 'u00E', l, 0)
local real r =(GetHeroInt(gg_unit_H00G_0055, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00G_0055))] + 100)*0.01
local real b = r*(75+75*GetUnitAbilityLevel(gg_unit_H00G_0055, 'A01Z'))
local texttag t = CreateTextTag()
if (udg_WarlTalent1 == true) then
set b = b*1.5
endif
if ((GetUnitAbilityLevel(gg_unit_H00G_0055, 'A021') >= 1) and (i <= (10 + 5*GetUnitAbilityLevel(gg_unit_H00G_0055, 'A021')))) then
set b = b*2
call SetTextTagText(t, "Echo Magic!", 0.0345)
call SetTextTagPos(t, GetLocationX(l), GetLocationY(l), 90)
call SetTextTagColor(t, 15, 80, 100, 0)
call SetTextTagVelocity( t, 0.05*Cos(1.57), 0.05*Sin(1.57) )
endif
call UnitAddAbility(u, 'A020')
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A020'), ABILITY_RLF_DAMAGE_PER_TARGET_OCL1, 0, b )
call IssueTargetOrder(u, "chainlightning", u2)
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
call PolledWait(3)
call SetTextTagText(t, "", 0.0345)
call DestroyTextTag(t)
endfunction
//===========================================================================
function InitTrig_WarLight takes nothing returns nothing
set gg_trg_WarLight = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_WarLight, gg_unit_H00G_0055, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_WarLight, Condition( function Trig_WarLight_Conditions ) )
call TriggerAddAction( gg_trg_WarLight, function Trig_WarLight_Actions )
endfunction
function Trig_WarNova_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A022' ) ) then
return false
endif
return true
endfunction
function Trig_WarNova_Actions takes nothing returns nothing
local real x
local real y
local unit u
local real a = 0
local location l
set udg_WarlN = 0
call GroupClear(udg_WarlGroup)
set udg_WarlLoc = GetUnitLoc(gg_unit_H00G_0055)
loop
exitwhen a > 24
set a = a + 1
set x = GetLocationX(udg_WarlLoc) + 500 * Cos(a * 0.26175)
set y = GetLocationY(udg_WarlLoc) + 500 * Sin(a * 0.26175)
set l = Location(x, y)
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00G_0055), 'u00F', l, GetRandomReal(0, 360))
call GroupAddUnit(udg_WarlGroup, u)
endloop
call EnableTrigger( gg_trg_WarTimer )
call PolledWait(1.5)
set udg_WarlN = 0
call GroupClear(udg_WarlGroup)
set udg_WarlLoc = GetUnitLoc(gg_unit_H00G_0055)
set a = 0
loop
exitwhen a > 24
set a = a + 1
set x = GetLocationX(udg_WarlLoc) + 500 * Cos(a * 0.26175)
set y = GetLocationY(udg_WarlLoc) + 500 * Sin(a * 0.26175)
set l = Location(x, y)
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00G_0055), 'u00F', l, GetRandomReal(0, 360))
call GroupAddUnit(udg_WarlGroup, u)
endloop
call EnableTrigger( gg_trg_WarTimer )
call PolledWait(1.5)
set udg_WarlN = 0
call GroupClear(udg_WarlGroup)
set udg_WarlLoc = GetUnitLoc(gg_unit_H00G_0055)
set a = 0
loop
exitwhen a > 24
set a = a + 1
set x = GetLocationX(udg_WarlLoc) + 500 * Cos(a * 0.26175)
set y = GetLocationY(udg_WarlLoc) + 500 * Sin(a * 0.26175)
set l = Location(x, y)
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00G_0055), 'u00F', l, GetRandomReal(0, 360))
call GroupAddUnit(udg_WarlGroup, u)
endloop
call EnableTrigger( gg_trg_WarTimer )
call PolledWait(1.5)
set udg_WarlN = 0
call GroupClear(udg_WarlGroup)
set udg_WarlLoc = GetUnitLoc(gg_unit_H00G_0055)
set a = 0
loop
exitwhen a > 24
set a = a + 1
set x = GetLocationX(udg_WarlLoc) + 500 * Cos(a * 0.26175)
set y = GetLocationY(udg_WarlLoc) + 500 * Sin(a * 0.26175)
set l = Location(x, y)
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00G_0055), 'u00F', l, GetRandomReal(0, 360))
call GroupAddUnit(udg_WarlGroup, u)
endloop
call EnableTrigger( gg_trg_WarTimer )
call PolledWait(1.5)
set udg_WarlN = 0
call GroupClear(udg_WarlGroup)
set udg_WarlLoc = GetUnitLoc(gg_unit_H00G_0055)
set a = 0
loop
exitwhen a > 24
set a = a + 1
set x = GetLocationX(udg_WarlLoc) + 500 * Cos(a * 0.26175)
set y = GetLocationY(udg_WarlLoc) + 500 * Sin(a * 0.26175)
set l = Location(x, y)
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00G_0055), 'u00F', l, GetRandomReal(0, 360))
call GroupAddUnit(udg_WarlGroup, u)
endloop
call EnableTrigger( gg_trg_WarTimer )
set u = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_WarNova takes nothing returns nothing
set gg_trg_WarNova = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_WarNova, gg_unit_H00G_0055, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_WarNova, Condition( function Trig_WarNova_Conditions ) )
call TriggerAddAction( gg_trg_WarNova, function Trig_WarNova_Actions )
endfunction
function WarTimerAct4 takes nothing returns nothing
local unit u = GetEnumUnit()
local location l2 = GetUnitLoc(u)
local real a = (57.2958 * Atan2(GetLocationY(l2) - GetLocationY(udg_WarlLoc), GetLocationX(l2) - GetLocationX(udg_WarlLoc)) + 3)
local real d = 500 - 9*udg_WarlN
local real x = GetLocationX(udg_WarlLoc) + d * Cos(a * 0.01745)
local real y = GetLocationY(udg_WarlLoc) + d * Sin(a * 0.01745)
local location l3 = Location(x, y)
call SetUnitPositionLoc(u, l3)
call SetUnitFlyHeight( u, (GetUnitFlyHeight(u) - 10), 99999 )
set u = null
call RemoveLocation(l2)
call RemoveLocation(l3)
set l3 = null
set l2 = null
endfunction
function WarTimerAct2 takes nothing returns nothing
local unit u = GetEnumUnit()
call KillUnit(u)
set u = null
endfunction
function WarlCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00G_0055)) == true)
return b1 and b2
endfunction
function WarlAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
call UnitDamageTarget(gg_unit_H00G_0055, u, udg_WarlDam, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function Trig_WarTimer_Actions takes nothing returns nothing
local group g = CreateGroup()
local effect e
local texttag t = CreateTextTag()
local integer i = GetRandomInt(1, 100)
call ForGroup( udg_WarlGroup, function WarTimerAct4 )
set udg_WarlN = udg_WarlN + 1
if ( udg_WarlN >= 50) then
set e = AddSpecialEffectLoc("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl", udg_WarlLoc)
call BlzSetSpecialEffectScale( e, 2.00 )
call BlzSetSpecialEffectColor( e, 255, 20, 20 )
call DestroyEffect(e)
call DisableTrigger( gg_trg_WarTimer )
set udg_WarlDam = 1.5*(GetHeroInt(gg_unit_H00G_0055, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00G_0055))] + 100)
if ((GetUnitAbilityLevel(gg_unit_H00G_0055, 'A021') >= 1) and (i <= (10 + 5*GetUnitAbilityLevel(gg_unit_H00G_0055, 'A021')))) then
set udg_WarlDam = udg_WarlDam*2
call SetTextTagText(t, "Echo Magic!", 0.0345)
call SetTextTagPos(t, GetLocationX(udg_WarlLoc), GetLocationY(udg_WarlLoc), 90)
call SetTextTagColor(t, 15, 80, 100, 0)
call SetTextTagVelocity( t, 0.05*Cos(1.57), 0.05*Sin(1.57) )
endif
call GroupEnumUnitsInRangeOfLoc(g, udg_WarlLoc, 400, Condition(function WarlCheck1))
call ForGroup(g, function WarlAct1)
call ForGroup( udg_WarlGroup, function WarTimerAct2 )
endif
call DestroyGroup(g)
set g = null
set e = null
call PolledWait(3)
call SetTextTagText(t, "", 0.0345)
call DestroyTextTag(t)
endfunction
//===========================================================================
function InitTrig_WarTimer takes nothing returns nothing
set gg_trg_WarTimer = CreateTrigger( )
call DisableTrigger( gg_trg_WarTimer )
call TriggerRegisterTimerEvent( gg_trg_WarTimer, 0.02, true )
call TriggerAddAction( gg_trg_WarTimer, function Trig_WarTimer_Actions )
endfunction
function Trig_MedPosion_Conditions takes nothing returns boolean
return (GetUnitAbilityLevel(gg_unit_H00F_0053, 'A01U') >= 1 )
endfunction
function Trig_MedPosion_Actions takes nothing returns nothing
local real a = 0.08*(GetHeroInt(gg_unit_H00F_0053, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00F_0053))] + 100)
if (udg_MedTalent1 == true) then
set a = 2*a
endif
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00F_0053, 'A01U'), ABILITY_RLF_DAMAGE_PER_SECOND_POA2, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00F_0053, 'A01U'), ABILITY_RLF_DAMAGE_PER_SECOND_POA2, 1, 2*a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00F_0053, 'A01U'), ABILITY_RLF_DAMAGE_PER_SECOND_POA2, 2, 3*a )
endfunction
//===========================================================================
function InitTrig_MedPosion takes nothing returns nothing
set gg_trg_MedPosion = CreateTrigger( )
call TriggerRegisterTimerEvent( gg_trg_MedPosion, 1.00, true )
call TriggerAddCondition( gg_trg_MedPosion, Condition( function Trig_MedPosion_Conditions ) )
call TriggerAddAction( gg_trg_MedPosion, function Trig_MedPosion_Actions )
endfunction
function Trig_MedCloud_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01R' ) ) then
return false
endif
return true
endfunction
function Trig_MedCloud_Actions takes nothing returns nothing
local unit u = gg_unit_H00F_0053
local location l = GetSpellTargetLoc()
local real x = 0.01*(GetHeroInt(gg_unit_H00F_0053, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00F_0053))] + 100)
local real a = x*(5+10*GetUnitAbilityLevel(gg_unit_H00F_0053, 'A01R'))
local real b = x*(5*GetUnitAbilityLevel(gg_unit_H00F_0053, 'A01R'))
local unit u2 = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00F_0053), 'u00B', l, 0)
call UnitAddAbility(u2, 'A01T')
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u2, 'A01T'), ABILITY_RLF_DAMAGE_HBZ2, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u2, 'A01T'), ABILITY_RLF_DAMAGE_PER_SECOND_HBZ5, 0, b )
call IssuePointOrderLoc( u2, "rainoffire", l )
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_MedCloud takes nothing returns nothing
set gg_trg_MedCloud = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_MedCloud, gg_unit_H00F_0053, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_MedCloud, Condition( function Trig_MedCloud_Conditions ) )
call TriggerAddAction( gg_trg_MedCloud, function Trig_MedCloud_Actions )
endfunction
function Trig_MedUlt_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01V' ) ) then
return false
endif
return true
endfunction
function MedstCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00F_0053)) == true)
return b1 and b2
endfunction
function MedstAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Orc\\EtherealForm\\SpiritWalkerChange.mdl" , u, "origin")
call DestroyEffect(e)
call BlzPauseUnitEx (u, true)
call SetUnitTimeScale( u, 0 )
set u = null
set e = null
endfunction
function MedstAct12 takes nothing returns nothing
local unit u = GetEnumUnit()
call BlzPauseUnitEx (u, false)
call SetUnitTimeScale( u, 1 )
set u = null
endfunction
function Trig_MedUlt_Actions takes nothing returns nothing
local unit u = gg_unit_H00F_0053
local location l = GetUnitLoc(u)
local group g = CreateGroup()
set udg_Medusa = true
call GroupEnumUnitsInRangeOfLoc(g, l, 700, Condition(function MedstCheck1))
call ForGroup(g, function MedstAct1)
call PolledWait(10)
call ForGroup(g, function MedstAct12)
set udg_Medusa = false
set u = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_MedUlt takes nothing returns nothing
set gg_trg_MedUlt = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_MedUlt, gg_unit_H00F_0053, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_MedUlt, Condition( function Trig_MedUlt_Conditions ) )
call TriggerAddAction( gg_trg_MedUlt, function Trig_MedUlt_Actions )
endfunction
function Trig_MedEva_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A01W' ) ) then
return false
endif
return true
endfunction
function Trig_MedEva_Actions takes nothing returns nothing
set udg_Evasion[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00F_0053))] = udg_Evasion[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00F_0053))] + 5
endfunction
//===========================================================================
function InitTrig_MedEva takes nothing returns nothing
set gg_trg_MedEva = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_MedEva, gg_unit_H00F_0053, EVENT_UNIT_HERO_SKILL )
call TriggerAddCondition( gg_trg_MedEva, Condition( function Trig_MedEva_Conditions ) )
call TriggerAddAction( gg_trg_MedEva, function Trig_MedEva_Actions )
endfunction
function Trig_MonStrike_Conditions takes nothing returns boolean
local boolean b1 =( GetUnitAbilityLevel(gg_unit_H00E_0052, 'B00C') >= 1 )
local boolean b2 =( GetAttacker() == gg_unit_H00E_0052)
return b1 and b2
endfunction
function MonkCon takes nothing returns boolean
local boolean b1 = ( GetEventDamageSource() == gg_unit_H00E_0052 )
return b1
endfunction
function MonkCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00E_0052)) == true)
local boolean b3 = ( GetFilterUnit() != GetTriggerUnit() )
return b1 and b2 and b3
endfunction
function MonkMove1 takes nothing returns nothing
local unit u = GetEnumUnit()
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl" , u, "origin")
call DestroyEffect(e)
call UnitDamageTarget(gg_unit_H00E_0052, u, udg_MonDam, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
set e = null
endfunction
function MonkAct takes nothing returns nothing
local unit u = GetTriggerUnit()
local unit u2 = GetEventDamageSource()
local location l = GetUnitLoc(u)
local group g = CreateGroup()
local real x = GetEventDamage()*(0.2+0.2*GetUnitAbilityLevel(gg_unit_H00E_0052, 'A01P') )
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareBoltImpact.mdl" , u, "origin")
call DestroyEffect(e)
set udg_MonDam = x + GetEventDamage()
call DisableTrigger(udg_MonTrigger)
call UnitRemoveAbility(gg_unit_H00E_0052, 'B00C')
call GroupEnumUnitsInRangeOfLoc(g, l, 275, Condition(function MonkCheck1))
call ForGroup( g, function MonkMove1 )
call UnitDamageTarget(gg_unit_H00E_0052, u, x, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
set e = null
endfunction
function Trig_MonStrike_Actions takes nothing returns nothing
local unit u1 = GetAttacker()
local unit u2 = GetTriggerUnit()
local integer i = GetRandomInt(1,100)
call DestroyTrigger(udg_MonTrigger)
set udg_MonTrigger = CreateTrigger()
call TriggerRegisterUnitEvent( udg_MonTrigger, u2, EVENT_UNIT_DAMAGED )
call TriggerAddCondition( udg_MonTrigger, Condition( function MonkCon ) )
call TriggerAddAction( udg_MonTrigger, function MonkAct )
set u1 = null
set u2 = null
endfunction
//===========================================================================
function InitTrig_MonStrike takes nothing returns nothing
set gg_trg_MonStrike = CreateTrigger( )
set udg_MonTrigger = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( gg_trg_MonStrike, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_MonStrike, Condition( function Trig_MonStrike_Conditions ) )
call TriggerAddAction( gg_trg_MonStrike, function Trig_MonStrike_Actions )
endfunction
function Trig_MonRegen_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01Q' ) ) then
return false
endif
return true
endfunction
function Trig_MonRegen_Actions takes nothing returns nothing
local unit u = gg_unit_H00E_0052
local effect e
local real r =(GetHeroInt(gg_unit_H00E_0052, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00E_0052))] + 100)*0.01
local real b = r*(5+10*GetUnitAbilityLevel(gg_unit_H00E_0052, 'A01Q'))
local real x
set udg_Resist[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00E_0052))] = udg_Resist[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00E_0052))] + 40
call UnitAddAbility(gg_unit_H00E_0052, 'A09S' )
set x = GetUnitState(u, UNIT_STATE_LIFE)
call SetUnitState (u, UNIT_STATE_LIFE, (x + b))
set e = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Unsummon\\UnsummonTarget.mdl" , u, "origin")
call PolledWait(0.5)
set x = GetUnitState(u, UNIT_STATE_LIFE)
call SetUnitState (u, UNIT_STATE_LIFE, (x + b))
call PolledWait(0.5)
set x = GetUnitState(u, UNIT_STATE_LIFE)
call SetUnitState (u, UNIT_STATE_LIFE, (x + b))
call PolledWait(0.5)
set x = GetUnitState(u, UNIT_STATE_LIFE)
call SetUnitState (u, UNIT_STATE_LIFE, (x + b))
call PolledWait(0.5)
set x = GetUnitState(u, UNIT_STATE_LIFE)
call SetUnitState (u, UNIT_STATE_LIFE, (x + b))
call PolledWait(0.5)
set x = GetUnitState(u, UNIT_STATE_LIFE)
call SetUnitState (u, UNIT_STATE_LIFE, (x + b))
call PolledWait(0.5)
set x = GetUnitState(u, UNIT_STATE_LIFE)
call SetUnitState (u, UNIT_STATE_LIFE, (x + b))
call PolledWait(0.5)
set x = GetUnitState(u, UNIT_STATE_LIFE)
call SetUnitState (u, UNIT_STATE_LIFE, (x + b))
call DestroyEffect(e)
set udg_Resist[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00E_0052))] = udg_Resist[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00E_0052))] - 40
call UnitRemoveAbility(gg_unit_H00E_0052, 'A09S' )
set e = null
set u = null
endfunction
//===========================================================================
function InitTrig_MonRegen takes nothing returns nothing
set gg_trg_MonRegen = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_MonRegen, gg_unit_H00E_0052, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_MonRegen, Condition( function Trig_MonRegen_Conditions ) )
call TriggerAddAction( gg_trg_MonRegen, function Trig_MonRegen_Actions )
endfunction
function Trig_MonBonus_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01S' ) ) then
return false
endif
return true
endfunction
function Trig_MonBonus_Actions takes nothing returns nothing
local integer s = GetHeroStr(gg_unit_H00E_0052, true)
local integer a = GetHeroAgi(gg_unit_H00E_0052, true)
local integer i = GetHeroInt(gg_unit_H00E_0052, true)
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Human\\ManaShield\\ManaShieldCaster.mdl" , gg_unit_H00E_0052, "origin")
call ModifyHeroStat( bj_HEROSTAT_STR, gg_unit_H00E_0052, bj_MODIFYMETHOD_ADD, i )
call ModifyHeroStat( bj_HEROSTAT_AGI, gg_unit_H00E_0052, bj_MODIFYMETHOD_ADD, s )
call ModifyHeroStat( bj_HEROSTAT_INT, gg_unit_H00E_0052, bj_MODIFYMETHOD_ADD, a )
call PolledWait(30)
call ModifyHeroStat( bj_HEROSTAT_STR, gg_unit_H00E_0052, bj_MODIFYMETHOD_SUB, i )
call ModifyHeroStat( bj_HEROSTAT_AGI, gg_unit_H00E_0052, bj_MODIFYMETHOD_SUB, s )
call ModifyHeroStat( bj_HEROSTAT_INT, gg_unit_H00E_0052, bj_MODIFYMETHOD_SUB, a )
call DestroyEffect(e)
set e = null
endfunction
//===========================================================================
function InitTrig_MonBonus takes nothing returns nothing
set gg_trg_MonBonus = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_MonBonus, gg_unit_H00E_0052, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_MonBonus, Condition( function Trig_MonBonus_Conditions ) )
call TriggerAddAction( gg_trg_MonBonus, function Trig_MonBonus_Actions )
endfunction
function Trig_RifCast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01K' ) ) then
return false
endif
return true
endfunction
function Trig_RifCast_Actions takes nothing returns nothing
set udg_RifPoint = GetUnitLoc(gg_unit_H00D_0051)
set udg_RifNumber = 0
call GroupClear(udg_RifGroup)
call EnableTrigger( gg_trg_RifBarri )
endfunction
//===========================================================================
function InitTrig_RifCast takes nothing returns nothing
set gg_trg_RifCast = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_RifCast, gg_unit_H00D_0051, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_RifCast, Condition( function Trig_RifCast_Conditions ) )
call TriggerAddAction( gg_trg_RifCast, function Trig_RifCast_Actions )
endfunction
function RifCheck takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (GetFilterUnit() != gg_unit_H00D_0051 )
return b1
endfunction
function BarRem takes nothing returns nothing
local unit u = GetEnumUnit()
call RemoveUnit(u)
set u = null
endfunction
function BarMove takes nothing returns nothing
local unit u = GetEnumUnit()
local location l = GetUnitLoc(u)
local real a = 36*udg_RifNumber
local real x
local real y
local location l2
set x = GetLocationX(l) + 185 * Cos(a * 0.01745)
set y = GetLocationY(l) + 185 * Sin(a * 0.01745)
set l2 = Location(x,y)
call SetUnitPositionLoc(u, l2)
set u = null
call RemoveLocation(l2)
call RemoveLocation(l)
set l = null
set l2 = null
endfunction
function Trig_RifBarri_Actions takes nothing returns nothing
local location l
local real x
local real y
local unit u
local unit u2
local real a
local group g = CreateGroup()
local effect e
set udg_RifNumber = udg_RifNumber + 1
set a = 36*udg_RifNumber
set x = GetLocationX(udg_RifPoint) + 185 * Cos(a * 0.01745)
set y = GetLocationY(udg_RifPoint) + 185 * Sin(a * 0.01745)
set l = Location(x, y)
call GroupEnumUnitsInRangeOfLoc(g, l, 70, Condition(function RifCheck))
set u2 = FirstOfGroup(g)
if (u2 != null) then
call ForGroup( g, function BarMove )
endif
if (IsTerrainPathable(GetLocationX(l), GetLocationY(l), PATHING_TYPE_WALKABILITY) == false) then
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_PASSIVE), 'n003', l, GetRandomReal(0, 360))
call GroupAddUnit(udg_RifGroup, u)
set e = AddSpecialEffectLoc("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl", l)
call DestroyEffect(e)
endif
if (udg_RifNumber >= 10) then
call DisableTrigger( gg_trg_RifBarri )
call PolledWait(3.00 + 3*I2R(GetUnitAbilityLevel(gg_unit_H00D_0051,'A01K')))
call ForGroup( udg_RifGroup, function BarRem )
endif
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
set e = null
endfunction
//===========================================================================
function InitTrig_RifBarri takes nothing returns nothing
set gg_trg_RifBarri = CreateTrigger( )
call DisableTrigger(gg_trg_RifBarri)
call TriggerRegisterTimerEvent( gg_trg_RifBarri, 0.08, true )
call TriggerAddAction( gg_trg_RifBarri, function Trig_RifBarri_Actions )
endfunction
function Trig_RifSniper_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01N' ) ) then
return false
endif
return true
endfunction
function RifCon3 takes nothing returns boolean
return ( GetEventDamageSource() == gg_unit_H00D_0051 )
endfunction
function RifDam3 takes nothing returns nothing
local unit u = GetTriggerUnit()
call DisableTrigger(udg_RifTrigger)
set udg_RifDamage = udg_RifDamage + 6 + 6*GetUnitAbilityLevel(gg_unit_H00D_0051, 'A01N')
call UnitDamageTarget(gg_unit_H00D_0051, u, udg_RifDamage, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
call EnableTrigger(udg_RifTrigger)
set u = null
endfunction
function Trig_RifSniper_Actions takes nothing returns nothing
local unit u = GetSpellTargetUnit()
local location l = GetUnitLoc(u)
local unit u2
local effect e = AddSpecialEffectTarget("war3mapImported\\SnipeTarget.mdx" , u, "overhead")
set udg_RifDamage = 0
if (udg_RifleTalent1 == true ) then
set u2 = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00D_0051), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u2, 'A09R')
call IssueTargetOrder(u2, "faeriefire", u)
endif
call DestroyTrigger(udg_RifTrigger)
set udg_RifTrigger = CreateTrigger( )
call TriggerRegisterUnitEvent( udg_RifTrigger, u, EVENT_UNIT_DAMAGED )
call TriggerAddCondition( udg_RifTrigger, Condition( function RifCon3 ) )
call TriggerAddAction( udg_RifTrigger, function RifDam3 )
call IssueTargetOrder(gg_unit_H00D_0051, "attack", u)
call PolledWait(10.0)
call DestroyEffect(e)
call DestroyTrigger(udg_RifTrigger)
set u = null
set u2 = null
set e = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_RifSniper takes nothing returns nothing
set gg_trg_RifSniper = CreateTrigger( )
set udg_RifTrigger = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_RifSniper, gg_unit_H00D_0051, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_RifSniper, Condition( function Trig_RifSniper_Conditions ) )
call TriggerAddAction( gg_trg_RifSniper, function Trig_RifSniper_Actions )
endfunction
function Trig_RifExplosion_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01M' ) ) then
return false
endif
return true
endfunction
function PowderCon takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00D_0051)) == true)
return b1 and b2
endfunction
function PowderAct takes nothing returns nothing
local unit u = GetEnumUnit()
local real x = 6*(GetHeroInt(gg_unit_H00D_0051, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00D_0051))] + 100)
call UnitDamageTarget(gg_unit_H00D_0051, u, x, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function Trig_RifExplosion_Actions takes nothing returns nothing
local location l = GetSpellTargetLoc()
local unit u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00D_0051), 'u00C', l, bj_UNIT_FACING)
local unit u2 = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00D_0051), 'u00D', l, bj_UNIT_FACING)
local texttag t = CreateTextTag()
local effect e
local group g = CreateGroup()
call SetTextTagText(t, "5", 0.0345)
call SetTextTagPos(t, GetLocationX(l), GetLocationY(l), 90)
call SetTextTagColor(t, 0, 100, 0, 0)
call PolledWait(1)
call SetTextTagText(t, "4", 0.0345)
call SetTextTagColor(t, 50, 100, 0, 0)
call PolledWait(1)
call SetTextTagText(t, "3", 0.0345)
call SetTextTagColor(t, 100, 100, 0, 0)
call PolledWait(1)
call SetTextTagText(t, "2", 0.0345)
call SetTextTagColor(t, 100, 50, 0, 0)
call PolledWait(1)
call SetTextTagText(t, "1", 0.0345)
call SetTextTagColor(t, 100, 0, 0, 0)
call PolledWait(1)
call DestroyTextTag(t)
call RemoveUnit(u)
call RemoveUnit(u2)
set e = AddSpecialEffectLoc("Objects\\Spawnmodels\\Human\\HCancelDeath\\HCancelDeath.mdl", l)
call BlzSetSpecialEffectScale( e, 2.00 )
call DestroyEffect(e)
call GroupEnumUnitsInRangeOfLoc(g, l, 450, Condition(function PowderCon))
call ForGroup(g, function PowderAct)
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
set e = null
endfunction
//===========================================================================
function InitTrig_RifExplosion takes nothing returns nothing
set gg_trg_RifExplosion = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_RifExplosion, gg_unit_H00D_0051, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_RifExplosion, Condition( function Trig_RifExplosion_Conditions ) )
call TriggerAddAction( gg_trg_RifExplosion, function Trig_RifExplosion_Actions )
endfunction
function Trig_ScoSand_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01G' ) ) then
return false
endif
return true
endfunction
function Trig_ScoSand_Actions takes nothing returns nothing
local location l = GetSpellTargetLoc()
local unit u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00C_0050), 'u00B', l, bj_UNIT_FACING)
set udg_SandLoc = GetSpellTargetLoc()
call UnitAddAbility(u, 'A01F')
call SetUnitAbilityLevel(u, 'A01F', GetUnitAbilityLevel(gg_unit_H00C_0050,'A01G') )
call IssuePointOrderLoc( u, "cloudoffog", l )
call EnableTrigger( gg_trg_ScoEffect )
call EnableTrigger( gg_trg_ScoDamage )
call PolledWait(12.00)
call DisableTrigger( gg_trg_ScoEffect )
call DisableTrigger( gg_trg_ScoDamage )
set u = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_ScoSand takes nothing returns nothing
set gg_trg_ScoSand = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_ScoSand, gg_unit_H00C_0050, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ScoSand, Condition( function Trig_ScoSand_Conditions ) )
call TriggerAddAction( gg_trg_ScoSand, function Trig_ScoSand_Actions )
endfunction
function Trig_ScoEffect_Actions takes nothing returns nothing
local real x = GetLocationX(udg_SandLoc) + GetRandomReal(-340, 340)
local real y = GetLocationY(udg_SandLoc) + GetRandomReal(-340, 340)
local location l = Location(x,y)
local effect e = AddSpecialEffectLoc("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl", l)
call DestroyEffect(e)
call RemoveLocation(l)
set e = null
set l = null
endfunction
//===========================================================================
function InitTrig_ScoEffect takes nothing returns nothing
set gg_trg_ScoEffect = CreateTrigger( )
call DisableTrigger( gg_trg_ScoEffect )
call TriggerRegisterTimerEvent( gg_trg_ScoEffect, 0.03, true )
call TriggerAddAction( gg_trg_ScoEffect, function Trig_ScoEffect_Actions )
endfunction
function Trig_ScoDamage_Conditions takes nothing returns boolean
if ( not ( udg_ScorpTalent1 == true ) ) then
return false
endif
return true
endfunction
function SandDamCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00C_0050)) == true)
return b1 and b2
endfunction
function SandDamAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
local real x = 0.4*(GetHeroInt(gg_unit_H00C_0050, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00A_0048))] + 100)
call UnitDamageTarget(gg_unit_H00C_0050, u, x, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function Trig_ScoDamage_Actions takes nothing returns nothing
local group g = CreateGroup()
call GroupEnumUnitsInRangeOfLoc(g, udg_SandLoc, 400, Condition(function SandDamCheck1))
call ForGroup(g, function SandDamAct1)
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_ScoDamage takes nothing returns nothing
set gg_trg_ScoDamage = CreateTrigger( )
call DisableTrigger( gg_trg_ScoDamage )
call TriggerRegisterTimerEvent( gg_trg_ScoDamage, 1.00, true )
call TriggerAddCondition( gg_trg_ScoDamage, Condition( function Trig_ScoDamage_Conditions ) )
call TriggerAddAction( gg_trg_ScoDamage, function Trig_ScoDamage_Actions )
endfunction
function Trig_ScoPoison_Conditions takes nothing returns boolean
return (GetUnitAbilityLevel(gg_unit_H00C_0050, 'A01I') >= 1 )
endfunction
function Trig_ScoPoison_Actions takes nothing returns nothing
local real x = 0.01*(GetHeroInt(gg_unit_H00C_0050, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00C_0050))] + 100)
local real a = x*(9*GetUnitAbilityLevel(gg_unit_H00C_0050, 'A01I'))
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00C_0050, 'A01I'), ABILITY_RLF_DAMAGE_PER_SECOND_POI1, 0, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00C_0050, 'A01I'), ABILITY_RLF_DAMAGE_PER_SECOND_POI1, 1, a )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00C_0050, 'A01I'), ABILITY_RLF_DAMAGE_PER_SECOND_POI1, 2, a )
endfunction
//===========================================================================
function InitTrig_ScoPoison takes nothing returns nothing
set gg_trg_ScoPoison = CreateTrigger( )
call TriggerRegisterTimerEvent( gg_trg_ScoPoison, 1.00, true )
call TriggerAddCondition( gg_trg_ScoPoison, Condition( function Trig_ScoPoison_Conditions ) )
call TriggerAddAction( gg_trg_ScoPoison, function Trig_ScoPoison_Actions )
endfunction
function Trig_ScoStrike_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01J' ) ) then
return false
endif
return true
endfunction
function SandCheck9 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00C_0050)) == true)
return b1 and b2
endfunction
function SandAct9 takes nothing returns nothing
local unit u = GetEnumUnit()
call UnitAddAbility(u ,'Amrf' )
call UnitRemoveAbility(u ,'Amrf' )
set u = null
endfunction
function Trig_ScoStrike_Actions takes nothing returns nothing
local location l = GetUnitLoc(gg_unit_H00C_0050)
set udg_SandN = 50
call GroupClear(udg_SandGroup)
call GroupEnumUnitsInRangeOfLoc(udg_SandGroup, l, 350, Condition(function SandCheck9))
call ForGroup(udg_SandGroup, function SandAct9)
call EnableTrigger(gg_trg_ScoFall)
endfunction
//===========================================================================
function InitTrig_ScoStrike takes nothing returns nothing
set gg_trg_ScoStrike = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_ScoStrike, gg_unit_H00C_0050, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ScoStrike, Condition( function Trig_ScoStrike_Conditions ) )
call TriggerAddAction( gg_trg_ScoStrike, function Trig_ScoStrike_Actions )
endfunction
function SandAct11 takes nothing returns nothing
local unit u = GetEnumUnit()
local location l = GetUnitLoc(u)
local real a = GetUnitFlyHeight(u) + udg_SandN
local effect e
local real x = 5*(GetHeroInt(gg_unit_H00C_0050, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00C_0050))] + 100)
call SetUnitFlyHeight( u, a, 99999 )
if (GetUnitFlyHeight(u) <= (GetUnitDefaultFlyHeight(u)+30)) then
call SetUnitFlyHeight( u, GetUnitDefaultFlyHeight(u), 99999 )
call GroupRemoveUnit(udg_SandGroup, u)
call UnitDamageTarget(gg_unit_H00C_0050, u, x, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set e = AddSpecialEffectLoc("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl", l)
call DestroyEffect(e)
endif
set u = null
set e = null
call RemoveLocation(l)
set l = null
endfunction
function Trig_ScoFall_Actions takes nothing returns nothing
local unit u
set udg_SandN = udg_SandN - 2
call ForGroup(udg_SandGroup, function SandAct11)
set u = FirstOfGroup(udg_SandGroup)
if (u == null) then
call DisableTrigger( gg_trg_ScoFall )
call DisplayTextToForce( GetPlayersAll(), "1" )
endif
set u = null
endfunction
//===========================================================================
function InitTrig_ScoFall takes nothing returns nothing
set gg_trg_ScoFall = CreateTrigger( )
call DisableTrigger( gg_trg_ScoFall )
call TriggerRegisterTimerEvent( gg_trg_ScoFall, 0.03, true )
call TriggerAddAction( gg_trg_ScoFall, function Trig_ScoFall_Actions )
endfunction
function Trig_SandArmor_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevel(gg_unit_H00C_0050, 'A04I') >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_SandArmor_Actions takes nothing returns nothing
local real a = GetEventDamage()
if (GetUnitAbilityLevel(gg_unit_H00C_0050, 'A04I') == 1) then
set a = a - 7
endif
if (GetUnitAbilityLevel(gg_unit_H00C_0050, 'A04I') == 2) then
set a = a - 14
endif
if (GetUnitAbilityLevel(gg_unit_H00C_0050, 'A04I') == 3) then
set a = a - 21
endif
if (a < 1) then
set a = 1
endif
call BlzSetEventDamage( a )
endfunction
//===========================================================================
function InitTrig_SandArmor takes nothing returns nothing
set gg_trg_SandArmor = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_SandArmor, gg_unit_H00C_0050, EVENT_UNIT_DAMAGED )
call TriggerAddCondition( gg_trg_SandArmor, Condition( function Trig_SandArmor_Conditions ) )
call TriggerAddAction( gg_trg_SandArmor, function Trig_SandArmor_Actions )
endfunction
function Trig_ChiefStun_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01C' ) ) then
return false
endif
return true
endfunction
function ChiefCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00B_0049)) == true)
return b1 and b2
endfunction
function ChiefAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
local real x = 0.01*(GetHeroInt(gg_unit_H00B_0049, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00B_0049))] + 100)
local real a = x*(50 + 50*GetUnitAbilityLevel(gg_unit_H00B_0049, 'A01C'))
call UnitDamageTarget(gg_unit_H00B_0049, u, a, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function Trig_ChiefStun_Actions takes nothing returns nothing
local unit u = gg_unit_H00B_0049
local location l = GetUnitLoc(u)
local group g = CreateGroup()
local integer i = 2 + GetUnitAbilityLevel(gg_unit_H00B_0049, 'A01C')
call GroupEnumUnitsInRangeOfLoc(g, l, 400, Condition(function ChiefCheck1))
call ForGroup(g, function ChiefAct1)
call TerrainDeformCrater(GetLocationX(l), GetLocationY(l), 400, 300, 1, true)
call PolledWait(I2R(i))
call TerrainDeformCrater(GetLocationX(l), GetLocationY(l), 400, -300, 1, true)
set u = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_ChiefStun takes nothing returns nothing
set gg_trg_ChiefStun = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_ChiefStun, gg_unit_H00B_0049, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ChiefStun, Condition( function Trig_ChiefStun_Conditions ) )
call TriggerAddAction( gg_trg_ChiefStun, function Trig_ChiefStun_Actions )
endfunction
function Trig_ChiefRegen_Conditions takes nothing returns boolean
return (GetUnitAbilityLevel(gg_unit_H00B_0049, 'A01E') >= 1 )
endfunction
function Trig_ChiefRegen_Actions takes nothing returns nothing
local real a = 0.01*GetUnitState(gg_unit_H00B_0049, UNIT_STATE_MAX_LIFE)
local real b = GetUnitState(gg_unit_H00B_0049, UNIT_STATE_LIFE) + a*0.25
call SetUnitState(gg_unit_H00B_0049 ,UNIT_STATE_LIFE, b)
endfunction
//===========================================================================
function InitTrig_ChiefRegen takes nothing returns nothing
set gg_trg_ChiefRegen = CreateTrigger( )
call TriggerRegisterTimerEvent( gg_trg_ChiefRegen, 0.25, true )
call TriggerAddCondition( gg_trg_ChiefRegen, Condition( function Trig_ChiefRegen_Conditions ) )
call TriggerAddAction( gg_trg_ChiefRegen, function Trig_ChiefRegen_Actions )
endfunction
function Trig_StarFall_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A016' ) ) then
return false
endif
return true
endfunction
function StarCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00A_0048)) == true)
return b1 and b2
endfunction
function StarAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\NightElf\\Starfall\\StarfallTarget.mdl" , u, "origin")
call DestroyEffect(e)
set u = null
set e = null
endfunction
function StarAct12 takes nothing returns nothing
local unit u = GetEnumUnit()
local real x = 0.01*(GetHeroInt(gg_unit_H00A_0048, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00A_0048))] + 100)
local real a = x*(50*GetUnitAbilityLevel(gg_unit_H00A_0048, 'A016'))
if (udg_StarTalent1 == true) then
set a = a*1.5
endif
call UnitDamageTarget(gg_unit_H00A_0048, u, a, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function Trig_StarFall_Actions takes nothing returns nothing
local unit u = gg_unit_H00A_0048
local location l = GetUnitLoc(u)
local group g = CreateGroup()
call GroupEnumUnitsInRangeOfLoc(g, l, 400, Condition(function StarCheck1))
call ForGroup(g, function StarAct1)
call PolledWait(0.8)
call ForGroup(g, function StarAct12)
set u = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_StarFall takes nothing returns nothing
set gg_trg_StarFall = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_StarFall, gg_unit_H00A_0048, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_StarFall, Condition( function Trig_StarFall_Conditions ) )
call TriggerAddAction( gg_trg_StarFall, function Trig_StarFall_Actions )
endfunction
function Trig_StarMirror_Conditions takes nothing returns boolean
return (GetUnitAbilityLevel(gg_unit_H00A_0048, 'A017') >= 1 )
endfunction
function StarCheck4 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00A_0048)) == true)
return b1 and b2
endfunction
function StarAct4 takes nothing returns nothing
local unit u = GetEnumUnit()
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathPact\\DeathPactCaster.mdl" , u, "origin")
call UnitDamageTarget(gg_unit_H00A_0048, u, udg_StarDamage, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(e)
set u = null
set e = null
endfunction
function Trig_StarMirror_Actions takes nothing returns nothing
local integer i = GetRandomInt(1, 100)
local location l = GetUnitLoc(gg_unit_H00A_0048)
local group g = CreateGroup()
local effect e
set udg_StarDamage = GetEventDamage()
if (i <= (9 + 6*GetUnitAbilityLevel(gg_unit_H00A_0048, 'A017'))) then
call GroupEnumUnitsInRangeOfLoc(g, l, 300, Condition(function StarCheck4))
call ForGroup(g, function StarAct4)
call BlzSetEventDamage( 0.0 )
set e = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\DeathPact\\DeathPactCaster.mdl" , gg_unit_H00A_0048, "origin")
call DestroyEffect(e)
endif
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
set e = null
endfunction
//===========================================================================
function InitTrig_StarMirror takes nothing returns nothing
set gg_trg_StarMirror = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_StarMirror, gg_unit_H00A_0048, EVENT_UNIT_DAMAGED )
call TriggerAddCondition( gg_trg_StarMirror, Condition( function Trig_StarMirror_Conditions ) )
call TriggerAddAction( gg_trg_StarMirror, function Trig_StarMirror_Actions )
endfunction
function Trig_StarIllusion_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'u009' ) ) then
return false
endif
return true
endfunction
function Trig_StarIllusion_Actions takes nothing returns nothing
local unit u = GetSummonedUnit()
local real b = GetHeroAgi(gg_unit_H00A_0048, true) + BlzGetUnitBaseDamage(gg_unit_H00A_0048, 0)
local real a = b*(0.4 + 0.2*GetUnitAbilityLevel(gg_unit_H00A_0048, 'A019'))
call BlzSetUnitBaseDamage( u, R2I(a), 0 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A018'), ABILITY_RLF_CHANCE_TO_CRITICAL_STRIKE, 0, (udg_CritHit[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00A_0048))] + GetHeroAgi(gg_unit_H00A_0048, true)) )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A018'), ABILITY_RLF_DAMAGE_MULTIPLIER_OCR2, 0, udg_CritDamage[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H00A_0048))] )
endfunction
//===========================================================================
function InitTrig_StarIllusion takes nothing returns nothing
set gg_trg_StarIllusion = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_StarIllusion, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_StarIllusion, Condition( function Trig_StarIllusion_Conditions ) )
call TriggerAddAction( gg_trg_StarIllusion, function Trig_StarIllusion_Actions )
endfunction
function Trig_StarQuasar_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01A' ) ) then
return false
endif
return true
endfunction
function Trig_StarQuasar_Actions takes nothing returns nothing
local unit u
local real a
set udg_StarPoint = 0
set udg_StarLoc = GetSpellTargetLoc()
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H00A_0048), 'u00A', udg_StarLoc, bj_UNIT_FACING)
call EnableTrigger(gg_trg_StarPeriod)
call PolledWait(25.0)
call DisableTrigger(gg_trg_StarPeriod)
set a = GetUnitState(gg_unit_H00A_0048, UNIT_STATE_LIFE)
call ModifyHeroStat( bj_HEROSTAT_STR, gg_unit_H00A_0048, bj_MODIFYMETHOD_SUB, udg_StarPoint )
call ModifyHeroStat( bj_HEROSTAT_AGI, gg_unit_H00A_0048, bj_MODIFYMETHOD_SUB, udg_StarPoint )
call ModifyHeroStat( bj_HEROSTAT_INT, gg_unit_H00A_0048, bj_MODIFYMETHOD_SUB, udg_StarPoint )
call SetUnitState(gg_unit_H00A_0048, UNIT_STATE_LIFE, a)
call RemoveUnit(u)
set u = null
endfunction
//===========================================================================
function InitTrig_StarQuasar takes nothing returns nothing
set gg_trg_StarQuasar = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_StarQuasar, gg_unit_H00A_0048, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_StarQuasar, Condition( function Trig_StarQuasar_Conditions ) )
call TriggerAddAction( gg_trg_StarQuasar, function Trig_StarQuasar_Actions )
endfunction
function StarCheck8 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H00A_0048)) == true)
return b1 and b2
endfunction
function StarAct8 takes nothing returns nothing
local unit u = GetEnumUnit()
local real x = 0.01*GetUnitState(u, UNIT_STATE_MAX_LIFE)
call UnitDamageTarget(gg_unit_H00A_0048, u, x, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function Trig_StarPeriod_Actions takes nothing returns nothing
local unit u = gg_unit_H00A_0048
local location l = GetUnitLoc(u)
local real x = GetLocationX(l) - GetLocationX(udg_StarLoc)
local real y = GetLocationX(l) - GetLocationX(udg_StarLoc)
local real z = SquareRoot(x * x + y * y)
local effect e
local group g = CreateGroup()
if (z <= 350) then
set udg_StarPoint = udg_StarPoint + 1
set e = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\ReplenishMana\\SpiritTouchTarget.mdl" , u, "origin")
call DestroyEffect(e)
call ModifyHeroStat( bj_HEROSTAT_STR, gg_unit_H00A_0048, bj_MODIFYMETHOD_ADD, 1 )
call ModifyHeroStat( bj_HEROSTAT_AGI, gg_unit_H00A_0048, bj_MODIFYMETHOD_ADD, 1 )
call ModifyHeroStat( bj_HEROSTAT_INT, gg_unit_H00A_0048, bj_MODIFYMETHOD_ADD, 1 )
endif
call GroupEnumUnitsInRangeOfLoc(g, udg_StarLoc, 350, Condition(function StarCheck8))
call ForGroup(g, function StarAct8)
set e = null
set u = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_StarPeriod takes nothing returns nothing
set gg_trg_StarPeriod = CreateTrigger( )
call DisableTrigger( gg_trg_StarPeriod )
call TriggerRegisterTimerEventPeriodic( gg_trg_StarPeriod, 1.00 )
call TriggerAddAction( gg_trg_StarPeriod, function Trig_StarPeriod_Actions )
endfunction
function Trig_IceNova_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00X' ) ) then
return false
endif
return true
endfunction
function IceCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H009_0047)) == true)
return b1 and b2
endfunction
function IceAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
local location l = GetUnitLoc(u)
local unit u2 = gg_unit_H009_0047
local unit u3 = CreateUnitAtLoc(GetOwningPlayer(u2), 'u000', l, bj_UNIT_FACING)
local real r =(GetHeroInt(gg_unit_H009_0047, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H009_0047))] + 100)*0.01
local real b = r*(50+75*GetUnitAbilityLevel(gg_unit_H009_0047, 'A00X'))
call UnitAddAbility(u3, 'A00Y')
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u3, 'A00Y'), ABILITY_RLF_SPECIFIC_TARGET_DAMAGE_UFN2, 0, b )
call IssueTargetOrder(u3, "frostnova", u)
set u = null
set u2 = null
set u3 = null
call RemoveLocation(l)
set l = null
endfunction
function Trig_IceNova_Actions takes nothing returns nothing
local unit u = gg_unit_H009_0047
local group g = CreateGroup()
local real x
local real y
local real a = 0
local location l = GetSpellTargetLoc()
local location l2
local unit u2
call GroupEnumUnitsInRangeOfLoc(g, l, 425, Condition(function IceCheck1))
call ForGroup(g, function IceAct1)
loop
exitwhen a > 20
set a = a + 1
set x = GetLocationX(l) + 400 * Cos(a * 0.3141)
set y = GetLocationY(l) + 400 * Sin(a * 0.3141)
set l2 = Location(x,y)
set u2 = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H009_0047), 'u000', l, a*18)
call UnitAddAbility(u2, 'A00Z')
call IssuePointOrderLoc( u2, "breathoffrost", l2 )
set u2 = null
call RemoveLocation(l2)
set l2 = null
endloop
set u = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_IceNova takes nothing returns nothing
set gg_trg_IceNova = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_IceNova, gg_unit_H009_0047, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_IceNova, Condition( function Trig_IceNova_Conditions ) )
call TriggerAddAction( gg_trg_IceNova, function Trig_IceNova_Actions )
endfunction
function Trig_IceArmor_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A010' ) ) then
return false
endif
return true
endfunction
function Trig_IceArmor_Actions takes nothing returns nothing
local location l = GetUnitLoc(gg_unit_H009_0047)
local unit u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H009_0047), 'u000', l, bj_UNIT_FACING)
local integer a = 2 + 2*GetUnitAbilityLevel(gg_unit_H009_0047, 'A010')
call UnitAddAbility(u, 'A011')
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A011'), ABILITY_RLF_ARMOR_BONUS_UFA2, 0, a)
call IssueTargetOrder(u, "frostarmor", gg_unit_H009_0047)
endfunction
//===========================================================================
function InitTrig_IceArmor takes nothing returns nothing
set gg_trg_IceArmor = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_IceArmor, gg_unit_H009_0047, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_IceArmor, Condition( function Trig_IceArmor_Conditions ) )
call TriggerAddAction( gg_trg_IceArmor, function Trig_IceArmor_Actions )
endfunction
function Trig_IceFrozen_Conditions takes nothing returns boolean
local boolean b1 =( IsUnitType(GetAttacker(), UNIT_TYPE_MELEE_ATTACKER) == true )
local boolean b2 = (GetUnitAbilityLevel(gg_unit_H009_0047, 'BUfa') >= 1 )
return b1 and b2
endfunction
function Trig_IceFrozen_Actions takes nothing returns nothing
local unit u = GetAttacker()
local location l = GetUnitLoc(gg_unit_H009_0047)
local unit u2
local integer i = GetRandomInt(1, 100)
if ( i <= (10+4*GetUnitAbilityLevel(gg_unit_H009_0047, 'A010')) ) then
set u2 = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H009_0047), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u2, 'A012')
call IssueTargetOrder(u2, "entanglingroots", u)
endif
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_IceFrozen takes nothing returns nothing
set gg_trg_IceFrozen = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_IceFrozen, gg_unit_H009_0047, EVENT_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_IceFrozen, Condition( function Trig_IceFrozen_Conditions ) )
call TriggerAddAction( gg_trg_IceFrozen, function Trig_IceFrozen_Actions )
endfunction
function Trig_IceStorm_Conditions takes nothing returns boolean
local boolean b1 = (GetAttacker() == gg_unit_H009_0047 )
local boolean b2 = (GetUnitAbilityLevel(gg_unit_H009_0047, 'A013') >= 1 )
return b1 and b2
endfunction
function Trig_IceStorm_Actions takes nothing returns nothing
local unit u0 = GetTriggerUnit()
local unit u = GetAttacker()
local unit u2
local location l = GetUnitLoc(u0)
local real r =(GetHeroInt(gg_unit_H009_0047, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H009_0047))] + 100)*0.01
local integer i = GetRandomInt(1, 100)
local real b = r*(10+50*GetUnitAbilityLevel(gg_unit_H009_0047, 'A013'))
local real x
if (udg_IceTalent1 == true) then
set x = 25
else
set x = 15
endif
if (i <= x) then
set u2 = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H009_0047), 'u000', l, 0)
call UnitAddAbility(u2, 'A014')
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u2, 'A014'), ABILITY_RLF_DAMAGE_HBZ2, 0, b )
call IssuePointOrderLoc( u2, "blizzard", l )
endif
set u = null
set u2 = null
set u0 = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_IceStorm takes nothing returns nothing
set gg_trg_IceStorm = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_IceStorm, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_IceStorm, Condition( function Trig_IceStorm_Conditions ) )
call TriggerAddAction( gg_trg_IceStorm, function Trig_IceStorm_Actions )
endfunction
function Trig_IcePrizon_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A015' ) ) then
return false
endif
return true
endfunction
function IceCheck4 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H009_0047)) == true)
return b1 and b2
endfunction
function IceAct4 takes nothing returns nothing
local unit u = GetEnumUnit()
local location l = GetUnitLoc(u)
local unit u2 = gg_unit_H009_0047
local unit u3 = CreateUnitAtLoc(GetOwningPlayer(u2), 'u000', l, bj_UNIT_FACING)
local real r =(GetHeroInt(gg_unit_H009_0047, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H009_0047))] + 100)*0.01
local real b = 60*r
call UnitAddAbility(u3, 'A012')
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u3, 'A012'), ABILITY_RLF_DAMAGE_PER_SECOND_EER1, 0, b )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u3, 'A012'), ABILITY_RLF_DURATION_HERO, 0, 8 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u3, 'A012'), ABILITY_RLF_DURATION_NORMAL, 0, 8 )
call IssueTargetOrder(u3, "entanglingroots", u)
set u = null
set u2 = null
set u3 = null
call RemoveLocation(l)
set l = null
endfunction
function Trig_IcePrizon_Actions takes nothing returns nothing
local unit u = gg_unit_H009_0047
local group g = CreateGroup()
local location l = GetUnitLoc(u)
call GroupEnumUnitsInRangeOfLoc(g, l, 600, Condition(function IceCheck4))
call ForGroup(g, function IceAct4)
set u = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_IcePrizon takes nothing returns nothing
set gg_trg_IcePrizon = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_IcePrizon, gg_unit_H009_0047, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_IcePrizon, Condition( function Trig_IcePrizon_Conditions ) )
call TriggerAddAction( gg_trg_IcePrizon, function Trig_IcePrizon_Actions )
endfunction
function Trig_PitImpale_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00T' ) ) then
return false
endif
return true
endfunction
function Trig_PitImpale_Actions takes nothing returns nothing
local location l = GetSpellTargetLoc()
local location l2
local unit u
local integer a = 1
local real x
local real y
local real r =(GetHeroInt(gg_unit_H008_0043, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H008_0043))] + 100)*0.01
local real b = r*(45+80*GetUnitAbilityLevel(gg_unit_H008_0043, 'A00T'))
loop
exitwhen a > 20
set a = a + 1
set x = GetLocationX(l) + 300 * Cos(a * 0.3141)
set y = GetLocationY(l) + 300 * Sin(a * 0.3141)
set l2 = Location(x,y)
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H008_0043), 'u000', l, a*18)
call UnitAddAbility(u, 'A00S')
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A00S'), ABILITY_RLF_DAMAGE_DEALT_UIM3, 0, b )
if (udg_PitTalent1 == true ) then
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A00S'), ABILITY_RLF_DURATION_NORMAL, 0, 4.50 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A00S'), ABILITY_RLF_DURATION_HERO, 0, 4.50 )
endif
call IssuePointOrderLoc( u, "impale", l2 )
set u = null
call RemoveLocation(l2)
set l2 = null
endloop
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_PitImpale takes nothing returns nothing
set gg_trg_PitImpale = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_PitImpale, gg_unit_H008_0043, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_PitImpale, Condition( function Trig_PitImpale_Conditions ) )
call TriggerAddAction( gg_trg_PitImpale, function Trig_PitImpale_Actions )
endfunction
function Trig_PitCourpse_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00V' ) ) then
return false
endif
return true
endfunction
function PitCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) < 0.405)
local boolean b2 = (IsUnitIdType(GetUnitTypeId(GetFilterUnit()), UNIT_TYPE_HERO) == false )
return b1 and b2
endfunction
function PitCheck2 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H008_0043)) == true)
return b1 and b2
endfunction
function PitAct2 takes nothing returns nothing
local unit u = GetEnumUnit()
local real a = (GetHeroInt(gg_unit_H008_0043, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H008_0043))] + 100)*0.01
local real x = a*(30 + 40*GetUnitAbilityLevel(gg_unit_H008_0043, 'A00V'))
call UnitDamageTarget(gg_unit_H008_0043, u, x, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function PitAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
local location l = GetUnitLoc(u)
local effect e = AddSpecialEffectLoc("Abilities\\Spells\\Other\\Incinerate\\FireLordDeathExplode.mdl", l)
local group g = CreateGroup()
call GroupEnumUnitsInRangeOfLoc(g, l, 250, Condition(function PitCheck2))
call ForGroup(g, function PitAct2)
call DestroyEffect(e)
call RemoveUnit(u)
set u = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
set e = null
endfunction
function Trig_PitCourpse_Actions takes nothing returns nothing
local unit u = gg_unit_H008_0043
local location l = GetUnitLoc(u)
local group g = CreateGroup()
call GroupEnumUnitsInRangeOfLoc(g, l, 500, Condition(function PitCheck1))
call ForGroup(g, function PitAct1)
set u = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
set u = null
endfunction
//===========================================================================
function InitTrig_PitCourpse takes nothing returns nothing
set gg_trg_PitCourpse = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_PitCourpse, gg_unit_H008_0043, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_PitCourpse, Condition( function Trig_PitCourpse_Conditions ) )
call TriggerAddAction( gg_trg_PitCourpse, function Trig_PitCourpse_Actions )
endfunction
function Trig_NecArmy_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00M' ) ) then
return false
endif
return true
endfunction
function Trig_NecArmy_Actions takes nothing returns nothing
local location l = GetSpellTargetLoc()
local location l2
local real x
local real y
local real a = 1 + 2*GetUnitAbilityLevel(gg_unit_H007_0042, 'A00M')
local real b = 0
local real r = (GetHeroInt(gg_unit_H007_0042, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H007_0042))] + 100)*0.01
local unit u
local integer i
local effect e
loop
exitwhen b >= a
set b = b + 1
call PolledWait(0.5)
set i = GetRandomInt(1, 100)
if (i <= 33) then
set x = GetLocationX(l) + GetRandomReal(-225, 225)
set y = GetLocationY(l) + GetRandomReal(-225, 225)
set l2 = Location(x,y)
set e = AddSpecialEffectLoc("Objects\\Spawnmodels\\NightElf\\EntBirthTarget\\EntBirthTarget.mdl", l2)
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H007_0042), 'u003', l2, GetRandomReal(0,360))
if (udg_NecrTalent1 == true) then
call BlzSetUnitMaxHP(u, R2I(2*GetUnitState(u, UNIT_STATE_MAX_LIFE)))
call SetUnitState(u, UNIT_STATE_LIFE, GetUnitState(u, UNIT_STATE_MAX_LIFE))
endif
call BlzSetUnitBaseDamage( u, R2I(15*r), 0 )
call UnitApplyTimedLife( u, 'BTLF', 60 )
call DestroyEffect(e)
set u = null
call RemoveLocation(l2)
set l2 = null
endif
if ((i <= 66) and (i >= 34)) then
set x = GetLocationX(l) + GetRandomReal(-225, 225)
set y = GetLocationY(l) + GetRandomReal(-225, 225)
set l2 = Location(x,y)
set e = AddSpecialEffectLoc("Objects\\Spawnmodels\\NightElf\\EntBirthTarget\\EntBirthTarget.mdl", l2)
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H007_0042), 'u004', l2, GetRandomReal(0,360))
if (udg_NecrTalent1 == true) then
call BlzSetUnitMaxHP(u, R2I(2*GetUnitState(u, UNIT_STATE_MAX_LIFE)))
call SetUnitState(u, UNIT_STATE_LIFE, GetUnitState(u, UNIT_STATE_MAX_LIFE))
endif
call BlzSetUnitBaseDamage( u, R2I(21*r), 0 )
call UnitApplyTimedLife( u, 'BTLF', 60 )
call DestroyEffect(e)
set u = null
call RemoveLocation(l2)
set l2 = null
endif
if ((i <= 98) and (i >= 67)) then
set x = GetLocationX(l) + GetRandomReal(-225, 225)
set y = GetLocationY(l) + GetRandomReal(-225, 225)
set l2 = Location(x,y)
set e = AddSpecialEffectLoc("Objects\\Spawnmodels\\NightElf\\EntBirthTarget\\EntBirthTarget.mdl", l2)
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H007_0042), 'u005', l2, GetRandomReal(0,360))
if (udg_NecrTalent1 == true) then
call BlzSetUnitMaxHP(u, R2I(2*GetUnitState(u, UNIT_STATE_MAX_LIFE)))
call SetUnitState(u, UNIT_STATE_LIFE, GetUnitState(u, UNIT_STATE_MAX_LIFE))
endif
call BlzSetUnitBaseDamage( u, R2I(21*r), 0 )
call UnitApplyTimedLife( u, 'BTLF', 60 )
call DestroyEffect(e)
set u = null
call RemoveLocation(l2)
set l2 = null
endif
if (i >= 99) then
set x = GetLocationX(l) + GetRandomReal(-225, 225)
set y = GetLocationY(l) + GetRandomReal(-225, 225)
set l2 = Location(x,y)
set e = AddSpecialEffectLoc("Objects\\Spawnmodels\\NightElf\\EntBirthTarget\\EntBirthTarget.mdl", l2)
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H007_0042), 'u006', l2, GetRandomReal(0,360))
if (udg_NecrTalent1 == true) then
call BlzSetUnitMaxHP(u, R2I(2*GetUnitState(u, UNIT_STATE_MAX_LIFE)))
call SetUnitState(u, UNIT_STATE_LIFE, GetUnitState(u, UNIT_STATE_MAX_LIFE))
endif
call BlzSetUnitBaseDamage( u, R2I(83*r), 0 )
call UnitApplyTimedLife( u, 'BTLF', 60 )
call DestroyEffect(e)
set u = null
call RemoveLocation(l2)
set l2 = null
endif
endloop
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_NecArmy takes nothing returns nothing
set gg_trg_NecArmy = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_NecArmy, gg_unit_H007_0042, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_NecArmy, Condition( function Trig_NecArmy_Conditions ) )
call TriggerAddAction( gg_trg_NecArmy, function Trig_NecArmy_Actions )
endfunction
function Trig_NecPoison_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00O' ) ) then
return false
endif
return true
endfunction
function Trig_NecPoison_Actions takes nothing returns nothing
local location l = GetUnitLoc(gg_unit_H007_0042)
local location l2
local unit u
local integer a = 1
local real x
local real y
local real r =(GetHeroInt(gg_unit_H007_0042, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H007_0042))] + 100)*0.01
local real b = r*10*GetUnitAbilityLevel(gg_unit_H007_0042, 'A00O')
loop
exitwhen a > 20
set a = a + 1
set x = GetLocationX(l) + 600 * Cos(a * 0.3141)
set y = GetLocationY(l) + 600 * Sin(a * 0.3141)
set l2 = Location(x,y)
set u = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H007_0042), 'u007', l, a*18)
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u, 'A00N'), ABILITY_RLF_DAMAGE_PER_SECOND_APL2, 0, b )
call IssuePointOrderLoc( u, "move", l2 )
set u = null
call RemoveLocation(l2)
set l2 = null
endloop
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_NecPoison takes nothing returns nothing
set gg_trg_NecPoison = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_NecPoison, gg_unit_H007_0042, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_NecPoison, Condition( function Trig_NecPoison_Conditions ) )
call TriggerAddAction( gg_trg_NecPoison, function Trig_NecPoison_Actions )
endfunction
function Trig_NecCurse_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00R' ) ) then
return false
endif
return true
endfunction
function NecCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H007_0042)) == true)
return b1 and b2
endfunction
function NecAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
local location l = GetUnitLoc(u)
local unit u2 = gg_unit_H007_0042
local unit u3 = CreateUnitAtLoc(GetOwningPlayer(u2), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u3, 'A00Q')
call IssueTargetOrder(u3, "cripple", u)
set u = null
set u2 = null
set u3 = null
call RemoveLocation(l)
set l = null
endfunction
function Trig_NecCurse_Actions takes nothing returns nothing
local unit u = gg_unit_H007_0042
local group g = CreateGroup()
local location l = GetSpellTargetLoc()
call GroupEnumUnitsInRangeOfLoc(g, l, 250, Condition(function NecCheck1))
call ForGroup(g, function NecAct1)
set u = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_NecCurse takes nothing returns nothing
set gg_trg_NecCurse = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_NecCurse, gg_unit_H007_0042, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_NecCurse, Condition( function Trig_NecCurse_Conditions ) )
call TriggerAddAction( gg_trg_NecCurse, function Trig_NecCurse_Actions )
endfunction
function Trig_DruRoot_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00F' ) ) then
return false
endif
return true
endfunction
function DruCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H006_0027)) == true)
return b1 and b2
endfunction
function DruAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
local location l = GetUnitLoc(u)
local unit u2 = gg_unit_H006_0027
local unit u3
local real a = (GetHeroInt(u2, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(u2))] + 100)*0.01
local real x = a*(10 + 20*GetUnitAbilityLevel(u2, 'A00F'))
set u3 = CreateUnitAtLoc(GetOwningPlayer(u2), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u3, 'A00G')
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u3, 'A00G'), ABILITY_RLF_DAMAGE_PER_SECOND_EER1, 0, x )
if (udg_DruidTalent1 == true) then
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u3, 'A00G'), ABILITY_RLF_DURATION_NORMAL, 0, 5.00 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(u3, 'A00G'), ABILITY_RLF_DURATION_HERO, 0, 5.00 )
endif
call IssueTargetOrder(u3, "entanglingroots", u)
set u = null
set u2 = null
set u3 = null
call RemoveLocation(l)
set l = null
endfunction
function Trig_DruRoot_Actions takes nothing returns nothing
local unit u = gg_unit_H006_0027
local location l = GetSpellTargetLoc()
local group g = CreateGroup()
call GroupEnumUnitsInRangeOfLoc(g, l, 325, Condition(function DruCheck1))
call ForGroup(g, function DruAct1)
set u = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
set u = null
endfunction
//===========================================================================
function InitTrig_DruRoot takes nothing returns nothing
set gg_trg_DruRoot = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_DruRoot, gg_unit_H006_0027, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_DruRoot, Condition( function Trig_DruRoot_Conditions ) )
call TriggerAddAction( gg_trg_DruRoot, function Trig_DruRoot_Actions )
endfunction
function Trig_DruLight_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A00H', gg_unit_H006_0027) >= 1 ) ) then
return false
endif
return true
endfunction
function Trig_DruLight_Actions takes nothing returns nothing
local real a = (GetHeroInt(gg_unit_H006_0027, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H006_0027))] + 100)*0.01
local real x1 = 90*a
local real x2 = 175*a
local real x3 = 260*a
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H006_0027, 'A00H'), ABILITY_RLF_DAMAGE_PER_TARGET_OCL1, 0, x1 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H006_0027, 'A00H'), ABILITY_RLF_DAMAGE_PER_TARGET_OCL1, 1, x2 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H006_0027, 'A00H'), ABILITY_RLF_DAMAGE_PER_TARGET_OCL1, 2, x3 )
endfunction
//===========================================================================
function InitTrig_DruLight takes nothing returns nothing
set gg_trg_DruLight = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_DruLight, 1.00 )
call TriggerAddCondition( gg_trg_DruLight, Condition( function Trig_DruLight_Conditions ) )
call TriggerAddAction( gg_trg_DruLight, function Trig_DruLight_Actions )
endfunction
function Trig_DruWind_Conditions takes nothing returns boolean
local boolean b1 =( IsUnitType(GetAttacker(), UNIT_TYPE_MELEE_ATTACKER) == true )
local boolean b2 =( GetUnitAbilityLevel(gg_unit_H006_0027, 'A00I') >= 1 )
return b1 and b2
endfunction
function Trig_DruWind_Actions takes nothing returns nothing
local integer i = GetRandomInt(1, 100)
local unit u = GetAttacker()
local unit u2
local location l = GetUnitLoc(u)
if (i <= (6 + 4*GetUnitAbilityLevel(gg_unit_H006_0027, 'A00I'))) then
set u2 = CreateUnitAtLoc(GetOwningPlayer(gg_unit_H006_0027), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u2, 'A00J')
call IssueTargetOrder(u2, "cyclone", u)
endif
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
endfunction
//===========================================================================
function InitTrig_DruWind takes nothing returns nothing
set gg_trg_DruWind = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_DruWind, gg_unit_H006_0027, EVENT_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_DruWind, Condition( function Trig_DruWind_Conditions ) )
call TriggerAddAction( gg_trg_DruWind, function Trig_DruWind_Actions )
endfunction
function Trig_DruGolem_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00K' ) ) then
return false
endif
return true
endfunction
function Trig_DruGolem_Actions takes nothing returns nothing
set udg_DruPoint = GetSpellTargetLoc()
set udg_DruNumber = 0
call GroupClear(udg_DruGroup)
call EnableTrigger( gg_trg_DruArena )
endfunction
//===========================================================================
function InitTrig_DruGolem takes nothing returns nothing
set gg_trg_DruGolem = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_DruGolem, gg_unit_H006_0027, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_DruGolem, Condition( function Trig_DruGolem_Conditions ) )
call TriggerAddAction( gg_trg_DruGolem, function Trig_DruGolem_Actions )
endfunction
function DruStoneCheck takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
return b1
endfunction
function DruArenaMove takes nothing returns nothing
local unit u = GetEnumUnit()
local location l = GetUnitLoc(u)
local real a = 15*udg_DruNumber - 180
local real x
local real y
local location l2
set x = GetLocationX(l) + 140 * Cos(a * 0.01745)
set y = GetLocationY(l) + 140 * Sin(a * 0.01745)
set l2 = Location(x,y)
call SetUnitPositionLoc(u, l2)
set u = null
call RemoveLocation(l2)
call RemoveLocation(l)
set l = null
set l2 = null
endfunction
function DruStone takes nothing returns nothing
local unit u = GetEnumUnit()
call RemoveUnit(u)
set u = null
endfunction
function Trig_DruArena_Actions takes nothing returns nothing
local location l
local real x
local real y
local unit u
local unit u2
local real a
local group g = CreateGroup()
local effect e
set udg_DruNumber = udg_DruNumber + 1
set a = 15*udg_DruNumber
set x = GetLocationX(udg_DruPoint) + 400 * Cos(a * 0.01745)
set y = GetLocationY(udg_DruPoint) + 400 * Sin(a * 0.01745)
set l = Location(x, y)
call GroupEnumUnitsInRangeOfLoc(g, l, 70, Condition(function DruStoneCheck))
set u2 = FirstOfGroup(g)
if (u2 != null) then
call ForGroup( g, function DruArenaMove )
endif
if (IsTerrainPathable(GetLocationX(l), GetLocationY(l), PATHING_TYPE_WALKABILITY) == false) then
set u = CreateUnitAtLoc(Player(PLAYER_NEUTRAL_PASSIVE), 'n001', l, GetRandomReal(0, 360))
call GroupAddUnit(udg_DruGroup, u)
set e = AddSpecialEffectLoc("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl", l)
call DestroyEffect(e)
endif
if (udg_DruNumber >= 24) then
call DisableTrigger( gg_trg_DruArena )
call PolledWait(19.00)
call ForGroup( udg_DruGroup, function DruStone )
endif
set u = null
set u2 = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
set e = null
endfunction
//===========================================================================
function InitTrig_DruArena takes nothing returns nothing
set gg_trg_DruArena = CreateTrigger( )
call DisableTrigger( gg_trg_DruArena )
call TriggerRegisterTimerEvent( gg_trg_DruArena, 0.08, true )
call TriggerAddAction( gg_trg_DruArena, function Trig_DruArena_Actions )
endfunction
function Trig_PirGold_Conditions takes nothing returns boolean
local boolean b1 =( GetOwningPlayer(gg_unit_H002_0022) != Player(PLAYER_NEUTRAL_PASSIVE))
local boolean b2 =( GetUnitAbilityLevel(gg_unit_H002_0022, 'A08J') >= 1 )
local boolean b3 =( GetUnitAbilityLevel(GetTriggerUnit(), 'Aloc') <= 0 )
return b1 and b2 and b3
endfunction
function Trig_PirGold_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local location l = GetUnitLoc(u)
local location l2 = GetUnitLoc(gg_unit_H002_0022)
local integer i = GetRandomInt(1, 100)
local real dx = GetLocationX(l2) - GetLocationX(l)
local real dy = GetLocationY(l2) - GetLocationY(l)
local real z = SquareRoot(dx * dx + dy * dy)
local integer a = 4 + 4*GetUnitAbilityLevel(gg_unit_H002_0022, 'A08J')
if ( (i <= a) and (z <= 1200) ) then
call CreateItemLoc( 'I04Q', l )
endif
call RemoveLocation(l)
set l = null
call RemoveLocation(l2)
set l2 = null
set u = null
endfunction
//===========================================================================
function InitTrig_PirGold takes nothing returns nothing
set gg_trg_PirGold = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_PirGold, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_PirGold, Condition( function Trig_PirGold_Conditions ) )
call TriggerAddAction( gg_trg_PirGold, function Trig_PirGold_Actions )
endfunction
function Trig_PirSummon_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'h003' ) ) then
return false
endif
return true
endfunction
function Trig_PirSummon_Actions takes nothing returns nothing
local unit u = GetSummonedUnit()
local real a = 0.3*(GetHeroInt(gg_unit_H002_0022, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H002_0022))] + 100)
call BlzSetUnitBaseDamage( u, R2I(a), 0 )
set u = null
endfunction
//===========================================================================
function InitTrig_PirSummon takes nothing returns nothing
set gg_trg_PirSummon = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_PirSummon, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_PirSummon, Condition( function Trig_PirSummon_Conditions ) )
call TriggerAddAction( gg_trg_PirSummon, function Trig_PirSummon_Actions )
endfunction
function Trig_PirSummon2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'h004' ) ) then
return false
endif
return true
endfunction
function Trig_PirSummon2_Actions takes nothing returns nothing
local unit u = GetSummonedUnit()
local real a = 0.51*(GetHeroInt(gg_unit_H002_0022, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H002_0022))] + 100)
call BlzSetUnitBaseDamage( u, R2I(a), 0 )
set u = null
endfunction
//===========================================================================
function InitTrig_PirSummon2 takes nothing returns nothing
set gg_trg_PirSummon2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_PirSummon2, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_PirSummon2, Condition( function Trig_PirSummon2_Conditions ) )
call TriggerAddAction( gg_trg_PirSummon2, function Trig_PirSummon2_Actions )
endfunction
function Trig_PirSummon3_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'h005' ) ) then
return false
endif
return true
endfunction
function Trig_PirSummon3_Actions takes nothing returns nothing
local unit u = GetSummonedUnit()
local real a = 0.69*(GetHeroInt(gg_unit_H002_0022, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H002_0022))] + 100)
call BlzSetUnitBaseDamage( u, R2I(a), 0 )
set u = null
endfunction
//===========================================================================
function InitTrig_PirSummon3 takes nothing returns nothing
set gg_trg_PirSummon3 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_PirSummon3, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_PirSummon3, Condition( function Trig_PirSummon3_Conditions ) )
call TriggerAddAction( gg_trg_PirSummon3, function Trig_PirSummon3_Actions )
endfunction
function Trig_PirShip_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00E' ) ) then
return false
endif
return true
endfunction
function Trig_PirShip_Actions takes nothing returns nothing
local unit u = gg_unit_H002_0022
set udg_PirLoc = GetSpellTargetLoc()
set udg_PirLoc2 = Location(GetLocationX(udg_PirLoc) - 500, GetLocationY(udg_PirLoc) + 500)
set udg_PirShip = CreateUnit(GetOwningPlayer(u), 'u001', (GetLocationX(udg_PirLoc2)-1000), (GetLocationY(udg_PirLoc2)-1000), 45)
call EnableTrigger(gg_trg_PirMove)
set u = null
endfunction
//===========================================================================
function InitTrig_PirShip takes nothing returns nothing
set gg_trg_PirShip = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_PirShip, gg_unit_H002_0022, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_PirShip, Condition( function Trig_PirShip_Conditions ) )
call TriggerAddAction( gg_trg_PirShip, function Trig_PirShip_Actions )
endfunction
function Trig_PirMove_Actions takes nothing returns nothing
local location l = GetUnitLoc(udg_PirShip)
local location l2 = Location(GetLocationX(l)+20, GetLocationY(l)+20)
local boolean b1 = (GetLocationY(udg_PirLoc2) - GetLocationY(l)) >= -25
local boolean b2 = (GetLocationY(udg_PirLoc2) - GetLocationY(l)) <= 25
if (b1 and b2) then
call DisableTrigger(gg_trg_PirMove)
call EnableTrigger(gg_trg_PirShot)
call SetUnitPositionLoc( udg_PirShip, udg_PirLoc2)
call PolledWait(2.0)
call DisableTrigger(gg_trg_PirShot)
call PolledWait(1.5)
call RemoveUnit(udg_PirShip)
else
call SetUnitPositionLoc( udg_PirShip, l2 )
endif
call RemoveLocation(l)
set l = null
call RemoveLocation(l2)
set l2 = null
endfunction
//===========================================================================
function InitTrig_PirMove takes nothing returns nothing
set gg_trg_PirMove = CreateTrigger( )
call DisableTrigger(gg_trg_PirMove)
call TriggerRegisterTimerEvent( gg_trg_PirMove, 0.02, true )
call TriggerAddAction( gg_trg_PirMove, function Trig_PirMove_Actions )
endfunction
function Trig_PirShot_Actions takes nothing returns nothing
local real x = GetLocationX(udg_PirLoc) + GetRandomReal(-350, 350)
local real y = GetLocationY(udg_PirLoc) + GetRandomReal(-350, 350)
local location l = Location(x, y)
local real a = 0.25*(GetHeroInt(gg_unit_H002_0022, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H002_0022))] + 100)
local unit u = CreateUnitAtLoc(GetOwningPlayer(udg_PirShip), 'u002', udg_PirLoc2, 315)
call BlzSetUnitBaseDamage( u, R2I(a), 0 )
call IssuePointOrderLoc( u, "attackground", l )
set u = null
endfunction
//===========================================================================
function InitTrig_PirShot takes nothing returns nothing
set gg_trg_PirShot = CreateTrigger( )
call DisableTrigger(gg_trg_PirShot)
call TriggerRegisterTimerEvent( gg_trg_PirShot, 0.03, true )
call TriggerAddAction( gg_trg_PirShot, function Trig_PirShot_Actions )
endfunction
function Trig_BerStrike_Conditions takes nothing returns boolean
local boolean b1 =( GetUnitAbilityLevel(gg_unit_H001_0012, 'B004') >= 1 )
local boolean b2 =( GetAttacker() == gg_unit_H001_0012)
return b1 and b2
endfunction
function TrigBerCon takes nothing returns boolean
local boolean b1 = ( GetEventDamageSource() == gg_unit_H001_0012 )
return b1
endfunction
function TrigBerAct takes nothing returns nothing
local unit u = GetTriggerUnit()
local unit u2 = GetEventDamageSource()
local unit u3
local location l = GetUnitLoc(u2)
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Other\\Incinerate\\FireLordDeathExplode.mdl" , u, "origin")
local real x = GetEventDamage()*(0.25+0.5*GetUnitAbilityLevel(gg_unit_H001_0012, 'A006') )
call DisableTrigger(udg_BerTrig)
call DestroyEffect(e)
call UnitRemoveAbility(u2, 'B004')
call UnitDamageTarget(u2, u, x, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS)
set u3 = CreateUnitAtLoc(GetOwningPlayer(u2), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u3, 'A007')
call IssueTargetOrder(u3, "creepthunderbolt", u)
set u = null
set u2 = null
set u3 = null
call RemoveLocation(l)
set l = null
set e = null
endfunction
function Trig_BerStrike_Actions takes nothing returns nothing
local unit u1 = GetAttacker()
local unit u2 = GetTriggerUnit()
local integer i = GetRandomInt(1,100)
call DestroyTrigger(udg_BerTrig)
set udg_BerTrig = CreateTrigger()
call TriggerRegisterUnitEvent( udg_BerTrig, u2, EVENT_UNIT_DAMAGED )
call TriggerAddCondition( udg_BerTrig, Condition( function TrigBerCon ) )
call TriggerAddAction( udg_BerTrig, function TrigBerAct )
set u1 = null
set u2 = null
endfunction
//===========================================================================
function InitTrig_BerStrike takes nothing returns nothing
set gg_trg_BerStrike = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BerStrike, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_BerStrike, Condition( function Trig_BerStrike_Conditions ) )
call TriggerAddAction( gg_trg_BerStrike, function Trig_BerStrike_Actions )
set udg_BerTrig = CreateTrigger()
endfunction
function Trig_BerUlt_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A009' ) ) then
return false
endif
return true
endfunction
function Trig_BerUlt_Actions takes nothing returns nothing
local effect e1 = AddSpecialEffectTarget("Abilities\\Weapons\\FireBallMissile\\FireBallMissile.mdl" , gg_unit_H001_0012, "hand left")
local effect e2 = AddSpecialEffectTarget("Abilities\\Weapons\\FireBallMissile\\FireBallMissile.mdl" , gg_unit_H001_0012, "hand right")
call TriggerSleepAction(1.00)
loop
exitwhen ( ( GetUnitAbilityLevel(gg_unit_H001_0012, 'BIpv') <= 0 ) )
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, 1.00))
endloop
call DestroyEffect(e1)
set e1 = null
call DestroyEffect(e2)
set e2 = null
endfunction
//===========================================================================
function InitTrig_BerUlt takes nothing returns nothing
set gg_trg_BerUlt = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_BerUlt, gg_unit_H001_0012, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_BerUlt, Condition( function Trig_BerUlt_Conditions ) )
call TriggerAddAction( gg_trg_BerUlt, function Trig_BerUlt_Actions )
endfunction
function Trig_BerRegen_Conditions takes nothing returns boolean
local boolean b1 =( GetUnitAbilityLevel(gg_unit_H001_0012, 'A00A') >= 1 )
local boolean b2 = (GetUnitState(gg_unit_H001_0012, UNIT_STATE_LIFE) >= 0.405)
return b1 and b2
endfunction
function Trig_BerRegen_Actions takes nothing returns nothing
local unit u = gg_unit_H001_0012
local real x = GetUnitState(u, UNIT_STATE_LIFE)
local real y = 1 - (x/GetUnitState(u, UNIT_STATE_MAX_LIFE))
local real r = x + 0.25*y*(5*GetUnitAbilityLevel(u, 'A00A'))
local real a = (0.3 + 0.3*GetUnitAbilityLevel(gg_unit_H001_0012, 'A00A'))*y*10
call SetUnitState(u, UNIT_STATE_LIFE, r)
call SetUnitAbilityLevel(u, 'A00B', R2I(a))
set u = null
endfunction
//===========================================================================
function InitTrig_BerRegen takes nothing returns nothing
set gg_trg_BerRegen = CreateTrigger( )
call TriggerRegisterTimerEvent( gg_trg_BerRegen, 0.25, true )
call TriggerAddCondition( gg_trg_BerRegen, Condition( function Trig_BerRegen_Conditions ) )
call TriggerAddAction( gg_trg_BerRegen, function Trig_BerRegen_Actions )
endfunction
function Trig_BerSpin_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A008' ) ) then
return false
endif
return true
endfunction
function BerCheck3 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H001_0012)) == true)
return b1 and b2
endfunction
function BerAct3 takes nothing returns nothing
local unit u = GetEnumUnit()
local real x = 0.01*(GetHeroInt(gg_unit_H001_0012, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(gg_unit_H001_0012))] + 100)
local real a = x*(30 + 90*GetUnitAbilityLevel(gg_unit_H001_0012, 'A008'))
if (udg_BersTalent1 == true) then
set a = a*1.5
endif
call UnitDamageTarget(gg_unit_H001_0012, u, a, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
set u = null
endfunction
function Trig_BerSpin_Actions takes nothing returns nothing
local unit u = gg_unit_H001_0012
local location l = GetUnitLoc(u)
local group g = CreateGroup()
call PolledWait(0.3)
call GroupEnumUnitsInRangeOfLoc(g, l, 250, Condition(function BerCheck3))
call ForGroup(g, function BerAct3)
set u = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_BerSpin takes nothing returns nothing
set gg_trg_BerSpin = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_BerSpin, gg_unit_H001_0012, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_BerSpin, Condition( function Trig_BerSpin_Conditions ) )
call TriggerAddAction( gg_trg_BerSpin, function Trig_BerSpin_Actions )
endfunction
function Trig_PalHeal_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A000' ) ) then
return false
endif
return true
endfunction
function PalCheck1 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H000_0001)) == true)
return b1 and b2
endfunction
function PalAct1 takes nothing returns nothing
local unit u = GetEnumUnit()
local location l = GetUnitLoc(u)
local unit u2 = gg_unit_H000_0001
local unit u3
local real a = (GetHeroInt(u2, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(u2))] + 100)*0.005
local real x = a*(25 + 75*GetUnitAbilityLevel(u2, 'A000'))
call UnitDamageTarget(u2, u, x, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
if (udg_PalTalent1 == true) then
set u3 = CreateUnitAtLoc(GetOwningPlayer(u2), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u3, 'A001')
call IssueTargetOrder(u3, "curse", u)
endif
set u = null
set u2 = null
set u3 = null
call RemoveLocation(l)
set l = null
endfunction
function Trig_PalHeal_Actions takes nothing returns nothing
local unit u = gg_unit_H000_0001
local group g = CreateGroup()
local location l = GetUnitLoc(u)
local real x = (GetHeroInt(u, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(u))] + 100)*0.01
local real a = GetUnitState(u, UNIT_STATE_LIFE) + x*(25 + 75*GetUnitAbilityLevel(u, 'A000'))
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl" , u, "origin")
call DestroyEffect( e )
call SetUnitState(u, UNIT_STATE_LIFE, a)
call GroupEnumUnitsInRangeOfLoc(g, l, 300, Condition(function PalCheck1))
call ForGroup(g, function PalAct1)
set u = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
set e = null
endfunction
//===========================================================================
function InitTrig_PalHeal takes nothing returns nothing
set gg_trg_PalHeal = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_PalHeal, gg_unit_H000_0001, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_PalHeal, Condition( function Trig_PalHeal_Conditions ) )
call TriggerAddAction( gg_trg_PalHeal, function Trig_PalHeal_Actions )
endfunction
function Trig_PalSplash_Conditions takes nothing returns boolean
local boolean b1 = ( GetAttacker() == gg_unit_H000_0001 )
local boolean b2 =( GetUnitAbilityLevel(gg_unit_H000_0001, 'A002') >= 1 )
return b1 and b2
endfunction
function TrigPalCon2 takes nothing returns boolean
local boolean b1 = ( GetEventDamageSource() == gg_unit_H000_0001 )
return b1
endfunction
function PalCheck2 takes nothing returns boolean
local boolean b1 = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) >= 0.405)
local boolean b2 = (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(gg_unit_H000_0001)) == true)
local boolean b3 = ( GetFilterUnit() != GetTriggerUnit() )
return b1 and b2 and b3
endfunction
function PalAct2 takes nothing returns nothing
local unit u = GetEnumUnit()
local unit u2 = gg_unit_H000_0001
local real x = udg_PalDamage
call UnitDamageTarget(u2, u, x, true, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS)
set u = null
set u2 = null
endfunction
function TrigPalAct2 takes nothing returns nothing
local group g = CreateGroup()
local unit u = GetTriggerUnit()
local location l = GetUnitLoc(u)
local effect e = AddSpecialEffectLoc("Abilities\\Spells\\Human\\ThunderClap\\ThunderClapCaster.mdl", l)
call DestroyEffect(e)
set udg_PalDamage = GetEventDamage()
call DisableTrigger(udg_PalTrig)
call GroupEnumUnitsInRangeOfLoc(g, l, 250, Condition(function PalCheck2))
call ForGroup(g, function PalAct2)
if (udg_PalEffect != null) then
call DestroyEffect(udg_PalEffect)
set udg_PalEffect = null
endif
set u = null
call RemoveLocation(l)
set l = null
call DestroyGroup(g)
set g = null
set e = null
endfunction
function Trig_PalSplash_Actions takes nothing returns nothing
local unit u1 = GetAttacker()
local unit u2 = GetTriggerUnit()
local integer i = GetRandomInt(1,100)
if (i <= (10 + 10*GetUnitAbilityLevel(u1, 'A002'))) then
if (udg_PalEffect == null) then
set udg_PalEffect = AddSpecialEffectTarget("Abilities\\Weapons\\FarseerMissile\\FarseerMissile.mdl" , u1, "weapon")
endif
call DestroyTrigger(udg_PalTrig)
set udg_PalTrig = CreateTrigger()
call TriggerRegisterUnitEvent( udg_PalTrig, u2, EVENT_UNIT_DAMAGED )
call TriggerAddCondition( udg_PalTrig, Condition( function TrigPalCon2 ) )
call TriggerAddAction( udg_PalTrig, function TrigPalAct2 )
endif
set u1 = null
set u2 = null
endfunction
//===========================================================================
function InitTrig_PalSplash takes nothing returns nothing
set gg_trg_PalSplash = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_PalSplash, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_PalSplash, Condition( function Trig_PalSplash_Conditions ) )
call TriggerAddAction( gg_trg_PalSplash, function Trig_PalSplash_Actions )
set udg_PalTrig = CreateTrigger()
endfunction
function Trig_PalBless_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A004' ) ) then
return false
endif
return true
endfunction
function Trig_PalBless_Actions takes nothing returns nothing
local unit u = gg_unit_H000_0001
local location l = GetUnitLoc(u)
local unit u2 = CreateUnitAtLoc(GetOwningPlayer(u), 'u000', l, bj_UNIT_FACING)
call UnitAddAbility(u2, 'A003')
call SetUnitAbilityLevel(u2, 'A003', GetUnitAbilityLevel(u,'A004') )
call IssueTargetOrder(u2, "innerfire", u)
call RemoveLocation(l)
set l = null
set u = null
set u2 = null
endfunction
//===========================================================================
function InitTrig_PalBless takes nothing returns nothing
set gg_trg_PalBless = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_PalBless, gg_unit_H000_0001, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_PalBless, Condition( function Trig_PalBless_Conditions ) )
call TriggerAddAction( gg_trg_PalBless, function Trig_PalBless_Actions )
endfunction
function Trig_PalAttacked_Conditions takes nothing returns boolean
local boolean b = (GetUnitAbilityLevel(gg_unit_H000_0001, 'B002') >= 1)
return b
endfunction
function Trig_PalAttacked_Actions takes nothing returns nothing
local unit u = gg_unit_H000_0001
local location l = GetUnitLoc(u)
local unit u3 = GetAttacker()
local real x = (GetHeroInt(u, true) + udg_Power[GetConvertedPlayerId(GetOwningPlayer(u))] + 100)*0.5
local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl" , u3, "origin")
call UnitDamageTarget(u3, u3, x, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
call DestroyEffect(e)
set e = null
set l = null
set u = null
set u3 = null
endfunction
//===========================================================================
function InitTrig_PalAttacked takes nothing returns nothing
set gg_trg_PalAttacked = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_PalAttacked, gg_unit_H000_0001, EVENT_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_PalAttacked, Condition( function Trig_PalAttacked_Conditions ) )
call TriggerAddAction( gg_trg_PalAttacked, function Trig_PalAttacked_Actions )
endfunction
function ClickTalent11 takes nothing returns nothing
local unit u = udg_Hero1
local player p = Player(0)
if (u == gg_unit_H000_0001) then
call BlzSetUnitBaseDamage( u, (BlzGetUnitBaseDamage(u, 0) + 25), 0 )
endif
if (u == gg_unit_H00D_0051) then
set udg_CritHit[GetConvertedPlayerId(p)] = udg_CritHit[GetConvertedPlayerId(p)] + 12
endif
if (u == gg_unit_H00G_0055) then
set udg_Cooldawn[GetConvertedPlayerId(p)] = udg_Cooldawn[GetConvertedPlayerId(p)] + 0.1
endif
if (u == gg_unit_H001_0012) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 6 )
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 6 )
endif
if (u == gg_unit_H002_0022) then
call UnitAddAbility(u, 'A09O')
endif
if (u == gg_unit_H00J_0057) then
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 10 )
endif
if (u == gg_unit_H007_0042) then
set udg_Power[GetConvertedPlayerId(p)] = udg_Power[GetConvertedPlayerId(p)] + 45
endif
if (u == gg_unit_H00M_0060) then
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 12 )
endif
if (u == gg_unit_H006_0027) then
call BlzSetUnitMaxMana(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 250))
endif
if (u == gg_unit_H00H_0054) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 10 )
endif
if (u == gg_unit_H00A_0048) then
call BlzSetUnitMaxHP(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 250))
endif
if (u == gg_unit_H00E_0052) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 5 )
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 5 )
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 5 )
endif
if (u == gg_unit_H00B_0049) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 6 )
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 6 )
endif
if (u == gg_unit_H009_0047) then
call BlzSetUnitMaxMana(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 250))
endif
if (u == gg_unit_H00O_0062) then
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 6 )
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 6 )
endif
if (u == gg_unit_H00F_0053) then
call BlzSetUnitMaxHP(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 150))
call BlzSetUnitMaxMana(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 150))
endif
if (u == gg_unit_H00I_0056) then
call BlzSetUnitBaseDamage( u, (BlzGetUnitBaseDamage(u, 0) + 25), 0 )
endif
if (u == gg_unit_H008_0043) then
call BlzSetUnitBaseDamage( u, (BlzGetUnitBaseDamage(u, 0) + 15), 0 )
set udg_Power[GetConvertedPlayerId(p)] = udg_Power[GetConvertedPlayerId(p)] + 15
endif
if (u == gg_unit_H00K_0058) then
call UnitAddAbility(u, 'A09P')
endif
if (u == gg_unit_H00C_0050) then
call UnitAddAbility(u, 'A09Q')
endif
if (u == gg_unit_H00L_0059) then
call BlzSetUnitMaxHP(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 250))
endif
if (u == gg_unit_H00P_0063) then
set udg_Cooldawn[GetConvertedPlayerId(p)] = udg_Cooldawn[GetConvertedPlayerId(p)] + 0.1
endif
if (u == gg_unit_H00Q_0064) then
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 12 )
endif
if (u == gg_unit_H00N_0061) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 6 )
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 6 )
endif
if GetLocalPlayer() == Player(0) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",107), false)
endif
endfunction
function ClickTalent12 takes nothing returns nothing
local unit u = udg_Hero1
if (u == gg_unit_H000_0001) then
set udg_PalTalent1 = true
endif
if (u == gg_unit_H00D_0051) then
set udg_RifleTalent1 = true
endif
if (u == gg_unit_H00G_0055) then
set udg_WarlTalent1 = true
endif
if (u == gg_unit_H001_0012) then
set udg_BersTalent1 = true
endif
if (u == gg_unit_H002_0022) then
set udg_PiratTalent1 = true
call BlzSetAbilityIntegerLevelField( BlzGetUnitAbility(gg_unit_H002_0022, 'A00C'), ABILITY_ILF_SUMMONED_UNIT_COUNT_HWE2, 0, 2 )
call BlzSetAbilityIntegerLevelField( BlzGetUnitAbility(gg_unit_H002_0022, 'A00C'), ABILITY_ILF_SUMMONED_UNIT_COUNT_HWE2, 1, 2 )
call BlzSetAbilityIntegerLevelField( BlzGetUnitAbility(gg_unit_H002_0022, 'A00C'), ABILITY_ILF_SUMMONED_UNIT_COUNT_HWE2, 2, 2 )
endif
if (u == gg_unit_H00J_0057) then
set udg_ShadTalent1 = true
endif
if (u == gg_unit_H007_0042) then
set udg_NecrTalent1 = true
endif
if (u == gg_unit_H00M_0060) then
set udg_ShamTalent1 = true
endif
if (u == gg_unit_H006_0027) then
set udg_DruidTalent1 = true
endif
if (u == gg_unit_H00H_0054) then
set udg_DeathTalent1 = true
endif
if (u == gg_unit_H00A_0048) then
set udg_StarTalent1 = true
endif
if (u == gg_unit_H00E_0052) then
set udg_MonkTalent1 = true
endif
if (u == gg_unit_H00B_0049) then
set udg_ChiefTalent1 = true
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00B_0049, 'A01B'), ABILITY_RLF_DAMAGE_DEALT_WAR2, 0, 130.00 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00B_0049, 'A01B'), ABILITY_RLF_DAMAGE_DEALT_WAR2, 1, 210.00 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00B_0049, 'A01B'), ABILITY_RLF_DAMAGE_DEALT_WAR2, 2, 290.00 )
endif
if (u == gg_unit_H009_0047) then
set udg_IceTalent1 = true
endif
if (u == gg_unit_H00O_0062) then
set udg_FireTalent1 = true
endif
if (u == gg_unit_H00F_0053) then
set udg_MedTalent1 = true
endif
if (u == gg_unit_H00I_0056) then
set udg_SeaTalent1 = true
endif
if (u == gg_unit_H008_0043) then
set udg_PitTalent1 = true
endif
if (u == gg_unit_H00K_0058) then
set udg_RobotTalent1 = true
endif
if (u == gg_unit_H00C_0050) then
set udg_ScorpTalent1 = true
endif
if (u == gg_unit_H00L_0059) then
set udg_DemonTalent1 = true
endif
if (u == gg_unit_H00P_0063) then
set udg_TimeTalent1 = true
endif
if (u == gg_unit_H00Q_0064) then
set udg_SiegeTalent1 = true
endif
if (u == gg_unit_H00N_0061) then
set udg_FishTalent1 = true
endif
if GetLocalPlayer() == Player(0) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",107), false)
endif
endfunction
function Trig_Talent1_Actions takes nothing returns nothing
local framehandle f1
local framehandle fi1
local framehandle fd1
local framehandle ft1
local framehandle f2
local framehandle fi2
local framehandle fd2
local framehandle ft2
local framehandle f
local framehandle fs1
local unit u = udg_Hero1
local string t1
local string t2
local trigger tr1 = CreateTrigger()
local trigger tr2 = CreateTrigger()
set f = BlzCreateFrame("EscMenuBackdrop", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), 0,107)
call BlzFrameSetAbsPoint(f, FRAMEPOINT_CENTER, 0.4, 0.30)
call BlzFrameSetSize(f, 0.4, 0.25)
set f1 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 101)
set fi1 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 101)
set fd1 = BlzCreateFrame("ListBoxWar3", f1, 0, 0)
set ft1 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd1, "StandardInfoTextTemplate", 101)
call BlzFrameSetSize(f1, 0.05, 0.05)
call BlzFrameSetSize(fd1, 0.36, 0.13)
call BlzFrameSetSize(ft1, 0.34, 0.11)
call BlzFrameSetAbsPoint(f1, FRAMEPOINT_CENTER, 0.27, 0.37)
call BlzFrameSetPoint(ft1, FRAMEPOINT_CENTER, fd1, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd1, FRAMEPOINT_CENTER, 0.4, 0.27)
call BlzFrameSetTooltip(f1, fd1)
call BlzFrameSetText(ft1, "1")
set f2 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 102)
set fi2 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 102)
set fd2 = BlzCreateFrame("ListBoxWar3", f2, 0, 0)
set ft2 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd2, "StandardInfoTextTemplate", 102)
call BlzFrameSetSize(f2, 0.05, 0.05)
call BlzFrameSetSize(fd2, 0.36, 0.13)
call BlzFrameSetSize(ft2, 0.34, 0.11)
call BlzFrameSetAbsPoint(f2, FRAMEPOINT_CENTER, 0.52, 0.37)
call BlzFrameSetPoint(ft2, FRAMEPOINT_CENTER, fd2, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd2, FRAMEPOINT_CENTER, 0.4, 0.27)
call BlzFrameSetTooltip(f2, fd2)
call BlzFrameSetText(ft2, "1")
set fs1 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", f, "StandardInfoTextTemplate", 105)
call BlzFrameSetAbsPoint(fs1, FRAMEPOINT_CENTER, 0.4, 0.37)
call BlzFrameSetText(fs1, "|cffffff00Choose your talent|r")
call BlzFrameSetScale(fs1, 2)
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",107), false)
if (u == gg_unit_H000_0001) then
set t1 = "+25 damage"
set t2 = "Holy Light blinds enemies for 5 seconds causing them to miss with 50% chance"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSteelMelee.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNHolyBolt.blp", 0, true)
endif
if (u == gg_unit_H00D_0051) then
set t1 = "+12% critical chance"
set t2 = "Mark of the Sniper reduces target's armor by 12"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNDwarvenLongRifle.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNSniperRifle.blp", 0, true)
endif
if (u == gg_unit_H00G_0055) then
set t1 = "+10% concentration"
set t2 = "Lightning Bolt deals 50% more damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHeal.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNLightning Strike.blp", 0, true)
endif
if (u == gg_unit_H001_0012) then
set t1 = "+6 strength and agility"
set t2 = "Circular Attack deals 50% more damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNBerserk.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNWBurstv3.blp", 0, true)
endif
if (u == gg_unit_H002_0022) then
set t1 = "+40% attack speed"
set t2 = "Summons two cannons instead of one"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNGlove.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNHumanMissileUpOne.blp", 0, true)
endif
if (u == gg_unit_H00J_0057) then
set t1 = "+10 agility"
set t2 = "Shuriken can deal critical strikes (same chance and damage as the hero has)"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSlippersOfAgility.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNUpgradeMoonGlaive.blp", 0, true)
endif
if (u == gg_unit_H007_0042) then
set t1 = "+45 power"
set t2 = "+100% health to all summoned skeletons"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNPriestAdept.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNSkeletonMage.blp", 0, true)
endif
if (u == gg_unit_H00M_0060) then
set t1 = "+12 intelligence"
set t2 = "Totems deal 50% more damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNTome.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNTaurenTotem.blp", 0, true)
endif
if (u == gg_unit_H006_0027) then
set t1 = "+250 mana"
set t2 = "+1 sec to Root duration"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNStaffOfPreservation.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNEntanglingRoots.blp", 0, true)
endif
if (u == gg_unit_H00H_0054) then
set t1 = "+10 strength"
set t2 = "Sacrifial fire is now save"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNDeathPact.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNFireSwordStorm_v.1.2.blp", 0, true)
endif
if (u == gg_unit_H00A_0048) then
set t1 = "+250 health"
set t2 = "Starfall deals 50% more damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNStarfall.blp", 0, true)
endif
if (u == gg_unit_H00E_0052) then
set t1 = "+5 to main attributes"
set t2 = "Adds +15 armor and +40% resistance during the meditation"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\PassiveButtons\\PASBTNStatUp.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNMonkMeditate.blp", 0, true)
endif
if (u == gg_unit_H00B_0049) then
set t1 = "+6 strength and intelligence"
set t2 = "Smasher deals double damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSmash.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNMonkMeditate.blp", 0, true)
endif
if (u == gg_unit_H009_0047) then
set t1 = "+250 mana"
set t2 = "Blizzard chance is increased by 10%"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNOrbOfFrost.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\PassiveButtons\\PASBTNFreezingBreath.blp", 0, true)
endif
if (u == gg_unit_H00O_0062) then
set t1 = "+6 agility and intelligence"
set t2 = "Fire Shield also gains +40% damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHeroAvatarOfFlame.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNFireShield.BLP", 0, true)
endif
if (u == gg_unit_H00F_0053) then
set t1 = "+150 health and mana"
set t2 = "Posion arrows deal +100% damage (only for poison!)"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNLadyVashj.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\ATCPoisonArrows.blp", 0, true)
endif
if (u == gg_unit_H00I_0056) then
set t1 = "+25 damage"
set t2 = "Сhitinous Scale regenerates two times more hp/sec"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNNagaWeaponUp1.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\PASBlue Naga.blp", 0, true)
endif
if (u == gg_unit_H008_0043) then
set t1 = "+15 attack and power"
set t2 = "+1.5 seconds to stun duration from Spikes"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNPitLord.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNImpale.blp", 0, true)
endif
if (u == gg_unit_H00K_0058) then
set t1 = "+7 armor"
set t2 = "+20 chainsaws to Slaughter"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHumanArmorUpOne.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNSaw-upg-3.blp", 0, true)
endif
if (u == gg_unit_H00C_0050) then
set t1 = "+7 hp/sec"
set t2 = "Sandstorm deals 40 damage per seconds (Power can increase the amount of damage)"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNSandstorm3.blp", 0, true)
endif
if (u == gg_unit_H00L_0059) then
set t1 = "+250 health"
set t2 = "+25% bonus incoming damage to Curse of Pain"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTN_BloodCurseV2.blp", 0, true)
endif
if (u == gg_unit_H00P_0063) then
set t1 = "+10% concentration"
set t2 = "+4 seconds to Consenescence duration"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHeal.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNTimeSpell.blp", 0, true)
endif
if (u == gg_unit_H00Q_0064) then
set t1 = "+12 intelligence"
set t2 = "100% trebuchet attack speed"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNTome.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNTrebuchet.blp", 0, true)
endif
if (u == gg_unit_H00N_0061) then
set t1 = "+6 strength and agility"
set t2 = "Jagged Harpoons penetrates 7 armor"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNTuskaarGold.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\PASHarpoon.blp", 0, true)
endif
call BlzFrameSetText(ft1, t1)
call BlzFrameSetText(ft2, t2)
call BlzFrameSetParent(f1, f)
call BlzFrameSetParent(fi1, f)
call BlzFrameSetParent(f2, f)
call BlzFrameSetParent(fi2, f)
call BlzTriggerRegisterFrameEvent(tr1, f1, FRAMEEVENT_CONTROL_CLICK)
call TriggerAddAction(tr1, function ClickTalent11)
call BlzTriggerRegisterFrameEvent(tr2, f2, FRAMEEVENT_CONTROL_CLICK)
call TriggerAddAction(tr2, function ClickTalent12)
if GetLocalPlayer() == Player(0) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",107), true)
endif
endfunction
//===========================================================================
function InitTrig_Talent1 takes nothing returns nothing
set gg_trg_Talent1 = CreateTrigger( )
call TriggerAddAction( gg_trg_Talent1, function Trig_Talent1_Actions )
endfunction
function ClickTalent21 takes nothing returns nothing
local unit u = udg_Hero2
local player p = Player(1)
if (u == gg_unit_H000_0001) then
call BlzSetUnitBaseDamage( u, (BlzGetUnitBaseDamage(u, 0) + 25), 0 )
endif
if (u == gg_unit_H00D_0051) then
set udg_CritHit[GetConvertedPlayerId(p)] = udg_CritHit[GetConvertedPlayerId(p)] + 12
endif
if (u == gg_unit_H00G_0055) then
set udg_Cooldawn[GetConvertedPlayerId(p)] = udg_Cooldawn[GetConvertedPlayerId(p)] + 0.1
endif
if (u == gg_unit_H001_0012) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 6 )
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 6 )
endif
if (u == gg_unit_H002_0022) then
call UnitAddAbility(u, 'A09O')
endif
if (u == gg_unit_H00J_0057) then
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 10 )
endif
if (u == gg_unit_H007_0042) then
set udg_Power[GetConvertedPlayerId(p)] = udg_Power[GetConvertedPlayerId(p)] + 45
endif
if (u == gg_unit_H00M_0060) then
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 12 )
endif
if (u == gg_unit_H006_0027) then
call BlzSetUnitMaxMana(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 250))
endif
if (u == gg_unit_H00H_0054) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 10 )
endif
if (u == gg_unit_H00A_0048) then
call BlzSetUnitMaxHP(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 250))
endif
if (u == gg_unit_H00E_0052) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 5 )
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 5 )
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 5 )
endif
if (u == gg_unit_H00B_0049) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 6 )
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 6 )
endif
if (u == gg_unit_H009_0047) then
call BlzSetUnitMaxMana(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 250))
endif
if (u == gg_unit_H00O_0062) then
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 6 )
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 6 )
endif
if (u == gg_unit_H00F_0053) then
call BlzSetUnitMaxHP(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 150))
call BlzSetUnitMaxMana(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 150))
endif
if (u == gg_unit_H00I_0056) then
call BlzSetUnitBaseDamage( u, (BlzGetUnitBaseDamage(u, 0) + 25), 0 )
endif
if (u == gg_unit_H008_0043) then
call BlzSetUnitBaseDamage( u, (BlzGetUnitBaseDamage(u, 0) + 15), 0 )
set udg_Power[GetConvertedPlayerId(p)] = udg_Power[GetConvertedPlayerId(p)] + 15
endif
if (u == gg_unit_H00K_0058) then
call UnitAddAbility(u, 'A09P')
endif
if (u == gg_unit_H00C_0050) then
call UnitAddAbility(u, 'A09Q')
endif
if (u == gg_unit_H00L_0059) then
call BlzSetUnitMaxHP(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 250))
endif
if (u == gg_unit_H00P_0063) then
set udg_Cooldawn[GetConvertedPlayerId(p)] = udg_Cooldawn[GetConvertedPlayerId(p)] + 0.1
endif
if (u == gg_unit_H00Q_0064) then
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 12 )
endif
if (u == gg_unit_H00N_0061) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 6 )
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 6 )
endif
if GetLocalPlayer() == Player(1) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",207), false)
endif
endfunction
function ClickTalent22 takes nothing returns nothing
local unit u = udg_Hero2
if (u == gg_unit_H000_0001) then
set udg_PalTalent1 = true
endif
if (u == gg_unit_H00D_0051) then
set udg_RifleTalent1 = true
endif
if (u == gg_unit_H00G_0055) then
set udg_WarlTalent1 = true
endif
if (u == gg_unit_H001_0012) then
set udg_BersTalent1 = true
endif
if (u == gg_unit_H002_0022) then
set udg_PiratTalent1 = true
call BlzSetAbilityIntegerLevelField( BlzGetUnitAbility(gg_unit_H002_0022, 'A00C'), ABILITY_ILF_SUMMONED_UNIT_COUNT_HWE2, 0, 2 )
call BlzSetAbilityIntegerLevelField( BlzGetUnitAbility(gg_unit_H002_0022, 'A00C'), ABILITY_ILF_SUMMONED_UNIT_COUNT_HWE2, 1, 2 )
call BlzSetAbilityIntegerLevelField( BlzGetUnitAbility(gg_unit_H002_0022, 'A00C'), ABILITY_ILF_SUMMONED_UNIT_COUNT_HWE2, 2, 2 )
endif
if (u == gg_unit_H00J_0057) then
set udg_ShadTalent1 = true
endif
if (u == gg_unit_H007_0042) then
set udg_NecrTalent1 = true
endif
if (u == gg_unit_H00M_0060) then
set udg_ShamTalent1 = true
endif
if (u == gg_unit_H006_0027) then
set udg_DruidTalent1 = true
endif
if (u == gg_unit_H00H_0054) then
set udg_DeathTalent1 = true
endif
if (u == gg_unit_H00A_0048) then
set udg_StarTalent1 = true
endif
if (u == gg_unit_H00E_0052) then
set udg_MonkTalent1 = true
endif
if (u == gg_unit_H00B_0049) then
set udg_ChiefTalent1 = true
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00B_0049, 'A01B'), ABILITY_RLF_DAMAGE_DEALT_WAR2, 0, 130.00 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00B_0049, 'A01B'), ABILITY_RLF_DAMAGE_DEALT_WAR2, 1, 210.00 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00B_0049, 'A01B'), ABILITY_RLF_DAMAGE_DEALT_WAR2, 2, 290.00 )
endif
if (u == gg_unit_H009_0047) then
set udg_IceTalent1 = true
endif
if (u == gg_unit_H00O_0062) then
set udg_FireTalent1 = true
endif
if (u == gg_unit_H00F_0053) then
set udg_MedTalent1 = true
endif
if (u == gg_unit_H00I_0056) then
set udg_SeaTalent1 = true
endif
if (u == gg_unit_H008_0043) then
set udg_PitTalent1 = true
endif
if (u == gg_unit_H00K_0058) then
set udg_RobotTalent1 = true
endif
if (u == gg_unit_H00C_0050) then
set udg_ScorpTalent1 = true
endif
if (u == gg_unit_H00L_0059) then
set udg_DemonTalent1 = true
endif
if (u == gg_unit_H00P_0063) then
set udg_TimeTalent1 = true
endif
if (u == gg_unit_H00Q_0064) then
set udg_SiegeTalent1 = true
endif
if (u == gg_unit_H00N_0061) then
set udg_FishTalent1 = true
endif
if GetLocalPlayer() == Player(1) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",207), false)
endif
endfunction
function Trig_Talent2_Actions takes nothing returns nothing
local framehandle f1
local framehandle fi1
local framehandle fd1
local framehandle ft1
local framehandle f2
local framehandle fi2
local framehandle fd2
local framehandle ft2
local framehandle f
local framehandle fs1
local unit u = udg_Hero2
local string t1
local string t2
local trigger tr1 = CreateTrigger()
local trigger tr2 = CreateTrigger()
set f = BlzCreateFrame("EscMenuBackdrop", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), 0,207)
call BlzFrameSetAbsPoint(f, FRAMEPOINT_CENTER, 0.4, 0.30)
call BlzFrameSetSize(f, 0.4, 0.25)
set f1 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 201)
set fi1 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 201)
set fd1 = BlzCreateFrame("ListBoxWar3", f1, 0, 0)
set ft1 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd1, "StandardInfoTextTemplate", 201)
call BlzFrameSetSize(f1, 0.05, 0.05)
call BlzFrameSetSize(fd1, 0.36, 0.13)
call BlzFrameSetSize(ft1, 0.34, 0.11)
call BlzFrameSetAbsPoint(f1, FRAMEPOINT_CENTER, 0.27, 0.37)
call BlzFrameSetPoint(ft1, FRAMEPOINT_CENTER, fd1, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd1, FRAMEPOINT_CENTER, 0.4, 0.27)
call BlzFrameSetTooltip(f1, fd1)
call BlzFrameSetText(ft1, "1")
set f2 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 202)
set fi2 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 202)
set fd2 = BlzCreateFrame("ListBoxWar3", f2, 0, 0)
set ft2 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd2, "StandardInfoTextTemplate", 202)
call BlzFrameSetSize(f2, 0.05, 0.05)
call BlzFrameSetSize(fd2, 0.36, 0.13)
call BlzFrameSetSize(ft2, 0.34, 0.11)
call BlzFrameSetAbsPoint(f2, FRAMEPOINT_CENTER, 0.52, 0.37)
call BlzFrameSetPoint(ft2, FRAMEPOINT_CENTER, fd2, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd2, FRAMEPOINT_CENTER, 0.4, 0.27)
call BlzFrameSetTooltip(f2, fd2)
call BlzFrameSetText(ft2, "1")
set fs1 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", f, "StandardInfoTextTemplate", 205)
call BlzFrameSetAbsPoint(fs1, FRAMEPOINT_CENTER, 0.4, 0.37)
call BlzFrameSetText(fs1, "|cffffff00Choose your talent|r")
call BlzFrameSetScale(fs1, 2)
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",207), false)
if (u == gg_unit_H000_0001) then
set t1 = "+25 damage"
set t2 = "Holy Light blinds enemies for 5 seconds causing them to miss with 50% chance"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSteelMelee.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNHolyBolt.blp", 0, true)
endif
if (u == gg_unit_H00D_0051) then
set t1 = "+12% critical chance"
set t2 = "Mark of the Sniper reduces target's armor by 12"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNDwarvenLongRifle.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNSniperRifle.blp", 0, true)
endif
if (u == gg_unit_H00G_0055) then
set t1 = "+10% concentration"
set t2 = "Lightning Bolt deals 50% more damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHeal.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNLightning Strike.blp", 0, true)
endif
if (u == gg_unit_H001_0012) then
set t1 = "+6 strength and agility"
set t2 = "Circular Attack deals 50% more damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNBerserk.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNWBurstv3.blp", 0, true)
endif
if (u == gg_unit_H002_0022) then
set t1 = "+40% attack speed"
set t2 = "Summons two cannons instead of one"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNGlove.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNHumanMissileUpOne.blp", 0, true)
endif
if (u == gg_unit_H00J_0057) then
set t1 = "+10 agility"
set t2 = "Shuriken can deal critical strikes (same chance and damage as the hero has)"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSlippersOfAgility.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNUpgradeMoonGlaive.blp", 0, true)
endif
if (u == gg_unit_H007_0042) then
set t1 = "+45 power"
set t2 = "+100% health to all summoned skeletons"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNPriestAdept.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNSkeletonMage.blp", 0, true)
endif
if (u == gg_unit_H00M_0060) then
set t1 = "+12 intelligence"
set t2 = "Totems deal 50% more damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNTome.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNTaurenTotem.blp", 0, true)
endif
if (u == gg_unit_H006_0027) then
set t1 = "+250 mana"
set t2 = "+1 sec to Root duration"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNStaffOfPreservation.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNEntanglingRoots.blp", 0, true)
endif
if (u == gg_unit_H00H_0054) then
set t1 = "+10 strength"
set t2 = "Sacrifial fire is now save"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNDeathPact.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNFireSwordStorm_v.1.2.blp", 0, true)
endif
if (u == gg_unit_H00A_0048) then
set t1 = "+250 health"
set t2 = "Starfall deals 50% more damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNStarfall.blp", 0, true)
endif
if (u == gg_unit_H00E_0052) then
set t1 = "+5 to main attributes"
set t2 = "Adds +15 armor and +40% resistance during the meditation"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\PassiveButtons\\PASBTNStatUp.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNMonkMeditate.blp", 0, true)
endif
if (u == gg_unit_H00B_0049) then
set t1 = "+6 strength and intelligence"
set t2 = "Smasher deals double damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSmash.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNMonkMeditate.blp", 0, true)
endif
if (u == gg_unit_H009_0047) then
set t1 = "+250 mana"
set t2 = "Blizzard chance is increased by 10%"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNOrbOfFrost.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\PassiveButtons\\PASBTNFreezingBreath.blp", 0, true)
endif
if (u == gg_unit_H00O_0062) then
set t1 = "+6 agility and intelligence"
set t2 = "Fire Shield also gains +40% damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHeroAvatarOfFlame.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNFireShield.BLP", 0, true)
endif
if (u == gg_unit_H00F_0053) then
set t1 = "+150 health and mana"
set t2 = "Posion arrows deal +100% damage (only for poison!)"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNLadyVashj.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\ATCPoisonArrows.blp", 0, true)
endif
if (u == gg_unit_H00I_0056) then
set t1 = "+25 damage"
set t2 = "Сhitinous Scale regenerates two times more hp/sec"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNNagaWeaponUp1.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\PASBlue Naga.blp", 0, true)
endif
if (u == gg_unit_H008_0043) then
set t1 = "+15 attack and power"
set t2 = "+1.5 seconds to stun duration from Spikes"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNPitLord.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNImpale.blp", 0, true)
endif
if (u == gg_unit_H00K_0058) then
set t1 = "+7 armor"
set t2 = "+20 chainsaws to Slaughter"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHumanArmorUpOne.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNSaw-upg-3.blp", 0, true)
endif
if (u == gg_unit_H00C_0050) then
set t1 = "+7 hp/sec"
set t2 = "Sandstorm deals 40 damage per seconds (Power can increase the amount of damage)"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNSandstorm3.blp", 0, true)
endif
if (u == gg_unit_H00L_0059) then
set t1 = "+250 health"
set t2 = "+25% bonus incoming damage to Curse of Pain"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTN_BloodCurseV2.blp", 0, true)
endif
if (u == gg_unit_H00P_0063) then
set t1 = "+10% concentration"
set t2 = "+4 seconds to Consenescence duration"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHeal.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNTimeSpell.blp", 0, true)
endif
if (u == gg_unit_H00Q_0064) then
set t1 = "+12 intelligence"
set t2 = "100% trebuchet attack speed"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNTome.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNTrebuchet.blp", 0, true)
endif
if (u == gg_unit_H00N_0061) then
set t1 = "+6 strength and agility"
set t2 = "Jagged Harpoons penetrates 7 armor"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNTuskaarGold.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\PASHarpoon.blp", 0, true)
endif
call BlzFrameSetText(ft1, t1)
call BlzFrameSetText(ft2, t2)
call BlzFrameSetParent(f1, f)
call BlzFrameSetParent(fi1, f)
call BlzFrameSetParent(f2, f)
call BlzFrameSetParent(fi2, f)
call BlzTriggerRegisterFrameEvent(tr1, f1, FRAMEEVENT_CONTROL_CLICK)
call TriggerAddAction(tr1, function ClickTalent21)
call BlzTriggerRegisterFrameEvent(tr2, f2, FRAMEEVENT_CONTROL_CLICK)
call TriggerAddAction(tr2, function ClickTalent22)
if GetLocalPlayer() == Player(1) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",207), true)
endif
endfunction
//===========================================================================
function InitTrig_Talent2 takes nothing returns nothing
set gg_trg_Talent2 = CreateTrigger( )
call TriggerAddAction( gg_trg_Talent2, function Trig_Talent2_Actions )
endfunction
function ClickTalent31 takes nothing returns nothing
local unit u = udg_Hero3
local player p = Player(2)
if (u == gg_unit_H000_0001) then
call BlzSetUnitBaseDamage( u, (BlzGetUnitBaseDamage(u, 0) + 25), 0 )
endif
if (u == gg_unit_H00D_0051) then
set udg_CritHit[GetConvertedPlayerId(p)] = udg_CritHit[GetConvertedPlayerId(p)] + 12
endif
if (u == gg_unit_H00G_0055) then
set udg_Cooldawn[GetConvertedPlayerId(p)] = udg_Cooldawn[GetConvertedPlayerId(p)] + 0.1
endif
if (u == gg_unit_H001_0012) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 6 )
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 6 )
endif
if (u == gg_unit_H002_0022) then
call UnitAddAbility(u, 'A09O')
endif
if (u == gg_unit_H00J_0057) then
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 10 )
endif
if (u == gg_unit_H007_0042) then
set udg_Power[GetConvertedPlayerId(p)] = udg_Power[GetConvertedPlayerId(p)] + 45
endif
if (u == gg_unit_H00M_0060) then
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 12 )
endif
if (u == gg_unit_H006_0027) then
call BlzSetUnitMaxMana(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 250))
endif
if (u == gg_unit_H00H_0054) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 10 )
endif
if (u == gg_unit_H00A_0048) then
call BlzSetUnitMaxHP(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 250))
endif
if (u == gg_unit_H00E_0052) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 5 )
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 5 )
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 5 )
endif
if (u == gg_unit_H00B_0049) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 6 )
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 6 )
endif
if (u == gg_unit_H009_0047) then
call BlzSetUnitMaxMana(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 250))
endif
if (u == gg_unit_H00O_0062) then
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 6 )
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 6 )
endif
if (u == gg_unit_H00F_0053) then
call BlzSetUnitMaxHP(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 150))
call BlzSetUnitMaxMana(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 150))
endif
if (u == gg_unit_H00I_0056) then
call BlzSetUnitBaseDamage( u, (BlzGetUnitBaseDamage(u, 0) + 25), 0 )
endif
if (u == gg_unit_H008_0043) then
call BlzSetUnitBaseDamage( u, (BlzGetUnitBaseDamage(u, 0) + 15), 0 )
set udg_Power[GetConvertedPlayerId(p)] = udg_Power[GetConvertedPlayerId(p)] + 15
endif
if (u == gg_unit_H00K_0058) then
call UnitAddAbility(u, 'A09P')
endif
if (u == gg_unit_H00C_0050) then
call UnitAddAbility(u, 'A09Q')
endif
if (u == gg_unit_H00L_0059) then
call BlzSetUnitMaxHP(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 250))
endif
if (u == gg_unit_H00P_0063) then
set udg_Cooldawn[GetConvertedPlayerId(p)] = udg_Cooldawn[GetConvertedPlayerId(p)] + 0.1
endif
if (u == gg_unit_H00Q_0064) then
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 12 )
endif
if (u == gg_unit_H00N_0061) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 6 )
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 6 )
endif
if GetLocalPlayer() == Player(2) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",307), false)
endif
endfunction
function ClickTalent32 takes nothing returns nothing
local unit u = udg_Hero3
if (u == gg_unit_H000_0001) then
set udg_PalTalent1 = true
endif
if (u == gg_unit_H00D_0051) then
set udg_RifleTalent1 = true
endif
if (u == gg_unit_H00G_0055) then
set udg_WarlTalent1 = true
endif
if (u == gg_unit_H001_0012) then
set udg_BersTalent1 = true
endif
if (u == gg_unit_H002_0022) then
set udg_PiratTalent1 = true
call BlzSetAbilityIntegerLevelField( BlzGetUnitAbility(gg_unit_H002_0022, 'A00C'), ABILITY_ILF_SUMMONED_UNIT_COUNT_HWE2, 0, 2 )
call BlzSetAbilityIntegerLevelField( BlzGetUnitAbility(gg_unit_H002_0022, 'A00C'), ABILITY_ILF_SUMMONED_UNIT_COUNT_HWE2, 1, 2 )
call BlzSetAbilityIntegerLevelField( BlzGetUnitAbility(gg_unit_H002_0022, 'A00C'), ABILITY_ILF_SUMMONED_UNIT_COUNT_HWE2, 2, 2 )
endif
if (u == gg_unit_H00J_0057) then
set udg_ShadTalent1 = true
endif
if (u == gg_unit_H007_0042) then
set udg_NecrTalent1 = true
endif
if (u == gg_unit_H00M_0060) then
set udg_ShamTalent1 = true
endif
if (u == gg_unit_H006_0027) then
set udg_DruidTalent1 = true
endif
if (u == gg_unit_H00H_0054) then
set udg_DeathTalent1 = true
endif
if (u == gg_unit_H00A_0048) then
set udg_StarTalent1 = true
endif
if (u == gg_unit_H00E_0052) then
set udg_MonkTalent1 = true
endif
if (u == gg_unit_H00B_0049) then
set udg_ChiefTalent1 = true
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00B_0049, 'A01B'), ABILITY_RLF_DAMAGE_DEALT_WAR2, 0, 130.00 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00B_0049, 'A01B'), ABILITY_RLF_DAMAGE_DEALT_WAR2, 1, 210.00 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00B_0049, 'A01B'), ABILITY_RLF_DAMAGE_DEALT_WAR2, 2, 290.00 )
endif
if (u == gg_unit_H009_0047) then
set udg_IceTalent1 = true
endif
if (u == gg_unit_H00O_0062) then
set udg_FireTalent1 = true
endif
if (u == gg_unit_H00F_0053) then
set udg_MedTalent1 = true
endif
if (u == gg_unit_H00I_0056) then
set udg_SeaTalent1 = true
endif
if (u == gg_unit_H008_0043) then
set udg_PitTalent1 = true
endif
if (u == gg_unit_H00K_0058) then
set udg_RobotTalent1 = true
endif
if (u == gg_unit_H00C_0050) then
set udg_ScorpTalent1 = true
endif
if (u == gg_unit_H00L_0059) then
set udg_DemonTalent1 = true
endif
if (u == gg_unit_H00P_0063) then
set udg_TimeTalent1 = true
endif
if (u == gg_unit_H00Q_0064) then
set udg_SiegeTalent1 = true
endif
if (u == gg_unit_H00N_0061) then
set udg_FishTalent1 = true
endif
if GetLocalPlayer() == Player(2) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",307), false)
endif
endfunction
function Trig_Talent3_Actions takes nothing returns nothing
local framehandle f1
local framehandle fi1
local framehandle fd1
local framehandle ft1
local framehandle f2
local framehandle fi2
local framehandle fd2
local framehandle ft2
local framehandle f
local framehandle fs1
local unit u = udg_Hero3
local string t1
local string t2
local trigger tr1 = CreateTrigger()
local trigger tr2 = CreateTrigger()
set f = BlzCreateFrame("EscMenuBackdrop", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), 0,307)
call BlzFrameSetAbsPoint(f, FRAMEPOINT_CENTER, 0.4, 0.30)
call BlzFrameSetSize(f, 0.4, 0.25)
set f1 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 301)
set fi1 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 301)
set fd1 = BlzCreateFrame("ListBoxWar3", f1, 0, 0)
set ft1 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd1, "StandardInfoTextTemplate", 301)
call BlzFrameSetSize(f1, 0.05, 0.05)
call BlzFrameSetSize(fd1, 0.36, 0.13)
call BlzFrameSetSize(ft1, 0.34, 0.11)
call BlzFrameSetAbsPoint(f1, FRAMEPOINT_CENTER, 0.27, 0.37)
call BlzFrameSetPoint(ft1, FRAMEPOINT_CENTER, fd1, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd1, FRAMEPOINT_CENTER, 0.4, 0.27)
call BlzFrameSetTooltip(f1, fd1)
call BlzFrameSetText(ft1, "1")
set f2 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 302)
set fi2 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 302)
set fd2 = BlzCreateFrame("ListBoxWar3", f2, 0, 0)
set ft2 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd2, "StandardInfoTextTemplate", 302)
call BlzFrameSetSize(f2, 0.05, 0.05)
call BlzFrameSetSize(fd2, 0.36, 0.13)
call BlzFrameSetSize(ft2, 0.34, 0.11)
call BlzFrameSetAbsPoint(f2, FRAMEPOINT_CENTER, 0.52, 0.37)
call BlzFrameSetPoint(ft2, FRAMEPOINT_CENTER, fd2, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd2, FRAMEPOINT_CENTER, 0.4, 0.27)
call BlzFrameSetTooltip(f2, fd2)
call BlzFrameSetText(ft2, "1")
set fs1 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", f, "StandardInfoTextTemplate", 305)
call BlzFrameSetAbsPoint(fs1, FRAMEPOINT_CENTER, 0.4, 0.37)
call BlzFrameSetText(fs1, "|cffffff00Choose your talent|r")
call BlzFrameSetScale(fs1, 2)
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",307), false)
if (u == gg_unit_H000_0001) then
set t1 = "+25 damage"
set t2 = "Holy Light blinds enemies for 5 seconds causing them to miss with 50% chance"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSteelMelee.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNHolyBolt.blp", 0, true)
endif
if (u == gg_unit_H00D_0051) then
set t1 = "+12% critical chance"
set t2 = "Mark of the Sniper reduces target's armor by 12"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNDwarvenLongRifle.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNSniperRifle.blp", 0, true)
endif
if (u == gg_unit_H00G_0055) then
set t1 = "+10% concentration"
set t2 = "Lightning Bolt deals 50% more damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHeal.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNLightning Strike.blp", 0, true)
endif
if (u == gg_unit_H001_0012) then
set t1 = "+6 strength and agility"
set t2 = "Circular Attack deals 50% more damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNBerserk.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNWBurstv3.blp", 0, true)
endif
if (u == gg_unit_H002_0022) then
set t1 = "+40% attack speed"
set t2 = "Summons two cannons instead of one"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNGlove.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNHumanMissileUpOne.blp", 0, true)
endif
if (u == gg_unit_H00J_0057) then
set t1 = "+10 agility"
set t2 = "Shuriken can deal critical strikes (same chance and damage as the hero has)"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSlippersOfAgility.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNUpgradeMoonGlaive.blp", 0, true)
endif
if (u == gg_unit_H007_0042) then
set t1 = "+45 power"
set t2 = "+100% health to all summoned skeletons"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNPriestAdept.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNSkeletonMage.blp", 0, true)
endif
if (u == gg_unit_H00M_0060) then
set t1 = "+12 intelligence"
set t2 = "Totems deal 50% more damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNTome.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNTaurenTotem.blp", 0, true)
endif
if (u == gg_unit_H006_0027) then
set t1 = "+250 mana"
set t2 = "+1 sec to Root duration"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNStaffOfPreservation.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNEntanglingRoots.blp", 0, true)
endif
if (u == gg_unit_H00H_0054) then
set t1 = "+10 strength"
set t2 = "Sacrifial fire is now save"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNDeathPact.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNFireSwordStorm_v.1.2.blp", 0, true)
endif
if (u == gg_unit_H00A_0048) then
set t1 = "+250 health"
set t2 = "Starfall deals 50% more damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNStarfall.blp", 0, true)
endif
if (u == gg_unit_H00E_0052) then
set t1 = "+5 to main attributes"
set t2 = "Adds +15 armor and +40% resistance during the meditation"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\PassiveButtons\\PASBTNStatUp.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNMonkMeditate.blp", 0, true)
endif
if (u == gg_unit_H00B_0049) then
set t1 = "+6 strength and intelligence"
set t2 = "Smasher deals double damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSmash.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNMonkMeditate.blp", 0, true)
endif
if (u == gg_unit_H009_0047) then
set t1 = "+250 mana"
set t2 = "Blizzard chance is increased by 10%"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNOrbOfFrost.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\PassiveButtons\\PASBTNFreezingBreath.blp", 0, true)
endif
if (u == gg_unit_H00O_0062) then
set t1 = "+6 agility and intelligence"
set t2 = "Fire Shield also gains +40% damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHeroAvatarOfFlame.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNFireShield.BLP", 0, true)
endif
if (u == gg_unit_H00F_0053) then
set t1 = "+150 health and mana"
set t2 = "Posion arrows deal +100% damage (only for poison!)"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNLadyVashj.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\ATCPoisonArrows.blp", 0, true)
endif
if (u == gg_unit_H00I_0056) then
set t1 = "+25 damage"
set t2 = "Сhitinous Scale regenerates two times more hp/sec"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNNagaWeaponUp1.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\PASBlue Naga.blp", 0, true)
endif
if (u == gg_unit_H008_0043) then
set t1 = "+15 attack and power"
set t2 = "+1.5 seconds to stun duration from Spikes"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNPitLord.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNImpale.blp", 0, true)
endif
if (u == gg_unit_H00K_0058) then
set t1 = "+7 armor"
set t2 = "+20 chainsaws to Slaughter"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHumanArmorUpOne.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNSaw-upg-3.blp", 0, true)
endif
if (u == gg_unit_H00C_0050) then
set t1 = "+7 hp/sec"
set t2 = "Sandstorm deals 40 damage per seconds (Power can increase the amount of damage)"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNSandstorm3.blp", 0, true)
endif
if (u == gg_unit_H00L_0059) then
set t1 = "+250 health"
set t2 = "+25% bonus incoming damage to Curse of Pain"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTN_BloodCurseV2.blp", 0, true)
endif
if (u == gg_unit_H00P_0063) then
set t1 = "+10% concentration"
set t2 = "+4 seconds to Consenescence duration"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHeal.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNTimeSpell.blp", 0, true)
endif
if (u == gg_unit_H00Q_0064) then
set t1 = "+12 intelligence"
set t2 = "100% trebuchet attack speed"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNTome.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNTrebuchet.blp", 0, true)
endif
if (u == gg_unit_H00N_0061) then
set t1 = "+6 strength and agility"
set t2 = "Jagged Harpoons penetrates 7 armor"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNTuskaarGold.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\PASHarpoon.blp", 0, true)
endif
call BlzFrameSetText(ft1, t1)
call BlzFrameSetText(ft2, t2)
call BlzFrameSetParent(f1, f)
call BlzFrameSetParent(fi1, f)
call BlzFrameSetParent(f2, f)
call BlzFrameSetParent(fi2, f)
call BlzTriggerRegisterFrameEvent(tr1, f1, FRAMEEVENT_CONTROL_CLICK)
call TriggerAddAction(tr1, function ClickTalent31)
call BlzTriggerRegisterFrameEvent(tr2, f2, FRAMEEVENT_CONTROL_CLICK)
call TriggerAddAction(tr2, function ClickTalent32)
if GetLocalPlayer() == Player(2) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",307), true)
endif
endfunction
//===========================================================================
function InitTrig_Talent3 takes nothing returns nothing
set gg_trg_Talent3 = CreateTrigger( )
call TriggerAddAction( gg_trg_Talent3, function Trig_Talent3_Actions )
endfunction
function ClickTalent41 takes nothing returns nothing
local unit u = udg_Hero4
local player p = Player(3)
if (u == gg_unit_H000_0001) then
call BlzSetUnitBaseDamage( u, (BlzGetUnitBaseDamage(u, 0) + 25), 0 )
endif
if (u == gg_unit_H00D_0051) then
set udg_CritHit[GetConvertedPlayerId(p)] = udg_CritHit[GetConvertedPlayerId(p)] + 12
endif
if (u == gg_unit_H00G_0055) then
set udg_Cooldawn[GetConvertedPlayerId(p)] = udg_Cooldawn[GetConvertedPlayerId(p)] + 0.1
endif
if (u == gg_unit_H001_0012) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 6 )
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 6 )
endif
if (u == gg_unit_H002_0022) then
call UnitAddAbility(u, 'A09O')
endif
if (u == gg_unit_H00J_0057) then
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 10 )
endif
if (u == gg_unit_H007_0042) then
set udg_Power[GetConvertedPlayerId(p)] = udg_Power[GetConvertedPlayerId(p)] + 45
endif
if (u == gg_unit_H00M_0060) then
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 12 )
endif
if (u == gg_unit_H006_0027) then
call BlzSetUnitMaxMana(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 250))
endif
if (u == gg_unit_H00H_0054) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 10 )
endif
if (u == gg_unit_H00A_0048) then
call BlzSetUnitMaxHP(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 250))
endif
if (u == gg_unit_H00E_0052) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 5 )
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 5 )
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 5 )
endif
if (u == gg_unit_H00B_0049) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 6 )
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 6 )
endif
if (u == gg_unit_H009_0047) then
call BlzSetUnitMaxMana(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 250))
endif
if (u == gg_unit_H00O_0062) then
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 6 )
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 6 )
endif
if (u == gg_unit_H00F_0053) then
call BlzSetUnitMaxHP(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 150))
call BlzSetUnitMaxMana(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 150))
endif
if (u == gg_unit_H00I_0056) then
call BlzSetUnitBaseDamage( u, (BlzGetUnitBaseDamage(u, 0) + 25), 0 )
endif
if (u == gg_unit_H008_0043) then
call BlzSetUnitBaseDamage( u, (BlzGetUnitBaseDamage(u, 0) + 15), 0 )
set udg_Power[GetConvertedPlayerId(p)] = udg_Power[GetConvertedPlayerId(p)] + 15
endif
if (u == gg_unit_H00K_0058) then
call UnitAddAbility(u, 'A09P')
endif
if (u == gg_unit_H00C_0050) then
call UnitAddAbility(u, 'A09Q')
endif
if (u == gg_unit_H00L_0059) then
call BlzSetUnitMaxHP(u, R2I(GetUnitState(u, UNIT_STATE_MAX_LIFE) + 250))
endif
if (u == gg_unit_H00P_0063) then
set udg_Cooldawn[GetConvertedPlayerId(p)] = udg_Cooldawn[GetConvertedPlayerId(p)] + 0.1
endif
if (u == gg_unit_H00Q_0064) then
call ModifyHeroStat( bj_HEROSTAT_INT, u, bj_MODIFYMETHOD_ADD, 12 )
endif
if (u == gg_unit_H00N_0061) then
call ModifyHeroStat( bj_HEROSTAT_STR, u, bj_MODIFYMETHOD_ADD, 6 )
call ModifyHeroStat( bj_HEROSTAT_AGI, u, bj_MODIFYMETHOD_ADD, 6 )
endif
if GetLocalPlayer() == Player(3) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",407), false)
endif
endfunction
function ClickTalent42 takes nothing returns nothing
local unit u = udg_Hero4
if (u == gg_unit_H000_0001) then
set udg_PalTalent1 = true
endif
if (u == gg_unit_H00D_0051) then
set udg_RifleTalent1 = true
endif
if (u == gg_unit_H00G_0055) then
set udg_WarlTalent1 = true
endif
if (u == gg_unit_H001_0012) then
set udg_BersTalent1 = true
endif
if (u == gg_unit_H002_0022) then
set udg_PiratTalent1 = true
call BlzSetAbilityIntegerLevelField( BlzGetUnitAbility(gg_unit_H002_0022, 'A00C'), ABILITY_ILF_SUMMONED_UNIT_COUNT_HWE2, 0, 2 )
call BlzSetAbilityIntegerLevelField( BlzGetUnitAbility(gg_unit_H002_0022, 'A00C'), ABILITY_ILF_SUMMONED_UNIT_COUNT_HWE2, 1, 2 )
call BlzSetAbilityIntegerLevelField( BlzGetUnitAbility(gg_unit_H002_0022, 'A00C'), ABILITY_ILF_SUMMONED_UNIT_COUNT_HWE2, 2, 2 )
endif
if (u == gg_unit_H00J_0057) then
set udg_ShadTalent1 = true
endif
if (u == gg_unit_H007_0042) then
set udg_NecrTalent1 = true
endif
if (u == gg_unit_H00M_0060) then
set udg_ShamTalent1 = true
endif
if (u == gg_unit_H006_0027) then
set udg_DruidTalent1 = true
endif
if (u == gg_unit_H00H_0054) then
set udg_DeathTalent1 = true
endif
if (u == gg_unit_H00A_0048) then
set udg_StarTalent1 = true
endif
if (u == gg_unit_H00E_0052) then
set udg_MonkTalent1 = true
endif
if (u == gg_unit_H00B_0049) then
set udg_ChiefTalent1 = true
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00B_0049, 'A01B'), ABILITY_RLF_DAMAGE_DEALT_WAR2, 0, 130.00 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00B_0049, 'A01B'), ABILITY_RLF_DAMAGE_DEALT_WAR2, 1, 210.00 )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(gg_unit_H00B_0049, 'A01B'), ABILITY_RLF_DAMAGE_DEALT_WAR2, 2, 290.00 )
endif
if (u == gg_unit_H009_0047) then
set udg_IceTalent1 = true
endif
if (u == gg_unit_H00O_0062) then
set udg_FireTalent1 = true
endif
if (u == gg_unit_H00F_0053) then
set udg_MedTalent1 = true
endif
if (u == gg_unit_H00I_0056) then
set udg_SeaTalent1 = true
endif
if (u == gg_unit_H008_0043) then
set udg_PitTalent1 = true
endif
if (u == gg_unit_H00K_0058) then
set udg_RobotTalent1 = true
endif
if (u == gg_unit_H00C_0050) then
set udg_ScorpTalent1 = true
endif
if (u == gg_unit_H00L_0059) then
set udg_DemonTalent1 = true
endif
if (u == gg_unit_H00P_0063) then
set udg_TimeTalent1 = true
endif
if (u == gg_unit_H00Q_0064) then
set udg_SiegeTalent1 = true
endif
if (u == gg_unit_H00N_0061) then
set udg_FishTalent1 = true
endif
if GetLocalPlayer() == Player(3) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",407), false)
endif
endfunction
function Trig_Talent4_Actions takes nothing returns nothing
local framehandle f1
local framehandle fi1
local framehandle fd1
local framehandle ft1
local framehandle f2
local framehandle fi2
local framehandle fd2
local framehandle ft2
local framehandle f
local framehandle fs1
local unit u = udg_Hero4
local string t1
local string t2
local trigger tr1 = CreateTrigger()
local trigger tr2 = CreateTrigger()
set f = BlzCreateFrame("EscMenuBackdrop", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), 0,407)
call BlzFrameSetAbsPoint(f, FRAMEPOINT_CENTER, 0.4, 0.30)
call BlzFrameSetSize(f, 0.4, 0.25)
set f1 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 401)
set fi1 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 401)
set fd1 = BlzCreateFrame("ListBoxWar3", f1, 0, 0)
set ft1 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd1, "StandardInfoTextTemplate", 401)
call BlzFrameSetSize(f1, 0.05, 0.05)
call BlzFrameSetSize(fd1, 0.36, 0.13)
call BlzFrameSetSize(ft1, 0.34, 0.11)
call BlzFrameSetAbsPoint(f1, FRAMEPOINT_CENTER, 0.27, 0.37)
call BlzFrameSetPoint(ft1, FRAMEPOINT_CENTER, fd1, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd1, FRAMEPOINT_CENTER, 0.4, 0.27)
call BlzFrameSetTooltip(f1, fd1)
call BlzFrameSetText(ft1, "1")
set f2 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 402)
set fi2 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 402)
set fd2 = BlzCreateFrame("ListBoxWar3", f2, 0, 0)
set ft2 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd2, "StandardInfoTextTemplate", 402)
call BlzFrameSetSize(f2, 0.05, 0.05)
call BlzFrameSetSize(fd2, 0.36, 0.13)
call BlzFrameSetSize(ft2, 0.34, 0.11)
call BlzFrameSetAbsPoint(f2, FRAMEPOINT_CENTER, 0.52, 0.37)
call BlzFrameSetPoint(ft2, FRAMEPOINT_CENTER, fd2, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd2, FRAMEPOINT_CENTER, 0.4, 0.27)
call BlzFrameSetTooltip(f2, fd2)
call BlzFrameSetText(ft2, "1")
set fs1 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", f, "StandardInfoTextTemplate", 405)
call BlzFrameSetAbsPoint(fs1, FRAMEPOINT_CENTER, 0.4, 0.37)
call BlzFrameSetText(fs1, "|cffffff00Choose your talent|r")
call BlzFrameSetScale(fs1, 2)
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",407), false)
if (u == gg_unit_H000_0001) then
set t1 = "+25 damage"
set t2 = "Holy Light blinds enemies for 5 seconds causing them to miss with 50% chance"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSteelMelee.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNHolyBolt.blp", 0, true)
endif
if (u == gg_unit_H00D_0051) then
set t1 = "+12% critical chance"
set t2 = "Mark of the Sniper reduces target's armor by 12"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNDwarvenLongRifle.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNSniperRifle.blp", 0, true)
endif
if (u == gg_unit_H00G_0055) then
set t1 = "+10% concentration"
set t2 = "Lightning Bolt deals 50% more damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHeal.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNLightning Strike.blp", 0, true)
endif
if (u == gg_unit_H001_0012) then
set t1 = "+6 strength and agility"
set t2 = "Circular Attack deals 50% more damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNBerserk.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNWBurstv3.blp", 0, true)
endif
if (u == gg_unit_H002_0022) then
set t1 = "+40% attack speed"
set t2 = "Summons two cannons instead of one"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNGlove.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNHumanMissileUpOne.blp", 0, true)
endif
if (u == gg_unit_H00J_0057) then
set t1 = "+10 agility"
set t2 = "Shuriken can deal critical strikes (same chance and damage as the hero has)"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSlippersOfAgility.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNUpgradeMoonGlaive.blp", 0, true)
endif
if (u == gg_unit_H007_0042) then
set t1 = "+45 power"
set t2 = "+100% health to all summoned skeletons"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNPriestAdept.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNSkeletonMage.blp", 0, true)
endif
if (u == gg_unit_H00M_0060) then
set t1 = "+12 intelligence"
set t2 = "Totems deal 50% more damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNTome.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNTaurenTotem.blp", 0, true)
endif
if (u == gg_unit_H006_0027) then
set t1 = "+250 mana"
set t2 = "+1 sec to Root duration"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNStaffOfPreservation.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNEntanglingRoots.blp", 0, true)
endif
if (u == gg_unit_H00H_0054) then
set t1 = "+10 strength"
set t2 = "Sacrifial fire is now save"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNDeathPact.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNFireSwordStorm_v.1.2.blp", 0, true)
endif
if (u == gg_unit_H00A_0048) then
set t1 = "+250 health"
set t2 = "Starfall deals 50% more damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNStarfall.blp", 0, true)
endif
if (u == gg_unit_H00E_0052) then
set t1 = "+5 to main attributes"
set t2 = "Adds +15 armor and +40% resistance during the meditation"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\PassiveButtons\\PASBTNStatUp.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNMonkMeditate.blp", 0, true)
endif
if (u == gg_unit_H00B_0049) then
set t1 = "+6 strength and intelligence"
set t2 = "Smasher deals double damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSmash.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNMonkMeditate.blp", 0, true)
endif
if (u == gg_unit_H009_0047) then
set t1 = "+250 mana"
set t2 = "Blizzard chance is increased by 10%"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNOrbOfFrost.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\PassiveButtons\\PASBTNFreezingBreath.blp", 0, true)
endif
if (u == gg_unit_H00O_0062) then
set t1 = "+6 agility and intelligence"
set t2 = "Fire Shield also gains +40% damage"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHeroAvatarOfFlame.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNFireShield.BLP", 0, true)
endif
if (u == gg_unit_H00F_0053) then
set t1 = "+150 health and mana"
set t2 = "Posion arrows deal +100% damage (only for poison!)"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNLadyVashj.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\ATCPoisonArrows.blp", 0, true)
endif
if (u == gg_unit_H00I_0056) then
set t1 = "+25 damage"
set t2 = "Сhitinous Scale regenerates two times more hp/sec"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNNagaWeaponUp1.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\PASBlue Naga.blp", 0, true)
endif
if (u == gg_unit_H008_0043) then
set t1 = "+15 attack and power"
set t2 = "+1.5 seconds to stun duration from Spikes"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNPitLord.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\CommandButtons\\BTNImpale.blp", 0, true)
endif
if (u == gg_unit_H00K_0058) then
set t1 = "+7 armor"
set t2 = "+20 chainsaws to Slaughter"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHumanArmorUpOne.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNSaw-upg-3.blp", 0, true)
endif
if (u == gg_unit_H00C_0050) then
set t1 = "+7 hp/sec"
set t2 = "Sandstorm deals 40 damage per seconds (Power can increase the amount of damage)"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNSandstorm3.blp", 0, true)
endif
if (u == gg_unit_H00L_0059) then
set t1 = "+250 health"
set t2 = "+25% bonus incoming damage to Curse of Pain"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTN_BloodCurseV2.blp", 0, true)
endif
if (u == gg_unit_H00P_0063) then
set t1 = "+10% concentration"
set t2 = "+4 seconds to Consenescence duration"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHeal.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNTimeSpell.blp", 0, true)
endif
if (u == gg_unit_H00Q_0064) then
set t1 = "+12 intelligence"
set t2 = "100% trebuchet attack speed"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNTome.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\BTNTrebuchet.blp", 0, true)
endif
if (u == gg_unit_H00N_0061) then
set t1 = "+6 strength and agility"
set t2 = "Jagged Harpoons penetrates 7 armor"
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNTuskaarGold.blp", 0, true)
call BlzFrameSetTexture(fi2, "war3mapImported\\PASHarpoon.blp", 0, true)
endif
call BlzFrameSetText(ft1, t1)
call BlzFrameSetText(ft2, t2)
call BlzFrameSetParent(f1, f)
call BlzFrameSetParent(fi1, f)
call BlzFrameSetParent(f2, f)
call BlzFrameSetParent(fi2, f)
call BlzTriggerRegisterFrameEvent(tr1, f1, FRAMEEVENT_CONTROL_CLICK)
call TriggerAddAction(tr1, function ClickTalent41)
call BlzTriggerRegisterFrameEvent(tr2, f2, FRAMEEVENT_CONTROL_CLICK)
call TriggerAddAction(tr2, function ClickTalent42)
if GetLocalPlayer() == Player(3) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",407), true)
endif
endfunction
//===========================================================================
function InitTrig_Talent4 takes nothing returns nothing
set gg_trg_Talent4 = CreateTrigger( )
call TriggerAddAction( gg_trg_Talent4, function Trig_Talent4_Actions )
endfunction
function Trig_LevelUpDamage_Conditions takes nothing returns boolean
local boolean b1 = ( GetTriggerUnit() == udg_Hero1 )
local boolean b2 = ( GetTriggerUnit() == udg_Hero2 )
local boolean b3 = ( GetTriggerUnit() == udg_Hero3 )
local boolean b4 = ( GetTriggerUnit() == udg_Hero4 )
return (b1 or b2 or b3 or b4)
endfunction
function Trig_LevelUpDamage_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local integer a = BlzGetUnitBaseDamage(u, 0) + 3
call BlzSetUnitBaseDamage( u, a, 0 )
set u = null
endfunction
//===========================================================================
function InitTrig_LevelUpDamage takes nothing returns nothing
set gg_trg_LevelUpDamage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_LevelUpDamage, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_LevelUpDamage, Condition( function Trig_LevelUpDamage_Conditions ) )
call TriggerAddAction( gg_trg_LevelUpDamage, function Trig_LevelUpDamage_Actions )
endfunction
function Trig_StatHero1_Actions takes nothing returns nothing
local real ch = udg_CritHit[GetConvertedPlayerId(GetOwningPlayer(udg_Hero1))] + 0.5*GetHeroAgi(udg_Hero1, true)
local real cd = udg_CritDamage[GetConvertedPlayerId(GetOwningPlayer(udg_Hero1))]
local real ev = 0.01*(udg_Evasion[GetConvertedPlayerId(GetOwningPlayer(udg_Hero1))] + 0.5*GetHeroAgi(udg_Hero1, true))
local integer res = 1 + (udg_Resist[GetConvertedPlayerId(GetOwningPlayer(udg_Hero1))]/2) + (GetHeroStr(udg_Hero1, true)/6)
local integer p = R2I(udg_Power[GetConvertedPlayerId(GetOwningPlayer(udg_Hero1))])
local integer cn = R2I(100*udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(udg_Hero1))])
if (ch >= 75) then
set ch = 75
endif
if (ev >= 0.75) then
set ev = 0.75
endif
if (res >= 41) then
set res = 41
endif
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(udg_Hero1, 'A03O'), ABILITY_RLF_CHANCE_TO_CRITICAL_STRIKE, 0, ch )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(udg_Hero1, 'A03O'), ABILITY_RLF_DAMAGE_MULTIPLIER_OCR2, 0, cd )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(udg_Hero1, 'A03O'), ABILITY_RLF_CHANCE_TO_EVADE_OCR4, 0, ev )
call SetUnitAbilityLevel(udg_Hero1, 'A03P', res)
set udg_STR1 = "|cff8080ffPower: |r" + I2S(p+GetHeroInt(udg_Hero1, true))
set udg_STR1 = udg_STR1 + "|n|cffff0000Critical Chance: |r" + I2S(R2I(ch)) + "%"
set udg_STR1 = udg_STR1 + "|n|cffF06100Critical Damage: |r" + I2S(R2I(cd*100)) + "%"
set udg_STR1 = udg_STR1 + "|n|cfff4fe09Resistance: |r" + I2S(udg_Resist[GetConvertedPlayerId(GetOwningPlayer(udg_Hero1))] + (GetHeroStr(udg_Hero1, true)/3)) + "%"
set udg_STR1 = udg_STR1 + "|n|cff00ff00Evasion: |r" + I2S(R2I(ev*100)) + "%"
set udg_STR1 = udg_STR1 + "|n|cff00ffffConcentration: |r" + I2S(R2I(cn)) + "%"
call BlzSetAbilityExtendedTooltip( 'A03O', udg_STR1, 0 )
endfunction
//===========================================================================
function InitTrig_StatHero1 takes nothing returns nothing
set gg_trg_StatHero1 = CreateTrigger( )
call DisableTrigger(gg_trg_StatHero1)
call TriggerRegisterTimerEvent( gg_trg_StatHero1, 1.00, true )
call TriggerAddAction( gg_trg_StatHero1, function Trig_StatHero1_Actions )
endfunction
function Trig_StatHero2_Actions takes nothing returns nothing
local real ch = udg_CritHit[GetConvertedPlayerId(GetOwningPlayer(udg_Hero2))] + 0.5*GetHeroAgi(udg_Hero2, true)
local real cd = udg_CritDamage[GetConvertedPlayerId(GetOwningPlayer(udg_Hero2))]
local real ev = 0.01*(udg_Evasion[GetConvertedPlayerId(GetOwningPlayer(udg_Hero2))] + 0.5*GetHeroAgi(udg_Hero2, true))
local integer res = 1 + (udg_Resist[GetConvertedPlayerId(GetOwningPlayer(udg_Hero2))]/2) + (GetHeroStr(udg_Hero2, true)/6)
local integer p = R2I(udg_Power[GetConvertedPlayerId(GetOwningPlayer(udg_Hero2))])
local integer cn = R2I(100*udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(udg_Hero2))])
if (ch >= 75) then
set ch = 75
endif
if (ev >= 0.75) then
set ev = 0.75
endif
if (res >= 41) then
set res = 41
endif
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(udg_Hero2, 'A03Q'), ABILITY_RLF_CHANCE_TO_CRITICAL_STRIKE, 0, ch )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(udg_Hero2, 'A03Q'), ABILITY_RLF_DAMAGE_MULTIPLIER_OCR2, 0, cd )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(udg_Hero2, 'A03Q'), ABILITY_RLF_CHANCE_TO_EVADE_OCR4, 0, ev )
call SetUnitAbilityLevel(udg_Hero2, 'A03P', res)
set udg_STR2 = "|cff8080ffPower: |r" + I2S(p+GetHeroInt(udg_Hero2, true))
set udg_STR2 = udg_STR2 + "|n|cffff0000Critical Chance: |r" + I2S(R2I(ch)) + "%"
set udg_STR2 = udg_STR2 + "|n|cffF06100Critical Damage: |r" + I2S(R2I(cd*100)) + "%"
set udg_STR2 = udg_STR2 + "|n|cfff4fe09Resistance: |r" + I2S(udg_Resist[GetConvertedPlayerId(GetOwningPlayer(udg_Hero2))] + (GetHeroStr(udg_Hero2, true)/3)) + "%"
set udg_STR2 = udg_STR2 + "|n|cff00ff00Evasion: |r" + I2S(R2I(ev*100)) + "%"
set udg_STR2 = udg_STR2 + "|n|cff00ffffConcentration: |r" + I2S(R2I(cn)) + "%"
call BlzSetAbilityExtendedTooltip( 'A03Q', udg_STR2, 0 )
endfunction
//===========================================================================
function InitTrig_StatHero2 takes nothing returns nothing
set gg_trg_StatHero2 = CreateTrigger( )
call DisableTrigger(gg_trg_StatHero2)
call TriggerRegisterTimerEvent( gg_trg_StatHero2, 1.00, true )
call TriggerAddAction( gg_trg_StatHero2, function Trig_StatHero2_Actions )
endfunction
function Trig_StatHero3_Actions takes nothing returns nothing
local real ch = udg_CritHit[GetConvertedPlayerId(GetOwningPlayer(udg_Hero3))] + 0.5*GetHeroAgi(udg_Hero3, true)
local real cd = udg_CritDamage[GetConvertedPlayerId(GetOwningPlayer(udg_Hero3))]
local real ev = 0.01*(udg_Evasion[GetConvertedPlayerId(GetOwningPlayer(udg_Hero3))] + 0.5*GetHeroAgi(udg_Hero3, true))
local integer res = 1 + (udg_Resist[GetConvertedPlayerId(GetOwningPlayer(udg_Hero3))]/2) + (GetHeroStr(udg_Hero3, true)/6)
local integer p = R2I(udg_Power[GetConvertedPlayerId(GetOwningPlayer(udg_Hero3))])
local integer cn = R2I(100*udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(udg_Hero3))])
if (ch >= 75) then
set ch = 75
endif
if (ev >= 0.75) then
set ev = 0.75
endif
if (res >= 41) then
set res = 41
endif
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(udg_Hero3, 'A03R'), ABILITY_RLF_CHANCE_TO_CRITICAL_STRIKE, 0, ch )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(udg_Hero3, 'A03R'), ABILITY_RLF_DAMAGE_MULTIPLIER_OCR2, 0, cd )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(udg_Hero3, 'A03R'), ABILITY_RLF_CHANCE_TO_EVADE_OCR4, 0, ev )
call SetUnitAbilityLevel(udg_Hero3, 'A03P', res)
set udg_STR3 = "|cff8080ffPower: |r" + I2S(p+GetHeroInt(udg_Hero3, true))
set udg_STR3 = udg_STR3 + "|n|cffff0000Critical Chance: |r" + I2S(R2I(ch)) + "%"
set udg_STR3 = udg_STR3 + "|n|cffF06100Critical Damage: |r" + I2S(R2I(cd*100)) + "%"
set udg_STR3 = udg_STR3 + "|n|cfff4fe09Resistance: |r" + I2S(udg_Resist[GetConvertedPlayerId(GetOwningPlayer(udg_Hero3))] + (GetHeroStr(udg_Hero3, true)/3)) + "%"
set udg_STR3 = udg_STR3 + "|n|cff00ff00Evasion: |r" + I2S(R2I(ev*100)) + "%"
set udg_STR3 = udg_STR3 + "|n|cff00ffffConcentration: |r" + I2S(R2I(cn)) + "%"
call BlzSetAbilityExtendedTooltip( 'A03R', udg_STR3, 0 )
endfunction
//===========================================================================
function InitTrig_StatHero3 takes nothing returns nothing
set gg_trg_StatHero3 = CreateTrigger( )
call DisableTrigger(gg_trg_StatHero3)
call TriggerRegisterTimerEvent( gg_trg_StatHero3, 1.00, true )
call TriggerAddAction( gg_trg_StatHero3, function Trig_StatHero3_Actions )
endfunction
function Trig_StatHero4_Actions takes nothing returns nothing
local real ch = udg_CritHit[GetConvertedPlayerId(GetOwningPlayer(udg_Hero4))] + 0.5*GetHeroAgi(udg_Hero4, true)
local real cd = udg_CritDamage[GetConvertedPlayerId(GetOwningPlayer(udg_Hero4))]
local real ev = 0.01*(udg_Evasion[GetConvertedPlayerId(GetOwningPlayer(udg_Hero4))] + 0.5*GetHeroAgi(udg_Hero4, true))
local integer res = 1 + (udg_Resist[GetConvertedPlayerId(GetOwningPlayer(udg_Hero4))]/2) + (GetHeroStr(udg_Hero4, true)/6)
local integer p = R2I(udg_Power[GetConvertedPlayerId(GetOwningPlayer(udg_Hero4))])
local integer cn = R2I(100*udg_Cooldawn[GetConvertedPlayerId(GetOwningPlayer(udg_Hero4))])
if (ch >= 75) then
set ch = 75
endif
if (ev >= 0.75) then
set ev = 0.75
endif
if (res >= 41) then
set res = 41
endif
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(udg_Hero4, 'A03S'), ABILITY_RLF_CHANCE_TO_CRITICAL_STRIKE, 0, ch )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(udg_Hero4, 'A03S'), ABILITY_RLF_DAMAGE_MULTIPLIER_OCR2, 0, cd )
call BlzSetAbilityRealLevelField( BlzGetUnitAbility(udg_Hero4, 'A03S'), ABILITY_RLF_CHANCE_TO_EVADE_OCR4, 0, ev )
call SetUnitAbilityLevel(udg_Hero4, 'A03P', res)
set udg_STR4 = "|cff8080ffPower: |r" + I2S(p+GetHeroInt(udg_Hero4, true))
set udg_STR4 = udg_STR4 + "|n|cffff0000Critical Chance: |r" + I2S(R2I(ch)) + "%"
set udg_STR4 = udg_STR4 + "|n|cffF06100Critical Damage: |r" + I2S(R2I(cd*100)) + "%"
set udg_STR4 = udg_STR4 + "|n|cfff4fe09Resistance: |r" + I2S(udg_Resist[GetConvertedPlayerId(GetOwningPlayer(udg_Hero4))] + (GetHeroStr(udg_Hero4, true)/3)) + "%"
set udg_STR4 = udg_STR4 + "|n|cff00ff00Evasion: |r" + I2S(R2I(ev*100)) + "%"
set udg_STR4 = udg_STR4 + "|n|cff00ffffConcentration: |r" + I2S(R2I(cn)) + "%"
call BlzSetAbilityExtendedTooltip( 'A03S', udg_STR4, 0 )
endfunction
//===========================================================================
function InitTrig_StatHero4 takes nothing returns nothing
set gg_trg_StatHero4 = CreateTrigger( )
call DisableTrigger(gg_trg_StatHero4)
call TriggerRegisterTimerEvent( gg_trg_StatHero4, 1.00, true )
call TriggerAddAction( gg_trg_StatHero4, function Trig_StatHero4_Actions )
endfunction
function Trig_CameraPlayer1_Actions takes nothing returns nothing
if ( udg_HeroNumber1 == 1 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_001, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 2 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_002, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 3 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_003, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 4 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_004, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 5 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_005, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 6 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_006, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 7 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_007, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 8 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_008, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 9 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_009, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 10 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_010, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 11 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_011, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 12 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_012, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 13 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_013, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 14 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_014, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 15 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_015, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 16 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_016, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 17 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_017, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 18 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_018, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 19 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_019, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 20 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_020, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 21 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_021, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 22 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_022, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 23 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_023, Player(0), 0 )
endif
if ( udg_HeroNumber1 == 24 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_024, Player(0), 0 )
endif
endfunction
//===========================================================================
function InitTrig_CameraPlayer1 takes nothing returns nothing
set gg_trg_CameraPlayer1 = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_CameraPlayer1, 0.03 )
call TriggerAddAction( gg_trg_CameraPlayer1, function Trig_CameraPlayer1_Actions )
endfunction
function Trig_CameraPlayer2_Actions takes nothing returns nothing
if ( udg_HeroNumber2 == 1 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_001, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 2 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_002, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 3 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_003, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 4 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_004, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 5 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_005, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 6 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_006, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 7 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_007, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 8 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_008, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 9 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_009, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 10 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_010, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 11 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_011, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 12 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_012, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 13 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_013, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 14 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_014, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 15 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_015, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 16 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_016, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 17 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_017, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 18 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_018, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 19 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_019, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 20 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_020, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 21 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_021, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 22 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_022, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 23 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_023, Player(1), 0 )
endif
if ( udg_HeroNumber2 == 24 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_024, Player(1), 0 )
endif
endfunction
//===========================================================================
function InitTrig_CameraPlayer2 takes nothing returns nothing
set gg_trg_CameraPlayer2 = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_CameraPlayer2, 0.03 )
call TriggerAddAction( gg_trg_CameraPlayer2, function Trig_CameraPlayer2_Actions )
endfunction
function Trig_CameraPlayer3_Actions takes nothing returns nothing
if ( udg_HeroNumber3 == 1 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_001, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 2 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_002, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 3 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_003, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 4 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_004, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 5 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_005, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 6 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_006, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 7 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_007, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 8 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_008, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 9 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_009, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 10 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_010, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 11 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_011, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 12 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_012, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 13 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_013, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 14 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_014, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 15 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_015, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 16 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_016, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 17 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_017, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 18 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_018, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 19 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_019, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 20 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_020, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 21 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_021, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 22 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_022, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 23 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_023, Player(2), 0 )
endif
if ( udg_HeroNumber3 == 24 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_024, Player(2), 0 )
endif
endfunction
//===========================================================================
function InitTrig_CameraPlayer3 takes nothing returns nothing
set gg_trg_CameraPlayer3 = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_CameraPlayer3, 0.03 )
call TriggerAddAction( gg_trg_CameraPlayer3, function Trig_CameraPlayer3_Actions )
endfunction
function Trig_CameraPlayer4_Actions takes nothing returns nothing
if ( udg_HeroNumber4 == 1 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_001, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 2 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_002, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 3 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_003, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 4 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_004, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 5 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_005, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 6 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_006, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 7 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_007, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 8 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_008, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 9 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_009, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 10 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_010, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 11 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_011, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 12 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_012, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 13 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_013, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 14 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_014, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 15 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_015, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 16 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_016, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 17 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_017, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 18 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_018, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 19 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_019, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 20 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_020, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 21 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_021, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 22 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_022, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 23 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_023, Player(3), 0 )
endif
if ( udg_HeroNumber4 == 24 ) then
call CameraSetupApplyForPlayer( true, gg_cam_Camera_024, Player(3), 0 )
endif
endfunction
//===========================================================================
function InitTrig_CameraPlayer4 takes nothing returns nothing
set gg_trg_CameraPlayer4 = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_CameraPlayer4, 0.03 )
call TriggerAddAction( gg_trg_CameraPlayer4, function Trig_CameraPlayer4_Actions )
endfunction
function RunCooldawn takes unit u returns nothing
if (u == gg_unit_H000_0001) then
call EnableTrigger(gg_trg_CdnPaladin)
endif
if (u == gg_unit_H00D_0051) then
call EnableTrigger(gg_trg_CduRifle)
endif
if (u == gg_unit_H00G_0055) then
call EnableTrigger(gg_trg_CduWarlock)
endif
if (u == gg_unit_H001_0012) then
call EnableTrigger(gg_trg_CdnBerserk)
endif
if (u == gg_unit_H002_0022) then
call EnableTrigger(gg_trg_CdnPirate)
endif
if (u == gg_unit_H00J_0057) then
call EnableTrigger(gg_trg_CduSahdow)
endif
if (u == gg_unit_H007_0042) then
call EnableTrigger(gg_trg_CduNecro)
endif
if (u == gg_unit_H00M_0060) then
call EnableTrigger(gg_trg_CduShaman)
endif
if (u == gg_unit_H006_0027) then
call EnableTrigger(gg_trg_CdnDruid)
endif
if (u == gg_unit_H00H_0054) then
call EnableTrigger(gg_trg_CduDeahK)
endif
if (u == gg_unit_H00A_0048) then
call EnableTrigger(gg_trg_CduStar)
endif
if (u == gg_unit_H00E_0052) then
call EnableTrigger(gg_trg_CduMonk)
endif
if (u == gg_unit_H00B_0049) then
call EnableTrigger(gg_trg_CduChief)
endif
if (u == gg_unit_H009_0047) then
call EnableTrigger(gg_trg_CduIce)
endif
if (u == gg_unit_H00O_0062) then
call EnableTrigger(gg_trg_CduFiregod)
endif
if (u == gg_unit_H00F_0053) then
call EnableTrigger(gg_trg_CduMedusa)
endif
if (u == gg_unit_H00I_0056) then
call EnableTrigger(gg_trg_CduOcean)
endif
if (u == gg_unit_H008_0043) then
call EnableTrigger(gg_trg_CduPit)
endif
if (u == gg_unit_H00K_0058) then
call EnableTrigger(gg_trg_CduRobot)
endif
if (u == gg_unit_H00C_0050) then
call EnableTrigger(gg_trg_CduScorp)
endif
if (u == gg_unit_H00L_0059) then
call EnableTrigger(gg_trg_CduDemon)
endif
if (u == gg_unit_H00P_0063) then
call EnableTrigger(gg_trg_CduTime)
endif
if (u == gg_unit_H00Q_0064) then
call EnableTrigger(gg_trg_CduSiege)
endif
if (u == gg_unit_H00N_0061) then
call EnableTrigger(gg_trg_CduFisher)
endif
endfunction
function ClickFrame1 takes nothing returns nothing
local unit u
if (udg_HeroNumber1 == 1) then
set u = gg_unit_H000_0001
endif
if (udg_HeroNumber1 == 2) then
set u = gg_unit_H00D_0051
endif
if (udg_HeroNumber1 == 3) then
set u = gg_unit_H00G_0055
endif
if (udg_HeroNumber1 == 4) then
set u = gg_unit_H001_0012
endif
if (udg_HeroNumber1 == 5) then
set u = gg_unit_H002_0022
endif
if (udg_HeroNumber1 == 6) then
set u = gg_unit_H00J_0057
endif
if (udg_HeroNumber1 == 7) then
set u = gg_unit_H007_0042
endif
if (udg_HeroNumber1 == 8) then
set u = gg_unit_H00M_0060
endif
if (udg_HeroNumber1 == 9) then
set u = gg_unit_H006_0027
endif
if (udg_HeroNumber1 == 10) then
set u = gg_unit_H00H_0054
endif
if (udg_HeroNumber1 == 11) then
set u = gg_unit_H00A_0048
endif
if (udg_HeroNumber1 == 12) then
set u = gg_unit_H00E_0052
endif
if (udg_HeroNumber1 == 13) then
set u = gg_unit_H00B_0049
endif
if (udg_HeroNumber1 == 14) then
set u = gg_unit_H009_0047
endif
if (udg_HeroNumber1 == 15) then
set u = gg_unit_H00O_0062
endif
if (udg_HeroNumber1 == 16) then
set u = gg_unit_H00F_0053
endif
if (udg_HeroNumber1 == 17) then
set u = gg_unit_H00I_0056
endif
if (udg_HeroNumber1 == 18) then
set u = gg_unit_H008_0043
endif
if (udg_HeroNumber1 == 19) then
set u = gg_unit_H00K_0058
endif
if (udg_HeroNumber1 == 20) then
set u = gg_unit_H00C_0050
endif
if (udg_HeroNumber1 == 21) then
set u = gg_unit_H00L_0059
endif
if (udg_HeroNumber1 == 22) then
set u = gg_unit_H00P_0063
endif
if (udg_HeroNumber1 == 23) then
set u = gg_unit_H00Q_0064
endif
if (udg_HeroNumber1 == 24) then
set u = gg_unit_H00N_0061
endif
if (GetOwningPlayer(u) == Player(PLAYER_NEUTRAL_PASSIVE)) then
set udg_Hero1 = u
call SetUnitOwner( udg_Hero1, Player(0), true )
call UnitAddAbility( udg_Hero1, 'A03O' )
call UnitAddAbility( udg_Hero1, 'A03P' )
call EnableTrigger( gg_trg_StatHero1 )
call SetUnitPositionLoc(udg_Hero1, Location(-5500, -14600))
if GetLocalPlayer() == Player(0) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",7), false)
endif
call RunCooldawn(udg_Hero1)
call DisableTrigger(gg_trg_CameraPlayer1)
call DisableTrigger(gg_trg_MoveRight1)
call DisableTrigger(gg_trg_MoveLeft1)
call ResetToGameCameraForPlayer( Player(0), 0 )
call SetCameraTargetControllerNoZForPlayer( Player(0), udg_Hero1, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(0), 0 )
call AdjustPlayerStateBJ( 750, Player(0), PLAYER_STATE_RESOURCE_GOLD )
set udg_StartReady = udg_StartReady + 1
if (udg_StartReady >= udg_PlayerFactor) then
call TriggerExecute(gg_trg_StartForest)
endif
else
call DisplayTextToForce( GetForceOfPlayer(Player(0)), "Этого героя уже выбрали :(" )
endif
endfunction
function Trig_Frames1_Actions takes nothing returns nothing
local framehandle f
local framehandle f1
local framehandle f2
local framehandle f3
local framehandle f4
local framehandle fi1
local framehandle fi2
local framehandle fi3
local framehandle fi4
local framehandle fd1
local framehandle fd2
local framehandle fd3
local framehandle fd4
local framehandle ft1
local framehandle ft2
local framehandle ft3
local framehandle ft4
local framehandle fs1
local framehandle fs2
local framehandle fsd2
local framehandle fb
local framehandle fib
local string t1
local string t2
local string t3
local string t4
local string tm
local string tt
local trigger t = CreateTrigger()
set tm = "|cffffff00Crusader|r"
set tt = BlzGetAbilityExtendedTooltip('A07J', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A000', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A002', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A004', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A005', 0)
set f = BlzCreateFrame("EscMenuBackdrop", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), 0,7)
call BlzFrameSetAbsPoint(f, FRAMEPOINT_CENTER, 0.6, 0.35)
call BlzFrameSetSize(f, 0.4, 0.35)
set f1 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 1)
set fi1 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 1)
set fd1 = BlzCreateFrame("ListBoxWar3", f1, 0, 0)
set ft1 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd1, "StandardInfoTextTemplate", 1)
call BlzFrameSetSize(f1, 0.05, 0.05)
call BlzFrameSetSize(fd1, 0.36, 0.13)
call BlzFrameSetSize(ft1, 0.34, 0.11)
call BlzFrameSetAbsPoint(f1, FRAMEPOINT_CENTER, 0.48, 0.37)
call BlzFrameSetPoint(ft1, FRAMEPOINT_CENTER, fd1, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd1, FRAMEPOINT_CENTER, 0.6, 0.27)
call BlzFrameSetTooltip(f1, fd1)
call BlzFrameSetText(ft1, t1)
set f2 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 2)
set fi2 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 2)
set fd2 = BlzCreateFrame("ListBoxWar3", f2, 0, 0)
set ft2 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd2, "StandardInfoTextTemplate", 2)
call BlzFrameSetSize(f2, 0.05, 0.05)
call BlzFrameSetSize(fd2, 0.36, 0.13)
call BlzFrameSetSize(ft2, 0.34, 0.11)
call BlzFrameSetAbsPoint(f2, FRAMEPOINT_CENTER, 0.56, 0.37)
call BlzFrameSetPoint(ft2, FRAMEPOINT_CENTER, fd2, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd2, FRAMEPOINT_CENTER, 0.6, 0.27)
call BlzFrameSetTooltip(f2, fd2)
call BlzFrameSetText(ft2, t2)
set f3 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 3)
set fi3 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 3)
set fd3 = BlzCreateFrame("ListBoxWar3", f3, 0, 0)
set ft3 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd3, "StandardInfoTextTemplate", 3)
call BlzFrameSetSize(f3, 0.05, 0.05)
call BlzFrameSetSize(fd3, 0.36, 0.13)
call BlzFrameSetSize(ft3, 0.34, 0.11)
call BlzFrameSetAbsPoint(f3, FRAMEPOINT_CENTER, 0.64, 0.37)
call BlzFrameSetPoint(ft3, FRAMEPOINT_CENTER, fd3, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd3, FRAMEPOINT_CENTER, 0.6, 0.27)
call BlzFrameSetTooltip(f3, fd3)
call BlzFrameSetText(ft3, t3)
set f4 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 4)
set fi4 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 4)
set fd4 = BlzCreateFrame("ListBoxWar3", f4, 0, 0)
set ft4 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd4, "StandardInfoTextTemplate", 4)
call BlzFrameSetSize(f4, 0.05, 0.05)
call BlzFrameSetSize(fd4, 0.36, 0.13)
call BlzFrameSetSize(ft4, 0.34, 0.11)
call BlzFrameSetAbsPoint(f4, FRAMEPOINT_CENTER, 0.72, 0.37)
call BlzFrameSetPoint(ft4, FRAMEPOINT_CENTER, fd4, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd4, FRAMEPOINT_CENTER, 0.6, 0.27)
call BlzFrameSetTooltip(f4, fd4)
call BlzFrameSetText(ft4, t4)
set fs1 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", f, "StandardInfoTextTemplate", 5)
call BlzFrameSetAbsPoint(fs1, FRAMEPOINT_CENTER, 0.6, 0.49)
call BlzFrameSetText(fs1, tm)
call BlzFrameSetScale(fs1, 2.4)
set fs2 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", f, "StandardInfoTextTemplate", 6)
set fsd2 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", f, "StandardInfoTextTemplate", 8)
call BlzFrameSetSize(fsd2, 0.35, 0.13)
call BlzFrameSetSize(fs2, 0.33, 0.11)
call BlzFrameSetPoint(fs2, FRAMEPOINT_CENTER, fsd2, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fsd2, FRAMEPOINT_CENTER, 0.62, 0.40)
call BlzFrameSetText(fs2, tt)
call BlzFrameSetScale(fs2, 1.2)
set fb = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 0)
set fib = BlzGetFrameByName("ScoreScreenButtonBackdrop", 0)
call BlzFrameSetSize(fb, 0.04, 0.04)
call BlzFrameSetAbsPoint(fb, FRAMEPOINT_CENTER, 0.75, 0.49)
call BlzFrameSetTexture(fib, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp", 0, true)
call BlzFrameSetParent(f1, f)
call BlzFrameSetParent(fi1, f)
call BlzFrameSetParent(f2, f)
call BlzFrameSetParent(fi2, f)
call BlzFrameSetParent(f3, f)
call BlzFrameSetParent(fi3, f)
call BlzFrameSetParent(f4, f)
call BlzFrameSetParent(fi4, f)
call BlzFrameSetParent(fs1, f)
call BlzFrameSetParent(fs2, f)
call BlzFrameSetParent(fsd2, f)
call BlzFrameSetParent(fb, f)
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHolyBolt.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\PassiveButtons\\PASBTNStormHammer.blp", 0, true)
call BlzFrameSetTexture(fi3, "war3mapImported\\BTNBless.blp", 0, true)
call BlzFrameSetTexture(fi4, "ReplaceableTextures\\CommandButtons\\BTNResurrection.blp", 0, true)
call BlzTriggerRegisterFrameEvent(t, fb, FRAMEEVENT_CONTROL_CLICK)
call TriggerAddAction(t, function ClickFrame1)
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",7), false)
if GetLocalPlayer() == Player(0) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",7), true)
endif
endfunction
//===========================================================================
function InitTrig_Frames1 takes nothing returns nothing
set gg_trg_Frames1 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Frames1, 0.00 )
call TriggerAddAction( gg_trg_Frames1, function Trig_Frames1_Actions )
endfunction
function RunCooldawn2 takes unit u returns nothing
if (u == gg_unit_H000_0001) then
call EnableTrigger(gg_trg_CdnPaladin)
endif
if (u == gg_unit_H00D_0051) then
call EnableTrigger(gg_trg_CduRifle)
endif
if (u == gg_unit_H00G_0055) then
call EnableTrigger(gg_trg_CduWarlock)
endif
if (u == gg_unit_H001_0012) then
call EnableTrigger(gg_trg_CdnBerserk)
endif
if (u == gg_unit_H002_0022) then
call EnableTrigger(gg_trg_CdnPirate)
endif
if (u == gg_unit_H00J_0057) then
call EnableTrigger(gg_trg_CduSahdow)
endif
if (u == gg_unit_H007_0042) then
call EnableTrigger(gg_trg_CduNecro)
endif
if (u == gg_unit_H00M_0060) then
call EnableTrigger(gg_trg_CduShaman)
endif
if (u == gg_unit_H006_0027) then
call EnableTrigger(gg_trg_CdnDruid)
endif
if (u == gg_unit_H00H_0054) then
call EnableTrigger(gg_trg_CduDeahK)
endif
if (u == gg_unit_H00A_0048) then
call EnableTrigger(gg_trg_CduStar)
endif
if (u == gg_unit_H00E_0052) then
call EnableTrigger(gg_trg_CduMonk)
endif
if (u == gg_unit_H00B_0049) then
call EnableTrigger(gg_trg_CduChief)
endif
if (u == gg_unit_H009_0047) then
call EnableTrigger(gg_trg_CduIce)
endif
if (u == gg_unit_H00O_0062) then
call EnableTrigger(gg_trg_CduFiregod)
endif
if (u == gg_unit_H00F_0053) then
call EnableTrigger(gg_trg_CduMedusa)
endif
if (u == gg_unit_H00I_0056) then
call EnableTrigger(gg_trg_CduOcean)
endif
if (u == gg_unit_H008_0043) then
call EnableTrigger(gg_trg_CduPit)
endif
if (u == gg_unit_H00K_0058) then
call EnableTrigger(gg_trg_CduRobot)
endif
if (u == gg_unit_H00C_0050) then
call EnableTrigger(gg_trg_CduScorp)
endif
if (u == gg_unit_H00L_0059) then
call EnableTrigger(gg_trg_CduDemon)
endif
if (u == gg_unit_H00P_0063) then
call EnableTrigger(gg_trg_CduTime)
endif
if (u == gg_unit_H00Q_0064) then
call EnableTrigger(gg_trg_CduSiege)
endif
if (u == gg_unit_H00N_0061) then
call EnableTrigger(gg_trg_CduFisher)
endif
endfunction
function ClickFrame2 takes nothing returns nothing
local unit u
if (udg_HeroNumber2 == 1) then
set u = gg_unit_H000_0001
endif
if (udg_HeroNumber2 == 2) then
set u = gg_unit_H00D_0051
endif
if (udg_HeroNumber2 == 3) then
set u = gg_unit_H00G_0055
endif
if (udg_HeroNumber2 == 4) then
set u = gg_unit_H001_0012
endif
if (udg_HeroNumber2 == 5) then
set u = gg_unit_H002_0022
endif
if (udg_HeroNumber2 == 6) then
set u = gg_unit_H00J_0057
endif
if (udg_HeroNumber2 == 7) then
set u = gg_unit_H007_0042
endif
if (udg_HeroNumber2 == 8) then
set u = gg_unit_H00M_0060
endif
if (udg_HeroNumber2 == 9) then
set u = gg_unit_H006_0027
endif
if (udg_HeroNumber2 == 10) then
set u = gg_unit_H00H_0054
endif
if (udg_HeroNumber2 == 11) then
set u = gg_unit_H00A_0048
endif
if (udg_HeroNumber2 == 12) then
set u = gg_unit_H00E_0052
endif
if (udg_HeroNumber2 == 13) then
set u = gg_unit_H00B_0049
endif
if (udg_HeroNumber2 == 14) then
set u = gg_unit_H009_0047
endif
if (udg_HeroNumber2 == 15) then
set u = gg_unit_H00O_0062
endif
if (udg_HeroNumber2 == 16) then
set u = gg_unit_H00F_0053
endif
if (udg_HeroNumber2 == 17) then
set u = gg_unit_H00I_0056
endif
if (udg_HeroNumber2 == 18) then
set u = gg_unit_H008_0043
endif
if (udg_HeroNumber2 == 19) then
set u = gg_unit_H00K_0058
endif
if (udg_HeroNumber2 == 20) then
set u = gg_unit_H00C_0050
endif
if (udg_HeroNumber2 == 21) then
set u = gg_unit_H00L_0059
endif
if (udg_HeroNumber2 == 22) then
set u = gg_unit_H00P_0063
endif
if (udg_HeroNumber2 == 23) then
set u = gg_unit_H00Q_0064
endif
if (udg_HeroNumber2 == 24) then
set u = gg_unit_H00N_0061
endif
if (GetOwningPlayer(u) == Player(PLAYER_NEUTRAL_PASSIVE)) then
set udg_Hero2 = u
call SetUnitOwner( udg_Hero2, Player(1), true )
call UnitAddAbility( udg_Hero2, 'A03Q' )
call UnitAddAbility( udg_Hero2, 'A03P' )
call EnableTrigger( gg_trg_StatHero2 )
call SetUnitPositionLoc(udg_Hero2, Location(-3250, -14600))
if GetLocalPlayer() == Player(1) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",27), false)
endif
call RunCooldawn2(udg_Hero2)
call DisableTrigger(gg_trg_CameraPlayer2)
call DisableTrigger(gg_trg_MoveRight2)
call DisableTrigger(gg_trg_MoveLeft2)
call ResetToGameCameraForPlayer( Player(1), 0 )
call SetCameraTargetControllerNoZForPlayer( Player(1), udg_Hero2, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(1), 0 )
call AdjustPlayerStateBJ( 750, Player(1), PLAYER_STATE_RESOURCE_GOLD )
set udg_StartReady = udg_StartReady + 1
if (udg_StartReady >= udg_PlayerFactor) then
call TriggerExecute(gg_trg_StartForest)
endif
else
call DisplayTextToForce( GetForceOfPlayer(Player(1)), "Этого героя уже выбрали :(" )
endif
endfunction
function Trig_Frames2_Actions takes nothing returns nothing
local framehandle f
local framehandle f1
local framehandle f2
local framehandle f3
local framehandle f4
local framehandle fi1
local framehandle fi2
local framehandle fi3
local framehandle fi4
local framehandle fd1
local framehandle fd2
local framehandle fd3
local framehandle fd4
local framehandle ft1
local framehandle ft2
local framehandle ft3
local framehandle ft4
local framehandle fs1
local framehandle fs2
local framehandle fsd2
local framehandle fb
local framehandle fib
local string t1
local string t2
local string t3
local string t4
local string tm
local string tt
local trigger t = CreateTrigger()
set tm = "|cffffff00Crusader|r"
set tt = BlzGetAbilityExtendedTooltip('A07J', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A000', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A002', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A004', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A005', 0)
set f = BlzCreateFrame("EscMenuBackdrop", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), 0,27)
call BlzFrameSetAbsPoint(f, FRAMEPOINT_CENTER, 0.6, 0.35)
call BlzFrameSetSize(f, 0.4, 0.35)
set f1 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 21)
set fi1 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 21)
set fd1 = BlzCreateFrame("ListBoxWar3", f1, 0, 0)
set ft1 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd1, "StandardInfoTextTemplate", 21)
call BlzFrameSetSize(f1, 0.05, 0.05)
call BlzFrameSetSize(fd1, 0.36, 0.13)
call BlzFrameSetSize(ft1, 0.34, 0.11)
call BlzFrameSetAbsPoint(f1, FRAMEPOINT_CENTER, 0.48, 0.37)
call BlzFrameSetPoint(ft1, FRAMEPOINT_CENTER, fd1, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd1, FRAMEPOINT_CENTER, 0.6, 0.27)
call BlzFrameSetTooltip(f1, fd1)
call BlzFrameSetText(ft1, t1)
set f2 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 22)
set fi2 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 22)
set fd2 = BlzCreateFrame("ListBoxWar3", f2, 0, 0)
set ft2 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd2, "StandardInfoTextTemplate", 22)
call BlzFrameSetSize(f2, 0.05, 0.05)
call BlzFrameSetSize(fd2, 0.36, 0.13)
call BlzFrameSetSize(ft2, 0.34, 0.11)
call BlzFrameSetAbsPoint(f2, FRAMEPOINT_CENTER, 0.56, 0.37)
call BlzFrameSetPoint(ft2, FRAMEPOINT_CENTER, fd2, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd2, FRAMEPOINT_CENTER, 0.6, 0.27)
call BlzFrameSetTooltip(f2, fd2)
call BlzFrameSetText(ft2, t2)
set f3 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 23)
set fi3 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 23)
set fd3 = BlzCreateFrame("ListBoxWar3", f3, 0, 0)
set ft3 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd3, "StandardInfoTextTemplate", 23)
call BlzFrameSetSize(f3, 0.05, 0.05)
call BlzFrameSetSize(fd3, 0.36, 0.13)
call BlzFrameSetSize(ft3, 0.34, 0.11)
call BlzFrameSetAbsPoint(f3, FRAMEPOINT_CENTER, 0.64, 0.37)
call BlzFrameSetPoint(ft3, FRAMEPOINT_CENTER, fd3, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd3, FRAMEPOINT_CENTER, 0.6, 0.27)
call BlzFrameSetTooltip(f3, fd3)
call BlzFrameSetText(ft3, t3)
set f4 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 24)
set fi4 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 24)
set fd4 = BlzCreateFrame("ListBoxWar3", f4, 0, 0)
set ft4 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd4, "StandardInfoTextTemplate", 24)
call BlzFrameSetSize(f4, 0.05, 0.05)
call BlzFrameSetSize(fd4, 0.36, 0.13)
call BlzFrameSetSize(ft4, 0.34, 0.11)
call BlzFrameSetAbsPoint(f4, FRAMEPOINT_CENTER, 0.72, 0.37)
call BlzFrameSetPoint(ft4, FRAMEPOINT_CENTER, fd4, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd4, FRAMEPOINT_CENTER, 0.6, 0.27)
call BlzFrameSetTooltip(f4, fd4)
call BlzFrameSetText(ft4, t4)
set fs1 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", f, "StandardInfoTextTemplate", 25)
call BlzFrameSetAbsPoint(fs1, FRAMEPOINT_CENTER, 0.6, 0.49)
call BlzFrameSetText(fs1, tm)
call BlzFrameSetScale(fs1, 2.4)
set fs2 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", f, "StandardInfoTextTemplate", 26)
set fsd2 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", f, "StandardInfoTextTemplate", 28)
call BlzFrameSetSize(fsd2, 0.35, 0.13)
call BlzFrameSetSize(fs2, 0.33, 0.11)
call BlzFrameSetPoint(fs2, FRAMEPOINT_CENTER, fsd2, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fsd2, FRAMEPOINT_CENTER, 0.62, 0.40)
call BlzFrameSetText(fs2, tt)
call BlzFrameSetScale(fs2, 1.2)
set fb = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 0)
set fib = BlzGetFrameByName("ScoreScreenButtonBackdrop", 0)
call BlzFrameSetSize(fb, 0.04, 0.04)
call BlzFrameSetAbsPoint(fb, FRAMEPOINT_CENTER, 0.75, 0.49)
call BlzFrameSetTexture(fib, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp", 0, true)
call BlzFrameSetParent(f1, f)
call BlzFrameSetParent(fi1, f)
call BlzFrameSetParent(f2, f)
call BlzFrameSetParent(fi2, f)
call BlzFrameSetParent(f3, f)
call BlzFrameSetParent(fi3, f)
call BlzFrameSetParent(f4, f)
call BlzFrameSetParent(fi4, f)
call BlzFrameSetParent(fs1, f)
call BlzFrameSetParent(fs2, f)
call BlzFrameSetParent(fsd2, f)
call BlzFrameSetParent(fb, f)
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHolyBolt.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\PassiveButtons\\PASBTNStormHammer.blp", 0, true)
call BlzFrameSetTexture(fi3, "war3mapImported\\BTNBless.blp", 0, true)
call BlzFrameSetTexture(fi4, "ReplaceableTextures\\CommandButtons\\BTNResurrection.blp", 0, true)
call BlzTriggerRegisterFrameEvent(t, fb, FRAMEEVENT_CONTROL_CLICK)
call TriggerAddAction(t, function ClickFrame2)
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",27), false)
if GetLocalPlayer() == Player(1) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",27), true)
endif
endfunction
//===========================================================================
function InitTrig_Frames2 takes nothing returns nothing
set gg_trg_Frames2 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Frames2, 0.00 )
call TriggerAddAction( gg_trg_Frames2, function Trig_Frames2_Actions )
endfunction
function RunCooldawn3 takes unit u returns nothing
if (u == gg_unit_H000_0001) then
call EnableTrigger(gg_trg_CdnPaladin)
endif
if (u == gg_unit_H00D_0051) then
call EnableTrigger(gg_trg_CduRifle)
endif
if (u == gg_unit_H00G_0055) then
call EnableTrigger(gg_trg_CduWarlock)
endif
if (u == gg_unit_H001_0012) then
call EnableTrigger(gg_trg_CdnBerserk)
endif
if (u == gg_unit_H002_0022) then
call EnableTrigger(gg_trg_CdnPirate)
endif
if (u == gg_unit_H00J_0057) then
call EnableTrigger(gg_trg_CduSahdow)
endif
if (u == gg_unit_H007_0042) then
call EnableTrigger(gg_trg_CduNecro)
endif
if (u == gg_unit_H00M_0060) then
call EnableTrigger(gg_trg_CduShaman)
endif
if (u == gg_unit_H006_0027) then
call EnableTrigger(gg_trg_CdnDruid)
endif
if (u == gg_unit_H00H_0054) then
call EnableTrigger(gg_trg_CduDeahK)
endif
if (u == gg_unit_H00A_0048) then
call EnableTrigger(gg_trg_CduStar)
endif
if (u == gg_unit_H00E_0052) then
call EnableTrigger(gg_trg_CduMonk)
endif
if (u == gg_unit_H00B_0049) then
call EnableTrigger(gg_trg_CduChief)
endif
if (u == gg_unit_H009_0047) then
call EnableTrigger(gg_trg_CduIce)
endif
if (u == gg_unit_H00O_0062) then
call EnableTrigger(gg_trg_CduFiregod)
endif
if (u == gg_unit_H00F_0053) then
call EnableTrigger(gg_trg_CduMedusa)
endif
if (u == gg_unit_H00I_0056) then
call EnableTrigger(gg_trg_CduOcean)
endif
if (u == gg_unit_H008_0043) then
call EnableTrigger(gg_trg_CduPit)
endif
if (u == gg_unit_H00K_0058) then
call EnableTrigger(gg_trg_CduRobot)
endif
if (u == gg_unit_H00C_0050) then
call EnableTrigger(gg_trg_CduScorp)
endif
if (u == gg_unit_H00L_0059) then
call EnableTrigger(gg_trg_CduDemon)
endif
if (u == gg_unit_H00P_0063) then
call EnableTrigger(gg_trg_CduTime)
endif
if (u == gg_unit_H00Q_0064) then
call EnableTrigger(gg_trg_CduSiege)
endif
if (u == gg_unit_H00N_0061) then
call EnableTrigger(gg_trg_CduFisher)
endif
endfunction
function ClickFrame3 takes nothing returns nothing
local unit u
if (udg_HeroNumber3 == 1) then
set u = gg_unit_H000_0001
endif
if (udg_HeroNumber3 == 2) then
set u = gg_unit_H00D_0051
endif
if (udg_HeroNumber3 == 3) then
set u = gg_unit_H00G_0055
endif
if (udg_HeroNumber3 == 4) then
set u = gg_unit_H001_0012
endif
if (udg_HeroNumber3 == 5) then
set u = gg_unit_H002_0022
endif
if (udg_HeroNumber3 == 6) then
set u = gg_unit_H00J_0057
endif
if (udg_HeroNumber3 == 7) then
set u = gg_unit_H007_0042
endif
if (udg_HeroNumber3 == 8) then
set u = gg_unit_H00M_0060
endif
if (udg_HeroNumber3 == 9) then
set u = gg_unit_H006_0027
endif
if (udg_HeroNumber3 == 10) then
set u = gg_unit_H00H_0054
endif
if (udg_HeroNumber3 == 11) then
set u = gg_unit_H00A_0048
endif
if (udg_HeroNumber3 == 12) then
set u = gg_unit_H00E_0052
endif
if (udg_HeroNumber3 == 13) then
set u = gg_unit_H00B_0049
endif
if (udg_HeroNumber3 == 14) then
set u = gg_unit_H009_0047
endif
if (udg_HeroNumber3 == 15) then
set u = gg_unit_H00O_0062
endif
if (udg_HeroNumber3 == 16) then
set u = gg_unit_H00F_0053
endif
if (udg_HeroNumber3 == 17) then
set u = gg_unit_H00I_0056
endif
if (udg_HeroNumber3 == 18) then
set u = gg_unit_H008_0043
endif
if (udg_HeroNumber3 == 19) then
set u = gg_unit_H00K_0058
endif
if (udg_HeroNumber3 == 20) then
set u = gg_unit_H00C_0050
endif
if (udg_HeroNumber3 == 21) then
set u = gg_unit_H00L_0059
endif
if (udg_HeroNumber3 == 22) then
set u = gg_unit_H00P_0063
endif
if (udg_HeroNumber3 == 23) then
set u = gg_unit_H00Q_0064
endif
if (udg_HeroNumber3 == 24) then
set u = gg_unit_H00N_0061
endif
if (GetOwningPlayer(u) == Player(PLAYER_NEUTRAL_PASSIVE)) then
set udg_Hero3 = u
call SetUnitOwner( udg_Hero3, Player(2), true )
call UnitAddAbility( udg_Hero3, 'A03R' )
call UnitAddAbility( udg_Hero3, 'A03P' )
call EnableTrigger( gg_trg_StatHero3 )
call SetUnitPositionLoc(udg_Hero3, Location(-950, -14600))
if GetLocalPlayer() == Player(2) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",37), false)
endif
call RunCooldawn3(udg_Hero3)
call DisableTrigger(gg_trg_CameraPlayer3)
call DisableTrigger(gg_trg_MoveRight3)
call DisableTrigger(gg_trg_MoveLeft3)
call ResetToGameCameraForPlayer( Player(2), 0 )
call SetCameraTargetControllerNoZForPlayer( Player(2), udg_Hero3, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(2), 0 )
call AdjustPlayerStateBJ( 750, Player(2), PLAYER_STATE_RESOURCE_GOLD )
set udg_StartReady = udg_StartReady + 1
if (udg_StartReady >= udg_PlayerFactor) then
call TriggerExecute(gg_trg_StartForest)
endif
else
call DisplayTextToForce( GetForceOfPlayer(Player(2)), "Этого героя уже выбрали :(" )
endif
endfunction
function Trig_Frames3_Actions takes nothing returns nothing
local framehandle f
local framehandle f1
local framehandle f2
local framehandle f3
local framehandle f4
local framehandle fi1
local framehandle fi2
local framehandle fi3
local framehandle fi4
local framehandle fd1
local framehandle fd2
local framehandle fd3
local framehandle fd4
local framehandle ft1
local framehandle ft2
local framehandle ft3
local framehandle ft4
local framehandle fs1
local framehandle fs2
local framehandle fsd2
local framehandle fb
local framehandle fib
local string t1
local string t2
local string t3
local string t4
local string tm
local string tt
local trigger t = CreateTrigger()
set tm = "|cffffff00Crusader|r"
set tt = BlzGetAbilityExtendedTooltip('A07J', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A000', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A002', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A004', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A005', 0)
set f = BlzCreateFrame("EscMenuBackdrop", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), 0,37)
call BlzFrameSetAbsPoint(f, FRAMEPOINT_CENTER, 0.6, 0.35)
call BlzFrameSetSize(f, 0.4, 0.35)
set f1 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 31)
set fi1 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 31)
set fd1 = BlzCreateFrame("ListBoxWar3", f1, 0, 0)
set ft1 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd1, "StandardInfoTextTemplate", 31)
call BlzFrameSetSize(f1, 0.05, 0.05)
call BlzFrameSetSize(fd1, 0.36, 0.13)
call BlzFrameSetSize(ft1, 0.34, 0.11)
call BlzFrameSetAbsPoint(f1, FRAMEPOINT_CENTER, 0.48, 0.37)
call BlzFrameSetPoint(ft1, FRAMEPOINT_CENTER, fd1, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd1, FRAMEPOINT_CENTER, 0.6, 0.27)
call BlzFrameSetTooltip(f1, fd1)
call BlzFrameSetText(ft1, t1)
set f2 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 32)
set fi2 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 32)
set fd2 = BlzCreateFrame("ListBoxWar3", f2, 0, 0)
set ft2 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd2, "StandardInfoTextTemplate", 32)
call BlzFrameSetSize(f2, 0.05, 0.05)
call BlzFrameSetSize(fd2, 0.36, 0.13)
call BlzFrameSetSize(ft2, 0.34, 0.11)
call BlzFrameSetAbsPoint(f2, FRAMEPOINT_CENTER, 0.56, 0.37)
call BlzFrameSetPoint(ft2, FRAMEPOINT_CENTER, fd2, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd2, FRAMEPOINT_CENTER, 0.6, 0.27)
call BlzFrameSetTooltip(f2, fd2)
call BlzFrameSetText(ft2, t2)
set f3 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 33)
set fi3 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 33)
set fd3 = BlzCreateFrame("ListBoxWar3", f3, 0, 0)
set ft3 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd3, "StandardInfoTextTemplate", 33)
call BlzFrameSetSize(f3, 0.05, 0.05)
call BlzFrameSetSize(fd3, 0.36, 0.13)
call BlzFrameSetSize(ft3, 0.34, 0.11)
call BlzFrameSetAbsPoint(f3, FRAMEPOINT_CENTER, 0.64, 0.37)
call BlzFrameSetPoint(ft3, FRAMEPOINT_CENTER, fd3, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd3, FRAMEPOINT_CENTER, 0.6, 0.27)
call BlzFrameSetTooltip(f3, fd3)
call BlzFrameSetText(ft3, t3)
set f4 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 34)
set fi4 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 34)
set fd4 = BlzCreateFrame("ListBoxWar3", f4, 0, 0)
set ft4 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd4, "StandardInfoTextTemplate", 34)
call BlzFrameSetSize(f4, 0.05, 0.05)
call BlzFrameSetSize(fd4, 0.36, 0.13)
call BlzFrameSetSize(ft4, 0.34, 0.11)
call BlzFrameSetAbsPoint(f4, FRAMEPOINT_CENTER, 0.72, 0.37)
call BlzFrameSetPoint(ft4, FRAMEPOINT_CENTER, fd4, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd4, FRAMEPOINT_CENTER, 0.6, 0.27)
call BlzFrameSetTooltip(f4, fd4)
call BlzFrameSetText(ft4, t4)
set fs1 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", f, "StandardInfoTextTemplate", 35)
call BlzFrameSetAbsPoint(fs1, FRAMEPOINT_CENTER, 0.6, 0.49)
call BlzFrameSetText(fs1, tm)
call BlzFrameSetScale(fs1, 2.4)
set fs2 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", f, "StandardInfoTextTemplate", 36)
set fsd2 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", f, "StandardInfoTextTemplate", 38)
call BlzFrameSetSize(fsd2, 0.35, 0.13)
call BlzFrameSetSize(fs2, 0.33, 0.11)
call BlzFrameSetPoint(fs2, FRAMEPOINT_CENTER, fsd2, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fsd2, FRAMEPOINT_CENTER, 0.62, 0.40)
call BlzFrameSetText(fs2, tt)
call BlzFrameSetScale(fs2, 1.2)
set fb = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 0)
set fib = BlzGetFrameByName("ScoreScreenButtonBackdrop", 0)
call BlzFrameSetSize(fb, 0.04, 0.04)
call BlzFrameSetAbsPoint(fb, FRAMEPOINT_CENTER, 0.75, 0.49)
call BlzFrameSetTexture(fib, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp", 0, true)
call BlzFrameSetParent(f1, f)
call BlzFrameSetParent(fi1, f)
call BlzFrameSetParent(f2, f)
call BlzFrameSetParent(fi2, f)
call BlzFrameSetParent(f3, f)
call BlzFrameSetParent(fi3, f)
call BlzFrameSetParent(f4, f)
call BlzFrameSetParent(fi4, f)
call BlzFrameSetParent(fs1, f)
call BlzFrameSetParent(fs2, f)
call BlzFrameSetParent(fsd2, f)
call BlzFrameSetParent(fb, f)
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHolyBolt.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\PassiveButtons\\PASBTNStormHammer.blp", 0, true)
call BlzFrameSetTexture(fi3, "war3mapImported\\BTNBless.blp", 0, true)
call BlzFrameSetTexture(fi4, "ReplaceableTextures\\CommandButtons\\BTNResurrection.blp", 0, true)
call BlzTriggerRegisterFrameEvent(t, fb, FRAMEEVENT_CONTROL_CLICK)
call TriggerAddAction(t, function ClickFrame3)
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",37), false)
if GetLocalPlayer() == Player(2) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",37), true)
endif
endfunction
//===========================================================================
function InitTrig_Frames3 takes nothing returns nothing
set gg_trg_Frames3 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Frames3, 0.00 )
call TriggerAddAction( gg_trg_Frames3, function Trig_Frames3_Actions )
endfunction
function RunCooldawn4 takes unit u returns nothing
if (u == gg_unit_H000_0001) then
call EnableTrigger(gg_trg_CdnPaladin)
endif
if (u == gg_unit_H00D_0051) then
call EnableTrigger(gg_trg_CduRifle)
endif
if (u == gg_unit_H00G_0055) then
call EnableTrigger(gg_trg_CduWarlock)
endif
if (u == gg_unit_H001_0012) then
call EnableTrigger(gg_trg_CdnBerserk)
endif
if (u == gg_unit_H002_0022) then
call EnableTrigger(gg_trg_CdnPirate)
endif
if (u == gg_unit_H00J_0057) then
call EnableTrigger(gg_trg_CduSahdow)
endif
if (u == gg_unit_H007_0042) then
call EnableTrigger(gg_trg_CduNecro)
endif
if (u == gg_unit_H00M_0060) then
call EnableTrigger(gg_trg_CduShaman)
endif
if (u == gg_unit_H006_0027) then
call EnableTrigger(gg_trg_CdnDruid)
endif
if (u == gg_unit_H00H_0054) then
call EnableTrigger(gg_trg_CduDeahK)
endif
if (u == gg_unit_H00A_0048) then
call EnableTrigger(gg_trg_CduStar)
endif
if (u == gg_unit_H00E_0052) then
call EnableTrigger(gg_trg_CduMonk)
endif
if (u == gg_unit_H00B_0049) then
call EnableTrigger(gg_trg_CduChief)
endif
if (u == gg_unit_H009_0047) then
call EnableTrigger(gg_trg_CduIce)
endif
if (u == gg_unit_H00O_0062) then
call EnableTrigger(gg_trg_CduFiregod)
endif
if (u == gg_unit_H00F_0053) then
call EnableTrigger(gg_trg_CduMedusa)
endif
if (u == gg_unit_H00I_0056) then
call EnableTrigger(gg_trg_CduOcean)
endif
if (u == gg_unit_H008_0043) then
call EnableTrigger(gg_trg_CduPit)
endif
if (u == gg_unit_H00K_0058) then
call EnableTrigger(gg_trg_CduRobot)
endif
if (u == gg_unit_H00C_0050) then
call EnableTrigger(gg_trg_CduScorp)
endif
if (u == gg_unit_H00L_0059) then
call EnableTrigger(gg_trg_CduDemon)
endif
if (u == gg_unit_H00P_0063) then
call EnableTrigger(gg_trg_CduTime)
endif
if (u == gg_unit_H00Q_0064) then
call EnableTrigger(gg_trg_CduSiege)
endif
if (u == gg_unit_H00N_0061) then
call EnableTrigger(gg_trg_CduFisher)
endif
endfunction
function ClickFrame4 takes nothing returns nothing
local unit u
if (udg_HeroNumber4 == 1) then
set u = gg_unit_H000_0001
endif
if (udg_HeroNumber4 == 2) then
set u = gg_unit_H00D_0051
endif
if (udg_HeroNumber4 == 3) then
set u = gg_unit_H00G_0055
endif
if (udg_HeroNumber4 == 4) then
set u = gg_unit_H001_0012
endif
if (udg_HeroNumber4 == 5) then
set u = gg_unit_H002_0022
endif
if (udg_HeroNumber4 == 6) then
set u = gg_unit_H00J_0057
endif
if (udg_HeroNumber4 == 7) then
set u = gg_unit_H007_0042
endif
if (udg_HeroNumber4 == 8) then
set u = gg_unit_H00M_0060
endif
if (udg_HeroNumber4 == 9) then
set u = gg_unit_H006_0027
endif
if (udg_HeroNumber4 == 10) then
set u = gg_unit_H00H_0054
endif
if (udg_HeroNumber4 == 11) then
set u = gg_unit_H00A_0048
endif
if (udg_HeroNumber4 == 12) then
set u = gg_unit_H00E_0052
endif
if (udg_HeroNumber4 == 13) then
set u = gg_unit_H00B_0049
endif
if (udg_HeroNumber4 == 14) then
set u = gg_unit_H009_0047
endif
if (udg_HeroNumber4 == 15) then
set u = gg_unit_H00O_0062
endif
if (udg_HeroNumber4 == 16) then
set u = gg_unit_H00F_0053
endif
if (udg_HeroNumber4 == 17) then
set u = gg_unit_H00I_0056
endif
if (udg_HeroNumber4 == 18) then
set u = gg_unit_H008_0043
endif
if (udg_HeroNumber4 == 19) then
set u = gg_unit_H00K_0058
endif
if (udg_HeroNumber4 == 20) then
set u = gg_unit_H00C_0050
endif
if (udg_HeroNumber4 == 21) then
set u = gg_unit_H00L_0059
endif
if (udg_HeroNumber4 == 22) then
set u = gg_unit_H00P_0063
endif
if (udg_HeroNumber4 == 23) then
set u = gg_unit_H00Q_0064
endif
if (udg_HeroNumber4 == 24) then
set u = gg_unit_H00N_0061
endif
if (GetOwningPlayer(u) == Player(PLAYER_NEUTRAL_PASSIVE)) then
set udg_Hero4 = u
call SetUnitOwner( udg_Hero4, Player(3), true )
call UnitAddAbility( udg_Hero4, 'A03S' )
call UnitAddAbility( udg_Hero4, 'A03P' )
call EnableTrigger( gg_trg_StatHero4 )
call SetUnitPositionLoc(udg_Hero4, Location(1330, -14600))
if GetLocalPlayer() == Player(3) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",47), false)
endif
call RunCooldawn4(udg_Hero4)
call DisableTrigger(gg_trg_CameraPlayer4)
call DisableTrigger(gg_trg_MoveRight4)
call DisableTrigger(gg_trg_MoveLeft4)
call ResetToGameCameraForPlayer( Player(3), 0 )
call SetCameraTargetControllerNoZForPlayer( Player(3), udg_Hero4, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(3), 0 )
call AdjustPlayerStateBJ( 750, Player(3), PLAYER_STATE_RESOURCE_GOLD )
set udg_StartReady = udg_StartReady + 1
if (udg_StartReady >= udg_PlayerFactor) then
call TriggerExecute(gg_trg_StartForest)
endif
else
call DisplayTextToForce( GetForceOfPlayer(Player(3)), "Этого героя уже выбрали :(" )
endif
endfunction
function Trig_Frames4_Actions takes nothing returns nothing
local framehandle f
local framehandle f1
local framehandle f2
local framehandle f3
local framehandle f4
local framehandle fi1
local framehandle fi2
local framehandle fi3
local framehandle fi4
local framehandle fd1
local framehandle fd2
local framehandle fd3
local framehandle fd4
local framehandle ft1
local framehandle ft2
local framehandle ft3
local framehandle ft4
local framehandle fs1
local framehandle fs2
local framehandle fsd2
local framehandle fb
local framehandle fib
local string t1
local string t2
local string t3
local string t4
local string tm
local string tt
local trigger t = CreateTrigger()
set tm = "|cffffff00Crusader|r"
set tt = BlzGetAbilityExtendedTooltip('A07J', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A000', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A002', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A004', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A005', 0)
set f = BlzCreateFrame("EscMenuBackdrop", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), 0,47)
call BlzFrameSetAbsPoint(f, FRAMEPOINT_CENTER, 0.6, 0.35)
call BlzFrameSetSize(f, 0.4, 0.35)
set f1 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 41)
set fi1 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 41)
set fd1 = BlzCreateFrame("ListBoxWar3", f1, 0, 0)
set ft1 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd1, "StandardInfoTextTemplate", 41)
call BlzFrameSetSize(f1, 0.05, 0.05)
call BlzFrameSetSize(fd1, 0.36, 0.13)
call BlzFrameSetSize(ft1, 0.34, 0.11)
call BlzFrameSetAbsPoint(f1, FRAMEPOINT_CENTER, 0.48, 0.37)
call BlzFrameSetPoint(ft1, FRAMEPOINT_CENTER, fd1, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd1, FRAMEPOINT_CENTER, 0.6, 0.27)
call BlzFrameSetTooltip(f1, fd1)
call BlzFrameSetText(ft1, t1)
set f2 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 42)
set fi2 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 42)
set fd2 = BlzCreateFrame("ListBoxWar3", f2, 0, 0)
set ft2 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd2, "StandardInfoTextTemplate", 42)
call BlzFrameSetSize(f2, 0.05, 0.05)
call BlzFrameSetSize(fd2, 0.36, 0.13)
call BlzFrameSetSize(ft2, 0.34, 0.11)
call BlzFrameSetAbsPoint(f2, FRAMEPOINT_CENTER, 0.56, 0.37)
call BlzFrameSetPoint(ft2, FRAMEPOINT_CENTER, fd2, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd2, FRAMEPOINT_CENTER, 0.6, 0.27)
call BlzFrameSetTooltip(f2, fd2)
call BlzFrameSetText(ft2, t2)
set f3 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 43)
set fi3 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 43)
set fd3 = BlzCreateFrame("ListBoxWar3", f3, 0, 0)
set ft3 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd3, "StandardInfoTextTemplate", 43)
call BlzFrameSetSize(f3, 0.05, 0.05)
call BlzFrameSetSize(fd3, 0.36, 0.13)
call BlzFrameSetSize(ft3, 0.34, 0.11)
call BlzFrameSetAbsPoint(f3, FRAMEPOINT_CENTER, 0.64, 0.37)
call BlzFrameSetPoint(ft3, FRAMEPOINT_CENTER, fd3, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd3, FRAMEPOINT_CENTER, 0.6, 0.27)
call BlzFrameSetTooltip(f3, fd3)
call BlzFrameSetText(ft3, t3)
set f4 = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 44)
set fi4 = BlzGetFrameByName("ScoreScreenButtonBackdrop", 44)
set fd4 = BlzCreateFrame("ListBoxWar3", f4, 0, 0)
set ft4 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", fd4, "StandardInfoTextTemplate", 44)
call BlzFrameSetSize(f4, 0.05, 0.05)
call BlzFrameSetSize(fd4, 0.36, 0.13)
call BlzFrameSetSize(ft4, 0.34, 0.11)
call BlzFrameSetAbsPoint(f4, FRAMEPOINT_CENTER, 0.72, 0.37)
call BlzFrameSetPoint(ft4, FRAMEPOINT_CENTER, fd4, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fd4, FRAMEPOINT_CENTER, 0.6, 0.27)
call BlzFrameSetTooltip(f4, fd4)
call BlzFrameSetText(ft4, t4)
set fs1 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", f, "StandardInfoTextTemplate", 45)
call BlzFrameSetAbsPoint(fs1, FRAMEPOINT_CENTER, 0.6, 0.49)
call BlzFrameSetText(fs1, tm)
call BlzFrameSetScale(fs1, 2.4)
set fs2 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", f, "StandardInfoTextTemplate", 46)
set fsd2 = BlzCreateFrameByType("TEXT", "StandardInfoTextTemplate", f, "StandardInfoTextTemplate", 48)
call BlzFrameSetSize(fsd2, 0.35, 0.13)
call BlzFrameSetSize(fs2, 0.33, 0.11)
call BlzFrameSetPoint(fs2, FRAMEPOINT_CENTER, fsd2, FRAMEPOINT_CENTER, 0.0, 0.0)
call BlzFrameSetAbsPoint(fsd2, FRAMEPOINT_CENTER, 0.62, 0.40)
call BlzFrameSetText(fs2, tt)
call BlzFrameSetScale(fs2, 1.2)
set fb = BlzCreateFrame("ScoreScreenBottomButtonTemplate", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI,0), 0, 0)
set fib = BlzGetFrameByName("ScoreScreenButtonBackdrop", 0)
call BlzFrameSetSize(fb, 0.04, 0.04)
call BlzFrameSetAbsPoint(fb, FRAMEPOINT_CENTER, 0.75, 0.49)
call BlzFrameSetTexture(fib, "ReplaceableTextures\\CommandButtons\\BTNSkillz.blp", 0, true)
call BlzFrameSetParent(f1, f)
call BlzFrameSetParent(fi1, f)
call BlzFrameSetParent(f2, f)
call BlzFrameSetParent(fi2, f)
call BlzFrameSetParent(f3, f)
call BlzFrameSetParent(fi3, f)
call BlzFrameSetParent(f4, f)
call BlzFrameSetParent(fi4, f)
call BlzFrameSetParent(fs1, f)
call BlzFrameSetParent(fs2, f)
call BlzFrameSetParent(fsd2, f)
call BlzFrameSetParent(fb, f)
call BlzFrameSetTexture(fi1, "ReplaceableTextures\\CommandButtons\\BTNHolyBolt.blp", 0, true)
call BlzFrameSetTexture(fi2, "ReplaceableTextures\\PassiveButtons\\PASBTNStormHammer.blp", 0, true)
call BlzFrameSetTexture(fi3, "war3mapImported\\BTNBless.blp", 0, true)
call BlzFrameSetTexture(fi4, "ReplaceableTextures\\CommandButtons\\BTNResurrection.blp", 0, true)
call BlzTriggerRegisterFrameEvent(t, fb, FRAMEEVENT_CONTROL_CLICK)
call TriggerAddAction(t, function ClickFrame4)
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",47), false)
if GetLocalPlayer() == Player(3) then
call BlzFrameSetVisible(BlzGetFrameByName("EscMenuBackdrop",47), true)
endif
endfunction
//===========================================================================
function InitTrig_Frames4 takes nothing returns nothing
set gg_trg_Frames4 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Frames4, 0.00 )
call TriggerAddAction( gg_trg_Frames4, function Trig_Frames4_Actions )
endfunction
function Trig_Description1_Actions takes nothing returns nothing
local string t1
local string t2
local string t3
local string t4
local string tm
local string tt
if (udg_HeroNumber1 == 1) then
set tm = "|cffffff00Crusader|r"
set tt = BlzGetAbilityExtendedTooltip('A07J', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A000', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A002', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A004', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A005', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "ReplaceableTextures\\CommandButtons\\BTNHolyBolt.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "ReplaceableTextures\\PassiveButtons\\PASBTNStormHammer.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "war3mapImported\\BTNBless.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "ReplaceableTextures\\CommandButtons\\BTNResurrection.blp", 0, true)
endif
if (udg_HeroNumber1 == 2) then
set tm = "|cffffff00Rifleman|r"
set tt = BlzGetAbilityExtendedTooltip('A07K', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01K', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01L', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01N', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01M', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "ReplaceableTextures\\CommandButtons\\BTNCrate.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "war3mapImported\\PASTakeAim.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "war3mapImported\\BTNSniperRifle.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "war3mapImported\\BTNExplosiveBarrel.blp", 0, true)
endif
if (udg_HeroNumber1 == 3) then
set tm = "|cffffff00Warlock|r"
set tt = BlzGetAbilityExtendedTooltip('A07L', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01X', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01Z', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A021', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A022', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "ReplaceableTextures\\CommandButtons\\BTNInnerFire.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "war3mapImported\\BTNLightning Strike.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "ReplaceableTextures\\PassiveButtons\\PASBTNMagicalSentry.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "war3mapImported\\BTNDemoniacalAttack.blp", 0, true)
endif
if (udg_HeroNumber1 == 4) then
set tm = "|cffffff00Berserk|r"
set tt = BlzGetAbilityExtendedTooltip('A07M', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A006', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A008', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A00A', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A009', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "war3mapImported\\BTNFireAxe.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "war3mapImported\\BTNWBurstv3.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "war3mapImported\\PASBloodlust.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "ReplaceableTextures\\CommandButtons\\BTNHellScream.blp", 0, true)
endif
if (udg_HeroNumber1 == 5) then
set tm = "|cffffff00Pirate|r"
set tt = BlzGetAbilityExtendedTooltip('A07N', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00C', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A00D', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A08J', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A00E', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "ReplaceableTextures\\CommandButtons\\BTNHumanMissileUpOne.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "ReplaceableTextures\\CommandButtons\\BTNStrongDrink.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "war3mapImported\\PASIncreaseIncome2.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "war3mapImported\\BTNBShipCannon1.blp", 0, true)
endif
if (udg_HeroNumber1 == 6) then
set tm = "|cffffff00Night Slayer|r"
set tt = BlzGetAbilityExtendedTooltip('A07O', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A02E', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02H', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A02G', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A02D', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "ReplaceableTextures\\CommandButtons\\BTNUpgradeMoonGlaive.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "ReplaceableTextures\\CommandButtons\\BTNPossession.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "ReplaceableTextures\\CommandButtons\\BTNFaerieFire.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "war3mapImported\\PASDarkElfAura.blp", 0, true)
endif
if (udg_HeroNumber1 == 7) then
set tm = "|cffffff00Necromancer|r"
set tt = BlzGetAbilityExtendedTooltip('A07P', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00M', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A00O', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A00P', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A00R', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "ReplaceableTextures\\CommandButtons\\BTNSkeletonMage.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "ReplaceableTextures\\CommandButtons\\BTNPlagueCloud.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "ReplaceableTextures\\PassiveButtons\\PASBTNRegenerationAura.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "ReplaceableTextures\\CommandButtons\\BTNOrbOfCorruption.blp", 0, true)
endif
if (udg_HeroNumber1 == 8) then
set tm = "|cffffff00Shaman|r"
set tt = BlzGetAbilityExtendedTooltip('A07Q', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A02W', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02X', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A02Z', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A031', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "ReplaceableTextures\\CommandButtons\\BTNTaurenTotem.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "ReplaceableTextures\\CommandButtons\\BTNHex.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "war3mapImported\\BTNNewHarmingVoodoo_Inferia.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "ReplaceableTextures\\CommandButtons\\BTNSentryWard.blp", 0, true)
endif
if (udg_HeroNumber1 == 9) then
set tm = "|cffffff00Druid|r"
set tt = BlzGetAbilityExtendedTooltip('A07R', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00F', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A00H', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A00I', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A00K', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "ReplaceableTextures\\CommandButtons\\BTNEntanglingRoots.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "war3mapImported\\BTNChainLightning2.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "war3mapImported\\PASTornado.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "war3mapImported\\BTNDragonStones.blp", 0, true)
endif
if (udg_HeroNumber1 == 10) then
set tm = "|cffffff00Death Knight|r"
set tt = BlzGetAbilityExtendedTooltip('A07S', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A025', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A024', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A023', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A027', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "ReplaceableTextures\\CommandButtons\\BTNSacrificialSkull.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "war3mapImported\\BTNFireSwordStorm_v.1.2.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "war3mapImported\\PASSword.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "war3mapImported\\PASFrozenDeath.BLP", 0, true)
endif
if (udg_HeroNumber1 == 11) then
set tm = "|cffffff00Stellar Assassin|r"
set tt = BlzGetAbilityExtendedTooltip('A07T', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A016', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A019', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A017', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01A', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "ReplaceableTextures\\CommandButtons\\BTNStarfall.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "war3mapImported\\BTNHellfury_new.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "ReplaceableTextures\\PassiveButtons\\PASBTNGenericSpellImmunity.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "war3mapImported\\BTN_StarBlast.blp", 0, true)
endif
if (udg_HeroNumber1 == 12) then
set tm = "|cffffff00Monk|r"
set tt = BlzGetAbilityExtendedTooltip('A07U', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01Q', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01P', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01O', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01S', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "war3mapImported\\BTNMonkMeditate.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "war3mapImported\\BTNPIncantateGhost.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "war3mapImported\\PASPandaPower.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "war3mapImported\\BTNPandaAura.blp", 0, true)
endif
if (udg_HeroNumber1 == 13) then
set tm = "|cffffff00Chieftain|r"
set tt = BlzGetAbilityExtendedTooltip('A07V', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01C', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01B', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01D', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01E', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "ReplaceableTextures\\CommandButtons\\BTNEarthquake.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "ReplaceableTextures\\PassiveButtons\\PASBTNSmash.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "ReplaceableTextures\\CommandButtons\\BTNAncestralSpirit.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "ReplaceableTextures\\PassiveButtons\\PASBTNReincarnation.blp", 0, true)
endif
if (udg_HeroNumber1 == 14) then
set tm = "|cffffff00Ice Knight|r"
set tt = BlzGetAbilityExtendedTooltip('A07W', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00X', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A010', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A013', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A015', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "war3mapImported\\BTNFrozenExplode.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "war3mapImported\\BTNFrostShield.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "ReplaceableTextures\\PassiveButtons\\PASBTNFreezingBreath.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "ReplaceableTextures\\CommandButtons\\BTNBreathOfFrost.blp", 0, true)
endif
if (udg_HeroNumber1 == 15) then
set tm = "|cffffff00God of Fire|r"
set tt = BlzGetAbilityExtendedTooltip('A07X', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A039', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A03E', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A03A', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A03B', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "ReplaceableTextures\\CommandButtons\\BTNFireForTheCannon.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "war3mapImported\\BTNFireShield.BLP", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "war3mapImported\\PASEyeOfTheFireStorm.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "war3mapImported\\BTNFireTornado.blp", 0, true)
endif
if (udg_HeroNumber1 == 16) then
set tm = "|cffffff00Medusa|r"
set tt = BlzGetAbilityExtendedTooltip('A07Y', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01R', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01U', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01W', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01V', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "ReplaceableTextures\\CommandButtons\\BTNCorrosiveBreath.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "war3mapImported\\ATCPoisonArrows.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "war3mapImported\\PASNaga-Tail.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "ReplaceableTextures\\CommandButtons\\BTNCharm.blp", 0, true)
endif
if (udg_HeroNumber1 == 17) then
set tm = "|cffffff00Ocean Warrior|r"
set tt = BlzGetAbilityExtendedTooltip('A07Z', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A028', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02C', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A029', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A02A', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "ReplaceableTextures\\CommandButtons\\BTNCrushingWave.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "war3mapImported\\PASBlue Naga.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "war3mapImported\\PASMoongladeTrident.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "ReplaceableTextures\\CommandButtons\\BTNTentacle.blp", 0, true)
endif
if (udg_HeroNumber1 == 18) then
set tm = "|cffffff00Pit Lord|r"
set tt = BlzGetAbilityExtendedTooltip('A080', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00T', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A00V', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A00U', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A00W', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "ReplaceableTextures\\CommandButtons\\BTNImpale.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "ReplaceableTextures\\CommandButtons\\BTNWallOfFire.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "war3mapImported\\PASDemonGaze.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "war3mapImported\\BTNDemonicMedal.blp", 0, true)
endif
if (udg_HeroNumber1 == 19) then
set tm = "|cffffff00Robogoblin|r"
set tt = BlzGetAbilityExtendedTooltip('A081', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A02J', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02M', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A02L', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A02N', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "war3mapImported\\BTNSaw-upg-3.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "ReplaceableTextures\\CommandButtons\\BTNLightningShield.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "war3mapImported\\PASRobotStrike.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "war3mapImported\\BTNNarcainian Energy Orb.blp", 0, true)
endif
if (udg_HeroNumber1 == 20) then
set tm = "|cffffff00Sand Guardian|r"
set tt = BlzGetAbilityExtendedTooltip('A082', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01G', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A04I', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01I', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01J', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "war3mapImported\\BTNSandstorm3.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "war3mapImported\\PASGreenDragonScale.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "war3mapImported\\PASPoisonSting.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "war3mapImported\\BTNTremor.blp", 0, true)
endif
if (udg_HeroNumber1 == 21) then
set tm = "|cffffff00Dark Mistress|r"
set tt = BlzGetAbilityExtendedTooltip('A083', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A02S', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02Q', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A02P', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A02O', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "war3mapImported\\BTNSpell_Shadow_BloodBoil.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "war3mapImported\\BTN_BloodCurseV2.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "war3mapImported\\PASPowerElectric.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "war3mapImported\\BTNFingerOfDeath.BLP", 0, true)
endif
if (udg_HeroNumber1 == 22) then
set tm = "|cffffff00Time Spirit|r"
set tt = BlzGetAbilityExtendedTooltip('A084', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A03D', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A03G', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A03F', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A03H', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "war3mapImported\\BTN_cr_Warp11.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "war3mapImported\\BTNTimeSpell.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "war3mapImported\\PAS.TimeUp.BLP", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "war3mapImported\\BTNRift.blp", 0, true)
endif
if (udg_HeroNumber1 == 23) then
set tm = "|cffffff00Siege Engineer|r"
set tt = BlzGetAbilityExtendedTooltip('A085', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A03L', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A03I', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A03J', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A03M', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "ReplaceableTextures\\CommandButtons\\BTNGoblinLandMine.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "war3mapImported\\Ballista.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "war3mapImported\\BTNTrebuchet.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "ReplaceableTextures\\CommandButtons\\BTNSeigeEngine.blp", 0, true)
endif
if (udg_HeroNumber1 == 24) then
set tm = "|cffffff00North Fisher|r"
set tt = BlzGetAbilityExtendedTooltip('A086', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A032', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A034', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A03N', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A037', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",1), "ReplaceableTextures\\CommandButtons\\BTNEnsnare.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",2), "war3mapImported\\PASHarpoon.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",3), "war3mapImported\\BTNFishing1.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",4), "war3mapImported\\BTNShark.blp", 0, true)
endif
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,1), t1)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,2), t2)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,3), t3)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,4), t4)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,5), tm)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,6), tt)
endfunction
//===========================================================================
function InitTrig_Description1 takes nothing returns nothing
set gg_trg_Description1 = CreateTrigger( )
call TriggerAddAction( gg_trg_Description1, function Trig_Description1_Actions )
endfunction
function Trig_Description2_Actions takes nothing returns nothing
local string t1
local string t2
local string t3
local string t4
local string tm
local string tt
if (udg_HeroNumber2 == 1) then
set tm = "|cffffff00Crusader|r"
set tt = BlzGetAbilityExtendedTooltip('A07J', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A000', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A002', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A004', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A005', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "ReplaceableTextures\\CommandButtons\\BTNHolyBolt.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "ReplaceableTextures\\PassiveButtons\\PASBTNStormHammer.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "war3mapImported\\BTNBless.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "ReplaceableTextures\\CommandButtons\\BTNResurrection.blp", 0, true)
endif
if (udg_HeroNumber2 == 2) then
set tm = "|cffffff00Rifleman|r"
set tt = BlzGetAbilityExtendedTooltip('A07K', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01K', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01L', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01N', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01M', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "ReplaceableTextures\\CommandButtons\\BTNCrate.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "war3mapImported\\PASTakeAim.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "war3mapImported\\BTNSniperRifle.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "war3mapImported\\BTNExplosiveBarrel.blp", 0, true)
endif
if (udg_HeroNumber2 == 3) then
set tm = "|cffffff00Warlock|r"
set tt = BlzGetAbilityExtendedTooltip('A07L', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01X', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01Z', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A021', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A022', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "ReplaceableTextures\\CommandButtons\\BTNInnerFire.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "war3mapImported\\BTNLightning Strike.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "ReplaceableTextures\\PassiveButtons\\PASBTNMagicalSentry.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "war3mapImported\\BTNDemoniacalAttack.blp", 0, true)
endif
if (udg_HeroNumber2 == 4) then
set tm = "|cffffff00Berserk|r"
set tt = BlzGetAbilityExtendedTooltip('A07M', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A006', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A008', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A00A', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A009', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "war3mapImported\\BTNFireAxe.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "war3mapImported\\BTNWBurstv3.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "war3mapImported\\PASBloodlust.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "ReplaceableTextures\\CommandButtons\\BTNHellScream.blp", 0, true)
endif
if (udg_HeroNumber2 == 5) then
set tm = "|cffffff00Pirate|r"
set tt = BlzGetAbilityExtendedTooltip('A07N', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00C', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A00D', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A08J', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A00E', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "ReplaceableTextures\\CommandButtons\\BTNHumanMissileUpOne.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "ReplaceableTextures\\CommandButtons\\BTNStrongDrink.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "war3mapImported\\PASIncreaseIncome2.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "war3mapImported\\BTNBShipCannon1.blp", 0, true)
endif
if (udg_HeroNumber2 == 6) then
set tm = "|cffffff00Night Slayer|r"
set tt = BlzGetAbilityExtendedTooltip('A07O', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A02E', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02H', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A02G', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A02D', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "ReplaceableTextures\\CommandButtons\\BTNUpgradeMoonGlaive.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "ReplaceableTextures\\CommandButtons\\BTNPossession.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "ReplaceableTextures\\CommandButtons\\BTNFaerieFire.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "war3mapImported\\PASDarkElfAura.blp", 0, true)
endif
if (udg_HeroNumber2 == 7) then
set tm = "|cffffff00Necromancer|r"
set tt = BlzGetAbilityExtendedTooltip('A07P', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00M', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A00O', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A00P', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A00R', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "ReplaceableTextures\\CommandButtons\\BTNSkeletonMage.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "ReplaceableTextures\\CommandButtons\\BTNPlagueCloud.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "ReplaceableTextures\\PassiveButtons\\PASBTNRegenerationAura.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "ReplaceableTextures\\CommandButtons\\BTNOrbOfCorruption.blp", 0, true)
endif
if (udg_HeroNumber2 == 8) then
set tm = "|cffffff00Shaman|r"
set tt = BlzGetAbilityExtendedTooltip('A07Q', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A02W', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02X', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A02Z', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A031', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "ReplaceableTextures\\CommandButtons\\BTNTaurenTotem.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "ReplaceableTextures\\CommandButtons\\BTNHex.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "war3mapImported\\BTNNewHarmingVoodoo_Inferia.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "ReplaceableTextures\\CommandButtons\\BTNSentryWard.blp", 0, true)
endif
if (udg_HeroNumber2 == 9) then
set tm = "|cffffff00Druid|r"
set tt = BlzGetAbilityExtendedTooltip('A07R', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00F', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A00H', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A00I', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A00K', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "ReplaceableTextures\\CommandButtons\\BTNEntanglingRoots.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "war3mapImported\\BTNChainLightning2.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "war3mapImported\\PASTornado.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "war3mapImported\\BTNDragonStones.blp", 0, true)
endif
if (udg_HeroNumber2 == 10) then
set tm = "|cffffff00Death Knight|r"
set tt = BlzGetAbilityExtendedTooltip('A07S', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A025', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A024', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A023', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A027', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "ReplaceableTextures\\CommandButtons\\BTNSacrificialSkull.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "war3mapImported\\BTNFireSwordStorm_v.1.2.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "war3mapImported\\PASSword.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "war3mapImported\\PASFrozenDeath.BLP", 0, true)
endif
if (udg_HeroNumber2 == 11) then
set tm = "|cffffff00Stellar Assassin|r"
set tt = BlzGetAbilityExtendedTooltip('A07T', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A016', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A019', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A017', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01A', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "ReplaceableTextures\\CommandButtons\\BTNStarfall.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "war3mapImported\\BTNHellfury_new.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "ReplaceableTextures\\PassiveButtons\\PASBTNGenericSpellImmunity.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "war3mapImported\\BTN_StarBlast.blp", 0, true)
endif
if (udg_HeroNumber2 == 12) then
set tm = "|cffffff00Monk|r"
set tt = BlzGetAbilityExtendedTooltip('A07U', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01Q', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01P', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01O', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01S', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "war3mapImported\\BTNMonkMeditate.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "war3mapImported\\BTNPIncantateGhost.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "war3mapImported\\PASPandaPower.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "war3mapImported\\BTNPandaAura.blp", 0, true)
endif
if (udg_HeroNumber2 == 13) then
set tm = "|cffffff00Chieftain|r"
set tt = BlzGetAbilityExtendedTooltip('A07V', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01C', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01B', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01D', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01E', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "ReplaceableTextures\\CommandButtons\\BTNEarthquake.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "ReplaceableTextures\\PassiveButtons\\PASBTNSmash.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "ReplaceableTextures\\CommandButtons\\BTNAncestralSpirit.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "ReplaceableTextures\\PassiveButtons\\PASBTNReincarnation.blp", 0, true)
endif
if (udg_HeroNumber2 == 14) then
set tm = "|cffffff00Ice Knght|r"
set tt = BlzGetAbilityExtendedTooltip('A07W', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00X', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A010', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A013', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A015', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "war3mapImported\\BTNFrozenExplode.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "war3mapImported\\BTNFrostShield.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "ReplaceableTextures\\PassiveButtons\\PASBTNFreezingBreath.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "ReplaceableTextures\\CommandButtons\\BTNBreathOfFrost.blp", 0, true)
endif
if (udg_HeroNumber2 == 15) then
set tm = "|cffffff00God of Fire|r"
set tt = BlzGetAbilityExtendedTooltip('A07X', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A039', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A03E', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A03A', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A03B', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "ReplaceableTextures\\CommandButtons\\BTNFireForTheCannon.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "war3mapImported\\BTNFireShield.BLP", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "war3mapImported\\PASEyeOfTheFireStorm.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "war3mapImported\\BTNFireTornado.blp", 0, true)
endif
if (udg_HeroNumber2 == 16) then
set tm = "|cffffff00Medusa|r"
set tt = BlzGetAbilityExtendedTooltip('A07Y', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01R', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01U', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01W', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01V', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "ReplaceableTextures\\CommandButtons\\BTNCorrosiveBreath.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "war3mapImported\\ATCPoisonArrows.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "war3mapImported\\PASNaga-Tail.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "ReplaceableTextures\\CommandButtons\\BTNCharm.blp", 0, true)
endif
if (udg_HeroNumber2 == 17) then
set tm = "|cffffff00Ocean Warrior|r"
set tt = BlzGetAbilityExtendedTooltip('A07Z', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A028', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02C', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A029', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A02A', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "ReplaceableTextures\\CommandButtons\\BTNCrushingWave.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "war3mapImported\\PASBlue Naga.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "war3mapImported\\PASMoongladeTrident.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "ReplaceableTextures\\CommandButtons\\BTNTentacle.blp", 0, true)
endif
if (udg_HeroNumber2 == 18) then
set tm = "|cffffff00Pit Lord|r"
set tt = BlzGetAbilityExtendedTooltip('A080', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00T', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A00V', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A00U', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A00W', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "ReplaceableTextures\\CommandButtons\\BTNImpale.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "ReplaceableTextures\\CommandButtons\\BTNWallOfFire.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "war3mapImported\\PASDemonGaze.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "war3mapImported\\BTNDemonicMedal.blp", 0, true)
endif
if (udg_HeroNumber2 == 19) then
set tm = "|cffffff00Robogoblin|r"
set tt = BlzGetAbilityExtendedTooltip('A081', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A02J', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02M', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A02L', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A02N', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "war3mapImported\\BTNSaw-upg-3.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "ReplaceableTextures\\CommandButtons\\BTNLightningShield.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "war3mapImported\\PASRobotStrike.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "war3mapImported\\BTNNarcainian Energy Orb.blp", 0, true)
endif
if (udg_HeroNumber2 == 20) then
set tm = "|cffffff00Sand Guardian|r"
set tt = BlzGetAbilityExtendedTooltip('A082', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01G', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A04I', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01I', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01J', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "war3mapImported\\BTNSandstorm3.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "war3mapImported\\PASGreenDragonScale.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "war3mapImported\\PASPoisonSting.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "war3mapImported\\BTNTremor.blp", 0, true)
endif
if (udg_HeroNumber2 == 21) then
set tm = "|cffffff00Dark Mistress|r"
set tt = BlzGetAbilityExtendedTooltip('A083', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A02S', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02Q', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A02P', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A02O', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "war3mapImported\\BTNSpell_Shadow_BloodBoil.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "war3mapImported\\BTN_BloodCurseV2.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "war3mapImported\\PASPowerElectric.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "war3mapImported\\BTNFingerOfDeath.BLP", 0, true)
endif
if (udg_HeroNumber2 == 22) then
set tm = "|cffffff00Time Spirit|r"
set tt = BlzGetAbilityExtendedTooltip('A084', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A03D', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A03G', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A03F', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A03H', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "war3mapImported\\BTN_cr_Warp11.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "war3mapImported\\BTNTimeSpell.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "war3mapImported\\PAS.TimeUp.BLP", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "war3mapImported\\BTNRift.blp", 0, true)
endif
if (udg_HeroNumber2 == 23) then
set tm = "|cffffff00Siege Engineer|r"
set tt = BlzGetAbilityExtendedTooltip('A085', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A03L', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A03I', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A03J', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A03M', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "ReplaceableTextures\\CommandButtons\\BTNGoblinLandMine.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "war3mapImported\\Ballista.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "war3mapImported\\BTNTrebuchet.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "ReplaceableTextures\\CommandButtons\\BTNSeigeEngine.blp", 0, true)
endif
if (udg_HeroNumber2 == 24) then
set tm = "|cffffff00North Fisher|r"
set tt = BlzGetAbilityExtendedTooltip('A086', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A032', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A034', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A03N', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A037', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",21), "ReplaceableTextures\\CommandButtons\\BTNEnsnare.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",22), "war3mapImported\\PASHarpoon.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",23), "war3mapImported\\BTNFishing1.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",24), "war3mapImported\\BTNShark.blp", 0, true)
endif
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,21), t1)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,22), t2)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,23), t3)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,24), t4)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,25), tm)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,26), tt)
endfunction
//===========================================================================
function InitTrig_Description2 takes nothing returns nothing
set gg_trg_Description2 = CreateTrigger( )
call TriggerAddAction( gg_trg_Description2, function Trig_Description2_Actions )
endfunction
function Trig_Description3_Actions takes nothing returns nothing
local string t1
local string t2
local string t3
local string t4
local string tm
local string tt
if (udg_HeroNumber3 == 1) then
set tm = "|cffffff00Crusader|r"
set tt = BlzGetAbilityExtendedTooltip('A07J', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A000', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A002', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A004', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A005', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "ReplaceableTextures\\CommandButtons\\BTNHolyBolt.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "ReplaceableTextures\\PassiveButtons\\PASBTNStormHammer.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "war3mapImported\\BTNBless.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "ReplaceableTextures\\CommandButtons\\BTNResurrection.blp", 0, true)
endif
if (udg_HeroNumber3 == 2) then
set tm = "|cffffff00Rifleman|r"
set tt = BlzGetAbilityExtendedTooltip('A07K', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01K', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01L', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01N', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01M', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "ReplaceableTextures\\CommandButtons\\BTNCrate.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "war3mapImported\\PASTakeAim.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "war3mapImported\\BTNSniperRifle.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "war3mapImported\\BTNExplosiveBarrel.blp", 0, true)
endif
if (udg_HeroNumber3 == 3) then
set tm = "|cffffff00Warlock|r"
set tt = BlzGetAbilityExtendedTooltip('A07L', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01X', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01Z', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A021', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A022', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "ReplaceableTextures\\CommandButtons\\BTNInnerFire.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "war3mapImported\\BTNLightning Strike.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "ReplaceableTextures\\PassiveButtons\\PASBTNMagicalSentry.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "war3mapImported\\BTNDemoniacalAttack.blp", 0, true)
endif
if (udg_HeroNumber3 == 4) then
set tm = "|cffffff00Berserk|r"
set tt = BlzGetAbilityExtendedTooltip('A07M', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A006', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A008', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A00A', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A009', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "war3mapImported\\BTNFireAxe.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "war3mapImported\\BTNWBurstv3.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "war3mapImported\\PASBloodlust.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "ReplaceableTextures\\CommandButtons\\BTNHellScream.blp", 0, true)
endif
if (udg_HeroNumber3 == 5) then
set tm = "|cffffff00Pirate|r"
set tt = BlzGetAbilityExtendedTooltip('A07N', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00C', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A00D', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A08J', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A00E', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "ReplaceableTextures\\CommandButtons\\BTNHumanMissileUpOne.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "ReplaceableTextures\\CommandButtons\\BTNStrongDrink.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "war3mapImported\\PASIncreaseIncome2.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "war3mapImported\\BTNBShipCannon1.blp", 0, true)
endif
if (udg_HeroNumber3 == 6) then
set tm = "|cffffff00Night Slayer|r"
set tt = BlzGetAbilityExtendedTooltip('A07O', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A02E', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02H', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A02G', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A02D', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "ReplaceableTextures\\CommandButtons\\BTNUpgradeMoonGlaive.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "ReplaceableTextures\\CommandButtons\\BTNPossession.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "ReplaceableTextures\\CommandButtons\\BTNFaerieFire.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "war3mapImported\\PASDarkElfAura.blp", 0, true)
endif
if (udg_HeroNumber3 == 7) then
set tm = "|cffffff00Necromancer|r"
set tt = BlzGetAbilityExtendedTooltip('A07P', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00M', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A00O', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A00P', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A00R', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "ReplaceableTextures\\CommandButtons\\BTNSkeletonMage.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "ReplaceableTextures\\CommandButtons\\BTNPlagueCloud.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "ReplaceableTextures\\PassiveButtons\\PASBTNRegenerationAura.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "ReplaceableTextures\\CommandButtons\\BTNOrbOfCorruption.blp", 0, true)
endif
if (udg_HeroNumber3 == 8) then
set tm = "|cffffff00Shaman|r"
set tt = BlzGetAbilityExtendedTooltip('A07Q', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A02W', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02X', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A02Z', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A031', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "ReplaceableTextures\\CommandButtons\\BTNTaurenTotem.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "ReplaceableTextures\\CommandButtons\\BTNHex.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "war3mapImported\\BTNNewHarmingVoodoo_Inferia.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "ReplaceableTextures\\CommandButtons\\BTNSentryWard.blp", 0, true)
endif
if (udg_HeroNumber3 == 9) then
set tm = "|cffffff00Druid|r"
set tt = BlzGetAbilityExtendedTooltip('A07R', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00F', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A00H', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A00I', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A00K', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "ReplaceableTextures\\CommandButtons\\BTNEntanglingRoots.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "war3mapImported\\BTNChainLightning2.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "war3mapImported\\PASTornado.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "war3mapImported\\BTNDragonStones.blp", 0, true)
endif
if (udg_HeroNumber3 == 10) then
set tm = "|cffffff00Death Knight|r"
set tt = BlzGetAbilityExtendedTooltip('A07S', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A025', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A024', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A023', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A027', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "ReplaceableTextures\\CommandButtons\\BTNSacrificialSkull.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "war3mapImported\\BTNFireSwordStorm_v.1.2.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "war3mapImported\\PASSword.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "war3mapImported\\PASFrozenDeath.BLP", 0, true)
endif
if (udg_HeroNumber3 == 11) then
set tm = "|cffffff00Stellar Assassin|r"
set tt = BlzGetAbilityExtendedTooltip('A07T', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A016', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A019', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A017', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01A', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "ReplaceableTextures\\CommandButtons\\BTNStarfall.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "war3mapImported\\BTNHellfury_new.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "ReplaceableTextures\\PassiveButtons\\PASBTNGenericSpellImmunity.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "war3mapImported\\BTN_StarBlast.blp", 0, true)
endif
if (udg_HeroNumber3 == 12) then
set tm = "|cffffff00Monk|r"
set tt = BlzGetAbilityExtendedTooltip('A07U', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01Q', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01P', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01O', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01S', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "war3mapImported\\BTNMonkMeditate.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "war3mapImported\\BTNPIncantateGhost.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "war3mapImported\\PASPandaPower.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "war3mapImported\\BTNPandaAura.blp", 0, true)
endif
if (udg_HeroNumber3 == 13) then
set tm = "|cffffff00Chieftain|r"
set tt = BlzGetAbilityExtendedTooltip('A07V', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01C', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01B', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01D', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01E', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "ReplaceableTextures\\CommandButtons\\BTNEarthquake.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "ReplaceableTextures\\PassiveButtons\\PASBTNSmash.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "ReplaceableTextures\\CommandButtons\\BTNAncestralSpirit.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "ReplaceableTextures\\PassiveButtons\\PASBTNReincarnation.blp", 0, true)
endif
if (udg_HeroNumber3 == 14) then
set tm = "|cffffff00Ice Knight|r"
set tt = BlzGetAbilityExtendedTooltip('A07W', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00X', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A010', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A013', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A015', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "war3mapImported\\BTNFrozenExplode.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "war3mapImported\\BTNFrostShield.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "ReplaceableTextures\\PassiveButtons\\PASBTNFreezingBreath.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "ReplaceableTextures\\CommandButtons\\BTNBreathOfFrost.blp", 0, true)
endif
if (udg_HeroNumber3 == 15) then
set tm = "|cffffff00God of Fire|r"
set tt = BlzGetAbilityExtendedTooltip('A07X', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A039', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A03E', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A03A', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A03B', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "ReplaceableTextures\\CommandButtons\\BTNFireForTheCannon.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "war3mapImported\\BTNFireShield.BLP", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "war3mapImported\\PASEyeOfTheFireStorm.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "war3mapImported\\BTNFireTornado.blp", 0, true)
endif
if (udg_HeroNumber3 == 16) then
set tm = "|cffffff00Medusa|r"
set tt = BlzGetAbilityExtendedTooltip('A07Y', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01R', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01U', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01W', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01V', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "ReplaceableTextures\\CommandButtons\\BTNCorrosiveBreath.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "war3mapImported\\ATCPoisonArrows.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "war3mapImported\\PASNaga-Tail.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "ReplaceableTextures\\CommandButtons\\BTNCharm.blp", 0, true)
endif
if (udg_HeroNumber3 == 17) then
set tm = "|cffffff00Ocean Warrior|r"
set tt = BlzGetAbilityExtendedTooltip('A07Z', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A028', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02C', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A029', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A02A', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "ReplaceableTextures\\CommandButtons\\BTNCrushingWave.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "war3mapImported\\PASBlue Naga.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "war3mapImported\\PASMoongladeTrident.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "ReplaceableTextures\\CommandButtons\\BTNTentacle.blp", 0, true)
endif
if (udg_HeroNumber3 == 18) then
set tm = "|cffffff00Pit Lord|r"
set tt = BlzGetAbilityExtendedTooltip('A080', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00T', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A00V', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A00U', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A00W', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "ReplaceableTextures\\CommandButtons\\BTNImpale.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "ReplaceableTextures\\CommandButtons\\BTNWallOfFire.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "war3mapImported\\PASDemonGaze.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "war3mapImported\\BTNDemonicMedal.blp", 0, true)
endif
if (udg_HeroNumber3 == 19) then
set tm = "|cffffff00Robogoblin|r"
set tt = BlzGetAbilityExtendedTooltip('A081', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A02J', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02M', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A02L', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A02N', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "war3mapImported\\BTNSaw-upg-3.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "ReplaceableTextures\\CommandButtons\\BTNLightningShield.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "war3mapImported\\PASRobotStrike.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "war3mapImported\\BTNNarcainian Energy Orb.blp", 0, true)
endif
if (udg_HeroNumber3 == 20) then
set tm = "|cffffff00Sand Guardian|r"
set tt = BlzGetAbilityExtendedTooltip('A082', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01G', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A04I', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01I', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01J', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "war3mapImported\\BTNSandstorm3.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "war3mapImported\\PASGreenDragonScale.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "war3mapImported\\PASPoisonSting.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "war3mapImported\\BTNTremor.blp", 0, true)
endif
if (udg_HeroNumber3 == 21) then
set tm = "|cffffff00Dark Mistress|r"
set tt = BlzGetAbilityExtendedTooltip('A083', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A02S', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02Q', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A02P', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A02O', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "war3mapImported\\BTNSpell_Shadow_BloodBoil.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "war3mapImported\\BTN_BloodCurseV2.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "war3mapImported\\PASPowerElectric.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "war3mapImported\\BTNFingerOfDeath.BLP", 0, true)
endif
if (udg_HeroNumber3 == 22) then
set tm = "|cffffff00Time Spirit|r"
set tt = BlzGetAbilityExtendedTooltip('A084', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A03D', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A03G', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A03F', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A03H', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "war3mapImported\\BTN_cr_Warp11.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "war3mapImported\\BTNTimeSpell.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "war3mapImported\\PAS.TimeUp.BLP", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "war3mapImported\\BTNRift.blp", 0, true)
endif
if (udg_HeroNumber3 == 23) then
set tm = "|cffffff00Siege Engineer|r"
set tt = BlzGetAbilityExtendedTooltip('A085', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A03L', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A03I', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A03J', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A03M', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "ReplaceableTextures\\CommandButtons\\BTNGoblinLandMine.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "war3mapImported\\Ballista.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "war3mapImported\\BTNTrebuchet.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "ReplaceableTextures\\CommandButtons\\BTNSeigeEngine.blp", 0, true)
endif
if (udg_HeroNumber3 == 24) then
set tm = "|cffffff00North Fisher|r"
set tt = BlzGetAbilityExtendedTooltip('A086', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A032', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A034', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A03N', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A037', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",31), "ReplaceableTextures\\CommandButtons\\BTNEnsnare.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",32), "war3mapImported\\PASHarpoon.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",33), "war3mapImported\\BTNFishing1.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",34), "war3mapImported\\BTNShark.blp", 0, true)
endif
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,31), t1)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,32), t2)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,33), t3)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,34), t4)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,35), tm)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,36), tt)
endfunction
//===========================================================================
function InitTrig_Description3 takes nothing returns nothing
set gg_trg_Description3 = CreateTrigger( )
call TriggerAddAction( gg_trg_Description3, function Trig_Description3_Actions )
endfunction
function Trig_Description4_Actions takes nothing returns nothing
local string t1
local string t2
local string t3
local string t4
local string tm
local string tt
if (udg_HeroNumber4 == 1) then
set tm = "|cffffff00Crusader|r"
set tt = BlzGetAbilityExtendedTooltip('A07J', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A000', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A002', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A004', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A005', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "ReplaceableTextures\\CommandButtons\\BTNHolyBolt.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "ReplaceableTextures\\PassiveButtons\\PASBTNStormHammer.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "war3mapImported\\BTNBless.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "ReplaceableTextures\\CommandButtons\\BTNResurrection.blp", 0, true)
endif
if (udg_HeroNumber4 == 2) then
set tm = "|cffffff00Rifleman|r"
set tt = BlzGetAbilityExtendedTooltip('A07K', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01K', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01L', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01N', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01M', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "ReplaceableTextures\\CommandButtons\\BTNCrate.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "war3mapImported\\PASTakeAim.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "war3mapImported\\BTNSniperRifle.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "war3mapImported\\BTNExplosiveBarrel.blp", 0, true)
endif
if (udg_HeroNumber4 == 3) then
set tm = "|cffffff00Warlock|r"
set tt = BlzGetAbilityExtendedTooltip('A07L', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01X', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01Z', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A021', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A022', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "ReplaceableTextures\\CommandButtons\\BTNInnerFire.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "war3mapImported\\BTNLightning Strike.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "ReplaceableTextures\\PassiveButtons\\PASBTNMagicalSentry.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "war3mapImported\\BTNDemoniacalAttack.blp", 0, true)
endif
if (udg_HeroNumber4 == 4) then
set tm = "|cffffff00Berserk|r"
set tt = BlzGetAbilityExtendedTooltip('A07M', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A006', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A008', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A00A', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A009', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "war3mapImported\\BTNFireAxe.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "war3mapImported\\BTNWBurstv3.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "war3mapImported\\PASBloodlust.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "ReplaceableTextures\\CommandButtons\\BTNHellScream.blp", 0, true)
endif
if (udg_HeroNumber4 == 5) then
set tm = "|cffffff00Pirate|r"
set tt = BlzGetAbilityExtendedTooltip('A07N', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00C', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A00D', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A08J', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A00E', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "ReplaceableTextures\\CommandButtons\\BTNHumanMissileUpOne.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "ReplaceableTextures\\CommandButtons\\BTNStrongDrink.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "war3mapImported\\PASIncreaseIncome2.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "war3mapImported\\BTNBShipCannon1.blp", 0, true)
endif
if (udg_HeroNumber4 == 6) then
set tm = "|cffffff00Night Slayer|r"
set tt = BlzGetAbilityExtendedTooltip('A07O', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A02E', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02H', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A02G', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A02D', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "ReplaceableTextures\\CommandButtons\\BTNUpgradeMoonGlaive.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "ReplaceableTextures\\CommandButtons\\BTNPossession.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "ReplaceableTextures\\CommandButtons\\BTNFaerieFire.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "war3mapImported\\PASDarkElfAura.blp", 0, true)
endif
if (udg_HeroNumber4 == 7) then
set tm = "|cffffff00Necromancer|r"
set tt = BlzGetAbilityExtendedTooltip('A07P', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00M', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A00O', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A00P', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A00R', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "ReplaceableTextures\\CommandButtons\\BTNSkeletonMage.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "ReplaceableTextures\\CommandButtons\\BTNPlagueCloud.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "ReplaceableTextures\\PassiveButtons\\PASBTNRegenerationAura.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "ReplaceableTextures\\CommandButtons\\BTNOrbOfCorruption.blp", 0, true)
endif
if (udg_HeroNumber4 == 8) then
set tm = "|cffffff00Shaman|r"
set tt = BlzGetAbilityExtendedTooltip('A07Q', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A02W', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02X', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A02Z', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A031', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "ReplaceableTextures\\CommandButtons\\BTNTaurenTotem.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "ReplaceableTextures\\CommandButtons\\BTNHex.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "war3mapImported\\BTNNewHarmingVoodoo_Inferia.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "ReplaceableTextures\\CommandButtons\\BTNSentryWard.blp", 0, true)
endif
if (udg_HeroNumber4 == 9) then
set tm = "|cffffff00Druid|r"
set tt = BlzGetAbilityExtendedTooltip('A07R', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00F', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A00H', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A00I', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A00K', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "ReplaceableTextures\\CommandButtons\\BTNEntanglingRoots.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "war3mapImported\\BTNChainLightning2.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "war3mapImported\\PASTornado.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "war3mapImported\\BTNDragonStones.blp", 0, true)
endif
if (udg_HeroNumber4 == 10) then
set tm = "|cffffff00Death Knight|r"
set tt = BlzGetAbilityExtendedTooltip('A07S', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A025', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A024', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A023', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A027', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "ReplaceableTextures\\CommandButtons\\BTNSacrificialSkull.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "war3mapImported\\BTNFireSwordStorm_v.1.2.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "war3mapImported\\PASSword.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "war3mapImported\\PASFrozenDeath.BLP", 0, true)
endif
if (udg_HeroNumber4 == 11) then
set tm = "|cffffff00Stellar Assassin|r"
set tt = BlzGetAbilityExtendedTooltip('A07T', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A016', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A019', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A017', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01A', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "ReplaceableTextures\\CommandButtons\\BTNStarfall.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "war3mapImported\\BTNHellfury_new.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "ReplaceableTextures\\PassiveButtons\\PASBTNGenericSpellImmunity.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "war3mapImported\\BTN_StarBlast.blp", 0, true)
endif
if (udg_HeroNumber4 == 12) then
set tm = "|cffffff00Monk|r"
set tt = BlzGetAbilityExtendedTooltip('A07U', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01Q', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01P', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01O', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01S', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "war3mapImported\\BTNMonkMeditate.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "war3mapImported\\BTNPIncantateGhost.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "war3mapImported\\PASPandaPower.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "war3mapImported\\BTNPandaAura.blp", 0, true)
endif
if (udg_HeroNumber4 == 13) then
set tm = "|cffffff00Chieftain|r"
set tt = BlzGetAbilityExtendedTooltip('A07V', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01C', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01B', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01D', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01E', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "ReplaceableTextures\\CommandButtons\\BTNEarthquake.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "ReplaceableTextures\\PassiveButtons\\PASBTNSmash.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "ReplaceableTextures\\CommandButtons\\BTNAncestralSpirit.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "ReplaceableTextures\\PassiveButtons\\PASBTNReincarnation.blp", 0, true)
endif
if (udg_HeroNumber4 == 14) then
set tm = "|cffffff00Ice Knight|r"
set tt = BlzGetAbilityExtendedTooltip('A07W', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00X', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A010', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A013', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A015', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "war3mapImported\\BTNFrozenExplode.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "war3mapImported\\BTNFrostShield.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "ReplaceableTextures\\PassiveButtons\\PASBTNFreezingBreath.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "ReplaceableTextures\\CommandButtons\\BTNBreathOfFrost.blp", 0, true)
endif
if (udg_HeroNumber4 == 15) then
set tm = "|cffffff00God of Fire|r"
set tt = BlzGetAbilityExtendedTooltip('A07X', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A039', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A03E', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A03A', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A03B', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "ReplaceableTextures\\CommandButtons\\BTNFireForTheCannon.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "war3mapImported\\BTNFireShield.BLP", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "war3mapImported\\PASEyeOfTheFireStorm.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "war3mapImported\\BTNFireTornado.blp", 0, true)
endif
if (udg_HeroNumber4 == 16) then
set tm = "|cffffff00Medusa|r"
set tt = BlzGetAbilityExtendedTooltip('A07Y', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01R', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A01U', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01W', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01V', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "ReplaceableTextures\\CommandButtons\\BTNCorrosiveBreath.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "war3mapImported\\ATCPoisonArrows.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "war3mapImported\\PASNaga-Tail.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "ReplaceableTextures\\CommandButtons\\BTNCharm.blp", 0, true)
endif
if (udg_HeroNumber4 == 17) then
set tm = "|cffffff00Ocean Warrior|r"
set tt = BlzGetAbilityExtendedTooltip('A07Z', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A028', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02C', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A029', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A02A', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "ReplaceableTextures\\CommandButtons\\BTNCrushingWave.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "war3mapImported\\PASBlue Naga.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "war3mapImported\\PASMoongladeTrident.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "ReplaceableTextures\\CommandButtons\\BTNTentacle.blp", 0, true)
endif
if (udg_HeroNumber4 == 18) then
set tm = "|cffffff00Pit Lord|r"
set tt = BlzGetAbilityExtendedTooltip('A080', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A00T', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A00V', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A00U', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A00W', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "ReplaceableTextures\\CommandButtons\\BTNImpale.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "ReplaceableTextures\\CommandButtons\\BTNWallOfFire.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "war3mapImported\\PASDemonGaze.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "war3mapImported\\BTNDemonicMedal.blp", 0, true)
endif
if (udg_HeroNumber4 == 19) then
set tm = "|cffffff00Robogoblin|r"
set tt = BlzGetAbilityExtendedTooltip('A081', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A02J', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02M', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A02L', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A02N', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "war3mapImported\\BTNSaw-upg-3.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "ReplaceableTextures\\CommandButtons\\BTNLightningShield.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "war3mapImported\\PASRobotStrike.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "war3mapImported\\BTNNarcainian Energy Orb.blp", 0, true)
endif
if (udg_HeroNumber4 == 20) then
set tm = "|cffffff00Sand Guardian|r"
set tt = BlzGetAbilityExtendedTooltip('A082', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A01G', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A04I', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A01I', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A01J', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "war3mapImported\\BTNSandstorm3.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "war3mapImported\\PASGreenDragonScale.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "war3mapImported\\PASPoisonSting.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "war3mapImported\\BTNTremor.blp", 0, true)
endif
if (udg_HeroNumber4 == 21) then
set tm = "|cffffff00Dark Mistress|r"
set tt = BlzGetAbilityExtendedTooltip('A083', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A02S', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A02Q', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A02P', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A02O', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "war3mapImported\\BTNSpell_Shadow_BloodBoil.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "war3mapImported\\BTN_BloodCurseV2.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "war3mapImported\\PASPowerElectric.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "war3mapImported\\BTNFingerOfDeath.BLP", 0, true)
endif
if (udg_HeroNumber4 == 22) then
set tm = "|cffffff00Time Spirit|r"
set tt = BlzGetAbilityExtendedTooltip('A084', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A03D', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A03G', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A03F', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A03H', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "war3mapImported\\BTN_cr_Warp11.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "war3mapImported\\BTNTimeSpell.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "war3mapImported\\PAS.TimeUp.BLP", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "war3mapImported\\BTNRift.blp", 0, true)
endif
if (udg_HeroNumber4 == 23) then
set tm = "|cffffff00Siege Engineer|r"
set tt = BlzGetAbilityExtendedTooltip('A085', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A03L', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A03I', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A03J', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A03M', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "ReplaceableTextures\\CommandButtons\\BTNGoblinLandMine.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "war3mapImported\\Ballista.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "war3mapImported\\BTNTrebuchet.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "ReplaceableTextures\\CommandButtons\\BTNSeigeEngine.blp", 0, true)
endif
if (udg_HeroNumber4 == 24) then
set tm = "|cffffff00North Fisher|r"
set tt = BlzGetAbilityExtendedTooltip('A086', 0)
set t1 = BlzGetAbilityResearchExtendedTooltip('A032', 0)
set t2 = BlzGetAbilityResearchExtendedTooltip('A034', 0)
set t3 = BlzGetAbilityResearchExtendedTooltip('A03N', 0)
set t4 = BlzGetAbilityResearchExtendedTooltip('A037', 0)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",41), "ReplaceableTextures\\CommandButtons\\BTNEnsnare.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",42), "war3mapImported\\PASHarpoon.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",43), "war3mapImported\\BTNFishing1.blp", 0, true)
call BlzFrameSetTexture(BlzGetFrameByName("ScoreScreenButtonBackdrop",44), "war3mapImported\\BTNShark.blp", 0, true)
endif
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,41), t1)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,42), t2)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,43), t3)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,44), t4)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,45), tm)
call BlzFrameSetText(BlzGetFrameByName("StandardInfoTextTemplate" ,46), tt)
endfunction
//===========================================================================
function InitTrig_Description4 takes nothing returns nothing
set gg_trg_Description4 = CreateTrigger( )
call TriggerAddAction( gg_trg_Description4, function Trig_Description4_Actions )
endfunction
function Trig_Hero1Die_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_Hero1 ) ) then
return false
endif
return true
endfunction
function Trig_Hero1Die_Actions takes nothing returns nothing
call PolledWait( 5.00 )
call ReviveHeroLoc( udg_Hero1, Location(-5500, -14600), true )
call SetCameraTargetControllerNoZForPlayer( Player(0), udg_Hero1, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(0), 0 )
endfunction
//===========================================================================
function InitTrig_Hero1Die takes nothing returns nothing
set gg_trg_Hero1Die = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hero1Die, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Hero1Die, Condition( function Trig_Hero1Die_Conditions ) )
call TriggerAddAction( gg_trg_Hero1Die, function Trig_Hero1Die_Actions )
endfunction
function Trig_Hero2Die_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_Hero2 ) ) then
return false
endif
return true
endfunction
function Trig_Hero2Die_Actions takes nothing returns nothing
call PolledWait( 5.00 )
call ReviveHeroLoc( udg_Hero2, Location(-3250, -14600), true )
call SetCameraTargetControllerNoZForPlayer( Player(1), udg_Hero2, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(1), 0 )
endfunction
//===========================================================================
function InitTrig_Hero2Die takes nothing returns nothing
set gg_trg_Hero2Die = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hero2Die, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Hero2Die, Condition( function Trig_Hero2Die_Conditions ) )
call TriggerAddAction( gg_trg_Hero2Die, function Trig_Hero2Die_Actions )
endfunction
function Trig_Hero3Die_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_Hero3 ) ) then
return false
endif
return true
endfunction
function Trig_Hero3Die_Actions takes nothing returns nothing
call PolledWait( 5.00 )
call ReviveHeroLoc( udg_Hero3, Location(-950, -14600), true )
call SetCameraTargetControllerNoZForPlayer( Player(2), udg_Hero3, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(2), 0 )
endfunction
//===========================================================================
function InitTrig_Hero3Die takes nothing returns nothing
set gg_trg_Hero3Die = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hero3Die, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Hero3Die, Condition( function Trig_Hero3Die_Conditions ) )
call TriggerAddAction( gg_trg_Hero3Die, function Trig_Hero3Die_Actions )
endfunction
function Trig_Hero4Die_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_Hero4 ) ) then
return false
endif
return true
endfunction
function Trig_Hero4Die_Actions takes nothing returns nothing
call PolledWait( 5.00 )
call ReviveHeroLoc( udg_Hero4, Location(1350, -14600), true )
call SetCameraTargetControllerNoZForPlayer( Player(3), udg_Hero4, 0, 0, false )
call PolledWait(1)
call ResetToGameCameraForPlayer( Player(3), 0 )
endfunction
//===========================================================================
function InitTrig_Hero4Die takes nothing returns nothing
set gg_trg_Hero4Die = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hero4Die, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Hero4Die, Condition( function Trig_Hero4Die_Conditions ) )
call TriggerAddAction( gg_trg_Hero4Die, function Trig_Hero4Die_Actions )
endfunction