Name | Type | is_array | initial_value |
_TempGroup | group | No | |
AbilityString | string | No | |
AbyssalOwner | player | No | |
AllInDmg | real | No | 0 |
AnteUp | unit | No | |
AnteUpCaster | unit | No | |
AnteUpNum | integer | No | 0 |
Aphoticlevel | integer | No | 0 |
APOn | boolean | No | false |
AROn | boolean | No | false |
BarrierLife | real | No | 0 |
BeamCounter | integer | No | 0 |
Bear | unit | No | |
BearPercentLife | real | No | 0 |
BerserkerCaller | unit | No | |
BlackHole | unit | No | |
BSDam | real | No | 0 |
BSPosition | real | Yes | 0 |
BSTarget | unit | No | |
BSUnit | unit | No | |
Burrowed | boolean | Yes | false |
BushidoBladeUnit | unit | No | |
BushidoGroup | group | No | |
BushidoOwner | player | No | |
BushidoRandomNumber | integer | No | 0 |
CFLv | integer | No | 0 |
ChainFreezingCounter | integer | No | 0 |
ChainFreezingUnit | unit | No | |
ChainFrostGroup | group | No | |
ChainFrostPlayer | player | No | |
ChainLinkNumber | integer | No | 0 |
ChainLinks | unit | Yes | |
CharmGroup | group | No | |
CharmRandom | unit | No | |
CheckCS | string | Yes | |
CHor | integer | No | 0 |
CHorT | integer | No | 0 |
classes | gamecache | No | |
Colors | string | Yes | |
Consumable | item | No | |
CraggyChance | integer | No | 0 |
CreepRand | integer | No | 0 |
CSp1Int | integer | Yes | 0 |
CSp2Int | integer | Yes | 0 |
CTFScore | integer | Yes | 0 |
DeathTimeDE | real | Yes | 0 |
DEC1 | string | No | No |
DEC2 | string | No | No |
DeflectChance | integer | No | 0 |
DiabolicEdictCaster | unit | No | |
DisarmRestore | integer | Yes | |
DisarmRestoreNum | integer | Yes | 0 |
DMBool | boolean | No | false |
DMChargeFive | integer | Yes | 0 |
DMChargeFour | integer | Yes | 0 |
DMChargeOne | integer | Yes | 0 |
DMChargeSix | integer | Yes | 0 |
DMChargeThree | integer | Yes | 0 |
DMChargeTwo | integer | Yes | 0 |
DMHeroExp | integer | Yes | 0 |
DMHeroMoney | integer | Yes | 0 |
DMItemFive | integer | Yes | |
DMItemFour | integer | Yes | |
DMItemOne | integer | Yes | |
DMItemSix | integer | Yes | |
DmItemThree | integer | Yes | |
DMItemTwo | integer | Yes | |
DPWalker | unit | No | |
DraggedUnit | unit | No | |
Dragger | unit | No | |
dragonskills | integer | No | 0 |
DragonUser | unit | No | |
DustLevel | integer | Yes | 0 |
EclipseBeam | unitcode | No | |
EclipseCaster | unit | No | |
EclipseGroup | group | No | |
EclipseLim | integer | No | 0 |
EclipseLvl | integer | No | 0 |
EclipseTarget | unit | No | |
ECsubstrings1 | string | Yes | |
ECsubstrings2 | string | Yes | |
Elapsed20 | boolean | No | false |
ElapsedTime | boolean | No | false |
EnteredMatchID1 | string | No | |
EnteredMatchID2 | string | No | |
EpiGroup | group | No | |
FBTarget | unit | No | |
FearedUnit | unit | No | |
FFHero | unit | No | |
FFLv | integer | No | 0 |
FGCaster | unit | No | |
FGNum | real | No | 0 |
FissureFacing | real | No | 0 |
FissurePoint | location | No | |
FissureTicker | integer | No | 0 |
FlagTaken | boolean | No | false |
FleshHeap | real | No | 0 |
FrostTarget | unit | No | |
GazeCycle | integer | No | 0 |
Gazee | unit | No | |
Gazer | unit | No | |
GMCount | integer | No | 0 |
GMOldest | unit | No | |
GMT2B | integer | No | 0 |
GMTimer | timer | Yes | |
GMTot | integer | No | 0 |
GMUnit | unit | Yes | |
HaveABear | boolean | No | false |
Heartstopper | unit | No | |
HeroesDead | integer | Yes | 0 |
HeroFlags | boolean | Yes | false |
HeroNum | integer | Yes | 0 |
HO | integer | No | 0 |
HPUnit | unit | No | |
HR | integer | No | 0 |
HSLife | real | No | 0 |
HunterHero | unit | No | |
IlCaster | unit | No | |
IllLvl | integer | No | 0 |
InOut | boolean | No | false |
IntMult | integer | No | 4 |
ItemDrop | boolean | No | false |
ItemO | integer | No | 0 |
ItemR | integer | No | 0 |
ItemRand | integer | No | 0 |
ItemTaken | boolean | Yes | false |
Jux | integer | No | 0 |
Keeper | unit | No | |
KillinPlayer | integer | No | 0 |
KillInt | integer | Yes | 0 |
Killsinarow | integer | Yes | 0 |
KillTimer | timer | Yes | |
LBDeaths | integer | Yes | 0 |
LBDeathsSTR | string | Yes | |
LBKills | integer | Yes | 0 |
LBKillsStr | string | Yes | |
LBTime | timer | No | |
LBTow | integer | Yes | 0 |
Leviathan | unit | No | |
LoopA | integer | No | |
Malefice | unit | No | |
ManaVoid | real | No | 0 |
MarkedUnit | unit | No | |
MarkWait | real | No | 0 |
MCCaster | unit | No | |
MCLvl | integer | Yes | 0 |
MCSpell | integer | No | |
MHAngle | real | No | 0 |
MHLevel | integer | No | 0 |
MHUnits | unit | Yes | |
Minutes | integer | No | 0 |
MLL | integer | No | 0 |
MMGroup | group | No | |
MMUnit | integer | No | |
MorphAbil | integer | No | |
Morphling | unit | No | |
MorphlingCopyUnit | unit | No | |
MorphlingHero | unit | No | |
NagaSiren | unit | No | |
NecroO | integer | No | 0 |
NecroR | integer | No | 0 |
NetherPosition | location | Yes | |
NetherUnits | unit | Yes | |
NGBool | boolean | No | false |
NGUS | boolean | No | false |
NightBool | boolean | No | false |
NightCaster | unit | No | |
NightLvl | integer | No | 0 |
NPTot | integer | No | 0 |
NPU | boolean | Yes | false |
Omni1 | boolean | No | false |
OneMin | boolean | No | false |
OPCount | integer | Yes | 0 |
orb_cos | real | Yes | 0 |
orb_sin | real | Yes | 0 |
Percent | real | No | 0 |
PickedItems | item | No | |
PN | real | Yes | 0 |
PNG | group | No | |
PNLv | integer | No | 0 |
PNovaCaster | unit | No | |
PNovaDist | real | No | 0 |
PNPt | location | No | |
PNU | unit | Yes | |
PotFDam | real | No | 0 |
PotFT | integer | No | 0 |
PotFTarget | unit | No | |
Powerups | boolean | No | true |
PTimer | timer | Yes | |
Rand | unitcode | No | 1 |
RandHero | unitcode | Yes | |
RandNum | integer | No | 0 |
RandNumCp | integer | No | 0 |
RandPer | unit | No | |
RandPerson | unit | No | |
RaxCount | integer | Yes | 0 |
RDAbil | integer | No | |
RDDummy | unit | No | |
RDHero | unit | No | |
RDTarget | unit | No | |
ReagentOne | integer | Yes | 0 |
ReagentThree | integer | Yes | 0 |
ReagentTotal | integer | Yes | 0 |
ReagentTwo | integer | Yes | 0 |
ReD | boolean | Yes | false |
ReHT | integer | Yes | 0 |
ReP | player | Yes | |
RePN | integer | No | 0 |
ReT | integer | Yes | |
ReU | boolean | No | false |
ReviveMultiplier | real | No | 0 |
RoTRemove | unit | No | |
RouletteCounter | integer | No | 0 |
RouletteEffect | effect | No | |
RouletteGroup | group | No | |
RouletteNum | integer | No | 0 |
RouletteTarget | unit | No | |
RouletteUnit | unit | No | |
sandking | unit | No | |
scFinal | string | No | |
scFinalSeed | string | No | |
scResult | integer | No | 0 |
scSemiFinal | string | No | |
Seconds | integer | No | 0 |
semifChecksumMath | integer | Yes | 0 |
semifChecksumMath_STR | string | Yes | |
SemiFdigits | string | Yes | |
semifTempCheckSumINT | integer | Yes | 0 |
semiSemiFinal | string | No | |
SLTarget | unit | No | |
SNum | integer | No | 5 |
SpawnBadAss | boolean | Yes | false |
SpawnMRLMR | boolean | Yes | true |
SpawnMultiplier | integer | Yes | 3 |
Spider | unit | No | |
SpiritTimer | real | No | 0 |
SpoutTree | destructable | Yes | |
SunderPercentLife | real | Yes | 0 |
SunderTargets | unit | Yes | |
TeamOwnage | integer | Yes | 0 |
TeamReincarnation | integer | Yes | 0 |
Techies | unit | No | |
TeleTarget | unit | No | |
TempCounter | integer | No | 0 |
TempLoc | location | No | |
TempPotF | integer | No | 0 |
TimeOfDay | real | No | 0 |
TLaffector | unit | No | |
TLLife | real | Yes | 0 |
TLMana | real | Yes | 0 |
TLPoint | location | Yes | |
TossRand | integer | No | 0 |
TrackedUnit | unit | No | |
TROn | boolean | No | false |
UDNum | integer | No | 5 |
UnitsDNP | group | No | |
UpHigh | fogmodifier | Yes | |
VersionString | string | No | |
WebGroup | unit | Yes | |
WebInt | integer | No | 0 |
WhipEnd | unit | Yes | |
WhipTicker | integer | Yes | 0 |
WitherGroup | group | No | |
WoTFace | real | No | 0 |
WoTPt | location | No | |
Yggrasil | unit | No |
//===========================================================================
//
// DotA Allstars v6.01
//
// Warcraft III map script
// Generated by the Warcraft III World Editor
// Date: Fri Mar 04 23:26:56 2005
// Map Author: Guinsoo
//
//===========================================================================
//***************************************************************************
//*
//* Global Variables
//*
//***************************************************************************
globals
// User-defined
integer udg_SNum = 0
integer udg_UDNum = 0
integer udg_Rand = 0
boolean array udg_HeroFlags
integer array udg_Killsinarow
integer array udg_KillInt
integer array udg_TeamOwnage
integer udg_dragonskills = 0
unit udg_DragonUser = null
boolean udg_ElapsedTime = false
boolean udg_Powerups = false
boolean udg_OneMin = false
boolean array udg_ItemTaken
integer udg_ItemRand = 0
boolean array udg_SpawnMRLMR
integer udg_HO = 0
integer udg_ItemO = 0
unit udg_FFHero = null
unit udg_ChainFreezingUnit = null
unit udg_FrostTarget = null
unit udg_EclipseTarget = null
group udg_EclipseGroup = null
group udg_PNG = null
real array udg_PN
unit array udg_PNU
group udg_BushidoGroup = null
unit udg_BushidoBladeUnit = null
integer udg_BushidoRandomNumber = 0
unit udg_RandPer = null
player udg_BushidoOwner = null
integer udg_PNLv = 0
integer udg_RandNum = 0
group udg_CharmGroup = null
unit udg_CharmRandom = null
boolean udg_Elapsed20 = false
integer udg_HR = 0
integer udg_ItemR = 0
string array udg_Colors
integer udg_RandNumCp = 0
integer array udg_ReT
boolean array udg_ReD
player array udg_ReP
integer udg_RePN = 0
integer udg_KillinPlayer = 0
timer array udg_KillTimer
boolean array udg_NPU
integer udg_NPTot = 0
integer array udg_RandHero
unit udg_MorphlingHero = null
unit udg_MorphlingCopyUnit = null
unit udg_Morphling = null
integer udg_CHor = 0
integer udg_CHorT = 0
integer array udg_SpawnMultiplier
unit udg_HunterHero = null
location array udg_NetherPosition
integer array udg_LBKills
timer array udg_PTimer
unit array udg_NetherUnits
integer udg_TempCounter = 0
real udg_ReviveMultiplier = 0
integer udg_IntMult = 0
integer array udg_LBDeaths
location udg_PNPt = null
destructable array udg_SpoutTree
boolean udg_Omni1 = false
integer udg_BeamCounter = 0
integer array udg_HeroNum
unit udg_EclipseCaster = null
integer udg_ChainFreezingCounter = 0
player udg_ChainFrostPlayer = null
group udg_ChainFrostGroup = null
boolean udg_ReU = false
integer array udg_ReHT
unit udg_TrackedUnit = null
timer array udg_GMTimer
integer udg_GMCount = 0
integer udg_GMTot = 0
unit udg_GMOldest = null
integer udg_GMT2B = 0
unit array udg_GMUnit
real array udg_SunderPercentLife
unit array udg_SunderTargets
unit udg_Techies = null
unit udg_HPUnit = null
unit udg_NagaSiren = null
integer udg_scResult = 0
string udg_scFinalSeed
string array udg_ECsubstrings1
string array udg_ECsubstrings2
string array udg_LBKillsStr
string array udg_LBDeathsSTR
string udg_scSemiFinal
integer array udg_semifTempCheckSumINT
integer array udg_semifChecksumMath
string array udg_semifChecksumMath_STR
string array udg_SemiFdigits
string udg_semiSemiFinal
integer udg_LoopA = 0
string udg_scFinal
string udg_DEC1
string udg_EnteredMatchID1
integer array udg_CSp1Int
integer array udg_CSp2Int
string udg_DEC2
string udg_EnteredMatchID2
string array udg_CheckCS
real udg_TimeOfDay = 0
unit udg_Yggrasil = null
unit udg_Bear = null
real udg_BearPercentLife = 0
boolean udg_HaveABear = false
integer udg_WebInt = 0
unit array udg_WebGroup
unit udg_Keeper = null
boolean udg_InOut = false
unit udg_sandking = null
timer udg_LBTime = null
integer array udg_LBTow
integer udg_Minutes = 0
integer udg_Seconds = 0
unit udg_Spider = null
integer udg_MorphAbil = 0
unit udg_DiabolicEdictCaster = null
integer udg_EclipseBeam = 0
integer udg_CFLv = 0
integer udg_FFLv = 0
unit udg_RDHero = null
real udg_BSDam = 0
unit udg_DraggedUnit = null
unit udg_Dragger = null
unit udg_RDTarget = null
unit udg_RDDummy = null
integer udg_RDAbil = 0
boolean udg_NGBool = false
boolean udg_NGUS = false
integer udg_PotFT = 0
integer udg_TempPotF = 0
unit udg_PotFTarget = null
integer udg_EclipseLvl = 0
item udg_PickedItems = null
real udg_ManaVoid = 0
real udg_PotFDam = 0
real udg_WoTFace = 0
location udg_WoTPt = null
unit udg_Leviathan = null
unit udg_RoTRemove = null
unit udg_FGCaster = null
real udg_FGNum = 0
boolean udg_NightBool = false
unit udg_NightCaster = null
integer udg_NightLvl = 0
integer array udg_OPCount
real udg_HSLife = 0
real udg_FleshHeap = 0
integer udg_MHLevel = 0
unit array udg_MHUnits
integer udg_ChainLinkNumber = 0
unit array udg_ChainLinks
unit udg_BSUnit = null
real array udg_BSPosition
group udg_EpiGroup = null
boolean array udg_Burrowed
integer array udg_DustLevel
integer udg_MLL = 0
unit udg_IlCaster = null
unit udg_FBTarget = null
integer array udg_MCLvl
integer udg_MCSpell = 0
unit udg_MCCaster = null
integer udg_IllLvl = 0
group udg_MMGroup = null
integer udg_MMUnit = 0
integer udg_EclipseLim = 0
unit udg_PNovaCaster = null
real udg_PNovaDist = 0
integer array udg_HeroesDead
boolean array udg_SpawnBadAss
integer udg_CreepRand = 0
unit udg_BSTarget = null
integer array udg_RaxCount
real array udg_DeathTimeDE
integer array udg_DMHeroExp
integer array udg_DMHeroMoney
boolean udg_DMBool = false
boolean udg_AROn = false
boolean udg_TROn = false
boolean udg_APOn = false
boolean udg_ItemDrop = false
integer array udg_DMItemOne
integer array udg_DMItemTwo
integer array udg_DmItemThree
integer array udg_DMItemFour
integer array udg_DMItemFive
integer array udg_DMItemSix
integer array udg_DMChargeOne
integer array udg_DMChargeTwo
integer array udg_DMChargeThree
integer array udg_DMChargeFour
integer array udg_DMChargeFive
integer array udg_DMChargeSix
unit udg_RandPerson = null
string udg_VersionString
boolean udg_FlagTaken = false
integer array udg_CTFScore
integer array udg_ReagentOne
integer array udg_ReagentTwo
integer array udg_ReagentThree
integer array udg_ReagentTotal
unit udg_TeleTarget = null
group udg_RouletteGroup = null
integer udg_RouletteNum = 0
unit udg_RouletteTarget = null
effect udg_RouletteEffect = null
integer udg_RouletteCounter = 0
unit udg_RouletteUnit = null
integer udg_TossRand = 0
real udg_AllInDmg = 0
unit udg_AnteUp = null
unit udg_AnteUpCaster = null
integer udg_AnteUpNum = 0
unit udg_DPWalker = null
integer udg_Jux = 0
real udg_SpiritTimer = 0
unit udg_SLTarget = null
real udg_Percent = 0
real udg_MHAngle = 0
integer udg_FissureTicker = 0
real udg_FissureFacing = 0
location udg_FissurePoint = null
integer udg_Aphoticlevel = 0
fogmodifier array udg_UpHigh
integer udg_CraggyChance = 0
real udg_MarkWait = 0
unit udg_MarkedUnit = null
integer array udg_WhipTicker
unit array udg_WhipEnd
gamecache udg_classes = null
real array udg_orb_cos
real array udg_orb_sin
player udg_AbyssalOwner = null
location udg_TempLoc = null
unit udg_BerserkerCaller = null
group udg__TempGroup = null
group udg_WitherGroup = null
group udg_UnitsDNP = null
integer array udg_TeamReincarnation
integer array udg_DisarmRestore
integer array udg_DisarmRestoreNum
unit udg_FearedUnit = null
unit udg_Gazer = null
unit udg_Gazee = null
integer udg_GazeCycle = 0
unit udg_Heartstopper = null
unit udg_Malefice = null
unit udg_BlackHole = null
string udg_AbilityString
item udg_Consumable = null
location array udg_TLPoint
real array udg_TLLife
real array udg_TLMana
unit udg_TLaffector = null
integer udg_DeflectChance = 0
integer udg_NecroO = 0
integer udg_NecroR = 0
real udg_BarrierLife = 0
// Generated
rect gg_rct_Crypt_S = null
rect gg_rct_Crypt_SW = null
rect gg_rct_Crypt_W = null
rect gg_rct_Hero_Creation_Evil = null
rect gg_rct_Lore_E = null
rect gg_rct_Lore_N = null
rect gg_rct_Lore_NE = null
rect gg_rct_Temple_S = null
rect gg_rct_Temple_SW = null
rect gg_rct_Temple_W = null
rect gg_rct_Hero_Creation_NE = null
rect gg_rct_War_E = null
rect gg_rct_War_N = null
rect gg_rct_War_NE = null
rect gg_rct_ItemSpawn2 = null
rect gg_rct_herospawnud = null
rect gg_rct_herospawnsent = null
rect gg_rct_ItemSpawn1 = null
rect gg_rct_CreepRegion1 = null
rect gg_rct_Creep_region_2 = null
rect gg_rct_CreepRegion3 = null
rect gg_rct_CreepRegion4 = null
rect gg_rct_CreepRegion5 = null
rect gg_rct_CreepRegion6 = null
rect gg_rct_CreepRegion7 = null
rect gg_rct_CreepRegion8 = null
rect gg_rct_CreepRegion9 = null
rect gg_rct_CreepRegion10 = null
rect gg_rct_Sent_Top_Tavern = null
rect gg_rct_Sent_Bottom_Tavern = null
rect gg_rct_Scourge_Top_Tavern = null
rect gg_rct_Scourge_Bottom_Tavern = null
rect gg_rct_Scourge_New_Tavern = null
rect gg_rct_Sent_New_Tavern = null
rect gg_rct_Allpick_Sent = null
rect gg_rct_Allpick_Scourge = null
rect gg_rct_FlagSent = null
rect gg_rct_FlagScourge = null
rect gg_rct_FlagSentBig = null
rect gg_rct_FlagScourgeBig = null
rect gg_rct_CTFSentTower = null
rect gg_rct_CTFScourgeTower = null
rect gg_rct_CTF1 = null
rect gg_rct_CTF2 = null
rect gg_rct_CTF3 = null
rect gg_rct_CTF4 = null
rect gg_rct_CTF5 = null
rect gg_rct_CTF6 = null
camerasetup gg_cam_Camera_001 = null
camerasetup gg_cam_Camera_002 = null
camerasetup gg_cam_Camera_003 = null
camerasetup gg_cam_Camera_004 = null
sound gg_snd_Dominating = null
sound gg_snd_Double_Kill = null
sound gg_snd_GodLike = null
sound gg_snd_HolyShit = null
sound gg_snd_Killing_Spree = null
sound gg_snd_MegaKill = null
sound gg_snd_monster_kill = null
sound gg_snd_Ownage = null
sound gg_snd_Rampage = null
sound gg_snd_triple_kill = null
sound gg_snd_UltraKill = null
sound gg_snd_Unstoppable = null
sound gg_snd_WhickedSick = null
sound gg_snd_OrcBurrowBattleStationsWhat1 = null
sound gg_snd_ArrangedTeamInvitation = null
sound gg_snd_firstblood = null
trigger gg_trg_Revival_trigger = null
trigger gg_trg_entry = null
trigger gg_trg_entryDE = null
trigger gg_trg_RS1 = null
trigger gg_trg_RS2 = null
trigger gg_trg_Money = null
trigger gg_trg_SM_Money = null
trigger gg_trg_Deathtrigger = null
trigger gg_trg_SentD_DE2 = null
trigger gg_trg_SentD_DE3 = null
trigger gg_trg_SentD_DE4 = null
trigger gg_trg_SentD_DE5 = null
trigger gg_trg_SentD_DE6 = null
trigger gg_trg_ScouD_DE8 = null
trigger gg_trg_ScouD_DE9 = null
trigger gg_trg_ScouD_DE10 = null
trigger gg_trg_ScouD_DE11 = null
trigger gg_trg_ScouD_DE12 = null
trigger gg_trg_Leave = null
trigger gg_trg_Bounty = null
trigger gg_trg_Tree = null
trigger gg_trg_NoDouble = null
trigger gg_trg_HeroL1 = null
trigger gg_trg_HeroL2 = null
trigger gg_trg_RandomUD = null
trigger gg_trg_RandomUDAP = null
trigger gg_trg_RandomS = null
trigger gg_trg_RandomSAP = null
trigger gg_trg_RepUD = null
trigger gg_trg_RepUDAP = null
trigger gg_trg_RepS = null
trigger gg_trg_RepSAP = null
trigger gg_trg_ARReUD = null
trigger gg_trg_ARReS = null
trigger gg_trg_TRReUD = null
trigger gg_trg_TRReS = null
trigger gg_trg_debug_mode = null
trigger gg_trg_Tornado_barrier_2 = null
trigger gg_trg_Tornado_Barrier = null
trigger gg_trg_Tornado_blast = null
trigger gg_trg_Displace = null
trigger gg_trg_Perdition = null
trigger gg_trg_Power_Word = null
trigger gg_trg_Shadow_Word = null
trigger gg_trg_Ostracize = null
trigger gg_trg_Ostracize_new = null
trigger gg_trg_Shadow_Weave = null
trigger gg_trg_Protect_Roshan = null
trigger gg_trg_Protect_Roshan_2 = null
trigger gg_trg_Natures_Attendants = null
trigger gg_trg_Optimiser = null
trigger gg_trg_Mirror_Shield = null
trigger gg_trg_Shukuchi = null
trigger gg_trg_Split_Shot = null
trigger gg_trg_Time_Lapse_Cast = null
trigger gg_trg_Time_Lapse_Set = null
trigger gg_trg_Time_Lapse_Begin = null
trigger gg_trg_Malefice = null
trigger gg_trg_Conversion = null
trigger gg_trg_Midnight_Pulse = null
trigger gg_trg_Black_Hole = null
trigger gg_trg_Black_Hole_suck = null
trigger gg_trg_Heartstopper_kill = null
trigger gg_trg_Rot = null
trigger gg_trg_Gaze_b = null
trigger gg_trg_Gaze_c = null
trigger gg_trg_Gaze_d = null
trigger gg_trg_Gaze_e = null
trigger gg_trg_Gaze_f = null
trigger gg_trg_mekansm = null
trigger gg_trg_Stoneform = null
trigger gg_trg_Roar = null
trigger gg_trg_Disarm = null
trigger gg_trg_Grow = null
trigger gg_trg_Divine_Intervention = null
trigger gg_trg_Rupture = null
trigger gg_trg_Bleed = null
trigger gg_trg_Bleed_two = null
trigger gg_trg_Wounding_Spear = null
trigger gg_trg_Backstab = null
trigger gg_trg_Smoke_Screen = null
trigger gg_trg_Culling_Blade = null
trigger gg_trg_Revenants = null
trigger gg_trg_Soul_Assumption = null
trigger gg_trg_Grave_Chill = null
trigger gg_trg_DestroyFX = null
trigger gg_trg_TossUnit = null
trigger gg_trg_six_orb_Copy = null
trigger gg_trg_Impetus = null
trigger gg_trg_Untouchable = null
trigger gg_trg_Enchant = null
trigger gg_trg_BlindStrike = null
trigger gg_trg_MASTER_CASTER = null
trigger gg_trg_ABILITY_SWITCHBOARD = null
trigger gg_trg_Battle_Hunger = null
trigger gg_trg_Berserkers_call = null
trigger gg_trg_Berserkers_call_Cast = null
trigger gg_trg_ScatterShot = null
trigger gg_trg_Counter_Helix = null
trigger gg_trg_Craggy_Exterior = null
trigger gg_trg_Mark_Rewrite = null
trigger gg_trg_Shadowraze = null
trigger gg_trg_Necromastry = null
trigger gg_trg_Time_Stop = null
trigger gg_trg_Spirit_Lance = null
trigger gg_trg_Dopplewalk = null
trigger gg_trg_Dopplewalk_Move = null
trigger gg_trg_Juxtapose = null
trigger gg_trg_Ante_Up = null
trigger gg_trg_Ante_Up_death = null
trigger gg_trg_Roulette_effect = null
trigger gg_trg_Roulette = null
trigger gg_trg_Lucky_Stars = null
trigger gg_trg_All_In = null
trigger gg_trg_Nether_Ward = null
trigger gg_trg_Healing_Ward = null
trigger gg_trg_IlluminateCast = null
trigger gg_trg_IlluminateCharge = null
trigger gg_trg_Mana_Leak_effect = null
trigger gg_trg_Mana_Leak_learn = null
trigger gg_trg_chakra_magic = null
trigger gg_trg_Burrowstrike = null
trigger gg_trg_Epicenter = null
trigger gg_trg_Entrench = null
trigger gg_trg_Meat_Hook_Cast = null
trigger gg_trg_Meat_Hook_Extend = null
trigger gg_trg_Meat_Hook_Retract = null
trigger gg_trg_Flesh_Heap = null
trigger gg_trg_Death_Pulse = null
trigger gg_trg_Reaper_Scythe = null
trigger gg_trg_Sadist = null
trigger gg_trg_Laser = null
trigger gg_trg_Rearm = null
trigger gg_trg_Nightmare_Attack = null
trigger gg_trg_Nightmare_HP = null
trigger gg_trg_Nightmare = null
trigger gg_trg_Fiends_Grip_stop = null
trigger gg_trg_Fiends_Grip_mana = null
trigger gg_trg_Fiends_Grip_begin = null
trigger gg_trg_KS_active = null
trigger gg_trg_KS_learned = null
trigger gg_trg_Gush = null
trigger gg_trg_ravage = null
trigger gg_trg_overgrowth = null
trigger gg_trg_assassinate = null
trigger gg_trg_Natures_Guise_check = null
trigger gg_trg_Natures_Guise_cast = null
trigger gg_trg_Berserker_Rage_learned = null
trigger gg_trg_Berserker_Rage = null
trigger gg_trg_Spider = null
trigger gg_trg_Spin_Web_Limit = null
trigger gg_trg_Spin_Web_Invis_Remove = null
trigger gg_trg_Spirit_Bear_learned = null
trigger gg_trg_bear_dies = null
trigger gg_trg_druid_dies = null
trigger gg_trg_synergy_learned = null
trigger gg_trg_lone_druid_bonus_learned = null
trigger gg_trg_Summon_Spirit_Bear = null
trigger gg_trg_Yggrasil = null
trigger gg_trg_too_far = null
trigger gg_trg_Return_Bear = null
trigger gg_trg_aegis = null
trigger gg_trg_sunder_switch = null
trigger gg_trg_Sunder_begin = null
trigger gg_trg_land_mines_limit = null
trigger gg_trg_double_edge = null
trigger gg_trg_death_pact = null
trigger gg_trg_static_field = null
trigger gg_trg_track = null
trigger gg_trg_return = null
trigger gg_trg_beam_counter = null
trigger gg_trg_beam_counter_on = null
trigger gg_trg_refresh = null
trigger gg_trg_detonate = null
trigger gg_trg_detonate_given = null
trigger gg_trg_detonate_1 = null
trigger gg_trg_sprout = null
trigger gg_trg_holy_light = null
trigger gg_trg_devour = null
trigger gg_trg_death = null
trigger gg_trg_Nether_swap = null
trigger gg_trg_Purification = null
trigger gg_trg_new_HitN_3 = null
trigger gg_trg_new_HitN_2 = null
trigger gg_trg_new_HitN = null
trigger gg_trg_Hunter_in_the_Night = null
trigger gg_trg_song_of_the_siren_buff = null
trigger gg_trg_ManaVoid = null
trigger gg_trg_lightning_bolt = null
trigger gg_trg_Wrath_of_Zeus_Copy = null
trigger gg_trg_diabolicedict_new = null
trigger gg_trg_Reverse_Polarity = null
trigger gg_trg_omnislash_selection = null
trigger gg_trg_OmniSlashEffect = null
trigger gg_trg_omnislash = null
trigger gg_trg_Poison_Nova_effect = null
trigger gg_trg_Poison_Nova = null
trigger gg_trg_Poison_Nova_2 = null
trigger gg_trg_eclipse_effect = null
trigger gg_trg_Eclipse_Cast = null
trigger gg_trg_chain_freezing_effect = null
trigger gg_trg_Chain_Freezing_try = null
trigger gg_trg_void = null
trigger gg_trg_chaos_bolt = null
trigger gg_trg_phantom_refresh = null
trigger gg_trg_blur_learned = null
trigger gg_trg_moonglaive_3 = null
trigger gg_trg_take_aim = null
trigger gg_trg_dragon_bug = null
trigger gg_trg_dragon_bug_2 = null
trigger gg_trg_dragon_bug_3 = null
trigger gg_trg_Freezing_field_Cast = null
trigger gg_trg_Freezing_field_end = null
trigger gg_trg_FreezingFieldSpawn2 = null
trigger gg_trg_Morph_learned = null
trigger gg_trg_morph_turn_on = null
trigger gg_trg_morph_turn_off = null
trigger gg_trg_morph_str = null
trigger gg_trg_morph_agl = null
trigger gg_trg_morphling_attribute = null
trigger gg_trg_Copy_steal = null
trigger gg_trg_Copy_Activate = null
trigger gg_trg_Copy_Deactivate = null
trigger gg_trg_Overpower = null
trigger gg_trg_Enrage = null
trigger gg_trg_Aftershock = null
trigger gg_trg_Enchant_Totem = null
trigger gg_trg_Echo_Slam = null
trigger gg_trg_Fissure = null
trigger gg_trg_timer2 = null
trigger gg_trg_timer3 = null
trigger gg_trg_timer4 = null
trigger gg_trg_timer5 = null
trigger gg_trg_timer6 = null
trigger gg_trg_timer8 = null
trigger gg_trg_timer9 = null
trigger gg_trg_timer10 = null
trigger gg_trg_timer11 = null
trigger gg_trg_timer12 = null
trigger gg_trg_HeroKillTally = null
trigger gg_trg_SentinelKillNew = null
trigger gg_trg_ScourgeKill = null
trigger gg_trg_player1kill = null
trigger gg_trg_player7kill = null
trigger gg_trg_Suicide_death = null
trigger gg_trg_Flag_mana = null
trigger gg_trg_Mana = null
trigger gg_trg_NEFlag_Returned = null
trigger gg_trg_UDFlag_Returned = null
trigger gg_trg_NEFlag_Forbidden = null
trigger gg_trg_UDFlag_Forbidden = null
trigger gg_trg_NEScore = null
trigger gg_trg_UDScore = null
trigger gg_trg_PingReturnNE = null
trigger gg_trg_PingReturnUD = null
trigger gg_trg_CTFv = null
trigger gg_trg_IDv = null
trigger gg_trg_SCv = null
trigger gg_trg_DEv = null
trigger gg_trg_MMv = null
trigger gg_trg_MMa = null
trigger gg_trg_APv = null
trigger gg_trg_SMv = null
trigger gg_trg_DMv = null
trigger gg_trg_AR = null
trigger gg_trg_TR = null
trigger gg_trg_RV1 = null
trigger gg_trg_RV2 = null
trigger gg_trg_PUV = null
trigger gg_trg_sent_chosen = null
trigger gg_trg_elapsed_time = null
trigger gg_trg_Move = null
trigger gg_trg_multi_hero_correction = null
trigger gg_trg_ten_minute_elapsed = null
trigger gg_trg_sheep = null
trigger gg_trg_elapsed15sec = null
trigger gg_trg_map_init = null
trigger gg_trg_OneMinElapsed = null
trigger gg_trg_RoshanDies = null
trigger gg_trg_ItemSpawn = null
trigger gg_trg_SentLMove = null
trigger gg_trg_ScouLMove = null
trigger gg_trg_SentMMove = null
trigger gg_trg_ScouMMove = null
trigger gg_trg_SentRMove = null
trigger gg_trg_ScouRMove = null
trigger gg_trg_elapsed10 = null
trigger gg_trg_elapsed20 = null
trigger gg_trg_elapsed30 = null
trigger gg_trg_spawn_multipler = null
trigger gg_trg_spawn_multiplier_range = null
trigger gg_trg_CreepSpawn = null
trigger gg_trg_Spawn = null
trigger gg_trg_SpawnGolemFish = null
trigger gg_trg_SpawnHydra = null
trigger gg_trg_Consumable_charge = null
trigger gg_trg_Aghanims_Scepter = null
trigger gg_trg_ItemSimple = null
trigger gg_trg_ItemSwap = null
trigger gg_trg_ItemComplex = null
trigger gg_trg_forbidden_items = null
trigger gg_trg_upgrader = null
trigger gg_trg_Leaderboard_count = null
trigger gg_trg_Leaderboard_count_2 = null
trigger gg_trg_Sent_trees_die = null
trigger gg_trg_UD_stuff_dies = null
trigger gg_trg_UL_crypt = null
trigger gg_trg_M_crypt = null
trigger gg_trg_LR_crypt = null
trigger gg_trg_UL_temple = null
trigger gg_trg_M_temple = null
trigger gg_trg_LR_temple = null
trigger gg_trg_UL_war = null
trigger gg_trg_M_war = null
trigger gg_trg_R_war = null
trigger gg_trg_UL_lore = null
trigger gg_trg_M_lore = null
trigger gg_trg_R_lore = null
trigger gg_trg_Sent_Win = null
trigger gg_trg_Scourge_Win = null
trigger gg_trg_display_leaderboard = null
trigger gg_trg_update_leaderboard_always = null
trigger gg_trg_update_leaderboard_CTF = null
trigger gg_trg_update_leaderboard_kills = null
trigger gg_trg_Sent_Win_Checksum = null
trigger gg_trg_Scourge_Win_Checksum = null
trigger gg_trg_S = null
trigger gg_trg_MatchID_team1 = null
trigger gg_trg_MatchID_team2 = null
trigger gg_trg_Check_Sum = null
unit gg_unit_ntav_0000 = null
unit gg_unit_etrp_0103 = null
unit gg_unit_etrp_0102 = null
unit gg_unit_u00D_0101 = null
unit gg_unit_u00D_0100 = null
unit gg_unit_u00D_0099 = null
unit gg_unit_n008_0009 = null
unit gg_unit_n01D_0012 = null
unit gg_unit_n007_0018 = null
unit gg_unit_n005_0019 = null
unit gg_unit_n01B_0020 = null
unit gg_unit_n00W_0026 = null
unit gg_unit_n00V_0033 = null
unit gg_unit_etol_0039 = null
unit gg_unit_e011_0040 = null
unit gg_unit_e011_0041 = null
unit gg_unit_etrp_0042 = null
unit gg_unit_etrp_0043 = null
unit gg_unit_etrp_0044 = null
unit gg_unit_e011_0106 = null
unit gg_unit_uzg1_0098 = null
unit gg_unit_e011_0105 = null
unit gg_unit_e011_0107 = null
unit gg_unit_etrp_0104 = null
unit gg_unit_eaom_0052 = null
unit gg_unit_eaoe_0053 = null
unit gg_unit_eaoe_0054 = null
unit gg_unit_eaom_0055 = null
unit gg_unit_eaom_0056 = null
unit gg_unit_eaoe_0057 = null
unit gg_unit_emow_0058 = null
unit gg_unit_emow_0059 = null
unit gg_unit_emow_0060 = null
unit gg_unit_emow_0061 = null
unit gg_unit_emow_0062 = null
unit gg_unit_emow_0063 = null
unit gg_unit_emow_0064 = null
unit gg_unit_emow_0065 = null
unit gg_unit_emow_0066 = null
unit gg_unit_emow_0067 = null
unit gg_unit_eaow_0068 = null
unit gg_unit_edob_0069 = null
unit gg_unit_edos_0070 = null
unit gg_unit_uzg1_0071 = null
unit gg_unit_uzg1_0072 = null
unit gg_unit_uzg1_0073 = null
unit gg_unit_usep_0074 = null
unit gg_unit_usep_0075 = null
unit gg_unit_usep_0076 = null
unit gg_unit_utod_0077 = null
unit gg_unit_utod_0078 = null
unit gg_unit_utod_0079 = null
unit gg_unit_unpl_0080 = null
unit gg_unit_u00D_0081 = null
unit gg_unit_u00D_0082 = null
unit gg_unit_uzig_0083 = null
unit gg_unit_uzig_0084 = null
unit gg_unit_uzig_0085 = null
unit gg_unit_uzig_0086 = null
unit gg_unit_uzig_0087 = null
unit gg_unit_uzig_0088 = null
unit gg_unit_uzig_0089 = null
unit gg_unit_uzig_0090 = null
unit gg_unit_uzig_0091 = null
unit gg_unit_uzig_0092 = null
unit gg_unit_usap_0093 = null
unit gg_unit_ugrv_0094 = null
unit gg_unit_uslh_0095 = null
unit gg_unit_uzg1_0097 = null
unit gg_unit_uzg1_0096 = null
unit gg_unit_e00D_0004 = null
unit gg_unit_e00B_0005 = null
unit gg_unit_e00A_0006 = null
unit gg_unit_e008_0007 = null
unit gg_unit_e001_0008 = null
unit gg_unit_n00L_0115 = null
unit gg_unit_n002_0050 = null
unit gg_unit_n002_0117 = null
unit gg_unit_uzig_0118 = null
trigger gg_trg_Untitled_Trigger_001 = null
trigger gg_trg_First_Blood = null
trigger gg_trg_Unstuck = null
trigger gg_trg_Unstick = null
trigger gg_trg_Untitled_Trigger_002 = null
endglobals
function InitGlobals takes nothing returns nothing
local integer i = 0
set udg_SNum = 5
set udg_UDNum = 5
set udg_Rand = 1
set i = 0
loop
exitwhen (i > 34)
set udg_HeroFlags[i] = false
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 16)
set udg_Killsinarow[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 16)
set udg_KillInt[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 4)
set udg_TeamOwnage[i] = 0
set i = i + 1
endloop
set udg_dragonskills = 0
set udg_ElapsedTime = false
set udg_Powerups = true
set udg_OneMin = false
set i = 0
loop
exitwhen (i > 2)
set udg_ItemTaken[i] = false
set i = i + 1
endloop
set udg_ItemRand = 0
set i = 0
loop
exitwhen (i > 12)
set udg_SpawnMRLMR[i] = true
set i = i + 1
endloop
set udg_HO = 0
set udg_ItemO = 0
set udg_EclipseGroup = CreateGroup()
set udg_PNG = CreateGroup()
set i = 0
loop
exitwhen (i > 36)
set udg_PN[i] = 0
set i = i + 1
endloop
set udg_BushidoGroup = CreateGroup()
set udg_BushidoRandomNumber = 0
set udg_PNLv = 0
set udg_RandNum = 0
set udg_CharmGroup = CreateGroup()
set udg_Elapsed20 = false
set udg_HR = 0
set udg_ItemR = 0
set i = 0
loop
exitwhen (i > 12)
set udg_Colors[i] = ""
set i = i + 1
endloop
set udg_RandNumCp = 0
set i = 0
loop
exitwhen (i > 12)
set udg_ReD[i] = false
set i = i + 1
endloop
set udg_RePN = 0
set udg_KillinPlayer = 0
set i = 0
loop
exitwhen (i > 12)
set udg_KillTimer[i] = CreateTimer()
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 12)
set udg_NPU[i] = false
set i = i + 1
endloop
set udg_NPTot = 0
set udg_CHor = 0
set udg_CHorT = 0
set i = 0
loop
exitwhen (i > 2)
set udg_SpawnMultiplier[i] = 3
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 12)
set udg_LBKills[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 12)
set udg_PTimer[i] = CreateTimer()
set i = i + 1
endloop
set udg_TempCounter = 0
set udg_ReviveMultiplier = 0
set udg_IntMult = 4
set i = 0
loop
exitwhen (i > 12)
set udg_LBDeaths[i] = 0
set i = i + 1
endloop
set udg_Omni1 = false
set udg_BeamCounter = 0
set i = 0
loop
exitwhen (i > 12)
set udg_HeroNum[i] = 0
set i = i + 1
endloop
set udg_ChainFreezingCounter = 0
set udg_ChainFrostGroup = CreateGroup()
set udg_ReU = false
set i = 0
loop
exitwhen (i > 12)
set udg_ReHT[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 100)
set udg_GMTimer[i] = CreateTimer()
set i = i + 1
endloop
set udg_GMCount = 0
set udg_GMTot = 0
set udg_GMT2B = 0
set i = 0
loop
exitwhen (i > 2)
set udg_SunderPercentLife[i] = 0
set i = i + 1
endloop
set udg_scResult = 0
set udg_scFinalSeed = ""
set i = 0
loop
exitwhen (i > 1)
set udg_ECsubstrings1[i] = ""
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 1)
set udg_ECsubstrings2[i] = ""
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 1)
set udg_LBKillsStr[i] = ""
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 1)
set udg_LBDeathsSTR[i] = ""
set i = i + 1
endloop
set udg_scSemiFinal = ""
set i = 0
loop
exitwhen (i > 1)
set udg_semifTempCheckSumINT[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 1)
set udg_semifChecksumMath[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 1)
set udg_semifChecksumMath_STR[i] = ""
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 1)
set udg_SemiFdigits[i] = ""
set i = i + 1
endloop
set udg_semiSemiFinal = ""
set udg_scFinal = ""
set udg_DEC1 = "No"
set udg_EnteredMatchID1 = ""
set i = 0
loop
exitwhen (i > 1)
set udg_CSp1Int[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 1)
set udg_CSp2Int[i] = 0
set i = i + 1
endloop
set udg_DEC2 = "No"
set udg_EnteredMatchID2 = ""
set i = 0
loop
exitwhen (i > 1)
set udg_CheckCS[i] = ""
set i = i + 1
endloop
set udg_TimeOfDay = 0
set udg_BearPercentLife = 0
set udg_HaveABear = false
set udg_WebInt = 0
set udg_InOut = false
set udg_LBTime = CreateTimer()
set i = 0
loop
exitwhen (i > 2)
set udg_LBTow[i] = 0
set i = i + 1
endloop
set udg_Minutes = 0
set udg_Seconds = 0
set udg_CFLv = 0
set udg_FFLv = 0
set udg_BSDam = 0
set udg_NGBool = false
set udg_NGUS = false
set udg_PotFT = 0
set udg_TempPotF = 0
set udg_EclipseLvl = 0
set udg_ManaVoid = 0
set udg_PotFDam = 0
set udg_WoTFace = 0
set udg_FGNum = 0
set udg_NightBool = false
set udg_NightLvl = 0
set i = 0
loop
exitwhen (i > 16)
set udg_OPCount[i] = 0
set i = i + 1
endloop
set udg_HSLife = 0
set udg_FleshHeap = 0
set udg_MHLevel = 0
set udg_ChainLinkNumber = 0
set i = 0
loop
exitwhen (i > 1)
set udg_BSPosition[i] = 0
set i = i + 1
endloop
set udg_EpiGroup = CreateGroup()
set i = 0
loop
exitwhen (i > 16)
set udg_Burrowed[i] = false
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 16)
set udg_DustLevel[i] = 0
set i = i + 1
endloop
set udg_MLL = 0
set i = 0
loop
exitwhen (i > 12)
set udg_MCLvl[i] = 0
set i = i + 1
endloop
set udg_IllLvl = 0
set udg_MMGroup = CreateGroup()
set udg_EclipseLim = 0
set udg_PNovaDist = 0
set i = 0
loop
exitwhen (i > 2)
set udg_HeroesDead[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 6)
set udg_SpawnBadAss[i] = false
set i = i + 1
endloop
set udg_CreepRand = 0
set i = 0
loop
exitwhen (i > 2)
set udg_RaxCount[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 12)
set udg_DeathTimeDE[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 12)
set udg_DMHeroExp[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 12)
set udg_DMHeroMoney[i] = 0
set i = i + 1
endloop
set udg_DMBool = false
set udg_AROn = false
set udg_TROn = false
set udg_APOn = false
set udg_ItemDrop = false
set i = 0
loop
exitwhen (i > 12)
set udg_DMChargeOne[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 12)
set udg_DMChargeTwo[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 12)
set udg_DMChargeThree[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 12)
set udg_DMChargeFour[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 12)
set udg_DMChargeFive[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 12)
set udg_DMChargeSix[i] = 0
set i = i + 1
endloop
set udg_VersionString = ""
set udg_FlagTaken = false
set i = 0
loop
exitwhen (i > 2)
set udg_CTFScore[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 12)
set udg_ReagentOne[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 12)
set udg_ReagentTwo[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 12)
set udg_ReagentThree[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 3)
set udg_ReagentTotal[i] = 0
set i = i + 1
endloop
set udg_RouletteGroup = CreateGroup()
set udg_RouletteNum = 0
set udg_RouletteCounter = 0
set udg_TossRand = 0
set udg_AllInDmg = 0
set udg_AnteUpNum = 0
set udg_Jux = 0
set udg_SpiritTimer = 0
set udg_Percent = 0
set udg_MHAngle = 0
set udg_FissureTicker = 0
set udg_FissureFacing = 0
set udg_Aphoticlevel = 0
set udg_CraggyChance = 0
set udg_MarkWait = 0
set i = 0
loop
exitwhen (i > 1)
set udg_WhipTicker[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 90)
set udg_orb_cos[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 90)
set udg_orb_sin[i] = 0
set i = i + 1
endloop
set udg__TempGroup = CreateGroup()
set udg_WitherGroup = CreateGroup()
set udg_UnitsDNP = CreateGroup()
set i = 0
loop
exitwhen (i > 2)
set udg_TeamReincarnation[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 12)
set udg_DisarmRestoreNum[i] = 0
set i = i + 1
endloop
set udg_GazeCycle = 0
set udg_AbilityString = ""
set i = 0
loop
exitwhen (i > 10)
set udg_TLLife[i] = 0
set i = i + 1
endloop
set i = 0
loop
exitwhen (i > 10)
set udg_TLMana[i] = 0
set i = i + 1
endloop
set udg_DeflectChance = 0
set udg_NecroO = 0
set udg_NecroR = 0
set udg_BarrierLife = 0
endfunction
//***************************************************************************
//*
//* Map Item Tables
//*
//***************************************************************************
function ItemTable000000_DropItems takes nothing returns nothing
local widget trigWidget = null
local unit trigUnit = null
local integer itemID = 0
local boolean canDrop = true
set trigWidget = bj_lastDyingWidget
if (trigWidget == null) then
set trigUnit = GetTriggerUnit()
endif
if (trigUnit != null) then
set canDrop = not IsUnitHidden(trigUnit)
if (canDrop and GetChangingUnit() != null) then
set canDrop = (GetChangingUnitPrevOwner() == Player(PLAYER_NEUTRAL_AGGRESSIVE))
endif
endif
if (canDrop) then
// Item set 0
call RandomDistReset( )
call RandomDistAddItem( 'shrs', 100 )
set itemID = RandomDistChoose( )
if (trigUnit != null) then
call UnitDropItem( trigUnit, itemID )
else
call WidgetDropItem( trigWidget, itemID )
endif
endif
set bj_lastDyingWidget = null
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//***************************************************************************
//*
//* Sounds
//*
//***************************************************************************
function InitSounds takes nothing returns nothing
set gg_snd_Dominating = CreateSound( "war3mapImported\\Dominating.wav", false, false, false, 10, 10, "" )
call SetSoundDuration( gg_snd_Dominating, 1698 )
call SetSoundChannel( gg_snd_Dominating, 0 )
call SetSoundVolume( gg_snd_Dominating, 127 )
call SetSoundPitch( gg_snd_Dominating, 1.0 )
set gg_snd_Double_Kill = CreateSound( "war3mapImported\\Double_Kill.wav", false, false, false, 10, 10, "" )
call SetSoundDuration( gg_snd_Double_Kill, 1923 )
call SetSoundChannel( gg_snd_Double_Kill, 0 )
call SetSoundVolume( gg_snd_Double_Kill, 127 )
call SetSoundPitch( gg_snd_Double_Kill, 1.0 )
set gg_snd_GodLike = CreateSound( "war3mapImported\\GodLike.wav", false, false, false, 10, 10, "" )
call SetSoundDuration( gg_snd_GodLike, 1744 )
call SetSoundChannel( gg_snd_GodLike, 0 )
call SetSoundVolume( gg_snd_GodLike, 127 )
call SetSoundPitch( gg_snd_GodLike, 1.0 )
set gg_snd_HolyShit = CreateSound( "war3mapImported\\HolyShit.wav", false, false, false, 10, 10, "" )
call SetSoundDuration( gg_snd_HolyShit, 2242 )
call SetSoundChannel( gg_snd_HolyShit, 0 )
call SetSoundVolume( gg_snd_HolyShit, 127 )
call SetSoundPitch( gg_snd_HolyShit, 1.0 )
set gg_snd_Killing_Spree = CreateSound( "war3mapImported\\Killing_Spree.wav", false, false, false, 10, 10, "" )
call SetSoundDuration( gg_snd_Killing_Spree, 2279 )
call SetSoundChannel( gg_snd_Killing_Spree, 0 )
call SetSoundVolume( gg_snd_Killing_Spree, 127 )
call SetSoundPitch( gg_snd_Killing_Spree, 1.0 )
set gg_snd_MegaKill = CreateSound( "war3mapImported\\MegaKill.wav", false, false, false, 10, 10, "" )
call SetSoundDuration( gg_snd_MegaKill, 2519 )
call SetSoundChannel( gg_snd_MegaKill, 0 )
call SetSoundVolume( gg_snd_MegaKill, 127 )
call SetSoundPitch( gg_snd_MegaKill, 1.0 )
set gg_snd_monster_kill = CreateSound( "war3mapImported\\monster_kill.wav", false, false, false, 10, 10, "" )
call SetSoundDuration( gg_snd_monster_kill, 3252 )
call SetSoundChannel( gg_snd_monster_kill, 0 )
call SetSoundVolume( gg_snd_monster_kill, 127 )
call SetSoundPitch( gg_snd_monster_kill, 1.0 )
set gg_snd_Ownage = CreateSound( "war3mapImported\\Ownage.wav", false, false, false, 10, 10, "" )
call SetSoundDuration( gg_snd_Ownage, 2489 )
call SetSoundChannel( gg_snd_Ownage, 0 )
call SetSoundVolume( gg_snd_Ownage, 127 )
call SetSoundPitch( gg_snd_Ownage, 1.0 )
set gg_snd_Rampage = CreateSound( "war3mapImported\\Rampage.wav", false, false, false, 10, 10, "" )
call SetSoundDuration( gg_snd_Rampage, 2023 )
call SetSoundChannel( gg_snd_Rampage, 0 )
call SetSoundVolume( gg_snd_Rampage, 127 )
call SetSoundPitch( gg_snd_Rampage, 1.0 )
set gg_snd_triple_kill = CreateSound( "war3mapImported\\triple_kill.wav", false, false, false, 10, 10, "" )
call SetSoundDuration( gg_snd_triple_kill, 1828 )
call SetSoundChannel( gg_snd_triple_kill, 0 )
call SetSoundVolume( gg_snd_triple_kill, 127 )
call SetSoundPitch( gg_snd_triple_kill, 1.0 )
set gg_snd_UltraKill = CreateSound( "war3mapImported\\UltraKill.wav", false, false, false, 10, 10, "" )
call SetSoundDuration( gg_snd_UltraKill, 1797 )
call SetSoundChannel( gg_snd_UltraKill, 0 )
call SetSoundVolume( gg_snd_UltraKill, 127 )
call SetSoundPitch( gg_snd_UltraKill, 1.0 )
set gg_snd_Unstoppable = CreateSound( "war3mapImported\\Unstoppable.wav", false, false, false, 10, 10, "" )
call SetSoundDuration( gg_snd_Unstoppable, 1944 )
call SetSoundChannel( gg_snd_Unstoppable, 0 )
call SetSoundVolume( gg_snd_Unstoppable, 127 )
call SetSoundPitch( gg_snd_Unstoppable, 1.0 )
set gg_snd_WhickedSick = CreateSound( "war3mapImported\\WhickedSick.wav", false, false, false, 10, 10, "" )
call SetSoundDuration( gg_snd_WhickedSick, 2522 )
call SetSoundChannel( gg_snd_WhickedSick, 0 )
call SetSoundVolume( gg_snd_WhickedSick, 127 )
call SetSoundPitch( gg_snd_WhickedSick, 1.0 )
set gg_snd_OrcBurrowBattleStationsWhat1 = CreateSound( "Abilities\\Spells\\Orc\\BattleStations\\OrcBurrowBattleStationsWhat1.wav", false, true, true, 10, 10, "SpellsEAX" )
call SetSoundParamsFromLabel( gg_snd_OrcBurrowBattleStationsWhat1, "BurrowBattleStations" )
call SetSoundDuration( gg_snd_OrcBurrowBattleStationsWhat1, 3024 )
set gg_snd_ArrangedTeamInvitation = CreateSound( "Sound\\Interface\\ArrangedTeamInvitation.wav", false, false, false, 10, 10, "" )
call SetSoundParamsFromLabel( gg_snd_ArrangedTeamInvitation, "ArrangedTeamInvitation" )
call SetSoundDuration( gg_snd_ArrangedTeamInvitation, 2914 )
set gg_snd_firstblood = CreateSound( "war3mapImported\\firstblood.wav", false, false, false, 10, 10, "" )
call SetSoundDuration( gg_snd_firstblood, 1483 )
call SetSoundChannel( gg_snd_firstblood, 0 )
call SetSoundVolume( gg_snd_firstblood, 127 )
call SetSoundPitch( gg_snd_firstblood, 1.0 )
endfunction
//***************************************************************************
//*
//* Unit Creation
//*
//***************************************************************************
//===========================================================================
function CreateBuildingsForPlayer0 takes nothing returns nothing
local player p = Player(0)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'hC95', -6144.0, -5952.0, 270.000 )
set u = CreateUnit( p, 'nfoh', -6656.0, -5984.0, 270.000 )
set gg_unit_etol_0039 = CreateUnit( p, 'etol', -4800.0, -6848.0, 270.000 )
set gg_unit_e011_0040 = CreateUnit( p, 'e011', -4896.0, -6560.0, 270.000 )
set gg_unit_e011_0041 = CreateUnit( p, 'e011', -4512.0, -6880.0, 270.000 )
set gg_unit_etrp_0042 = CreateUnit( p, 'etrp', -6176.0, -3936.0, 270.000 )
set gg_unit_etrp_0043 = CreateUnit( p, 'etrp', -4448.0, -5024.0, 270.000 )
set gg_unit_etrp_0044 = CreateUnit( p, 'etrp', -3424.0, -6496.0, 270.000 )
set gg_unit_eaom_0052 = CreateUnit( p, 'eaom', -3776.0, -6720.0, 270.000 )
set gg_unit_eaoe_0053 = CreateUnit( p, 'eaoe', -3776.0, -6272.0, 270.000 )
set gg_unit_eaoe_0054 = CreateUnit( p, 'eaoe', -4864.0, -5184.0, 270.000 )
set gg_unit_eaom_0055 = CreateUnit( p, 'eaom', -4608.0, -5568.0, 270.000 )
set gg_unit_eaom_0056 = CreateUnit( p, 'eaom', -6400.0, -4288.0, 270.000 )
set gg_unit_eaoe_0057 = CreateUnit( p, 'eaoe', -5952.0, -4288.0, 270.000 )
set gg_unit_emow_0058 = CreateUnit( p, 'emow', -5856.0, -4832.0, 270.000 )
set gg_unit_emow_0059 = CreateUnit( p, 'emow', -5280.0, -4192.0, 270.000 )
set gg_unit_emow_0060 = CreateUnit( p, 'emow', -5344.0, -5280.0, 270.000 )
set gg_unit_emow_0061 = CreateUnit( p, 'emow', -5216.0, -5472.0, 270.000 )
set gg_unit_emow_0062 = CreateUnit( p, 'emow', -4704.0, -6304.0, 270.000 )
set gg_unit_emow_0063 = CreateUnit( p, 'emow', -3744.0, -5536.0, 270.000 )
set gg_unit_emow_0064 = CreateUnit( p, 'emow', -3488.0, -5856.0, 270.000 )
set gg_unit_emow_0065 = CreateUnit( p, 'emow', -4256.0, -6944.0, 270.000 )
set gg_unit_emow_0066 = CreateUnit( p, 'emow', -3360.0, -7008.0, 270.000 )
set gg_unit_emow_0067 = CreateUnit( p, 'emow', -5856.0, -3680.0, 270.000 )
set gg_unit_eaow_0068 = CreateUnit( p, 'eaow', -5312.0, -4480.0, 270.000 )
set gg_unit_edob_0069 = CreateUnit( p, 'edob', -3840.0, -5184.0, 270.000 )
set gg_unit_edos_0070 = CreateUnit( p, 'edos', -3584.0, -7104.0, 270.000 )
set gg_unit_etrp_0102 = CreateUnit( p, 'etrp', -6112.0, 1824.0, 270.000 )
set gg_unit_etrp_0103 = CreateUnit( p, 'etrp', -1312.0, -1888.0, 270.000 )
set gg_unit_etrp_0104 = CreateUnit( p, 'etrp', 4960.0, -6816.0, 270.000 )
set gg_unit_e011_0105 = CreateUnit( p, 'e011', -608.0, -6688.0, 270.000 )
set gg_unit_e011_0106 = CreateUnit( p, 'e011', -3552.0, -3360.0, 270.000 )
set gg_unit_e011_0107 = CreateUnit( p, 'e011', -6112.0, -1312.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer1 takes nothing returns nothing
local player p = Player(1)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'ncop', -6400.0, -6848.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer2 takes nothing returns nothing
local player p = Player(2)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'ncop', -6272.0, -7104.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer3 takes nothing returns nothing
local player p = Player(3)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'ncop', -6272.0, -6976.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer4 takes nothing returns nothing
local player p = Player(4)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'ncop', -6144.0, -6848.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer5 takes nothing returns nothing
local player p = Player(5)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'ncop', -6272.0, -6848.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer6 takes nothing returns nothing
local player p = Player(6)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'nC35', 6464.0, 4800.0, 270.000 )
set u = CreateUnit( p, 'ndfl', 6272.0, 5504.0, 270.000 )
set gg_unit_uzg1_0071 = CreateUnit( p, 'uzg1', 3552.0, 3296.0, 270.000 )
set gg_unit_uzg1_0072 = CreateUnit( p, 'uzg1', 3232.0, 5728.0, 270.000 )
set gg_unit_uzg1_0073 = CreateUnit( p, 'uzg1', 5984.0, 2784.0, 270.000 )
set gg_unit_usep_0074 = CreateUnit( p, 'usep', 6208.0, 3264.0, 270.000 )
set gg_unit_usep_0075 = CreateUnit( p, 'usep', 4096.0, 3392.0, 270.000 )
set gg_unit_usep_0076 = CreateUnit( p, 'usep', 3776.0, 5632.0, 270.000 )
set gg_unit_utod_0077 = CreateUnit( p, 'utod', 3456.0, 5120.0, 270.000 )
set gg_unit_utod_0078 = CreateUnit( p, 'utod', 3776.0, 3840.0, 270.000 )
set gg_unit_utod_0079 = CreateUnit( p, 'utod', 5696.0, 3264.0, 270.000 )
set gg_unit_unpl_0080 = CreateUnit( p, 'unpl', 4992.0, 4544.0, 270.000 )
set gg_unit_u00D_0081 = CreateUnit( p, 'u00D', 5152.0, 4192.0, 270.000 )
set gg_unit_u00D_0082 = CreateUnit( p, 'u00D', 4640.0, 4640.0, 270.000 )
set gg_unit_uzig_0083 = CreateUnit( p, 'uzig', 3168.0, 4000.0, 270.000 )
set gg_unit_uzig_0084 = CreateUnit( p, 'uzig', 3232.0, 4192.0, 270.000 )
set gg_unit_uzig_0085 = CreateUnit( p, 'uzig', 4192.0, 5536.0, 270.000 )
set gg_unit_uzig_0086 = CreateUnit( p, 'uzig', 4128.0, 4512.0, 270.000 )
set gg_unit_uzig_0087 = CreateUnit( p, 'uzig', 4512.0, 4000.0, 270.000 )
set gg_unit_uzig_0088 = CreateUnit( p, 'uzig', 4832.0, 3104.0, 270.000 )
set gg_unit_uzig_0089 = CreateUnit( p, 'uzig', 5408.0, 2592.0, 270.000 )
set gg_unit_uzig_0090 = CreateUnit( p, 'uzig', 5408.0, 3296.0, 270.000 )
set gg_unit_uzig_0091 = CreateUnit( p, 'uzig', 6112.0, 3872.0, 270.000 )
set gg_unit_uzig_0092 = CreateUnit( p, 'uzig', 3040.0, 5088.0, 270.000 )
set gg_unit_usap_0093 = CreateUnit( p, 'usap', 3520.0, 4608.0, 270.000 )
set gg_unit_ugrv_0094 = CreateUnit( p, 'ugrv', 5376.0, 2880.0, 270.000 )
set gg_unit_uslh_0095 = CreateUnit( p, 'uslh', 4096.0, 2624.0, 270.000 )
set gg_unit_uzg1_0096 = CreateUnit( p, 'uzg1', -4512.0, 5792.0, 270.000 )
set gg_unit_uzg1_0097 = CreateUnit( p, 'uzg1', 1376.0, 224.0, 270.000 )
set gg_unit_uzg1_0098 = CreateUnit( p, 'uzg1', 5984.0, -2016.0, 270.000 )
set gg_unit_u00D_0099 = CreateUnit( p, 'u00D', 6112.0, -160.0, 270.000 )
set gg_unit_u00D_0100 = CreateUnit( p, 'u00D', 2464.0, 1184.0, 270.000 )
set gg_unit_u00D_0101 = CreateUnit( p, 'u00D', 32.0, 5856.0, 270.000 )
set gg_unit_uzig_0118 = CreateUnit( p, 'uzig', 6304.0, 3744.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer7 takes nothing returns nothing
local player p = Player(7)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'ncop', 5888.0, 6464.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer8 takes nothing returns nothing
local player p = Player(8)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'ncop', 6016.0, 6464.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer9 takes nothing returns nothing
local player p = Player(9)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'ncop', 6144.0, 6464.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer10 takes nothing returns nothing
local player p = Player(10)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'ncop', 6016.0, 6336.0, 270.000 )
endfunction
//===========================================================================
function CreateBuildingsForPlayer11 takes nothing returns nothing
local player p = Player(11)
local unit u
local integer unitID
local trigger t
local real life
set u = CreateUnit( p, 'ncop', 6016.0, 6208.0, 270.000 )
endfunction
//===========================================================================
function CreateNeutralHostile takes nothing returns nothing
local player p = Player(PLAYER_NEUTRAL_AGGRESSIVE)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_n00L_0115 = CreateUnit( p, 'n00L', 2133.2, -454.3, 298.420 )
call SetUnitAcquireRange( gg_unit_n00L_0115, 200.0 )
call IssueImmediateOrder( gg_unit_n00L_0115, "Thornyshield" )
endfunction
//===========================================================================
function CreateNeutralPassiveBuildings takes nothing returns nothing
local player p = Player(PLAYER_NEUTRAL_PASSIVE)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_ntav_0000 = CreateUnit( p, 'ntav', -6528.0, -7104.0, 270.000 )
call SetUnitColor( gg_unit_ntav_0000, ConvertPlayerColor(0) )
set gg_unit_n008_0009 = CreateUnit( p, 'n008', -6272.0, -6592.0, 270.000 )
call SetUnitColor( gg_unit_n008_0009, ConvertPlayerColor(0) )
set gg_unit_n01D_0012 = CreateUnit( p, 'n01D', -6016.0, -7104.0, 270.000 )
call SetUnitColor( gg_unit_n01D_0012, ConvertPlayerColor(0) )
set gg_unit_n007_0018 = CreateUnit( p, 'n007', 6016.0, 6720.0, 270.000 )
call SetUnitColor( gg_unit_n007_0018, ConvertPlayerColor(0) )
set gg_unit_n005_0019 = CreateUnit( p, 'n005', 5760.0, 6208.0, 270.000 )
call SetUnitColor( gg_unit_n005_0019, ConvertPlayerColor(0) )
set gg_unit_n01B_0020 = CreateUnit( p, 'n01B', 6272.0, 6208.0, 270.000 )
call SetUnitColor( gg_unit_n01B_0020, ConvertPlayerColor(0) )
set u = CreateUnit( p, 'nC38', 6080.0, 5568.0, 270.000 )
set u = CreateUnit( p, 'HC61', 5952.0, 5568.0, 270.000 )
set u = CreateUnit( p, 'n00V', 5696.0, 4928.0, 270.000 )
set gg_unit_n00W_0026 = CreateUnit( p, 'n00W', 5568.0, 5056.0, 270.000 )
set u = CreateUnit( p, 'n00X', 5696.0, 5312.0, 270.000 )
set u = CreateUnit( p, 'n00X', -6528.0, -5376.0, 270.000 )
set u = CreateUnit( p, 'nC38', -6720.0, -5696.0, 270.000 )
set u = CreateUnit( p, 'HC61', -6720.0, -5504.0, 270.000 )
set gg_unit_n00V_0033 = CreateUnit( p, 'n00V', -6208.0, -5376.0, 270.000 )
set u = CreateUnit( p, 'n00W', -6336.0, -5248.0, 270.000 )
set gg_unit_n002_0050 = CreateUnit( p, 'n002', 5568.0, 5184.0, 270.000 )
set u = CreateUnit( p, 'uC74', 3904.0, -512.0, 270.000 )
set u = CreateUnit( p, 'uC74', -4608.0, 1152.0, 270.000 )
set gg_unit_n002_0117 = CreateUnit( p, 'n002', -6464.0, -5248.0, 270.000 )
endfunction
//===========================================================================
function CreateNeutralPassive takes nothing returns nothing
local player p = Player(PLAYER_NEUTRAL_PASSIVE)
local unit u
local integer unitID
local trigger t
local real life
set gg_unit_e00D_0004 = CreateUnit( p, 'e00D', -5986.7, 5651.2, 212.150 )
set gg_unit_e00B_0005 = CreateUnit( p, 'e00B', -755.3, -457.3, 325.600 )
set gg_unit_e00A_0006 = CreateUnit( p, 'e00A', 5715.2, -6466.1, 64.000 )
set gg_unit_e008_0007 = CreateUnit( p, 'e008', -4690.8, -6680.8, 57.520 )
set gg_unit_e001_0008 = CreateUnit( p, 'e001', 4836.0, 4372.2, 212.110 )
set u = CreateUnit( p, 'e00D', -6236.1, -5309.3, 236.312 )
set u = CreateUnit( p, 'e00D', -6393.6, -5431.2, 203.330 )
set u = CreateUnit( p, 'e00D', -6433.2, -5465.0, 204.528 )
set u = CreateUnit( p, 'e00D', -6348.4, -5389.0, 230.555 )
endfunction
//===========================================================================
function CreatePlayerBuildings takes nothing returns nothing
call CreateBuildingsForPlayer0( )
call CreateBuildingsForPlayer1( )
call CreateBuildingsForPlayer2( )
call CreateBuildingsForPlayer3( )
call CreateBuildingsForPlayer4( )
call CreateBuildingsForPlayer5( )
call CreateBuildingsForPlayer6( )
call CreateBuildingsForPlayer7( )
call CreateBuildingsForPlayer8( )
call CreateBuildingsForPlayer9( )
call CreateBuildingsForPlayer10( )
call CreateBuildingsForPlayer11( )
endfunction
//===========================================================================
function CreatePlayerUnits takes nothing returns nothing
endfunction
//===========================================================================
function CreateAllUnits takes nothing returns nothing
call CreateNeutralPassiveBuildings( )
call CreatePlayerBuildings( )
call CreateNeutralHostile( )
call CreateNeutralPassive( )
call CreatePlayerUnits( )
endfunction
//***************************************************************************
//*
//* Regions
//*
//***************************************************************************
function CreateRegions takes nothing returns nothing
local weathereffect we
set gg_rct_Crypt_S = Rect( 6080.0, 2624.0, 6400.0, 2944.0 )
set gg_rct_Crypt_SW = Rect( 3680.0, 3040.0, 4000.0, 3360.0 )
set gg_rct_Crypt_W = Rect( 3328.0, 5664.0, 3680.0, 6048.0 )
set gg_rct_Hero_Creation_Evil = Rect( 5792.0, 4928.0, 6336.0, 5472.0 )
set gg_rct_Lore_E = Rect( -3840.0, -6272.0, -3488.0, -5856.0 )
set gg_rct_Lore_N = Rect( -6048.0, -4192.0, -5728.0, -3840.0 )
set gg_rct_Lore_NE = Rect( -5024.0, -5088.0, -4640.0, -4672.0 )
set gg_rct_Temple_S = Rect( 5760.0, 3072.0, 6080.0, 3392.0 )
set gg_rct_Temple_SW = Rect( 3488.0, 3488.0, 3808.0, 3808.0 )
set gg_rct_Temple_W = Rect( 3392.0, 5216.0, 3712.0, 5568.0 )
set gg_rct_Hero_Creation_NE = Rect( -6688.0, -5920.0, -6112.0, -5344.0 )
set gg_rct_War_E = Rect( -3584.0, -6944.0, -3200.0, -6528.0 )
set gg_rct_War_N = Rect( -6688.0, -3872.0, -6304.0, -3456.0 )
set gg_rct_War_NE = Rect( -4448.0, -5440.0, -4000.0, -4928.0 )
set gg_rct_ItemSpawn2 = Rect( 2912.0, -2944.0, 3104.0, -2720.0 )
set gg_rct_herospawnud = Rect( 5472.0, 5888.0, 6624.0, 7008.0 )
set gg_rct_herospawnsent = Rect( -6848.0, -7456.0, -5696.0, -6272.0 )
set gg_rct_ItemSpawn1 = Rect( -2464.0, 1536.0, -2240.0, 1760.0 )
set gg_rct_CreepRegion1 = Rect( 3840.0, -2848.0, 4288.0, -2272.0 )
set gg_rct_Creep_region_2 = Rect( 3040.0, -5600.0, 3584.0, -5120.0 )
set gg_rct_CreepRegion3 = Rect( 1376.0, -5024.0, 1920.0, -4416.0 )
set gg_rct_CreepRegion4 = Rect( 4256.0, -5728.0, 4736.0, -5248.0 )
set gg_rct_CreepRegion5 = Rect( -576.0, 3296.0, -128.0, 3776.0 )
set gg_rct_CreepRegion6 = Rect( -1760.0, 4608.0, -1216.0, 5120.0 )
set gg_rct_CreepRegion7 = Rect( -1760.0, 2272.0, -1376.0, 2784.0 )
set gg_rct_CreepRegion8 = Rect( -3200.0, -640.0, -2656.0, -64.0 )
set gg_rct_CreepRegion9 = Rect( 576.0, 896.0, 960.0, 1312.0 )
set gg_rct_CreepRegion10 = Rect( -576.0, -3488.0, -64.0, -3008.0 )
set gg_rct_Sent_Top_Tavern = Rect( -6432.0, -6784.0, -6080.0, -6368.0 )
set gg_rct_Sent_Bottom_Tavern = Rect( -6208.0, -7296.0, -5856.0, -6912.0 )
set gg_rct_Scourge_Top_Tavern = Rect( 5792.0, 6464.0, 6272.0, 6944.0 )
set gg_rct_Scourge_Bottom_Tavern = Rect( 6144.0, 6080.0, 6464.0, 6432.0 )
set gg_rct_Scourge_New_Tavern = Rect( 5568.0, 6016.0, 5952.0, 6400.0 )
set gg_rct_Sent_New_Tavern = Rect( -6688.0, -7264.0, -6336.0, -6944.0 )
set gg_rct_Allpick_Sent = Rect( -6368.0, -7008.0, -6176.0, -6816.0 )
set gg_rct_Allpick_Scourge = Rect( 5920.0, 6272.0, 6112.0, 6464.0 )
set gg_rct_FlagSent = Rect( -4928.0, -7040.0, -4672.0, -6784.0 )
set gg_rct_FlagScourge = Rect( 4896.0, 4480.0, 5152.0, 4736.0 )
set gg_rct_FlagSentBig = Rect( -5152.0, -7264.0, -4448.0, -6560.0 )
set gg_rct_FlagScourgeBig = Rect( 4672.0, 4256.0, 5376.0, 4960.0 )
set gg_rct_CTFSentTower = Rect( -4608.0, -6720.0, -4448.0, -6560.0 )
set gg_rct_CTFScourgeTower = Rect( 4672.0, 4256.0, 4832.0, 4416.0 )
set gg_rct_CTF1 = Rect( -5056.0, -7168.0, -4928.0, -7040.0 )
set gg_rct_CTF2 = Rect( -5056.0, -6784.0, -4928.0, -6656.0 )
set gg_rct_CTF3 = Rect( -4672.0, -7168.0, -4544.0, -7040.0 )
set gg_rct_CTF4 = Rect( 4800.0, 4672.0, 4928.0, 4800.0 )
set gg_rct_CTF5 = Rect( 5120.0, 4672.0, 5248.0, 4800.0 )
set gg_rct_CTF6 = Rect( 5120.0, 4384.0, 5248.0, 4512.0 )
endfunction
//***************************************************************************
//*
//* Cameras
//*
//***************************************************************************
function CreateCameras takes nothing returns nothing
set gg_cam_Camera_001 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_ROTATION, 90.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_ANGLE_OF_ATTACK, 335.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_TARGET_DISTANCE, 1200.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_001, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Camera_001, -1583.0, -1320.4, 0.0 )
set gg_cam_Camera_002 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Camera_002, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_002, CAMERA_FIELD_ROTATION, 121.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_002, CAMERA_FIELD_ANGLE_OF_ATTACK, 335.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_002, CAMERA_FIELD_TARGET_DISTANCE, 800.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_002, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_002, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_002, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Camera_002, -404.2, -643.0, 0.0 )
set gg_cam_Camera_003 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Camera_003, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_003, CAMERA_FIELD_ROTATION, 90.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_003, CAMERA_FIELD_ANGLE_OF_ATTACK, 304.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_003, CAMERA_FIELD_TARGET_DISTANCE, 1024.5, 0.0 )
call CameraSetupSetField( gg_cam_Camera_003, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_003, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_003, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Camera_003, -6220.8, -6784.0, 0.0 )
set gg_cam_Camera_004 = CreateCameraSetup( )
call CameraSetupSetField( gg_cam_Camera_004, CAMERA_FIELD_ZOFFSET, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_004, CAMERA_FIELD_ROTATION, 90.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_004, CAMERA_FIELD_ANGLE_OF_ATTACK, 304.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_004, CAMERA_FIELD_TARGET_DISTANCE, 1024.5, 0.0 )
call CameraSetupSetField( gg_cam_Camera_004, CAMERA_FIELD_ROLL, 0.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_004, CAMERA_FIELD_FIELD_OF_VIEW, 70.0, 0.0 )
call CameraSetupSetField( gg_cam_Camera_004, CAMERA_FIELD_FARZ, 5000.0, 0.0 )
call CameraSetupSetDestPosition( gg_cam_Camera_004, 5570.6, 6444.4, 0.0 )
endfunction
//***************************************************************************
//*
//* Custom Script Code
//*
//***************************************************************************
//##Start##
//==================================================================================================
function H2I takes handle h returns integer
return h
return 0
endfunction
//==================================================================================================
function LocalVars takes nothing returns gamecache
return udg_classes
endfunction
//==================================================================================================
function SetHandleInt takes handle subject, string name, integer value returns nothing
if value==0 then
call FlushStoredInteger(udg_classes,I2S(H2I(subject)),name)
else
call StoreInteger(udg_classes, I2S(H2I(subject)), name, value)
endif
endfunction
//==================================================================================================
function SetHandleReal takes handle subject, string name, real value returns nothing
if value==0 then
call FlushStoredReal(udg_classes, I2S(H2I(subject)), name)
else
call StoreReal(udg_classes, I2S(H2I(subject)), name, value)
endif
endfunction
//==================================================================================================
function SetHandleHandle takes handle subject, string name, handle value returns nothing
call SetHandleInt( subject, name, H2I(value) )
endfunction
//==================================================================================================
function GetHandleHandle takes handle subject, string name returns handle
return GetStoredInteger(udg_classes, I2S(H2I(subject)), name)
return null
endfunction
//==================================================================================================
function GetHandleInt takes handle subject, string name returns integer
return GetStoredInteger(udg_classes, I2S(H2I(subject)), name)
endfunction
//==================================================================================================
function GetHandleReal takes handle subject, string name returns real
return GetStoredReal(udg_classes, I2S(H2I(subject)), name)
endfunction
//==================================================================================================
function FlushHandleLocals takes handle subject returns nothing
call FlushStoredMission(udg_classes, I2S(H2I(subject)) )
endfunction
//##End##
function InstanceSetMemberReal takes string instancename, string membername, real value returns nothing
call StoreReal(udg_classes, instancename, membername, value)
endfunction
function InstanceGetMemberReal takes string instancename,string membername returns real
return GetStoredReal(udg_classes,instancename,membername)
endfunction
function DamageEnemyArea takes unit h, real x, real y, real r, real d returns nothing
local group g=CreateGroup()
local unit m=null
call GroupEnumUnitsInRange(g, x, y, r, null )
loop
set m=FirstOfGroup(g)
exitwhen m==null
if IsUnitEnemy(m,GetOwningPlayer(h)) and IsUnitDeadBJ(m)==false and IsUnitType(m, UNIT_TYPE_STRUCTURE) == false then
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, R2S(d))
call UnitDamageTargetBJ( h, m, d, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_DEMOLITION )
call GroupRemoveUnit(g,m)
else
call GroupRemoveUnit(g,m)
endif
endloop
call GroupClear(g)
call DestroyGroup(g)
set g=null
set h=null
set m=null
endfunction
function GetC takes timer t, string s returns unit
return GetHandleHandle(t,s)
endfunction
function ImpDist takes real x1,real y1, real x2, real y2 returns real
return SquareRoot( ((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2)) )
endfunction
function Angle2Points takes real x1, real y1, real x2, real y2 returns real
return bj_RADTODEG *Atan2((y2 - y1),(x2 - x1))
endfunction
function GetL takes timer t, string s returns location
return GetHandleHandle(t,s)
endfunction
function Int2Unit takes integer i returns unit
return i
return null
endfunction
function InstanceSetMemberUnit takes string instancename, string membername, unit value returns nothing
call StoreInteger(udg_classes, instancename, membername, H2I(value))
endfunction
function InstanceGetMemberUnit takes string instancename, string membername returns unit
return Int2Unit(GetStoredInteger(udg_classes, instancename, membername))
endfunction
function DamageEnemyArea1 takes unit h, real x, real y, real r, real d, integer ID returns nothing
local group g=CreateGroup()
local unit m=null
local location l=null
call GroupEnumUnitsInRange(g, x, y, r, null )
loop
set m=FirstOfGroup(g)
exitwhen m==null
if IsUnitEnemy(m,GetOwningPlayer(h)) and IsUnitDeadBJ(m)==false then
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, R2S(d))
call UnitDamageTargetBJ( h, m, d, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_DEMOLITION )
set l=GetUnitLoc(m)
call DestroyEffect(AddSpellEffectByIdLoc(ID, EFFECT_TYPE_CASTER, l) )
call DestroyEffect(AddSpellEffectByIdLoc(ID, EFFECT_TYPE_CASTER, l) )
call DestroyEffect(AddSpellEffectByIdLoc(ID, EFFECT_TYPE_CASTER, l) )
call RemoveLocation(l)
call GroupRemoveUnit(g,m)
else
call GroupRemoveUnit(g,m)
endif
endloop
call GroupClear(g)
call DestroyGroup(g)
set g=null
set l=null
set h=null
set m=null
endfunction
//***************************************************************************
//*
//* Triggers
//*
//***************************************************************************
//===========================================================================
// Trigger: Revival trigger
//===========================================================================
function Trig_Revival_trigger_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Revival_trigger_Func002C takes nothing returns boolean
if ( not ( udg_DisarmRestore[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] != GetItemTypeId(null) ) ) then
return false
endif
return true
endfunction
function Trig_Revival_trigger_Func003C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0EV', GetTriggerUnit()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Revival_trigger_Func004C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0E9', GetTriggerUnit()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Revival_trigger_Func005C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('SCva', GetTriggerUnit()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Revival_trigger_Func006C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0AZ', GetTriggerUnit()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Revival_trigger_Func007C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A09J', GetTriggerUnit()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Revival_trigger_Actions takes nothing returns nothing
call SetUnitInvulnerable( GetTriggerUnit(), false )
if ( Trig_Revival_trigger_Func002C() ) then
call UnitAddItemByIdSwapped( udg_DisarmRestore[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], GetTriggerUnit() )
call SetItemCharges( GetLastCreatedItem(), udg_DisarmRestoreNum[GetConvertedPlayerId(GetTriggerPlayer())] )
set udg_DisarmRestore[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemTypeId(null)
set udg_DisarmRestoreNum[GetConvertedPlayerId(GetTriggerPlayer())] = 0
else
endif
if ( Trig_Revival_trigger_Func003C() ) then
call UnitRemoveAbilityBJ( 'A0EV', GetTriggerUnit() )
else
endif
if ( Trig_Revival_trigger_Func004C() ) then
call UnitRemoveAbilityBJ( 'A0E9', GetTriggerUnit() )
else
endif
if ( Trig_Revival_trigger_Func005C() ) then
call UnitRemoveAbilityBJ( 'SCva', GetTriggerUnit() )
else
endif
if ( Trig_Revival_trigger_Func006C() ) then
call UnitRemoveAbilityBJ( 'A0AZ', GetTriggerUnit() )
else
endif
if ( Trig_Revival_trigger_Func007C() ) then
call UnitRemoveAbilityBJ( 'A09J', GetTriggerUnit() )
else
endif
endfunction
//===========================================================================
function InitTrig_Revival_trigger takes nothing returns nothing
set gg_trg_Revival_trigger = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Revival_trigger, EVENT_PLAYER_HERO_REVIVE_FINISH )
call TriggerAddCondition( gg_trg_Revival_trigger, Condition( function Trig_Revival_trigger_Conditions ) )
call TriggerAddAction( gg_trg_Revival_trigger, function Trig_Revival_trigger_Actions )
endfunction
//===========================================================================
// Trigger: entry
//===========================================================================
function Trig_entry_Func004C takes nothing returns boolean
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_SUMMONED) == false ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetEnteringUnit()) == false ) ) then
return false
endif
return true
endfunction
function Trig_entry_Conditions takes nothing returns boolean
if ( not Trig_entry_Func004C() ) then
return false
endif
return true
endfunction
function Trig_entry_Func001C takes nothing returns boolean
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_entry_Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Hamg' ) ) then
return false
endif
return true
endfunction
function Trig_entry_Func003C takes nothing returns boolean
if ( not ( IsUnitAlly(GetEnteringUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_entry_Actions takes nothing returns nothing
if ( Trig_entry_Func001C() ) then
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_Hero_Creation_NE), 1.00 )
else
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_Hero_Creation_Evil), 1.00 )
endif
if ( Trig_entry_Func002C() ) then
call IssuePointOrderLocBJ( GetTriggerUnit(), "move", PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 10.00, 30.00) )
else
call DoNothing( )
endif
if ( Trig_entry_Func003C() ) then
call SetUnitPositionLoc( GetEnteringUnit(), GetRandomLocInRect(gg_rct_Hero_Creation_NE) )
else
call SetUnitPositionLoc( GetEnteringUnit(), GetRandomLocInRect(gg_rct_Hero_Creation_Evil) )
endif
endfunction
//===========================================================================
function InitTrig_entry takes nothing returns nothing
set gg_trg_entry = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_entry, gg_rct_herospawnsent )
call TriggerRegisterEnterRectSimple( gg_trg_entry, gg_rct_herospawnud )
call TriggerAddCondition( gg_trg_entry, Condition( function Trig_entry_Conditions ) )
call TriggerAddAction( gg_trg_entry, function Trig_entry_Actions )
endfunction
//===========================================================================
// Trigger: entryDE
//===========================================================================
function Trig_entryDE_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_SUMMONED) == false ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetEnteringUnit()) == false ) ) then
return false
endif
return true
endfunction
function Trig_entryDE_Func001Func001C takes nothing returns boolean
if ( not ( udg_DMHeroExp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] <= 14 ) ) then
return false
endif
return true
endfunction
function Trig_entryDE_Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_entryDE_Actions takes nothing returns nothing
if ( Trig_entryDE_Func001C() ) then
if ( Trig_entryDE_Func001Func001C() ) then
call SetHeroLevelBJ( GetTriggerUnit(), ( udg_DMHeroExp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] - 1 ), true )
else
call SetHeroLevelBJ( GetTriggerUnit(), ( udg_DMHeroExp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] - 2 ), true )
endif
else
call DoNothing( )
endif
call UnitAddItemByIdSwapped( udg_DMItemOne[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], GetTriggerUnit() )
call SetItemCharges( GetLastCreatedItem(), udg_DMChargeOne[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
call UnitAddItemByIdSwapped( udg_DMItemTwo[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], GetTriggerUnit() )
call SetItemCharges( GetLastCreatedItem(), udg_DMChargeTwo[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
call UnitAddItemByIdSwapped( udg_DmItemThree[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], GetTriggerUnit() )
call SetItemCharges( GetLastCreatedItem(), udg_DMChargeThree[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
call UnitAddItemByIdSwapped( udg_DMItemFour[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], GetTriggerUnit() )
call SetItemCharges( GetLastCreatedItem(), udg_DMChargeFour[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
call UnitAddItemByIdSwapped( udg_DMItemFive[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], GetTriggerUnit() )
call SetItemCharges( GetLastCreatedItem(), udg_DMChargeFive[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
call UnitAddItemByIdSwapped( udg_DMItemSix[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], GetTriggerUnit() )
call SetItemCharges( GetLastCreatedItem(), udg_DMChargeSix[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
endfunction
//===========================================================================
function InitTrig_entryDE takes nothing returns nothing
set gg_trg_entryDE = CreateTrigger( )
call DisableTrigger( gg_trg_entryDE )
call TriggerRegisterEnterRectSimple( gg_trg_entryDE, GetEntireMapRect() )
call TriggerAddCondition( gg_trg_entryDE, Condition( function Trig_entryDE_Conditions ) )
call TriggerAddAction( gg_trg_entryDE, function Trig_entryDE_Actions )
endfunction
//===========================================================================
// Trigger: RS1
//===========================================================================
function Trig_RS1_Actions takes nothing returns nothing
call TriggerSleepAction( 0.01 )
call SetPlayerTechMaxAllowedSwap( 'Nbrn', 0, GetOwningPlayer(GetTriggerUnit()) )
call SetPlayerTechMaxAllowedSwap( 'Npbm', 0, GetOwningPlayer(GetTriggerUnit()) )
call SetPlayerTechMaxAllowedSwap( 'H000', 0, GetOwningPlayer(GetTriggerUnit()) )
call SetPlayerTechMaxAllowedSwap( 'Orkn', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Emoo', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Emns', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'O00P', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H004', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'HC92', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hjai', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hvwd', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H001', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hmbr', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Naka', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'E005', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Usyl', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H00K', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Harf', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'HC49', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hlgr', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Edem', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Nbbc', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'EC77', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'E002', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'EC45', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC01', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Eevi', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H00V', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC91', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC42', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U000', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'NC00', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ulic', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'EC57', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC76', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC18', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC11', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC60', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'E004', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00A', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U007', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Udre', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ewar', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U008', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ekee', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N016', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N01O', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N01A', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H00H', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U006', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Obla', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hamg', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ofar', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Oshd', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Huth', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ntin', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hmkg', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hblm', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00K', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00E', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00F', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Uktl', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ubal', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hvsh', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Opgh', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Uanb', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Nfir', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hdgo', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ogrh', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hpb2', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hant', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Otch', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ucrl', 0, GetTriggerPlayer() )
set udg_ReHT[( GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())) + 6 )] = GetUnitTypeId(GetTriggerUnit())
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "A Scourge player will control " + ( GetUnitName(GetTriggerUnit()) + "." ) ) )
call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call RemoveUnit( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_RS1 takes nothing returns nothing
set gg_trg_RS1 = CreateTrigger( )
call DisableTrigger( gg_trg_RS1 )
call TriggerRegisterEnterRectSimple( gg_trg_RS1, gg_rct_herospawnsent )
call TriggerAddAction( gg_trg_RS1, function Trig_RS1_Actions )
endfunction
//===========================================================================
// Trigger: RS2
//===========================================================================
function Trig_RS2_Actions takes nothing returns nothing
call TriggerSleepAction( 0.01 )
call SetPlayerTechMaxAllowedSwap( 'Nbrn', 0, GetOwningPlayer(GetTriggerUnit()) )
call SetPlayerTechMaxAllowedSwap( 'Npbm', 0, GetOwningPlayer(GetTriggerUnit()) )
call SetPlayerTechMaxAllowedSwap( 'H000', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Orkn', 0, GetOwningPlayer(GetTriggerUnit()) )
call SetPlayerTechMaxAllowedSwap( 'Emoo', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Emns', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'O00P', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H004', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'HC92', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hjai', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hvwd', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H001', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hmbr', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Naka', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'E005', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Usyl', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H00K', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Harf', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'HC49', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hlgr', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Edem', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Nbbc', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'EC77', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'E002', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'EC45', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC01', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Eevi', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H00V', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC91', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC42', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U000', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'NC00', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ulic', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'EC57', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC76', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC18', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC11', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC60', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'E004', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00A', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U007', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Udre', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ewar', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U008', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ekee', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N016', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N01O', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N01A', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H00H', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U006', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Obla', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hamg', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ofar', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Oshd', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Huth', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ntin', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hmkg', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hblm', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00F', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00K', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00E', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Uktl', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ubal', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hvsh', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Opgh', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Uanb', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Nfir', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hdgo', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ogrh', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hpb2', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hant', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Otch', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ucrl', 0, GetTriggerPlayer() )
set udg_ReHT[( GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())) - 6 )] = GetUnitTypeId(GetTriggerUnit())
call RemoveUnit( GetTriggerUnit() )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "A Sentinel player will control " + ( GetUnitName(GetTriggerUnit()) + "." ) ) )
call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
endfunction
//===========================================================================
function InitTrig_RS2 takes nothing returns nothing
set gg_trg_RS2 = CreateTrigger( )
call DisableTrigger( gg_trg_RS2 )
call TriggerRegisterEnterRectSimple( gg_trg_RS2, gg_rct_herospawnud )
call TriggerAddAction( gg_trg_RS2, function Trig_RS2_Actions )
endfunction
//===========================================================================
// Trigger: Money
//===========================================================================
function Trig_Money_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 8, Player(1), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 8, Player(2), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 8, Player(3), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 8, Player(4), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 8, Player(5), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 8, Player(7), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 8, Player(8), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 8, Player(9), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 8, Player(10), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 8, Player(11), PLAYER_STATE_RESOURCE_GOLD )
endfunction
//===========================================================================
function InitTrig_Money takes nothing returns nothing
set gg_trg_Money = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Money, 7.00 )
call TriggerAddAction( gg_trg_Money, function Trig_Money_Actions )
endfunction
//===========================================================================
// Trigger: SM Money
//===========================================================================
function Trig_SM_Money_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 10, Player(1), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, Player(2), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, Player(3), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, Player(4), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, Player(5), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, Player(7), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, Player(8), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, Player(9), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, Player(10), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, Player(11), PLAYER_STATE_RESOURCE_GOLD )
endfunction
//===========================================================================
function InitTrig_SM_Money takes nothing returns nothing
set gg_trg_SM_Money = CreateTrigger( )
call DisableTrigger( gg_trg_SM_Money )
call TriggerRegisterTimerEventPeriodic( gg_trg_SM_Money, 7.00 )
call TriggerAddAction( gg_trg_SM_Money, function Trig_SM_Money_Actions )
endfunction
//===========================================================================
// Trigger: Deathtrigger
//===========================================================================
function HeroKillTally takes unit DeadHero, unit KillHero returns nothing
local player KillPlayer = GetOwningPlayer(KillHero)
local player DeadPlayer = GetOwningPlayer(DeadHero)
set udg_CHorT = 0
set udg_CHor = 0
set bj_wantDestroyGroup = true
if ( not ( DeadPlayer == Player(1) ) ) then
if ( not ( DeadPlayer == Player(2) ) ) then
if ( not ( DeadPlayer == Player(3) ) ) then
if ( not ( DeadPlayer == Player(4) ) ) then
if ( not ( DeadPlayer == Player(5) ) ) then
set udg_LBDeaths[7] = ( udg_LBDeaths[7] + 1 )
set udg_LBKills[1] = ( udg_LBKills[1] + 1 )
set udg_TeamOwnage[1] = ( udg_TeamOwnage[1] + 1 )
set udg_TeamOwnage[2] = 0
endif
endif
endif
endif
endif
if ( not ( DeadPlayer == Player(7) ) ) then
if ( not ( DeadPlayer == Player(8) ) ) then
if ( not ( DeadPlayer == Player(9) ) ) then
if ( not ( DeadPlayer == Player(10) ) ) then
if ( not ( DeadPlayer == Player(11) ) ) then
set udg_LBDeaths[1] = ( udg_LBDeaths[1] + 1 )
set udg_LBKills[7] = ( udg_LBKills[7] + 1 )
set udg_TeamOwnage[2] = ( udg_TeamOwnage[2] + 1 )
set udg_TeamOwnage[1] = 0
endif
endif
endif
endif
endif
set udg_LBDeaths[GetConvertedPlayerId(DeadPlayer)] = ( udg_LBDeaths[GetConvertedPlayerId(DeadPlayer)] + 1 )
set udg_LBKills[GetConvertedPlayerId(KillPlayer)] = ( udg_LBKills[GetConvertedPlayerId(KillPlayer)] + 1 )
call ConditionalTriggerExecute( gg_trg_update_leaderboard_kills )
call StartTimerBJ( udg_KillTimer[GetConvertedPlayerId(KillPlayer)], false, 11.50 )
if ( udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] == 3 ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(DeadPlayer)] + GetPlayerName(DeadPlayer) ) + ( "|r's |c0000ff40killing spree|r has been ended by " + ( ( udg_Colors[GetConvertedPlayerId(KillPlayer)] + GetPlayerName(KillPlayer) ) + "! (+50 gold)" ) ) ) )
call AdjustPlayerStateBJ( 50, KillPlayer, PLAYER_STATE_RESOURCE_GOLD )
endif
if ( udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] == 4 ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(DeadPlayer)] + GetPlayerName(DeadPlayer) ) + ( "|r's |c00400080dominating|r streak has been ended by " + ( ( udg_Colors[GetConvertedPlayerId(KillPlayer)] + GetPlayerName(KillPlayer) ) + "! (+100 gold)" ) ) ) )
call AdjustPlayerStateBJ( 100, KillPlayer, PLAYER_STATE_RESOURCE_GOLD )
endif
if ( udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] == 5 ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(DeadPlayer)] + GetPlayerName(DeadPlayer) ) + ( "|r's |c00ff0080mega kill|r has been ended by " + ( ( udg_Colors[GetConvertedPlayerId(KillPlayer)] + GetPlayerName(KillPlayer) ) + "! (+150 gold)" ) ) ) )
call AdjustPlayerStateBJ( 150, KillPlayer, PLAYER_STATE_RESOURCE_GOLD )
endif
if ( udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] == 6 ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(DeadPlayer)] + GetPlayerName(DeadPlayer) ) + ( "|r's |c00ff8000unstoppable|r streak has been ended by " + ( ( udg_Colors[GetConvertedPlayerId(KillPlayer)] + GetPlayerName(KillPlayer) ) + "! (+200 gold)" ) ) ) )
call AdjustPlayerStateBJ( 200, KillPlayer, PLAYER_STATE_RESOURCE_GOLD )
endif
if ( udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] == 7 ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(DeadPlayer)] + GetPlayerName(DeadPlayer) ) + ( "|r's |c00ff8000unstoppable|r streak has been ended by " + ( ( udg_Colors[GetConvertedPlayerId(KillPlayer)] + GetPlayerName(KillPlayer) ) + "! (+200 gold)" ) ) ) )
call AdjustPlayerStateBJ( 250, KillPlayer, PLAYER_STATE_RESOURCE_GOLD )
endif
if ( udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] == 8 ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(DeadPlayer)] + GetPlayerName(DeadPlayer) ) + ( "|r's |c00808000wicked sick|r streak has been ended by " + ( ( udg_Colors[GetConvertedPlayerId(KillPlayer)] + GetPlayerName(KillPlayer) ) + "! (+250 gold)" ) ) ) )
call AdjustPlayerStateBJ( 300, KillPlayer, PLAYER_STATE_RESOURCE_GOLD )
endif
if ( udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] == 9 ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(DeadPlayer)] + GetPlayerName(DeadPlayer) ) + ( "|r's |c00ff0000is GODLIKE|r streak has been ended by " + ( ( udg_Colors[GetConvertedPlayerId(KillPlayer)] + GetPlayerName(KillPlayer) ) + "! (+350 gold)" ) ) ) )
call AdjustPlayerStateBJ( 350, KillPlayer, PLAYER_STATE_RESOURCE_GOLD )
endif
if ( udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] > 9 ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(DeadPlayer)] + GetPlayerName(DeadPlayer) ) + ( "|r's |c00ff8000beyond GODLIKE streak|r has been ended by " + ( ( udg_Colors[GetConvertedPlayerId(KillPlayer)] + GetPlayerName(KillPlayer) ) + "! (+400 gold)" ) ) ) )
call AdjustPlayerStateBJ( ( udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] * 50 ), KillPlayer, PLAYER_STATE_RESOURCE_GOLD )
endif
if ( KillPlayer == Player(0) ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "This money is distributed amongst the Sentinel team." ) )
call AdjustPlayerStateBJ( ( udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] * 10 ), Player(1), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( ( udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] * 10 ), Player(2), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( ( udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] * 10 ), Player(3), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( ( udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] * 10 ), Player(4), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( ( udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] * 10 ), Player(5), PLAYER_STATE_RESOURCE_GOLD )
endif
if ( KillPlayer == Player(6) ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "This money is distributed amongst the Scourge team." ) )
call AdjustPlayerStateBJ( ( udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] * 10 ), Player(7), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( ( udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] * 10 ), Player(8), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( ( udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] * 10 ), Player(9), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( ( udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] * 10 ), Player(10), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( ( udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] * 10 ), Player(11), PLAYER_STATE_RESOURCE_GOLD )
endif
if ( not ( KillPlayer == Player(0) ) ) then
if ( not ( KillPlayer == Player(6) ) ) then
set udg_Killsinarow[GetConvertedPlayerId(KillPlayer)] = ( udg_Killsinarow[GetConvertedPlayerId(KillPlayer)] + 1 )
set udg_Killsinarow[GetConvertedPlayerId(DeadPlayer)] = 0
if ( udg_Killsinarow[GetConvertedPlayerId(KillPlayer)] == 3 ) then
call PlaySoundBJ( gg_snd_Killing_Spree )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(KillPlayer)] + GetPlayerName(KillPlayer) ) + "|r is on a |c0000ff40killing spree|r!" ) )
endif
if ( udg_Killsinarow[GetConvertedPlayerId(KillPlayer)] == 4 ) then
call PlaySoundBJ( gg_snd_Dominating )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(KillPlayer)] + GetPlayerName(KillPlayer) ) + "|r is |c00400080dominating!|r" ) )
endif
if ( udg_Killsinarow[GetConvertedPlayerId(KillPlayer)] == 5 ) then
call PlaySoundBJ( gg_snd_MegaKill )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(KillPlayer)] + GetPlayerName(KillPlayer) ) + "|r has a |c00ff0080mega kill|r!!" ) )
endif
if ( udg_Killsinarow[GetConvertedPlayerId(KillPlayer)] == 6 ) then
call PlaySoundBJ( gg_snd_Unstoppable )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(KillPlayer)] + GetPlayerName(KillPlayer) ) + "|r is |c00ff8000unstoppable|r!!" ) )
endif
if ( udg_Killsinarow[GetConvertedPlayerId(KillPlayer)] == 7 ) then
call PlaySoundBJ( gg_snd_WhickedSick )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(KillPlayer)] + GetPlayerName(KillPlayer) ) + "|r is |c00808000Whicked Sick|r!!" ) )
endif
if ( udg_Killsinarow[GetConvertedPlayerId(KillPlayer)] == 8 ) then
call PlaySoundBJ( gg_snd_monster_kill )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(KillPlayer)] + GetPlayerName(KillPlayer) ) + "|r has a |c00ff80ffmonster kill|r!" ) )
endif
if ( udg_Killsinarow[GetConvertedPlayerId(KillPlayer)] == 9 ) then
call PlaySoundBJ( gg_snd_GodLike )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(KillPlayer)] + GetPlayerName(KillPlayer) ) + "|r |c00ff0000is GODLIKE!!!|r" ) )
endif
if ( udg_Killsinarow[GetConvertedPlayerId(KillPlayer)] > 9 ) then
call PlaySoundBJ( gg_snd_HolyShit )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(KillPlayer)] + GetPlayerName(KillPlayer) ) + "|r is |c00ff8000beyond GODLIKE|r!! Someone KILL HIM!" ) )
endif
endif
endif
if ( udg_TeamOwnage[1] > 4 ) then
call PolledWait( 1.50 )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "|c00ff0000The Sentinel|r are |c00ff0000OWNING!!!|r" )
call PlaySoundBJ( gg_snd_Ownage )
endif
if ( udg_TeamOwnage[2] > 4 ) then
call PolledWait( 1.50 )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "|c00008000The Scourge|r are |c00008000OWNING!!!|r" )
call PlaySoundBJ( gg_snd_Ownage )
endif
if ( not ( KillPlayer == Player(0) ) ) then
if ( not ( KillPlayer == Player(6) ) ) then
call PolledWait( 1.50 )
set udg_KillInt[GetConvertedPlayerId(KillPlayer)] = ( udg_KillInt[GetConvertedPlayerId(KillPlayer)] + 1 )
if ( udg_KillInt[GetConvertedPlayerId(KillPlayer)] == 2 ) then
call PlaySoundBJ( gg_snd_Double_Kill )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(KillPlayer)] + GetPlayerName(KillPlayer) ) + "|r just got a |c000000ffdouble kill|r!" ) )
endif
if ( udg_KillInt[GetConvertedPlayerId(KillPlayer)] > 2 ) then
call PlaySoundBJ( gg_snd_triple_kill )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(KillPlayer)] + GetPlayerName(KillPlayer) ) + "|r just got a |c0000ff40triple Kill|r!!!" ) )
endif
endif
endif
endfunction
function Trig_Deathtrigger_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Invulnerability takes unit Unyt returns nothing
call AddSpecialEffectTargetUnitBJ( "origin", Unyt, "Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl" )
call TriggerExecute( gg_trg_DestroyFX )
call TriggerSleepAction( 4.00 )
call ReviveHeroLoc( Unyt, GetUnitLoc(Unyt), true )
call SetUnitInvulnerable( Unyt, true )
call TriggerSleepAction( 3.00 )
call SetUnitInvulnerable( Unyt, false )
endfunction
function Trig_Deathtrigger_Actions takes nothing returns nothing
if ( IsUnitEnemy(GetDyingUnit(), GetOwningPlayer(GetKillingUnitBJ())) == true ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))] + ( GetPlayerName(GetOwningPlayer(GetKillingUnitBJ())) + ( "|r just pawned " + ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))] + ( GetPlayerName(GetOwningPlayer(GetDyingUnit())) + ( "|r's head for an extra " + ( I2S(( 100 + ( GetHeroLevel(GetDyingUnit()) * 5 ) )) + " gold!" ) ) ) ) ) ) ) )
call AdjustPlayerStateBJ( ( 100 + ( GetHeroLevel(GetDyingUnit()) * 5 ) ), GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_GOLD )
endif
if ( udg_DMBool == true ) then
set udg_DMItemOne[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), 1))
set udg_DMItemTwo[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), 2))
set udg_DmItemThree[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), 3))
set udg_DMItemFour[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), 4))
set udg_DMItemFive[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), 5))
set udg_DMItemSix[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), 6))
set udg_DMChargeOne[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(), 1))
set udg_DMChargeTwo[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(), 2))
set udg_DMChargeThree[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(), 3))
set udg_DMChargeFour[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(), 4))
set udg_DMChargeFive[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(), 5))
set udg_DMChargeSix[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(), 6))
endif
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(7) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(8) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(9) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(10) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(11) ) ) then
if ( udg_TeamReincarnation[1] > 0 ) then
set udg_TeamReincarnation[1] = ( udg_TeamReincarnation[1] - 1 )
call Invulnerability(GetTriggerUnit())
else
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "|cffff0000 Level " + ( I2S(GetHeroLevel(GetDyingUnit())) + ( " Sentinel Death.|r Revival in " + ( I2S(( GetHeroLevel(GetDyingUnit()) * 4 )) + " seconds." ) ) ) ) )
call HeroKillTally( GetDyingUnit(), GetKillingUnitBJ() )
if ( udg_ItemDrop == true ) then
call UnitRemoveItemFromSlotSwapped( GetRandomInt(1, 6), GetDyingUnit() )
else
call AdjustPlayerStateBJ( ( GetHeroLevel(GetDyingUnit()) * -30 ), GetOwningPlayer(GetDyingUnit()), PLAYER_STATE_RESOURCE_GOLD )
endif
call StartTimerBJ( udg_PTimer[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))], false, ( I2R(GetHeroLevel(GetDyingUnit())) * 4.00 ) )
if (udg_DMBool == false) then
call PolledWait( ( I2R(GetHeroLevel(GetDyingUnit())) * 4.00 ) )
if ( IsUnitDeadBJ(GetTriggerUnit()) == true ) then
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetDyingUnit()), GetRectCenter(gg_rct_Hero_Creation_NE), 1.00 )
endif
call ReviveHeroLoc( GetTriggerUnit(), GetRectCenter(gg_rct_Hero_Creation_NE), true )
else
set udg_HeroesDead[1] = ( udg_HeroesDead[1] + 1 )
set udg_DMHeroExp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetHeroLevel(GetTriggerUnit())
set udg_DMHeroMoney[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( 125 + ( 100 * udg_DMHeroExp[1] ) )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, 5 )
call RemoveUnit( GetDyingUnit() )
if ( udg_HeroesDead[1] == 30 ) then
call TriggerExecute( gg_trg_Scourge_Win )
endif
endif
endif
endif
endif
endif
endif
endif
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(1) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(2) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(3) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(4) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(5) ) ) then
if ( udg_TeamReincarnation[2] > 0 ) then
set udg_TeamReincarnation[2] = ( udg_TeamReincarnation[2] - 1 )
call Invulnerability(GetTriggerUnit())
else
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "|cff00ff00 Level " + ( I2S(GetHeroLevel(GetDyingUnit())) + ( " Scourge Death.|r Revival in " + ( I2S(( GetHeroLevel(GetDyingUnit()) * 4 )) + " seconds." ) ) ) ) )
call HeroKillTally( GetDyingUnit(), GetKillingUnitBJ() )
if ( udg_ItemDrop == true ) then
call UnitRemoveItemFromSlotSwapped( GetRandomInt(1, 6), GetDyingUnit() )
else
call AdjustPlayerStateBJ( ( GetHeroLevel(GetDyingUnit()) * -30 ), GetOwningPlayer(GetDyingUnit()), PLAYER_STATE_RESOURCE_GOLD )
endif
call StartTimerBJ( udg_PTimer[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))], false, ( I2R(GetHeroLevel(GetDyingUnit())) * 4.00 ) )
if (udg_DMBool == false) then
call PolledWait( ( I2R(GetHeroLevel(GetDyingUnit())) * 4.00 ) )
if ( IsUnitDeadBJ(GetTriggerUnit()) == true ) then
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetDyingUnit()), GetRectCenter(gg_rct_Hero_Creation_Evil), 1.00 )
endif
call ReviveHeroLoc( GetTriggerUnit(), GetRectCenter(gg_rct_Hero_Creation_Evil), true )
else
set udg_HeroesDead[2] = ( udg_HeroesDead[2] + 1 )
set udg_DMHeroExp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetHeroLevel(GetTriggerUnit())
set udg_DMHeroMoney[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( 125 + ( 100 * udg_DMHeroExp[1] ) )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, 5 )
call RemoveUnit( GetDyingUnit() )
if ( udg_HeroesDead[2] == 30 ) then
call TriggerExecute( gg_trg_Sent_Win )
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Deathtrigger takes nothing returns nothing
set gg_trg_Deathtrigger = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Deathtrigger, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Deathtrigger, Condition( function Trig_Deathtrigger_Conditions ) )
call TriggerAddAction( gg_trg_Deathtrigger, function Trig_Deathtrigger_Actions )
endfunction
//===========================================================================
// Trigger: SentD DE2
//===========================================================================
function Trig_SentD_DE2_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE2_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE2_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE2_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE2_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE2_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE2_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE2_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE2_Actions takes nothing returns nothing
if ( Trig_SentD_DE2_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_SentD_DE2_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(1), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(1), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE2_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_SentD_DE2_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(1), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(1), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE2_Func003C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 36
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE2_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(1) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE2_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE2_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(1) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_SentD_DE2 takes nothing returns nothing
set gg_trg_SentD_DE2 = CreateTrigger( )
call DisableTrigger( gg_trg_SentD_DE2 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_SentD_DE2, udg_PTimer[2] )
call TriggerAddAction( gg_trg_SentD_DE2, function Trig_SentD_DE2_Actions )
endfunction
//===========================================================================
// Trigger: SentD DE3
//===========================================================================
function Trig_SentD_DE3_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE3_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE3_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE3_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE3_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE3_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE3_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE3_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE3_Actions takes nothing returns nothing
if ( Trig_SentD_DE3_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_SentD_DE3_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(2), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(2), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(2), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE3_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_SentD_DE3_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(2), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(2), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(2), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE3_Func003C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 36
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE3_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(2) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE3_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE3_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(2) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_SentD_DE3 takes nothing returns nothing
set gg_trg_SentD_DE3 = CreateTrigger( )
call DisableTrigger( gg_trg_SentD_DE3 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_SentD_DE3, udg_PTimer[3] )
call TriggerAddAction( gg_trg_SentD_DE3, function Trig_SentD_DE3_Actions )
endfunction
//===========================================================================
// Trigger: SentD DE4
//===========================================================================
function Trig_SentD_DE4_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE4_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE4_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE4_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE4_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE4_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE4_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE4_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE4_Actions takes nothing returns nothing
if ( Trig_SentD_DE4_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_SentD_DE4_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(3), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(3), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(3), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE4_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_SentD_DE4_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(3), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(3), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(3), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE4_Func003C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 36
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE4_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(3) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE4_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE4_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(3) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_SentD_DE4 takes nothing returns nothing
set gg_trg_SentD_DE4 = CreateTrigger( )
call DisableTrigger( gg_trg_SentD_DE4 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_SentD_DE4, udg_PTimer[4] )
call TriggerAddAction( gg_trg_SentD_DE4, function Trig_SentD_DE4_Actions )
endfunction
//===========================================================================
// Trigger: SentD DE5
//===========================================================================
function Trig_SentD_DE5_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE5_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE5_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE5_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE5_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE5_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE5_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE5_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE5_Actions takes nothing returns nothing
if ( Trig_SentD_DE5_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_SentD_DE5_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(4), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(4), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(4), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE5_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_SentD_DE5_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(4), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(4), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(4), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE5_Func003C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 36
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE5_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(4) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE5_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE5_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(4) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_SentD_DE5 takes nothing returns nothing
set gg_trg_SentD_DE5 = CreateTrigger( )
call DisableTrigger( gg_trg_SentD_DE5 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_SentD_DE5, udg_PTimer[5] )
call TriggerAddAction( gg_trg_SentD_DE5, function Trig_SentD_DE5_Actions )
endfunction
//===========================================================================
// Trigger: SentD DE6
//===========================================================================
function Trig_SentD_DE6_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE6_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE6_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE6_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE6_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE6_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE6_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE6_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE6_Actions takes nothing returns nothing
if ( Trig_SentD_DE6_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_SentD_DE6_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(5), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(5), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(5), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE6_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_SentD_DE6_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(5), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(5), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(5), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE6_Func003C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 36
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE6_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(5) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE6_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE6_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(5) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_SentD_DE6 takes nothing returns nothing
set gg_trg_SentD_DE6 = CreateTrigger( )
call DisableTrigger( gg_trg_SentD_DE6 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_SentD_DE6, udg_PTimer[6] )
call TriggerAddAction( gg_trg_SentD_DE6, function Trig_SentD_DE6_Actions )
endfunction
//===========================================================================
// Trigger: ScouD DE8
//===========================================================================
function Trig_ScouD_DE8_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE8_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE8_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE8_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE8_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE8_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE8_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE8_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE8_Actions takes nothing returns nothing
if ( Trig_ScouD_DE8_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_ScouD_DE8_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(7), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(7), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(7), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE8_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_ScouD_DE8_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(7), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(7), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(7), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE8_Func003C() ) then
set bj_forLoopAIndex = 37
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE8_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(7) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE8_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE8_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(7) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_ScouD_DE8 takes nothing returns nothing
set gg_trg_ScouD_DE8 = CreateTrigger( )
call DisableTrigger( gg_trg_ScouD_DE8 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_ScouD_DE8, udg_PTimer[8] )
call TriggerAddAction( gg_trg_ScouD_DE8, function Trig_ScouD_DE8_Actions )
endfunction
//===========================================================================
// Trigger: ScouD DE9
//===========================================================================
function Trig_ScouD_DE9_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE9_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE9_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE9_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE9_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE9_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE9_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE9_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE9_Actions takes nothing returns nothing
if ( Trig_ScouD_DE9_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_ScouD_DE9_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(8), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(8), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(8), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE9_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_ScouD_DE9_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(8), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(8), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(8), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE9_Func003C() ) then
set bj_forLoopAIndex = 37
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE9_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(8) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE9_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE9_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(8) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_ScouD_DE9 takes nothing returns nothing
set gg_trg_ScouD_DE9 = CreateTrigger( )
call DisableTrigger( gg_trg_ScouD_DE9 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_ScouD_DE9, udg_PTimer[9] )
call TriggerAddAction( gg_trg_ScouD_DE9, function Trig_ScouD_DE9_Actions )
endfunction
//===========================================================================
// Trigger: ScouD DE10
//===========================================================================
function Trig_ScouD_DE10_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE10_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE10_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE10_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE10_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE10_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE10_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE10_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE10_Actions takes nothing returns nothing
if ( Trig_ScouD_DE10_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_ScouD_DE10_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(9), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(9), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(9), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE10_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_ScouD_DE10_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(9), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(9), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(9), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE10_Func003C() ) then
set bj_forLoopAIndex = 37
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE10_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(9) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE10_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE10_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(9) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_ScouD_DE10 takes nothing returns nothing
set gg_trg_ScouD_DE10 = CreateTrigger( )
call DisableTrigger( gg_trg_ScouD_DE10 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_ScouD_DE10, udg_PTimer[10] )
call TriggerAddAction( gg_trg_ScouD_DE10, function Trig_ScouD_DE10_Actions )
endfunction
//===========================================================================
// Trigger: ScouD DE11
//===========================================================================
function Trig_ScouD_DE11_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE11_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE11_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE11_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE11_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE11_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE11_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE11_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE11_Actions takes nothing returns nothing
if ( Trig_ScouD_DE11_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_ScouD_DE11_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(10), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(10), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(10), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE11_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_ScouD_DE11_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(10), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(10), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(10), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE11_Func003C() ) then
set bj_forLoopAIndex = 37
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE11_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(10) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE11_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE11_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(10) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_ScouD_DE11 takes nothing returns nothing
set gg_trg_ScouD_DE11 = CreateTrigger( )
call DisableTrigger( gg_trg_ScouD_DE11 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_ScouD_DE11, udg_PTimer[11] )
call TriggerAddAction( gg_trg_ScouD_DE11, function Trig_ScouD_DE11_Actions )
endfunction
//===========================================================================
// Trigger: ScouD DE12
//===========================================================================
function Trig_ScouD_DE12_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE12_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE12_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE12_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE12_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE12_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE12_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE12_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE12_Actions takes nothing returns nothing
if ( Trig_ScouD_DE12_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_ScouD_DE12_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(11), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(11), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(11), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE12_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_ScouD_DE12_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(11), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(11), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(11), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE12_Func003C() ) then
set bj_forLoopAIndex = 37
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE12_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(11) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE12_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE12_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(11) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_ScouD_DE12 takes nothing returns nothing
set gg_trg_ScouD_DE12 = CreateTrigger( )
call DisableTrigger( gg_trg_ScouD_DE12 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_ScouD_DE12, udg_PTimer[12] )
call TriggerAddAction( gg_trg_ScouD_DE12, function Trig_ScouD_DE12_Actions )
endfunction
//===========================================================================
// Trigger: Leave
//===========================================================================
function Trig_Leave_Func002Func002Func001Func003C takes nothing returns boolean
if ( not ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Func002Func002Func001C takes nothing returns boolean
if ( not ( GetForLoopIndexA() != GetConvertedPlayerId(GetTriggerPlayer()) ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Func002Func005Func001Func003C takes nothing returns boolean
if ( not ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Func002Func005Func001C takes nothing returns boolean
if ( not ( GetForLoopIndexA() != GetConvertedPlayerId(GetTriggerPlayer()) ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Func002C takes nothing returns boolean
if ( not ( IsPlayerAlly(GetTriggerPlayer(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 15.00, ( GetPlayerName(GetTriggerPlayer()) + " has left the game." ) )
if ( Trig_Leave_Func002C() ) then
set udg_SNum = ( udg_SNum - 1 )
set bj_forLoopAIndex = 2
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Leave_Func002Func005Func001C() ) then
call SetPlayerAllianceStateBJ( GetTriggerPlayer(), ConvertedPlayer(GetForLoopIndexA()), bj_ALLIANCE_ALLIED_UNITS )
if ( Trig_Leave_Func002Func005Func001Func003C() ) then
call AdjustPlayerStateBJ( ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) / udg_SNum ), ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_GOLD )
call SetPlayerTaxRateBJ( ( 100 / udg_SNum ), PLAYER_STATE_RESOURCE_GOLD, GetTriggerPlayer(), ConvertedPlayer(GetForLoopIndexA()) )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
set udg_UDNum = ( udg_UDNum - 1 )
set bj_forLoopAIndex = 8
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Leave_Func002Func002Func001C() ) then
call SetPlayerAllianceStateBJ( GetTriggerPlayer(), ConvertedPlayer(GetForLoopIndexA()), bj_ALLIANCE_ALLIED_UNITS )
if ( Trig_Leave_Func002Func002Func001Func003C() ) then
call AdjustPlayerStateBJ( ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) / udg_UDNum ), ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_GOLD )
call SetPlayerTaxRateBJ( ( 100 / udg_UDNum ), PLAYER_STATE_RESOURCE_GOLD, GetTriggerPlayer(), ConvertedPlayer(GetForLoopIndexA()) )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endif
call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD, 0 )
endfunction
//===========================================================================
function InitTrig_Leave takes nothing returns nothing
set gg_trg_Leave = CreateTrigger( )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(1) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(2) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(3) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(4) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(5) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(7) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(8) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(9) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(10) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(11) )
call TriggerAddAction( gg_trg_Leave, function Trig_Leave_Actions )
endfunction
//===========================================================================
// Trigger: Bounty
//===========================================================================
function Trig_Exp_Decay_And_Bounty_Actions takes nothing returns nothing
call SetTimeOfDay( 6.00 )
call UseTimeOfDayBJ( true )
call SetTimeOfDayScalePercentBJ( 50.00 )
call SetSkyModel( "Environment\\Sky\\FoggedSky\\FoggedSky.mdl" )
call SetPlayerHandicapXPBJ( Player(1), 100.00 )
call SetPlayerHandicapXPBJ( Player(2), 100.00 )
call SetPlayerHandicapXPBJ( Player(3), 100.00 )
call SetPlayerHandicapXPBJ( Player(4), 100.00 )
call SetPlayerHandicapXPBJ( Player(5), 100.00 )
call SetPlayerHandicapXPBJ( Player(7), 100.00 )
call SetPlayerHandicapXPBJ( Player(8), 100.00 )
call SetPlayerHandicapXPBJ( Player(9), 100.00 )
call SetPlayerHandicapXPBJ( Player(10), 100.00 )
call SetPlayerHandicapXPBJ( Player(11), 100.00 )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(0) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(1) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(2) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(3) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(4) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(5) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(6) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(7) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(8) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(9) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(10) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(11) )
endfunction
function InitTrig_Bounty takes nothing returns nothing
set gg_trg_Bounty = CreateTrigger( )
call TriggerAddAction( gg_trg_Bounty, function Trig_Exp_Decay_And_Bounty_Actions )
endfunction
//===========================================================================
// Trigger: Tree
//===========================================================================
function Trig_Tree_Recreation_Func002002 takes nothing returns nothing
call DestructableRestoreLife( GetEnumDestructable(), GetDestructableMaxLife(GetEnumDestructable()), false )
endfunction
function Trig_Tree_Recreation_Actions takes nothing returns nothing
call TriggerSleepAction( 30.00 )
call EnumDestructablesInRectAll( GetEntireMapRect(), function Trig_Tree_Recreation_Func002002 )
endfunction
function InitTrig_Tree takes nothing returns nothing
set gg_trg_Tree = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Tree, 300.00 )
call TriggerAddAction( gg_trg_Tree, function Trig_Tree_Recreation_Actions )
endfunction
//===========================================================================
// Trigger: NoDouble
//===========================================================================
function Trig_NoDouble_Actions takes nothing returns nothing
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(1) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(2) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(3) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(4) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(5) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(7) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(8) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(9) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(10) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(11) )
set udg_HeroFlags[GetUnitPointValue(GetEnteringUnit())] = true
endfunction
//===========================================================================
function InitTrig_NoDouble takes nothing returns nothing
set gg_trg_NoDouble = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_NoDouble, gg_rct_herospawnud )
call TriggerRegisterEnterRectSimple( gg_trg_NoDouble, gg_rct_herospawnsent )
call TriggerAddAction( gg_trg_NoDouble, function Trig_NoDouble_Actions )
endfunction
//===========================================================================
// Trigger: HeroL1
//===========================================================================
function Trig_HeroL1_Actions takes nothing returns nothing
call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call SetPlayerTechMaxAllowedSwap( 'Nbrn', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Npbm', 0, GetOwningPlayer(GetTriggerUnit()) )
call SetPlayerTechMaxAllowedSwap( 'H000', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Orkn', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Emoo', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Emns', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'O00P', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H004', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N01O', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'HC92', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hjai', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hvwd', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H001', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hmbr', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Naka', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'E005', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Usyl', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H00K', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Harf', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'HC49', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hlgr', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Edem', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Nbbc', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'EC77', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'E002', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'EC45', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC01', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Eevi', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H00V', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC91', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC42', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U000', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'NC00', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ulic', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'EC57', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC76', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC18', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC11', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC60', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'E004', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00A', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U007', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Udre', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ewar', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U008', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ekee', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N016', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N01O', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N01A', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H00H', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U006', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Obla', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hamg', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hmkg', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hblm', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ofar', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Oshd', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Huth', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ntin', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00F', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00E', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00K', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Otch', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hpb2', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Opgh', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hvsh', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ucrl', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Nfir', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hant', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ogrh', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Uktl', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ubal', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Uanb', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hdgo', 0, GetTriggerPlayer() )
endfunction
//===========================================================================
function InitTrig_HeroL1 takes nothing returns nothing
set gg_trg_HeroL1 = CreateTrigger( )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(1), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(2), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(3), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(4), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(5), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(7), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(8), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(9), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(10), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(11), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerAddAction( gg_trg_HeroL1, function Trig_HeroL1_Actions )
endfunction
//===========================================================================
// Trigger: HeroL2
//===========================================================================
function Trig_HeroL2_Func001Func001C takes nothing returns boolean
if ( not ( GetForLoopIndexA() != 7 ) ) then
return false
endif
return true
endfunction
function Trig_HeroL2_Actions takes nothing returns nothing
set bj_forLoopAIndex = 2
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_HeroL2_Func001Func001C() ) then
call SetPlayerTechMaxAllowedSwap( 'Ntin', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Npbm', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Naka', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'H000', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'N016', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Orkn', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Emoo', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Emns', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'O00P', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'H004', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hmbr', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Nbrn', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Huth', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Harf', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'HC49', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hlgr', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'H00K', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'E005', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'N01O', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'H001', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'HC92', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Usyl', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'UC01', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'H00V', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Nbbc', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Edem', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'U000', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Ulic', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'UC42', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'UC91', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'EC77', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'E002', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Eevi', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'E004', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'UC60', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'UC76', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'EC57', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'U00A', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Ewar', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'U007', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'U008', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'UC18', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'UC11', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'NC00', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'EC45', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Ekee', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Udre', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hjai', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'N01O', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'N01A', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'U006', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'H00H', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Obla', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hamg', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Ofar', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Oshd', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Npbm', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hvwd', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hmkg', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hblm', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'U00F', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'U00E', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'U00K', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Otch', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hpb2', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hvsh', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Ucrl', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Nfir', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hant', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Opgh', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Ogrh', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hdgo', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Uktl', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Ubal', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Uanb', 0, ConvertedPlayer(GetForLoopIndexA()) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_HeroL2 takes nothing returns nothing
set gg_trg_HeroL2 = CreateTrigger( )
call TriggerAddAction( gg_trg_HeroL2, function Trig_HeroL2_Actions )
endfunction
//===========================================================================
// Trigger: RandomUD
//===========================================================================
function Trig_RandomUD_Func007C takes nothing returns boolean
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_CAP) == 5 ) ) then
return false
endif
if ( not ( udg_Elapsed20 == true ) ) then
return false
endif
return true
endfunction
function Trig_RandomUD_Conditions takes nothing returns boolean
if ( not Trig_RandomUD_Func007C() ) then
return false
endif
return true
endfunction
function Trig_RandomUD_Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RandomUD_Actions takes nothing returns nothing
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 66)
if ( Trig_RandomUD_Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(1) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(2) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(3) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(4) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(5) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(7) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(8) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(9) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(10) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(11) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_RandomUD takes nothing returns nothing
set gg_trg_RandomUD = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUD, Player(7), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUD, Player(8), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUD, Player(9), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUD, Player(10), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUD, Player(11), "-random", true )
call TriggerAddCondition( gg_trg_RandomUD, Condition( function Trig_RandomUD_Conditions ) )
call TriggerAddAction( gg_trg_RandomUD, function Trig_RandomUD_Actions )
endfunction
//===========================================================================
// Trigger: RandomUDAP
//===========================================================================
function Trig_RandomUDAP_Func007C takes nothing returns boolean
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_CAP) == 5 ) ) then
return false
endif
if ( not ( udg_Elapsed20 == true ) ) then
return false
endif
return true
endfunction
function Trig_RandomUDAP_Conditions takes nothing returns boolean
if ( not Trig_RandomUDAP_Func007C() ) then
return false
endif
return true
endfunction
function Trig_RandomUDAP_Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RandomUDAP_Actions takes nothing returns nothing
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_RandomUDAP_Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(1) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(2) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(3) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(4) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(5) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(7) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(8) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(9) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(10) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(11) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_RandomUDAP takes nothing returns nothing
set gg_trg_RandomUDAP = CreateTrigger( )
call DisableTrigger( gg_trg_RandomUDAP )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUDAP, Player(7), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUDAP, Player(8), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUDAP, Player(9), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUDAP, Player(10), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUDAP, Player(11), "-random", true )
call TriggerAddCondition( gg_trg_RandomUDAP, Condition( function Trig_RandomUDAP_Conditions ) )
call TriggerAddAction( gg_trg_RandomUDAP, function Trig_RandomUDAP_Actions )
endfunction
//===========================================================================
// Trigger: RandomS
//===========================================================================
function Trig_RandomS_Func007C takes nothing returns boolean
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_CAP) == 5 ) ) then
return false
endif
if ( not ( udg_Elapsed20 == true ) ) then
return false
endif
return true
endfunction
function Trig_RandomS_Conditions takes nothing returns boolean
if ( not Trig_RandomS_Func007C() ) then
return false
endif
return true
endfunction
function Trig_RandomS_Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RandomS_Actions takes nothing returns nothing
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 30)
if ( Trig_RandomS_Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(1) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(2) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(3) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(4) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(5) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(7) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(8) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(9) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(10) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(11) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_RandomS takes nothing returns nothing
set gg_trg_RandomS = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomS, Player(1), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomS, Player(2), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomS, Player(3), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomS, Player(4), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomS, Player(5), "-random", true )
call TriggerAddCondition( gg_trg_RandomS, Condition( function Trig_RandomS_Conditions ) )
call TriggerAddAction( gg_trg_RandomS, function Trig_RandomS_Actions )
endfunction
//===========================================================================
// Trigger: RandomSAP
//===========================================================================
function Trig_RandomSAP_Func007C takes nothing returns boolean
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_CAP) == 5 ) ) then
return false
endif
if ( not ( udg_Elapsed20 == true ) ) then
return false
endif
return true
endfunction
function Trig_RandomSAP_Conditions takes nothing returns boolean
if ( not Trig_RandomSAP_Func007C() ) then
return false
endif
return true
endfunction
function Trig_RandomSAP_Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RandomSAP_Actions takes nothing returns nothing
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_RandomSAP_Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(1) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(2) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(3) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(4) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(5) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(7) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(8) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(9) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(10) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(11) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_RandomSAP takes nothing returns nothing
set gg_trg_RandomSAP = CreateTrigger( )
call DisableTrigger( gg_trg_RandomSAP )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomSAP, Player(1), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomSAP, Player(2), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomSAP, Player(3), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomSAP, Player(4), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomSAP, Player(5), "-random", true )
call TriggerAddCondition( gg_trg_RandomSAP, Condition( function Trig_RandomSAP_Conditions ) )
call TriggerAddAction( gg_trg_RandomSAP, function Trig_RandomSAP_Actions )
endfunction
//===========================================================================
// Trigger: RepUD
//===========================================================================
function Trig_RepUD_Func011C takes nothing returns boolean
if ( not ( udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
if ( not ( udg_OneMin == false ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) == 5 ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) >= 150 ) ) then
return false
endif
return true
endfunction
function Trig_RepUD_Conditions takes nothing returns boolean
if ( not Trig_RepUD_Func011C() ) then
return false
endif
return true
endfunction
function Trig_RepUD_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == GetTriggerPlayer() ) ) then
return false
endif
return true
endfunction
function Trig_RepUD_Func004A takes nothing returns nothing
if ( Trig_RepUD_Func004Func001C() ) then
set udg_ReT[GetConvertedPlayerId(GetTriggerPlayer())] = GetUnitTypeId(GetEnumUnit())
call DisplayTimedTextToForce( GetPlayersEnemies(ConvertedPlayer(udg_RePN)), 10.00, "TRIGSTR_8791" )
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_RepUD_Func008C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RepUD_Actions takes nothing returns nothing
set udg_RePN = GetConvertedPlayerId(GetTriggerPlayer())
call AdjustPlayerStateBJ( -150, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
set udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] = true
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_RepUD_Func004A )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 66)
if ( Trig_RepUD_Func008C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(1) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(2) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(3) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(4) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(5) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(7) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(8) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(9) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(10) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(11) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_RepUD takes nothing returns nothing
set gg_trg_RepUD = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUD, Player(7), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUD, Player(8), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUD, Player(9), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUD, Player(10), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUD, Player(11), "-repick", true )
call TriggerAddCondition( gg_trg_RepUD, Condition( function Trig_RepUD_Conditions ) )
call TriggerAddAction( gg_trg_RepUD, function Trig_RepUD_Actions )
endfunction
//===========================================================================
// Trigger: RepUDAP
//===========================================================================
function Trig_RepUDAP_Func011C takes nothing returns boolean
if ( not ( udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
if ( not ( udg_OneMin == false ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) == 5 ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) >= 150 ) ) then
return false
endif
return true
endfunction
function Trig_RepUDAP_Conditions takes nothing returns boolean
if ( not Trig_RepUDAP_Func011C() ) then
return false
endif
return true
endfunction
function Trig_RepUDAP_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == GetTriggerPlayer() ) ) then
return false
endif
return true
endfunction
function Trig_RepUDAP_Func004A takes nothing returns nothing
if ( Trig_RepUDAP_Func004Func001C() ) then
set udg_ReT[GetConvertedPlayerId(GetTriggerPlayer())] = GetUnitTypeId(GetEnumUnit())
call DisplayTimedTextToForce( GetPlayersEnemies(ConvertedPlayer(udg_RePN)), 10.00, "TRIGSTR_8792" )
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_RepUDAP_Func008C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RepUDAP_Actions takes nothing returns nothing
set udg_RePN = GetConvertedPlayerId(GetTriggerPlayer())
call AdjustPlayerStateBJ( -150, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
set udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] = true
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_RepUDAP_Func004A )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_RepUDAP_Func008C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(1) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(2) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(3) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(4) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(5) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(7) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(8) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(9) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(10) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(11) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_RepUDAP takes nothing returns nothing
set gg_trg_RepUDAP = CreateTrigger( )
call DisableTrigger( gg_trg_RepUDAP )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUDAP, Player(7), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUDAP, Player(8), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUDAP, Player(9), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUDAP, Player(10), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUDAP, Player(11), "-repick", true )
call TriggerAddCondition( gg_trg_RepUDAP, Condition( function Trig_RepUDAP_Conditions ) )
call TriggerAddAction( gg_trg_RepUDAP, function Trig_RepUDAP_Actions )
endfunction
//===========================================================================
// Trigger: RepS
//===========================================================================
function Trig_RepS_Func011C takes nothing returns boolean
if ( not ( udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
if ( not ( udg_OneMin == false ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) == 5 ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) >= 150 ) ) then
return false
endif
return true
endfunction
function Trig_RepS_Conditions takes nothing returns boolean
if ( not Trig_RepS_Func011C() ) then
return false
endif
return true
endfunction
function Trig_RepS_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == GetTriggerPlayer() ) ) then
return false
endif
return true
endfunction
function Trig_RepS_Func004A takes nothing returns nothing
if ( Trig_RepS_Func004Func001C() ) then
set udg_ReT[GetConvertedPlayerId(GetTriggerPlayer())] = GetUnitTypeId(GetEnumUnit())
call DisplayTimedTextToForce( GetPlayersEnemies(ConvertedPlayer(udg_RePN)), 10.00, "TRIGSTR_8793" )
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_RepS_Func008C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RepS_Actions takes nothing returns nothing
set udg_RePN = GetConvertedPlayerId(GetTriggerPlayer())
call AdjustPlayerStateBJ( -150, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
set udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] = true
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_RepS_Func004A )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 30)
if ( Trig_RepS_Func008C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(1) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(2) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(3) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(4) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(5) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(7) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(8) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(9) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(10) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(11) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_RepS takes nothing returns nothing
set gg_trg_RepS = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_RepS, Player(1), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepS, Player(2), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepS, Player(3), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepS, Player(4), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepS, Player(5), "-repick", true )
call TriggerAddCondition( gg_trg_RepS, Condition( function Trig_RepS_Conditions ) )
call TriggerAddAction( gg_trg_RepS, function Trig_RepS_Actions )
endfunction
//===========================================================================
// Trigger: RepSAP
//===========================================================================
function Trig_RepSAP_Func011C takes nothing returns boolean
if ( not ( udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
if ( not ( udg_OneMin == false ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) == 5 ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) >= 150 ) ) then
return false
endif
return true
endfunction
function Trig_RepSAP_Conditions takes nothing returns boolean
if ( not Trig_RepSAP_Func011C() ) then
return false
endif
return true
endfunction
function Trig_RepSAP_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == GetTriggerPlayer() ) ) then
return false
endif
return true
endfunction
function Trig_RepSAP_Func004A takes nothing returns nothing
if ( Trig_RepSAP_Func004Func001C() ) then
set udg_ReT[GetConvertedPlayerId(GetTriggerPlayer())] = GetUnitTypeId(GetEnumUnit())
call DisplayTimedTextToForce( GetPlayersEnemies(ConvertedPlayer(udg_RePN)), 10.00, "TRIGSTR_8794" )
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_RepSAP_Func008C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RepSAP_Actions takes nothing returns nothing
set udg_RePN = GetConvertedPlayerId(GetTriggerPlayer())
call AdjustPlayerStateBJ( -150, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
set udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] = true
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_RepSAP_Func004A )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 30)
if ( Trig_RepSAP_Func008C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(1) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(2) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(3) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(4) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(5) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(7) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(8) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(9) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(10) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(11) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_RepSAP takes nothing returns nothing
set gg_trg_RepSAP = CreateTrigger( )
call DisableTrigger( gg_trg_RepSAP )
call TriggerRegisterPlayerChatEvent( gg_trg_RepSAP, Player(1), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepSAP, Player(2), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepSAP, Player(3), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepSAP, Player(4), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepSAP, Player(5), "-repick", true )
call TriggerAddCondition( gg_trg_RepSAP, Condition( function Trig_RepSAP_Conditions ) )
call TriggerAddAction( gg_trg_RepSAP, function Trig_RepSAP_Actions )
endfunction
//===========================================================================
// Trigger: ARReUD
//===========================================================================
function Trig_ARReUD_Func011C takes nothing returns boolean
if ( not ( udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
if ( not ( udg_OneMin == false ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) == 5 ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) >= 500 ) ) then
return false
endif
return true
endfunction
function Trig_ARReUD_Conditions takes nothing returns boolean
if ( not Trig_ARReUD_Func011C() ) then
return false
endif
return true
endfunction
function Trig_ARReUD_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == GetTriggerPlayer() ) ) then
return false
endif
return true
endfunction
function Trig_ARReUD_Func004A takes nothing returns nothing
if ( Trig_ARReUD_Func004Func001C() ) then
set udg_ReT[GetConvertedPlayerId(GetTriggerPlayer())] = GetUnitTypeId(GetEnumUnit())
call DisplayTimedTextToForce( GetPlayersEnemies(ConvertedPlayer(udg_RePN)), 10.00, "TRIGSTR_8795" )
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_ARReUD_Func008C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ARReUD_Actions takes nothing returns nothing
set udg_RePN = GetConvertedPlayerId(GetTriggerPlayer())
call AdjustPlayerStateBJ( -500, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
set udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] = true
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_ARReUD_Func004A )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 66)
if ( Trig_ARReUD_Func008C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_ARReUD takes nothing returns nothing
set gg_trg_ARReUD = CreateTrigger( )
call DisableTrigger( gg_trg_ARReUD )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReUD, Player(7), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReUD, Player(8), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReUD, Player(9), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReUD, Player(10), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReUD, Player(11), "-repick", true )
call TriggerAddCondition( gg_trg_ARReUD, Condition( function Trig_ARReUD_Conditions ) )
call TriggerAddAction( gg_trg_ARReUD, function Trig_ARReUD_Actions )
endfunction
//===========================================================================
// Trigger: ARReS
//===========================================================================
function Trig_ARReS_Func016C takes nothing returns boolean
if ( not ( udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
if ( not ( udg_OneMin == false ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) == 5 ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) >= 500 ) ) then
return false
endif
return true
endfunction
function Trig_ARReS_Conditions takes nothing returns boolean
if ( not Trig_ARReS_Func016C() ) then
return false
endif
return true
endfunction
function Trig_ARReS_Func009Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == GetTriggerPlayer() ) ) then
return false
endif
return true
endfunction
function Trig_ARReS_Func009A takes nothing returns nothing
if ( Trig_ARReS_Func009Func001C() ) then
set udg_ReT[GetConvertedPlayerId(GetTriggerPlayer())] = GetUnitTypeId(GetEnumUnit())
call DisplayTimedTextToForce( GetPlayersEnemies(ConvertedPlayer(udg_RePN)), 10.00, "TRIGSTR_8796" )
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_ARReS_Func013C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ARReS_Actions takes nothing returns nothing
set udg_RePN = GetConvertedPlayerId(GetTriggerPlayer())
call AdjustPlayerStateBJ( -500, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
set udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] = true
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_ARReS_Func009A )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 66)
if ( Trig_ARReS_Func013C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_ARReS takes nothing returns nothing
set gg_trg_ARReS = CreateTrigger( )
call DisableTrigger( gg_trg_ARReS )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReS, Player(1), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReS, Player(2), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReS, Player(3), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReS, Player(4), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReS, Player(5), "-repick", true )
call TriggerAddCondition( gg_trg_ARReS, Condition( function Trig_ARReS_Conditions ) )
call TriggerAddAction( gg_trg_ARReS, function Trig_ARReS_Actions )
endfunction
//===========================================================================
// Trigger: TRReUD
//===========================================================================
function Trig_TRReUD_Func011C takes nothing returns boolean
if ( not ( udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
if ( not ( udg_OneMin == false ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) == 5 ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) >= 500 ) ) then
return false
endif
return true
endfunction
function Trig_TRReUD_Conditions takes nothing returns boolean
if ( not Trig_TRReUD_Func011C() ) then
return false
endif
return true
endfunction
function Trig_TRReUD_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == GetTriggerPlayer() ) ) then
return false
endif
return true
endfunction
function Trig_TRReUD_Func004A takes nothing returns nothing
if ( Trig_TRReUD_Func004Func001C() ) then
set udg_ReT[GetConvertedPlayerId(GetTriggerPlayer())] = GetUnitTypeId(GetEnumUnit())
call DisplayTimedTextToForce( GetPlayersEnemies(ConvertedPlayer(udg_RePN)), 10.00, "TRIGSTR_8797" )
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_TRReUD_Func008C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TRReUD_Actions takes nothing returns nothing
set udg_RePN = GetConvertedPlayerId(GetTriggerPlayer())
call AdjustPlayerStateBJ( -500, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
set udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] = true
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_TRReUD_Func004A )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 66)
if ( Trig_TRReUD_Func008C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_TRReUD takes nothing returns nothing
set gg_trg_TRReUD = CreateTrigger( )
call DisableTrigger( gg_trg_TRReUD )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReUD, Player(7), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReUD, Player(8), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReUD, Player(9), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReUD, Player(10), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReUD, Player(11), "-repick", true )
call TriggerAddCondition( gg_trg_TRReUD, Condition( function Trig_TRReUD_Conditions ) )
call TriggerAddAction( gg_trg_TRReUD, function Trig_TRReUD_Actions )
endfunction
//===========================================================================
// Trigger: TRReS
//===========================================================================
function Trig_TRReS_Func016C takes nothing returns boolean
if ( not ( udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
if ( not ( udg_OneMin == false ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) == 5 ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) >= 500 ) ) then
return false
endif
return true
endfunction
function Trig_TRReS_Conditions takes nothing returns boolean
if ( not Trig_TRReS_Func016C() ) then
return false
endif
return true
endfunction
function Trig_TRReS_Func009Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == GetTriggerPlayer() ) ) then
return false
endif
return true
endfunction
function Trig_TRReS_Func009A takes nothing returns nothing
if ( Trig_TRReS_Func009Func001C() ) then
set udg_ReT[GetConvertedPlayerId(GetTriggerPlayer())] = GetUnitTypeId(GetEnumUnit())
call DisplayTimedTextToForce( GetPlayersEnemies(ConvertedPlayer(udg_RePN)), 10.00, "TRIGSTR_8798" )
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_TRReS_Func013C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TRReS_Actions takes nothing returns nothing
set udg_RePN = GetConvertedPlayerId(GetTriggerPlayer())
call AdjustPlayerStateBJ( -500, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
set udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] = true
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_TRReS_Func009A )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 30)
if ( Trig_TRReS_Func013C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_TRReS takes nothing returns nothing
set gg_trg_TRReS = CreateTrigger( )
call DisableTrigger( gg_trg_TRReS )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReS, Player(1), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReS, Player(2), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReS, Player(3), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReS, Player(4), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReS, Player(5), "-repick", true )
call TriggerAddCondition( gg_trg_TRReS, Condition( function Trig_TRReS_Conditions ) )
call TriggerAddAction( gg_trg_TRReS, function Trig_TRReS_Actions )
endfunction
//===========================================================================
// Trigger: Tornado barrier 2
//===========================================================================
function Trig_Tornado_barrier_2_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08M' ) ) then
return false
endif
return true
endfunction
function Trig_Tornado_barrier_2_Actions takes nothing returns nothing
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A08K', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "innerfire", GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Tornado_barrier_2 takes nothing returns nothing
set gg_trg_Tornado_barrier_2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Tornado_barrier_2, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Tornado_barrier_2, Condition( function Trig_Tornado_barrier_2_Conditions ) )
call TriggerAddAction( gg_trg_Tornado_barrier_2, function Trig_Tornado_barrier_2_Actions )
endfunction
//===========================================================================
// Trigger: Tornado Barrier
//===========================================================================
function Trig_Lucent_Barrier_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08M' ) ) then
return false
endif
if udg_BarrierLife!=0 then
return false
endif
return true
endfunction
function LucentBarrier takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) + GetEventDamage() ) )
set udg_BarrierLife=udg_BarrierLife-GetEventDamage()
if udg_BarrierLife<=0 then
set udg_BarrierLife=0
call DestroyTrigger(t)
call UnitRemoveBuffBJ( 'B04B', GetTriggerUnit() )
endif
set t=null
endfunction
function Trig_Lucent_Barrier_Actions takes nothing returns nothing
local trigger t=CreateTrigger()
set udg_BarrierLife=(75*I2R(GetUnitAbilityLevel(GetTriggerUnit(),'A08M')))
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerAddAction( t,function LucentBarrier)
set t=null
endfunction
//===========================================================================
function InitTrig_Tornado_Barrier takes nothing returns nothing
set gg_trg_Tornado_Barrier = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Tornado_Barrier, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Tornado_Barrier, Condition( function Trig_Lucent_Barrier_Conditions ) )
call TriggerAddAction( gg_trg_Tornado_Barrier, function Trig_Lucent_Barrier_Actions )
endfunction
//===========================================================================
// Trigger: Tornado blast
//===========================================================================
function Trig_Tornado_blast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08J' ) ) then
return false
endif
return true
endfunction
function Trig_Tornado_blast_Actions takes nothing returns nothing
local unit caster = GetTriggerUnit()
local unit target = GetSpellTargetUnit()
call SetUnitPositionLoc( target, PolarProjectionBJ(GetUnitLoc(target), 100.00, AngleBetweenPoints(GetUnitLoc(caster), GetUnitLoc(target))) )
endfunction
//===========================================================================
function InitTrig_Tornado_blast takes nothing returns nothing
set gg_trg_Tornado_blast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Tornado_blast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Tornado_blast, Condition( function Trig_Tornado_blast_Conditions ) )
call TriggerAddAction( gg_trg_Tornado_blast, function Trig_Tornado_blast_Actions )
endfunction
//===========================================================================
// Trigger: Displace
//===========================================================================
function Trig_Displace_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A082' ) ) then
return false
endif
return true
endfunction
function Trig_Displace_Func001001003001 takes nothing returns boolean
return ( IsUnitEnemy(GetTriggerUnit(), GetOwningPlayer(GetFilterUnit())) == true )
endfunction
function Trig_Displace_Func001001003002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Displace_Func001001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Displace_Func001001003001(), Trig_Displace_Func001001003002() )
endfunction
function Trig_Displace_Func001A takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), 100.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_SONIC )
endfunction
function Trig_Displace_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocMatching(150.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_Displace_Func001001003)), function Trig_Displace_Func001A )
endfunction
//===========================================================================
function InitTrig_Displace takes nothing returns nothing
set gg_trg_Displace = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Displace, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Displace, Condition( function Trig_Displace_Conditions ) )
call TriggerAddAction( gg_trg_Displace, function Trig_Displace_Actions )
endfunction
//===========================================================================
// Trigger: Perdition
//===========================================================================
function Trig_Perdition_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07P' ) ) then
return false
endif
return true
endfunction
function Trig_Perdition_Actions takes nothing returns nothing
local unit target = GetSpellTargetUnit()
local unit caster = GetTriggerUnit()
local real damage = ( GetUnitStateSwap(UNIT_STATE_MAX_LIFE, caster) * ( 0.01 + ( 0.02 * I2R(GetUnitAbilityLevelSwapped('A07P', caster)) ) ) )
call PolledWait( ( DistanceBetweenPoints(GetUnitLoc(caster), GetUnitLoc(target)) / 1000.00 ) )
call UnitDamageTargetBJ( caster, target, damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_DIVINE )
endfunction
//===========================================================================
function InitTrig_Perdition takes nothing returns nothing
set gg_trg_Perdition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Perdition, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Perdition, Condition( function Trig_Perdition_Conditions ) )
call TriggerAddAction( gg_trg_Perdition, function Trig_Perdition_Actions )
endfunction
//===========================================================================
// Trigger: Power Word
//===========================================================================
function Trig_Power_Word_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03V' ) ) then
return false
endif
return true
endfunction
function Trig_Power_Word_Func001C takes nothing returns boolean
if ( not ( IsUnitAlly(GetSpellTargetUnit(), GetOwningPlayer(GetTriggerUnit())) == true ) ) then
return false
endif
return true
endfunction
function Trig_Power_Word_Actions takes nothing returns nothing
if ( Trig_Power_Word_Func001C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A06E', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A06E', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A03V', GetTriggerUnit()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "innerfire", GetSpellTargetUnit() )
else
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A068', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A068', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A03V', GetTriggerUnit()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "acidbomb", GetSpellTargetUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Power_Word takes nothing returns nothing
set gg_trg_Power_Word = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Power_Word, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Power_Word, Condition( function Trig_Power_Word_Conditions ) )
call TriggerAddAction( gg_trg_Power_Word, function Trig_Power_Word_Actions )
endfunction
//===========================================================================
// Trigger: Shadow Word
//===========================================================================
function Trig_Shadow_Word_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AS' ) ) then
return false
endif
return true
endfunction
function Trig_Shadow_Word_Func001C takes nothing returns boolean
if ( not ( IsUnitAlly(GetSpellTargetUnit(), GetOwningPlayer(GetTriggerUnit())) == true ) ) then
return false
endif
return true
endfunction
function Trig_Shadow_Word_Actions takes nothing returns nothing
if ( Trig_Shadow_Word_Func001C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A06S', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A06S', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0AS', GetTriggerUnit()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "rejuvination", GetSpellTargetUnit() )
else
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A06P', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A06P', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0AS', GetTriggerUnit()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "parasite", GetSpellTargetUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Shadow_Word takes nothing returns nothing
set gg_trg_Shadow_Word = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shadow_Word, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Shadow_Word, Condition( function Trig_Shadow_Word_Conditions ) )
call TriggerAddAction( gg_trg_Shadow_Word, function Trig_Shadow_Word_Actions )
endfunction
//===========================================================================
// Trigger: Ostracize new
//===========================================================================
function Trig_Ostracize_new_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08O' ) ) then
return false
endif
return true
endfunction
function Trig_Ostracize_new_Actions takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), ( 60.00 * I2R(GetUnitAbilityLevelSwapped('A08O', GetTriggerUnit())) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )
endfunction
//===========================================================================
function InitTrig_Ostracize_new takes nothing returns nothing
set gg_trg_Ostracize_new = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ostracize_new, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Ostracize_new, Condition( function Trig_Ostracize_new_Conditions ) )
call TriggerAddAction( gg_trg_Ostracize_new, function Trig_Ostracize_new_Actions )
endfunction
//===========================================================================
// Trigger: Shadow Weave
//===========================================================================
function Trig_Shadow_Weave_Func008C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A03V' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AS' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05X' ) ) then
return true
endif
return false
endfunction
function Trig_Shadow_Weave_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A05H', GetSpellTargetUnit()) < 4 ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A05I', GetSpellTargetUnit()) < 4 ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A04G', GetTriggerUnit()) > 0 ) ) then
return false
endif
if ( not Trig_Shadow_Weave_Func008C() ) then
return false
endif
return true
endfunction
function Trig_Shadow_Weave_Actions takes nothing returns nothing
local unit target = GetSpellTargetUnit()
if ( IsUnitAlly(GetTriggerUnit(), GetOwningPlayer(target)) == true ) then
if ( GetUnitAbilityLevelSwapped('A05H', target) > 0 ) then
call IncUnitAbilityLevelSwapped( 'A05H', target )
else
call UnitAddAbilityBJ( 'A05H', target )
endif
else
if ( GetUnitAbilityLevelSwapped('A05I', target) > 0 ) then
call IncUnitAbilityLevelSwapped( 'A05I', target )
else
call UnitAddAbilityBJ( 'A05I', target )
endif
endif
call PolledWait( 15.00 )
if ( GetUnitAbilityLevelSwapped('A05H', target) == 1 ) then
call UnitRemoveAbilityBJ( 'A05H', target )
else
if ( GetUnitAbilityLevelSwapped('A05H', target) > 1 ) then
call DecUnitAbilityLevelSwapped( 'A05H', target )
endif
endif
if ( GetUnitAbilityLevelSwapped('A05I', target) == 1 ) then
call UnitRemoveAbilityBJ( 'A05I', target )
else
if ( GetUnitAbilityLevelSwapped('A05I', target) > 1 ) then
call DecUnitAbilityLevelSwapped( 'A05I', target )
endif
endif
endfunction
//===========================================================================
function InitTrig_Shadow_Weave takes nothing returns nothing
set gg_trg_Shadow_Weave = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shadow_Weave, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Shadow_Weave, Condition( function Trig_Shadow_Weave_Conditions ) )
call TriggerAddAction( gg_trg_Shadow_Weave, function Trig_Shadow_Weave_Actions )
endfunction
//===========================================================================
// Trigger: Protect Roshan
//===========================================================================
function Trig_Protect_Roshan_Conditions takes nothing returns boolean
if ( not ( GetAttackedUnitBJ() == gg_unit_n00L_0115 ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetAttacker()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Protect_Roshan_Actions takes nothing returns nothing
call KillUnit( GetAttacker() )
endfunction
//===========================================================================
function InitTrig_Protect_Roshan takes nothing returns nothing
set gg_trg_Protect_Roshan = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Protect_Roshan, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Protect_Roshan, Condition( function Trig_Protect_Roshan_Conditions ) )
call TriggerAddAction( gg_trg_Protect_Roshan, function Trig_Protect_Roshan_Actions )
endfunction
//===========================================================================
// Trigger: Protect Roshan 2
//===========================================================================
function Trig_Protect_Roshan_2_Conditions takes nothing returns boolean
if ( not ( GetAttackedUnitBJ() == gg_unit_n00L_0115 ) ) then
return false
endif
return true
endfunction
function Trig_Protect_Roshan_2_Func001C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'BPSE') == true ) ) then
return false
endif
return true
endfunction
function Trig_Protect_Roshan_2_Actions takes nothing returns nothing
if ( Trig_Protect_Roshan_2_Func001C() ) then
call UnitRemoveBuffBJ( 'BPSE', GetAttackedUnitBJ() )
else
endif
endfunction
//===========================================================================
function InitTrig_Protect_Roshan_2 takes nothing returns nothing
set gg_trg_Protect_Roshan_2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Protect_Roshan_2, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Protect_Roshan_2, Condition( function Trig_Protect_Roshan_2_Conditions ) )
call TriggerAddAction( gg_trg_Protect_Roshan_2, function Trig_Protect_Roshan_2_Actions )
endfunction
//===========================================================================
// Trigger: Natures Attendants
//===========================================================================
function Trig_Natures_Attendants_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'uloc' ) ) then
return false
endif
return true
endfunction
function Trig_Natures_Attendants_Func001Func001003001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Natures_Attendants_Func001Func001003001003002001 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A04R', GetFilterUnit()) != 1 )
endfunction
function Trig_Natures_Attendants_Func001Func001003001003002002 takes nothing returns boolean
return ( IsUnitAlly(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Natures_Attendants_Func001Func001003001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Natures_Attendants_Func001Func001003001003002001(), Trig_Natures_Attendants_Func001Func001003001003002002() )
endfunction
function Trig_Natures_Attendants_Func001Func001003001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Natures_Attendants_Func001Func001003001003001(), Trig_Natures_Attendants_Func001Func001003001003002() )
endfunction
function Trig_Natures_Attendants_Func001A takes nothing returns nothing
call IssueTargetOrderBJ( GetEnumUnit(), "heal", GroupPickRandomUnit(GetUnitsInRangeOfLocMatching(500.00, GetUnitLoc(GetEnumUnit()), Condition(function Trig_Natures_Attendants_Func001Func001003001003))) )
endfunction
function Trig_Natures_Attendants_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetTriggerUnit()), 'uloc'), function Trig_Natures_Attendants_Func001A )
endfunction
//===========================================================================
function InitTrig_Natures_Attendants takes nothing returns nothing
set gg_trg_Natures_Attendants = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Natures_Attendants, GetEntireMapRect() )
call TriggerAddCondition( gg_trg_Natures_Attendants, Condition( function Trig_Natures_Attendants_Conditions ) )
call TriggerAddAction( gg_trg_Natures_Attendants, function Trig_Natures_Attendants_Actions )
endfunction
//===========================================================================
// Trigger: Optimiser
//===========================================================================
function Trig_Optimiser_Conditions takes nothing returns boolean
if ( not ( IsUnitIllusionBJ(GetLearningUnit()) == false ) ) then
return false
endif
if ( not ( IsUnitType(GetLearningUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Optimiser_Func002001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0DZ' )
endfunction
function Trig_Optimiser_Func003001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0DW' )
endfunction
function Trig_Optimiser_Func004001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0C6' )
endfunction
function Trig_Optimiser_Func005001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0BU' )
endfunction
function Trig_Optimiser_Func006001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0DB' )
endfunction
function Trig_Optimiser_Func007001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0D6' )
endfunction
function Trig_Optimiser_Func008001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A04Y' )
endfunction
function Trig_Optimiser_Func009001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A00V' )
endfunction
function Trig_Optimiser_Func010001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A059' )
endfunction
function Trig_Optimiser_Func011001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A050' )
endfunction
function Trig_Optimiser_Func012001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0DL' )
endfunction
function Trig_Optimiser_Func013001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0ED' )
endfunction
function Trig_Optimiser_Func015001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0C5' )
endfunction
function Trig_Optimiser_Func016001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0BR' )
endfunction
function Trig_Optimiser_Func017001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A06U' )
endfunction
function Trig_Optimiser_Func018001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A06D' )
endfunction
function Trig_Optimiser_Func019001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A060' )
endfunction
function Trig_Optimiser_Func020001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A00F' )
endfunction
function Trig_Optimiser_Func021001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A03G' )
endfunction
function Trig_Optimiser_Actions takes nothing returns nothing
// ***************** Unit Is Attacked Event Triggers *******************
if ( Trig_Optimiser_Func002001() ) then
call EnableTrigger( gg_trg_Backstab )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func003001() ) then
call EnableTrigger( gg_trg_Untouchable )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func004001() ) then
call EnableTrigger( gg_trg_Counter_Helix )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func005001() ) then
call EnableTrigger( gg_trg_Craggy_Exterior )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func006001() ) then
call EnableTrigger( gg_trg_Juxtapose )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func007001() ) then
call EnableTrigger( gg_trg_Lucky_Stars )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func008001() ) then
call EnableTrigger( gg_trg_Nightmare_Attack )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func009001() ) then
call EnableTrigger( gg_trg_return )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func010001() ) then
call EnableTrigger( gg_trg_Overpower )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func011001() ) then
call EnableTrigger( gg_trg_Enrage )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func012001() ) then
call EnableTrigger( gg_trg_Enchant_Totem )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func013001() ) then
call EnableTrigger( gg_trg_Wounding_Spear )
else
call DoNothing( )
endif
// ************************ Unit Dies Event Triggers ******************************
if ( Trig_Optimiser_Func015001() ) then
call EnableTrigger( gg_trg_Battle_Hunger )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func016001() ) then
call EnableTrigger( gg_trg_Necromastry )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func017001() ) then
call EnableTrigger( gg_trg_Entrench )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func018001() ) then
call EnableTrigger( gg_trg_Flesh_Heap )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func019001() ) then
call EnableTrigger( gg_trg_Sadist )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func020001() ) then
call EnableTrigger( gg_trg_track )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func021001() ) then
call EnableTrigger( gg_trg_dragon_bug_3 )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Optimiser takes nothing returns nothing
set gg_trg_Optimiser = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Optimiser, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Optimiser, Condition( function Trig_Optimiser_Conditions ) )
call TriggerAddAction( gg_trg_Optimiser, function Trig_Optimiser_Actions )
endfunction
//===========================================================================
// Trigger: Mirror Shield
//===========================================================================
function Trig_Mirror_Shield_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSpellAbilityUnit()) != 'e00E' ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetSpellTargetUnit(), 'kybl') == true ) ) then
return false
endif
return true
endfunction
function Trig_Mirror_Shield_Func002C takes nothing returns boolean
if ( not ( udg_DeflectChance <= 25 ) ) then
return false
endif
return true
endfunction
function Trig_Mirror_Shield_Actions takes nothing returns nothing
set udg_DeflectChance = GetRandomInt(1, 100)
if ( Trig_Mirror_Shield_Func002C() ) then
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetSpellTargetUnit()), GetUnitLoc(GetSpellTargetUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( GetSpellAbilityId(), GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( GetSpellAbilityId(), GetLastCreatedUnit(), ( GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetTriggerUnit()) + 0 ) )
set udg_AbilityString = OrderId2StringBJ(GetUnitCurrentOrder(GetTriggerUnit()))
call IssueTargetOrderBJ( GetLastCreatedUnit(), udg_AbilityString, GetTriggerUnit() )
call AddSpecialEffectTargetUnitBJ( "overhead", GetSpellTargetUnit(), "Abilities\\Spells\\Undead\\ReplenishHealth\\ReplenishHealthCasterOverhead.mdl" )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Mirror_Shield takes nothing returns nothing
set gg_trg_Mirror_Shield = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mirror_Shield, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Mirror_Shield, Condition( function Trig_Mirror_Shield_Conditions ) )
call TriggerAddAction( gg_trg_Mirror_Shield, function Trig_Mirror_Shield_Actions )
endfunction
//===========================================================================
// Trigger: Shukuchi
//===========================================================================
function Trig_Shukuchi_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0CA' ) ) then
return false
endif
return true
endfunction
function Trig_Shukuchi_Func004001 takes nothing returns boolean
return ( UnitHasBuffBJ(GetTriggerUnit(), 'BHfs') == false )
endfunction
function Trig_Shukuchi_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A0C9', GetTriggerUnit() )
call SetUnitAbilityLevelSwapped( 'A0C9', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A0CA', GetTriggerUnit()) )
call TriggerSleepAction( 0.10 )
loop
exitwhen ( Trig_Shukuchi_Func004001() )
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, 0.10))
endloop
call UnitRemoveAbilityBJ( 'A0C9', GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Shukuchi takes nothing returns nothing
set gg_trg_Shukuchi = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shukuchi, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Shukuchi, Condition( function Trig_Shukuchi_Conditions ) )
call TriggerAddAction( gg_trg_Shukuchi, function Trig_Shukuchi_Actions )
endfunction
//===========================================================================
// Trigger: Split Shot
//===========================================================================
function Trig_Split_Shot_Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A012', GetDyingUnit()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Split_Shot_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A012', GetTriggerUnit()) > 0 ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("defend") ) ) then
return false
endif
return true
endfunction
function Trig_Split_Shot_Func003C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A012', GetTriggerUnit()) > 0 ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("undefend") ) ) then
return false
endif
return true
endfunction
function Trig_Split_Shot_Actions takes nothing returns nothing
if ( Trig_Split_Shot_Func001C() ) then
call UnitRemoveAbilityBJ( 'A09J', GetDyingUnit() )
else
endif
if ( Trig_Split_Shot_Func002C() ) then
call UnitAddAbilityBJ( 'A09J', GetTriggerUnit() )
else
endif
if ( Trig_Split_Shot_Func003C() ) then
call UnitRemoveAbilityBJ( 'A09J', GetTriggerUnit() )
else
endif
endfunction
//===========================================================================
function InitTrig_Split_Shot takes nothing returns nothing
set gg_trg_Split_Shot = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Split_Shot, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Split_Shot, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Split_Shot, function Trig_Split_Shot_Actions )
endfunction
//===========================================================================
// Trigger: Time Lapse Cast
//===========================================================================
function Trig_Time_Lapse_Cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0CT' ) ) then
return false
endif
return true
endfunction
function Trig_Time_Lapse_Cast_Actions takes nothing returns nothing
call SetUnitPositionLoc( GetTriggerUnit(), udg_TLPoint[1] )
call SetUnitLifeBJ( GetTriggerUnit(), udg_TLLife[1] )
call SetUnitManaBJ( GetTriggerUnit(), udg_TLMana[1] )
call AddSpecialEffectLocBJ( GetUnitLoc(GetTriggerUnit()), "Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl" )
call UnitRemoveBuffsBJ( bj_REMOVEBUFFS_NEGATIVE, GetTriggerUnit() )
call TriggerSleepAction( 1.00 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
endfunction
//===========================================================================
function InitTrig_Time_Lapse_Cast takes nothing returns nothing
set gg_trg_Time_Lapse_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Time_Lapse_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Time_Lapse_Cast, Condition( function Trig_Time_Lapse_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Time_Lapse_Cast, function Trig_Time_Lapse_Cast_Actions )
endfunction
//===========================================================================
// Trigger: Time Lapse Set
//===========================================================================
function Trig_Time_Lapse_Set_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_TLPoint[( GetForLoopIndexA() - 1 )] = udg_TLPoint[GetForLoopIndexA()]
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_TLLife[( GetForLoopIndexA() - 1 )] = udg_TLLife[GetForLoopIndexA()]
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_TLMana[( GetForLoopIndexA() - 1 )] = udg_TLMana[GetForLoopIndexA()]
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_TLPoint[10] = GetUnitLoc(udg_TLaffector)
set udg_TLLife[10] = GetUnitStateSwap(UNIT_STATE_LIFE, udg_TLaffector)
set udg_TLMana[10] = GetUnitStateSwap(UNIT_STATE_MANA, udg_TLaffector)
endfunction
//===========================================================================
function InitTrig_Time_Lapse_Set takes nothing returns nothing
set gg_trg_Time_Lapse_Set = CreateTrigger( )
call DisableTrigger( gg_trg_Time_Lapse_Set )
call TriggerRegisterTimerEventPeriodic( gg_trg_Time_Lapse_Set, 0.50 )
call TriggerAddAction( gg_trg_Time_Lapse_Set, function Trig_Time_Lapse_Set_Actions )
endfunction
//===========================================================================
// Trigger: Time Lapse Begin
//===========================================================================
function Trig_Time_Lapse_Begin_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Ubal' ) ) then
return false
endif
return true
endfunction
function Trig_Time_Lapse_Begin_Actions takes nothing returns nothing
set udg_TLaffector = GetTriggerUnit()
call EnableTrigger( gg_trg_Time_Lapse_Set )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Time_Lapse_Begin takes nothing returns nothing
set gg_trg_Time_Lapse_Begin = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Time_Lapse_Begin, GetPlayableMapRect() )
call TriggerAddCondition( gg_trg_Time_Lapse_Begin, Condition( function Trig_Time_Lapse_Begin_Conditions ) )
call TriggerAddAction( gg_trg_Time_Lapse_Begin, function Trig_Time_Lapse_Begin_Actions )
endfunction
//===========================================================================
// Trigger: Malefice
//===========================================================================
function Trig_Malefice_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0B3' ) ) then
return false
endif
return true
endfunction
function Trig_Malefice_Actions takes nothing returns nothing
set udg_Malefice = GetSpellTargetUnit()
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A01A', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", udg_Malefice )
call TriggerSleepAction( 2 )
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A01A', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", udg_Malefice )
call TriggerSleepAction( 2 )
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A01A', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", udg_Malefice )
call TriggerSleepAction( 2 )
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A01A', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", udg_Malefice )
endfunction
//===========================================================================
function InitTrig_Malefice takes nothing returns nothing
set gg_trg_Malefice = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Malefice, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Malefice, Condition( function Trig_Malefice_Conditions ) )
call TriggerAddAction( gg_trg_Malefice, function Trig_Malefice_Actions )
endfunction
//===========================================================================
// Trigger: Conversion
//===========================================================================
function Trig_Conversion_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0B7' ) ) then
return false
endif
return true
endfunction
function Trig_Conversion_Actions takes nothing returns nothing
call UnitApplyTimedLifeBJ( 31.00, 'BTLF', GetSpellTargetUnit() )
call UnitAddAbilityBJ( 'A0BI', GetSpellTargetUnit() )
call SetUnitAbilityLevelSwapped( 'A0BI', GetSpellTargetUnit(), GetUnitAbilityLevelSwapped('A0B7', GetTriggerUnit()) )
call TriggerSleepAction( 0.05 )
call IssueImmediateOrderBJ( GetSpellTargetUnit(), "elementalfury" )
call TriggerSleepAction( 1.00 )
call IssueImmediateOrderBJ( GetSpellTargetUnit(), "elementalfury" )
endfunction
//===========================================================================
function InitTrig_Conversion takes nothing returns nothing
set gg_trg_Conversion = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Conversion, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Conversion, Condition( function Trig_Conversion_Conditions ) )
call TriggerAddAction( gg_trg_Conversion, function Trig_Conversion_Actions )
endfunction
//===========================================================================
// Trigger: Midnight Pulse
//===========================================================================
function Trig_Midnight_Pulse_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0B1' ) ) then
return false
endif
return true
endfunction
function Trig_Midnight_Pulse_Actions takes nothing returns nothing
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetSpellTargetLoc() )
call ShowUnitHide( GetLastCreatedUnit() )
call UnitApplyTimedLifeBJ( 8.00, 'BTLF', GetLastCreatedUnit() )
call UnitAddAbilityBJ( 'A0B2', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A0B2', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0B1', GetTriggerUnit()) )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "deathanddecay", GetSpellTargetLoc() )
endfunction
//===========================================================================
function InitTrig_Midnight_Pulse takes nothing returns nothing
set gg_trg_Midnight_Pulse = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Midnight_Pulse, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Midnight_Pulse, Condition( function Trig_Midnight_Pulse_Conditions ) )
call TriggerAddAction( gg_trg_Midnight_Pulse, function Trig_Midnight_Pulse_Actions )
endfunction
//===========================================================================
// Trigger: Black Hole
//===========================================================================
function Trig_Black_Hole_Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0BY' ) ) then
return false
endif
return true
endfunction
function Trig_Black_Hole_Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'u004' ) ) then
return false
endif
return true
endfunction
function Trig_Black_Hole_Actions takes nothing returns nothing
if ( Trig_Black_Hole_Func001C() ) then
call DisableTrigger( gg_trg_Black_Hole_suck )
else
endif
if ( Trig_Black_Hole_Func002C() ) then
set udg_BlackHole = GetSummonedUnit()
call SetUnitAbilityLevelSwapped( 'A0C0', GetSummonedUnit(), GetUnitAbilityLevelSwapped('A0BY', GetSummoningUnit()) )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call EnableTrigger( gg_trg_Black_Hole_suck )
else
endif
endfunction
//===========================================================================
function InitTrig_Black_Hole takes nothing returns nothing
set gg_trg_Black_Hole = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Hole, EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Hole, EVENT_PLAYER_UNIT_SPELL_ENDCAST )
call TriggerAddAction( gg_trg_Black_Hole, function Trig_Black_Hole_Actions )
endfunction
//===========================================================================
// Trigger: Black Hole suck
//===========================================================================
function Trig_Black_Hole_suck_Func002001003001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Black_Hole_suck_Func002001003001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_ANCIENT) == false )
endfunction
function Trig_Black_Hole_suck_Func002001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Black_Hole_suck_Func002001003001001(), Trig_Black_Hole_suck_Func002001003001002() )
endfunction
function Trig_Black_Hole_suck_Func002001003002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_BlackHole)) == true )
endfunction
function Trig_Black_Hole_suck_Func002001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Black_Hole_suck_Func002001003001(), Trig_Black_Hole_suck_Func002001003002() )
endfunction
function Trig_Black_Hole_suck_Func002A takes nothing returns nothing
call SetUnitPositionLoc( GetEnumUnit(), PolarProjectionBJ(GetUnitLoc(udg_BlackHole), ( DistanceBetweenPoints(GetUnitLoc(udg_BlackHole), GetUnitLoc(GetEnumUnit())) - 2.00 ), AngleBetweenPoints(GetUnitLoc(udg_BlackHole), GetUnitLoc(GetEnumUnit()))) )
endfunction
function Trig_Black_Hole_suck_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRangeOfLocMatching(400.00, GetUnitLoc(udg_BlackHole), Condition(function Trig_Black_Hole_suck_Func002001003)), function Trig_Black_Hole_suck_Func002A )
endfunction
//===========================================================================
function InitTrig_Black_Hole_suck takes nothing returns nothing
set gg_trg_Black_Hole_suck = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Black_Hole_suck, 0.05 )
call TriggerAddAction( gg_trg_Black_Hole_suck, function Trig_Black_Hole_suck_Actions )
endfunction
//===========================================================================
// Trigger: Heartstopper kill
//===========================================================================
function Trig_Heartstopper_kill_Func001001002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B01L') == true )
endfunction
function Trig_Heartstopper_kill_Func001Func001C takes nothing returns boolean
if ( not ( GetUnitLifePercent(GetEnumUnit()) <= 1.01 ) ) then
return false
endif
return true
endfunction
function Trig_Heartstopper_kill_Func001A takes nothing returns nothing
if ( Trig_Heartstopper_kill_Func001Func001C() ) then
call UnitDamageTargetBJ( udg_Heartstopper, GetEnumUnit(), 1000.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Heartstopper_kill_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Heartstopper_kill_Func001001002)), function Trig_Heartstopper_kill_Func001A )
endfunction
//===========================================================================
function InitTrig_Heartstopper_kill takes nothing returns nothing
set gg_trg_Heartstopper_kill = CreateTrigger( )
call DisableTrigger( gg_trg_Heartstopper_kill )
call TriggerRegisterTimerEventPeriodic( gg_trg_Heartstopper_kill, 1.00 )
call TriggerAddAction( gg_trg_Heartstopper_kill, function Trig_Heartstopper_kill_Actions )
endfunction
//===========================================================================
// Trigger: Rot
//===========================================================================
function Trig_Rot_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A06K', GetTriggerUnit()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Rot_Func001C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("immolation") ) ) then
return false
endif
return true
endfunction
function Trig_Rot_Func002C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("unimmolation") ) ) then
return false
endif
return true
endfunction
function Trig_Rot_Actions takes nothing returns nothing
if ( Trig_Rot_Func001C() ) then
call UnitAddAbilityBJ( 'A0AZ', GetTriggerUnit() )
else
endif
if ( Trig_Rot_Func002C() ) then
call UnitRemoveAbilityBJ( 'A0AZ', GetTriggerUnit() )
else
endif
endfunction
//===========================================================================
function InitTrig_Rot takes nothing returns nothing
set gg_trg_Rot = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Rot, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Rot, Condition( function Trig_Rot_Conditions ) )
call TriggerAddAction( gg_trg_Rot, function Trig_Rot_Actions )
endfunction
//===========================================================================
// Trigger: Gaze b
//===========================================================================
function Trig_Gaze_b_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AW' ) ) then
return false
endif
return true
endfunction
function Trig_Gaze_b_Actions takes nothing returns nothing
set udg_Gazer = GetSpellAbilityUnit()
set udg_Gazee = GetSpellTargetUnit()
call CreateNUnitsAtLoc( 1, 'e00G', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attack", udg_Gazee )
call UnitApplyTimedLifeBJ( 0.80, 'BTLF', GetLastCreatedUnit() )
set udg_GazeCycle = 0
call EnableTrigger( gg_trg_Gaze_c )
endfunction
//===========================================================================
function InitTrig_Gaze_b takes nothing returns nothing
set gg_trg_Gaze_b = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Gaze_b, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
call TriggerAddCondition( gg_trg_Gaze_b, Condition( function Trig_Gaze_b_Conditions ) )
call TriggerAddAction( gg_trg_Gaze_b, function Trig_Gaze_b_Actions )
endfunction
//===========================================================================
// Trigger: Gaze c
//===========================================================================
function Trig_Gaze_c_Func010C takes nothing returns boolean
if ( not ( udg_GazeCycle >= 4 ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A0AW', udg_Gazer) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Gaze_c_Func011C takes nothing returns boolean
if ( not ( udg_GazeCycle >= 6 ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A0AW', udg_Gazer) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Gaze_c_Func012C takes nothing returns boolean
if ( not ( udg_GazeCycle >= 12 ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A0AW', udg_Gazer) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Gaze_c_Actions takes nothing returns nothing
set udg_GazeCycle = ( udg_GazeCycle + 1 )
call CreateNUnitsAtLoc( 1, 'e00G', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetUnitLoc(udg_Gazer), bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attack", udg_Gazee )
call UnitApplyTimedLifeBJ( 0.80, 'BTLF', GetLastCreatedUnit() )
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(udg_Gazer), GetUnitLoc(udg_Gazer), GetUnitLoc(udg_Gazee) )
call UnitAddAbilityBJ( 'A0AY', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A0AY', GetLastCreatedUnit(), ( GetUnitAbilityLevelSwapped('A0AW', udg_Gazer) * udg_GazeCycle ) )
call UnitRemoveBuffBJ( 'B042', udg_Gazee )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "drunkenhaze", udg_Gazee )
if ( Trig_Gaze_c_Func010C() ) then
call IssueImmediateOrderBJ( udg_Gazer, "stop" )
set udg_Gazee = null
set udg_Gazer = null
call DisableTrigger( GetTriggeringTrigger() )
else
endif
if ( Trig_Gaze_c_Func011C() ) then
call IssueImmediateOrderBJ( udg_Gazer, "stop" )
set udg_Gazee = null
set udg_Gazer = null
call DisableTrigger( GetTriggeringTrigger() )
else
endif
if ( Trig_Gaze_c_Func012C() ) then
call IssueImmediateOrderBJ( udg_Gazer, "stop" )
set udg_Gazee = null
set udg_Gazer = null
call DisableTrigger( GetTriggeringTrigger() )
else
endif
endfunction
//===========================================================================
function InitTrig_Gaze_c takes nothing returns nothing
set gg_trg_Gaze_c = CreateTrigger( )
call DisableTrigger( gg_trg_Gaze_c )
call TriggerRegisterTimerEventPeriodic( gg_trg_Gaze_c, 1.00 )
call TriggerAddAction( gg_trg_Gaze_c, function Trig_Gaze_c_Actions )
endfunction
//===========================================================================
// Trigger: Gaze d
//===========================================================================
function Trig_Gaze_d_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AW' ) ) then
return false
endif
return true
endfunction
function Trig_Gaze_d_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Gaze_c )
endfunction
//===========================================================================
function InitTrig_Gaze_d takes nothing returns nothing
set gg_trg_Gaze_d = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Gaze_d, EVENT_PLAYER_UNIT_SPELL_ENDCAST )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Gaze_d, EVENT_PLAYER_UNIT_SPELL_FINISH )
call TriggerAddCondition( gg_trg_Gaze_d, Condition( function Trig_Gaze_d_Conditions ) )
call TriggerAddAction( gg_trg_Gaze_d, function Trig_Gaze_d_Actions )
endfunction
//===========================================================================
// Trigger: Gaze e
//===========================================================================
function Trig_Gaze_e_Func003C takes nothing returns boolean
if ( ( GetDyingUnit() == udg_Gazee ) ) then
return true
endif
if ( ( GetDyingUnit() == udg_Gazer ) ) then
return true
endif
return false
endfunction
function Trig_Gaze_e_Conditions takes nothing returns boolean
if ( not Trig_Gaze_e_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Gaze_e_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Gaze_c )
call IssueImmediateOrderBJ( udg_Gazer, "stop" )
endfunction
//===========================================================================
function InitTrig_Gaze_e takes nothing returns nothing
set gg_trg_Gaze_e = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Gaze_e, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Gaze_e, Condition( function Trig_Gaze_e_Conditions ) )
call TriggerAddAction( gg_trg_Gaze_e, function Trig_Gaze_e_Actions )
endfunction
//===========================================================================
// Trigger: mekansm
//===========================================================================
function Trig_Boomboom_Conditions takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttackedUnitBJ(), 'mnst') == true ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetAttackedUnitBJ()) == false ) ) then
return false
endif
return true
endfunction
function Trig_Boomboom_Actions takes nothing returns nothing
local integer rand = GetRandomInt(1,100)
local unit target = GetTriggerUnit()
local effect shield
if (rand < 7) then
call DisableTrigger( GetTriggeringTrigger() )
call AddSpecialEffectTargetUnitBJ( "origin", target, "Abilities\\Spells\\Human\\DivineShield\\DivineShieldTarget.mdl" )
set shield = GetLastCreatedEffectBJ()
call SetUnitInvulnerable( target, true )
call TriggerSleepAction( 2 )
call DestroyEffect(shield)
set shield = null
call SetUnitInvulnerable( target, false )
call TriggerSleepAction( 1.2 )
call EnableTrigger( GetTriggeringTrigger() )
endif
endfunction
//===========================================================================
function InitTrig_mekansm takes nothing returns nothing
set gg_trg_mekansm = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_mekansm, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_mekansm, Condition( function Trig_Boomboom_Conditions ) )
call TriggerAddAction( gg_trg_mekansm, function Trig_Boomboom_Actions )
endfunction
//===========================================================================
// Trigger: Stoneform
//===========================================================================
function Trig_Stoneform_Func003C takes nothing returns boolean
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("defend") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("undefend") ) ) then
return true
endif
return false
endfunction
function Trig_Stoneform_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0EU', GetTriggerUnit()) > 0 ) ) then
return false
endif
if ( not Trig_Stoneform_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Stoneform_Func002C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("defend") ) ) then
return false
endif
return true
endfunction
function Trig_Stoneform_Actions takes nothing returns nothing
if ( Trig_Stoneform_Func002C() ) then
call UnitAddAbilityBJ( 'A0EV', GetTriggerUnit() )
call SetUnitAbilityLevelSwapped( 'A0EV', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A0EU', GetTriggerUnit()) )
else
call UnitRemoveAbilityBJ( 'A0EV', GetTriggerUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Stoneform takes nothing returns nothing
set gg_trg_Stoneform = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Stoneform, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Stoneform, Condition( function Trig_Stoneform_Conditions ) )
call TriggerAddAction( gg_trg_Stoneform, function Trig_Stoneform_Actions )
endfunction
//===========================================================================
// Trigger: Roar
//===========================================================================
function Trig_Roar_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'B03Z') == true ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A0ET', GetTriggerUnit()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Roar_Actions takes nothing returns nothing
local integer rand = GetRandomInt(1,100)
call TriggerSleepAction( ( DistanceBetweenPoints(GetUnitLoc(GetAttacker()), GetUnitLoc(GetAttackedUnitBJ())) / 1000.00 ) )
if (rand <= ( 12 * GetUnitAbilityLevelSwapped('A0ET', GetAttacker()) ) ) then
set rand = GetRandomInt(1,10)
if (rand <= 6) then
call UnitDamageTargetBJ( GetAttacker(), GetAttackedUnitBJ(), 125.00, ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
else
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetAttacker()), GetUnitLoc(GetAttackedUnitBJ()), GetUnitLoc(GetAttackedUnitBJ()) )
call UnitAddAbilityBJ( 'A04U', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A04U', GetLastCreatedUnit(), 2)
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", GetAttackedUnitBJ() )
endif
endif
endfunction
//===========================================================================
function InitTrig_Roar takes nothing returns nothing
set gg_trg_Roar = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Roar, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Roar, Condition( function Trig_Roar_Conditions ) )
call TriggerAddAction( gg_trg_Roar, function Trig_Roar_Actions )
endfunction
//===========================================================================
// Trigger: Disarm
//===========================================================================
function Trig_Disarm_Func003C takes nothing returns boolean
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetSpellTargetUnit(), 1)) != GetItemTypeId(null) ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetSpellTargetUnit(), 2)) != GetItemTypeId(null) ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetSpellTargetUnit(), 3)) != GetItemTypeId(null) ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetSpellTargetUnit(), 4)) != GetItemTypeId(null) ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetSpellTargetUnit(), 5)) != GetItemTypeId(null) ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetSpellTargetUnit(), 6)) != GetItemTypeId(null) ) ) then
return true
endif
return false
endfunction
function Trig_Disarm_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0ES' ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(GetSpellTargetUnit(), 'B03Y') == false ) ) then
return false
endif
if ( not Trig_Disarm_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Disarm_Actions takes nothing returns nothing
local unit target = GetSpellTargetUnit()
local player owned = GetOwningPlayer(target)
local integer wait = (3 + (2 * GetUnitAbilityLevelSwapped('A0ES', GetTriggerUnit()) ) )
local integer random
loop
set random = GetRandomInt(1,6)
if ( ( GetItemTypeId(UnitItemInSlotBJ(target, random)) != GetItemTypeId(null) ) ) then
set udg_DisarmRestore[GetConvertedPlayerId(owned)] = GetItemTypeId(UnitItemInSlotBJ(target, random) )
set udg_DisarmRestoreNum[GetConvertedPlayerId(owned)] = GetItemCharges(UnitItemInSlotBJ(target, random))
call RemoveItem( UnitItemInSlotBJ(target, random) )
exitwhen (1 == 1)
endif
endloop
call PolledWait (wait)
if ( IsUnitDeadBJ(target) == false ) then
call UnitAddItemByIdSwapped( udg_DisarmRestore[GetConvertedPlayerId(owned)], target )
call SetItemCharges( GetLastCreatedItem(), udg_DisarmRestoreNum[GetConvertedPlayerId(owned)] )
set udg_DisarmRestore[GetConvertedPlayerId(owned)] = GetItemTypeId(null)
set udg_DisarmRestoreNum[GetConvertedPlayerId(owned)] = 0
endif
endfunction
//===========================================================================
function InitTrig_Disarm takes nothing returns nothing
set gg_trg_Disarm = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Disarm, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Disarm, Condition( function Trig_Disarm_Conditions ) )
call TriggerAddAction( gg_trg_Disarm, function Trig_Disarm_Actions )
endfunction
//===========================================================================
// Trigger: Grow
//===========================================================================
function Trig_Grow_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0C1' ) ) then
return false
endif
return true
endfunction
function Trig_Grow_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0C1', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Grow_Func003C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0C1', GetTriggerUnit()) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Grow_Func004C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0C1', GetTriggerUnit()) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Grow_Actions takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'A0C2', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A0C1', GetTriggerUnit()) )
if ( Trig_Grow_Func002C() ) then
call UnitAddAbilityBJ( 'S000', GetTriggerUnit() )
else
endif
if ( Trig_Grow_Func003C() ) then
call UnitRemoveAbilityBJ( 'S000', GetTriggerUnit() )
call UnitAddAbilityBJ( 'S001', GetTriggerUnit() )
else
endif
if ( Trig_Grow_Func004C() ) then
call UnitRemoveAbilityBJ( 'S001', GetTriggerUnit() )
call UnitAddAbilityBJ( 'S006', GetTriggerUnit() )
else
endif
endfunction
//===========================================================================
function InitTrig_Grow takes nothing returns nothing
set gg_trg_Grow = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Grow, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Grow, Condition( function Trig_Grow_Conditions ) )
call TriggerAddAction( gg_trg_Grow, function Trig_Grow_Actions )
endfunction
//===========================================================================
// Trigger: Divine Intervention
//===========================================================================
function Trig_Divine_Intervention_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0D5' ) ) then
return false
endif
return true
endfunction
function Trig_Divine_Intervention_Func001Func003C takes nothing returns boolean
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(1) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(2) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(3) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(4) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(5) ) ) then
return true
endif
return false
endfunction
function Trig_Divine_Intervention_Func001C takes nothing returns boolean
if ( not Trig_Divine_Intervention_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Divine_Intervention_Actions takes nothing returns nothing
if ( Trig_Divine_Intervention_Func001C() ) then
set udg_TeamReincarnation[1] = ( udg_TeamReincarnation[1] + 1 )
else
set udg_TeamReincarnation[2] = ( udg_TeamReincarnation[2] + 1 )
endif
endfunction
//===========================================================================
function InitTrig_Divine_Intervention takes nothing returns nothing
set gg_trg_Divine_Intervention = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Divine_Intervention, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Divine_Intervention, Condition( function Trig_Divine_Intervention_Conditions ) )
call TriggerAddAction( gg_trg_Divine_Intervention, function Trig_Divine_Intervention_Actions )
endfunction
//===========================================================================
// Trigger: Rupture
//===========================================================================
function Trig_Rupture_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0EE' ) ) then
return false
endif
return true
endfunction
function Trig_Rupture_Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0EE', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Rupture_Actions takes nothing returns nothing
if ( Trig_Rupture_Func001C() ) then
call UnitAddAbilityBJ( 'A0EI', GetTriggerUnit() )
else
call IncUnitAbilityLevelSwapped( 'A0EI', GetTriggerUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Rupture takes nothing returns nothing
set gg_trg_Rupture = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Rupture, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Rupture, Condition( function Trig_Rupture_Conditions ) )
call TriggerAddAction( gg_trg_Rupture, function Trig_Rupture_Actions )
endfunction
//===========================================================================
// Trigger: Bleed
//===========================================================================
function Trig_Bleed_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0E8' ) ) then
return false
endif
return true
endfunction
function Trig_Bleed_Actions takes nothing returns nothing
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetUnitLoc(GetSpellTargetUnit()) )
call UnitAddAbilityBJ( 'A0EF', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A0EF', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0E8', GetSpellAbilityUnit()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "acidbomb", GetSpellTargetUnit() )
endfunction
//===========================================================================
function InitTrig_Bleed takes nothing returns nothing
set gg_trg_Bleed = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Bleed, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
call TriggerAddCondition( gg_trg_Bleed, Condition( function Trig_Bleed_Conditions ) )
call TriggerAddAction( gg_trg_Bleed, function Trig_Bleed_Actions )
endfunction
//===========================================================================
// Trigger: Bleed two
//===========================================================================
function Trig_Bleed_two_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0E8' ) ) then
return false
endif
return true
endfunction
function Trig_Bleed_two_Func003001002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B03Q') == true )
endfunction
function Trig_Bleed_two_Func003A takes nothing returns nothing
call UnitRemoveBuffBJ( 'B03Q', GetEnumUnit() )
endfunction
function Trig_Bleed_two_Actions takes nothing returns nothing
call TriggerSleepAction( 5.00 )
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Bleed_two_Func003001002)), function Trig_Bleed_two_Func003A )
endfunction
//===========================================================================
function InitTrig_Bleed_two takes nothing returns nothing
set gg_trg_Bleed_two = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Bleed_two, EVENT_PLAYER_UNIT_SPELL_ENDCAST )
call TriggerAddCondition( gg_trg_Bleed_two, Condition( function Trig_Bleed_two_Conditions ) )
call TriggerAddAction( gg_trg_Bleed_two, function Trig_Bleed_two_Actions )
endfunction
//===========================================================================
// Trigger: Wounding Spear
//===========================================================================
function Trig_Wither_New_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0ED', GetAttacker()) > 0 ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( GetHandleInt(GetAttackedUnitBJ(), "wq") >= GetUnitLevel(GetAttacker())) then
return false
endif
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "current quota = "+I2S(GetHandleInt(GetAttackedUnitBJ(), "wq")) )
return true
endfunction
function WitherUnit takes handle h returns unit
return GetHandleHandle(h,"witherunit")
endfunction
function WitherDry takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
call TriggerSleepAction(1.5)
loop
exitwhen UnitHasBuffBJ(WitherUnit(t),'B03G')==false
call TriggerSleepAction(1)
endloop
loop
exitwhen IsUnitDeadBJ(WitherUnit(t))==false
call TriggerSleepAction(1)
endloop
call GroupRemoveUnit(udg_WitherGroup, WitherUnit(t))
call ModifyHeroStat( bj_HEROSTAT_STR, WitherUnit(t), bj_MODIFYMETHOD_ADD, GetHandleInt(WitherUnit(t),"wq" ))
call SetHandleInt(WitherUnit(t),"wq",0)
call FlushHandleLocals(WitherUnit(t))
call FlushHandleLocals(t)
call DestroyTrigger(t)
set t=null
endfunction
function StartWither takes unit target returns nothing
local trigger t=CreateTrigger()
call TriggerAddAction(t,function WitherDry)
call SetHandleHandle(t,"witherunit",target)
call TriggerExecute(t)
set t=null
endfunction
function Trig_Wither_New_Actions takes nothing returns nothing
local integer quota=GetHandleInt(GetAttackedUnitBJ(), "wq")
local integer drain=GetUnitAbilityLevelSwapped('A0ED', GetAttacker())
if IsUnitInGroup(GetAttackedUnitBJ(), udg_WitherGroup)==false then
call StartWither(GetAttackedUnitBJ())
call GroupAddUnit(udg_WitherGroup, GetAttackedUnitBJ())
endif
loop
exitwhen quota==GetUnitLevel(GetAttacker()) or drain==0
if GetHeroStr(GetAttackedUnitBJ(),false) != 1 then
call ModifyHeroStat( bj_HEROSTAT_STR, GetAttackedUnitBJ(), bj_MODIFYMETHOD_SUB, 1 )
set quota=quota+1
endif
set drain=drain-1
endloop
call SetHandleInt(GetAttackedUnitBJ(),"wq", quota)
//
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "witherquota = " +I2S(GetHandleInt(GetAttackedUnitBJ(), "wq")) )
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "ability level = "+I2S( GetUnitAbilityLevelSwapped('A005', udg_ShadowFiend) ))
endfunction
//===========================================================================
function InitTrig_Wounding_Spear takes nothing returns nothing
set gg_trg_Wounding_Spear = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Wounding_Spear, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Wounding_Spear, Condition( function Trig_Wither_New_Conditions ) )
call TriggerAddAction( gg_trg_Wounding_Spear, function Trig_Wither_New_Actions )
endfunction
//===========================================================================
// Trigger: Backstab
//===========================================================================
function Trig_Backstab_Func004C takes nothing returns boolean
if ( ( RAbsBJ(( GetUnitFacing(GetAttackedUnitBJ()) - GetUnitFacing(GetAttacker()) )) <= 105.00 ) ) then
return true
endif
return false
endfunction
function Trig_Backstab_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0DZ', GetAttacker()) > 0 ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
if ( not Trig_Backstab_Func004C() ) then
return false
endif
return true
endfunction
function Trig_Backstab_Actions takes nothing returns nothing
local texttag x=null
call UnitDamageTargetBJ( GetAttacker(), GetAttackedUnitBJ(), ( ( 0.20 * I2R(GetUnitAbilityLevelSwapped('A0DZ', GetAttacker())) ) * I2R(GetHeroStatBJ(bj_HEROSTAT_AGI, GetAttacker(), true)) ), ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
call AddSpecialEffectTargetUnitBJ( "chest", GetAttackedUnitBJ(), "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl" )
call TriggerExecute( gg_trg_DestroyFX )
call CreateTextTagUnitBJ( "TRIGSTR_035", GetAttacker(), 16.00, 8.75, 100, 20.00, 20.00, 30.00 )
set x=GetLastCreatedTextTag()
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call TriggerSleepAction( 1.50 )
call DestroyTextTagBJ( x)
set x=null
endfunction
//===========================================================================
function InitTrig_Backstab takes nothing returns nothing
set gg_trg_Backstab = CreateTrigger( )
call DisableTrigger( gg_trg_Backstab )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Backstab, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Backstab, Condition( function Trig_Backstab_Conditions ) )
call TriggerAddAction( gg_trg_Backstab, function Trig_Backstab_Actions )
endfunction
//===========================================================================
// Trigger: Smoke Screen
//===========================================================================
function Trig_Smoke_Screen_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'e003' ) ) then
return false
endif
return true
endfunction
function Trig_Smoke_Screen_Func001C takes nothing returns boolean
if ( not ( GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())) < 7 ) ) then
return false
endif
return true
endfunction
function Trig_Smoke_Screen_Actions takes nothing returns nothing
if ( Trig_Smoke_Screen_Func001C() ) then
call SetUnitScalePercent( GetSummonedUnit(), ( 83.00 + ( 17.00 * I2R(GetUnitAbilityLevelSwapped('A0E6', GetSummoningUnit())) ) ), ( 83.00 + ( 17.00 * I2R(GetUnitAbilityLevelSwapped('A0E6', GetSummoningUnit())) ) ), ( 83.00 + ( 17.00 * I2R(GetUnitAbilityLevelSwapped('A0E6', GetSummoningUnit())) ) ) )
call UnitAddAbilityBJ( 'A0E7', GetSummonedUnit() )
call SetUnitAbilityLevelSwapped( 'A0E7', GetSummonedUnit(), GetUnitAbilityLevelSwapped('A0E6', GetSummoningUnit()) )
set udg_TempLoc = GetUnitLoc(GetSummonedUnit())
call IssuePointOrderLocBJ( GetSummonedUnit(), "cloudoffog", udg_TempLoc )
call RemoveLocation(udg_TempLoc)
else
call SetUnitScalePercent( GetSummonedUnit(), ( 83.00 + ( 17.00 * I2R(GetUnitAbilityLevelSwapped('A0E6', GetSummoningUnit())) ) ), ( 83.00 + ( 17.00 * I2R(GetUnitAbilityLevelSwapped('A0E6', GetSummoningUnit())) ) ), ( 83.00 + ( 17.00 * I2R(GetUnitAbilityLevelSwapped('A0E6', GetSummoningUnit())) ) ) )
call UnitAddAbilityBJ( 'A019', GetSummonedUnit() )
call SetUnitAbilityLevelSwapped( 'A019', GetSummonedUnit(), GetUnitAbilityLevelSwapped('A0E6', GetSummoningUnit()) )
set udg_TempLoc = GetUnitLoc(GetSummonedUnit())
call IssuePointOrderLocBJ( GetSummonedUnit(), "cloudoffog", udg_TempLoc )
call RemoveLocation(udg_TempLoc)
endif
endfunction
//===========================================================================
function InitTrig_Smoke_Screen takes nothing returns nothing
set gg_trg_Smoke_Screen = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Smoke_Screen, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Smoke_Screen, Condition( function Trig_Smoke_Screen_Conditions ) )
call TriggerAddAction( gg_trg_Smoke_Screen, function Trig_Smoke_Screen_Actions )
endfunction
//===========================================================================
// Trigger: Culling Blade
//===========================================================================
function Trig_Culling_Blade_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0E2' ) ) then
return false
endif
return true
endfunction
function Trig_Culling_Blade_Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0E2', GetSpellAbilityUnit()) == 1 ) ) then
return false
endif
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) <= 175.00 ) ) then
return false
endif
return true
endfunction
function Trig_Culling_Blade_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0E2', GetSpellAbilityUnit()) == 2 ) ) then
return false
endif
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) <= 290.00 ) ) then
return false
endif
return true
endfunction
function Trig_Culling_Blade_Func003C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0E2', GetSpellAbilityUnit()) == 3 ) ) then
return false
endif
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) <= 400.00 ) ) then
return false
endif
return true
endfunction
function Trig_Culling_Blade_Actions takes nothing returns nothing
if ( Trig_Culling_Blade_Func001C() ) then
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call UnitDamageTargetBJ( GetLastCreatedUnit(), GetSpellTargetUnit(), 100000000.00, ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL )
else
endif
if ( Trig_Culling_Blade_Func002C() ) then
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), 100000000.00, ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL )
else
endif
if ( Trig_Culling_Blade_Func003C() ) then
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), 100000000.00, ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
//===========================================================================
function InitTrig_Culling_Blade takes nothing returns nothing
set gg_trg_Culling_Blade = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Culling_Blade, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Culling_Blade, Condition( function Trig_Culling_Blade_Conditions ) )
call TriggerAddAction( gg_trg_Culling_Blade, function Trig_Culling_Blade_Actions )
endfunction
//===========================================================================
// Trigger: Revenants
//===========================================================================
function Trig_Revenants_Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetSummonedUnit()) == 'u003' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetSummonedUnit()) == 'u005' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetSummonedUnit()) == 'u009' ) ) then
return true
endif
return false
endfunction
function Trig_Revenants_Conditions takes nothing returns boolean
if ( not Trig_Revenants_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Revenants_Actions takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'A0E0', GetSummonedUnit(), GetUnitAbilityLevelSwapped('A07K', GetSummoningUnit()) )
endfunction
//===========================================================================
function InitTrig_Revenants takes nothing returns nothing
set gg_trg_Revenants = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Revenants, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Revenants, Condition( function Trig_Revenants_Conditions ) )
call TriggerAddAction( gg_trg_Revenants, function Trig_Revenants_Actions )
endfunction
//===========================================================================
// Trigger: Soul Assumption
//===========================================================================
function Trig_Soul_Assumption_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'ndr1' ) ) then
return false
endif
return true
endfunction
function Trig_Soul_Assumption_Func001001002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A0C4', GetFilterUnit()) != 0 )
endfunction
function Trig_Soul_Assumption_Func001A takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), ( ( 10.00 * I2R(GetUnitAbilityLevelSwapped('A0C4', GetEnumUnit())) ) + GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) ) )
endfunction
function Trig_Soul_Assumption_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerMatching(GetOwningPlayer(GetEnteringUnit()), Condition(function Trig_Soul_Assumption_Func001001002)), function Trig_Soul_Assumption_Func001A )
endfunction
//===========================================================================
function InitTrig_Soul_Assumption takes nothing returns nothing
set gg_trg_Soul_Assumption = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Soul_Assumption, GetPlayableMapRect() )
call TriggerAddCondition( gg_trg_Soul_Assumption, Condition( function Trig_Soul_Assumption_Conditions ) )
call TriggerAddAction( gg_trg_Soul_Assumption, function Trig_Soul_Assumption_Actions )
endfunction
//===========================================================================
// Trigger: Grave Chill
//===========================================================================
function Trig_Grave_Chill_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08X' ) ) then
return false
endif
return true
endfunction
function Trig_Grave_Chill_Actions takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetSpellAbilityUnit()), udg_TempLoc, udg_TempLoc )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A09C', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A09C', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A08X', GetSpellAbilityUnit()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "bloodlust", GetSpellAbilityUnit() )
endfunction
//===========================================================================
function InitTrig_Grave_Chill takes nothing returns nothing
set gg_trg_Grave_Chill = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Grave_Chill, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Grave_Chill, Condition( function Trig_Grave_Chill_Conditions ) )
call TriggerAddAction( gg_trg_Grave_Chill, function Trig_Grave_Chill_Actions )
endfunction
//===========================================================================
// Trigger: DestroyFX
//===========================================================================
function Trig_DestroyFX_Actions takes nothing returns nothing
local effect f=bj_lastCreatedEffect
call TriggerSleepAction( 1.00 )
call DestroyEffect(f)
set f=null
endfunction
//===========================================================================
function InitTrig_DestroyFX takes nothing returns nothing
set gg_trg_DestroyFX = CreateTrigger( )
call TriggerAddAction( gg_trg_DestroyFX, function Trig_DestroyFX_Actions )
endfunction
//===========================================================================
// Trigger: TossUnit
//===========================================================================
function Trig_TossUnit_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0BZ' ) ) then
return false
endif
return true
endfunction
function TossFilter takes nothing returns boolean
if IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) then
return false
elseif IsUnitType(GetFilterUnit(), UNIT_TYPE_FLYING) then
return false
elseif GetFilterUnit() == GetSpellAbilityUnit() then
return false
elseif IsUnitDeadBJ(GetFilterUnit()) then
return false
elseif IsUnitType(GetTriggerUnit(), UNIT_TYPE_ANCIENT) then
return false
elseif IsUnitVisible(GetFilterUnit(), GetOwningPlayer(GetSpellAbilityUnit())) == false then
return false
elseif GetUnitAbilityLevelSwapped('A04R', GetFilterUnit()) != 0 then
return false
endif
return true
endfunction
function Tree_Killer1 takes nothing returns nothing
call KillDestructable( GetEnumDestructable() )
endfunction
function TossFX takes nothing returns nothing
local effect f= bj_lastCreatedEffect
call TriggerSleepAction(0.4)
call DestroyEffect(f)
set f=null
endfunction
function TossMove takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit u=GetC(t,"t")
local real b=GetHandleReal(t,"r")
local real n=GetHandleReal(t,"n")
local real d=GetHandleReal(t,"d")
local location l=GetL(t,"l")
local real x=-d+(d*(b/50))
local location m=PolarProjectionBJ(l,x,n)
local real y=((b-25)*(b-25))
call SetUnitPositionLoc(u,m)
call SetUnitFlyHeight( u, ( 775-y ) , 10000.00 )
if GetRandomInt(1,4)==2 then
call AddSpecialEffectTargetUnitBJ( "origin", u, "Abilities\\Spells\\Undead\\Cripple\\CrippleTarget.mdl" )
call TriggerExecute(gg_trg_DestroyFX)
endif
//call DestroyEffect(AddSpellEffectTargetById('A0BZ', EFFECT_TYPE_SPECIAL , u,"origin" ))
set b=b+1
call SetHandleReal(t,"r",b)
set t=null
set u=null
set b=0
set n=0
set d=0
set l=null
set x=0
call RemoveLocation(m)
set m=null
set y=0
endfunction
function Trig_TossUnit_Actions takes nothing returns nothing
local group g=CreateGroup()
local unit c=GetTriggerUnit()
local unit a=null
local location l=GetSpellTargetLoc()
local timer t=null
local real b=1
local real d=0
local real n=0
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),275,Condition(function TossFilter))
set a=GroupPickRandomUnit(g)
call GroupClear(g)
if a!=null then
call SetUnitAnimationByIndex(c,4)
call PauseUnitBJ( true, a )
call SetUnitPathing( a, false )
call SetUnitFacingToFaceLocTimed( a, l, 0 )
call UnitAddAbilityBJ( 'AEme', a )
call UnitRemoveAbilityBJ( 'AEme', a )
set t=CreateTimer()
call SetHandleHandle(t,"t",a)
call SetHandleReal(t,"r",b)
set d=ImpDist(GetUnitX(c),GetUnitY(c),GetLocationX(l),GetLocationY(l))
set n=Angle2Points(GetUnitX(c),GetUnitY(c),GetLocationX(l),GetLocationY(l))
call SetHandleReal(t,"d",d)
call SetHandleReal(t,"n",n)
call SetHandleHandle(t,"l",l)
call TimerStart(t,0.02,true,function TossMove)
call PolledWait(1.0)
call RemoveLocation(l)
set l=GetL(t,"l")
call RemoveLocation(l)
call FlushHandleLocals(t)
call DestroyTimer(t)
call SetUnitFlyHeightBJ( a, GetUnitDefaultFlyHeight(a), 10000.00 )
call PauseUnitBJ( false, a )
call SetUnitPathing( a, true )
set l=GetUnitLoc(a)
call DestroyEffect(AddSpellEffectByIdLoc('A0BZ', EFFECT_TYPE_TARGET, l))
call TerrainDeformationRippleBJ( 0.2, true, l, 1.00, 300.00, 96.00, 1, 64.00 )
call UnitDamageTargetBJ( c, a, 38.00 * I2R(GetUnitAbilityLevelSwapped('A0BZ', c)) , ATTACK_TYPE_NORMAL, DAMAGE_TYPE_DEMOLITION )
call DamageEnemyArea1(c, GetUnitX(a),GetUnitY(a), 300 , 75.00 * I2R(GetUnitAbilityLevelSwapped('A0BZ', c)) ,'A0BZ')
call EnumDestructablesInCircleBJ( 300,l , function Tree_Killer1 )
endif
call DestroyGroup(g)
set g=null
set c=null
set a=null
call RemoveLocation(l)
set l=null
set t=null
set b=0
set n=0
set d=0
endfunction
//===========================================================================
function InitTrig_TossUnit takes nothing returns nothing
set gg_trg_TossUnit = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_TossUnit, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_TossUnit, Condition( function Trig_TossUnit_Conditions ) )
call TriggerAddAction( gg_trg_TossUnit, function Trig_TossUnit_Actions )
endfunction
//===========================================================================
// Trigger: six orb Copy
//===========================================================================
function FlameOrbUpgrade takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'A0BT', GetEnumUnit(), GetUnitAbilityLevelSwapped('A0DR', GetLearningUnit()) )
endfunction
function Trig_Generator_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0DR' ) ) then
return false
endif
set bj_groupLastCreatedDest=GetUnitsOfTypeIdAll('e00F')
call ForGroupBJ( bj_groupLastCreatedDest , function FlameOrbUpgrade )
call DestroyGroup(bj_groupLastCreatedDest)
set bj_groupLastCreatedDest=null
if ( GetUnitAbilityLevelSwapped('A0DR', GetLearningUnit()) !=1 ) then
return false
endif
return true
endfunction
function GetTimer takes trigger t,string s returns timer
return GetHandleHandle(t,s)
endfunction
function GetUnit takes trigger t, string s returns unit
return GetHandleHandle(t,s)
endfunction
function GetOrbitAngle takes timer t , string s returns real
return GetHandleReal(t,s)
endfunction
function GetGenerator takes timer t, string s returns unit
return GetHandleHandle(t,s)
endfunction
function Generator_Orbit takes nothing returns nothing
local timer t=GetExpiredTimer()
local real o=GetOrbitAngle(t,"o")
call SetUnitX(GetC(t,"g"),GetUnitX(GetC(t,"c"))+InstanceGetMemberReal("so","r")*udg_orb_cos[R2I(o)])
call SetUnitY(GetC(t,"g"),GetUnitY(GetC(t,"c"))+InstanceGetMemberReal("so","r")*udg_orb_sin[R2I(o)])
if o >= 0x059 then
set o=0
else
set o=o+0x01
endif
call SetHandleReal(t, "o",o)
set o=0
set t=null
endfunction
function Radius_Change_Conditions takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("manashieldon") or GetIssuedOrderIdBJ() == String2OrderIdBJ("manashieldoff") or GetTriggerEventId()==EVENT_UNIT_DEATH ) ) then
return false
endif
return true
endfunction
function Radius_Timer takes nothing returns nothing
local real r=InstanceGetMemberReal("so","r")
if InstanceGetMemberReal("so","rI")==2 then
if r<0x02ee then
set r=r+0x05
call InstanceSetMemberReal("so","r",r)
else
call InstanceSetMemberReal("so","rI",1)
endif
elseif InstanceGetMemberReal("so","rI")==1 then
if r>0x096 then
set r=r-0x05
call InstanceSetMemberReal("so","r",r)
else
call InstanceSetMemberReal("so","rI",2)
endif
endif
set r=0
endfunction
function Radius_Change_Actions takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local timer i
if GetIssuedOrderIdBJ() == String2OrderIdBJ("manashieldon") then
set i = CreateTimer()
call SetHandleHandle(t,"radiustimer",i)
call TimerStart(i, 0.04, true, function Radius_Timer)
else
call DestroyTimer(GetTimer(t,"radiustimer"))
call FlushHandleLocals(t)
endif
set i=null
set t=null
endfunction
function GunControl takes nothing returns nothing
local trigger tr=GetTriggeringTrigger()
local unit gen=GetUnit(tr,"generator")
//call PingMinimapLocForForce( GetPlayersAll(), GetUnitLoc(gen), 1 )
if (GetTriggerEventId()==EVENT_UNIT_DEATH) then
call ShowUnit( gen ,false)
else
call ShowUnit( gen,true )
call UnitRemoveAbility(gen, 'Aloc')
call UnitAddAbility(gen,'Aloc')
endif
set tr=null
set gen=null
endfunction
function flameorb takes unit caster, real startangle returns nothing
local timer t=CreateTimer()
local trigger tr=CreateTrigger()
local location l=GetUnitLoc(caster)
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00F', GetOwningPlayer(caster), l, l )
call SetUnitFacing(GetLastCreatedUnit(),90)
call SetHandleReal(t,"o",startangle/4)
call SetHandleHandle(t, "g", GetLastCreatedUnit())
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "holdposition" )
call RemoveGuardPosition( GetLastCreatedUnit() )
call SetHandleHandle(t,"c", GetTriggerUnit())
call SetHandleHandle(tr,"generator",GetLastCreatedUnit())
call TimerStart(t, 0.025, true, function Generator_Orbit)
call TriggerRegisterUnitEvent( tr, caster, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( tr, caster, EVENT_UNIT_HERO_REVIVE_FINISH )
call TriggerAddAction(tr,function GunControl)
call RemoveLocation(l)
set l=null
set t=null
set tr=null
endfunction
function Trig_Generator_Actions takes nothing returns nothing
local trigger t=CreateTrigger()
local integer counter=0
local real sub=0
loop
exitwhen counter>89
set udg_orb_cos[counter]=CosBJ(4*sub)
set udg_orb_sin[counter]=SinBJ(4*sub)
set sub=sub+1
set counter=counter+1
endloop
call InstanceSetMemberReal("so","r",150)
call InstanceSetMemberReal("so","rI",2)
call flameorb(GetTriggerUnit(),0)
call flameorb(GetTriggerUnit(),72)
call flameorb(GetTriggerUnit(),144)
call flameorb(GetTriggerUnit(),216)
call flameorb(GetTriggerUnit(),288)
//call flameorb(GetTriggerUnit(),150)
call TriggerRegisterUnitEvent( t, GetTriggerUnit(), EVENT_UNIT_ISSUED_ORDER )
call TriggerRegisterUnitEvent( t, GetTriggerUnit(), EVENT_UNIT_DEATH )
call TriggerAddCondition(t,Condition(function Radius_Change_Conditions))
call TriggerAddAction(t,function Radius_Change_Actions)
set t=null
set counter=0
set sub=0
endfunction
//===========================================================================
function InitTrig_six_orb_Copy takes nothing returns nothing
set gg_trg_six_orb_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_six_orb_Copy, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_six_orb_Copy, Condition( function Trig_Generator_Conditions ) )
call TriggerAddAction( gg_trg_six_orb_Copy, function Trig_Generator_Actions )
endfunction
//===========================================================================
// Trigger: Impetus
//===========================================================================
function Trig_Impetus_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0DY' ) ) then
return false
endif
return true
endfunction
function Impetus_Damage takes nothing returns nothing
local texttag g
local real d
local trigger t=GetTriggeringTrigger()
if UnitHasBuffBJ(GetTriggerUnit(), 'B03U') == true and GetUnitAbilityLevel( GetEventDamageSource(), 'A0DY' )>0 then
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "Applying Damage" )
call DestroyTrigger(t)
set d=0.04*I2R(GetUnitAbilityLevel( GetEventDamageSource(), 'A0DY' ))*ImpDist(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetUnitX(GetEventDamageSource()),GetUnitY(GetEventDamageSource()) )
set g=CreateTextTagUnitBJ(I2S(R2I(d+GetEventDamage())), GetTriggerUnit(), 64 , 10 , 1 , 85 , 86 , 15 )
call SetTextTagVelocityBJ( g, 64, 90 )
call UnitDamageTargetBJ( GetEventDamageSource(), GetTriggerUnit(), d, ATTACK_TYPE_HERO, DAMAGE_TYPE_DIVINE )
call TriggerSleepAction(1)
call DestroyTextTagBJ( g )
endif
set d=0
set g=null
set t=null
endfunction
function Impetus_Condition takes nothing returns boolean
if GetTriggerEventId() == EVENT_PLAYER_UNIT_ATTACKED then
if GetUnitAbilityLevel( GetAttacker(), 'A0DY' ) == 0 then
return false
elseif GetHandleInt(GetAttacker(),"impetuson")==1 then
if IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false then
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "Unit is Attacking" )
return true
endif
else
return false
endif
elseif GetTriggerEventId() == EVENT_UNIT_ISSUED_ORDER then
if GetIssuedOrderId() == OrderId("poisonarrows") then
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "Impetus on" )
call SetHandleInt( GetTriggerUnit(), "impetuson", 1)
elseif GetIssuedOrderId() == OrderId("unpoisonarrows") then
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "Impetus off" )
call SetHandleInt( GetTriggerUnit(), "impetuson", 0)
endif
elseif GetTriggerEventId() == EVENT_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()== 'A0DY' then
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "Unit Spell Effect" )
return true
else
return false
endif
endif
return false
endfunction
function Impetus_Actions takes nothing returns nothing
local trigger r=CreateTrigger()
local unit t
if GetTriggerEventId() == EVENT_UNIT_SPELL_EFFECT then
set t=GetSpellTargetUnit()
else
set t=GetAttackedUnitBJ()
endif
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "Creating Damage Trigger" )
call TriggerRegisterUnitEvent( r, t, EVENT_UNIT_DAMAGED )
call TriggerAddAction(r,function Impetus_Damage)
call TriggerSleepAction(2)
call DestroyTrigger(r)
set r=null
set t=null
endfunction
function Trig_Impetus_Actions takes nothing returns nothing
local trigger r=GetTriggeringTrigger()
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterUnitEvent( t, GetLearningUnit(), EVENT_UNIT_SPELL_EFFECT )
call TriggerRegisterUnitEvent( t, GetLearningUnit(), EVENT_UNIT_ISSUED_ORDER )
call TriggerAddCondition(t, Condition(function Impetus_Condition) )
call TriggerAddAction(t , function Impetus_Actions )
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "Impetus Trigger Setup Complete" )
call DestroyTrigger(r)
set r=null
set t=null
set gg_trg_Impetus=null
endfunction
//===========================================================================
function InitTrig_Impetus takes nothing returns nothing
set gg_trg_Impetus = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Impetus, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Impetus, Condition( function Trig_Impetus_Conditions ) )
call TriggerAddAction( gg_trg_Impetus, function Trig_Impetus_Actions )
endfunction
//===========================================================================
// Trigger: Untouchable
//===========================================================================
function Trig_Untouchable_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0DW', GetAttackedUnitBJ()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Untouchable_Actions takes nothing returns nothing
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetAttackedUnitBJ()), GetUnitLoc(GetAttackedUnitBJ()), GetUnitLoc(GetAttacker()) )
call UnitAddAbilityBJ( 'A0B0', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "acidbomb", GetAttacker() )
endfunction
//===========================================================================
function InitTrig_Untouchable takes nothing returns nothing
set gg_trg_Untouchable = CreateTrigger( )
call DisableTrigger( gg_trg_Untouchable )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Untouchable, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Untouchable, Condition( function Trig_Untouchable_Conditions ) )
call TriggerAddAction( gg_trg_Untouchable, function Trig_Untouchable_Actions )
endfunction
//===========================================================================
// Trigger: Enchant
//===========================================================================
function Trig_Enchant_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DX' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_ANCIENT) == false ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Func004001002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetTriggerUnit()) )
endfunction
function Trig_Enchant_Func004001002002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'Bslo') == true )
endfunction
function Trig_Enchant_Func004001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Enchant_Func004001002001(), Trig_Enchant_Func004001002002() )
endfunction
function Trig_Enchant_Func004A takes nothing returns nothing
call UnitRemoveBuffBJ( 'Bslo', GetEnumUnit() )
endfunction
function Trig_Enchant_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
if ( Trig_Enchant_Func002C() ) then
call UnitRemoveBuffBJ( 'Bslo', GetSpellTargetUnit() )
call SetUnitOwner( GetSpellTargetUnit(), GetOwningPlayer(GetSpellAbilityUnit()), true )
call UnitApplyTimedLifeBJ( 30.00, 'BTLF', GetSpellTargetUnit() )
call UnitRemoveBuffBJ( 'Bslo', GetSpellTargetUnit() )
else
endif
call TriggerSleepAction( 0.50 )
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Enchant_Func004001002)), function Trig_Enchant_Func004A )
endfunction
//===========================================================================
function InitTrig_Enchant takes nothing returns nothing
set gg_trg_Enchant = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant, Condition( function Trig_Enchant_Conditions ) )
call TriggerAddAction( gg_trg_Enchant, function Trig_Enchant_Actions )
endfunction
//===========================================================================
// Trigger: BlindStrike
//===========================================================================
function Trig_BlindStrike_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A09F' ) ) then
return false
endif
return true
endfunction
function AnglePoints takes real x1, real y1, real x2, real y2 returns real
return bj_RADTODEG * Atan2(y2 - y1, x2 - x1)
endfunction
function Trig_BlindStrike_Actions takes nothing returns nothing
//local effect fx=AddSpecialEffectTargetUnitBJ( "hand, right", GetTriggerUnit(), "Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl" )
//local effect fx1=AddSpecialEffectTargetUnitBJ( "hand, left", GetTriggerUnit(), "Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl" )
local real angle=AnglePoints( GetUnitX(GetTriggerUnit()) , GetUnitY(GetTriggerUnit()) , GetUnitX(GetSpellTargetUnit()) , GetUnitY(GetSpellTargetUnit()) )
local unit caster=GetTriggerUnit()
local unit target=GetSpellTargetUnit()
call SetUnitTurnSpeedBJ( caster, 1.0 )
call UnitAddAbilityBJ( 'A0DV', caster )
call QueueUnitAnimation(caster, "attack")
call SetUnitTimeScale(caster,0.2)
//call TriggerSleepAction(0)
//call ShowUnit(caster, false)
call SetUnitX(caster, GetUnitX(target)+128*CosBJ(angle) )
call SetUnitY(caster, GetUnitY(target)+128*SinBJ(angle) )
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, R2S(GetUnitTurnSpeed(caster)) )
call SetUnitFacing(caster,angle-180)
//call ShowUnit(caster, true)
call SetUnitTimeScale(caster,1.0)
call IssueTargetOrderBJ( caster, "attack", target )
call TriggerSleepAction(0.3)
call UnitDamageTargetBJ( caster, target, ( 30.00 * I2R(GetUnitAbilityLevelSwapped('A09F', caster)) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_FIRE )
loop
exitwhen IsUnitDeadBJ(caster)==false
call TriggerSleepAction(1)
endloop
call UnitRemoveAbilityBJ( 'A0DV', caster )
call SetUnitTurnSpeedBJ( caster, 0.5 )
//call DestroyEffect(fx)
//call DestroyEffect(fx1)
//set fx=null
//set fx1=null
set caster=null
set target=null
endfunction
//===========================================================================
function InitTrig_BlindStrike takes nothing returns nothing
set gg_trg_BlindStrike = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BlindStrike, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_BlindStrike, Condition( function Trig_BlindStrike_Conditions ) )
call TriggerAddAction( gg_trg_BlindStrike, function Trig_BlindStrike_Actions )
endfunction
//===========================================================================
// Trigger: MASTER CASTER
//===========================================================================
function Trig_MASTER_CASTER_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'e00E' ) ) then
return false
endif
return true
endfunction
function Trig_MASTER_CASTER_Actions takes nothing returns nothing
call ShowUnitHide( GetEnteringUnit() )
call SetUnitPathing( GetTriggerUnit(), false )
call SetUnitInvulnerable( GetTriggerUnit(), true )
call UnitApplyTimedLifeBJ( 5.00, 'BTLF', GetEnteringUnit() )
endfunction
//===========================================================================
function InitTrig_MASTER_CASTER takes nothing returns nothing
set gg_trg_MASTER_CASTER = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_MASTER_CASTER, GetPlayableMapRect() )
call TriggerAddCondition( gg_trg_MASTER_CASTER, Condition( function Trig_MASTER_CASTER_Conditions ) )
call TriggerAddAction( gg_trg_MASTER_CASTER, function Trig_MASTER_CASTER_Actions )
endfunction
//===========================================================================
// Trigger: ABILITY SWITCHBOARD
//===========================================================================
function Trig_ABILITY_SWITCHBOARD_Func001C takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A01N' ) ) then
return false
endif
return true
endfunction
function Trig_ABILITY_SWITCHBOARD_Func002Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A07B', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_ABILITY_SWITCHBOARD_Func002C takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A07B' ) ) then
return false
endif
return true
endfunction
function Trig_ABILITY_SWITCHBOARD_Func003C takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0BR' ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A0BR', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_ABILITY_SWITCHBOARD_Func004C takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0C1' ) ) then
return false
endif
return true
endfunction
function Trig_ABILITY_SWITCHBOARD_Actions takes nothing returns nothing
if ( Trig_ABILITY_SWITCHBOARD_Func001C() ) then
set udg_Heartstopper = GetLearningUnit()
call EnableTrigger( gg_trg_Heartstopper_kill )
else
endif
if ( Trig_ABILITY_SWITCHBOARD_Func002C() ) then
if ( Trig_ABILITY_SWITCHBOARD_Func002Func002C() ) then
call UnitAddAbilityBJ( 'A0DQ', GetTriggerUnit() )
call UnitAddAbilityBJ( 'A0DP', GetTriggerUnit() )
else
call SetUnitAbilityLevelSwapped( 'A0DQ', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A07B', GetTriggerUnit()) )
call SetUnitAbilityLevelSwapped( 'A0DP', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A07B', GetTriggerUnit()) )
endif
else
endif
if ( Trig_ABILITY_SWITCHBOARD_Func003C() ) then
call UnitAddAbilityBJ( 'A0CQ', GetTriggerUnit() )
else
endif
if ( Trig_ABILITY_SWITCHBOARD_Func004C() ) then
call IncUnitAbilityLevelSwapped( 'A0C2', GetTriggerUnit() )
call SetUnitScalePercent( GetTriggerUnit(), ( 50.00 + ( 30.00 * I2R(GetUnitAbilityLevelSwapped('A0C1', GetTriggerUnit())) ) ), ( 50.00 + ( 30.00 * I2R(GetUnitAbilityLevelSwapped('A0C1', GetTriggerUnit())) ) ), ( 50.00 + ( 30.00 * I2R(GetUnitAbilityLevelSwapped('A0C1', GetTriggerUnit())) ) ) )
else
endif
endfunction
//===========================================================================
function InitTrig_ABILITY_SWITCHBOARD takes nothing returns nothing
set gg_trg_ABILITY_SWITCHBOARD = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ABILITY_SWITCHBOARD, EVENT_PLAYER_HERO_SKILL )
call TriggerAddAction( gg_trg_ABILITY_SWITCHBOARD, function Trig_ABILITY_SWITCHBOARD_Actions )
endfunction
//===========================================================================
// Trigger: Battle Hunger
//===========================================================================
function Trig_Battle_Hunger_Func001C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetKillingUnitBJ(), 'B03O') == true ) ) then
return false
endif
return true
endfunction
function Trig_Battle_Hunger_Func002Func001A takes nothing returns nothing
call UnitRemoveBuffBJ( 'B03O', GetEnumUnit() )
endfunction
function Trig_Battle_Hunger_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A04R', GetKillingUnitBJ()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Battle_Hunger_Actions takes nothing returns nothing
if ( Trig_Battle_Hunger_Func001C() ) then
call UnitRemoveBuffBJ( 'B03O', GetKillingUnitBJ() )
else
endif
if ( Trig_Battle_Hunger_Func002C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetKillingUnitBJ())), function Trig_Battle_Hunger_Func002Func001A )
else
endif
endfunction
//===========================================================================
function InitTrig_Battle_Hunger takes nothing returns nothing
set gg_trg_Battle_Hunger = CreateTrigger( )
call DisableTrigger( gg_trg_Battle_Hunger )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Battle_Hunger, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Battle_Hunger, function Trig_Battle_Hunger_Actions )
endfunction
//===========================================================================
// Trigger: Berserkers call
//===========================================================================
function Trig_Berserkers_call_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetTriggerUnit(), 'BHwe') == true ) ) then
return false
endif
return true
endfunction
function Trig_Berserkers_call_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call IssueTargetOrderBJ( GetTriggerUnit(), "attack", udg_BerserkerCaller )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Berserkers_call takes nothing returns nothing
set gg_trg_Berserkers_call = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Berserkers_call, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Berserkers_call, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Berserkers_call, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Berserkers_call, Condition( function Trig_Berserkers_call_Conditions ) )
call TriggerAddAction( gg_trg_Berserkers_call, function Trig_Berserkers_call_Actions )
endfunction
//===========================================================================
// Trigger: Berserkers call Cast
//===========================================================================
function Trig_Berserkers_call_Cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0C7' ) ) then
return false
endif
return true
endfunction
function Trig_Berserkers_call_Cast_Func010001003 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'BHwe') == true )
endfunction
function Trig_Berserkers_call_Cast_Func010A takes nothing returns nothing
call IssueTargetOrderBJ( GetEnumUnit(), "attack", udg_BerserkerCaller )
endfunction
function Trig_Berserkers_call_Cast_Func013001002001 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'BHwe') == true )
endfunction
function Trig_Berserkers_call_Cast_Func013001002002 takes nothing returns boolean
return ( GetPlayerController(GetOwningPlayer(GetFilterUnit())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Berserkers_call_Cast_Func013001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Berserkers_call_Cast_Func013001002001(), Trig_Berserkers_call_Cast_Func013001002002() )
endfunction
function Trig_Berserkers_call_Cast_Func013Func001C takes nothing returns boolean
if ( not ( GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit())) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Berserkers_call_Cast_Func013Func002C takes nothing returns boolean
if ( not ( GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit())) == 7 ) ) then
return false
endif
return true
endfunction
function Trig_Berserkers_call_Cast_Func013A takes nothing returns nothing
if ( Trig_Berserkers_call_Cast_Func013Func001C() ) then
call UnitRemoveBuffBJ( 'BHwe', GetEnumUnit() )
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", GetRectCenter(gg_rct_FlagScourgeBig) )
else
endif
if ( Trig_Berserkers_call_Cast_Func013Func002C() ) then
call UnitRemoveBuffBJ( 'BHwe', GetEnumUnit() )
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", GetRectCenter(gg_rct_FlagSentBig) )
else
endif
endfunction
function Trig_Berserkers_call_Cast_Actions takes nothing returns nothing
set udg_BerserkerCaller = GetSpellAbilityUnit()
call TriggerSleepAction( 0.20 )
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, udg_TempLoc )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A0E1', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A0E1', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0C7', udg_BerserkerCaller) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "innerfire", GetTriggerUnit() )
set udg_TempLoc = GetUnitLoc(udg_BerserkerCaller)
call ForGroupBJ( GetUnitsInRangeOfLocMatching(550.00, udg_TempLoc, Condition(function Trig_Berserkers_call_Cast_Func010001003)), function Trig_Berserkers_call_Cast_Func010A )
call RemoveLocation(udg_TempLoc)
call TriggerSleepAction( 3.50 )
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Berserkers_call_Cast_Func013001002)), function Trig_Berserkers_call_Cast_Func013A )
endfunction
//===========================================================================
function InitTrig_Berserkers_call_Cast takes nothing returns nothing
set gg_trg_Berserkers_call_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Berserkers_call_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Berserkers_call_Cast, Condition( function Trig_Berserkers_call_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Berserkers_call_Cast, function Trig_Berserkers_call_Cast_Actions )
endfunction
//===========================================================================
// Trigger: ScatterShot
//===========================================================================
function Trig_ScatterShot_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A064' ) ) then
return false
endif
return true
endfunction
function Trig_ScatterShot_Actions takes nothing returns nothing
local location l=GetSpellTargetLoc()
local location m=null
local location u=GetUnitLoc(GetTriggerUnit())
local integer c=4+4*GetUnitAbilityLevelSwapped('A064', GetTriggerUnit())
local unit t=GetTriggerUnit()
local unit p=null
call AddSpecialEffectLocBJ( u, "Abilities\\Spells\\Human\\Flare\\FlareTarget.mdl" )
call TriggerExecute(gg_trg_DestroyFX)
loop
exitwhen c<=0
set p=CreateUnit(GetOwningPlayer(t), 'e00J' , GetUnitX(t),GetUnitY(t),90)
set m=PolarProjectionBJ(l,GetRandomDirectionDeg(),GetRandomDirectionDeg())
call IssuePointOrderLocBJ(p, "attackground", m )
call UnitApplyTimedLifeBJ( 0.50, 'BTLF', p )
call RemoveLocation(m)
set c=c-1
endloop
call RemoveLocation(m)
call RemoveLocation(u)
call RemoveLocation(l)
set m=null
set u=null
set l=null
set t=null
set p=null
set c=0
endfunction
//===========================================================================
function InitTrig_ScatterShot takes nothing returns nothing
set gg_trg_ScatterShot = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ScatterShot, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ScatterShot, Condition( function Trig_ScatterShot_Conditions ) )
call TriggerAddAction( gg_trg_ScatterShot, function Trig_ScatterShot_Actions )
endfunction
//===========================================================================
// Trigger: Counter Helix
//===========================================================================
function Trig_Counter_Helix_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'B03P') == true ) ) then
return false
endif
if ( not ( IsUnitType(GetAttacker(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Counter_Helix_Func001Func002001003001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Counter_Helix_Func001Func002001003001002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Counter_Helix_Func001Func002001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Counter_Helix_Func001Func002001003001001(), Trig_Counter_Helix_Func001Func002001003001002() )
endfunction
function Trig_Counter_Helix_Func001Func002001003002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Counter_Helix_Func001Func002001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Counter_Helix_Func001Func002001003001(), Trig_Counter_Helix_Func001Func002001003002() )
endfunction
function Trig_Counter_Helix_Func001Func002A takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ( "origin", GetEnumUnit(), "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl" )
call TriggerExecute( gg_trg_DestroyFX )
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), 150.00, ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
endfunction
function Trig_Counter_Helix_Func001C takes nothing returns boolean
if ( not ( GetRandomReal(0, 100.00) < ( 5.00 * I2R(GetUnitAbilityLevelSwapped('A0C6', GetTriggerUnit())) ) ) ) then
return false
endif
return true
endfunction
function Trig_Counter_Helix_Actions takes nothing returns nothing
if ( Trig_Counter_Helix_Func001C() ) then
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
call ForGroupBJ( GetUnitsInRangeOfLocMatching(300.00, udg_TempLoc, Condition(function Trig_Counter_Helix_Func001Func002001003)), function Trig_Counter_Helix_Func001Func002A )
call RemoveLocation(udg_TempLoc)
call SetUnitAnimation( GetTriggerUnit(), "spin" )
else
endif
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 0.25 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Counter_Helix takes nothing returns nothing
set gg_trg_Counter_Helix = CreateTrigger( )
call DisableTrigger( gg_trg_Counter_Helix )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Counter_Helix, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Counter_Helix, Condition( function Trig_Counter_Helix_Conditions ) )
call TriggerAddAction( gg_trg_Counter_Helix, function Trig_Counter_Helix_Actions )
endfunction
//===========================================================================
// Trigger: Craggy Exterior
//===========================================================================
function Trig_Craggy_Exterior_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0BU', GetAttackedUnitBJ()) > 0 ) ) then
return false
endif
if ( not ( IsUnitType(GetAttacker(), UNIT_TYPE_MELEE_ATTACKER) == true ) ) then
return false
endif
return true
endfunction
function Trig_Craggy_Exterior_Func002C takes nothing returns boolean
if ( not ( udg_CraggyChance <= ( GetUnitAbilityLevelSwapped('A0BU', GetAttackedUnitBJ()) * 6 ) ) ) then
return false
endif
return true
endfunction
function Trig_Craggy_Exterior_Actions takes nothing returns nothing
set udg_CraggyChance = GetRandomInt(1, 100)
if ( Trig_Craggy_Exterior_Func002C() ) then
set udg_TempLoc = GetUnitLoc(GetAttackedUnitBJ())
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetAttackedUnitBJ()), udg_TempLoc, GetUnitLoc(GetAttacker()) )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A0BV', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A0BV', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0BU', GetAttackedUnitBJ()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", GetAttacker() )
else
endif
endfunction
//===========================================================================
function InitTrig_Craggy_Exterior takes nothing returns nothing
set gg_trg_Craggy_Exterior = CreateTrigger( )
call DisableTrigger( gg_trg_Craggy_Exterior )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Craggy_Exterior, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Craggy_Exterior, Condition( function Trig_Craggy_Exterior_Conditions ) )
call TriggerAddAction( gg_trg_Craggy_Exterior, function Trig_Craggy_Exterior_Actions )
endfunction
//===========================================================================
// Trigger: Mark Rewrite
//===========================================================================
function Trig_Mark_of_the_Abyss_new_Copy_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01J' ) ) then
return false
endif
return true
endfunction
function Trig_Mark_of_the_Abyss_new_Copy_Actions takes nothing returns nothing
local unit MarkedUnit = GetSpellTargetUnit()
local real MarkWait = ( 20.00 + ( 10.00 * I2R(GetUnitAbilityLevelSwapped('A01J', GetSpellAbilityUnit())) ) )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( IsUnitAlly(MarkedUnit, ConvertedPlayer(GetForLoopIndexA())) == true ) then
call SetPlayerAllianceStateBJ( ConvertedPlayer(GetForLoopIndexA()), GetOwningPlayer(MarkedUnit), bj_ALLIANCE_UNALLIED )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( MarkWait )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( IsUnitEnemy(MarkedUnit, ConvertedPlayer(GetForLoopIndexA())) == true ) then
if ( IsPlayerEnemy(ConvertedPlayer(GetForLoopIndexA()), GetOwningPlayer(MarkedUnit)) == false ) then
if ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING ) then
call SetPlayerAllianceStateBJ( ConvertedPlayer(GetForLoopIndexA()), GetOwningPlayer(MarkedUnit), bj_ALLIANCE_ALLIED_VISION )
else
if (GetForLoopIndexA() == 1) then
call SetPlayerAllianceStateBJ( ConvertedPlayer(GetForLoopIndexA()), GetOwningPlayer(MarkedUnit), bj_ALLIANCE_ALLIED_VISION )
else
if (GetForLoopIndexA() == 7) then
call SetPlayerAllianceStateBJ( ConvertedPlayer(GetForLoopIndexA()), GetOwningPlayer(MarkedUnit), bj_ALLIANCE_ALLIED_VISION )
else
call SetPlayerAllianceStateBJ( ConvertedPlayer(GetForLoopIndexA()), GetOwningPlayer(MarkedUnit), bj_ALLIANCE_ALLIED_UNITS )
endif
endif
endif
endif
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Mark_Rewrite takes nothing returns nothing
set gg_trg_Mark_Rewrite = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mark_Rewrite, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Mark_Rewrite, Condition( function Trig_Mark_of_the_Abyss_new_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Mark_Rewrite, function Trig_Mark_of_the_Abyss_new_Copy_Actions )
endfunction
//===========================================================================
// Trigger: Shadowraze
//===========================================================================
function Trig_Shadowraze_Func001Func003001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Shadowraze_Func001Func003001003002001 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Shadowraze_Func001Func003001003002002 takes nothing returns boolean
return ( 'BNab' == 'BNab' )
endfunction
function Trig_Shadowraze_Func001Func003001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Shadowraze_Func001Func003001003002001(), Trig_Shadowraze_Func001Func003001003002002() )
endfunction
function Trig_Shadowraze_Func001Func003001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Shadowraze_Func001Func003001003001(), Trig_Shadowraze_Func001Func003001003002() )
endfunction
function Trig_Shadowraze_Func001Func003A takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), ( 75.00 * I2R(GetUnitAbilityLevelSwapped('A07B', GetTriggerUnit())) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
endfunction
function Trig_Shadowraze_Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07B' ) ) then
return false
endif
return true
endfunction
function Trig_Shadowraze_Func002Func003001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Shadowraze_Func002Func003001003002001 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Shadowraze_Func002Func003001003002002 takes nothing returns boolean
return ( 'BNab' == 'BNab' )
endfunction
function Trig_Shadowraze_Func002Func003001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Shadowraze_Func002Func003001003002001(), Trig_Shadowraze_Func002Func003001003002002() )
endfunction
function Trig_Shadowraze_Func002Func003001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Shadowraze_Func002Func003001003001(), Trig_Shadowraze_Func002Func003001003002() )
endfunction
function Trig_Shadowraze_Func002Func003A takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), ( 75.00 * I2R(GetUnitAbilityLevelSwapped('A07B', GetTriggerUnit())) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
endfunction
function Trig_Shadowraze_Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DP' ) ) then
return false
endif
return true
endfunction
function Trig_Shadowraze_Func003Func003001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Shadowraze_Func003Func003001003002001 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Shadowraze_Func003Func003001003002002 takes nothing returns boolean
return ( 'BNab' == 'BNab' )
endfunction
function Trig_Shadowraze_Func003Func003001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Shadowraze_Func003Func003001003002001(), Trig_Shadowraze_Func003Func003001003002002() )
endfunction
function Trig_Shadowraze_Func003Func003001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Shadowraze_Func003Func003001003001(), Trig_Shadowraze_Func003Func003001003002() )
endfunction
function Trig_Shadowraze_Func003Func003A takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), ( 75.00 * I2R(GetUnitAbilityLevelSwapped('A07B', GetTriggerUnit())) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
endfunction
function Trig_Shadowraze_Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DQ' ) ) then
return false
endif
return true
endfunction
function Trig_Shadowraze_Actions takes nothing returns nothing
if ( Trig_Shadowraze_Func001C() ) then
call CreateNUnitsAtLoc( 1, 'e006', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 200.00, GetUnitFacing(GetTriggerUnit())), bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(250.00, GetUnitLoc(GetLastCreatedUnit()), Condition(function Trig_Shadowraze_Func001Func003001003)), function Trig_Shadowraze_Func001Func003A )
else
endif
if ( Trig_Shadowraze_Func002C() ) then
call CreateNUnitsAtLoc( 1, 'e006', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 450.00, GetUnitFacing(GetTriggerUnit())), bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(250.00, GetUnitLoc(GetLastCreatedUnit()), Condition(function Trig_Shadowraze_Func002Func003001003)), function Trig_Shadowraze_Func002Func003A )
else
endif
if ( Trig_Shadowraze_Func003C() ) then
call CreateNUnitsAtLoc( 1, 'e006', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 700.00, GetUnitFacing(GetTriggerUnit())), bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(250.00, GetUnitLoc(GetLastCreatedUnit()), Condition(function Trig_Shadowraze_Func003Func003001003)), function Trig_Shadowraze_Func003Func003A )
else
endif
endfunction
//===========================================================================
function InitTrig_Shadowraze takes nothing returns nothing
set gg_trg_Shadowraze = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shadowraze, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddAction( gg_trg_Shadowraze, function Trig_Shadowraze_Actions )
endfunction
//===========================================================================
// Trigger: Necromastry
//===========================================================================
function Trig_Necromastry_Func004C takes nothing returns boolean
if ( ( GetUnitTypeId(GetKillingUnitBJ()) == 'Nfir' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'Nfir' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetKillingUnitBJ()) == 'e00F' ) ) then
return true
endif
return false
endfunction
function Trig_Necromastry_Conditions takes nothing returns boolean
if ( not Trig_Necromastry_Func004C() ) then
return false
endif
return true
endfunction
function Trig_Necromastry_Func001Func003002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Necromastry_Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'Nfir' ) ) then
return false
endif
return true
endfunction
function Trig_Necromastry_Func002C takes nothing returns boolean
if ( not ( IsUnitIllusionBJ(GetDyingUnit()) == false ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A0CQ', GetKillingUnitBJ()) < ( 15 * GetUnitAbilityLevelSwapped('A0BR', GetKillingUnitBJ()) ) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetKillingUnitBJ()) == 'Nfir' ) ) then
return false
endif
return true
endfunction
function Trig_Necromastry_Func003Func002Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0CQ', GetEnumUnit()) < ( 15 * GetUnitAbilityLevelSwapped('A0BR', GetEnumUnit()) ) ) ) then
return false
endif
return true
endfunction
function Trig_Necromastry_Func003Func002A takes nothing returns nothing
if ( Trig_Necromastry_Func003Func002Func001C() ) then
call SetUnitAbilityLevelSwapped( 'A0CQ', GetEnumUnit(), ( GetUnitAbilityLevelSwapped('A0CQ', GetEnumUnit()) + 1 ) )
else
endif
endfunction
function Trig_Necromastry_Func003C takes nothing returns boolean
if ( not ( IsUnitIllusionBJ(GetDyingUnit()) == false ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetKillingUnitBJ()) == 'e00F' ) ) then
return false
endif
return true
endfunction
function Trig_Necromastry_Actions takes nothing returns nothing
if ( Trig_Necromastry_Func001C() ) then
call SetUnitAbilityLevelSwapped( 'A0CQ', GetDyingUnit(), 1 )
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetDyingUnit()), 'e007'), function Trig_Necromastry_Func001Func003002 )
else
endif
if ( Trig_Necromastry_Func002C() ) then
call SetUnitAbilityLevelSwapped( 'A0CQ', GetKillingUnitBJ(), ( GetUnitAbilityLevelSwapped('A0CQ', GetKillingUnitBJ()) + 1 ) )
else
endif
if ( Trig_Necromastry_Func003C() ) then
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetKillingUnitBJ()), 'Nfir'), function Trig_Necromastry_Func003Func002A )
else
endif
endfunction
//===========================================================================
function InitTrig_Necromastry takes nothing returns nothing
set gg_trg_Necromastry = CreateTrigger( )
call DisableTrigger( gg_trg_Necromastry )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Necromastry, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Necromastry, Condition( function Trig_Necromastry_Conditions ) )
call TriggerAddAction( gg_trg_Necromastry, function Trig_Necromastry_Actions )
endfunction
//===========================================================================
// Trigger: Time Stop
//===========================================================================
function Trig_Time_Stop_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A003' ) ) then
return false
endif
return true
endfunction
function Trig_Time_Stop_Func001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Time_Stop_Func001A takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
call SetUnitTimeScalePercent( GetEnumUnit(), 0.00 )
endfunction
function Trig_Time_Stop_Func003001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Time_Stop_Func003A takes nothing returns nothing
call PauseAllUnitsBJ( false )
call SetUnitTimeScalePercent( GetEnumUnit(), 100.00 )
endfunction
function Trig_Time_Stop_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Time_Stop_Func001001002)), function Trig_Time_Stop_Func001A )
call TriggerSleepAction( 3.50 )
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Time_Stop_Func003001002)), function Trig_Time_Stop_Func003A )
endfunction
//===========================================================================
function InitTrig_Time_Stop takes nothing returns nothing
set gg_trg_Time_Stop = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Time_Stop, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Time_Stop, Condition( function Trig_Time_Stop_Conditions ) )
call TriggerAddAction( gg_trg_Time_Stop, function Trig_Time_Stop_Actions )
endfunction
//===========================================================================
// Trigger: Spirit Lance
//===========================================================================
function Trig_Spirit_Lance_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DA' ) ) then
return false
endif
return true
endfunction
function Trig_Spirit_Lance_Actions takes nothing returns nothing
set udg_SLTarget = GetSpellTargetUnit()
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetUnitLoc(GetSpellTargetUnit()) )
call UnitAddAbilityBJ( 'A00X', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A00X', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0DA', GetTriggerUnit()) )
call TriggerSleepAction( 0.10 )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "banish", udg_SLTarget )
endfunction
//===========================================================================
function InitTrig_Spirit_Lance takes nothing returns nothing
set gg_trg_Spirit_Lance = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Spirit_Lance, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Spirit_Lance, Condition( function Trig_Spirit_Lance_Conditions ) )
call TriggerAddAction( gg_trg_Spirit_Lance, function Trig_Spirit_Lance_Actions )
endfunction
//===========================================================================
// Trigger: Dopplewalk
//
// SPELLCASTER
//===========================================================================
function Trig_Dopplewalk_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0D7' ) ) then
return false
endif
return true
endfunction
function Trig_Dopplewalk_Actions takes nothing returns nothing
set udg_DPWalker = GetTriggerUnit()
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()) )
call UnitAddItemByIdSwapped( 'I010', GetLastCreatedUnit() )
call UnitUseItemTarget( GetLastCreatedUnit(), GetLastCreatedItem(), GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Dopplewalk takes nothing returns nothing
set gg_trg_Dopplewalk = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dopplewalk, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Dopplewalk, Condition( function Trig_Dopplewalk_Conditions ) )
call TriggerAddAction( gg_trg_Dopplewalk, function Trig_Dopplewalk_Actions )
endfunction
//===========================================================================
// Trigger: Dopplewalk Move
//===========================================================================
function Trig_Dopplewalk_Move_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetTriggerUnit(), 'B03A') == true ) ) then
return false
endif
return true
endfunction
function Trig_Dopplewalk_Move_Actions takes nothing returns nothing
call SetUnitPositionLoc( GetTriggerUnit(), GetUnitLoc(udg_DPWalker) )
endfunction
//===========================================================================
function InitTrig_Dopplewalk_Move takes nothing returns nothing
set gg_trg_Dopplewalk_Move = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Dopplewalk_Move, GetPlayableMapRect() )
call TriggerAddCondition( gg_trg_Dopplewalk_Move, Condition( function Trig_Dopplewalk_Move_Conditions ) )
call TriggerAddAction( gg_trg_Dopplewalk_Move, function Trig_Dopplewalk_Move_Actions )
endfunction
//===========================================================================
// Trigger: Juxtapose
//
// SPELLCASTER
//===========================================================================
function Trig_Juxtapose_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetAttackedUnitBJ(), GetOwningPlayer(GetAttacker())) == true ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(GetAttacker(), 'B03B') == true ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_ANCIENT) == false ) ) then
return false
endif
return true
endfunction
function Trig_Juxtapose_Func001Func002001001002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B03B') == true )
endfunction
function Trig_Juxtapose_Func001C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfPlayerMatching(GetOwningPlayer(GetAttacker()), Condition(function Trig_Juxtapose_Func001Func002001001002))) > 8 ) ) then
return false
endif
return true
endfunction
function Trig_Juxtapose_Func004C takes nothing returns boolean
if ( not ( IsUnitIllusionBJ(GetAttacker()) == false ) ) then
return false
endif
if ( not ( udg_Jux <= ( ( 0 + ( 3 * GetUnitAbilityLevelSwapped('A0DB', GetAttacker()) ) ) + ( 0 + ( 2 * GetUnitAbilityLevelSwapped('A0D9', GetAttacker()) ) ) ) ) ) then
return false
endif
return true
endfunction
function Trig_Juxtapose_Func005C takes nothing returns boolean
if ( not ( IsUnitIllusionBJ(GetAttacker()) == true ) ) then
return false
endif
if ( not ( udg_Jux <= ( ( 0 + ( 2 * GetUnitAbilityLevelSwapped('A0D9', GetAttacker()) ) ) + 0 ) ) ) then
return false
endif
return true
endfunction
function Trig_Juxtapose_Actions takes nothing returns nothing
if ( Trig_Juxtapose_Func001C() ) then
return
else
endif
set udg_Jux = GetRandomInt(1, 100)
if ( Trig_Juxtapose_Func004C() ) then
set udg_TempLoc = GetUnitLoc(GetAttacker())
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetAttacker()), udg_TempLoc, udg_TempLoc )
call RemoveLocation(udg_TempLoc)
call UnitAddItemByIdSwapped( 'I023', GetLastCreatedUnit() )
call UnitUseItemTarget( GetLastCreatedUnit(), GetLastCreatedItem(), GetAttacker() )
else
call DoNothing( )
endif
if ( Trig_Juxtapose_Func005C() ) then
set udg_TempLoc = GetUnitLoc(GetAttacker())
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetAttacker()), udg_TempLoc, udg_TempLoc )
call RemoveLocation(udg_TempLoc)
call UnitAddItemByIdSwapped( 'I023', GetLastCreatedUnit() )
call UnitUseItemTarget( GetLastCreatedUnit(), GetLastCreatedItem(), GetAttacker() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Juxtapose takes nothing returns nothing
set gg_trg_Juxtapose = CreateTrigger( )
call DisableTrigger( gg_trg_Juxtapose )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Juxtapose, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Juxtapose, Condition( function Trig_Juxtapose_Conditions ) )
call TriggerAddAction( gg_trg_Juxtapose, function Trig_Juxtapose_Actions )
endfunction
//===========================================================================
// Trigger: Ante Up
//===========================================================================
function Trig_Ante_Up_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0D8' ) ) then
return false
endif
return true
endfunction
function Trig_Ante_Up_Func004C takes nothing returns boolean
if ( not ( IsUnitEnemy(GetTriggerUnit(), GetOwningPlayer(GetSpellTargetUnit())) == true ) ) then
return false
endif
return true
endfunction
function Trig_Ante_Up_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( -100, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
set udg_AnteUp = GetSpellTargetUnit()
set udg_AnteUpCaster = GetTriggerUnit()
if ( Trig_Ante_Up_Func004C() ) then
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), ( 50.00 * I2R(GetUnitAbilityLevelSwapped('A0D8', GetTriggerUnit())) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
call SetUnitLifeBJ( GetSpellTargetUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) + ( 50.00 * I2R(GetUnitAbilityLevelSwapped('A0D8', GetTriggerUnit())) ) ) )
endif
call EnableTrigger( gg_trg_Ante_Up_death )
call PolledWait( 60.00 )
set udg_AnteUp = null
set udg_AnteUpCaster = null
endfunction
//===========================================================================
function InitTrig_Ante_Up takes nothing returns nothing
set gg_trg_Ante_Up = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ante_Up, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Ante_Up, Condition( function Trig_Ante_Up_Conditions ) )
call TriggerAddAction( gg_trg_Ante_Up, function Trig_Ante_Up_Actions )
endfunction
//===========================================================================
// Trigger: Ante Up death
//===========================================================================
function Trig_Ante_Up_death_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Ante_Up_death_Func001C takes nothing returns boolean
if ( not ( GetDyingUnit() == udg_AnteUp ) ) then
return false
endif
return true
endfunction
function Trig_Ante_Up_death_Func002C takes nothing returns boolean
if ( not ( GetKillingUnitBJ() == udg_AnteUp ) ) then
return false
endif
return true
endfunction
function Trig_Ante_Up_death_Func003001002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B038') == true )
endfunction
function Trig_Ante_Up_death_Func003A takes nothing returns nothing
call UnitRemoveBuffBJ( 'B038', GetEnumUnit() )
endfunction
function Trig_Ante_Up_death_Actions takes nothing returns nothing
if ( Trig_Ante_Up_death_Func001C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", udg_AnteUpCaster, "UI\\Feedback\\GoldCredit\\GoldCredit.mdl" )
call TriggerExecute( gg_trg_DestroyFX )
set udg_AnteUpNum = ( ( GetUnitAbilityLevelSwapped('A0D8', udg_AnteUpCaster) * 50 ) + 100 )
call AdjustPlayerStateBJ( udg_AnteUpNum, GetOwningPlayer(udg_AnteUpCaster), PLAYER_STATE_RESOURCE_GOLD )
call CreateTextTagUnitBJ( ( "+" + I2S(udg_AnteUpNum) ), udg_AnteUpCaster, 0, 10, 90.00, 84.00, 0.00, 0 )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 40.00, 90 )
call PolledWait( 1.00 )
call DestroyTextTagBJ( GetLastCreatedTextTag() )
else
call DoNothing( )
endif
if ( Trig_Ante_Up_death_Func002C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", udg_AnteUpCaster, "UI\\Feedback\\GoldCredit\\GoldCredit.mdl" )
call TriggerExecute( gg_trg_DestroyFX )
set udg_AnteUpNum = ( ( GetUnitAbilityLevelSwapped('A0D8', udg_AnteUpCaster) * 100 ) + 200 )
call AdjustPlayerStateBJ( udg_AnteUpNum, GetOwningPlayer(udg_AnteUpCaster), PLAYER_STATE_RESOURCE_GOLD )
call CreateTextTagUnitBJ( ( "+" + I2S(udg_AnteUpNum) ), udg_AnteUpCaster, 0, 10, 90.00, 84.00, 0.00, 0 )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 40.00, 90 )
call PolledWait( 1.00 )
call DestroyTextTagBJ( GetLastCreatedTextTag() )
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Ante_Up_death_Func003001002)), function Trig_Ante_Up_death_Func003A )
set udg_AnteUp = null
set udg_AnteUpCaster = null
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Ante_Up_death takes nothing returns nothing
set gg_trg_Ante_Up_death = CreateTrigger( )
call DisableTrigger( gg_trg_Ante_Up_death )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ante_Up_death, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Ante_Up_death, Condition( function Trig_Ante_Up_death_Conditions ) )
call TriggerAddAction( gg_trg_Ante_Up_death, function Trig_Ante_Up_death_Actions )
endfunction
//===========================================================================
// Trigger: Roulette effect
//===========================================================================
function Trig_Roulette_effect_Func003C takes nothing returns boolean
if ( not ( IsUnitDeadBJ(udg_RouletteTarget) == true ) ) then
return false
endif
return true
endfunction
function Trig_Roulette_effect_Func008C takes nothing returns boolean
if ( not ( udg_RouletteCounter == 10 ) ) then
return false
endif
return true
endfunction
function Trig_Roulette_effect_Actions takes nothing returns nothing
call DestroyEffectBJ( udg_RouletteEffect )
set udg_RouletteTarget = GroupPickRandomUnit(udg_RouletteGroup)
if ( Trig_Roulette_effect_Func003C() ) then
call GroupRemoveUnitSimple( udg_RouletteTarget, udg_RouletteGroup )
else
call DoNothing( )
endif
set udg_RouletteCounter = ( udg_RouletteCounter + 1 )
call AddSpecialEffectTargetUnitBJ( "overhead", udg_RouletteTarget, "Abilities\\Spells\\Other\\Aneu\\AneuTarget.mdl" )
set udg_RouletteEffect = GetLastCreatedEffectBJ()
call PolledWait( ( 0.11 * I2R(udg_RouletteCounter) ) )
if ( Trig_Roulette_effect_Func008C() ) then
call DestroyEffectBJ( udg_RouletteEffect )
call AddSpecialEffectTargetUnitBJ( "overhead", udg_RouletteTarget, "Abilities\\Spells\\Other\\Incinerate\\FireLordDeathExplode.mdl" )
set udg_RouletteEffect = GetLastCreatedEffectBJ()
call UnitDamageTargetBJ( udg_RouletteUnit, udg_RouletteTarget, ( I2R(GetHeroLevel(udg_RouletteTarget)) * ( 15.00 + ( 5.00 * I2R(GetUnitAbilityLevelSwapped('A0D2', udg_RouletteUnit)) ) ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
call PolledWait( 1.00 )
call DestroyEffectBJ( udg_RouletteEffect )
else
call TriggerExecute( GetTriggeringTrigger() )
endif
endfunction
//===========================================================================
function InitTrig_Roulette_effect takes nothing returns nothing
set gg_trg_Roulette_effect = CreateTrigger( )
call TriggerAddAction( gg_trg_Roulette_effect, function Trig_Roulette_effect_Actions )
endfunction
//===========================================================================
// Trigger: Roulette
//===========================================================================
function Trig_Roulette_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0D2' ) ) then
return false
endif
return true
endfunction
function Trig_Roulette_Func004001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Roulette_Func004001003002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetTriggerPlayer()) == true )
endfunction
function Trig_Roulette_Func004001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Roulette_Func004001003001(), Trig_Roulette_Func004001003002() )
endfunction
function Trig_Roulette_Func004A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_RouletteGroup )
set udg_RouletteNum = ( udg_RouletteNum + 1 )
endfunction
function Trig_Roulette_Func005C takes nothing returns boolean
if ( not ( udg_RouletteNum > 1 ) ) then
return false
endif
return true
endfunction
function Trig_Roulette_Actions takes nothing returns nothing
set udg_RouletteNum = 0
set udg_RouletteCounter = 0
set udg_RouletteUnit = GetTriggerUnit()
call ForGroupBJ( GetUnitsInRangeOfLocMatching(1500.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_Roulette_Func004001003)), function Trig_Roulette_Func004A )
if ( Trig_Roulette_Func005C() ) then
call TriggerExecute( gg_trg_Roulette_effect )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Roulette takes nothing returns nothing
set gg_trg_Roulette = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Roulette, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Roulette, Condition( function Trig_Roulette_Conditions ) )
call TriggerAddAction( gg_trg_Roulette, function Trig_Roulette_Actions )
endfunction
//===========================================================================
// Trigger: Lucky Stars
//===========================================================================
function Trig_Lucky_Stars_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0D6', GetAttacker()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Lucky_Stars_Func001Func001C takes nothing returns boolean
if ( ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == true ) ) then
return true
endif
if ( ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_HERO) == true ) ) then
return true
endif
return false
endfunction
function Trig_Lucky_Stars_Func001C takes nothing returns boolean
if ( not Trig_Lucky_Stars_Func001Func001C() ) then
return false
endif
if ( not ( GetRandomPercentageBJ() <= I2R(GetUnitAbilityLevelSwapped('A0D6', GetAttacker())) ) ) then
return false
endif
return true
endfunction
function Trig_Lucky_Stars_Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
if ( not ( GetRandomPercentageBJ() <= I2R(GetUnitAbilityLevelSwapped('A0D6', GetAttacker())) ) ) then
return false
endif
return true
endfunction
function Trig_Lucky_Stars_Actions takes nothing returns nothing
if ( Trig_Lucky_Stars_Func001C() ) then
call PolledWait( 0.20 )
call UnitDamageTargetBJ( GetAttacker(), GetAttackedUnitBJ(), 250.00, ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL )
call CreateTextTagUnitBJ( "TRIGSTR_8799", GetAttacker(), 0, 10, 100, 0.00, 0.00, 0 )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call PolledWait( 1.00 )
call DestroyTextTagBJ( GetLastCreatedTextTag() )
else
call DoNothing( )
endif
if ( Trig_Lucky_Stars_Func002C() ) then
call PolledWait( 0.20 )
call UnitDamageTargetBJ( GetAttacker(), GetAttackedUnitBJ(), 99999.00, ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL )
call CreateTextTagUnitBJ( "TRIGSTR_8801", GetAttacker(), 0, 10, 100, 0.00, 0.00, 0 )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call PolledWait( 1.00 )
call DestroyTextTagBJ( GetLastCreatedTextTag() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Lucky_Stars takes nothing returns nothing
set gg_trg_Lucky_Stars = CreateTrigger( )
call DisableTrigger( gg_trg_Lucky_Stars )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Lucky_Stars, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Lucky_Stars, Condition( function Trig_Lucky_Stars_Conditions ) )
call TriggerAddAction( gg_trg_Lucky_Stars, function Trig_Lucky_Stars_Actions )
endfunction
//===========================================================================
// Trigger: All In
//===========================================================================
function Trig_All_In_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0CZ' ) ) then
return false
endif
return true
endfunction
function Trig_All_In_Func004C takes nothing returns boolean
if ( not ( udg_AllInDmg > ( 1000.00 + ( 500.00 * I2R(GetUnitAbilityLevelSwapped('A0CZ', GetTriggerUnit())) ) ) ) ) then
return false
endif
return true
endfunction
function Trig_All_In_Func005C takes nothing returns boolean
if ( not ( GetRandomPercentageBJ() <= ( udg_AllInDmg / 100.00 ) ) ) then
return false
endif
return true
endfunction
function Trig_All_In_Actions takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Other\\Transmute\\PileofGold.mdl" )
call AddSpecialEffectTargetUnitBJ( "overhead", GetSpellTargetUnit(), "Abilities\\Spells\\Other\\Transmute\\PileofGold.mdl" )
set udg_AllInDmg = ( ( 0.16 + ( 0.04 * I2R(GetUnitAbilityLevelSwapped('A0CZ', GetTriggerUnit())) ) ) * I2R(GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD)) )
if ( Trig_All_In_Func004C() ) then
set udg_AllInDmg = ( 1000.00 + ( 500.00 * I2R(GetUnitAbilityLevelSwapped('A0CZ', GetTriggerUnit())) ) )
else
call DoNothing( )
endif
if ( Trig_All_In_Func005C() ) then
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD, 0 )
call CreateTextTagUnitBJ( ( "0" + "!" ), GetTriggerUnit(), 0, 10, 100, 0.00, 0.00, 0 )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call PolledWait( 1.00 )
call DestroyTextTagBJ( GetLastCreatedTextTag() )
else
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_AllInDmg, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
call CreateTextTagUnitBJ( ( I2S(R2I(udg_AllInDmg)) + "!" ), GetSpellTargetUnit(), 0, 10, 100, 0.00, 0.00, 0 )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call PolledWait( 1.00 )
call DestroyTextTagBJ( GetLastCreatedTextTag() )
endif
endfunction
//===========================================================================
function InitTrig_All_In takes nothing returns nothing
set gg_trg_All_In = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_All_In, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_All_In, Condition( function Trig_All_In_Conditions ) )
call TriggerAddAction( gg_trg_All_In, function Trig_All_In_Actions )
endfunction
//===========================================================================
// Trigger: Nether Ward
//===========================================================================
function Trig_Nether_Ward_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'o00M' ) ) then
return false
endif
return true
endfunction
function Trig_Nether_Ward_Actions takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'A08T', GetSummonedUnit(), GetUnitAbilityLevelSwapped('A09D', GetSummoningUnit()) )
call IssueImmediateOrderBJ( GetSummonedUnit(), "manaflareon" )
endfunction
//===========================================================================
function InitTrig_Nether_Ward takes nothing returns nothing
set gg_trg_Nether_Ward = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Nether_Ward, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Nether_Ward, Condition( function Trig_Nether_Ward_Conditions ) )
call TriggerAddAction( gg_trg_Nether_Ward, function Trig_Nether_Ward_Actions )
endfunction
//===========================================================================
// Trigger: Healing Ward
//===========================================================================
function Trig_Healing_Ward_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'o00C' ) ) then
return false
endif
return true
endfunction
function Trig_Healing_Ward_Actions takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'A058', GetSummonedUnit(), GetUnitAbilityLevelSwapped('A047', GetSummoningUnit()) )
endfunction
//===========================================================================
function InitTrig_Healing_Ward takes nothing returns nothing
set gg_trg_Healing_Ward = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Healing_Ward, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Healing_Ward, Condition( function Trig_Healing_Ward_Conditions ) )
call TriggerAddAction( gg_trg_Healing_Ward, function Trig_Healing_Ward_Actions )
endfunction
//===========================================================================
// Trigger: IlluminateCast
//
// SPELLCASTER
//===========================================================================
function Trig_IlluminateCast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A085' ) ) then
return false
endif
return true
endfunction
function Trig_IlluminateCast_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(udg_IlCaster), GetUnitLoc(udg_IlCaster), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A087', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A087', GetLastCreatedUnit(), udg_IllLvl )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "breathoffire", PolarProjectionBJ(GetUnitLoc(udg_IlCaster), 200.00, GetUnitFacing(GetTriggerUnit())) )
call KillUnit( udg_IlCaster )
endfunction
//===========================================================================
function InitTrig_IlluminateCast takes nothing returns nothing
set gg_trg_IlluminateCast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_IlluminateCast, EVENT_PLAYER_UNIT_SPELL_ENDCAST )
call TriggerAddCondition( gg_trg_IlluminateCast, Condition( function Trig_IlluminateCast_Conditions ) )
call TriggerAddAction( gg_trg_IlluminateCast, function Trig_IlluminateCast_Actions )
endfunction
//===========================================================================
// Trigger: IlluminateCharge
//===========================================================================
function Trig_IlluminateCharge_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A085' ) ) then
return false
endif
return true
endfunction
function Trig_IlluminateCharge_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'u00J', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 150.00, GetUnitFacing(GetTriggerUnit())), GetUnitFacing(GetTriggerUnit()) )
set udg_IlCaster = GetLastCreatedUnit()
set udg_IllLvl = 1
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_IllLvl = ( udg_IllLvl + 1 )
call SetUnitScalePercent( udg_IlCaster, ( 100.00 + ( 15.00 * I2R(GetForLoopIndexA()) ) ), ( 100.00 + ( 15.00 * I2R(GetForLoopIndexA()) ) ), ( 100.00 + ( 15.00 * I2R(GetForLoopIndexA()) ) ) )
call TriggerSleepAction( 0.50 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_IlluminateCharge takes nothing returns nothing
set gg_trg_IlluminateCharge = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_IlluminateCharge, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_IlluminateCharge, Condition( function Trig_IlluminateCharge_Conditions ) )
call TriggerAddAction( gg_trg_IlluminateCharge, function Trig_IlluminateCharge_Actions )
endfunction
//===========================================================================
// Trigger: Mana Leak effect
//===========================================================================
function Trig_Mana_Leak_effect_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetTriggerUnit(), 'B03V') == true ) ) then
return false
endif
return true
endfunction
function Trig_Mana_Leak_effect_Actions takes nothing returns nothing
call SetUnitManaBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) * ( 1.00 - ( 0.13 * I2R(udg_MLL) ) ) ) )
endfunction
//===========================================================================
function InitTrig_Mana_Leak_effect takes nothing returns nothing
set gg_trg_Mana_Leak_effect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mana_Leak_effect, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Mana_Leak_effect, Condition( function Trig_Mana_Leak_effect_Conditions ) )
call TriggerAddAction( gg_trg_Mana_Leak_effect, function Trig_Mana_Leak_effect_Actions )
endfunction
//===========================================================================
// Trigger: Mana Leak learn
//===========================================================================
function Trig_Mana_Leak_learn_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0EP' ) ) then
return false
endif
return true
endfunction
function Trig_Mana_Leak_learn_Actions takes nothing returns nothing
set udg_MLL = GetUnitAbilityLevelSwapped('A07Y', GetTriggerUnit())
endfunction
//===========================================================================
function InitTrig_Mana_Leak_learn takes nothing returns nothing
set gg_trg_Mana_Leak_learn = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mana_Leak_learn, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Mana_Leak_learn, Condition( function Trig_Mana_Leak_learn_Conditions ) )
call TriggerAddAction( gg_trg_Mana_Leak_learn, function Trig_Mana_Leak_learn_Actions )
endfunction
//===========================================================================
// Trigger: chakra magic
//===========================================================================
function Trig_chakra_magic_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07N' ) ) then
return false
endif
return true
endfunction
function Trig_chakra_magic_Func001C takes nothing returns boolean
if ( not ( GetTriggerUnit() == GetSpellTargetUnit() ) ) then
return false
endif
return true
endfunction
function Trig_chakra_magic_Actions takes nothing returns nothing
if ( Trig_chakra_magic_Func001C() ) then
call SetUnitManaBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) + ( 40.00 * I2R(GetUnitAbilityLevelSwapped('A07N', GetTriggerUnit())) ) ) )
else
call SetUnitManaBJ( GetSpellTargetUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetSpellTargetUnit()) + ( 100.00 * I2R(GetUnitAbilityLevelSwapped('A07N', GetTriggerUnit())) ) ) )
endif
endfunction
//===========================================================================
function InitTrig_chakra_magic takes nothing returns nothing
set gg_trg_chakra_magic = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_chakra_magic, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_chakra_magic, Condition( function Trig_chakra_magic_Conditions ) )
call TriggerAddAction( gg_trg_chakra_magic, function Trig_chakra_magic_Actions )
endfunction
//===========================================================================
// Trigger: Burrowstrike
//
// SPELLCASTER
//===========================================================================
function Trig_Burrowstrike_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06O' ) ) then
return false
endif
return true
endfunction
function Trig_Burrowstrike_Func004C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A06O', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Burrowstrike_Func005C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A06O', GetTriggerUnit()) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Burrowstrike_Func006C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A06O', GetTriggerUnit()) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Burrowstrike_Func007C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A06O', GetTriggerUnit()) == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Burrowstrike_Actions takes nothing returns nothing
set udg_BSUnit = GetTriggerUnit()
set udg_BSPosition[1] = GetLocationX(GetSpellTargetLoc())
set udg_BSPosition[2] = GetLocationY(GetSpellTargetLoc())
if ( Trig_Burrowstrike_Func004C() ) then
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), -100.00, AngleBetweenPoints(GetUnitLoc(GetTriggerUnit()), Location(udg_BSPosition[1], udg_BSPosition[2]))), GetUnitFacing(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A075', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A075', GetLastCreatedUnit(), ( R2I(DistanceBetweenPoints(GetUnitLoc(GetTriggerUnit()), GetSpellTargetLoc())) / 100 ) )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "impale", Location(udg_BSPosition[1], udg_BSPosition[2]) )
call TriggerSleepAction( ( DistanceBetweenPoints(GetUnitLoc(udg_BSUnit), Location(udg_BSPosition[1], udg_BSPosition[2])) / 4000.00 ) )
call SetUnitPositionLoc( udg_BSUnit, Location(udg_BSPosition[1], udg_BSPosition[2]) )
call SetUnitAnimation( udg_BSUnit, "morph ALTERNATE" )
else
endif
if ( Trig_Burrowstrike_Func005C() ) then
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), -100.00, AngleBetweenPoints(GetUnitLoc(GetTriggerUnit()), Location(udg_BSPosition[1], udg_BSPosition[2]))), GetUnitFacing(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A070', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A070', GetLastCreatedUnit(), ( R2I(DistanceBetweenPoints(GetUnitLoc(GetTriggerUnit()), GetSpellTargetLoc())) / 100 ) )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "impale", Location(udg_BSPosition[1], udg_BSPosition[2]) )
call TriggerSleepAction( ( DistanceBetweenPoints(GetUnitLoc(udg_BSUnit), Location(udg_BSPosition[1], udg_BSPosition[2])) / 4000.00 ) )
call SetUnitPositionLoc( udg_BSUnit, Location(udg_BSPosition[1], udg_BSPosition[2]) )
call SetUnitAnimation( udg_BSUnit, "morph ALTERNATE" )
else
endif
if ( Trig_Burrowstrike_Func006C() ) then
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), -100.00, AngleBetweenPoints(GetUnitLoc(GetTriggerUnit()), Location(udg_BSPosition[1], udg_BSPosition[2]))), GetUnitFacing(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A06Z', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A06Z', GetLastCreatedUnit(), ( R2I(DistanceBetweenPoints(GetUnitLoc(GetTriggerUnit()), GetSpellTargetLoc())) / 100 ) )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "impale", Location(udg_BSPosition[1], udg_BSPosition[2]) )
call TriggerSleepAction( ( DistanceBetweenPoints(GetUnitLoc(udg_BSUnit), Location(udg_BSPosition[1], udg_BSPosition[2])) / 4000.00 ) )
call SetUnitPositionLoc( udg_BSUnit, Location(udg_BSPosition[1], udg_BSPosition[2]) )
call SetUnitAnimation( udg_BSUnit, "morph ALTERNATE" )
else
endif
if ( Trig_Burrowstrike_Func007C() ) then
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), -100.00, AngleBetweenPoints(GetUnitLoc(GetTriggerUnit()), Location(udg_BSPosition[1], udg_BSPosition[2]))), GetUnitFacing(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A077', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A077', GetLastCreatedUnit(), ( R2I(DistanceBetweenPoints(GetUnitLoc(GetTriggerUnit()), GetSpellTargetLoc())) / 100 ) )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "impale", Location(udg_BSPosition[1], udg_BSPosition[2]) )
call TriggerSleepAction( ( DistanceBetweenPoints(GetUnitLoc(udg_BSUnit), Location(udg_BSPosition[1], udg_BSPosition[2])) / 4000.00 ) )
call SetUnitPositionLoc( udg_BSUnit, Location(udg_BSPosition[1], udg_BSPosition[2]) )
call SetUnitAnimation( udg_BSUnit, "morph ALTERNATE" )
else
endif
endfunction
//===========================================================================
function InitTrig_Burrowstrike takes nothing returns nothing
set gg_trg_Burrowstrike = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Burrowstrike, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Burrowstrike, Condition( function Trig_Burrowstrike_Conditions ) )
call TriggerAddAction( gg_trg_Burrowstrike, function Trig_Burrowstrike_Actions )
endfunction
//===========================================================================
// Trigger: Epicenter
//
// SPELLCASTER
//===========================================================================
function Trig_Epicenter_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06R' ) ) then
return false
endif
return true
endfunction
function Trig_Epicenter_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = ( 4 + ( GetUnitAbilityLevelSwapped('A06R', GetTriggerUnit()) * 2 ) )
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A07L', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A07L', GetLastCreatedUnit(), GetForLoopIndexA() )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "thunderclap" )
call TriggerSleepAction( 0.05 )
call TerrainDeformationRippleBJ( 0.03, false, GetUnitLoc(GetLastCreatedUnit()), ( 150.00 + ( 100.00 * I2R(GetForLoopIndexA()) ) ), ( 150.00 + ( 100.00 * I2R(GetForLoopIndexA()) ) ), 72.00, 0.03, 512 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Epicenter takes nothing returns nothing
set gg_trg_Epicenter = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Epicenter, EVENT_PLAYER_UNIT_SPELL_FINISH )
call TriggerAddCondition( gg_trg_Epicenter, Condition( function Trig_Epicenter_Conditions ) )
call TriggerAddAction( gg_trg_Epicenter, function Trig_Epicenter_Actions )
endfunction
//===========================================================================
// Trigger: Entrench
//
// SPELLCASTER
//===========================================================================
function Trig_Entrench_Func001Func002001 takes nothing returns boolean
return ( GetUnitTypeId(GetDyingUnit()) == 'U00K' )
endfunction
function Trig_Entrench_Func001Func002002 takes nothing returns boolean
return ( GetUnitTypeId(GetDyingUnit()) == 'U00I' )
endfunction
function Trig_Entrench_Func001C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Entrench_Func001Func002001(), Trig_Entrench_Func001Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_Entrench_Func003Func002001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'U00K' )
endfunction
function Trig_Entrench_Func003Func002002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'U00I' )
endfunction
function Trig_Entrench_Func003C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Entrench_Func003Func002001(), Trig_Entrench_Func003Func002002() ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("burrow") ) ) then
return false
endif
return true
endfunction
function Trig_Entrench_Func004Func002001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'U00K' )
endfunction
function Trig_Entrench_Func004Func002002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'U00I' )
endfunction
function Trig_Entrench_Func004C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Entrench_Func004Func002001(), Trig_Entrench_Func004Func002002() ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("unburrow") ) ) then
return false
endif
return true
endfunction
function Trig_Entrench_Actions takes nothing returns nothing
if ( Trig_Entrench_Func001C() ) then
set udg_Burrowed[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = false
else
endif
if ( Trig_Entrench_Func003C() ) then
set udg_Burrowed[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = true
else
endif
if ( Trig_Entrench_Func004C() ) then
set udg_Burrowed[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = false
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A07G', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A07G', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A06U', GetTriggerUnit()) )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "stomp" )
else
endif
endfunction
//===========================================================================
function InitTrig_Entrench takes nothing returns nothing
set gg_trg_Entrench = CreateTrigger( )
call DisableTrigger( gg_trg_Entrench )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Entrench, EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Entrench, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddAction( gg_trg_Entrench, function Trig_Entrench_Actions )
endfunction
//===========================================================================
// Trigger: Meat Hook Cast
//===========================================================================
function Trig_Meat_Hook_Cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06I' ) ) then
return false
endif
return true
endfunction
function Trig_Meat_Hook_Cast_Actions takes nothing returns nothing
set udg_MHLevel = GetUnitAbilityLevelSwapped('A06I', GetTriggerUnit())
set udg_MHAngle = AngleBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()), GetSpellTargetLoc())
set udg_MHUnits[1] = GetTriggerUnit()
call EnableTrigger( gg_trg_Meat_Hook_Extend )
endfunction
//===========================================================================
function InitTrig_Meat_Hook_Cast takes nothing returns nothing
set gg_trg_Meat_Hook_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Meat_Hook_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Meat_Hook_Cast, Condition( function Trig_Meat_Hook_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Meat_Hook_Cast, function Trig_Meat_Hook_Cast_Actions )
endfunction
//===========================================================================
// Trigger: Meat Hook Extend
//===========================================================================
function Trig_Meat_Hook_Extend_Func001Func007001003001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003001002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A04R', GetFilterUnit()) != 1 )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Meat_Hook_Extend_Func001Func007001003001001(), Trig_Meat_Hook_Extend_Func001Func007001003001002() )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003002001 takes nothing returns boolean
return ( IsUnitDeadBJ(GetFilterUnit()) == false )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003002002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'u00H' )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003002002002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'U00F' )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003002002002002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_ANCIENT) == false )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003002002002002002 takes nothing returns boolean
return ( 'Bmlt' == 'Bmlt' )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003002002002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Meat_Hook_Extend_Func001Func007001003002002002002001(), Trig_Meat_Hook_Extend_Func001Func007001003002002002002002() )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003002002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Meat_Hook_Extend_Func001Func007001003002002002001(), Trig_Meat_Hook_Extend_Func001Func007001003002002002002() )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Meat_Hook_Extend_Func001Func007001003002002001(), Trig_Meat_Hook_Extend_Func001Func007001003002002002() )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Meat_Hook_Extend_Func001Func007001003002001(), Trig_Meat_Hook_Extend_Func001Func007001003002002() )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Meat_Hook_Extend_Func001Func007001003001(), Trig_Meat_Hook_Extend_Func001Func007001003002() )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007Func001001 takes nothing returns boolean
return ( udg_ChainLinkNumber > 3 )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007Func002C takes nothing returns boolean
if ( not ( IsUnitAlly(udg_MHUnits[2], GetOwningPlayer(udg_MHUnits[1])) == false ) ) then
return false
endif
return true
endfunction
function Trig_Meat_Hook_Extend_Func001Func007Func003C takes nothing returns boolean
if ( not ( udg_MHUnits[2] == null ) ) then
return false
endif
return true
endfunction
function Trig_Meat_Hook_Extend_Func001Func007A takes nothing returns nothing
if ( Trig_Meat_Hook_Extend_Func001Func007Func001001() ) then
set udg_MHUnits[2] = GetEnumUnit()
else
call DoNothing( )
endif
if ( Trig_Meat_Hook_Extend_Func001Func007Func002C() ) then
call UnitDamageTargetBJ( udg_MHUnits[1], udg_MHUnits[2], ( I2R(udg_MHLevel) * 100.00 ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_ENHANCED )
else
endif
if ( Trig_Meat_Hook_Extend_Func001Func007Func003C() ) then
call DoNothing( )
else
call DisableTrigger( GetTriggeringTrigger() )
call EnableTrigger( gg_trg_Meat_Hook_Retract )
endif
endfunction
function Trig_Meat_Hook_Extend_Func001C takes nothing returns boolean
if ( not ( udg_ChainLinkNumber < ( 5 + ( 6 * udg_MHLevel ) ) ) ) then
return false
endif
return true
endfunction
function Trig_Meat_Hook_Extend_Actions takes nothing returns nothing
if ( Trig_Meat_Hook_Extend_Func001C() ) then
set udg_ChainLinkNumber = ( udg_ChainLinkNumber + 1 )
call CreateNUnitsAtLoc( 1, 'u00H', GetOwningPlayer(udg_MHUnits[1]), PolarProjectionBJ(GetUnitLoc(udg_MHUnits[1]), ( I2R(udg_ChainLinkNumber) * 40.00 ), udg_MHAngle), udg_MHAngle )
set udg_ChainLinks[udg_ChainLinkNumber] = GetLastCreatedUnit()
call ForGroupBJ( GetUnitsInRangeOfLocMatching(115.00, GetUnitLoc(GetLastCreatedUnit()), Condition(function Trig_Meat_Hook_Extend_Func001Func007001003)), function Trig_Meat_Hook_Extend_Func001Func007A )
else
call DisableTrigger( GetTriggeringTrigger() )
call EnableTrigger( gg_trg_Meat_Hook_Retract )
endif
endfunction
//===========================================================================
function InitTrig_Meat_Hook_Extend takes nothing returns nothing
set gg_trg_Meat_Hook_Extend = CreateTrigger( )
call DisableTrigger( gg_trg_Meat_Hook_Extend )
call TriggerRegisterTimerEventPeriodic( gg_trg_Meat_Hook_Extend, 0.03 )
call TriggerAddAction( gg_trg_Meat_Hook_Extend, function Trig_Meat_Hook_Extend_Actions )
endfunction
//===========================================================================
// Trigger: Meat Hook Retract
//===========================================================================
function Trig_Meat_Hook_Retract_Func004C takes nothing returns boolean
if ( not ( udg_ChainLinkNumber == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Meat_Hook_Retract_Actions takes nothing returns nothing
call SetUnitPositionLoc( udg_MHUnits[2], GetUnitLoc(udg_ChainLinks[udg_ChainLinkNumber]) )
call RemoveUnit( udg_ChainLinks[udg_ChainLinkNumber] )
set udg_ChainLinkNumber = ( udg_ChainLinkNumber - 1 )
if ( Trig_Meat_Hook_Retract_Func004C() ) then
set udg_MHUnits[2] = null
call DisableTrigger( GetTriggeringTrigger() )
else
endif
endfunction
//===========================================================================
function InitTrig_Meat_Hook_Retract takes nothing returns nothing
set gg_trg_Meat_Hook_Retract = CreateTrigger( )
call DisableTrigger( gg_trg_Meat_Hook_Retract )
call TriggerRegisterTimerEventPeriodic( gg_trg_Meat_Hook_Retract, 0.03 )
call TriggerAddAction( gg_trg_Meat_Hook_Retract, function Trig_Meat_Hook_Retract_Actions )
endfunction
//===========================================================================
// Trigger: Flesh Heap
//===========================================================================
function Trig_Flesh_Heap_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A06D', GetKillingUnitBJ()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Flesh_Heap_Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Flesh_Heap_Func003C takes nothing returns boolean
if ( not ( udg_FleshHeap >= 1.00 ) ) then
return false
endif
return true
endfunction
function Trig_Flesh_Heap_Actions takes nothing returns nothing
set udg_FleshHeap = ( udg_FleshHeap + ( 0.03 * I2R(GetUnitAbilityLevelSwapped('A06D', GetKillingUnitBJ())) ) )
if ( Trig_Flesh_Heap_Func002C() ) then
set udg_FleshHeap = ( udg_FleshHeap + ( 0.27 * I2R(GetUnitAbilityLevelSwapped('A06D', GetKillingUnitBJ())) ) )
else
endif
if ( Trig_Flesh_Heap_Func003C() ) then
set udg_FleshHeap = ( udg_FleshHeap - 1 )
call ModifyHeroStat( bj_HEROSTAT_STR, GetKillingUnitBJ(), bj_MODIFYMETHOD_ADD, 1 )
else
endif
endfunction
//===========================================================================
function InitTrig_Flesh_Heap takes nothing returns nothing
set gg_trg_Flesh_Heap = CreateTrigger( )
call DisableTrigger( gg_trg_Flesh_Heap )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Flesh_Heap, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Flesh_Heap, Condition( function Trig_Flesh_Heap_Conditions ) )
call TriggerAddAction( gg_trg_Flesh_Heap, function Trig_Flesh_Heap_Actions )
endfunction
//===========================================================================
// Trigger: Death Pulse
//
// SPELLCASTER
//===========================================================================
function Trig_Death_Pulse_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05V' ) ) then
return false
endif
return true
endfunction
function Trig_Death_Pulse_Actions takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A05W', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A05W', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A05V', GetTriggerUnit()) )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "fanofknives" )
endfunction
//===========================================================================
function InitTrig_Death_Pulse takes nothing returns nothing
set gg_trg_Death_Pulse = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Death_Pulse, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Death_Pulse, Condition( function Trig_Death_Pulse_Conditions ) )
call TriggerAddAction( gg_trg_Death_Pulse, function Trig_Death_Pulse_Actions )
endfunction
//===========================================================================
// Trigger: Reaper Scythe
//===========================================================================
function Trig_Reaper_Scythe_Func001001 takes nothing returns boolean
return ( GetSpellAbilityId() == 'A067' )
endfunction
function Trig_Reaper_Scythe_Func001002 takes nothing returns boolean
return ( GetSpellAbilityId() == 'A08P' )
endfunction
function Trig_Reaper_Scythe_Conditions takes nothing returns boolean
if ( not GetBooleanOr( Trig_Reaper_Scythe_Func001001(), Trig_Reaper_Scythe_Func001002() ) ) then
return false
endif
return true
endfunction
function Trig_Reaper_Scythe_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A067', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Reaper_Scythe_Func003Func003001 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A067', GetTriggerUnit()) == 2 )
endfunction
function Trig_Reaper_Scythe_Func003Func003002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A08P', GetTriggerUnit()) == 1 )
endfunction
function Trig_Reaper_Scythe_Func003C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Reaper_Scythe_Func003Func003001(), Trig_Reaper_Scythe_Func003Func003002() ) ) then
return false
endif
return true
endfunction
function Trig_Reaper_Scythe_Func004Func003001 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A067', GetTriggerUnit()) == 3 )
endfunction
function Trig_Reaper_Scythe_Func004Func003002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A08P', GetTriggerUnit()) == 2 )
endfunction
function Trig_Reaper_Scythe_Func004C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Reaper_Scythe_Func004Func003001(), Trig_Reaper_Scythe_Func004Func003002() ) ) then
return false
endif
return true
endfunction
function Trig_Reaper_Scythe_Func005C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A08P', GetTriggerUnit()) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Reaper_Scythe_Actions takes nothing returns nothing
if ( Trig_Reaper_Scythe_Func002C() ) then
set udg_BSDam = 0.40
else
call DoNothing( )
endif
if ( Trig_Reaper_Scythe_Func003C() ) then
set udg_BSDam = 0.60
else
call DoNothing( )
endif
if ( Trig_Reaper_Scythe_Func004C() ) then
set udg_BSDam = 0.90
else
call DoNothing( )
endif
if ( Trig_Reaper_Scythe_Func005C() ) then
set udg_BSDam = 1.10
else
call DoNothing( )
endif
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), ( udg_BSDam * ( GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetSpellTargetUnit()) - GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_FIRE )
endfunction
//===========================================================================
function InitTrig_Reaper_Scythe takes nothing returns nothing
set gg_trg_Reaper_Scythe = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Reaper_Scythe, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Reaper_Scythe, Condition( function Trig_Reaper_Scythe_Conditions ) )
call TriggerAddAction( gg_trg_Reaper_Scythe, function Trig_Reaper_Scythe_Actions )
endfunction
//===========================================================================
// Trigger: Sadist
//===========================================================================
function Trig_Sadist_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetKillingUnitBJ(), 'B02R') == true ) ) then
return false
endif
return true
endfunction
function Trig_Sadist_Actions takes nothing returns nothing
call SetUnitManaBJ( GetKillingUnitBJ(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetKillingUnitBJ()) + ( 12.00 * I2R(GetUnitAbilityLevelSwapped('A060', GetKillingUnitBJ())) ) ) )
endfunction
//===========================================================================
function InitTrig_Sadist takes nothing returns nothing
set gg_trg_Sadist = CreateTrigger( )
call DisableTrigger( gg_trg_Sadist )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Sadist, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Sadist, Condition( function Trig_Sadist_Conditions ) )
call TriggerAddAction( gg_trg_Sadist, function Trig_Sadist_Actions )
endfunction
//===========================================================================
// Trigger: Laser
//===========================================================================
function Trig_Laser_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A049' ) ) then
return false
endif
return true
endfunction
function Trig_Laser_Actions takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), ( I2R(GetUnitAbilityLevelSwapped('A049', GetTriggerUnit())) * 80.00 ), ATTACK_TYPE_MELEE, DAMAGE_TYPE_UNKNOWN )
endfunction
//===========================================================================
function InitTrig_Laser takes nothing returns nothing
set gg_trg_Laser = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Laser, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Laser, Condition( function Trig_Laser_Conditions ) )
call TriggerAddAction( gg_trg_Laser, function Trig_Laser_Actions )
endfunction
//===========================================================================
// Trigger: Rearm
//===========================================================================
function Trig_Rearm_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A065' ) ) then
return false
endif
return true
endfunction
function Trig_Rearm_Actions takes nothing returns nothing
call UnitResetCooldown( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Rearm takes nothing returns nothing
set gg_trg_Rearm = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Rearm, EVENT_PLAYER_UNIT_SPELL_FINISH )
call TriggerAddCondition( gg_trg_Rearm, Condition( function Trig_Rearm_Conditions ) )
call TriggerAddAction( gg_trg_Rearm, function Trig_Rearm_Actions )
endfunction
//===========================================================================
// Trigger: Nightmare Attack
//
// I left this as "swan" because it needs to have a vision radius
//===========================================================================
function Trig_Nightmare_Attack_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'B02F') == true ) ) then
return false
endif
return true
endfunction
function Trig_Nightmare_Attack_Actions takes nothing returns nothing
call TriggerSleepAction( 0.25 )
set udg_TempLoc = GetUnitLoc(GetAttackedUnitBJ())
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(udg_NightCaster), udg_TempLoc, bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call UnitAddAbilityBJ( 'A04Z', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A04Z', GetLastCreatedUnit(), udg_NightLvl )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "sleep", GetAttacker() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
endfunction
//===========================================================================
function InitTrig_Nightmare_Attack takes nothing returns nothing
set gg_trg_Nightmare_Attack = CreateTrigger( )
call DisableTrigger( gg_trg_Nightmare_Attack )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Nightmare_Attack, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Nightmare_Attack, Condition( function Trig_Nightmare_Attack_Conditions ) )
call TriggerAddAction( gg_trg_Nightmare_Attack, function Trig_Nightmare_Attack_Actions )
endfunction
//===========================================================================
// Trigger: Nightmare HP
//===========================================================================
function Trig_Nightmare_HP_Func002001002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B02F') == true )
endfunction
function Trig_Nightmare_HP_Func002Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) > 20.00 ) ) then
return false
endif
return true
endfunction
function Trig_Nightmare_HP_Func002A takes nothing returns nothing
set udg_NightBool = true
if ( Trig_Nightmare_HP_Func002Func002C() ) then
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - 20.00 ) )
else
call UnitDamageTargetBJ( udg_NightCaster, GetEnumUnit(), 50.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )
endif
endfunction
function Trig_Nightmare_HP_Func003C takes nothing returns boolean
if ( not ( udg_NightBool == false ) ) then
return false
endif
return true
endfunction
function Trig_Nightmare_HP_Actions takes nothing returns nothing
set udg_NightBool = false
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Nightmare_HP_Func002001002)), function Trig_Nightmare_HP_Func002A )
if ( Trig_Nightmare_HP_Func003C() ) then
call DisableTrigger( GetTriggeringTrigger() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Nightmare_HP takes nothing returns nothing
set gg_trg_Nightmare_HP = CreateTrigger( )
call DisableTrigger( gg_trg_Nightmare_HP )
call TriggerRegisterTimerEventPeriodic( gg_trg_Nightmare_HP, 1.00 )
call TriggerAddAction( gg_trg_Nightmare_HP, function Trig_Nightmare_HP_Actions )
endfunction
//===========================================================================
// Trigger: Nightmare
//===========================================================================
function Trig_Nightmare_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A04Y' ) ) then
return false
endif
return true
endfunction
function Trig_Nightmare_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_Nightmare_HP )
set udg_NightCaster = GetTriggerUnit()
set udg_NightLvl = GetUnitAbilityLevelSwapped('A04Y', GetTriggerUnit())
endfunction
//===========================================================================
function InitTrig_Nightmare takes nothing returns nothing
set gg_trg_Nightmare = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Nightmare, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Nightmare, Condition( function Trig_Nightmare_Conditions ) )
call TriggerAddAction( gg_trg_Nightmare, function Trig_Nightmare_Actions )
endfunction
//===========================================================================
// Trigger: Fiends Grip stop
//===========================================================================
function Trig_Fiends_Grip_stop_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02Q' ) ) then
return false
endif
return true
endfunction
function Trig_Fiends_Grip_stop_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Fiends_Grip_mana )
endfunction
//===========================================================================
function InitTrig_Fiends_Grip_stop takes nothing returns nothing
set gg_trg_Fiends_Grip_stop = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Fiends_Grip_stop, EVENT_PLAYER_UNIT_SPELL_ENDCAST )
call TriggerAddCondition( gg_trg_Fiends_Grip_stop, Condition( function Trig_Fiends_Grip_stop_Conditions ) )
call TriggerAddAction( gg_trg_Fiends_Grip_stop, function Trig_Fiends_Grip_stop_Actions )
endfunction
//===========================================================================
// Trigger: Fiends Grip mana
//===========================================================================
function Trig_Fiends_Grip_mana_Func004C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, udg_FGCaster) <= 20.00 ) ) then
return false
endif
return true
endfunction
function Trig_Fiends_Grip_mana_Actions takes nothing returns nothing
set udg_FGNum = ( 4.00 + ( 4.00 * I2R(GetUnitAbilityLevelSwapped('A02Q', udg_FGCaster)) ) )
call SetUnitManaBJ( udg_FGCaster, ( GetUnitStateSwap(UNIT_STATE_MANA, udg_FGCaster) - udg_FGNum ) )
call UnitDamageTargetBJ( udg_FGCaster, udg_FGCaster, udg_FGNum, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MIND )
if ( Trig_Fiends_Grip_mana_Func004C() ) then
call IssueImmediateOrderBJ( udg_FGCaster, "stop" )
call DisableTrigger( GetTriggeringTrigger() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Fiends_Grip_mana takes nothing returns nothing
set gg_trg_Fiends_Grip_mana = CreateTrigger( )
call DisableTrigger( gg_trg_Fiends_Grip_mana )
call TriggerRegisterTimerEventPeriodic( gg_trg_Fiends_Grip_mana, 0.20 )
call TriggerAddAction( gg_trg_Fiends_Grip_mana, function Trig_Fiends_Grip_mana_Actions )
endfunction
//===========================================================================
// Trigger: Fiends Grip begin
//===========================================================================
function Trig_Fiends_Grip_begin_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02Q' ) ) then
return false
endif
return true
endfunction
function Trig_Fiends_Grip_begin_Actions takes nothing returns nothing
set udg_FGCaster = GetTriggerUnit()
call EnableTrigger( gg_trg_Fiends_Grip_mana )
call TriggerSleepAction( 5.00 )
call DisableTrigger( gg_trg_Fiends_Grip_mana )
endfunction
//===========================================================================
function InitTrig_Fiends_Grip_begin takes nothing returns nothing
set gg_trg_Fiends_Grip_begin = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Fiends_Grip_begin, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Fiends_Grip_begin, Condition( function Trig_Fiends_Grip_begin_Conditions ) )
call TriggerAddAction( gg_trg_Fiends_Grip_begin, function Trig_Fiends_Grip_begin_Actions )
endfunction
//===========================================================================
// Trigger: KS active
//===========================================================================
function Trig_KS_active_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(udg_Leviathan, 'BNsi') == false ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(udg_Leviathan, 'B01T') == false ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(udg_Leviathan, 'B02M') == false ) ) then
return false
endif
return true
endfunction
function Trig_KS_active_Actions takes nothing returns nothing
call UnitRemoveBuffsBJ( bj_REMOVEBUFFS_NEGATIVE, udg_Leviathan )
endfunction
//===========================================================================
function InitTrig_KS_active takes nothing returns nothing
set gg_trg_KS_active = CreateTrigger( )
call DisableTrigger( gg_trg_KS_active )
call TriggerRegisterTimerEventPeriodic( gg_trg_KS_active, 10.00 )
call TriggerAddCondition( gg_trg_KS_active, Condition( function Trig_KS_active_Conditions ) )
call TriggerAddAction( gg_trg_KS_active, function Trig_KS_active_Actions )
endfunction
//===========================================================================
// Trigger: KS learned
//===========================================================================
function Trig_KS_learned_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A04E' ) ) then
return false
endif
return true
endfunction
function Trig_KS_learned_Actions takes nothing returns nothing
set udg_Leviathan = GetTriggerUnit()
call EnableTrigger( gg_trg_KS_active )
endfunction
//===========================================================================
function InitTrig_KS_learned takes nothing returns nothing
set gg_trg_KS_learned = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_KS_learned, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_KS_learned, Condition( function Trig_KS_learned_Conditions ) )
call TriggerAddAction( gg_trg_KS_learned, function Trig_KS_learned_Actions )
endfunction
//===========================================================================
// Trigger: Gush
//===========================================================================
function Trig_Gush_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A046' ) ) then
return false
endif
return true
endfunction
function Trig_Gush_Actions takes nothing returns nothing
local unit t=GetSpellTargetUnit()
local real gush = ( 60.00 + ( 50.00 * I2R(GetUnitAbilityLevelSwapped('A046', GetTriggerUnit())) ) )
call TriggerSleepAction( 0.00 )
call AddSpecialEffectTargetUnitBJ( "chest", t , "Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl" )
call UnitDamageTargetBJ( GetTriggerUnit(), t , gush, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_COLD )
set t=null
endfunction
//===========================================================================
function InitTrig_Gush takes nothing returns nothing
set gg_trg_Gush = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Gush, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Gush, Condition( function Trig_Gush_Conditions ) )
call TriggerAddAction( gg_trg_Gush, function Trig_Gush_Actions )
endfunction
//===========================================================================
// Trigger: ravage
//
// SPELLCASTER
//===========================================================================
function Trig_ravage_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03Z' ) ) then
return false
endif
return true
endfunction
function Trig_ravage_Actions takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A084', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A084', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A03Z', GetTriggerUnit()) )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "impale", PolarProjectionBJ(udg_TempLoc, 100.00, ( 45.00 * I2R(GetForLoopIndexA()) )) )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveLocation(udg_TempLoc)
endfunction
//===========================================================================
function InitTrig_ravage takes nothing returns nothing
set gg_trg_ravage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ravage, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ravage, Condition( function Trig_ravage_Conditions ) )
call TriggerAddAction( gg_trg_ravage, function Trig_ravage_Actions )
endfunction
//===========================================================================
// Trigger: overgrowth
//
// SPELLCASTER
//===========================================================================
function Trig_overgrowth_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07Z' ) ) then
return false
endif
return true
endfunction
function Trig_overgrowth_Func001001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_overgrowth_Func001001003002001 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_overgrowth_Func001001003002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_overgrowth_Func001001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_overgrowth_Func001001003002001(), Trig_overgrowth_Func001001003002002() )
endfunction
function Trig_overgrowth_Func001001003 takes nothing returns boolean
return GetBooleanAnd( Trig_overgrowth_Func001001003001(), Trig_overgrowth_Func001001003002() )
endfunction
function Trig_overgrowth_Func001A takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A06T', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A06T', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A07Z', GetTriggerUnit()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "entanglingroots", GetEnumUnit() )
endfunction
function Trig_overgrowth_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocMatching(750.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_overgrowth_Func001001003)), function Trig_overgrowth_Func001A )
endfunction
//===========================================================================
function InitTrig_overgrowth takes nothing returns nothing
set gg_trg_overgrowth = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_overgrowth, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_overgrowth, Condition( function Trig_overgrowth_Conditions ) )
call TriggerAddAction( gg_trg_overgrowth, function Trig_overgrowth_Actions )
endfunction
//===========================================================================
// Trigger: assassinate
//
// -Needs sight range, so I left it
//===========================================================================
function Trig_assassinate_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetOrderedUnit()) == 'Usyl' ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("thunderbolt") ) ) then
return false
endif
return true
endfunction
function Trig_assassinate_Actions takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetOrderTargetUnit())
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetOrderedUnit()), GetUnitLoc(GetOrderTargetUnit()), bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call UnitAddAbilityBJ( 'A03W', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "faeriefire", GetOrderTargetUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
endfunction
//===========================================================================
function InitTrig_assassinate takes nothing returns nothing
set gg_trg_assassinate = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_assassinate, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerAddCondition( gg_trg_assassinate, Condition( function Trig_assassinate_Conditions ) )
call TriggerAddAction( gg_trg_assassinate, function Trig_assassinate_Actions )
endfunction
//===========================================================================
// Trigger: Natures Guise check
//===========================================================================
function Trig_Natures_Guise_check_Func003001002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B021') == true )
endfunction
function Trig_Natures_Guise_check_Func003Func003Func001Func001C takes nothing returns boolean
if ( ( GetDestructableTypeId(GetEnumDestructable()) == 'ATtr' ) ) then
return true
endif
if ( ( GetDestructableTypeId(GetEnumDestructable()) == 'ATtc' ) ) then
return true
endif
return false
endfunction
function Trig_Natures_Guise_check_Func003Func003Func001C takes nothing returns boolean
if ( not Trig_Natures_Guise_check_Func003Func003Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Natures_Guise_check_Func003Func003A takes nothing returns nothing
if ( Trig_Natures_Guise_check_Func003Func003Func001C() ) then
set udg_NGUS = true
else
call DoNothing( )
endif
endfunction
function Trig_Natures_Guise_check_Func003Func004C takes nothing returns boolean
if ( not ( udg_NGUS == false ) ) then
return false
endif
return true
endfunction
function Trig_Natures_Guise_check_Func003A takes nothing returns nothing
set udg_NGBool = true
set udg_NGUS = false
call EnumDestructablesInCircleBJ( 375.00, GetUnitLoc(GetEnumUnit()), function Trig_Natures_Guise_check_Func003Func003A )
if ( Trig_Natures_Guise_check_Func003Func004C() ) then
call UnitRemoveBuffBJ( 'B021', GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Natures_Guise_check_Func004C takes nothing returns boolean
if ( not ( udg_NGBool == false ) ) then
return false
endif
return true
endfunction
function Trig_Natures_Guise_check_Actions takes nothing returns nothing
set udg_NGBool = false
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Natures_Guise_check_Func003001002)), function Trig_Natures_Guise_check_Func003A )
if ( Trig_Natures_Guise_check_Func004C() ) then
call DisableTrigger( GetTriggeringTrigger() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Natures_Guise_check takes nothing returns nothing
set gg_trg_Natures_Guise_check = CreateTrigger( )
call DisableTrigger( gg_trg_Natures_Guise_check )
call TriggerRegisterTimerEventPeriodic( gg_trg_Natures_Guise_check, 1.00 )
call TriggerAddAction( gg_trg_Natures_Guise_check, function Trig_Natures_Guise_check_Actions )
endfunction
//===========================================================================
// Trigger: Natures Guise cast
//===========================================================================
function Trig_Natures_Guise_cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01Z' ) ) then
return false
endif
return true
endfunction
function Trig_Natures_Guise_cast_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_Natures_Guise_check )
endfunction
//===========================================================================
function InitTrig_Natures_Guise_cast takes nothing returns nothing
set gg_trg_Natures_Guise_cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Natures_Guise_cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Natures_Guise_cast, Condition( function Trig_Natures_Guise_cast_Conditions ) )
call TriggerAddAction( gg_trg_Natures_Guise_cast, function Trig_Natures_Guise_cast_Actions )
endfunction
//===========================================================================
// Trigger: Berserker Rage learned
//===========================================================================
function Trig_Berserker_Rage_learned_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0BE' ) ) then
return false
endif
return true
endfunction
function Trig_Berserker_Rage_learned_Actions takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'A09E', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A0BE', GetTriggerUnit()) )
endfunction
//===========================================================================
function InitTrig_Berserker_Rage_learned takes nothing returns nothing
set gg_trg_Berserker_Rage_learned = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Berserker_Rage_learned, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Berserker_Rage_learned, Condition( function Trig_Berserker_Rage_learned_Conditions ) )
call TriggerAddAction( gg_trg_Berserker_Rage_learned, function Trig_Berserker_Rage_learned_Actions )
endfunction
//===========================================================================
// Trigger: Berserker Rage
//===========================================================================
function Trig_Berserker_Rage_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0BE' ) ) then
return false
endif
return true
endfunction
function Trig_Berserker_Rage_Actions takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'A09E', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A0BE', GetTriggerUnit()) )
endfunction
//===========================================================================
function InitTrig_Berserker_Rage takes nothing returns nothing
set gg_trg_Berserker_Rage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Berserker_Rage, EVENT_PLAYER_UNIT_SPELL_FINISH )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Berserker_Rage, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Berserker_Rage, Condition( function Trig_Berserker_Rage_Conditions ) )
call TriggerAddAction( gg_trg_Berserker_Rage, function Trig_Berserker_Rage_Actions )
endfunction
//===========================================================================
// Trigger: Spider
//===========================================================================
function Trig_Spider_Conditions takes nothing returns boolean
if ( not ( IsUnitIllusionBJ(GetTriggerUnit()) == false ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'U006' ) ) then
return false
endif
return true
endfunction
function Trig_Spider_Actions takes nothing returns nothing
set udg_Spider = GetTriggerUnit()
endfunction
//===========================================================================
function InitTrig_Spider takes nothing returns nothing
set gg_trg_Spider = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Spider, GetEntireMapRect() )
call TriggerAddCondition( gg_trg_Spider, Condition( function Trig_Spider_Conditions ) )
call TriggerAddAction( gg_trg_Spider, function Trig_Spider_Actions )
endfunction
//===========================================================================
// Trigger: Spin Web Limit
//===========================================================================
function Trig_Spin_Web_Limit_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'o003' ) ) then
return false
endif
return true
endfunction
function Trig_Spin_Web_Limit_Func004C takes nothing returns boolean
if ( not ( udg_WebInt < ( GetUnitAbilityLevelSwapped('A0BG', GetSummoningUnit()) * 2 ) ) ) then
return false
endif
return true
endfunction
function Trig_Spin_Web_Limit_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_Spin_Web_Invis_Remove )
call SetUnitVertexColorBJ( GetSummonedUnit(), 100, 100, 100, 70.00 )
call UnitAddAbilityBJ( 'Aloc', GetSummonedUnit() )
if ( Trig_Spin_Web_Limit_Func004C() ) then
call KillUnit( udg_WebGroup[( udg_WebInt + 1 )] )
set udg_WebInt = ( udg_WebInt + 1 )
set udg_WebGroup[udg_WebInt] = GetTriggerUnit()
else
set udg_WebInt = 1
call KillUnit( udg_WebGroup[udg_WebInt] )
set udg_WebGroup[udg_WebInt] = GetTriggerUnit()
endif
endfunction
//===========================================================================
function InitTrig_Spin_Web_Limit takes nothing returns nothing
set gg_trg_Spin_Web_Limit = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Spin_Web_Limit, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Spin_Web_Limit, Condition( function Trig_Spin_Web_Limit_Conditions ) )
call TriggerAddAction( gg_trg_Spin_Web_Limit, function Trig_Spin_Web_Limit_Actions )
endfunction
//===========================================================================
// Trigger: Spin Web Invis Remove
//===========================================================================
function Trig_Spin_Web_Invis_Remove_Func001C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(udg_Spider, 'B01C') == true ) ) then
return false
endif
return true
endfunction
function Trig_Spin_Web_Invis_Remove_Func002C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(udg_Spider, 'B01C') == false ) ) then
return false
endif
return true
endfunction
function Trig_Spin_Web_Invis_Remove_Actions takes nothing returns nothing
if ( Trig_Spin_Web_Invis_Remove_Func001C() ) then
call UnitAddAbilityBJ( 'A021', udg_Spider )
else
call DoNothing( )
endif
if ( Trig_Spin_Web_Invis_Remove_Func002C() ) then
call UnitRemoveAbilityBJ( 'A021', udg_Spider )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Spin_Web_Invis_Remove takes nothing returns nothing
set gg_trg_Spin_Web_Invis_Remove = CreateTrigger( )
call DisableTrigger( gg_trg_Spin_Web_Invis_Remove )
call TriggerRegisterTimerEventPeriodic( gg_trg_Spin_Web_Invis_Remove, 1.50 )
call TriggerAddAction( gg_trg_Spin_Web_Invis_Remove, function Trig_Spin_Web_Invis_Remove_Actions )
endfunction
//===========================================================================
// Trigger: Spirit Bear learned
//===========================================================================
function Trig_Spirit_Bear_learned_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0A5' ) ) then
return false
endif
return true
endfunction
function Trig_Spirit_Bear_learned_Func002001002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetTriggerUnit()) )
endfunction
function Trig_Spirit_Bear_learned_Func002001002002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Spirit_Bear_learned_Func002001002002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == false )
endfunction
function Trig_Spirit_Bear_learned_Func002001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Spirit_Bear_learned_Func002001002002001(), Trig_Spirit_Bear_learned_Func002001002002002() )
endfunction
function Trig_Spirit_Bear_learned_Func002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Spirit_Bear_learned_Func002001002001(), Trig_Spirit_Bear_learned_Func002001002002() )
endfunction
function Trig_Spirit_Bear_learned_Func002Func001Func003C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0A5', GetTriggerUnit()) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Spirit_Bear_learned_Func002Func001Func004C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0A5', GetTriggerUnit()) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Spirit_Bear_learned_Func002Func001Func005C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0A5', GetTriggerUnit()) == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Spirit_Bear_learned_Func002Func001Func010C takes nothing returns boolean
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n01C' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n018' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n004' ) ) then
return true
endif
return false
endfunction
function Trig_Spirit_Bear_learned_Func002Func001C takes nothing returns boolean
if ( not Trig_Spirit_Bear_learned_Func002Func001Func010C() ) then
return false
endif
return true
endfunction
function Trig_Spirit_Bear_learned_Func002A takes nothing returns nothing
if ( Trig_Spirit_Bear_learned_Func002Func001C() ) then
set udg_BearPercentLife = GetUnitLifePercent(GetEnumUnit())
call RemoveUnit( GetEnumUnit() )
if ( Trig_Spirit_Bear_learned_Func002Func001Func003C() ) then
call CreateNUnitsAtLoc( 1, 'n018', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call AddSpecialEffectTargetUnitBJ( "chest", GetLastCreatedUnit(), "Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl" )
else
call DoNothing( )
endif
if ( Trig_Spirit_Bear_learned_Func002Func001Func004C() ) then
call CreateNUnitsAtLoc( 1, 'n01C', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call AddSpecialEffectTargetUnitBJ( "chest", GetLastCreatedUnit(), "Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl" )
else
call DoNothing( )
endif
if ( Trig_Spirit_Bear_learned_Func002Func001Func005C() ) then
call CreateNUnitsAtLoc( 1, 'n01G', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call AddSpecialEffectTargetUnitBJ( "chest", GetLastCreatedUnit(), "Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl" )
else
call DoNothing( )
endif
call SetUnitAbilityLevelSwapped( 'A09Y', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0A5', udg_Yggrasil) )
call SetUnitLifePercentBJ( GetLastCreatedUnit(), udg_BearPercentLife )
set udg_Bear = GetLastCreatedUnit()
else
call DoNothing( )
endif
endfunction
function Trig_Spirit_Bear_learned_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Spirit_Bear_learned_Func002001002)), function Trig_Spirit_Bear_learned_Func002A )
endfunction
//===========================================================================
function InitTrig_Spirit_Bear_learned takes nothing returns nothing
set gg_trg_Spirit_Bear_learned = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Spirit_Bear_learned, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Spirit_Bear_learned, Condition( function Trig_Spirit_Bear_learned_Conditions ) )
call TriggerAddAction( gg_trg_Spirit_Bear_learned, function Trig_Spirit_Bear_learned_Actions )
endfunction
//===========================================================================
// Trigger: bear dies
//===========================================================================
function Trig_bear_dies_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_Bear ) ) then
return false
endif
return true
endfunction
function Trig_bear_dies_Func005Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetEnumItem()) != 'pspd' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetEnumItem()) != 'oflg' ) ) then
return false
endif
return true
endfunction
function Trig_bear_dies_Func005A takes nothing returns nothing
if ( Trig_bear_dies_Func005Func001C() ) then
call SetItemVisibleBJ( false, GetEnumItem() )
else
call DoNothing( )
endif
endfunction
function Trig_bear_dies_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call SetHeroXP( udg_Yggrasil, ( GetHeroXP(udg_Yggrasil) - ( GetHeroXP(udg_Yggrasil) / ( 125 - ( 25 * GetUnitAbilityLevelSwapped('A0A5', udg_Yggrasil) ) ) ) ), false )
call UnitDamageTargetBJ( GetKillingUnitBJ(), udg_Yggrasil, ( 100.00 * I2R(GetUnitAbilityLevelSwapped('A0A5', udg_Yggrasil)) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
call EnumItemsInRectBJ( RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 150.00, 150.00), function Trig_bear_dies_Func005A )
set udg_Bear = null
endfunction
//===========================================================================
function InitTrig_bear_dies takes nothing returns nothing
set gg_trg_bear_dies = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_bear_dies, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_bear_dies, Condition( function Trig_bear_dies_Conditions ) )
call TriggerAddAction( gg_trg_bear_dies, function Trig_bear_dies_Actions )
endfunction
//===========================================================================
// Trigger: druid dies
//===========================================================================
function Trig_druid_dies_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_Yggrasil ) ) then
return false
endif
return true
endfunction
function Trig_druid_dies_Func002001002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetTriggerUnit()) )
endfunction
function Trig_druid_dies_Func002001002002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_druid_dies_Func002001002002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == false )
endfunction
function Trig_druid_dies_Func002001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_druid_dies_Func002001002002001(), Trig_druid_dies_Func002001002002002() )
endfunction
function Trig_druid_dies_Func002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_druid_dies_Func002001002001(), Trig_druid_dies_Func002001002002() )
endfunction
function Trig_druid_dies_Func002Func001Func002Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetEnumItem()) != 'pspd' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetEnumItem()) != 'oflg' ) ) then
return false
endif
return true
endfunction
function Trig_druid_dies_Func002Func001Func002A takes nothing returns nothing
if ( Trig_druid_dies_Func002Func001Func002Func001C() ) then
call SetItemVisibleBJ( false, GetEnumItem() )
else
call DoNothing( )
endif
endfunction
function Trig_druid_dies_Func002Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n01G' ) ) then
return false
endif
return true
endfunction
function Trig_druid_dies_Func002A takes nothing returns nothing
if ( Trig_druid_dies_Func002Func001C() ) then
call KillUnit( GetEnumUnit() )
call EnumItemsInRectBJ( RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 150.00, 150.00), function Trig_druid_dies_Func002Func001Func002A )
else
call KillUnit( GetEnumUnit() )
endif
endfunction
function Trig_druid_dies_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_druid_dies_Func002001002)), function Trig_druid_dies_Func002A )
endfunction
//===========================================================================
function InitTrig_druid_dies takes nothing returns nothing
set gg_trg_druid_dies = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_druid_dies, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_druid_dies, Condition( function Trig_druid_dies_Conditions ) )
call TriggerAddAction( gg_trg_druid_dies, function Trig_druid_dies_Actions )
endfunction
//===========================================================================
// Trigger: synergy learned
//===========================================================================
function Trig_synergy_learned_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0A8' ) ) then
return false
endif
return true
endfunction
function Trig_synergy_learned_Actions takes nothing returns nothing
call SetPlayerTechResearchedSwap( 'R000', ( GetPlayerTechCountSimple('R000', GetOwningPlayer(GetTriggerUnit())) + 1 ), GetOwningPlayer(GetTriggerUnit()) )
call SetPlayerTechResearchedSwap( 'R001', ( GetPlayerTechCountSimple('R001', GetOwningPlayer(GetTriggerUnit())) + 1 ), GetOwningPlayer(GetTriggerUnit()) )
endfunction
//===========================================================================
function InitTrig_synergy_learned takes nothing returns nothing
set gg_trg_synergy_learned = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_synergy_learned, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_synergy_learned, Condition( function Trig_synergy_learned_Conditions ) )
call TriggerAddAction( gg_trg_synergy_learned, function Trig_synergy_learned_Actions )
endfunction
//===========================================================================
// Trigger: lone druid bonus learned
//===========================================================================
function Trig_lone_druid_bonus_learned_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0AJ' ) ) then
return false
endif
return true
endfunction
function Trig_lone_druid_bonus_learned_Actions takes nothing returns nothing
call ModifyHeroStat( bj_HEROSTAT_STR, GetTriggerUnit(), bj_MODIFYMETHOD_ADD, 2 )
call ModifyHeroStat( bj_HEROSTAT_AGI, GetTriggerUnit(), bj_MODIFYMETHOD_ADD, 2 )
call ModifyHeroStat( bj_HEROSTAT_INT, GetTriggerUnit(), bj_MODIFYMETHOD_ADD, 2 )
endfunction
//===========================================================================
function InitTrig_lone_druid_bonus_learned takes nothing returns nothing
set gg_trg_lone_druid_bonus_learned = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_lone_druid_bonus_learned, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_lone_druid_bonus_learned, Condition( function Trig_lone_druid_bonus_learned_Conditions ) )
call TriggerAddAction( gg_trg_lone_druid_bonus_learned, function Trig_lone_druid_bonus_learned_Actions )
endfunction
//===========================================================================
// Trigger: Summon Spirit Bear
//===========================================================================
function Trig_Summon_Spirit_Bear_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0A5' ) ) then
return false
endif
return true
endfunction
function Trig_Summon_Spirit_Bear_Func003001002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetTriggerUnit()) )
endfunction
function Trig_Summon_Spirit_Bear_Func003001002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == false )
endfunction
function Trig_Summon_Spirit_Bear_Func003001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Summon_Spirit_Bear_Func003001002001(), Trig_Summon_Spirit_Bear_Func003001002002() )
endfunction
function Trig_Summon_Spirit_Bear_Func003Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n01G' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n01C' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n018' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n004' ) ) then
return true
endif
return false
endfunction
function Trig_Summon_Spirit_Bear_Func003Func001C takes nothing returns boolean
if ( not Trig_Summon_Spirit_Bear_Func003Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Summon_Spirit_Bear_Func003A takes nothing returns nothing
if ( Trig_Summon_Spirit_Bear_Func003Func001C() ) then
set udg_HaveABear = true
else
call DoNothing( )
endif
endfunction
function Trig_Summon_Spirit_Bear_Func005C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0A5', GetTriggerUnit()) == 1 ) ) then
return false
endif
if ( not ( udg_HaveABear == false ) ) then
return false
endif
return true
endfunction
function Trig_Summon_Spirit_Bear_Func006C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0A5', GetTriggerUnit()) == 2 ) ) then
return false
endif
if ( not ( udg_HaveABear == false ) ) then
return false
endif
return true
endfunction
function Trig_Summon_Spirit_Bear_Func007C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0A5', GetTriggerUnit()) == 3 ) ) then
return false
endif
if ( not ( udg_HaveABear == false ) ) then
return false
endif
return true
endfunction
function Trig_Summon_Spirit_Bear_Func008Func003Func001C takes nothing returns boolean
if ( not ( IsItemHiddenBJ(GetEnumItem()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Summon_Spirit_Bear_Func008Func003A takes nothing returns nothing
if ( Trig_Summon_Spirit_Bear_Func008Func003Func001C() ) then
call SetItemVisibleBJ( true, GetEnumItem() )
call UnitAddItemSwapped( GetEnumItem(), udg_Bear )
else
call DoNothing( )
endif
endfunction
function Trig_Summon_Spirit_Bear_Func008C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0A5', GetTriggerUnit()) == 4 ) ) then
return false
endif
if ( not ( udg_HaveABear == false ) ) then
return false
endif
return true
endfunction
function Trig_Summon_Spirit_Bear_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_HaveABear = false
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Summon_Spirit_Bear_Func003001002)), function Trig_Summon_Spirit_Bear_Func003A )
call TriggerSleepAction( 0.01 )
if ( Trig_Summon_Spirit_Bear_Func005C() ) then
call CreateNUnitsAtLoc( 1, 'n004', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
set udg_Bear = GetLastCreatedUnit()
call AddSpecialEffectTargetUnitBJ( "chest", GetLastCreatedUnit(), "Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl" )
else
call DoNothing( )
endif
if ( Trig_Summon_Spirit_Bear_Func006C() ) then
call CreateNUnitsAtLoc( 1, 'n018', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
set udg_Bear = GetLastCreatedUnit()
call AddSpecialEffectTargetUnitBJ( "chest", GetLastCreatedUnit(), "Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl" )
else
call DoNothing( )
endif
if ( Trig_Summon_Spirit_Bear_Func007C() ) then
call CreateNUnitsAtLoc( 1, 'n01C', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
set udg_Bear = GetLastCreatedUnit()
call AddSpecialEffectTargetUnitBJ( "chest", GetLastCreatedUnit(), "Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl" )
else
call DoNothing( )
endif
if ( Trig_Summon_Spirit_Bear_Func008C() ) then
call CreateNUnitsAtLoc( 1, 'n01G', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
set udg_Bear = GetLastCreatedUnit()
call EnumItemsInRectBJ( GetPlayableMapRect(), function Trig_Summon_Spirit_Bear_Func008Func003A )
call AddSpecialEffectTargetUnitBJ( "chest", GetLastCreatedUnit(), "Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl" )
else
call DoNothing( )
endif
call SetUnitAbilityLevelSwapped( 'A09Y', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0A5', udg_Yggrasil) )
endfunction
//===========================================================================
function InitTrig_Summon_Spirit_Bear takes nothing returns nothing
set gg_trg_Summon_Spirit_Bear = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Summon_Spirit_Bear, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Summon_Spirit_Bear, Condition( function Trig_Summon_Spirit_Bear_Conditions ) )
call TriggerAddAction( gg_trg_Summon_Spirit_Bear, function Trig_Summon_Spirit_Bear_Actions )
endfunction
//===========================================================================
// Trigger: Yggrasil
//===========================================================================
function Trig_Yggrasil_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'N01O' ) ) then
return false
endif
return true
endfunction
function Trig_Yggrasil_Actions takes nothing returns nothing
set udg_Yggrasil = GetTriggerUnit()
call EnableTrigger( gg_trg_too_far )
endfunction
//===========================================================================
function InitTrig_Yggrasil takes nothing returns nothing
set gg_trg_Yggrasil = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Yggrasil, GetEntireMapRect() )
call TriggerAddCondition( gg_trg_Yggrasil, Condition( function Trig_Yggrasil_Conditions ) )
call TriggerAddAction( gg_trg_Yggrasil, function Trig_Yggrasil_Actions )
endfunction
//===========================================================================
// Trigger: too far
//===========================================================================
function Trig_too_far_Conditions takes nothing returns boolean
if ( not ( GetAttacker() == udg_Bear ) ) then
return false
endif
if ( not ( DistanceBetweenPoints(GetUnitLoc(udg_Bear), GetUnitLoc(udg_Yggrasil)) >= 1500.00 ) ) then
return false
endif
return true
endfunction
function Trig_too_far_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_Return_Bear )
endfunction
//===========================================================================
function InitTrig_too_far takes nothing returns nothing
set gg_trg_too_far = CreateTrigger( )
call DisableTrigger( gg_trg_too_far )
call TriggerRegisterAnyUnitEventBJ( gg_trg_too_far, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_too_far, Condition( function Trig_too_far_Conditions ) )
call TriggerAddAction( gg_trg_too_far, function Trig_too_far_Actions )
endfunction
//===========================================================================
// Trigger: Return Bear
//===========================================================================
function Trig_Return_Bear_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0A7' ) ) then
return false
endif
return true
endfunction
function Trig_Return_Bear_Actions takes nothing returns nothing
call AddSpecialEffectLocBJ( GetUnitLoc(udg_Bear), "Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl" )
call SetUnitPositionLocFacingLocBJ( udg_Bear, PolarProjectionBJ(GetUnitLoc(udg_Yggrasil), GetRandomReal(25.00, 50.00), GetRandomDirectionDeg()), GetUnitLoc(udg_Yggrasil) )
call AddSpecialEffectTargetUnitBJ( "overhead", udg_Bear, "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl" )
endfunction
//===========================================================================
function InitTrig_Return_Bear takes nothing returns nothing
set gg_trg_Return_Bear = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Return_Bear, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Return_Bear, Condition( function Trig_Return_Bear_Conditions ) )
call TriggerAddAction( gg_trg_Return_Bear, function Trig_Return_Bear_Actions )
endfunction
//===========================================================================
// Trigger: aegis
//===========================================================================
function Trig_aegis_Conditions takes nothing returns boolean
if ( not ( GetManipulatedItem() == GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'olig') ) ) then
return false
endif
return true
endfunction
function Trig_aegis_Func002C takes nothing returns boolean
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_aegis_Actions takes nothing returns nothing
if ( Trig_aegis_Func002C() ) then
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetTriggerUnit()), GetRectCenter(gg_rct_Hero_Creation_NE), 1.00 )
call SetUnitPositionLoc( GetTriggerUnit(), GetRectCenter(gg_rct_Hero_Creation_NE) )
else
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetTriggerUnit()), GetRectCenter(gg_rct_Hero_Creation_Evil), 1.00 )
call SetUnitPositionLoc( GetTriggerUnit(), GetRectCenter(gg_rct_Hero_Creation_Evil) )
endif
endfunction
//===========================================================================
function InitTrig_aegis takes nothing returns nothing
set gg_trg_aegis = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_aegis, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_aegis, Condition( function Trig_aegis_Conditions ) )
call TriggerAddAction( gg_trg_aegis, function Trig_aegis_Actions )
endfunction
//===========================================================================
// Trigger: sunder switch
//===========================================================================
function Trig_sunder_switch_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07R' ) ) then
return false
endif
return true
endfunction
function Trig_sunder_switch_Func001C takes nothing returns boolean
if ( not ( GetSpellTargetUnit() == udg_SunderTargets[1] ) ) then
return false
endif
return true
endfunction
function Trig_sunder_switch_Func002Func002C takes nothing returns boolean
if ( not ( GetUnitLifePercent(udg_SunderTargets[2]) < 33.00 ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A07Q', udg_SunderTargets[1]) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_sunder_switch_Func002Func003C takes nothing returns boolean
if ( not ( GetUnitLifePercent(udg_SunderTargets[2]) < 28.00 ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A07Q', udg_SunderTargets[1]) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_sunder_switch_Func002Func004C takes nothing returns boolean
if ( not ( GetUnitLifePercent(udg_SunderTargets[2]) < 23.00 ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A07Q', udg_SunderTargets[1]) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_sunder_switch_Func002C takes nothing returns boolean
if ( not ( GetSpellTargetUnit() == udg_SunderTargets[2] ) ) then
return false
endif
return true
endfunction
function Trig_sunder_switch_Actions takes nothing returns nothing
if ( Trig_sunder_switch_Func001C() ) then
call SetUnitLifePercentBJ( udg_SunderTargets[1], udg_SunderPercentLife[2] )
else
call DoNothing( )
endif
if ( Trig_sunder_switch_Func002C() ) then
call SetUnitLifePercentBJ( udg_SunderTargets[2], udg_SunderPercentLife[1] )
if ( Trig_sunder_switch_Func002Func002C() ) then
call SetUnitLifePercentBJ( udg_SunderTargets[2], 33.00 )
else
call DoNothing( )
endif
if ( Trig_sunder_switch_Func002Func003C() ) then
call SetUnitLifePercentBJ( udg_SunderTargets[2], 28.00 )
else
call DoNothing( )
endif
if ( Trig_sunder_switch_Func002Func004C() ) then
call SetUnitLifePercentBJ( udg_SunderTargets[2], 23.00 )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_sunder_switch takes nothing returns nothing
set gg_trg_sunder_switch = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_sunder_switch, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_sunder_switch, Condition( function Trig_sunder_switch_Conditions ) )
call TriggerAddAction( gg_trg_sunder_switch, function Trig_sunder_switch_Actions )
endfunction
//===========================================================================
// Trigger: Sunder begin
//
// SPELLCASTER
//===========================================================================
function Trig_Sunder_begin_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07Q' ) ) then
return false
endif
return true
endfunction
function Trig_Sunder_begin_Actions takes nothing returns nothing
set udg_SunderTargets[1] = GetTriggerUnit()
set udg_SunderTargets[2] = GetSpellTargetUnit()
set udg_SunderPercentLife[1] = GetUnitLifePercent(udg_SunderTargets[1])
set udg_SunderPercentLife[2] = GetUnitLifePercent(udg_SunderTargets[2])
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(udg_SunderTargets[1]), GetUnitLoc(udg_SunderTargets[1]), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A07R', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", udg_SunderTargets[2] )
call UnitApplyTimedLifeBJ( 10.00, 'BTLF', GetLastCreatedUnit() )
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(udg_SunderTargets[2]), GetUnitLoc(udg_SunderTargets[2]), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A07R', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", udg_SunderTargets[1] )
call UnitApplyTimedLifeBJ( 10.00, 'BTLF', GetLastCreatedUnit() )
endfunction
//===========================================================================
function InitTrig_Sunder_begin takes nothing returns nothing
set gg_trg_Sunder_begin = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Sunder_begin, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Sunder_begin, Condition( function Trig_Sunder_begin_Conditions ) )
call TriggerAddAction( gg_trg_Sunder_begin, function Trig_Sunder_begin_Actions )
endfunction
//===========================================================================
// Trigger: land mines limit
//===========================================================================
function Trig_land_mines_limit_Func008C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n00O' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n00P' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n00Q' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n00N' ) ) then
return true
endif
return false
endfunction
function Trig_land_mines_limit_Conditions takes nothing returns boolean
if ( not Trig_land_mines_limit_Func008C() ) then
return false
endif
return true
endfunction
function Trig_land_mines_limit_Func006001002001001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'n00O' )
endfunction
function Trig_land_mines_limit_Func006001002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'n00P' )
endfunction
function Trig_land_mines_limit_Func006001002001 takes nothing returns boolean
return GetBooleanOr( Trig_land_mines_limit_Func006001002001001(), Trig_land_mines_limit_Func006001002001002() )
endfunction
function Trig_land_mines_limit_Func006001002002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'n00Q' )
endfunction
function Trig_land_mines_limit_Func006001002002002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'n00N' )
endfunction
function Trig_land_mines_limit_Func006001002002 takes nothing returns boolean
return GetBooleanOr( Trig_land_mines_limit_Func006001002002001(), Trig_land_mines_limit_Func006001002002002() )
endfunction
function Trig_land_mines_limit_Func006001002 takes nothing returns boolean
return GetBooleanOr( Trig_land_mines_limit_Func006001002001(), Trig_land_mines_limit_Func006001002002() )
endfunction
function Trig_land_mines_limit_Func006A takes nothing returns nothing
set udg_GMTot = ( udg_GMTot + 1 )
endfunction
function Trig_land_mines_limit_Func007Func003Func001C takes nothing returns boolean
if ( not ( R2I(TimerGetRemaining(udg_GMTimer[GetForLoopIndexA()])) < udg_GMT2B ) ) then
return false
endif
if ( not ( IsUnitDeadBJ(udg_GMUnit[GetForLoopIndexA()]) == false ) ) then
return false
endif
return true
endfunction
function Trig_land_mines_limit_Func007C takes nothing returns boolean
if ( not ( udg_GMTot > 16 ) ) then
return false
endif
return true
endfunction
function Trig_land_mines_limit_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_GMTot = 0
set udg_GMCount = ( udg_GMCount + 1 )
call StartTimerBJ( udg_GMTimer[udg_GMCount], false, 15000.00 )
set udg_GMUnit[udg_GMCount] = GetTriggerUnit()
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_land_mines_limit_Func006001002)), function Trig_land_mines_limit_Func006A )
if ( Trig_land_mines_limit_Func007C() ) then
set udg_GMT2B = 99999
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_GMCount
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_land_mines_limit_Func007Func003Func001C() ) then
set udg_GMOldest = udg_GMUnit[GetForLoopIndexA()]
set udg_GMT2B = R2I(TimerGetRemaining(udg_GMTimer[GetForLoopIndexA()]))
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ExplodeUnitBJ( udg_GMOldest )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_land_mines_limit takes nothing returns nothing
set gg_trg_land_mines_limit = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_land_mines_limit, GetEntireMapRect() )
call TriggerAddCondition( gg_trg_land_mines_limit, Condition( function Trig_land_mines_limit_Conditions ) )
call TriggerAddAction( gg_trg_land_mines_limit, function Trig_land_mines_limit_Actions )
endfunction
//===========================================================================
// Trigger: double edge
//===========================================================================
function Trig_double_edge_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00L' ) ) then
return false
endif
return true
endfunction
function Trig_double_edge_Func001C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) >= ( 100.00 * I2R(GetUnitAbilityLevelSwapped('A00L', GetTriggerUnit())) ) ) ) then
return false
endif
return true
endfunction
function Trig_double_edge_Actions takes nothing returns nothing
if ( Trig_double_edge_Func001C() ) then
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) - ( 100.00 * I2R(GetUnitAbilityLevelSwapped('A00L', GetTriggerUnit())) ) ) )
else
call SetUnitLifeBJ( GetTriggerUnit(), 1.00 )
endif
endfunction
//===========================================================================
function InitTrig_double_edge takes nothing returns nothing
set gg_trg_double_edge = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_double_edge, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_double_edge, Condition( function Trig_double_edge_Conditions ) )
call TriggerAddAction( gg_trg_double_edge, function Trig_double_edge_Actions )
endfunction
//===========================================================================
// Trigger: death pact
//===========================================================================
function Trig_death_pact_Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A04Q' ) ) then
return false
endif
return true
endfunction
function Trig_death_pact_Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A053' ) ) then
return false
endif
return true
endfunction
function Trig_death_pact_Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08L' ) ) then
return false
endif
return true
endfunction
function Trig_death_pact_Actions takes nothing returns nothing
if ( Trig_death_pact_Func001C() ) then
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) + ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) * ( 0.15 + ( I2R(GetUnitAbilityLevelSwapped('A04Q', GetTriggerUnit())) * 0.40 ) ) ) ) )
call KillUnit( GetSpellTargetUnit() )
else
call DoNothing( )
endif
if ( Trig_death_pact_Func002C() ) then
call SetUnitManaBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) + ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) * ( I2R(GetUnitAbilityLevelSwapped('A053', GetTriggerUnit())) * 0.15 ) ) ) )
call KillUnit( GetSpellTargetUnit() )
else
call DoNothing( )
endif
if ( Trig_death_pact_Func003C() ) then
call SetUnitManaBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) + ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) * 0.15 ) ) )
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) + ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) * 0.85 ) ) )
call KillUnit( GetSpellTargetUnit() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_death_pact takes nothing returns nothing
set gg_trg_death_pact = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_death_pact, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddAction( gg_trg_death_pact, function Trig_death_pact_Actions )
endfunction
//===========================================================================
// Trigger: static field
//===========================================================================
function Trig_static_field_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01X' ) ) then
return false
endif
return true
endfunction
function Trig_static_field_Func003001003001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_static_field_Func003001003001002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'BUst') == false )
endfunction
function Trig_static_field_Func003001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_static_field_Func003001003001001(), Trig_static_field_Func003001003001002() )
endfunction
function Trig_static_field_Func003001003002001 takes nothing returns boolean
return ( IsUnitDeadBJ(GetFilterUnit()) == false )
endfunction
function Trig_static_field_Func003001003002002001 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_static_field_Func003001003002002002001001 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B02J') == false )
endfunction
function Trig_static_field_Func003001003002002002001002001 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'BUsp') == false )
endfunction
function Trig_static_field_Func003001003002002002001002002001 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'BUst') == false )
endfunction
function Trig_static_field_Func003001003002002002001002002002001 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'Bcyc') == false )
endfunction
function Trig_static_field_Func003001003002002002001002002002002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'Bcy2') == false )
endfunction
function Trig_static_field_Func003001003002002002001002002002 takes nothing returns boolean
return GetBooleanAnd( Trig_static_field_Func003001003002002002001002002002001(), Trig_static_field_Func003001003002002002001002002002002() )
endfunction
function Trig_static_field_Func003001003002002002001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_static_field_Func003001003002002002001002002001(), Trig_static_field_Func003001003002002002001002002002() )
endfunction
function Trig_static_field_Func003001003002002002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_static_field_Func003001003002002002001002001(), Trig_static_field_Func003001003002002002001002002() )
endfunction
function Trig_static_field_Func003001003002002002001 takes nothing returns boolean
return GetBooleanAnd( Trig_static_field_Func003001003002002002001001(), Trig_static_field_Func003001003002002002001002() )
endfunction
function Trig_static_field_Func003001003002002002002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'n00L' )
endfunction
function Trig_static_field_Func003001003002002002 takes nothing returns boolean
return GetBooleanAnd( Trig_static_field_Func003001003002002002001(), Trig_static_field_Func003001003002002002002() )
endfunction
function Trig_static_field_Func003001003002002 takes nothing returns boolean
return GetBooleanAnd( Trig_static_field_Func003001003002002001(), Trig_static_field_Func003001003002002002() )
endfunction
function Trig_static_field_Func003001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_static_field_Func003001003002001(), Trig_static_field_Func003001003002002() )
endfunction
function Trig_static_field_Func003001003 takes nothing returns boolean
return GetBooleanAnd( Trig_static_field_Func003001003001(), Trig_static_field_Func003001003002() )
endfunction
function Trig_static_field_Func003A takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) * udg_BSDam ) )
endfunction
function Trig_static_field_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_BSDam = ( 0.95 - ( 0.02 * I2R(GetUnitAbilityLevelSwapped('A01X', GetTriggerUnit())) ) )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(400.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_static_field_Func003001003)), function Trig_static_field_Func003A )
endfunction
//===========================================================================
function InitTrig_static_field takes nothing returns nothing
set gg_trg_static_field = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_static_field, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_static_field, Condition( function Trig_static_field_Conditions ) )
call TriggerAddAction( gg_trg_static_field, function Trig_static_field_Actions )
endfunction
//===========================================================================
// Trigger: track
//===========================================================================
function Trig_track_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A00F', GetKillingUnitBJ()) > 0 ) ) then
return false
endif
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_track_Actions takes nothing returns nothing
call SetPlayerStateBJ( GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_GOLD) + ( 50 * GetUnitAbilityLevelSwapped('A00F', GetKillingUnitBJ()) ) ) )
call CreateTextTagUnitBJ( ( "+" + I2S(( GetUnitAbilityLevelSwapped('A00F', GetKillingUnitBJ()) * 50 )) ), GetDyingUnit(), 0, 10, 90.00, 84.00, 0.00, 0 )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call PolledWait( 2.00 )
call DestroyTextTagBJ( GetLastCreatedTextTag() )
endfunction
//===========================================================================
function InitTrig_track takes nothing returns nothing
set gg_trg_track = CreateTrigger( )
call DisableTrigger( gg_trg_track )
call TriggerRegisterAnyUnitEventBJ( gg_trg_track, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_track, Condition( function Trig_track_Conditions ) )
call TriggerAddAction( gg_trg_track, function Trig_track_Actions )
endfunction
//===========================================================================
// Trigger: return
//===========================================================================
function Trig_return_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A00V', GetAttackedUnitBJ()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_return_Actions takes nothing returns nothing
call UnitDamageTargetBJ( GetAttackedUnitBJ(), GetAttacker(), ( 5.00 * I2R(GetUnitAbilityLevelSwapped('A00V', GetAttackedUnitBJ())) ), ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
endfunction
//===========================================================================
function InitTrig_return takes nothing returns nothing
set gg_trg_return = CreateTrigger( )
call DisableTrigger( gg_trg_return )
call TriggerRegisterAnyUnitEventBJ( gg_trg_return, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_return, Condition( function Trig_return_Conditions ) )
call TriggerAddAction( gg_trg_return, function Trig_return_Actions )
endfunction
//===========================================================================
// Trigger: beam counter
//===========================================================================
function Trig_beam_counter_Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A054' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A042' ) ) then
return true
endif
return false
endfunction
function Trig_beam_counter_Conditions takes nothing returns boolean
if ( not Trig_beam_counter_Func003C() ) then
return false
endif
return true
endfunction
function Trig_beam_counter_Actions takes nothing returns nothing
set udg_BeamCounter = ( udg_BeamCounter + 1 )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "|c0000ffffBeam Counter: " + ( I2S(udg_BeamCounter) + "|r" ) ) )
endfunction
//===========================================================================
function InitTrig_beam_counter takes nothing returns nothing
set gg_trg_beam_counter = CreateTrigger( )
call DisableTrigger( gg_trg_beam_counter )
call TriggerRegisterAnyUnitEventBJ( gg_trg_beam_counter, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_beam_counter, Condition( function Trig_beam_counter_Conditions ) )
call TriggerAddAction( gg_trg_beam_counter, function Trig_beam_counter_Actions )
endfunction
//===========================================================================
// Trigger: beam counter on
//===========================================================================
function Trig_beam_counter_on_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_beam_counter )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_beam_counter_on takes nothing returns nothing
set gg_trg_beam_counter_on = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(1), "-beamcounter", true )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(2), "-beamcounter", true )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(3), "-beamcounter", true )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(4), "-beamcounter", true )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(5), "-beamcounter", true )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(7), "-beamcounter", true )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(8), "-beamcounter", true )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(9), "-beamcounter", true )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(10), "-beamcounter", true )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(11), "-beamcounter", true )
call TriggerAddAction( gg_trg_beam_counter_on, function Trig_beam_counter_on_Actions )
endfunction
//===========================================================================
// Trigger: refresh
//===========================================================================
function Trig_refresh_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02W' ) ) then
return false
endif
return true
endfunction
function Trig_refresh_Actions takes nothing returns nothing
call UnitResetCooldown( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_refresh takes nothing returns nothing
set gg_trg_refresh = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_refresh, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_refresh, Condition( function Trig_refresh_Conditions ) )
call TriggerAddAction( gg_trg_refresh, function Trig_refresh_Actions )
endfunction
//===========================================================================
// Trigger: detonate
//===========================================================================
function Trig_detonate_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02T' ) ) then
return false
endif
return true
endfunction
function Trig_detonate_Func003001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'o018' )
endfunction
function Trig_detonate_Func003001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetTriggerUnit()) )
endfunction
function Trig_detonate_Func003001002 takes nothing returns boolean
return GetBooleanAnd( Trig_detonate_Func003001002001(), Trig_detonate_Func003001002002() )
endfunction
function Trig_detonate_Func003A takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'A036', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A036', GetLastCreatedUnit(), 1 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "inferno", udg_TempLoc )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call ExplodeUnitBJ( GetEnumUnit() )
call RemoveLocation(udg_TempLoc)
endfunction
function Trig_detonate_Func004001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'o002' )
endfunction
function Trig_detonate_Func004001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetTriggerUnit()) )
endfunction
function Trig_detonate_Func004001002 takes nothing returns boolean
return GetBooleanAnd( Trig_detonate_Func004001002001(), Trig_detonate_Func004001002002() )
endfunction
function Trig_detonate_Func004A takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'A036', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A036', GetLastCreatedUnit(), 2 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "inferno", udg_TempLoc )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call ExplodeUnitBJ( GetEnumUnit() )
call RemoveLocation(udg_TempLoc)
endfunction
function Trig_detonate_Func005001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'o00B' )
endfunction
function Trig_detonate_Func005001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetTriggerUnit()) )
endfunction
function Trig_detonate_Func005001002 takes nothing returns boolean
return GetBooleanAnd( Trig_detonate_Func005001002001(), Trig_detonate_Func005001002002() )
endfunction
function Trig_detonate_Func005A takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'A036', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A036', GetLastCreatedUnit(), 3 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "inferno", udg_TempLoc )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call ExplodeUnitBJ( GetEnumUnit() )
call RemoveLocation(udg_TempLoc)
endfunction
function Trig_detonate_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_Techies = GetTriggerUnit()
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_detonate_Func003001002)), function Trig_detonate_Func003A )
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_detonate_Func004001002)), function Trig_detonate_Func004A )
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_detonate_Func005001002)), function Trig_detonate_Func005A )
endfunction
//===========================================================================
function InitTrig_detonate takes nothing returns nothing
set gg_trg_detonate = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_detonate, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_detonate, Condition( function Trig_detonate_Conditions ) )
call TriggerAddAction( gg_trg_detonate, function Trig_detonate_Actions )
endfunction
//===========================================================================
// Trigger: detonate given
//===========================================================================
function Trig_detonate_given_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0AK' ) ) then
return false
endif
return true
endfunction
function Trig_detonate_given_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A02T', GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_detonate_given takes nothing returns nothing
set gg_trg_detonate_given = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_detonate_given, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_detonate_given, Condition( function Trig_detonate_given_Conditions ) )
call TriggerAddAction( gg_trg_detonate_given, function Trig_detonate_given_Actions )
endfunction
//===========================================================================
// Trigger: detonate 1
//===========================================================================
function Trig_detonate_1_Func004C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0AM' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A3' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A4' ) ) then
return true
endif
return false
endfunction
function Trig_detonate_1_Conditions takes nothing returns boolean
if ( not Trig_detonate_1_Func004C() ) then
return false
endif
return true
endfunction
function Trig_detonate_1_Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AM' ) ) then
return false
endif
return true
endfunction
function Trig_detonate_1_Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0A3' ) ) then
return false
endif
return true
endfunction
function Trig_detonate_1_Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0A4' ) ) then
return false
endif
return true
endfunction
function Trig_detonate_1_Actions takes nothing returns nothing
if ( Trig_detonate_1_Func001C() ) then
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'A036', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A036', GetLastCreatedUnit(), 1 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "inferno", GetUnitLoc(GetTriggerUnit()) )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call ExplodeUnitBJ( GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_detonate_1_Func002C() ) then
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'A036', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A036', GetLastCreatedUnit(), 2 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "inferno", GetUnitLoc(GetTriggerUnit()) )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call ExplodeUnitBJ( GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_detonate_1_Func003C() ) then
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'A036', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A036', GetLastCreatedUnit(), 3 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "inferno", GetUnitLoc(GetTriggerUnit()) )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call ExplodeUnitBJ( GetTriggerUnit() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_detonate_1 takes nothing returns nothing
set gg_trg_detonate_1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_detonate_1, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_detonate_1, Condition( function Trig_detonate_1_Conditions ) )
call TriggerAddAction( gg_trg_detonate_1, function Trig_detonate_1_Actions )
endfunction
//===========================================================================
// Trigger: sprout
//===========================================================================
function Trig_sprout_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06Q' ) ) then
return false
endif
return true
endfunction
function Trig_sprout_Actions takes nothing returns nothing
local destructable array dx
call CreateFogModifierRadiusLocBJ( true, GetOwningPlayer(GetTriggerUnit()), FOG_OF_WAR_VISIBLE, GetUnitLoc(GetSpellTargetUnit()), 1000.00 )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 8
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call CreateDestructableLoc( 'LTlt', PolarProjectionBJ(GetUnitLoc(GetSpellTargetUnit()), 120.00, ( I2R(GetForLoopIndexB()) * 45.00 )), GetRandomDirectionDeg(), 1, 0 )
set dx[GetForLoopIndexB()] = GetLastCreatedDestructable()
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call TriggerSleepAction( ( 2.00 + I2R(GetUnitAbilityLevelSwapped('A06Q', GetTriggerUnit())) ) )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call KillDestructable( dx[GetForLoopIndexA()] )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call DestroyFogModifier( GetLastCreatedFogModifier() )
call TriggerSleepAction( 4.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call RemoveDestructable( dx[GetForLoopIndexA()] )
set dx[GetForLoopIndexA()] =null
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_sprout takes nothing returns nothing
set gg_trg_sprout = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_sprout, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_sprout, Condition( function Trig_sprout_Conditions ) )
call TriggerAddAction( gg_trg_sprout, function Trig_sprout_Actions )
endfunction
//===========================================================================
// Trigger: holy light
//===========================================================================
function Trig_holy_light_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02F' ) ) then
return false
endif
return true
endfunction
function Trig_holy_light_Func001C takes nothing returns boolean
if ( not ( IsUnitEnemy(GetSpellTargetUnit(), GetOwningPlayer(GetTriggerUnit())) == true ) ) then
return false
endif
return true
endfunction
function Trig_holy_light_Actions takes nothing returns nothing
if ( Trig_holy_light_Func001C() ) then
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), ( 75.00 * I2R(GetUnitAbilityLevelSwapped('A02F', GetTriggerUnit())) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
call SetUnitLifeBJ( GetSpellTargetUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) + ( 125.00 * I2R(GetUnitAbilityLevelSwapped('A02F', GetTriggerUnit())) ) ) )
endif
endfunction
//===========================================================================
function InitTrig_holy_light takes nothing returns nothing
set gg_trg_holy_light = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_holy_light, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_holy_light, Condition( function Trig_holy_light_Conditions ) )
call TriggerAddAction( gg_trg_holy_light, function Trig_holy_light_Actions )
endfunction
//===========================================================================
// Trigger: devour
//===========================================================================
function Trig_devour_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTransportUnitBJ()) == 'UC42' ) ) then
return false
endif
return true
endfunction
function Trig_devour_Func002C takes nothing returns boolean
if ( not ( IsUnitInTransportBJ(GetTriggerUnit(), GetTransportUnitBJ()) == true ) ) then
return false
endif
return true
endfunction
function Trig_devour_Actions takes nothing returns nothing
call PolledWait( ( ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) - 20.00 ) / 20.00 ) )
if ( Trig_devour_Func002C() ) then
call SetPlayerStateBJ( GetOwningPlayer(GetTransportUnitBJ()), PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(GetOwningPlayer(GetTransportUnitBJ()), PLAYER_STATE_RESOURCE_GOLD) + ( 10 * GetUnitAbilityLevelSwapped('A05Y', GetTransportUnitBJ()) ) ) )
call CreateTextTagUnitBJ( ( "+" + I2S(( GetUnitAbilityLevelSwapped('A05Y', GetTransportUnitBJ()) * 10 )) ), GetTransportUnitBJ(), 0, 10, 90.00, 84.00, 0.00, 0 )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call PolledWait( 2.00 )
call DestroyTextTagBJ( GetLastCreatedTextTag() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_devour takes nothing returns nothing
set gg_trg_devour = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_devour, EVENT_PLAYER_UNIT_LOADED )
call TriggerAddCondition( gg_trg_devour, Condition( function Trig_devour_Conditions ) )
call TriggerAddAction( gg_trg_devour, function Trig_devour_Actions )
endfunction
//===========================================================================
// Trigger: death
//===========================================================================
function Trig_death_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A094' ) ) then
return false
endif
return true
endfunction
function Trig_death_Func001C takes nothing returns boolean
if ( not ( ModuloReal(I2R(GetHeroLevel(GetSpellTargetUnit())), ( 7.00 - I2R(GetUnitAbilityLevelSwapped('A094', GetTriggerUnit())) )) == 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_death_Actions takes nothing returns nothing
if ( Trig_death_Func001C() ) then
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), 250.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_death takes nothing returns nothing
set gg_trg_death = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_death, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_death, Condition( function Trig_death_Conditions ) )
call TriggerAddAction( gg_trg_death, function Trig_death_Actions )
endfunction
//===========================================================================
// Trigger: Nether swap
//===========================================================================
function Trig_Nether_swap_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00G' ) ) then
return false
endif
return true
endfunction
function Trig_Nether_swap_Actions takes nothing returns nothing
set udg_NetherUnits[1] = GetSpellAbilityUnit()
set udg_NetherUnits[2] = GetSpellTargetUnit()
set udg_NetherPosition[1] = GetUnitLoc(udg_NetherUnits[1])
set udg_NetherPosition[2] = GetUnitLoc(udg_NetherUnits[2])
call SetUnitPositionLoc( udg_NetherUnits[1], udg_NetherPosition[2] )
call SetUnitPositionLoc( udg_NetherUnits[2], udg_NetherPosition[1] )
endfunction
//===========================================================================
function InitTrig_Nether_swap takes nothing returns nothing
set gg_trg_Nether_swap = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Nether_swap, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Nether_swap, Condition( function Trig_Nether_swap_Conditions ) )
call TriggerAddAction( gg_trg_Nether_swap, function Trig_Nether_swap_Actions )
endfunction
//===========================================================================
// Trigger: Purification
//===========================================================================
function Trig_Purification_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08N' ) ) then
return false
endif
return true
endfunction
function Trig_Purification_Func003001003001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Purification_Func003001003001002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A04R', GetFilterUnit()) != 1 )
endfunction
function Trig_Purification_Func003001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Purification_Func003001003001001(), Trig_Purification_Func003001003001002() )
endfunction
function Trig_Purification_Func003001003002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Purification_Func003001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Purification_Func003001003001(), Trig_Purification_Func003001003002() )
endfunction
function Trig_Purification_Func003A takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), ( 75.00 * I2R(GetUnitAbilityLevelSwapped('A08N', GetTriggerUnit())) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
endfunction
function Trig_Purification_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call SetUnitLifeBJ( GetSpellTargetUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) + ( 100.00 * I2R(GetUnitAbilityLevelSwapped('A08N', GetTriggerUnit())) ) ) )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(250.00, GetUnitLoc(GetSpellTargetUnit()), Condition(function Trig_Purification_Func003001003)), function Trig_Purification_Func003A )
endfunction
//===========================================================================
function InitTrig_Purification takes nothing returns nothing
set gg_trg_Purification = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Purification, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Purification, Condition( function Trig_Purification_Conditions ) )
call TriggerAddAction( gg_trg_Purification, function Trig_Purification_Actions )
endfunction
//===========================================================================
// Trigger: new HitN 3
//===========================================================================
function Trig_new_HitN_3_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Udre' ) ) then
return false
endif
return true
endfunction
function Trig_new_HitN_3_Func001C takes nothing returns boolean
if ( not ( GetTimeOfDay() >= 6.00 ) ) then
return false
endif
if ( not ( GetTimeOfDay() <= 18.00 ) ) then
return false
endif
return true
endfunction
function Trig_new_HitN_3_Actions takes nothing returns nothing
if ( Trig_new_HitN_3_Func001C() ) then
call SetUnitAbilityLevelSwapped( 'S00A', GetTriggerUnit(), 5 )
call SetUnitAbilityLevelSwapped( 'A08C', GetTriggerUnit(), 5 )
else
call SetUnitAbilityLevelSwapped( 'S00A', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A086', GetTriggerUnit()) )
call SetUnitAbilityLevelSwapped( 'A08C', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A08E', GetTriggerUnit()) )
endif
endfunction
//===========================================================================
function InitTrig_new_HitN_3 takes nothing returns nothing
set gg_trg_new_HitN_3 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_new_HitN_3, EVENT_PLAYER_HERO_REVIVE_FINISH )
call TriggerAddCondition( gg_trg_new_HitN_3, Condition( function Trig_new_HitN_3_Conditions ) )
call TriggerAddAction( gg_trg_new_HitN_3, function Trig_new_HitN_3_Actions )
endfunction
//===========================================================================
// Trigger: new HitN 2
//===========================================================================
function Trig_new_HitN_2_Func002001002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_new_HitN_2_Func002001002002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'Udre' )
endfunction
function Trig_new_HitN_2_Func002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_new_HitN_2_Func002001002001(), Trig_new_HitN_2_Func002001002002() )
endfunction
function Trig_new_HitN_2_Func002A takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'S00A', GetEnumUnit(), GetUnitAbilityLevelSwapped('A086', GetEnumUnit()) )
call SetUnitAbilityLevelSwapped( 'A08C', GetEnumUnit(), GetUnitAbilityLevelSwapped('A08E', GetEnumUnit()) )
endfunction
function Trig_new_HitN_2_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_new_HitN_2_Func002001002)), function Trig_new_HitN_2_Func002A )
endfunction
//===========================================================================
function InitTrig_new_HitN_2 takes nothing returns nothing
set gg_trg_new_HitN_2 = CreateTrigger( )
call TriggerRegisterGameStateEventTimeOfDay( gg_trg_new_HitN_2, LESS_THAN, 6.00 )
call TriggerRegisterGameStateEventTimeOfDay( gg_trg_new_HitN_2, GREATER_THAN_OR_EQUAL, 18.00 )
call TriggerAddAction( gg_trg_new_HitN_2, function Trig_new_HitN_2_Actions )
endfunction
//===========================================================================
// Trigger: new HitN
//===========================================================================
function Trig_new_HitN_Conditions takes nothing returns boolean
if ( not ( GetTimeOfDay() < 18.00 ) ) then
return false
endif
return true
endfunction
function Trig_new_HitN_Func002001002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_new_HitN_Func002001002002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'Udre' )
endfunction
function Trig_new_HitN_Func002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_new_HitN_Func002001002001(), Trig_new_HitN_Func002001002002() )
endfunction
function Trig_new_HitN_Func002A takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'S00A', GetEnumUnit(), 5 )
call SetUnitAbilityLevelSwapped( 'A08C', GetEnumUnit(), 5 )
endfunction
function Trig_new_HitN_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_new_HitN_Func002001002)), function Trig_new_HitN_Func002A )
endfunction
//===========================================================================
function InitTrig_new_HitN takes nothing returns nothing
set gg_trg_new_HitN = CreateTrigger( )
call TriggerRegisterGameStateEventTimeOfDay( gg_trg_new_HitN, GREATER_THAN_OR_EQUAL, 6.00 )
call TriggerAddCondition( gg_trg_new_HitN, Condition( function Trig_new_HitN_Conditions ) )
call TriggerAddAction( gg_trg_new_HitN, function Trig_new_HitN_Actions )
endfunction
//===========================================================================
// Trigger: Hunter in the Night
//===========================================================================
function Trig_Hunter_in_the_Night_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Udre' ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_in_the_Night_Func002Func003C takes nothing returns boolean
if ( not ( GetTimeOfDay() >= 6.00 ) ) then
return false
endif
if ( not ( GetTimeOfDay() <= 18.00 ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_in_the_Night_Func002C takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A086' ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_in_the_Night_Func003Func002C takes nothing returns boolean
if ( not ( GetTimeOfDay() >= 6.00 ) ) then
return false
endif
if ( not ( GetTimeOfDay() <= 18.00 ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_in_the_Night_Func003C takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A08E' ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_in_the_Night_Actions takes nothing returns nothing
if ( Trig_Hunter_in_the_Night_Func002C() ) then
call UnitAddAbilityBJ( 'S00A', GetTriggerUnit() )
if ( Trig_Hunter_in_the_Night_Func002Func003C() ) then
call SetUnitAbilityLevelSwapped( 'S00A', GetTriggerUnit(), 5 )
else
call SetUnitAbilityLevelSwapped( 'S00A', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A086', GetTriggerUnit()) )
endif
else
call DoNothing( )
endif
if ( Trig_Hunter_in_the_Night_Func003C() ) then
call UnitAddAbilityBJ( 'A08C', GetTriggerUnit() )
if ( Trig_Hunter_in_the_Night_Func003Func002C() ) then
call SetUnitAbilityLevelSwapped( 'A08C', GetTriggerUnit(), 5 )
else
call SetUnitAbilityLevelSwapped( 'A08C', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A08E', GetTriggerUnit()) )
endif
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Hunter_in_the_Night takes nothing returns nothing
set gg_trg_Hunter_in_the_Night = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hunter_in_the_Night, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Hunter_in_the_Night, Condition( function Trig_Hunter_in_the_Night_Conditions ) )
call TriggerAddAction( gg_trg_Hunter_in_the_Night, function Trig_Hunter_in_the_Night_Actions )
endfunction
//===========================================================================
// Trigger: song of the siren buff
//
// -Needs vision
//===========================================================================
function Trig_song_of_the_siren_buff_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07U' ) ) then
return false
endif
return true
endfunction
function Trig_song_of_the_siren_buff_Func003001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_song_of_the_siren_buff_Func003001003002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_song_of_the_siren_buff_Func003001003 takes nothing returns boolean
return GetBooleanAnd( Trig_song_of_the_siren_buff_Func003001003001(), Trig_song_of_the_siren_buff_Func003001003002() )
endfunction
function Trig_song_of_the_siren_buff_Func003A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(udg_NagaSiren), GetUnitLoc(udg_NagaSiren), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A07T', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A07U', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A07U', GetTriggerUnit()) )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "sleep", GetEnumUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
endfunction
function Trig_song_of_the_siren_buff_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_NagaSiren = GetTriggerUnit()
call ForGroupBJ( GetUnitsInRangeOfLocMatching(( 500.00 + ( 500.00 * I2R(GetUnitAbilityLevelSwapped('A07U', GetTriggerUnit())) ) ), GetUnitLoc(GetTriggerUnit()), Condition(function Trig_song_of_the_siren_buff_Func003001003)), function Trig_song_of_the_siren_buff_Func003A )
endfunction
//===========================================================================
function InitTrig_song_of_the_siren_buff takes nothing returns nothing
set gg_trg_song_of_the_siren_buff = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_song_of_the_siren_buff, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_song_of_the_siren_buff, Condition( function Trig_song_of_the_siren_buff_Conditions ) )
call TriggerAddAction( gg_trg_song_of_the_siren_buff, function Trig_song_of_the_siren_buff_Actions )
endfunction
//===========================================================================
// Trigger: ManaVoid
//===========================================================================
function Trig_ManaVoid_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A09R' ) ) then
return false
endif
return true
endfunction
function Trig_ManaVoid_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A09R', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_ManaVoid_Func003C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A09R', GetTriggerUnit()) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_ManaVoid_Func004C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A09R', GetTriggerUnit()) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_ManaVoid_Actions takes nothing returns nothing
if ( Trig_ManaVoid_Func002C() ) then
set udg_ManaVoid = ( ( GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetSpellTargetUnit()) - GetUnitStateSwap(UNIT_STATE_MANA, GetSpellTargetUnit()) ) * 0.60 )
else
call DoNothing( )
endif
if ( Trig_ManaVoid_Func003C() ) then
set udg_ManaVoid = ( ( GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetSpellTargetUnit()) - GetUnitStateSwap(UNIT_STATE_MANA, GetSpellTargetUnit()) ) * 0.85 )
else
call DoNothing( )
endif
if ( Trig_ManaVoid_Func004C() ) then
set udg_ManaVoid = ( ( GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetSpellTargetUnit()) - GetUnitStateSwap(UNIT_STATE_MANA, GetSpellTargetUnit()) ) * 1.10 )
else
call DoNothing( )
endif
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_ManaVoid, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )
endfunction
//===========================================================================
function InitTrig_ManaVoid takes nothing returns nothing
set gg_trg_ManaVoid = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ManaVoid, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ManaVoid, Condition( function Trig_ManaVoid_Conditions ) )
call TriggerAddAction( gg_trg_ManaVoid, function Trig_ManaVoid_Actions )
endfunction
//===========================================================================
// Trigger: lightning bolt
//===========================================================================
function Trig_lightning_bolt_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A006' ) ) then
return false
endif
return true
endfunction
function Trig_lightning_bolt_Actions takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'e000', GetOwningPlayer(GetSpellAbilityUnit()), udg_TempLoc, bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A05S', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A05S', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A006', GetTriggerUnit()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "chainlightning", GetSpellTargetUnit() )
call UnitApplyTimedLifeBJ( 3.00, 'BTLF', GetLastCreatedUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
endfunction
//===========================================================================
function InitTrig_lightning_bolt takes nothing returns nothing
set gg_trg_lightning_bolt = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_lightning_bolt, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_lightning_bolt, Condition( function Trig_lightning_bolt_Conditions ) )
call TriggerAddAction( gg_trg_lightning_bolt, function Trig_lightning_bolt_Actions )
endfunction
//===========================================================================
// Trigger: Wrath of Zeus Copy
//===========================================================================
function Trig_Wrath_of_Zeus_Copy_Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A07C' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06L' ) ) then
return true
endif
return false
endfunction
function Trig_Wrath_of_Zeus_Copy_Conditions takes nothing returns boolean
if ( not Trig_Wrath_of_Zeus_Copy_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Wrath_of_Zeus_Copy_Func003001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Wrath_of_Zeus_Copy_Func003001002002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Wrath_of_Zeus_Copy_Func003001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Wrath_of_Zeus_Copy_Func003001002001(), Trig_Wrath_of_Zeus_Copy_Func003001002002() )
endfunction
function Trig_Wrath_of_Zeus_Copy_Func003Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07C' ) ) then
return false
endif
return true
endfunction
function Trig_Wrath_of_Zeus_Copy_Func003A takes nothing returns nothing
if ( Trig_Wrath_of_Zeus_Copy_Func003Func001C() ) then
call CreateNUnitsAtLoc( 1, 'e000', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A05S', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A05S', GetLastCreatedUnit(), ( 4 + GetUnitAbilityLevelSwapped('A07C', GetTriggerUnit()) ) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "chainlightning", GetEnumUnit() )
call UnitApplyTimedLifeBJ( 3.00, 'BTLF', GetLastCreatedUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
else
call CreateNUnitsAtLoc( 1, 'e000', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A05S', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A05S', GetLastCreatedUnit(), ( 5 + GetUnitAbilityLevelSwapped('A06L', GetTriggerUnit()) ) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "chainlightning", GetEnumUnit() )
call UnitApplyTimedLifeBJ( 3.00, 'BTLF', GetLastCreatedUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
endif
endfunction
function Trig_Wrath_of_Zeus_Copy_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Wrath_of_Zeus_Copy_Func003001002)), function Trig_Wrath_of_Zeus_Copy_Func003A )
endfunction
//===========================================================================
function InitTrig_Wrath_of_Zeus_Copy takes nothing returns nothing
set gg_trg_Wrath_of_Zeus_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Wrath_of_Zeus_Copy, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Wrath_of_Zeus_Copy, Condition( function Trig_Wrath_of_Zeus_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Wrath_of_Zeus_Copy, function Trig_Wrath_of_Zeus_Copy_Actions )
endfunction
//===========================================================================
// Trigger: diabolicedict new
//===========================================================================
function Trig_diabolicedict_new_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A035' ) ) then
return false
endif
return true
endfunction
function Trig_diabolicedict_new_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A0E9', GetTriggerUnit() )
call TriggerSleepAction( 8.00 )
call UnitRemoveAbilityBJ( 'A0E9', GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_diabolicedict_new takes nothing returns nothing
set gg_trg_diabolicedict_new = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_diabolicedict_new, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_diabolicedict_new, Condition( function Trig_diabolicedict_new_Conditions ) )
call TriggerAddAction( gg_trg_diabolicedict_new, function Trig_diabolicedict_new_Actions )
endfunction
//===========================================================================
// Trigger: Reverse Polarity
//===========================================================================
function Trig_Reverse_Polarity_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06F' ) ) then
return false
endif
return true
endfunction
function Trig_Reverse_Polarity_Func002001003001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Reverse_Polarity_Func002001003001002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A04R', GetFilterUnit()) != 1 )
endfunction
function Trig_Reverse_Polarity_Func002001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Reverse_Polarity_Func002001003001001(), Trig_Reverse_Polarity_Func002001003001002() )
endfunction
function Trig_Reverse_Polarity_Func002001003002001 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Reverse_Polarity_Func002001003002002 takes nothing returns boolean
return ( IsUnitDeadBJ(GetFilterUnit()) == false )
endfunction
function Trig_Reverse_Polarity_Func002001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Reverse_Polarity_Func002001003002001(), Trig_Reverse_Polarity_Func002001003002002() )
endfunction
function Trig_Reverse_Polarity_Func002001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Reverse_Polarity_Func002001003001(), Trig_Reverse_Polarity_Func002001003002() )
endfunction
function Trig_Reverse_Polarity_Func002A takes nothing returns nothing
call SetUnitPositionLoc( GetEnumUnit(), PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), GetRandomReal(20.00, 70.00), GetRandomDirectionDeg()) )
endfunction
function Trig_Reverse_Polarity_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRangeOfLocMatching(460.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_Reverse_Polarity_Func002001003)), function Trig_Reverse_Polarity_Func002A )
endfunction
//===========================================================================
function InitTrig_Reverse_Polarity takes nothing returns nothing
set gg_trg_Reverse_Polarity = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Reverse_Polarity, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Reverse_Polarity, Condition( function Trig_Reverse_Polarity_Conditions ) )
call TriggerAddAction( gg_trg_Reverse_Polarity, function Trig_Reverse_Polarity_Actions )
endfunction
//===========================================================================
// Trigger: omnislash selection
//===========================================================================
function Trig_omnislash_selection_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Nbbc' ) ) then
return false
endif
return true
endfunction
function Trig_omnislash_selection_Actions takes nothing returns nothing
call SelectUnitRemoveForPlayer( GetTriggerUnit(), GetTriggerPlayer() )
endfunction
//===========================================================================
function InitTrig_omnislash_selection takes nothing returns nothing
set gg_trg_omnislash_selection = CreateTrigger( )
call DisableTrigger( gg_trg_omnislash_selection )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(10), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(11), true )
call TriggerAddCondition( gg_trg_omnislash_selection, Condition( function Trig_omnislash_selection_Conditions ) )
call TriggerAddAction( gg_trg_omnislash_selection, function Trig_omnislash_selection_Actions )
endfunction
//===========================================================================
// Trigger: OmniSlashEffect
//===========================================================================
function Trig_OmniSlashEffect_Func005001003001001001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_OmniSlashEffect_Func005001003001001001002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A04R', GetFilterUnit()) != 1 )
endfunction
function Trig_OmniSlashEffect_Func005001003001001001 takes nothing returns boolean
return GetBooleanAnd( Trig_OmniSlashEffect_Func005001003001001001001(), Trig_OmniSlashEffect_Func005001003001001001002() )
endfunction
function Trig_OmniSlashEffect_Func005001003001001002 takes nothing returns boolean
return ( IsUnitVisible(GetFilterUnit(), udg_BushidoOwner) == true )
endfunction
function Trig_OmniSlashEffect_Func005001003001001 takes nothing returns boolean
return GetBooleanAnd( Trig_OmniSlashEffect_Func005001003001001001(), Trig_OmniSlashEffect_Func005001003001001002() )
endfunction
function Trig_OmniSlashEffect_Func005001003001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_BushidoBladeUnit)) == true )
endfunction
function Trig_OmniSlashEffect_Func005001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_OmniSlashEffect_Func005001003001001(), Trig_OmniSlashEffect_Func005001003001002() )
endfunction
function Trig_OmniSlashEffect_Func005001003002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_OmniSlashEffect_Func005001003002002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'e00C' )
endfunction
function Trig_OmniSlashEffect_Func005001003002002002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'o003' )
endfunction
function Trig_OmniSlashEffect_Func005001003002002 takes nothing returns boolean
return GetBooleanAnd( Trig_OmniSlashEffect_Func005001003002002001(), Trig_OmniSlashEffect_Func005001003002002002() )
endfunction
function Trig_OmniSlashEffect_Func005001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_OmniSlashEffect_Func005001003002001(), Trig_OmniSlashEffect_Func005001003002002() )
endfunction
function Trig_OmniSlashEffect_Func005001003 takes nothing returns boolean
return GetBooleanAnd( Trig_OmniSlashEffect_Func005001003001(), Trig_OmniSlashEffect_Func005001003002() )
endfunction
function Trig_OmniSlashEffect_Func005A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_BushidoGroup )
endfunction
function Trig_OmniSlashEffect_Func006C takes nothing returns boolean
if ( not ( udg_Omni1 == false ) ) then
return false
endif
return true
endfunction
function Trig_OmniSlashEffect_Func007Func001C takes nothing returns boolean
if ( ( IsUnitDeadBJ(udg_BushidoBladeUnit) == true ) ) then
return true
endif
if ( ( IsUnitGroupEmptyBJ(udg_BushidoGroup) == true ) ) then
return true
endif
return false
endfunction
function Trig_OmniSlashEffect_Func007C takes nothing returns boolean
if ( not Trig_OmniSlashEffect_Func007Func001C() ) then
return false
endif
return true
endfunction
function Trig_OmniSlashEffect_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call AddSpecialEffectTargetUnitBJ( "chest", udg_BushidoBladeUnit, "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl" )
set udg_BushidoRandomNumber = GetRandomInt(150, 250)
call GroupClear( udg_BushidoGroup )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(550.00, GetUnitLoc(udg_RandPer), Condition(function Trig_OmniSlashEffect_Func005001003)), function Trig_OmniSlashEffect_Func005A )
if ( Trig_OmniSlashEffect_Func006C() ) then
set udg_RandPer = GroupPickRandomUnit(udg_BushidoGroup)
else
call DoNothing( )
endif
if ( Trig_OmniSlashEffect_Func007C() ) then
call DoNothing( )
else
call SetUnitPositionLocFacingBJ( udg_BushidoBladeUnit, PolarProjectionBJ(GetUnitLoc(udg_RandPer), 50.00, GetRandomDirectionDeg()), AngleBetweenPoints(GetUnitLoc(udg_BushidoBladeUnit), GetUnitLoc(udg_RandPer)) )
call SetUnitAnimation( udg_BushidoBladeUnit, "Attack" )
call UnitDamageTargetBJ( udg_BushidoBladeUnit, udg_RandPer, I2R(udg_BushidoRandomNumber), ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
call AddSpecialEffectTargetUnitBJ( "chest", udg_BushidoBladeUnit, "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl" )
endif
endfunction
//===========================================================================
function InitTrig_OmniSlashEffect takes nothing returns nothing
set gg_trg_OmniSlashEffect = CreateTrigger( )
call TriggerAddAction( gg_trg_OmniSlashEffect, function Trig_OmniSlashEffect_Actions )
endfunction
//===========================================================================
// Trigger: omnislash
//===========================================================================
function Trig_omnislash_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A066' ) ) then
return false
endif
return true
endfunction
function Trig_omnislash_Func020C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A066', udg_BushidoBladeUnit) > 1 ) ) then
return false
endif
return true
endfunction
function Trig_omnislash_Func021C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A066', udg_BushidoBladeUnit) > 2 ) ) then
return false
endif
return true
endfunction
function Trig_omnislash_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_omnislash_selection )
set udg_BushidoOwner = GetOwningPlayer(GetTriggerUnit())
set udg_BushidoBladeUnit = GetTriggerUnit()
call SelectUnitRemoveForPlayer( udg_BushidoBladeUnit, udg_BushidoOwner )
call SetUnitVertexColorBJ( udg_BushidoBladeUnit, 100, 100, 100, 50.00 )
call SetUnitPathing( udg_BushidoBladeUnit, false )
call SetUnitInvulnerable( udg_BushidoBladeUnit, true )
set udg_RandPer = GetSpellTargetUnit()
set udg_Omni1 = true
call ConditionalTriggerExecute( gg_trg_OmniSlashEffect )
set udg_Omni1 = false
call PolledWait( 0.25 )
call ConditionalTriggerExecute( gg_trg_OmniSlashEffect )
call PolledWait( 0.25 )
call ConditionalTriggerExecute( gg_trg_OmniSlashEffect )
call PolledWait( 0.25 )
call ConditionalTriggerExecute( gg_trg_OmniSlashEffect )
call PolledWait( 0.25 )
if ( Trig_omnislash_Func020C() ) then
call ConditionalTriggerExecute( gg_trg_OmniSlashEffect )
call PolledWait( 0.25 )
call ConditionalTriggerExecute( gg_trg_OmniSlashEffect )
call PolledWait( 0.25 )
else
call DoNothing( )
endif
if ( Trig_omnislash_Func021C() ) then
call ConditionalTriggerExecute( gg_trg_OmniSlashEffect )
call PolledWait( 0.25 )
call ConditionalTriggerExecute( gg_trg_OmniSlashEffect )
call PolledWait( 0.25 )
call ConditionalTriggerExecute( gg_trg_OmniSlashEffect )
call PolledWait( 0.25 )
else
call DoNothing( )
endif
call GroupClear( udg_BushidoGroup )
call SetUnitPathing( udg_BushidoBladeUnit, true )
call SetUnitInvulnerable( udg_BushidoBladeUnit, false )
call SetUnitScalePercent( udg_BushidoBladeUnit, 100.00, 100.00, 100.00 )
call SetUnitVertexColorBJ( udg_BushidoBladeUnit, 100, 100, 100, 0.00 )
call SelectUnitAddForPlayer( udg_BushidoBladeUnit, udg_BushidoOwner )
call DisableTrigger( gg_trg_omnislash_selection )
endfunction
//===========================================================================
function InitTrig_omnislash takes nothing returns nothing
set gg_trg_omnislash = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_omnislash, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_omnislash, Condition( function Trig_omnislash_Conditions ) )
call TriggerAddAction( gg_trg_omnislash, function Trig_omnislash_Actions )
endfunction
//===========================================================================
// Trigger: Poison Nova effect
//===========================================================================
function Trig_Poison_Nova_effect_Func001001003001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Poison_Nova_effect_Func001001003001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Poison_Nova_effect_Func001001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Poison_Nova_effect_Func001001003001001(), Trig_Poison_Nova_effect_Func001001003001002() )
endfunction
function Trig_Poison_Nova_effect_Func001001003002001001 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B027') == false )
endfunction
function Trig_Poison_Nova_effect_Func001001003002001002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B028') == false )
endfunction
function Trig_Poison_Nova_effect_Func001001003002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Poison_Nova_effect_Func001001003002001001(), Trig_Poison_Nova_effect_Func001001003002001002() )
endfunction
function Trig_Poison_Nova_effect_Func001001003002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Poison_Nova_effect_Func001001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Poison_Nova_effect_Func001001003002001(), Trig_Poison_Nova_effect_Func001001003002002() )
endfunction
function Trig_Poison_Nova_effect_Func001001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Poison_Nova_effect_Func001001003001(), Trig_Poison_Nova_effect_Func001001003002() )
endfunction
function Trig_Poison_Nova_effect_Func001A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'o00I', GetOwningPlayer(udg_PNovaCaster), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A076', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A076', GetLastCreatedUnit(), udg_PNLv )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attack", GetEnumUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
endfunction
function Trig_Poison_Nova_effect_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocMatching(udg_PNovaDist, udg_PNPt, Condition(function Trig_Poison_Nova_effect_Func001001003)), function Trig_Poison_Nova_effect_Func001A )
set udg_PNovaDist = ( udg_PNovaDist + 200.00 )
endfunction
//===========================================================================
function InitTrig_Poison_Nova_effect takes nothing returns nothing
set gg_trg_Poison_Nova_effect = CreateTrigger( )
call TriggerAddAction( gg_trg_Poison_Nova_effect, function Trig_Poison_Nova_effect_Actions )
endfunction
//===========================================================================
// Trigger: Poison Nova
//===========================================================================
function Trig_Poison_Nova_Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A013' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A6' ) ) then
return true
endif
return false
endfunction
function Trig_Poison_Nova_Conditions takes nothing returns boolean
if ( not Trig_Poison_Nova_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Poison_Nova_Func006C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A013' ) ) then
return false
endif
return true
endfunction
function Trig_Poison_Nova_Func008Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A013' ) ) then
return false
endif
return true
endfunction
function Trig_Poison_Nova_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_PNPt = GetUnitLoc(GetTriggerUnit())
set udg_PNovaCaster = GetTriggerUnit()
set udg_PNovaDist = 200.00
if ( Trig_Poison_Nova_Func006C() ) then
set udg_PNLv = GetUnitAbilityLevelSwapped('A013', GetTriggerUnit())
else
set udg_PNLv = ( GetUnitAbilityLevelSwapped('A0A6', GetTriggerUnit()) + 1 )
endif
call GroupClear( udg_PNG )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 36
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc( 1, 'e017', GetOwningPlayer(udg_PNovaCaster), udg_TempLoc, udg_PN[GetForLoopIndexA()] )
if ( Trig_Poison_Nova_Func008Func003C() ) then
call SetUnitAbilityLevelSwapped( 'A057', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A013', GetSpellAbilityUnit()) )
else
call SetUnitAbilityLevelSwapped( 'A057', GetLastCreatedUnit(), ( GetUnitAbilityLevelSwapped('A0A6', GetSpellAbilityUnit()) + 1 ) )
endif
set udg_PNU[GetForLoopIndexA()] = GetLastCreatedUnit()
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", PolarProjectionBJ(udg_TempLoc, 1500.00, ( I2R(GetForLoopIndexA()) * 10.00 )) )
call RemoveLocation(udg_TempLoc)
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 5
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call TriggerExecute( gg_trg_Poison_Nova_effect )
call TriggerSleepAction( 0.40 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 36
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call RemoveUnit( udg_PNU[GetForLoopIndexB()] )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Poison_Nova takes nothing returns nothing
set gg_trg_Poison_Nova = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Poison_Nova, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Poison_Nova, Condition( function Trig_Poison_Nova_Conditions ) )
call TriggerAddAction( gg_trg_Poison_Nova, function Trig_Poison_Nova_Actions )
endfunction
//===========================================================================
// Trigger: eclipse effect
//===========================================================================
function Trig_eclipse_effect_Func001001003001001001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_eclipse_effect_Func001001003001001001002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A04R', GetFilterUnit()) != 1 )
endfunction
function Trig_eclipse_effect_Func001001003001001001 takes nothing returns boolean
return GetBooleanAnd( Trig_eclipse_effect_Func001001003001001001001(), Trig_eclipse_effect_Func001001003001001001002() )
endfunction
function Trig_eclipse_effect_Func001001003001001002 takes nothing returns boolean
return ( GetUnitUserData(GetFilterUnit()) < udg_EclipseLim )
endfunction
function Trig_eclipse_effect_Func001001003001001 takes nothing returns boolean
return GetBooleanAnd( Trig_eclipse_effect_Func001001003001001001(), Trig_eclipse_effect_Func001001003001001002() )
endfunction
function Trig_eclipse_effect_Func001001003001002 takes nothing returns boolean
return ( IsUnitDeadBJ(GetFilterUnit()) == false )
endfunction
function Trig_eclipse_effect_Func001001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_eclipse_effect_Func001001003001001(), Trig_eclipse_effect_Func001001003001002() )
endfunction
function Trig_eclipse_effect_Func001001003002001001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'o003' )
endfunction
function Trig_eclipse_effect_Func001001003002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'e00C' )
endfunction
function Trig_eclipse_effect_Func001001003002001 takes nothing returns boolean
return GetBooleanAnd( Trig_eclipse_effect_Func001001003002001001(), Trig_eclipse_effect_Func001001003002001002() )
endfunction
function Trig_eclipse_effect_Func001001003002002 takes nothing returns boolean
return ( IsUnitAlly(GetFilterUnit(), GetOwningPlayer(udg_EclipseCaster)) == false )
endfunction
function Trig_eclipse_effect_Func001001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_eclipse_effect_Func001001003002001(), Trig_eclipse_effect_Func001001003002002() )
endfunction
function Trig_eclipse_effect_Func001001003 takes nothing returns boolean
return GetBooleanAnd( Trig_eclipse_effect_Func001001003001(), Trig_eclipse_effect_Func001001003002() )
endfunction
function Trig_eclipse_effect_Func001A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_EclipseGroup )
endfunction
function Trig_eclipse_effect_Func003C takes nothing returns boolean
if ( not ( IsUnitDeadBJ(udg_EclipseTarget) == true ) ) then
return false
endif
if ( not ( IsUnitGroupEmptyBJ(udg_EclipseGroup) == false ) ) then
return false
endif
return true
endfunction
function Trig_eclipse_effect_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocMatching(700.00, GetUnitLoc(udg_EclipseCaster), Condition(function Trig_eclipse_effect_Func001001003)), function Trig_eclipse_effect_Func001A )
set udg_EclipseTarget = GroupPickRandomUnit(udg_EclipseGroup)
if ( Trig_eclipse_effect_Func003C() ) then
call GroupRemoveUnitSimple( udg_EclipseTarget, udg_EclipseGroup )
call TriggerExecute( GetTriggeringTrigger() )
else
call DoNothing( )
endif
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(udg_EclipseCaster), GetUnitLoc(udg_EclipseTarget), bj_UNIT_FACING )
call UnitAddAbilityBJ( udg_EclipseBeam, GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "firebolt", udg_EclipseTarget )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitUserData( udg_EclipseTarget, ( GetUnitUserData(udg_EclipseTarget) + 1 ) )
call GroupClear( udg_EclipseGroup )
endfunction
//===========================================================================
function InitTrig_eclipse_effect takes nothing returns nothing
set gg_trg_eclipse_effect = CreateTrigger( )
call TriggerAddAction( gg_trg_eclipse_effect, function Trig_eclipse_effect_Actions )
endfunction
//===========================================================================
// Trigger: Eclipse Cast
//===========================================================================
function Trig_Eclipse_Cast_Func002001 takes nothing returns boolean
return ( GetSpellAbilityId() == 'A054' )
endfunction
function Trig_Eclipse_Cast_Func002002 takes nothing returns boolean
return ( GetSpellAbilityId() == 'A00U' )
endfunction
function Trig_Eclipse_Cast_Conditions takes nothing returns boolean
if ( not GetBooleanOr( Trig_Eclipse_Cast_Func002001(), Trig_Eclipse_Cast_Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A054' ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func004C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A042', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func005C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A042', GetTriggerUnit()) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func006C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A042', GetTriggerUnit()) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func007C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A042', GetTriggerUnit()) == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func008Func003C takes nothing returns boolean
if ( ( GetUnitAbilityLevelSwapped('A054', GetTriggerUnit()) == 1 ) ) then
return true
endif
if ( ( GetUnitAbilityLevelSwapped('A00U', GetTriggerUnit()) == 1 ) ) then
return true
endif
return false
endfunction
function Trig_Eclipse_Cast_Func008C takes nothing returns boolean
if ( not Trig_Eclipse_Cast_Func008Func003C() ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func009Func002C takes nothing returns boolean
if ( ( GetUnitAbilityLevelSwapped('A054', GetTriggerUnit()) == 2 ) ) then
return true
endif
if ( ( GetUnitAbilityLevelSwapped('A00U', GetTriggerUnit()) == 2 ) ) then
return true
endif
return false
endfunction
function Trig_Eclipse_Cast_Func009C takes nothing returns boolean
if ( not Trig_Eclipse_Cast_Func009Func002C() ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func010Func002C takes nothing returns boolean
if ( ( GetUnitAbilityLevelSwapped('A054', GetTriggerUnit()) == 3 ) ) then
return true
endif
if ( ( GetUnitAbilityLevelSwapped('A00U', GetTriggerUnit()) == 3 ) ) then
return true
endif
return false
endfunction
function Trig_Eclipse_Cast_Func010C takes nothing returns boolean
if ( not Trig_Eclipse_Cast_Func010Func002C() ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func019C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00U' ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func020C takes nothing returns boolean
if ( not ( udg_EclipseLvl >= 2 ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func021Func006C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00U' ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func021C takes nothing returns boolean
if ( not ( udg_EclipseLvl >= 3 ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func022002 takes nothing returns nothing
call SetUnitUserData( GetEnumUnit(), 0 )
endfunction
function Trig_Eclipse_Cast_Actions takes nothing returns nothing
if ( Trig_Eclipse_Cast_Func001C() ) then
set udg_EclipseLim = 5
else
set udg_EclipseLim = 6
endif
set udg_EclipseCaster = GetTriggerUnit()
if ( Trig_Eclipse_Cast_Func004C() ) then
set udg_EclipseBeam = 'A05O'
else
call DoNothing( )
endif
if ( Trig_Eclipse_Cast_Func005C() ) then
set udg_EclipseBeam = 'A031'
else
call DoNothing( )
endif
if ( Trig_Eclipse_Cast_Func006C() ) then
set udg_EclipseBeam = 'A032'
else
call DoNothing( )
endif
if ( Trig_Eclipse_Cast_Func007C() ) then
set udg_EclipseBeam = 'A033'
else
call DoNothing( )
endif
if ( Trig_Eclipse_Cast_Func008C() ) then
set udg_EclipseLvl = 1
else
call DoNothing( )
endif
if ( Trig_Eclipse_Cast_Func009C() ) then
set udg_EclipseLvl = 2
else
call DoNothing( )
endif
if ( Trig_Eclipse_Cast_Func010C() ) then
set udg_EclipseLvl = 3
else
call DoNothing( )
endif
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
if ( Trig_Eclipse_Cast_Func019C() ) then
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
else
call DoNothing( )
endif
if ( Trig_Eclipse_Cast_Func020C() ) then
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
else
call DoNothing( )
endif
if ( Trig_Eclipse_Cast_Func021C() ) then
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
call TriggerExecute( gg_trg_eclipse_effect )
if ( Trig_Eclipse_Cast_Func021Func006C() ) then
call TriggerSleepAction( 0.05 )
call TriggerExecute( gg_trg_eclipse_effect )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectAll(GetPlayableMapRect()), function Trig_Eclipse_Cast_Func022002 )
endfunction
//===========================================================================
function InitTrig_Eclipse_Cast takes nothing returns nothing
set gg_trg_Eclipse_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Eclipse_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Eclipse_Cast, Condition( function Trig_Eclipse_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Eclipse_Cast, function Trig_Eclipse_Cast_Actions )
endfunction
//===========================================================================
// Trigger: chain freezing effect
//===========================================================================
function Trig_chain_freezing_effect_Func012Func004001003001001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003001001002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A04R', GetFilterUnit()) != 1 )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003001001 takes nothing returns boolean
return GetBooleanAnd( Trig_chain_freezing_effect_Func012Func004001003001001001(), Trig_chain_freezing_effect_Func012Func004001003001001002() )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), udg_ChainFrostPlayer) == true )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_chain_freezing_effect_Func012Func004001003001001(), Trig_chain_freezing_effect_Func012Func004001003001002() )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003002001001 takes nothing returns boolean
return ( GetFilterUnit() != udg_FrostTarget )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003002001002 takes nothing returns boolean
return ( IsUnitVisible(GetFilterUnit(), udg_ChainFrostPlayer) == true )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003002001 takes nothing returns boolean
return GetBooleanAnd( Trig_chain_freezing_effect_Func012Func004001003002001001(), Trig_chain_freezing_effect_Func012Func004001003002001002() )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003002002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003002002002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'o003' )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003002002002002 takes nothing returns boolean
return ( IsUnitVisible(GetFilterUnit(), udg_ChainFrostPlayer) == true )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003002002002 takes nothing returns boolean
return GetBooleanAnd( Trig_chain_freezing_effect_Func012Func004001003002002002001(), Trig_chain_freezing_effect_Func012Func004001003002002002002() )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003002002 takes nothing returns boolean
return GetBooleanAnd( Trig_chain_freezing_effect_Func012Func004001003002002001(), Trig_chain_freezing_effect_Func012Func004001003002002002() )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_chain_freezing_effect_Func012Func004001003002001(), Trig_chain_freezing_effect_Func012Func004001003002002() )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003 takes nothing returns boolean
return GetBooleanAnd( Trig_chain_freezing_effect_Func012Func004001003001(), Trig_chain_freezing_effect_Func012Func004001003002() )
endfunction
function Trig_chain_freezing_effect_Func012Func004A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_ChainFrostGroup )
endfunction
function Trig_chain_freezing_effect_Func012Func005C takes nothing returns boolean
if ( not ( IsUnitGroupEmptyBJ(udg_ChainFrostGroup) == false ) ) then
return false
endif
return true
endfunction
function Trig_chain_freezing_effect_Func012C takes nothing returns boolean
if ( not ( udg_ChainFreezingCounter < 7 ) ) then
return false
endif
return true
endfunction
function Trig_chain_freezing_effect_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_ChainFreezingCounter = ( udg_ChainFreezingCounter + 1 )
call CreateNUnitsAtLoc( 1, 'e00C', udg_ChainFrostPlayer, GetUnitLoc(udg_FrostTarget), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A091', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A091', GetLastCreatedUnit(), udg_CFLv )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "frostnova", udg_FrostTarget )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call RemoveUnit( udg_ChainFreezingUnit )
if ( Trig_chain_freezing_effect_Func012C() ) then
call GroupClear( udg_ChainFrostGroup )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(600.00, GetUnitLoc(udg_FrostTarget), Condition(function Trig_chain_freezing_effect_Func012Func004001003)), function Trig_chain_freezing_effect_Func012Func004A )
if ( Trig_chain_freezing_effect_Func012Func005C() ) then
call CreateNUnitsAtLoc( 1, 'e009', udg_ChainFrostPlayer, GetUnitLoc(udg_FrostTarget), bj_UNIT_FACING )
set udg_ChainFreezingUnit = GetLastCreatedUnit()
set udg_FrostTarget = GroupPickRandomUnit(udg_ChainFrostGroup)
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", GetUnitLoc(udg_FrostTarget) )
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call PolledWait( ( ( DistanceBetweenPoints(GetUnitLoc(udg_ChainFreezingUnit), GetUnitLoc(udg_FrostTarget)) - 90.00 ) / 575.00 ) )
call TriggerExecute( GetTriggeringTrigger() )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_chain_freezing_effect takes nothing returns nothing
set gg_trg_chain_freezing_effect = CreateTrigger( )
call TriggerAddAction( gg_trg_chain_freezing_effect, function Trig_chain_freezing_effect_Actions )
endfunction
//===========================================================================
// Trigger: Chain Freezing try
//===========================================================================
function Trig_Chain_Freezing_try_Func004C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A05T' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A08H' ) ) then
return true
endif
return false
endfunction
function Trig_Chain_Freezing_try_Conditions takes nothing returns boolean
if ( not Trig_Chain_Freezing_try_Func004C() ) then
return false
endif
return true
endfunction
function Trig_Chain_Freezing_try_Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05T' ) ) then
return false
endif
return true
endfunction
function Trig_Chain_Freezing_try_Actions takes nothing returns nothing
set udg_ChainFrostPlayer = GetOwningPlayer(GetTriggerUnit())
set udg_ChainFreezingCounter = 0
if ( Trig_Chain_Freezing_try_Func003C() ) then
set udg_CFLv = GetUnitAbilityLevelSwapped('A05T', GetTriggerUnit())
else
set udg_CFLv = ( GetUnitAbilityLevelSwapped('A08H', GetTriggerUnit()) + 1 )
endif
set udg_FrostTarget = GetSpellTargetUnit()
call CreateNUnitsAtLoc( 1, 'e009', udg_ChainFrostPlayer, GetUnitLoc(GetSpellAbilityUnit()), bj_UNIT_FACING )
set udg_ChainFreezingUnit = GetLastCreatedUnit()
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", GetUnitLoc(udg_FrostTarget) )
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call PolledWait( ( ( DistanceBetweenPoints(GetUnitLoc(udg_ChainFreezingUnit), GetUnitLoc(udg_FrostTarget)) - 90.00 ) / 575.00 ) )
call TriggerExecute( gg_trg_chain_freezing_effect )
endfunction
//===========================================================================
function InitTrig_Chain_Freezing_try takes nothing returns nothing
set gg_trg_Chain_Freezing_try = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Chain_Freezing_try, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Chain_Freezing_try, Condition( function Trig_Chain_Freezing_try_Conditions ) )
call TriggerAddAction( gg_trg_Chain_Freezing_try, function Trig_Chain_Freezing_try_Actions )
endfunction
//===========================================================================
// Trigger: void
//
// SPELLCASTER
//===========================================================================
function Trig_void_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02H' ) ) then
return false
endif
return true
endfunction
function Trig_void_Func001C takes nothing returns boolean
if ( not ( GetTimeOfDay() >= 6.00 ) ) then
return false
endif
if ( not ( GetTimeOfDay() <= 18.00 ) ) then
return false
endif
return true
endfunction
function Trig_void_Actions takes nothing returns nothing
if ( Trig_void_Func001C() ) then
call DoNothing( )
else
set udg_TempLoc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A02R', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "slow", GetSpellTargetUnit() )
endif
endfunction
//===========================================================================
function InitTrig_void takes nothing returns nothing
set gg_trg_void = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_void, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_void, Condition( function Trig_void_Conditions ) )
call TriggerAddAction( gg_trg_void, function Trig_void_Actions )
endfunction
//===========================================================================
// Trigger: chaos bolt
//
// SPELLCASTER
//===========================================================================
function Trig_chaos_bolt_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A055' ) ) then
return false
endif
return true
endfunction
function Trig_chaos_bolt_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetSpellTargetUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A04U', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A04U', GetLastCreatedUnit(), GetRandomInt(1, 5) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", GetSpellTargetUnit() )
endfunction
//===========================================================================
function InitTrig_chaos_bolt takes nothing returns nothing
set gg_trg_chaos_bolt = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_chaos_bolt, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_chaos_bolt, Condition( function Trig_chaos_bolt_Conditions ) )
call TriggerAddAction( gg_trg_chaos_bolt, function Trig_chaos_bolt_Actions )
endfunction
//===========================================================================
// Trigger: phantom refresh
//===========================================================================
function Trig_phantom_refresh_Func002001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'U00B' )
endfunction
function Trig_phantom_refresh_Func002001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetTriggerPlayer() )
endfunction
function Trig_phantom_refresh_Func002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_phantom_refresh_Func002001002001(), Trig_phantom_refresh_Func002001002002() )
endfunction
function Trig_phantom_refresh_Func002A takes nothing returns nothing
call SetUnitVertexColorBJ( GetEnumUnit(), 100, 100, 100, ( 20.00 * I2R(GetUnitAbilityLevelSwapped('A03P', GetEnumUnit())) ) )
call CreateNUnitsAtLoc( 1, 'e00C', GetTriggerPlayer(), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 3.00, 'BTLF', GetLastCreatedUnit() )
call UnitAddAbilityBJ( 'A05Q', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "frostnova", GetEnumUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
endfunction
function Trig_phantom_refresh_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_phantom_refresh_Func002001002)), function Trig_phantom_refresh_Func002A )
endfunction
//===========================================================================
function InitTrig_phantom_refresh takes nothing returns nothing
set gg_trg_phantom_refresh = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(1), "-refresh", true )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(2), "-refresh", true )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(3), "-refresh", true )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(4), "-refresh", true )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(5), "-refresh", true )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(7), "-refresh", true )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(8), "-refresh", true )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(9), "-refresh", true )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(10), "-refresh", true )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(11), "-refresh", true )
call TriggerAddAction( gg_trg_phantom_refresh, function Trig_phantom_refresh_Actions )
endfunction
//===========================================================================
// Trigger: blur learned
//===========================================================================
function Trig_blur_learned_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A03P' ) ) then
return false
endif
return true
endfunction
function Trig_blur_learned_Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A03P', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_blur_learned_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A03P', GetTriggerUnit()) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_blur_learned_Func003C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A03P', GetTriggerUnit()) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_blur_learned_Func004C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A03P', GetTriggerUnit()) == 4 ) ) then
return false
endif
return true
endfunction
function Trig_blur_learned_Actions takes nothing returns nothing
if ( Trig_blur_learned_Func001C() ) then
call SetUnitVertexColorBJ( GetTriggerUnit(), 100, 100, 100, 40.00 )
else
call DoNothing( )
endif
if ( Trig_blur_learned_Func002C() ) then
call SetUnitVertexColorBJ( GetTriggerUnit(), 100, 100, 100, 60.00 )
else
call DoNothing( )
endif
if ( Trig_blur_learned_Func003C() ) then
call SetUnitVertexColorBJ( GetTriggerUnit(), 100, 100, 100, 80.00 )
else
call DoNothing( )
endif
if ( Trig_blur_learned_Func004C() ) then
call SetUnitVertexColorBJ( GetTriggerUnit(), 100, 100, 100, 99.00 )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_blur_learned takes nothing returns nothing
set gg_trg_blur_learned = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_blur_learned, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_blur_learned, Condition( function Trig_blur_learned_Conditions ) )
call TriggerAddAction( gg_trg_blur_learned, function Trig_blur_learned_Actions )
endfunction
//===========================================================================
// Trigger: moonglaive 3
//===========================================================================
function Trig_moonglaive_3_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A041' ) ) then
return false
endif
return true
endfunction
function Trig_moonglaive_3_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A041', GetTriggerUnit()) == 4 ) ) then
return false
endif
return true
endfunction
function Trig_moonglaive_3_Actions takes nothing returns nothing
call SetPlayerTechResearchedSwap( 'Remg', GetUnitAbilityLevelSwapped('A041', GetTriggerUnit()), GetOwningPlayer(GetLearningUnit()) )
if ( Trig_moonglaive_3_Func002C() ) then
call DestroyTrigger(GetTriggeringTrigger())
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_moonglaive_3 takes nothing returns nothing
set gg_trg_moonglaive_3 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_moonglaive_3, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_moonglaive_3, Condition( function Trig_moonglaive_3_Conditions ) )
call TriggerAddAction( gg_trg_moonglaive_3, function Trig_moonglaive_3_Actions )
endfunction
//===========================================================================
// Trigger: take aim
//===========================================================================
function Trig_take_aim_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A03U' ) ) then
return false
endif
return true
endfunction
function Trig_take_aim_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A03U', GetTriggerUnit()) == 4 ) ) then
return false
endif
return true
endfunction
function Trig_take_aim_Actions takes nothing returns nothing
call SetPlayerTechResearchedSwap( 'R005', GetUnitAbilityLevelSwapped('A03U', GetTriggerUnit()), GetOwningPlayer(GetLearningUnit()) )
if ( Trig_take_aim_Func002C() ) then
call DestroyTrigger(GetTriggeringTrigger())
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_take_aim takes nothing returns nothing
set gg_trg_take_aim = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_take_aim, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_take_aim, Condition( function Trig_take_aim_Conditions ) )
call TriggerAddAction( gg_trg_take_aim, function Trig_take_aim_Actions )
endfunction
//===========================================================================
// Trigger: dragon bug
//===========================================================================
function Trig_dragon_bug_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03G' ) ) then
return false
endif
return true
endfunction
function Trig_dragon_bug_Func005C takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_DragonUser) == true ) ) then
return false
endif
return true
endfunction
function Trig_dragon_bug_Actions takes nothing returns nothing
set udg_DragonUser = GetSpellAbilityUnit()
set udg_dragonskills = GetHeroSkillPoints(udg_DragonUser)
call ModifyHeroSkillPoints( udg_DragonUser, bj_MODIFYMETHOD_SET, 0 )
call PolledWait( 60.00 )
if ( Trig_dragon_bug_Func005C() ) then
call ModifyHeroSkillPoints( udg_DragonUser, bj_MODIFYMETHOD_SET, udg_dragonskills )
set udg_dragonskills = 0
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_dragon_bug takes nothing returns nothing
set gg_trg_dragon_bug = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_dragon_bug, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_dragon_bug, Condition( function Trig_dragon_bug_Conditions ) )
call TriggerAddAction( gg_trg_dragon_bug, function Trig_dragon_bug_Actions )
endfunction
//===========================================================================
// Trigger: dragon bug 2
//===========================================================================
function Trig_dragon_bug_2_Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00G' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00F' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00E' ) ) then
return true
endif
return false
endfunction
function Trig_dragon_bug_2_Conditions takes nothing returns boolean
if ( not Trig_dragon_bug_2_Func003C() ) then
return false
endif
return true
endfunction
function Trig_dragon_bug_2_Actions takes nothing returns nothing
set udg_dragonskills = ( udg_dragonskills + 1 )
call ModifyHeroSkillPoints( GetLevelingUnit(), bj_MODIFYMETHOD_SUB, 1 )
endfunction
//===========================================================================
function InitTrig_dragon_bug_2 takes nothing returns nothing
set gg_trg_dragon_bug_2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_dragon_bug_2, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_dragon_bug_2, Condition( function Trig_dragon_bug_2_Conditions ) )
call TriggerAddAction( gg_trg_dragon_bug_2, function Trig_dragon_bug_2_Actions )
endfunction
//===========================================================================
// Trigger: dragon bug 3
//===========================================================================
function Trig_dragon_bug_3_Func004C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00G' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00F' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00E' ) ) then
return true
endif
return false
endfunction
function Trig_dragon_bug_3_Conditions takes nothing returns boolean
if ( not Trig_dragon_bug_3_Func004C() ) then
return false
endif
return true
endfunction
function Trig_dragon_bug_3_Func001001 takes nothing returns boolean
return ( IsUnitAliveBJ(udg_DragonUser) == true )
endfunction
function Trig_dragon_bug_3_Actions takes nothing returns nothing
loop
exitwhen ( Trig_dragon_bug_3_Func001001() )
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, 1))
endloop
call ModifyHeroSkillPoints( udg_DragonUser, bj_MODIFYMETHOD_SET, udg_dragonskills )
set udg_dragonskills = 0
endfunction
//===========================================================================
function InitTrig_dragon_bug_3 takes nothing returns nothing
set gg_trg_dragon_bug_3 = CreateTrigger( )
call DisableTrigger( gg_trg_dragon_bug_3 )
call TriggerRegisterAnyUnitEventBJ( gg_trg_dragon_bug_3, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_dragon_bug_3, Condition( function Trig_dragon_bug_3_Conditions ) )
call TriggerAddAction( gg_trg_dragon_bug_3, function Trig_dragon_bug_3_Actions )
endfunction
//===========================================================================
// Trigger: Freezing field Cast
//===========================================================================
function Trig_Freezing_field_Cast_Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A03R' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AV' ) ) then
return true
endif
return false
endfunction
function Trig_Freezing_field_Cast_Conditions takes nothing returns boolean
if ( not Trig_Freezing_field_Cast_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Freezing_field_Cast_Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03R' ) ) then
return false
endif
return true
endfunction
function Trig_Freezing_field_Cast_Actions takes nothing returns nothing
set udg_FFHero = GetTriggerUnit()
if ( Trig_Freezing_field_Cast_Func003C() ) then
set udg_FFLv = GetUnitAbilityLevelSwapped('A03R', GetTriggerUnit())
else
set udg_FFLv = ( GetUnitAbilityLevelSwapped('A0AV', GetTriggerUnit()) + 1 )
endif
call EnableTrigger( gg_trg_FreezingFieldSpawn2 )
endfunction
//===========================================================================
function InitTrig_Freezing_field_Cast takes nothing returns nothing
set gg_trg_Freezing_field_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Freezing_field_Cast, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
call TriggerAddCondition( gg_trg_Freezing_field_Cast, Condition( function Trig_Freezing_field_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Freezing_field_Cast, function Trig_Freezing_field_Cast_Actions )
endfunction
//===========================================================================
// Trigger: Freezing field end
//===========================================================================
function Trig_Freezing_field_end_Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A03R' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AV' ) ) then
return true
endif
return false
endfunction
function Trig_Freezing_field_end_Conditions takes nothing returns boolean
if ( not Trig_Freezing_field_end_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Freezing_field_end_Func004001003001 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_FFHero)) == false )
endfunction
function Trig_Freezing_field_end_Func004001003002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'e00C' )
endfunction
function Trig_Freezing_field_end_Func004001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Freezing_field_end_Func004001003001(), Trig_Freezing_field_end_Func004001003002() )
endfunction
function Trig_Freezing_field_end_Func004A takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Freezing_field_end_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call DisableTrigger( gg_trg_FreezingFieldSpawn2 )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(1200.00, GetUnitLoc(udg_FFHero), Condition(function Trig_Freezing_field_end_Func004001003)), function Trig_Freezing_field_end_Func004A )
endfunction
//===========================================================================
function InitTrig_Freezing_field_end takes nothing returns nothing
set gg_trg_Freezing_field_end = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Freezing_field_end, EVENT_PLAYER_UNIT_SPELL_ENDCAST )
call TriggerAddCondition( gg_trg_Freezing_field_end, Condition( function Trig_Freezing_field_end_Conditions ) )
call TriggerAddAction( gg_trg_Freezing_field_end, function Trig_Freezing_field_end_Actions )
endfunction
//===========================================================================
// Trigger: FreezingFieldSpawn2
//===========================================================================
function Trig_FreezingFieldSpawn2_Actions takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(udg_FFHero)
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(udg_FFHero), PolarProjectionBJ(GetUnitLoc(udg_FFHero), GetRandomReal(125.00, 635.00), GetRandomDirectionDeg()), bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A03X', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A03X', GetLastCreatedUnit(), udg_FFLv )
call SetUnitPathing( GetLastCreatedUnit(), false )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "frostnova", GetLastCreatedUnit() )
call UnitApplyTimedLifeBJ( 0.25, 'BTLF', GetLastCreatedUnit() )
endfunction
//===========================================================================
function InitTrig_FreezingFieldSpawn2 takes nothing returns nothing
set gg_trg_FreezingFieldSpawn2 = CreateTrigger( )
call DisableTrigger( gg_trg_FreezingFieldSpawn2 )
call TriggerRegisterTimerEventPeriodic( gg_trg_FreezingFieldSpawn2, 0.10 )
call TriggerAddAction( gg_trg_FreezingFieldSpawn2, function Trig_FreezingFieldSpawn2_Actions )
endfunction
//===========================================================================
// Trigger: Morph learned
//===========================================================================
function Trig_Morph_learned_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A040' ) ) then
return false
endif
return true
endfunction
function Trig_Morph_learned_Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A040', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Morph_learned_Actions takes nothing returns nothing
if ( Trig_Morph_learned_Func001C() ) then
call UnitAddAbilityBJ( 'A048', GetTriggerUnit() )
else
call SetUnitAbilityLevelSwapped( 'A048', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A040', GetTriggerUnit()) )
endif
endfunction
//===========================================================================
function InitTrig_Morph_learned takes nothing returns nothing
set gg_trg_Morph_learned = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Morph_learned, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Morph_learned, Condition( function Trig_Morph_learned_Conditions ) )
call TriggerAddAction( gg_trg_Morph_learned, function Trig_Morph_learned_Actions )
endfunction
//===========================================================================
// Trigger: morph turn on
//===========================================================================
function Trig_morph_turn_on_Func004Func002C takes nothing returns boolean
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("blackarrowon") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("flamingarrows") ) ) then
return true
endif
return false
endfunction
function Trig_morph_turn_on_Func004C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'O00P' ) ) then
return false
endif
if ( not Trig_morph_turn_on_Func004Func002C() ) then
return false
endif
return true
endfunction
function Trig_morph_turn_on_Conditions takes nothing returns boolean
if ( not Trig_morph_turn_on_Func004C() ) then
return false
endif
return true
endfunction
function Trig_morph_turn_on_Func002C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("flamingarrows") ) ) then
return false
endif
return true
endfunction
function Trig_morph_turn_on_Func003C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("blackarrowon") ) ) then
return false
endif
return true
endfunction
function Trig_morph_turn_on_Actions takes nothing returns nothing
set udg_MorphlingHero = GetTriggerUnit()
if ( Trig_morph_turn_on_Func002C() ) then
call EnableTrigger( gg_trg_morph_str )
call DisableTrigger( gg_trg_morph_agl )
else
call DoNothing( )
endif
if ( Trig_morph_turn_on_Func003C() ) then
call EnableTrigger( gg_trg_morph_agl )
call DisableTrigger( gg_trg_morph_str )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_morph_turn_on takes nothing returns nothing
set gg_trg_morph_turn_on = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_morph_turn_on, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_morph_turn_on, Condition( function Trig_morph_turn_on_Conditions ) )
call TriggerAddAction( gg_trg_morph_turn_on, function Trig_morph_turn_on_Actions )
endfunction
//===========================================================================
// Trigger: morph turn off
//===========================================================================
function Trig_morph_turn_off_Func003Func002C takes nothing returns boolean
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("blackarrowoff") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("unflamingarrows") ) ) then
return true
endif
return false
endfunction
function Trig_morph_turn_off_Func003C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'O00P' ) ) then
return false
endif
if ( not Trig_morph_turn_off_Func003Func002C() ) then
return false
endif
return true
endfunction
function Trig_morph_turn_off_Conditions takes nothing returns boolean
if ( not Trig_morph_turn_off_Func003C() ) then
return false
endif
return true
endfunction
function Trig_morph_turn_off_Func001C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("unflamingarrows") ) ) then
return false
endif
return true
endfunction
function Trig_morph_turn_off_Func002C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("blackarrowoff") ) ) then
return false
endif
return true
endfunction
function Trig_morph_turn_off_Actions takes nothing returns nothing
if ( Trig_morph_turn_off_Func001C() ) then
call DisableTrigger( gg_trg_morph_str )
else
call DoNothing( )
endif
if ( Trig_morph_turn_off_Func002C() ) then
call DisableTrigger( gg_trg_morph_agl )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_morph_turn_off takes nothing returns nothing
set gg_trg_morph_turn_off = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_morph_turn_off, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_morph_turn_off, Condition( function Trig_morph_turn_off_Conditions ) )
call TriggerAddAction( gg_trg_morph_turn_off, function Trig_morph_turn_off_Actions )
endfunction
//===========================================================================
// Trigger: morph str
//===========================================================================
function Trig_morph_str_Func001C takes nothing returns boolean
if ( not ( GetHeroStatBJ(bj_HEROSTAT_AGI, udg_MorphlingHero, false) > ( 2 * GetUnitAbilityLevelSwapped('A040', udg_MorphlingHero) ) ) ) then
return false
endif
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, udg_MorphlingHero) >= 10.00 ) ) then
return false
endif
return true
endfunction
function Trig_morph_str_Actions takes nothing returns nothing
if ( Trig_morph_str_Func001C() ) then
call SetUnitManaBJ( udg_MorphlingHero, ( GetUnitStateSwap(UNIT_STATE_MANA, udg_MorphlingHero) - 10.00 ) )
call ModifyHeroStat( bj_HEROSTAT_STR, udg_MorphlingHero, bj_MODIFYMETHOD_ADD, ( 2 * GetUnitAbilityLevelSwapped('A040', udg_MorphlingHero) ) )
call ModifyHeroStat( bj_HEROSTAT_AGI, udg_MorphlingHero, bj_MODIFYMETHOD_SUB, ( 2 * GetUnitAbilityLevelSwapped('A040', udg_MorphlingHero) ) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_morph_str takes nothing returns nothing
set gg_trg_morph_str = CreateTrigger( )
call DisableTrigger( gg_trg_morph_str )
call TriggerRegisterTimerEventPeriodic( gg_trg_morph_str, 1.00 )
call TriggerAddAction( gg_trg_morph_str, function Trig_morph_str_Actions )
endfunction
//===========================================================================
// Trigger: morph agl
//===========================================================================
function Trig_morph_agl_Func001C takes nothing returns boolean
if ( not ( GetHeroStatBJ(bj_HEROSTAT_STR, udg_MorphlingHero, false) > ( 2 * GetUnitAbilityLevelSwapped('A040', udg_MorphlingHero) ) ) ) then
return false
endif
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, udg_MorphlingHero) >= 10.00 ) ) then
return false
endif
return true
endfunction
function Trig_morph_agl_Actions takes nothing returns nothing
if ( Trig_morph_agl_Func001C() ) then
call SetUnitManaBJ( udg_MorphlingHero, ( GetUnitStateSwap(UNIT_STATE_MANA, udg_MorphlingHero) - 10.00 ) )
call ModifyHeroStat( bj_HEROSTAT_STR, udg_MorphlingHero, bj_MODIFYMETHOD_SUB, ( 2 * GetUnitAbilityLevelSwapped('A040', udg_MorphlingHero) ) )
call ModifyHeroStat( bj_HEROSTAT_AGI, udg_MorphlingHero, bj_MODIFYMETHOD_ADD, ( 2 * GetUnitAbilityLevelSwapped('A040', udg_MorphlingHero) ) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_morph_agl takes nothing returns nothing
set gg_trg_morph_agl = CreateTrigger( )
call DisableTrigger( gg_trg_morph_agl )
call TriggerRegisterTimerEventPeriodic( gg_trg_morph_agl, 1.00 )
call TriggerAddAction( gg_trg_morph_agl, function Trig_morph_agl_Actions )
endfunction
//===========================================================================
// Trigger: morphling attribute
//===========================================================================
function Trig_morphling_attribute_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A04H' ) ) then
return false
endif
return true
endfunction
function Trig_morphling_attribute_Actions takes nothing returns nothing
call ModifyHeroStat( bj_HEROSTAT_STR, GetTriggerUnit(), bj_MODIFYMETHOD_ADD, 2 )
call ModifyHeroStat( bj_HEROSTAT_AGI, GetTriggerUnit(), bj_MODIFYMETHOD_ADD, 2 )
endfunction
//===========================================================================
function InitTrig_morphling_attribute takes nothing returns nothing
set gg_trg_morphling_attribute = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_morphling_attribute, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_morphling_attribute, Condition( function Trig_morphling_attribute_Conditions ) )
call TriggerAddAction( gg_trg_morphling_attribute, function Trig_morphling_attribute_Actions )
endfunction
//===========================================================================
// Trigger: Copy steal
//===========================================================================
function Trig_Copy_steal_Func006C takes nothing returns boolean
if ( not ( GetTriggerUnit() != udg_MorphlingCopyUnit ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A02W' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIsw' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AEbl' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'ACr2' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0DR' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A03G' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0BG' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0A5' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0A7' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIrc' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A054' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A05Y' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A08L' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A092' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A090' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A08Z' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A08Y' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'Afod' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0AE' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0AD' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0AC' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0AB' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0AA' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0A9' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0AI' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AChx' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'ACrj' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIpg' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'ACch' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A017' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIil' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIxk' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A05Z' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIcy' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIdb' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0BE' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0AG' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AEvi' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A03R' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0AV' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A066' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIpl' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIsw' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A00G' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A06Q' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AEtq' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A07Y' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A06U' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A07C' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A06L' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A093' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AHfa' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0D8' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIpr' ) ) then
return false
endif
if ( not ( DistanceBetweenPoints(GetUnitLoc(GetTriggerUnit()), GetUnitLoc(udg_MorphlingCopyUnit)) <= 800.00 ) ) then
return false
endif
return true
endfunction
function Trig_Copy_steal_Conditions takes nothing returns boolean
if ( not Trig_Copy_steal_Func006C() ) then
return false
endif
return true
endfunction
function Trig_Copy_steal_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( udg_MorphAbil, udg_MorphlingCopyUnit )
set udg_MorphAbil = GetSpellAbilityId()
call UnitAddAbilityBJ( udg_MorphAbil, udg_MorphlingCopyUnit )
call SetUnitAbilityLevelSwapped( udg_MorphAbil, udg_MorphlingCopyUnit, GetUnitAbilityLevelSwapped(udg_MorphAbil, GetTriggerUnit()) )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Copy_steal takes nothing returns nothing
set gg_trg_Copy_steal = CreateTrigger( )
call DisableTrigger( gg_trg_Copy_steal )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Copy_steal, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Copy_steal, Condition( function Trig_Copy_steal_Conditions ) )
call TriggerAddAction( gg_trg_Copy_steal, function Trig_Copy_steal_Actions )
endfunction
//===========================================================================
// Trigger: Copy Activate
//===========================================================================
function Trig_Copy_Activate_Conditions takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("manashieldon") ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetOrderedUnit()) == 'O00P' ) ) then
return false
endif
return true
endfunction
function Trig_Copy_Activate_Actions takes nothing returns nothing
set udg_MorphlingCopyUnit = GetOrderedUnit()
call EnableTrigger( gg_trg_Copy_steal )
endfunction
//===========================================================================
function InitTrig_Copy_Activate takes nothing returns nothing
set gg_trg_Copy_Activate = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Copy_Activate, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Copy_Activate, Condition( function Trig_Copy_Activate_Conditions ) )
call TriggerAddAction( gg_trg_Copy_Activate, function Trig_Copy_Activate_Actions )
endfunction
//===========================================================================
// Trigger: Copy Deactivate
//===========================================================================
function Trig_Copy_Deactivate_Conditions takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("manashieldoff") ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetOrderedUnit()) == 'O00P' ) ) then
return false
endif
return true
endfunction
function Trig_Copy_Deactivate_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Copy_steal )
endfunction
//===========================================================================
function InitTrig_Copy_Deactivate takes nothing returns nothing
set gg_trg_Copy_Deactivate = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Copy_Deactivate, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Copy_Deactivate, Condition( function Trig_Copy_Deactivate_Conditions ) )
call TriggerAddAction( gg_trg_Copy_Deactivate, function Trig_Copy_Deactivate_Actions )
endfunction
//===========================================================================
// Trigger: Overpower
//===========================================================================
function Trig_Overpower_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetAttacker(), 'B02O') == true ) ) then
return false
endif
return true
endfunction
function Trig_Overpower_Func003C takes nothing returns boolean
if ( not ( udg_OPCount[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] >= 5 ) ) then
return false
endif
return true
endfunction
function Trig_Overpower_Actions takes nothing returns nothing
set udg_OPCount[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))] = 0
set udg_OPCount[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] = ( udg_OPCount[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] + 1 )
if ( Trig_Overpower_Func003C() ) then
call UnitRemoveBuffBJ( 'B02O', GetAttacker() )
set udg_OPCount[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] = 0
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Overpower takes nothing returns nothing
set gg_trg_Overpower = CreateTrigger( )
call DisableTrigger( gg_trg_Overpower )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Overpower, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Overpower, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Overpower, Condition( function Trig_Overpower_Conditions ) )
call TriggerAddAction( gg_trg_Overpower, function Trig_Overpower_Actions )
endfunction
//===========================================================================
// Trigger: Enrage
//===========================================================================
function Trig_Enrage_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetAttacker(), 'B02H') == true ) ) then
return false
endif
return true
endfunction
function Trig_Enrage_Actions takes nothing returns nothing
call UnitDamageTargetBJ( GetAttacker(), GetAttackedUnitBJ(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetAttacker()) * ( 0.02 + ( 0.02 * I2R(GetUnitAbilityLevelSwapped('A050', GetAttacker())) ) ) ), ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
endfunction
//===========================================================================
function InitTrig_Enrage takes nothing returns nothing
set gg_trg_Enrage = CreateTrigger( )
call DisableTrigger( gg_trg_Enrage )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enrage, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Enrage, Condition( function Trig_Enrage_Conditions ) )
call TriggerAddAction( gg_trg_Enrage, function Trig_Enrage_Actions )
endfunction
//===========================================================================
// Trigger: Aftershock
//
// SPELLCASTER
//===========================================================================
function Trig_Aftershock_Func008C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0DK' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DL' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DH' ) ) then
return true
endif
return false
endfunction
function Trig_Aftershock_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0DJ', GetSpellAbilityUnit()) > 0 ) ) then
return false
endif
if ( not Trig_Aftershock_Func008C() ) then
return false
endif
return true
endfunction
function Trig_Aftershock_Actions takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A0DI', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A0DI', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0DJ', GetSpellAbilityUnit()) )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "stomp" )
endfunction
//===========================================================================
function InitTrig_Aftershock takes nothing returns nothing
set gg_trg_Aftershock = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Aftershock, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Aftershock, Condition( function Trig_Aftershock_Conditions ) )
call TriggerAddAction( gg_trg_Aftershock, function Trig_Aftershock_Actions )
endfunction
//===========================================================================
// Trigger: Enchant Totem
//===========================================================================
function Trig_Enchant_Totem_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetAttacker(), 'Broa') == true ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Totem_Actions takes nothing returns nothing
call TriggerSleepAction( 0.35 )
call UnitRemoveBuffBJ( 'Broa', GetAttacker() )
endfunction
//===========================================================================
function InitTrig_Enchant_Totem takes nothing returns nothing
set gg_trg_Enchant_Totem = CreateTrigger( )
call DisableTrigger( gg_trg_Enchant_Totem )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Totem, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Enchant_Totem, Condition( function Trig_Enchant_Totem_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Totem, function Trig_Enchant_Totem_Actions )
endfunction
//===========================================================================
// Trigger: Echo Slam
//
// SPELLCASTER
//===========================================================================
function Trig_Echo_Slam_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DH' ) ) then
return false
endif
return true
endfunction
function Trig_Echo_Slam_Func003001003001 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Echo_Slam_Func003001003002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Echo_Slam_Func003001003002002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A04R', GetFilterUnit()) != 1 )
endfunction
function Trig_Echo_Slam_Func003001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Echo_Slam_Func003001003002001(), Trig_Echo_Slam_Func003001003002002() )
endfunction
function Trig_Echo_Slam_Func003001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Echo_Slam_Func003001003001(), Trig_Echo_Slam_Func003001003002() )
endfunction
function Trig_Echo_Slam_Func003A takes nothing returns nothing
call RemoveLocation(udg_TempLoc)
set udg_TempLoc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call SetUnitScalePercent( GetLastCreatedUnit(), 25.00, 25.00, 25.00 )
call UnitAddAbilityBJ( 'A0DM', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A0DM', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0DH', GetTriggerUnit()) )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "fanofknives" )
endfunction
function Trig_Echo_Slam_Actions takes nothing returns nothing
call TriggerSleepAction( 0.30 )
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
call ForGroupBJ( GetUnitsInRangeOfLocMatching(500.00, udg_TempLoc, Condition(function Trig_Echo_Slam_Func003001003)), function Trig_Echo_Slam_Func003A )
endfunction
//===========================================================================
function InitTrig_Echo_Slam takes nothing returns nothing
set gg_trg_Echo_Slam = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Echo_Slam, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Echo_Slam, Condition( function Trig_Echo_Slam_Conditions ) )
call TriggerAddAction( gg_trg_Echo_Slam, function Trig_Echo_Slam_Actions )
endfunction
//===========================================================================
// Trigger: Fissure
//===========================================================================
function Trig_Fissure_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DK' ) ) then
return false
endif
return true
endfunction
function GetTimerTrigger takes timer t, string s returns trigger
return GetHandleHandle(t,s)
endfunction
function Tree_Killer takes nothing returns nothing
if GetDestructableTypeId(GetEnumDestructable() )!= 'YTpb' then
call KillDestructable( GetEnumDestructable() )
endif
endfunction
function DestroyFissure takes nothing returns nothing
local unit f=bj_ghoul[0]
local destructable d=bj_lastCreatedDestructable
local real x=bj_randomSubGroupChance
local location p=bj_enumDestructableCenter
local boolean e=bj_makeUnitRescuableFlag
call TriggerSleepAction( 8.93 - (x*0.03))
call RemoveUnit(f)
call RemoveDestructable(d)
if e then
call TerrainDeformationCraterBJ( 0.05, true, p, 50.00, -150.00 )
endif
call RemoveLocation(p)
set p=null
set x=0
set f=null
set d=null
endfunction
function FissureMake takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit c=GetC(t,"c")
local location q=GetL(t,"q")
local real a=GetHandleReal(t,"a")
local real x=GetHandleReal(t,"x")
local location p=Location(GetLocationX(q)+(x*40*CosBJ(a)),GetLocationY(q)+(x*40*SinBJ(a)))
local boolean e=false
//call DestroyEffect(AddSpellEffectByIdLoc('A0DK', EFFECT_TYPE_CASTER, p) )
call DestroyEffect(AddSpellEffectByIdLoc('A0DK', EFFECT_TYPE_TARGET, p) )
call EnumDestructablesInCircleBJ( 150.00, p, function Tree_Killer )
set bj_ghoul[0]=CreateUnitAtLoc(Player(PLAYER_NEUTRAL_PASSIVE), 'e00H', p , GetRandomReal(0,360))
if GetRandomInt(1,5)==1 then
call TerrainDeformationCraterBJ( 0.05, true, p, 50.00, 150.00 )
set e=true
set bj_makeUnitRescuableFlag=e
else
set bj_makeUnitRescuableFlag=false
endif
set bj_lastCreatedDestructable=CreateDestructableLoc( 'YTpb', p, GetRandomDirectionDeg(), 1, 0 )
set bj_randomSubGroupChance=x
call TriggerExecute(GetTimerTrigger(t,"r"))
set bj_enumDestructableCenter=p
set p=null
set x=x+1
call SetHandleReal(t,"x",x)
set c=null
set a=0
if x>=32 then
call FlushHandleLocals(t)
call DestroyTimer(t)
call RemoveLocation(q)
endif
set q=null
set t=null
set x=0
endfunction
//call CreateNUnitsAtLoc( 1, 'e007', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(udg_FissurePoint, ( 40.00 * I2R(udg_FissureTicker) ), udg_FissureFacing), ( udg_FissureFacing + GetRandomReal(-90.00, 90.00) ) )
function Trig_Fissure_Actions takes nothing returns nothing
local unit c=GetTriggerUnit()
local timer t=CreateTimer()
local location l=GetSpellTargetLoc()
local real a=Angle2Points(GetUnitX(c),GetUnitY(c),GetLocationX(l),GetLocationY(l))
local real x=1
local location q=GetUnitLoc(c)
local trigger r=CreateTrigger()
call SetHandleHandle(t,"c",c)
call SetHandleReal(t,"a",a)
call SetHandleReal(t,"x",x)
call SetHandleHandle(t,"q",q)
call TriggerAddAction(r,function DestroyFissure)
call SetHandleHandle(t,"r",r)
call TimerStart(t,0.03,true,function FissureMake)
call RemoveLocation(l)
set l=null
set q=null
set a=0
set x=0
set c=null
set t=null
call TriggerSleepAction(11)
call DestroyTrigger(r)
set r=null
endfunction
//===========================================================================
function InitTrig_Fissure takes nothing returns nothing
set gg_trg_Fissure = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Fissure, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Fissure, Condition( function Trig_Fissure_Conditions ) )
call TriggerAddAction( gg_trg_Fissure, function Trig_Fissure_Actions )
endfunction
//===========================================================================
// Trigger: timer2
//===========================================================================
function Trig_timer2_Actions takes nothing returns nothing
set udg_KillInt[2] = 0
endfunction
//===========================================================================
function InitTrig_timer2 takes nothing returns nothing
set gg_trg_timer2 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer2, udg_KillTimer[2] )
call TriggerAddAction( gg_trg_timer2, function Trig_timer2_Actions )
endfunction
//===========================================================================
// Trigger: timer3
//===========================================================================
function Trig_timer3_Actions takes nothing returns nothing
set udg_KillInt[3] = 0
endfunction
//===========================================================================
function InitTrig_timer3 takes nothing returns nothing
set gg_trg_timer3 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer3, udg_KillTimer[3] )
call TriggerAddAction( gg_trg_timer3, function Trig_timer3_Actions )
endfunction
//===========================================================================
// Trigger: timer4
//===========================================================================
function Trig_timer4_Actions takes nothing returns nothing
set udg_KillInt[4] = 0
endfunction
//===========================================================================
function InitTrig_timer4 takes nothing returns nothing
set gg_trg_timer4 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer4, udg_KillTimer[4] )
call TriggerAddAction( gg_trg_timer4, function Trig_timer4_Actions )
endfunction
//===========================================================================
// Trigger: timer5
//===========================================================================
function Trig_timer5_Actions takes nothing returns nothing
set udg_KillInt[5] = 0
endfunction
//===========================================================================
function InitTrig_timer5 takes nothing returns nothing
set gg_trg_timer5 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer5, udg_KillTimer[5] )
call TriggerAddAction( gg_trg_timer5, function Trig_timer5_Actions )
endfunction
//===========================================================================
// Trigger: timer6
//===========================================================================
function Trig_timer6_Actions takes nothing returns nothing
set udg_KillInt[6] = 0
endfunction
//===========================================================================
function InitTrig_timer6 takes nothing returns nothing
set gg_trg_timer6 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer6, udg_KillTimer[6] )
call TriggerAddAction( gg_trg_timer6, function Trig_timer6_Actions )
endfunction
//===========================================================================
// Trigger: timer8
//===========================================================================
function Trig_timer8_Actions takes nothing returns nothing
set udg_KillInt[8] = 0
endfunction
//===========================================================================
function InitTrig_timer8 takes nothing returns nothing
set gg_trg_timer8 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer8, udg_KillTimer[8] )
call TriggerAddAction( gg_trg_timer8, function Trig_timer8_Actions )
endfunction
//===========================================================================
// Trigger: timer9
//===========================================================================
function Trig_timer9_Actions takes nothing returns nothing
set udg_KillInt[9] = 0
endfunction
//===========================================================================
function InitTrig_timer9 takes nothing returns nothing
set gg_trg_timer9 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer9, udg_KillTimer[9] )
call TriggerAddAction( gg_trg_timer9, function Trig_timer9_Actions )
endfunction
//===========================================================================
// Trigger: timer10
//===========================================================================
function Trig_timer10_Actions takes nothing returns nothing
set udg_KillInt[10] = 0
endfunction
//===========================================================================
function InitTrig_timer10 takes nothing returns nothing
set gg_trg_timer10 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer10, udg_KillTimer[10] )
call TriggerAddAction( gg_trg_timer10, function Trig_timer10_Actions )
endfunction
//===========================================================================
// Trigger: timer11
//===========================================================================
function Trig_timer11_Actions takes nothing returns nothing
set udg_KillInt[11] = 0
endfunction
//===========================================================================
function InitTrig_timer11 takes nothing returns nothing
set gg_trg_timer11 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer11, udg_KillTimer[11] )
call TriggerAddAction( gg_trg_timer11, function Trig_timer11_Actions )
endfunction
//===========================================================================
// Trigger: timer12
//===========================================================================
function Trig_timer12_Actions takes nothing returns nothing
set udg_KillInt[12] = 0
endfunction
//===========================================================================
function InitTrig_timer12 takes nothing returns nothing
set gg_trg_timer12 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer12, udg_KillTimer[12] )
call TriggerAddAction( gg_trg_timer12, function Trig_timer12_Actions )
endfunction
//===========================================================================
// Trigger: Suicide death
//===========================================================================
function Trig_Suicide_death_Conditions takes nothing returns boolean
if ( not ( IsUnitInGroup(GetTriggerUnit(), udg_UnitsDNP) == false ) ) then
return false
endif
if ( not ( GetSpellAbilityId() == 'A06B' ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func006C takes nothing returns boolean
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func009C takes nothing returns boolean
if ( not ( udg_Killsinarow[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func010C takes nothing returns boolean
if ( not ( udg_Killsinarow[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func011C takes nothing returns boolean
if ( not ( udg_Killsinarow[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 5 ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func012C takes nothing returns boolean
if ( not ( udg_Killsinarow[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 6 ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func013C takes nothing returns boolean
if ( not ( udg_Killsinarow[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 7 ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func014C takes nothing returns boolean
if ( not ( udg_Killsinarow[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))] == 8 ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func015C takes nothing returns boolean
if ( not ( udg_Killsinarow[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 9 ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func016C takes nothing returns boolean
if ( not ( udg_Killsinarow[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] > 9 ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func020C takes nothing returns boolean
if ( not ( udg_TeamOwnage[1] > 4 ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + ( "|r just killed himself!" + " " ) ) ) )
if ( Trig_Suicide_death_Func006C() ) then
set udg_LBDeaths[1] = ( udg_LBDeaths[1] + 1 )
set udg_LBKills[7] = ( udg_LBKills[7] + 1 )
else
set udg_LBDeaths[7] = ( udg_LBDeaths[7] + 1 )
set udg_LBKills[1] = ( udg_LBKills[1] + 1 )
endif
set udg_LBDeaths[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_LBDeaths[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call ConditionalTriggerExecute( gg_trg_update_leaderboard_kills )
if ( Trig_Suicide_death_Func009C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "|r's |c0000ff40killing spree|r has been ended!" ) )
else
call DoNothing( )
endif
if ( Trig_Suicide_death_Func010C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "|r's |c00400080dominating|r streak has been ended!" ) )
else
call DoNothing( )
endif
if ( Trig_Suicide_death_Func011C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "|r's |c00ff0080mega kill|r has been ended!" ) )
else
call DoNothing( )
endif
if ( Trig_Suicide_death_Func012C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "|r's |c00ff8000unstoppable|r streak has been ended!" ) )
else
call DoNothing( )
endif
if ( Trig_Suicide_death_Func013C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "|r's |c00808000wicked sick|r streak has been ended!" ) )
else
call DoNothing( )
endif
if ( Trig_Suicide_death_Func014C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "|r's |c00ff80ffmonster kill|r has been ended!" ) )
else
call DoNothing( )
endif
if ( Trig_Suicide_death_Func015C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "|r's |c00ff0000is GODLIKE|r streak has been ended!" ) )
else
call DoNothing( )
endif
if ( Trig_Suicide_death_Func016C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "|r's |c00ff8000beyond GODLIKE streak|r has been ended!" ) )
else
call DoNothing( )
endif
set udg_TeamOwnage[2] = 0
set udg_TeamOwnage[1] = ( udg_TeamOwnage[1] + 1 )
set udg_Killsinarow[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 0
if ( Trig_Suicide_death_Func020C() ) then
call PolledWait( 1.50 )
call PlaySoundBJ( gg_snd_Ownage )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8806" )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Suicide_death takes nothing returns nothing
set gg_trg_Suicide_death = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Suicide_death, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Suicide_death, Condition( function Trig_Suicide_death_Conditions ) )
call TriggerAddAction( gg_trg_Suicide_death, function Trig_Suicide_death_Actions )
endfunction
//===========================================================================
// Trigger: Flag mana
//===========================================================================
function Trig_Flag_mana_Func002001 takes nothing returns boolean
return ( GetItemTypeId(GetManipulatedItem()) == 'uflg' )
endfunction
function Trig_Flag_mana_Func002002 takes nothing returns boolean
return ( GetItemTypeId(GetManipulatedItem()) == 'nflg' )
endfunction
function Trig_Flag_mana_Conditions takes nothing returns boolean
if ( not GetBooleanOr( Trig_Flag_mana_Func002001(), Trig_Flag_mana_Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_Flag_mana_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_Mana )
endfunction
//===========================================================================
function InitTrig_Flag_mana takes nothing returns nothing
set gg_trg_Flag_mana = CreateTrigger( )
call DisableTrigger( gg_trg_Flag_mana )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Flag_mana, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Flag_mana, Condition( function Trig_Flag_mana_Conditions ) )
call TriggerAddAction( gg_trg_Flag_mana, function Trig_Flag_mana_Actions )
endfunction
//===========================================================================
// Trigger: Mana
//===========================================================================
function Trig_Mana_Func003001002001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(GetFilterUnit(), 'uflg') == true )
endfunction
function Trig_Mana_Func003001002002 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(GetFilterUnit(), 'nflg') == true )
endfunction
function Trig_Mana_Func003001002 takes nothing returns boolean
return GetBooleanOr( Trig_Mana_Func003001002001(), Trig_Mana_Func003001002002() )
endfunction
function Trig_Mana_Func003A takes nothing returns nothing
call SetUnitManaBJ( GetEnumUnit(), 0 )
set udg_FlagTaken = true
call CreateNUnitsAtLoc( 1, 'e00C', ForcePickRandomPlayer(GetPlayersEnemies(GetOwningPlayer(GetEnumUnit()))), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'AOfs', GetLastCreatedUnit() )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "farsight", GetUnitLoc(GetEnumUnit()) )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call PingMinimapLocForForceEx( GetPlayersEnemies(GetOwningPlayer(GetEnumUnit())), GetUnitLoc(GetEnumUnit()), 1, bj_MINIMAPPINGSTYLE_ATTACK, 100, 100, 100 )
call PingMinimapLocForForceEx( GetPlayersAllies(GetOwningPlayer(GetEnumUnit())), GetUnitLoc(GetEnumUnit()), 1, bj_MINIMAPPINGSTYLE_SIMPLE, 0.00, 100, 0.00 )
endfunction
function Trig_Mana_Func004C takes nothing returns boolean
if ( not ( udg_FlagTaken == false ) ) then
return false
endif
return true
endfunction
function Trig_Mana_Actions takes nothing returns nothing
set udg_FlagTaken = false
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Mana_Func003001002)), function Trig_Mana_Func003A )
if ( Trig_Mana_Func004C() ) then
call DisableTrigger( GetTriggeringTrigger() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Mana takes nothing returns nothing
set gg_trg_Mana = CreateTrigger( )
call DisableTrigger( gg_trg_Mana )
call TriggerRegisterTimerEventPeriodic( gg_trg_Mana, 2.00 )
call TriggerAddAction( gg_trg_Mana, function Trig_Mana_Actions )
endfunction
//===========================================================================
// Trigger: NEFlag Returned
//===========================================================================
function Trig_NEFlag_Returned_Conditions takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'nflg') == true ) ) then
return false
endif
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_NEFlag_Returned_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 13.00, "TRIGSTR_8807" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'nflg') )
call CreateItemLoc( 'nflg', GetRectCenter(gg_rct_FlagSent) )
endfunction
//===========================================================================
function InitTrig_NEFlag_Returned takes nothing returns nothing
set gg_trg_NEFlag_Returned = CreateTrigger( )
call DisableTrigger( gg_trg_NEFlag_Returned )
call TriggerRegisterEnterRectSimple( gg_trg_NEFlag_Returned, gg_rct_FlagSent )
call TriggerAddCondition( gg_trg_NEFlag_Returned, Condition( function Trig_NEFlag_Returned_Conditions ) )
call TriggerAddAction( gg_trg_NEFlag_Returned, function Trig_NEFlag_Returned_Actions )
endfunction
//===========================================================================
// Trigger: UDFlag Returned
//===========================================================================
function Trig_UDFlag_Returned_Conditions takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'uflg') == true ) ) then
return false
endif
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(6)) == true ) ) then
return false
endif
return true
endfunction
function Trig_UDFlag_Returned_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 13.00, "TRIGSTR_8808" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'uflg') )
call CreateItemLoc( 'uflg', GetRectCenter(gg_rct_FlagScourge) )
endfunction
//===========================================================================
function InitTrig_UDFlag_Returned takes nothing returns nothing
set gg_trg_UDFlag_Returned = CreateTrigger( )
call DisableTrigger( gg_trg_UDFlag_Returned )
call TriggerRegisterEnterRectSimple( gg_trg_UDFlag_Returned, gg_rct_FlagScourge )
call TriggerAddCondition( gg_trg_UDFlag_Returned, Condition( function Trig_UDFlag_Returned_Conditions ) )
call TriggerAddAction( gg_trg_UDFlag_Returned, function Trig_UDFlag_Returned_Actions )
endfunction
//===========================================================================
// Trigger: NEFlag Forbidden
//===========================================================================
function Trig_NEFlag_Forbidden_Conditions takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_FlagSentBig, GetTriggerUnit()) == true ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'nflg' ) ) then
return false
endif
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_NEFlag_Forbidden_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call CreateItemLoc( 'nflg', GetRectCenter(gg_rct_FlagSent) )
endfunction
//===========================================================================
function InitTrig_NEFlag_Forbidden takes nothing returns nothing
set gg_trg_NEFlag_Forbidden = CreateTrigger( )
call DisableTrigger( gg_trg_NEFlag_Forbidden )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NEFlag_Forbidden, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_NEFlag_Forbidden, Condition( function Trig_NEFlag_Forbidden_Conditions ) )
call TriggerAddAction( gg_trg_NEFlag_Forbidden, function Trig_NEFlag_Forbidden_Actions )
endfunction
//===========================================================================
// Trigger: UDFlag Forbidden
//===========================================================================
function Trig_UDFlag_Forbidden_Conditions takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_FlagScourgeBig, GetTriggerUnit()) == true ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'uflg' ) ) then
return false
endif
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(6)) == true ) ) then
return false
endif
return true
endfunction
function Trig_UDFlag_Forbidden_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call CreateItemLoc( 'uflg', GetRectCenter(gg_rct_FlagScourge) )
endfunction
//===========================================================================
function InitTrig_UDFlag_Forbidden takes nothing returns nothing
set gg_trg_UDFlag_Forbidden = CreateTrigger( )
call DisableTrigger( gg_trg_UDFlag_Forbidden )
call TriggerRegisterAnyUnitEventBJ( gg_trg_UDFlag_Forbidden, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_UDFlag_Forbidden, Condition( function Trig_UDFlag_Forbidden_Conditions ) )
call TriggerAddAction( gg_trg_UDFlag_Forbidden, function Trig_UDFlag_Forbidden_Actions )
endfunction
//===========================================================================
// Trigger: NEScore
//===========================================================================
function Trig_NEScore_Conditions takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'uflg') == true ) ) then
return false
endif
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_NEScore_Func003Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetEnumItem()) == 'nflg' ) ) then
return false
endif
return true
endfunction
function Trig_NEScore_Func003A takes nothing returns nothing
if ( Trig_NEScore_Func003Func001C() ) then
set udg_FlagTaken = false
else
call DoNothing( )
endif
endfunction
function Trig_NEScore_Func004Func006C takes nothing returns boolean
if ( not ( udg_CTFScore[1] == 5 ) ) then
return false
endif
return true
endfunction
function Trig_NEScore_Func004C takes nothing returns boolean
if ( not ( udg_FlagTaken == false ) ) then
return false
endif
return true
endfunction
function Trig_NEScore_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_FlagTaken = true
call EnumItemsInRectBJ( gg_rct_FlagSent, function Trig_NEScore_Func003A )
if ( Trig_NEScore_Func004C() ) then
set udg_CTFScore[1] = ( udg_CTFScore[1] + 1 )
call DisplayTimedTextToForce( GetPlayersAll(), 15.00, "TRIGSTR_8810" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'uflg') )
call CreateItemLoc( 'uflg', GetRectCenter(gg_rct_FlagScourge) )
if ( Trig_NEScore_Func004Func006C() ) then
call TriggerExecute( gg_trg_Sent_Win )
else
call DoNothing( )
endif
else
call DisplayTimedTextToForce( GetPlayersAllies(Player(0)), 15.00, "TRIGSTR_8809" )
endif
endfunction
//===========================================================================
function InitTrig_NEScore takes nothing returns nothing
set gg_trg_NEScore = CreateTrigger( )
call DisableTrigger( gg_trg_NEScore )
call TriggerRegisterEnterRectSimple( gg_trg_NEScore, gg_rct_FlagSent )
call TriggerAddCondition( gg_trg_NEScore, Condition( function Trig_NEScore_Conditions ) )
call TriggerAddAction( gg_trg_NEScore, function Trig_NEScore_Actions )
endfunction
//===========================================================================
// Trigger: UDScore
//===========================================================================
function Trig_UDScore_Conditions takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'nflg') == true ) ) then
return false
endif
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(6)) == true ) ) then
return false
endif
return true
endfunction
function Trig_UDScore_Func003Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetEnumItem()) == 'uflg' ) ) then
return false
endif
return true
endfunction
function Trig_UDScore_Func003A takes nothing returns nothing
if ( Trig_UDScore_Func003Func001C() ) then
set udg_FlagTaken = false
else
call DoNothing( )
endif
endfunction
function Trig_UDScore_Func004Func006C takes nothing returns boolean
if ( not ( udg_CTFScore[2] == 5 ) ) then
return false
endif
return true
endfunction
function Trig_UDScore_Func004C takes nothing returns boolean
if ( not ( udg_FlagTaken == false ) ) then
return false
endif
return true
endfunction
function Trig_UDScore_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_FlagTaken = true
call EnumItemsInRectBJ( gg_rct_FlagScourge, function Trig_UDScore_Func003A )
if ( Trig_UDScore_Func004C() ) then
set udg_CTFScore[2] = ( udg_CTFScore[2] + 1 )
call DisplayTimedTextToForce( GetPlayersAll(), 15.00, "TRIGSTR_8812" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'nflg') )
call CreateItemLoc( 'nflg', GetRectCenter(gg_rct_FlagSent) )
if ( Trig_UDScore_Func004Func006C() ) then
call TriggerExecute( gg_trg_Scourge_Win )
else
call DoNothing( )
endif
else
call DisplayTimedTextToForce( GetPlayersAllies(Player(6)), 15.00, "TRIGSTR_8811" )
endif
endfunction
//===========================================================================
function InitTrig_UDScore takes nothing returns nothing
set gg_trg_UDScore = CreateTrigger( )
call DisableTrigger( gg_trg_UDScore )
call TriggerRegisterEnterRectSimple( gg_trg_UDScore, gg_rct_FlagScourge )
call TriggerAddCondition( gg_trg_UDScore, Condition( function Trig_UDScore_Conditions ) )
call TriggerAddAction( gg_trg_UDScore, function Trig_UDScore_Actions )
endfunction
//===========================================================================
// Trigger: PingReturnNE
//===========================================================================
function Trig_PingReturnNE_Conditions takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_FlagSentBig, GetTriggerUnit()) == false ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'nflg' ) ) then
return false
endif
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_PingReturnNE_Actions takes nothing returns nothing
call PingMinimapLocForForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), GetRectCenter(gg_rct_FlagSent), 1 )
call DisplayTimedTextToForce( GetPlayersAllies(Player(0)), 15.00, "TRIGSTR_8813" )
endfunction
//===========================================================================
function InitTrig_PingReturnNE takes nothing returns nothing
set gg_trg_PingReturnNE = CreateTrigger( )
call DisableTrigger( gg_trg_PingReturnNE )
call TriggerRegisterAnyUnitEventBJ( gg_trg_PingReturnNE, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_PingReturnNE, Condition( function Trig_PingReturnNE_Conditions ) )
call TriggerAddAction( gg_trg_PingReturnNE, function Trig_PingReturnNE_Actions )
endfunction
//===========================================================================
// Trigger: PingReturnUD
//===========================================================================
function Trig_PingReturnUD_Conditions takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_FlagScourgeBig, GetTriggerUnit()) == false ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'uflg' ) ) then
return false
endif
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(6)) == true ) ) then
return false
endif
return true
endfunction
function Trig_PingReturnUD_Actions takes nothing returns nothing
call PingMinimapLocForForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), GetRectCenter(gg_rct_FlagScourge), 1 )
call DisplayTimedTextToForce( GetPlayersAllies(Player(6)), 15.00, "TRIGSTR_8814" )
endfunction
//===========================================================================
function InitTrig_PingReturnUD takes nothing returns nothing
set gg_trg_PingReturnUD = CreateTrigger( )
call DisableTrigger( gg_trg_PingReturnUD )
call TriggerRegisterAnyUnitEventBJ( gg_trg_PingReturnUD, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_PingReturnUD, Condition( function Trig_PingReturnUD_Conditions ) )
call TriggerAddAction( gg_trg_PingReturnUD, function Trig_PingReturnUD_Actions )
endfunction
//===========================================================================
// Trigger: CTFv
//===========================================================================
function Trig_CTFv_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_CTFv_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8815" )
call RemoveUnit( gg_unit_etol_0039 )
call RemoveUnit( gg_unit_e011_0040 )
call RemoveUnit( gg_unit_e011_0041 )
call RemoveUnit( gg_unit_u00D_0082 )
call RemoveUnit( gg_unit_unpl_0080 )
call RemoveUnit( gg_unit_u00D_0081 )
call CreateNUnitsAtLoc( 1, 'ncop', Player(0), GetRectCenter(gg_rct_CTF1), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncop', Player(0), GetRectCenter(gg_rct_CTF2), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncop', Player(0), GetRectCenter(gg_rct_CTF3), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncop', Player(6), GetRectCenter(gg_rct_CTF4), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncop', Player(6), GetRectCenter(gg_rct_CTF5), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncop', Player(6), GetRectCenter(gg_rct_CTF6), bj_UNIT_FACING )
call CreateItemLoc( 'nflg', GetRectCenter(gg_rct_FlagSent) )
call CreateItemLoc( 'uflg', GetRectCenter(gg_rct_FlagScourge) )
call DestroyTrigger(gg_trg_TR)
call DestroyTrigger(gg_trg_AR)
call DestroyTrigger(gg_trg_RV1)
call DestroyTrigger(gg_trg_RV2)
call DestroyTrigger(gg_trg_DEv)
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 15, ( udg_Colors[1] + ( "Flags Captured" + "|r" ) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 16, ( udg_Colors[7] + ( "Flags Captured" + "|r" ) ) )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Capture the Flag" + udg_VersionString ) )
call DisableTrigger( gg_trg_update_leaderboard_always )
call EnableTrigger( gg_trg_update_leaderboard_CTF )
call DisableTrigger( gg_trg_Sent_Win )
call DisableTrigger( gg_trg_Scourge_Win )
call EnableTrigger( gg_trg_Flag_mana )
call EnableTrigger( gg_trg_NEFlag_Forbidden )
call EnableTrigger( gg_trg_NEFlag_Returned )
call EnableTrigger( gg_trg_NEScore )
call EnableTrigger( gg_trg_UDFlag_Forbidden )
call EnableTrigger( gg_trg_UDFlag_Returned )
call EnableTrigger( gg_trg_UDScore )
call EnableTrigger( gg_trg_PingReturnNE )
call EnableTrigger( gg_trg_PingReturnUD )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_CTFv takes nothing returns nothing
set gg_trg_CTFv = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_CTFv, Player(1), "-capturetheflag", true )
call TriggerRegisterPlayerChatEvent( gg_trg_CTFv, Player(1), "-ctf", true )
call TriggerAddCondition( gg_trg_CTFv, Condition( function Trig_CTFv_Conditions ) )
call TriggerAddAction( gg_trg_CTFv, function Trig_CTFv_Actions )
endfunction
//===========================================================================
// Trigger: IDv
//===========================================================================
function Trig_IDv_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_IDv_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8816" )
set udg_ItemDrop = true
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_IDv takes nothing returns nothing
set gg_trg_IDv = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_IDv, Player(1), "-itemdrops", true )
call TriggerRegisterPlayerChatEvent( gg_trg_IDv, Player(1), "-id", true )
call TriggerAddCondition( gg_trg_IDv, Condition( function Trig_IDv_Conditions ) )
call TriggerAddAction( gg_trg_IDv, function Trig_IDv_Actions )
endfunction
//===========================================================================
// Trigger: SCv
//===========================================================================
function Trig_SCv_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_SCv_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8817" )
call EnableTrigger( gg_trg_SpawnGolemFish )
call EnableTrigger( gg_trg_SpawnHydra )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_SCv takes nothing returns nothing
set gg_trg_SCv = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_SCv, Player(1), "-supercreeps", true )
call TriggerRegisterPlayerChatEvent( gg_trg_SCv, Player(1), "-sc", true )
call TriggerAddCondition( gg_trg_SCv, Condition( function Trig_SCv_Conditions ) )
call TriggerAddAction( gg_trg_SCv, function Trig_SCv_Actions )
endfunction
//===========================================================================
// Trigger: DEv
//===========================================================================
function Trig_DEv_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_DEv_Func008C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_DEv_Func009C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_DEv_Func010C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_DEv_Func011C takes nothing returns boolean
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_AROn == false ) ) then
return false
endif
return true
endfunction
function Trig_DEv_Actions takes nothing returns nothing
call DestroyTrigger(gg_trg_RV1)
call DestroyTrigger(gg_trg_RV2)
call DestroyTrigger(gg_trg_MMv)
call DestroyTrigger(gg_trg_DMv)
call DestroyTrigger(gg_trg_RepS)
call DestroyTrigger(gg_trg_RepUD)
set udg_DMBool = true
if ( Trig_DEv_Func008C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8818" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Allrandom Deathmatch" + udg_VersionString ) )
call DestroyTrigger(gg_trg_TR)
call DestroyTrigger(gg_trg_APv)
else
call DoNothing( )
endif
if ( Trig_DEv_Func009C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8819" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Teamrandom Deathmatch" + udg_VersionString ) )
call DestroyTrigger(gg_trg_AR)
call DestroyTrigger(gg_trg_APv)
else
call DoNothing( )
endif
if ( Trig_DEv_Func010C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8820" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Allpick Deathmatch" + udg_VersionString ) )
call DestroyTrigger(gg_trg_AR)
call DestroyTrigger(gg_trg_TR)
else
call DoNothing( )
endif
if ( Trig_DEv_Func011C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8821" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Deathmatch" + udg_VersionString ) )
else
call DoNothing( )
endif
call DestroyTrigger(gg_trg_entry)
call EnableTrigger( gg_trg_entryDE )
call EnableTrigger( gg_trg_ScouD_DE8 )
call EnableTrigger( gg_trg_ScouD_DE9 )
call EnableTrigger( gg_trg_ScouD_DE10 )
call EnableTrigger( gg_trg_ScouD_DE11 )
call EnableTrigger( gg_trg_ScouD_DE12 )
call EnableTrigger( gg_trg_SentD_DE2 )
call EnableTrigger( gg_trg_SentD_DE3 )
call EnableTrigger( gg_trg_SentD_DE4 )
call EnableTrigger( gg_trg_SentD_DE5 )
call EnableTrigger( gg_trg_SentD_DE6 )
call RemoveUnit( gg_unit_n002_0117 )
call RemoveUnit( gg_unit_n002_0050 )
call CreateNUnitsAtLoc( 1, 'n001', Player(PLAYER_NEUTRAL_PASSIVE), OffsetLocation(GetUnitLoc(gg_unit_n00V_0033), -150.00, 10.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n001', Player(PLAYER_NEUTRAL_PASSIVE), OffsetLocation(GetUnitLoc(gg_unit_n00W_0026), 75.00, -150.00), bj_UNIT_FACING )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_DEv takes nothing returns nothing
set gg_trg_DEv = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_DEv, Player(1), "-deathmatch", true )
call TriggerRegisterPlayerChatEvent( gg_trg_DEv, Player(1), "-dm", true )
call TriggerAddCondition( gg_trg_DEv, Condition( function Trig_DEv_Conditions ) )
call TriggerAddAction( gg_trg_DEv, function Trig_DEv_Actions )
endfunction
//===========================================================================
// Trigger: MMv
//===========================================================================
function Trig_MMv_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_MMv_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8822" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Mirrormatch" + udg_VersionString ) )
call EnableTrigger( gg_trg_MMa )
call DestroyTrigger(gg_trg_TR)
call DestroyTrigger(gg_trg_RV1)
call DestroyTrigger(gg_trg_RV2)
call DestroyTrigger(gg_trg_DEv)
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_MMv takes nothing returns nothing
set gg_trg_MMv = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_MMv, Player(1), "-mirrormatch", true )
call TriggerRegisterPlayerChatEvent( gg_trg_MMv, Player(1), "-mm", true )
call TriggerAddCondition( gg_trg_MMv, Condition( function Trig_MMv_Conditions ) )
call TriggerAddAction( gg_trg_MMv, function Trig_MMv_Actions )
endfunction
//===========================================================================
// Trigger: MMa
//===========================================================================
function Trig_MMa_Func001001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_MMa_Func001001002002001 takes nothing returns boolean
return ( IsUnitIllusionBJ(GetFilterUnit()) == false )
endfunction
function Trig_MMa_Func001001002002002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(1) )
endfunction
function Trig_MMa_Func001001002002002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(7) )
endfunction
function Trig_MMa_Func001001002002002 takes nothing returns boolean
return GetBooleanOr( Trig_MMa_Func001001002002002001(), Trig_MMa_Func001001002002002002() )
endfunction
function Trig_MMa_Func001001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func001001002002001(), Trig_MMa_Func001001002002002() )
endfunction
function Trig_MMa_Func001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func001001002001(), Trig_MMa_Func001001002002() )
endfunction
function Trig_MMa_Func001A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_MMGroup )
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_MMa_Func002C takes nothing returns boolean
if ( not ( IsUnitGroupEmptyBJ(udg_MMGroup) == false ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func004C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func005C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(7)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func007001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_MMa_Func007001002002001 takes nothing returns boolean
return ( IsUnitIllusionBJ(GetFilterUnit()) == false )
endfunction
function Trig_MMa_Func007001002002002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(2) )
endfunction
function Trig_MMa_Func007001002002002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(8) )
endfunction
function Trig_MMa_Func007001002002002 takes nothing returns boolean
return GetBooleanOr( Trig_MMa_Func007001002002002001(), Trig_MMa_Func007001002002002002() )
endfunction
function Trig_MMa_Func007001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func007001002002001(), Trig_MMa_Func007001002002002() )
endfunction
function Trig_MMa_Func007001002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func007001002001(), Trig_MMa_Func007001002002() )
endfunction
function Trig_MMa_Func007A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_MMGroup )
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_MMa_Func008C takes nothing returns boolean
if ( not ( IsUnitGroupEmptyBJ(udg_MMGroup) == false ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func010C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func011C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func013001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_MMa_Func013001002002001 takes nothing returns boolean
return ( IsUnitIllusionBJ(GetFilterUnit()) == false )
endfunction
function Trig_MMa_Func013001002002002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(3) )
endfunction
function Trig_MMa_Func013001002002002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(9) )
endfunction
function Trig_MMa_Func013001002002002 takes nothing returns boolean
return GetBooleanOr( Trig_MMa_Func013001002002002001(), Trig_MMa_Func013001002002002002() )
endfunction
function Trig_MMa_Func013001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func013001002002001(), Trig_MMa_Func013001002002002() )
endfunction
function Trig_MMa_Func013001002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func013001002001(), Trig_MMa_Func013001002002() )
endfunction
function Trig_MMa_Func013A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_MMGroup )
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_MMa_Func014C takes nothing returns boolean
if ( not ( IsUnitGroupEmptyBJ(udg_MMGroup) == false ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func016C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func017C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func019001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_MMa_Func019001002002001 takes nothing returns boolean
return ( IsUnitIllusionBJ(GetFilterUnit()) == false )
endfunction
function Trig_MMa_Func019001002002002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(4) )
endfunction
function Trig_MMa_Func019001002002002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(10) )
endfunction
function Trig_MMa_Func019001002002002 takes nothing returns boolean
return GetBooleanOr( Trig_MMa_Func019001002002002001(), Trig_MMa_Func019001002002002002() )
endfunction
function Trig_MMa_Func019001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func019001002002001(), Trig_MMa_Func019001002002002() )
endfunction
function Trig_MMa_Func019001002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func019001002001(), Trig_MMa_Func019001002002() )
endfunction
function Trig_MMa_Func019A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_MMGroup )
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_MMa_Func020C takes nothing returns boolean
if ( not ( IsUnitGroupEmptyBJ(udg_MMGroup) == false ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func022C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func023C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(10)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func025001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_MMa_Func025001002002001 takes nothing returns boolean
return ( IsUnitIllusionBJ(GetFilterUnit()) == false )
endfunction
function Trig_MMa_Func025001002002002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(5) )
endfunction
function Trig_MMa_Func025001002002002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(11) )
endfunction
function Trig_MMa_Func025001002002002 takes nothing returns boolean
return GetBooleanOr( Trig_MMa_Func025001002002002001(), Trig_MMa_Func025001002002002002() )
endfunction
function Trig_MMa_Func025001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func025001002002001(), Trig_MMa_Func025001002002002() )
endfunction
function Trig_MMa_Func025001002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func025001002001(), Trig_MMa_Func025001002002() )
endfunction
function Trig_MMa_Func025A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_MMGroup )
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_MMa_Func026C takes nothing returns boolean
if ( not ( IsUnitGroupEmptyBJ(udg_MMGroup) == false ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func028C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(5)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func029C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(11)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_MMa_Func001001002)), function Trig_MMa_Func001A )
if ( Trig_MMa_Func002C() ) then
set udg_MMUnit = GetUnitTypeId(GroupPickRandomUnit(udg_MMGroup))
else
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8823" )
endif
call GroupClear( udg_MMGroup )
if ( Trig_MMa_Func004C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(1), GetRectCenter(gg_rct_Hero_Creation_NE), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_MMa_Func005C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(7), GetRectCenter(gg_rct_Hero_Creation_Evil), bj_UNIT_FACING )
else
call DoNothing( )
endif
set udg_MMUnit = 0
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_MMa_Func007001002)), function Trig_MMa_Func007A )
if ( Trig_MMa_Func008C() ) then
set udg_MMUnit = GetUnitTypeId(GroupPickRandomUnit(udg_MMGroup))
else
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8824" )
endif
call GroupClear( udg_MMGroup )
if ( Trig_MMa_Func010C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(2), GetRectCenter(gg_rct_Hero_Creation_NE), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_MMa_Func011C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(8), GetRectCenter(gg_rct_Hero_Creation_Evil), bj_UNIT_FACING )
else
call DoNothing( )
endif
set udg_MMUnit = 0
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_MMa_Func013001002)), function Trig_MMa_Func013A )
if ( Trig_MMa_Func014C() ) then
set udg_MMUnit = GetUnitTypeId(GroupPickRandomUnit(udg_MMGroup))
else
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8825" )
endif
call GroupClear( udg_MMGroup )
if ( Trig_MMa_Func016C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(3), GetRectCenter(gg_rct_Hero_Creation_NE), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_MMa_Func017C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(9), GetRectCenter(gg_rct_Hero_Creation_Evil), bj_UNIT_FACING )
else
call DoNothing( )
endif
set udg_MMUnit = 0
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_MMa_Func019001002)), function Trig_MMa_Func019A )
if ( Trig_MMa_Func020C() ) then
set udg_MMUnit = GetUnitTypeId(GroupPickRandomUnit(udg_MMGroup))
else
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8826" )
endif
call GroupClear( udg_MMGroup )
if ( Trig_MMa_Func022C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(4), GetRectCenter(gg_rct_Hero_Creation_NE), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_MMa_Func023C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(10), GetRectCenter(gg_rct_Hero_Creation_Evil), bj_UNIT_FACING )
else
call DoNothing( )
endif
set udg_MMUnit = 0
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_MMa_Func025001002)), function Trig_MMa_Func025A )
if ( Trig_MMa_Func026C() ) then
set udg_MMUnit = GetUnitTypeId(GroupPickRandomUnit(udg_MMGroup))
else
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8827" )
endif
call GroupClear( udg_MMGroup )
if ( Trig_MMa_Func028C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(5), GetRectCenter(gg_rct_Hero_Creation_NE), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_MMa_Func029C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(11), GetRectCenter(gg_rct_Hero_Creation_Evil), bj_UNIT_FACING )
else
call DoNothing( )
endif
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_MMa takes nothing returns nothing
set gg_trg_MMa = CreateTrigger( )
call DisableTrigger( gg_trg_MMa )
call TriggerRegisterTimerEventSingle( gg_trg_MMa, 60.00 )
call TriggerAddAction( gg_trg_MMa, function Trig_MMa_Actions )
endfunction
//===========================================================================
// Trigger: APv
//===========================================================================
function Trig_APv_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_APv_Func008C takes nothing returns boolean
if ( not ( udg_DMBool == true ) ) then
return false
endif
return true
endfunction
function Trig_APv_Func028Func003001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'n00C' )
endfunction
function Trig_APv_Func028Func003A takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_APv_Func028C takes nothing returns boolean
if ( not ( udg_DMBool == false ) ) then
return false
endif
return true
endfunction
function Trig_APv_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call DestroyTrigger(gg_trg_TR)
call DestroyTrigger(gg_trg_RandomUD)
call DestroyTrigger(gg_trg_RandomS)
call DestroyTrigger(gg_trg_RepS)
call DestroyTrigger(gg_trg_RepUD)
call DestroyTrigger(gg_trg_AR)
if ( Trig_APv_Func008C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8828" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Allpick Deathmatch" + udg_VersionString ) )
else
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8829" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Allpick" + udg_VersionString ) )
endif
call DisableTrigger( gg_trg_entry )
call EnableTrigger( gg_trg_RandomSAP )
call EnableTrigger( gg_trg_RandomUDAP )
call EnableTrigger( gg_trg_RepSAP )
call EnableTrigger( gg_trg_RepUDAP )
set udg_APOn = true
call TriggerSleepAction( 0.01 )
call CreateNUnitsAtLoc( 1, 'n00C', Player(1), GetRectCenter(gg_rct_Allpick_Scourge), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n00C', Player(2), GetRectCenter(gg_rct_Allpick_Scourge), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n00C', Player(3), GetRectCenter(gg_rct_Allpick_Scourge), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n00C', Player(4), GetRectCenter(gg_rct_Allpick_Scourge), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n00C', Player(5), GetRectCenter(gg_rct_Allpick_Scourge), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n00C', Player(7), GetRectCenter(gg_rct_Allpick_Sent), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n00C', Player(8), GetRectCenter(gg_rct_Allpick_Sent), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n00C', Player(9), GetRectCenter(gg_rct_Allpick_Sent), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n00C', Player(10), GetRectCenter(gg_rct_Allpick_Sent), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n00C', Player(11), GetRectCenter(gg_rct_Allpick_Sent), bj_UNIT_FACING )
call TriggerSleepAction( 0.01 )
call EnableTrigger( gg_trg_entry )
if ( Trig_APv_Func028C() ) then
call TriggerSleepAction( 90.00 )
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_APv_Func028Func003001002)), function Trig_APv_Func028Func003A )
else
call DoNothing( )
endif
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_APv takes nothing returns nothing
set gg_trg_APv = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_APv, Player(1), "-allpick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_APv, Player(1), "-ap", true )
call TriggerAddCondition( gg_trg_APv, Condition( function Trig_APv_Conditions ) )
call TriggerAddAction( gg_trg_APv, function Trig_APv_Actions )
endfunction
//===========================================================================
// Trigger: SMv
//===========================================================================
function Trig_SMv_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_SMv_Func007A takes nothing returns nothing
call SetPlayerHandicapXPBJ( GetEnumPlayer(), 115.00 )
endfunction
function Trig_SMv_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8830" )
call SetPlayerTechResearchedSwap( 'R004', 1, Player(0) )
call SetPlayerTechResearchedSwap( 'R004', 1, Player(6) )
call DisableTrigger( gg_trg_Money )
call EnableTrigger( gg_trg_SM_Money )
set bj_wantDestroyGroup = true
call ForForce( GetPlayersAll(), function Trig_SMv_Func007A )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_SMv takes nothing returns nothing
set gg_trg_SMv = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_SMv, Player(1), "-shortmode", true )
call TriggerRegisterPlayerChatEvent( gg_trg_SMv, Player(1), "-sm", true )
call TriggerAddCondition( gg_trg_SMv, Condition( function Trig_SMv_Conditions ) )
call TriggerAddAction( gg_trg_SMv, function Trig_SMv_Actions )
endfunction
//===========================================================================
// Trigger: DMv
//===========================================================================
function Trig_DMv_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_DMv_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8831" )
call DestroyTrigger(gg_trg_DEv)
set udg_RandHero[2] = 'Nbrn'
set udg_RandHero[3] = 'Npbm'
set udg_RandHero[4] = 'Edem'
set udg_RandHero[5] = 'Hlgr'
set udg_RandHero[6] = 'Harf'
set udg_RandHero[7] = 'N016'
set udg_RandHero[8] = 'Nbbc'
set udg_RandHero[9] = 'Naka'
set udg_RandHero[10] = 'H000'
set udg_RandHero[11] = 'Orkn'
set udg_RandHero[12] = 'Emoo'
set udg_RandHero[13] = 'Emns'
set udg_RandHero[14] = 'O00P'
set udg_RandHero[15] = 'Usyl'
set udg_RandHero[16] = 'H004'
set udg_RandHero[17] = 'E005'
set udg_RandHero[18] = 'N01O'
set udg_RandHero[19] = 'HC92'
set udg_RandHero[20] = 'Hjai'
set udg_RandHero[21] = 'Hvwd'
set udg_RandHero[22] = 'HC49'
set udg_RandHero[23] = 'H00K'
set udg_RandHero[24] = 'H001'
set udg_RandHero[25] = 'Hmbr'
set udg_RandHero[26] = 'N01A'
set udg_RandHero[27] = 'Hamg'
set udg_RandHero[28] = 'Huth'
set udg_RandHero[29] = 'Ntin'
set udg_RandHero[30] = 'Hmkg'
set udg_RandHero[31] = 'Hblm'
set udg_RandHero[32] = 'Hpb2'
set udg_RandHero[33] = 'Hant'
set udg_RandHero[34] = 'Hdgo'
set udg_RandHero[35] = 'Ucrl'
set udg_RandHero[36] = 'Ogrh'
set udg_RandHero[1] = 'Otch'
set udg_RandHero[38] = 'E004'
set udg_RandHero[39] = 'EC77'
set udg_RandHero[40] = 'E002'
set udg_RandHero[41] = 'EC45'
set udg_RandHero[42] = 'U00A'
set udg_RandHero[43] = 'Ewar'
set udg_RandHero[44] = 'UC01'
set udg_RandHero[45] = 'U007'
set udg_RandHero[46] = 'UC91'
set udg_RandHero[47] = 'UC42'
set udg_RandHero[48] = 'U008'
set udg_RandHero[49] = 'U000'
set udg_RandHero[50] = 'NC00'
set udg_RandHero[51] = 'Ulic'
set udg_RandHero[52] = 'U006'
set udg_RandHero[53] = 'Ekee'
set udg_RandHero[54] = 'Udre'
set udg_RandHero[55] = 'UC76'
set udg_RandHero[56] = 'EC57'
set udg_RandHero[57] = 'UC18'
set udg_RandHero[58] = 'UC11'
set udg_RandHero[59] = 'H00V'
set udg_RandHero[60] = 'Eevi'
set udg_RandHero[61] = 'UC60'
set udg_RandHero[62] = 'H00H'
set udg_RandHero[63] = 'Ofar'
set udg_RandHero[64] = 'Oshd'
set udg_RandHero[65] = 'U00F'
set udg_RandHero[66] = 'U00K'
set udg_RandHero[67] = 'U00E'
set udg_RandHero[68] = 'Uanb'
set udg_RandHero[69] = 'Ubal'
set udg_RandHero[70] = 'Nfir'
set udg_RandHero[71] = 'Opgh'
set udg_RandHero[72] = 'Hvsh'
set udg_RandHero[37] = 'Uktl'
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_DMv takes nothing returns nothing
set gg_trg_DMv = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_DMv, Player(1), "-dupemode", true )
call TriggerRegisterPlayerChatEvent( gg_trg_DMv, Player(1), "-du", true )
call TriggerAddCondition( gg_trg_DMv, Condition( function Trig_DMv_Conditions ) )
call TriggerAddAction( gg_trg_DMv, function Trig_DMv_Actions )
endfunction
//===========================================================================
// Trigger: AR
//===========================================================================
function Trig_AR_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func007C takes nothing returns boolean
if ( not ( udg_DMBool == true ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func020Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func020C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(1)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func021Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func021C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(2)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func022Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func022C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(3)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func023Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func023C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(4)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func024Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func024C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(5)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(5)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func025Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func025C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(7)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(7)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func026Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func026C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(8)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func027Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func027C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(9)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func028Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func028C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(10)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(10)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func029Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func029C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(11)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(11)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Actions takes nothing returns nothing
call DestroyTrigger(gg_trg_TR)
call DestroyTrigger(gg_trg_RV1)
call DestroyTrigger(gg_trg_RV2)
call DestroyTrigger(gg_trg_APv)
call DestroyTrigger(gg_trg_MMv)
call DisableTrigger( GetTriggeringTrigger() )
if ( Trig_AR_Func007C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8832" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Allrandom Deathmatch" + udg_VersionString ) )
else
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8833" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Allrandom" + udg_VersionString ) )
endif
call DisableTrigger( gg_trg_HeroL1 )
call DisableTrigger( gg_trg_RandomUD )
call DisableTrigger( gg_trg_RandomS )
call TriggerExecute( gg_trg_HeroL2 )
call DisableTrigger( gg_trg_RepUD )
call DisableTrigger( gg_trg_RepS )
call EnableTrigger( gg_trg_ARReUD )
call EnableTrigger( gg_trg_ARReS )
set udg_AROn = true
if ( Trig_AR_Func020C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func020Func007C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(1), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(1), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_AR_Func021C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func021Func007C() ) then
call SetPlayerStateBJ( Player(2), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(2), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(2)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(2), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_AR_Func022C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func022Func007C() ) then
call SetPlayerStateBJ( Player(3), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(3), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(3)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(3), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_AR_Func023C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func023Func007C() ) then
call SetPlayerStateBJ( Player(4), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(4), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(4)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(4), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_AR_Func024C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func024Func007C() ) then
call SetPlayerStateBJ( Player(5), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(5), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(5)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(5), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_AR_Func025C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func025Func007C() ) then
call SetPlayerStateBJ( Player(7), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(7), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(7), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_AR_Func026C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func026Func007C() ) then
call SetPlayerStateBJ( Player(8), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(8), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(8)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(8), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_AR_Func027C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func027Func007C() ) then
call SetPlayerStateBJ( Player(9), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(9), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(9)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(9), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_AR_Func028C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func028Func007C() ) then
call SetPlayerStateBJ( Player(10), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(10), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(10)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(10), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_AR_Func029C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func029Func007C() ) then
call SetPlayerStateBJ( Player(11), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(11), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(11)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(11), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_AR takes nothing returns nothing
set gg_trg_AR = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_AR, Player(1), "-allrandom", true )
call TriggerRegisterPlayerChatEvent( gg_trg_AR, Player(1), "-ar", true )
call TriggerAddCondition( gg_trg_AR, Condition( function Trig_AR_Conditions ) )
call TriggerAddAction( gg_trg_AR, function Trig_AR_Actions )
endfunction
//===========================================================================
// Trigger: TR
//===========================================================================
function Trig_TR_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func007C takes nothing returns boolean
if ( not ( udg_DMBool == true ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func020Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func020C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(1)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func021Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func021C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(2)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func022Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func022C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(3)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func023Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func023C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(4)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func024Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func024C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(5)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(5)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func025Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func025C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(7)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(7)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func026Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func026C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(8)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func027Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func027C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(9)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func028Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func028C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(10)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(10)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func029Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func029C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(11)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(11)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Actions takes nothing returns nothing
call DestroyTrigger(gg_trg_AR)
call DestroyTrigger(gg_trg_RV1)
call DestroyTrigger(gg_trg_RV2)
call DestroyTrigger(gg_trg_APv)
call DestroyTrigger(gg_trg_MMv)
call DisableTrigger( GetTriggeringTrigger() )
if ( Trig_TR_Func007C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8834" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Teamrandom Deathmatch" + udg_VersionString ) )
else
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8835" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Teamrandom" + udg_VersionString ) )
endif
call DisableTrigger( gg_trg_HeroL1 )
call DisableTrigger( gg_trg_RandomUD )
call DisableTrigger( gg_trg_RandomS )
call TriggerExecute( gg_trg_HeroL2 )
call DisableTrigger( gg_trg_RepUD )
call DisableTrigger( gg_trg_RepS )
call EnableTrigger( gg_trg_TRReUD )
call EnableTrigger( gg_trg_TRReS )
set udg_TROn = true
if ( Trig_TR_Func020C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_TR_Func020Func007C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(1), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(1), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_TR_Func021C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_TR_Func021Func007C() ) then
call SetPlayerStateBJ( Player(2), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(2), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(2)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(2), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_TR_Func022C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_TR_Func022Func007C() ) then
call SetPlayerStateBJ( Player(3), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(3), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(3)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(3), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_TR_Func023C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_TR_Func023Func007C() ) then
call SetPlayerStateBJ( Player(4), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(4), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(4)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(4), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_TR_Func024C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_TR_Func024Func007C() ) then
call SetPlayerStateBJ( Player(5), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(5), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(5)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(5), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_TR_Func025C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_TR_Func025Func007C() ) then
call SetPlayerStateBJ( Player(7), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(7), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(7), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_TR_Func026C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_TR_Func026Func007C() ) then
call SetPlayerStateBJ( Player(8), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(8), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(8)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(8), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_TR_Func027C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_TR_Func027Func007C() ) then
call SetPlayerStateBJ( Player(9), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(9), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(9)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(9), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_TR_Func028C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_TR_Func028Func007C() ) then
call SetPlayerStateBJ( Player(10), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(10), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(10)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(10), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_TR_Func029C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_TR_Func029Func007C() ) then
call SetPlayerStateBJ( Player(11), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(11), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(11)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(11), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_TR takes nothing returns nothing
set gg_trg_TR = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_TR, Player(1), "-teamrandom", true )
call TriggerRegisterPlayerChatEvent( gg_trg_TR, Player(1), "-tr", true )
call TriggerAddCondition( gg_trg_TR, Condition( function Trig_TR_Conditions ) )
call TriggerAddAction( gg_trg_TR, function Trig_TR_Actions )
endfunction
//===========================================================================
// Trigger: RV1
//===========================================================================
function Trig_RV1_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_RV1_Func011A takes nothing returns nothing
call AdjustPlayerStateBJ( 375, GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD )
endfunction
function Trig_RV1_Actions takes nothing returns nothing
call DestroyTrigger(gg_trg_TR)
call DestroyTrigger(gg_trg_AR)
call DestroyTrigger(gg_trg_APv)
call DestroyTrigger(gg_trg_MMv)
call DestroyTrigger(gg_trg_DEv)
call DisableTrigger( GetTriggeringTrigger() )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Reverse" + udg_VersionString ) )
call ForForce( GetPlayersAll(), function Trig_RV1_Func011A )
call DisableTrigger( gg_trg_sent_chosen )
call DisableTrigger( gg_trg_RandomUD )
call DisableTrigger( gg_trg_RandomS )
call DisableTrigger( gg_trg_RepUD )
call DisableTrigger( gg_trg_RepS )
call DisableTrigger( gg_trg_entry )
call TriggerSleepAction( 0.02 )
call RemoveUnit( gg_unit_n007_0018 )
call RemoveUnit( gg_unit_n005_0019 )
call RemoveUnit( gg_unit_n01B_0020 )
call RemoveUnit( gg_unit_n008_0009 )
call RemoveUnit( gg_unit_n01D_0012 )
call RemoveUnit( gg_unit_ntav_0000 )
call CreateNUnitsAtLoc( 1, 'ntav', Player(6), GetRectCenter(gg_rct_Scourge_Top_Tavern), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n008', Player(6), GetRectCenter(gg_rct_Scourge_Bottom_Tavern), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n01D', Player(6), GetRectCenter(gg_rct_Scourge_New_Tavern), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n005', Player(0), GetRectCenter(gg_rct_Sent_Bottom_Tavern), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n007', Player(0), GetRectCenter(gg_rct_Sent_Top_Tavern), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n01B', Player(0), GetRectCenter(gg_rct_Sent_New_Tavern), bj_UNIT_FACING )
call TriggerSleepAction( 0.02 )
call EnableTrigger( gg_trg_RV2 )
call EnableTrigger( gg_trg_RS1 )
call EnableTrigger( gg_trg_RS2 )
call DisplayTimedTextToForce( GetPlayersAll(), 30, "TRIGSTR_8836" )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_RV1 takes nothing returns nothing
set gg_trg_RV1 = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_RV1, Player(1), "-reverse", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RV1, Player(1), "-re", true )
call TriggerAddCondition( gg_trg_RV1, Condition( function Trig_RV1_Conditions ) )
call TriggerAddAction( gg_trg_RV1, function Trig_RV1_Actions )
endfunction
//===========================================================================
// Trigger: RV2
//===========================================================================
function Trig_RV2_Func005Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func005Func002C takes nothing returns boolean
if ( not ( udg_ReHT[2] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func005C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func006Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func006Func002C takes nothing returns boolean
if ( not ( udg_ReHT[3] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func006C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func007Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func007Func002C takes nothing returns boolean
if ( not ( udg_ReHT[4] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func007C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func008Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func008Func002C takes nothing returns boolean
if ( not ( udg_ReHT[5] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func008C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func009Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func009Func002C takes nothing returns boolean
if ( not ( udg_ReHT[6] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func009C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(5)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func010Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func010Func002C takes nothing returns boolean
if ( not ( udg_ReHT[8] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func010C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(7)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func011Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func011Func002C takes nothing returns boolean
if ( not ( udg_ReHT[9] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func011C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func012Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func012Func002C takes nothing returns boolean
if ( not ( udg_ReHT[10] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func012C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func013Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func013Func002C takes nothing returns boolean
if ( not ( udg_ReHT[11] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func013C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(10)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func014Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func014Func002C takes nothing returns boolean
if ( not ( udg_ReHT[12] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func014C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(11)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_RS2 )
call DisableTrigger( gg_trg_RS1 )
call EnableTrigger( gg_trg_entry )
call TriggerSleepAction( 0.01 )
if ( Trig_RV2_Func005C() ) then
if ( Trig_RV2_Func005Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[2], Player(1), GetRectCenter(gg_rct_herospawnsent), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(7), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_RV2_Func005Func002Func005C() ) then
call SetPlayerStateBJ( Player(7), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(1), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Blue will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(1), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
if ( Trig_RV2_Func006C() ) then
if ( Trig_RV2_Func006Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[3], Player(2), GetRectCenter(gg_rct_herospawnsent), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(8), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_RV2_Func006Func002Func005C() ) then
call SetPlayerStateBJ( Player(8), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(2), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Teal will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(2), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
if ( Trig_RV2_Func007C() ) then
if ( Trig_RV2_Func007Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[4], Player(3), GetRectCenter(gg_rct_herospawnsent), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(9), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_RV2_Func007Func002Func005C() ) then
call SetPlayerStateBJ( Player(9), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(3), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Purple will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(3), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
if ( Trig_RV2_Func008C() ) then
if ( Trig_RV2_Func008Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[5], Player(4), GetRectCenter(gg_rct_herospawnsent), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(10), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_RV2_Func008Func002Func005C() ) then
call SetPlayerStateBJ( Player(10), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(4), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Yellow will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(4), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
if ( Trig_RV2_Func009C() ) then
if ( Trig_RV2_Func009Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[6], Player(5), GetRectCenter(gg_rct_herospawnsent), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(11), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_RV2_Func009Func002Func005C() ) then
call SetPlayerStateBJ( Player(11), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(5), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Orange will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(5), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
if ( Trig_RV2_Func010C() ) then
if ( Trig_RV2_Func010Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[8], Player(7), GetRectCenter(gg_rct_herospawnud), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_RV2_Func010Func002Func005C() ) then
call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(7), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Pink will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(7), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
if ( Trig_RV2_Func011C() ) then
if ( Trig_RV2_Func011Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[9], Player(8), GetRectCenter(gg_rct_herospawnud), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(2), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_RV2_Func011Func002Func005C() ) then
call SetPlayerStateBJ( Player(2), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(8), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Gray will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(8), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
if ( Trig_RV2_Func012C() ) then
if ( Trig_RV2_Func012Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[10], Player(9), GetRectCenter(gg_rct_herospawnud), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(3), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_RV2_Func012Func002Func005C() ) then
call SetPlayerStateBJ( Player(3), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(9), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Light Blue will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(9), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
if ( Trig_RV2_Func013C() ) then
if ( Trig_RV2_Func013Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[11], Player(10), GetRectCenter(gg_rct_herospawnud), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(4), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_RV2_Func013Func002Func005C() ) then
call SetPlayerStateBJ( Player(4), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(10), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Dark Green will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(10), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
if ( Trig_RV2_Func014C() ) then
if ( Trig_RV2_Func014Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[12], Player(11), GetRectCenter(gg_rct_herospawnud), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(5), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_RV2_Func014Func002Func005C() ) then
call SetPlayerStateBJ( Player(5), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(11), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Brown will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(11), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_RV2 takes nothing returns nothing
set gg_trg_RV2 = CreateTrigger( )
call DisableTrigger( gg_trg_RV2 )
call TriggerRegisterTimerEventSingle( gg_trg_RV2, 60.00 )
call TriggerAddAction( gg_trg_RV2, function Trig_RV2_Actions )
endfunction
//===========================================================================
// Trigger: PUV
//===========================================================================
function Trig_PUV_Conditions takes nothing returns boolean
if ( not ( udg_NPU[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
return true
endfunction
function Trig_PUV_Func004Func001Func001C takes nothing returns boolean
if ( not ( GetItemType(GetEnumItem()) == ITEM_TYPE_POWERUP ) ) then
return false
endif
return true
endfunction
function Trig_PUV_Func004Func001A takes nothing returns nothing
if ( Trig_PUV_Func004Func001Func001C() ) then
call RemoveItem( GetEnumItem() )
else
call DoNothing( )
endif
endfunction
function Trig_PUV_Func004C takes nothing returns boolean
if ( not ( udg_NPTot > 2 ) ) then
return false
endif
return true
endfunction
function Trig_PUV_Actions takes nothing returns nothing
set udg_NPTot = ( udg_NPTot + 1 )
set udg_NPU[GetConvertedPlayerId(GetTriggerPlayer())] = true
if ( Trig_PUV_Func004C() ) then
call EnumItemsInRectBJ( GetPlayableMapRect(), function Trig_PUV_Func004Func001A )
call DisableTrigger( gg_trg_ItemSpawn )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8837" )
call DestroyTrigger(GetTriggeringTrigger())
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_PUV takes nothing returns nothing
set gg_trg_PUV = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(1), "-nopowerups", true )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(2), "-nopowerups", true )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(3), "-nopowerups", true )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(4), "-nopowerups", true )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(5), "-nopowerups", true )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(7), "-nopowerups", true )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(8), "-nopowerups", true )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(9), "-nopowerups", true )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(10), "-nopowerups", true )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(11), "-nopowerups", true )
call TriggerAddCondition( gg_trg_PUV, Condition( function Trig_PUV_Conditions ) )
call TriggerAddAction( gg_trg_PUV, function Trig_PUV_Actions )
endfunction
//===========================================================================
// Trigger: sent chosen
//===========================================================================
function Trig_sent_chosen_Conditions takes nothing returns boolean
if ( not ( udg_ElapsedTime == false ) ) then
return false
endif
return true
endfunction
function Trig_sent_chosen_Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'E005' ) ) then
return false
endif
return true
endfunction
function Trig_sent_chosen_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersEnemies(GetOwningPlayer(GetTriggerUnit())), 10.00, ( "An enemy has chosen " + ( GetUnitName(GetTriggerUnit()) + "." ) ) )
if ( Trig_sent_chosen_Func002C() ) then
call DisplayTimedTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), 30.00, "TRIGSTR_8838" )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_sent_chosen takes nothing returns nothing
set gg_trg_sent_chosen = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_sent_chosen, gg_rct_herospawnsent )
call TriggerRegisterEnterRectSimple( gg_trg_sent_chosen, gg_rct_herospawnud )
call TriggerAddCondition( gg_trg_sent_chosen, Condition( function Trig_sent_chosen_Conditions ) )
call TriggerAddAction( gg_trg_sent_chosen, function Trig_sent_chosen_Actions )
endfunction
//===========================================================================
// Trigger: elapsed time
//===========================================================================
function Trig_elapsed_time_Actions takes nothing returns nothing
set udg_ElapsedTime = true
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_elapsed_time takes nothing returns nothing
set gg_trg_elapsed_time = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_elapsed_time, 120.00 )
call TriggerAddAction( gg_trg_elapsed_time, function Trig_elapsed_time_Actions )
endfunction
//===========================================================================
// Trigger: Move
//===========================================================================
function Trig_Move_Func002C takes nothing returns boolean
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(0) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(6) ) ) then
return true
endif
return false
endfunction
function Trig_Move_Conditions takes nothing returns boolean
if ( not Trig_Move_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Move_Func001C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(0) ) ) then
return false
endif
return true
endfunction
function Trig_Move_Actions takes nothing returns nothing
if ( Trig_Move_Func001C() ) then
call IssuePointOrderLocBJ( GetTriggerUnit(), "attack", GetUnitLoc(gg_unit_e001_0008) )
else
call IssuePointOrderLocBJ( GetTriggerUnit(), "attack", GetUnitLoc(gg_unit_e008_0007) )
endif
endfunction
//===========================================================================
function InitTrig_Move takes nothing returns nothing
set gg_trg_Move = CreateTrigger( )
call TriggerRegisterUnitInRangeSimple( gg_trg_Move, 300.00, gg_unit_e00A_0006 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Move, 300.00, gg_unit_e00B_0005 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Move, 300.00, gg_unit_e00D_0004 )
call TriggerAddCondition( gg_trg_Move, Condition( function Trig_Move_Conditions ) )
call TriggerAddAction( gg_trg_Move, function Trig_Move_Actions )
endfunction
//===========================================================================
// Trigger: multi hero correction
//===========================================================================
function Trig_multi_hero_correction_Func002Func001Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetEnumUnit()) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == ConvertedPlayer(GetForLoopIndexA()) ) ) then
return false
endif
return true
endfunction
function Trig_multi_hero_correction_Func002Func001A takes nothing returns nothing
if ( Trig_multi_hero_correction_Func002Func001Func001C() ) then
set udg_HeroNum[GetForLoopIndexA()] = ( udg_HeroNum[GetForLoopIndexA()] + 1 )
else
call DoNothing( )
endif
endfunction
function Trig_multi_hero_correction_Func003Func001Func003001001002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == ConvertedPlayer(GetForLoopIndexB()) )
endfunction
function Trig_multi_hero_correction_Func003Func001Func003001001002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_multi_hero_correction_Func003Func001Func003001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_multi_hero_correction_Func003Func001Func003001001002001(), Trig_multi_hero_correction_Func003Func001Func003001001002002() )
endfunction
function Trig_multi_hero_correction_Func003Func001C takes nothing returns boolean
if ( not ( udg_HeroNum[GetForLoopIndexB()] > 1 ) ) then
return false
endif
return true
endfunction
function Trig_multi_hero_correction_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_multi_hero_correction_Func002Func001A )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 12
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_multi_hero_correction_Func003Func001C() ) then
loop
call RemoveUnit( GroupPickRandomUnit(GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_multi_hero_correction_Func003Func001Func003001001002))) )
set udg_HeroNum[GetForLoopIndexB()] = ( udg_HeroNum[GetForLoopIndexB()] - 1 )
exitwhen ( udg_HeroNum[GetForLoopIndexB()] == 1 )
endloop
else
call DoNothing( )
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_multi_hero_correction takes nothing returns nothing
set gg_trg_multi_hero_correction = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_multi_hero_correction, 65.00 )
call TriggerAddAction( gg_trg_multi_hero_correction, function Trig_multi_hero_correction_Actions )
endfunction
//===========================================================================
// Trigger: ten minute elapsed
//===========================================================================
function Trig_ten_minute_elapsed_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_PUV )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_ten_minute_elapsed takes nothing returns nothing
set gg_trg_ten_minute_elapsed = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_ten_minute_elapsed, 600.00 )
call TriggerAddAction( gg_trg_ten_minute_elapsed, function Trig_ten_minute_elapsed_Actions )
endfunction
//===========================================================================
// Trigger: sheep
//===========================================================================
function Trig_sheep_Conditions takes nothing returns boolean
if ( not ( IsUnitAlly(GetAttackedUnitBJ(), GetOwningPlayer(GetAttacker())) == true ) ) then
return false
endif
return true
endfunction
function Trig_sheep_Func001Func010001 takes nothing returns boolean
return ( GetUnitTypeId(GetAttackedUnitBJ()) == 'etol' )
endfunction
function Trig_sheep_Func001Func010002 takes nothing returns boolean
return ( GetUnitTypeId(GetAttackedUnitBJ()) == 'unpl' )
endfunction
function Trig_sheep_Func001C takes nothing returns boolean
if ( not GetBooleanOr( Trig_sheep_Func001Func010001(), Trig_sheep_Func001Func010002() ) ) then
return false
endif
return true
endfunction
function Trig_sheep_Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'BNdo') == false ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'B03I') == false ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'BEsh') == false ) ) then
return false
endif
return true
endfunction
function Trig_sheep_Func003C takes nothing returns boolean
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
if ( not ( GetUnitLifePercent(GetAttackedUnitBJ()) >= 50.00 ) ) then
return false
endif
return true
endfunction
function Trig_sheep_Func004Func003001 takes nothing returns boolean
return ( GetUnitTypeId(GetAttackedUnitBJ()) != 'etol' )
endfunction
function Trig_sheep_Func004Func003002 takes nothing returns boolean
return ( GetUnitTypeId(GetAttackedUnitBJ()) != 'unpl' )
endfunction
function Trig_sheep_Func004C takes nothing returns boolean
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == true ) ) then
return false
endif
if ( not GetBooleanOr( Trig_sheep_Func004Func003001(), Trig_sheep_Func004Func003002() ) ) then
return false
endif
if ( not ( GetUnitLifePercent(GetAttackedUnitBJ()) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_sheep_Actions takes nothing returns nothing
if ( Trig_sheep_Func001C() ) then
call IssueImmediateOrderBJ( GetAttacker(), "stop" )
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetAttackedUnitBJ()), GetUnitLoc(GetAttackedUnitBJ()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A08U', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "hex", GetAttacker() )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
else
call DoNothing( )
endif
if ( Trig_sheep_Func002C() ) then
call IssueImmediateOrderBJ( GetAttacker(), "stop" )
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetAttackedUnitBJ()), GetUnitLoc(GetAttackedUnitBJ()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A08U', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "hex", GetAttacker() )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
else
call DoNothing( )
endif
if ( Trig_sheep_Func003C() ) then
call IssueImmediateOrderBJ( GetAttacker(), "stop" )
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetAttackedUnitBJ()), GetUnitLoc(GetAttackedUnitBJ()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A08U', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "hex", GetAttacker() )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
else
call DoNothing( )
endif
if ( Trig_sheep_Func004C() ) then
call IssueImmediateOrderBJ( GetAttacker(), "stop" )
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetAttackedUnitBJ()), GetUnitLoc(GetAttackedUnitBJ()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A08U', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "hex", GetAttacker() )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_sheep takes nothing returns nothing
set gg_trg_sheep = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_sheep, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_sheep, Condition( function Trig_sheep_Conditions ) )
call TriggerAddAction( gg_trg_sheep, function Trig_sheep_Actions )
endfunction
//===========================================================================
// Trigger: elapsed15sec
//===========================================================================
function Trig_elapsed15sec_Actions takes nothing returns nothing
set udg_Elapsed20 = true
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_elapsed15sec takes nothing returns nothing
set gg_trg_elapsed15sec = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_elapsed15sec, 15.00 )
call TriggerAddAction( gg_trg_elapsed15sec, function Trig_elapsed15sec_Actions )
endfunction
//===========================================================================
// Trigger: map init
//===========================================================================
function Trig_map_init_Func006Func001C takes nothing returns boolean
if ( not ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_map_init_Func007Func001C takes nothing returns boolean
if ( not ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_map_init_Actions takes nothing returns nothing
call StartTimerBJ( udg_LBTime, false, 99999.00 )
call InitGameCacheBJ( "allstars.w3v" )
set udg_classes = GetLastCreatedGameCacheBJ()
set udg_UDNum = ( CountPlayersInForceBJ(GetPlayersAllies(Player(6))) - 1 )
set udg_SNum = ( CountPlayersInForceBJ(GetPlayersAllies(Player(0))) - 1 )
set bj_forLoopAIndex = 2
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_map_init_Func006Func001C() ) then
call SetPlayerStateBJ( ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_GOLD, ( 3500 / udg_SNum ) )
call SetPlayerStateBJ( ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_LUMBER, 0 )
call SetPlayerStateBJ( ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_FOOD_CAP, 5 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 8
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_map_init_Func007Func001C() ) then
call SetPlayerStateBJ( ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_GOLD, ( 3500 / udg_UDNum ) )
call SetPlayerStateBJ( ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_LUMBER, 0 )
call SetPlayerStateBJ( ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_FOOD_CAP, 5 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_8840", "TRIGSTR_8841", "ReplaceableTextures\\CommandButtons\\BTNAmbush.blp" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_8842", "TRIGSTR_8843", "ReplaceableTextures\\CommandButtons\\BTNSlow.blp" )
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_8844", "TRIGSTR_8845", "ReplaceableTextures\\WorldEditUI\\StartingLocation.blp" )
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_8846", "TRIGSTR_8847", "ReplaceableTextures\\CommandButtons\\BTNAnimateDead.blp" )
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_8848", "TRIGSTR_8849", "ReplaceableTextures\\CommandButtons\\BTNSpy.blp" )
set udg_VersionString = " v6.00"
set udg_Colors[1] = "|c00ff0303"
set udg_Colors[2] = "|c000042ff"
set udg_Colors[3] = "|c001ce6b9"
set udg_Colors[4] = "|c00540081"
set udg_Colors[5] = "|c00fffc01"
set udg_Colors[6] = "|c00ff8000"
set udg_Colors[7] = "|c0020c000"
set udg_Colors[8] = "|c00e55bb0"
set udg_Colors[9] = "|c00959697"
set udg_Colors[10] = "|c007ebff1"
set udg_Colors[11] = "|c00106246"
set udg_Colors[12] = "|c004e2a04"
set udg_RandHero[1] = 'Nbrn'
set udg_RandHero[2] = 'Npbm'
set udg_RandHero[3] = 'Edem'
set udg_RandHero[4] = 'Hlgr'
set udg_RandHero[5] = 'Harf'
set udg_RandHero[6] = 'N016'
set udg_RandHero[7] = 'Nbbc'
set udg_RandHero[8] = 'Naka'
set udg_RandHero[9] = 'H000'
set udg_RandHero[10] = 'Orkn'
set udg_RandHero[11] = 'Emoo'
set udg_RandHero[12] = 'Emns'
set udg_RandHero[13] = 'O00P'
set udg_RandHero[14] = 'Usyl'
set udg_RandHero[15] = 'H004'
set udg_RandHero[16] = 'E005'
set udg_RandHero[17] = 'N01O'
set udg_RandHero[18] = 'HC92'
set udg_RandHero[19] = 'Hjai'
set udg_RandHero[20] = 'Hvwd'
set udg_RandHero[21] = 'HC49'
set udg_RandHero[22] = 'H00K'
set udg_RandHero[23] = 'H001'
set udg_RandHero[24] = 'Hmbr'
set udg_RandHero[25] = 'N01A'
set udg_RandHero[26] = 'Hamg'
set udg_RandHero[27] = 'Huth'
set udg_RandHero[28] = 'Ntin'
set udg_RandHero[29] = 'Hmkg'
set udg_RandHero[30] = 'Hblm'
set udg_RandHero[31] = 'Hpb2'
set udg_RandHero[32] = 'Hant'
set udg_RandHero[33] = 'Hdgo'
set udg_RandHero[34] = 'Ucrl'
set udg_RandHero[35] = 'Ogrh'
set udg_RandHero[36] = 'Otch'
set udg_RandHero[37] = 'E004'
set udg_RandHero[38] = 'EC77'
set udg_RandHero[39] = 'E002'
set udg_RandHero[40] = 'EC45'
set udg_RandHero[41] = 'U00A'
set udg_RandHero[42] = 'Ewar'
set udg_RandHero[43] = 'UC01'
set udg_RandHero[44] = 'U007'
set udg_RandHero[45] = 'UC91'
set udg_RandHero[46] = 'UC42'
set udg_RandHero[47] = 'U008'
set udg_RandHero[48] = 'U000'
set udg_RandHero[49] = 'NC00'
set udg_RandHero[50] = 'Ulic'
set udg_RandHero[51] = 'U006'
set udg_RandHero[52] = 'Ekee'
set udg_RandHero[53] = 'Udre'
set udg_RandHero[54] = 'UC76'
set udg_RandHero[55] = 'EC57'
set udg_RandHero[56] = 'UC18'
set udg_RandHero[57] = 'UC11'
set udg_RandHero[58] = 'H00V'
set udg_RandHero[59] = 'Eevi'
set udg_RandHero[60] = 'UC60'
set udg_RandHero[61] = 'H00H'
set udg_RandHero[62] = 'Ofar'
set udg_RandHero[63] = 'Oshd'
set udg_RandHero[64] = 'U00F'
set udg_RandHero[65] = 'U00K'
set udg_RandHero[66] = 'U00E'
set udg_RandHero[67] = 'Uanb'
set udg_RandHero[68] = 'Ubal'
set udg_RandHero[69] = 'Nfir'
set udg_RandHero[70] = 'Opgh'
set udg_RandHero[71] = 'Hvsh'
set udg_RandHero[72] = 'Uktl'
set udg_SpawnMultiplier[2] = 1
call SetUnitInvulnerable( gg_unit_eaom_0052, true )
call SetUnitInvulnerable( gg_unit_eaoe_0053, true )
call SetUnitInvulnerable( gg_unit_eaom_0055, true )
call SetUnitInvulnerable( gg_unit_eaoe_0054, true )
call SetUnitInvulnerable( gg_unit_eaoe_0057, true )
call SetUnitInvulnerable( gg_unit_eaom_0056, true )
call SetUnitInvulnerable( gg_unit_usep_0074, true )
call SetUnitInvulnerable( gg_unit_utod_0079, true )
call SetUnitInvulnerable( gg_unit_usep_0075, true )
call SetUnitInvulnerable( gg_unit_utod_0078, true )
call SetUnitInvulnerable( gg_unit_utod_0077, true )
call SetUnitInvulnerable( gg_unit_usep_0076, true )
call SetUnitInvulnerable( gg_unit_e011_0106, true )
call SetUnitInvulnerable( gg_unit_e011_0107, true )
call SetUnitInvulnerable( gg_unit_e011_0105, true )
call SetUnitInvulnerable( gg_unit_u00D_0101, true )
call SetUnitInvulnerable( gg_unit_u00D_0100, true )
call SetUnitInvulnerable( gg_unit_u00D_0099, true )
call SetUnitInvulnerable( gg_unit_uzg1_0073, true )
call SetUnitInvulnerable( gg_unit_uzg1_0071, true )
call SetUnitInvulnerable( gg_unit_uzg1_0072, true )
call SetUnitInvulnerable( gg_unit_etrp_0042, true )
call SetUnitInvulnerable( gg_unit_etrp_0043, true )
call SetUnitInvulnerable( gg_unit_etrp_0044, true )
call SetUnitInvulnerable( gg_unit_etol_0039, true )
call SetUnitInvulnerable( gg_unit_unpl_0080, true )
call SetUnitInvulnerable( gg_unit_edob_0069, true )
call SetUnitInvulnerable( gg_unit_edos_0070, true )
call SetUnitInvulnerable( gg_unit_eaow_0068, true )
call SetUnitInvulnerable( gg_unit_uslh_0095, true )
call SetUnitInvulnerable( gg_unit_ugrv_0094, true )
call SetUnitInvulnerable( gg_unit_usap_0093, true )
call SetUnitInvulnerable( gg_unit_e011_0040, true )
call SetUnitInvulnerable( gg_unit_e011_0041, true )
call SetUnitInvulnerable( gg_unit_u00D_0081, true )
call SetUnitInvulnerable( gg_unit_u00D_0082, true )
call SetUnitInvulnerable( gg_unit_emow_0065, true )
call SetUnitInvulnerable( gg_unit_emow_0064, true )
call SetUnitInvulnerable( gg_unit_emow_0066, true )
call SetUnitInvulnerable( gg_unit_emow_0062, true )
call SetUnitInvulnerable( gg_unit_emow_0063, true )
call SetUnitInvulnerable( gg_unit_emow_0067, true )
call SetUnitInvulnerable( gg_unit_emow_0059, true )
call SetUnitInvulnerable( gg_unit_emow_0061, true )
call SetUnitInvulnerable( gg_unit_emow_0058, true )
call SetUnitInvulnerable( gg_unit_emow_0060, true )
call SetUnitInvulnerable( gg_unit_uzig_0088, true )
call SetUnitInvulnerable( gg_unit_uzig_0087, true )
call SetUnitInvulnerable( gg_unit_uzig_0083, true )
call SetUnitInvulnerable( gg_unit_uzig_0084, true )
call SetUnitInvulnerable( gg_unit_uzig_0085, true )
call SetUnitInvulnerable( gg_unit_uzig_0092, true )
call SetUnitInvulnerable( gg_unit_uzig_0089, true )
call SetUnitInvulnerable( gg_unit_uzig_0090, true )
call SetUnitInvulnerable( gg_unit_uzig_0091, true )
call SetUnitInvulnerable( gg_unit_uzig_0118, true )
call SetUnitPathing( gg_unit_e008_0007, false )
call SetUnitPathing( gg_unit_e00A_0006, false )
call SetUnitPathing( gg_unit_e00B_0005, false )
call SetUnitPathing( gg_unit_e00D_0004, false )
call SetUnitPathing( gg_unit_e001_0008, false )
call SetUnitInvulnerable( gg_unit_e001_0008, true )
call SetUnitInvulnerable( gg_unit_e00D_0004, true )
call SetUnitInvulnerable( gg_unit_e00B_0005, true )
call SetUnitInvulnerable( gg_unit_e00A_0006, true )
call SetUnitInvulnerable( gg_unit_e008_0007, true )
call UnitAddAbilityBJ( 'Aloc', gg_unit_e00A_0006 )
call UnitAddAbilityBJ( 'ANab', gg_unit_e00B_0005)
call UnitAddAbilityBJ( 'ANab', gg_unit_e00D_0004 )
call UnitAddAbilityBJ( 'ANab', gg_unit_e008_0007 )
call UnitAddAbilityBJ( 'ANab', gg_unit_e001_0008 )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_map_init takes nothing returns nothing
set gg_trg_map_init = CreateTrigger( )
call TriggerAddAction( gg_trg_map_init, function Trig_map_init_Actions )
endfunction
//===========================================================================
// Trigger: OneMinElapsed
//===========================================================================
function Trig_OneMinElapsed_Actions takes nothing returns nothing
set udg_OneMin = true
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_OneMinElapsed takes nothing returns nothing
set gg_trg_OneMinElapsed = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_OneMinElapsed, 65.00 )
call TriggerAddAction( gg_trg_OneMinElapsed, function Trig_OneMinElapsed_Actions )
endfunction
//===========================================================================
// Trigger: RoshanDies
//===========================================================================
function Trig_RoshanDies_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n00L' ) ) then
return false
endif
return true
endfunction
function Trig_RoshanDies_Func001Func004C takes nothing returns boolean
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(0) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(1) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(2) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(3) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(5) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(4) ) ) then
return true
endif
return false
endfunction
function Trig_RoshanDies_Func001C takes nothing returns boolean
if ( not Trig_RoshanDies_Func001Func004C() ) then
return false
endif
return true
endfunction
function Trig_RoshanDies_Func002Func004C takes nothing returns boolean
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(6) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(7) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(8) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(9) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(10) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(11) ) ) then
return true
endif
return false
endfunction
function Trig_RoshanDies_Func002C takes nothing returns boolean
if ( not Trig_RoshanDies_Func002Func004C() ) then
return false
endif
return true
endfunction
function Trig_RoshanDies_Actions takes nothing returns nothing
if ( Trig_RoshanDies_Func001C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8850" )
set bj_forLoopAIndex = 2
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AdjustPlayerStateBJ( 800, ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_GOLD )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_RoshanDies_Func002C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8851" )
set bj_forLoopAIndex = 8
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AdjustPlayerStateBJ( 800, ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_GOLD )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_RoshanDies takes nothing returns nothing
set gg_trg_RoshanDies = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_RoshanDies, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_RoshanDies, Condition( function Trig_RoshanDies_Conditions ) )
call TriggerAddAction( gg_trg_RoshanDies, function Trig_RoshanDies_Actions )
endfunction
//===========================================================================
// Trigger: ItemSpawn
//===========================================================================
function Trig_ItemSpawn_Conditions takes nothing returns boolean
if ( not ( udg_Powerups == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func003002 takes nothing returns nothing
set udg_PickedItems = GetEnumItem()
endfunction
function Trig_ItemSpawn_Func004C takes nothing returns boolean
if ( not ( udg_PickedItems == null ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func006002 takes nothing returns nothing
set udg_PickedItems = GetEnumItem()
endfunction
function Trig_ItemSpawn_Func007C takes nothing returns boolean
if ( not ( udg_PickedItems == null ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func008Func003C takes nothing returns boolean
if ( not ( udg_ItemRand == 1 ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func008Func004C takes nothing returns boolean
if ( not ( udg_ItemRand == 2 ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func008Func005C takes nothing returns boolean
if ( not ( udg_ItemRand == 3 ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func008Func006C takes nothing returns boolean
if ( not ( udg_ItemRand == 4 ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func008Func007C takes nothing returns boolean
if ( not ( udg_ItemRand == 5 ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func008Func008C takes nothing returns boolean
if ( not ( udg_ItemRand == 6 ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func008Func009C takes nothing returns boolean
if ( not ( udg_ItemRand == 7 ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func008Func010C takes nothing returns boolean
if ( not ( udg_ItemRand == 8 ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func008C takes nothing returns boolean
if ( not ( udg_ItemTaken[1] == true ) ) then
return false
endif
if ( not ( udg_ItemTaken[2] == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_PickedItems = null
call EnumItemsInRectBJ( gg_rct_ItemSpawn1, function Trig_ItemSpawn_Func003002 )
if ( Trig_ItemSpawn_Func004C() ) then
set udg_ItemTaken[1] = true
else
set udg_ItemTaken[1] = false
endif
set udg_PickedItems = null
call EnumItemsInRectBJ( gg_rct_ItemSpawn2, function Trig_ItemSpawn_Func006002 )
if ( Trig_ItemSpawn_Func007C() ) then
set udg_ItemTaken[2] = true
else
set udg_ItemTaken[2] = false
endif
if ( Trig_ItemSpawn_Func008C() ) then
set udg_ItemRand = GetRandomInt(1, 8)
if ( Trig_ItemSpawn_Func008Func003C() ) then
call CreateItemLoc( 'fgrd', GetRectCenter(gg_rct_ItemSpawn1) )
else
call DoNothing( )
endif
if ( Trig_ItemSpawn_Func008Func004C() ) then
call CreateItemLoc( 'pres', GetRectCenter(gg_rct_ItemSpawn1) )
else
call DoNothing( )
endif
if ( Trig_ItemSpawn_Func008Func005C() ) then
call CreateItemLoc( 'pomn', GetRectCenter(gg_rct_ItemSpawn1) )
else
call DoNothing( )
endif
if ( Trig_ItemSpawn_Func008Func006C() ) then
call CreateItemLoc( 'pnvu', GetRectCenter(gg_rct_ItemSpawn1) )
else
call DoNothing( )
endif
if ( Trig_ItemSpawn_Func008Func007C() ) then
call CreateItemLoc( 'fgrd', GetRectCenter(gg_rct_ItemSpawn2) )
else
call DoNothing( )
endif
if ( Trig_ItemSpawn_Func008Func008C() ) then
call CreateItemLoc( 'pres', GetRectCenter(gg_rct_ItemSpawn2) )
else
call DoNothing( )
endif
if ( Trig_ItemSpawn_Func008Func009C() ) then
call CreateItemLoc( 'pomn', GetRectCenter(gg_rct_ItemSpawn2) )
else
call DoNothing( )
endif
if ( Trig_ItemSpawn_Func008Func010C() ) then
call CreateItemLoc( 'pnvu', GetRectCenter(gg_rct_ItemSpawn2) )
else
call DoNothing( )
endif
set udg_ItemTaken[1] = false
set udg_ItemTaken[2] = false
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_ItemSpawn takes nothing returns nothing
set gg_trg_ItemSpawn = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_ItemSpawn, 75.00 )
call TriggerAddCondition( gg_trg_ItemSpawn, Condition( function Trig_ItemSpawn_Conditions ) )
call TriggerAddAction( gg_trg_ItemSpawn, function Trig_ItemSpawn_Actions )
endfunction
//===========================================================================
// Trigger: SentLMove
//===========================================================================
function Trig_SentLMove_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(0) ) ) then
return false
endif
return true
endfunction
function Trig_SentLMove_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetTriggerUnit(), "attack", GetUnitLoc(gg_unit_e00D_0004) )
endfunction
//===========================================================================
function InitTrig_SentLMove takes nothing returns nothing
set gg_trg_SentLMove = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_SentLMove, gg_rct_War_N )
call TriggerRegisterEnterRectSimple( gg_trg_SentLMove, gg_rct_Lore_N )
call TriggerAddCondition( gg_trg_SentLMove, Condition( function Trig_SentLMove_Conditions ) )
call TriggerAddAction( gg_trg_SentLMove, function Trig_SentLMove_Actions )
endfunction
//===========================================================================
// Trigger: ScouLMove
//===========================================================================
function Trig_ScouLMove_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(6) ) ) then
return false
endif
return true
endfunction
function Trig_ScouLMove_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetTriggerUnit(), "attack", GetUnitLoc(gg_unit_e00D_0004) )
endfunction
//===========================================================================
function InitTrig_ScouLMove takes nothing returns nothing
set gg_trg_ScouLMove = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_ScouLMove, gg_rct_Crypt_W )
call TriggerRegisterEnterRectSimple( gg_trg_ScouLMove, gg_rct_Temple_W )
call TriggerAddCondition( gg_trg_ScouLMove, Condition( function Trig_ScouLMove_Conditions ) )
call TriggerAddAction( gg_trg_ScouLMove, function Trig_ScouLMove_Actions )
endfunction
//===========================================================================
// Trigger: SentMMove
//===========================================================================
function Trig_SentMMove_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(0) ) ) then
return false
endif
return true
endfunction
function Trig_SentMMove_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetTriggerUnit(), "attack", GetUnitLoc(gg_unit_e00B_0005) )
endfunction
//===========================================================================
function InitTrig_SentMMove takes nothing returns nothing
set gg_trg_SentMMove = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_SentMMove, gg_rct_War_NE )
call TriggerRegisterEnterRectSimple( gg_trg_SentMMove, gg_rct_Lore_NE )
call TriggerAddCondition( gg_trg_SentMMove, Condition( function Trig_SentMMove_Conditions ) )
call TriggerAddAction( gg_trg_SentMMove, function Trig_SentMMove_Actions )
endfunction
//===========================================================================
// Trigger: ScouMMove
//===========================================================================
function Trig_ScouMMove_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(6) ) ) then
return false
endif
return true
endfunction
function Trig_ScouMMove_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetTriggerUnit(), "attack", GetUnitLoc(gg_unit_e00B_0005) )
endfunction
//===========================================================================
function InitTrig_ScouMMove takes nothing returns nothing
set gg_trg_ScouMMove = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_ScouMMove, gg_rct_Temple_SW )
call TriggerRegisterEnterRectSimple( gg_trg_ScouMMove, gg_rct_Crypt_SW )
call TriggerAddCondition( gg_trg_ScouMMove, Condition( function Trig_ScouMMove_Conditions ) )
call TriggerAddAction( gg_trg_ScouMMove, function Trig_ScouMMove_Actions )
endfunction
//===========================================================================
// Trigger: SentRMove
//===========================================================================
function Trig_SentRMove_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(0) ) ) then
return false
endif
return true
endfunction
function Trig_SentRMove_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetTriggerUnit(), "attack", GetUnitLoc(gg_unit_e00A_0006) )
endfunction
//===========================================================================
function InitTrig_SentRMove takes nothing returns nothing
set gg_trg_SentRMove = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_SentRMove, gg_rct_Lore_E )
call TriggerRegisterEnterRectSimple( gg_trg_SentRMove, gg_rct_War_E )
call TriggerAddCondition( gg_trg_SentRMove, Condition( function Trig_SentRMove_Conditions ) )
call TriggerAddAction( gg_trg_SentRMove, function Trig_SentRMove_Actions )
endfunction
//===========================================================================
// Trigger: ScouRMove
//===========================================================================
function Trig_ScouRMove_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(6) ) ) then
return false
endif
return true
endfunction
function Trig_ScouRMove_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetTriggerUnit(), "attack", GetUnitLoc(gg_unit_e00A_0006) )
endfunction
//===========================================================================
function InitTrig_ScouRMove takes nothing returns nothing
set gg_trg_ScouRMove = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_ScouRMove, gg_rct_Temple_S )
call TriggerRegisterEnterRectSimple( gg_trg_ScouRMove, gg_rct_Crypt_S )
call TriggerAddCondition( gg_trg_ScouRMove, Condition( function Trig_ScouRMove_Conditions ) )
call TriggerAddAction( gg_trg_ScouRMove, function Trig_ScouRMove_Actions )
endfunction
//===========================================================================
// Trigger: elapsed10
//===========================================================================
function Trig_elapsed10_Actions takes nothing returns nothing
set udg_SpawnBadAss[1] = true
set udg_SpawnBadAss[2] = true
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_elapsed10 takes nothing returns nothing
set gg_trg_elapsed10 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_elapsed10, 590.00 )
call TriggerAddAction( gg_trg_elapsed10, function Trig_elapsed10_Actions )
endfunction
//===========================================================================
// Trigger: elapsed20
//===========================================================================
function Trig_elapsed20_Actions takes nothing returns nothing
set udg_SpawnBadAss[3] = true
set udg_SpawnBadAss[4] = true
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_elapsed20 takes nothing returns nothing
set gg_trg_elapsed20 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_elapsed20, 1190.00 )
call TriggerAddAction( gg_trg_elapsed20, function Trig_elapsed20_Actions )
endfunction
//===========================================================================
// Trigger: elapsed30
//===========================================================================
function Trig_elapsed30_Actions takes nothing returns nothing
set udg_SpawnBadAss[5] = true
set udg_SpawnBadAss[6] = true
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_elapsed30 takes nothing returns nothing
set gg_trg_elapsed30 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_elapsed30, 1790.00 )
call TriggerAddAction( gg_trg_elapsed30, function Trig_elapsed30_Actions )
endfunction
//===========================================================================
// Trigger: spawn multipler
//===========================================================================
function Trig_spawn_multipler_Actions takes nothing returns nothing
set udg_SpawnMultiplier[1] = ( udg_SpawnMultiplier[1] + 1 )
endfunction
//===========================================================================
function InitTrig_spawn_multipler takes nothing returns nothing
set gg_trg_spawn_multipler = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_spawn_multipler, 1199.00 )
call TriggerRegisterTimerEventSingle( gg_trg_spawn_multipler, 2398.00 )
call TriggerRegisterTimerEventSingle( gg_trg_spawn_multipler, 3597.00 )
call TriggerAddAction( gg_trg_spawn_multipler, function Trig_spawn_multipler_Actions )
endfunction
//===========================================================================
// Trigger: spawn multiplier range
//===========================================================================
function Trig_spawn_multiplier_range_Actions takes nothing returns nothing
set udg_SpawnMultiplier[2] = ( udg_SpawnMultiplier[2] + 1 )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_spawn_multiplier_range takes nothing returns nothing
set gg_trg_spawn_multiplier_range = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_spawn_multiplier_range, 3599.00 )
call TriggerAddAction( gg_trg_spawn_multiplier_range, function Trig_spawn_multiplier_range_Actions )
endfunction
//===========================================================================
// Trigger: CreepSpawn
//===========================================================================
function Trig_CreepSpawn_Func001Func003C takes nothing returns boolean
if ( not ( udg_RandNumCp == 1 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func001Func004C takes nothing returns boolean
if ( not ( udg_RandNumCp == 2 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func001Func005C takes nothing returns boolean
if ( not ( udg_RandNumCp == 3 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func001C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_CreepRegion1)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func002Func003C takes nothing returns boolean
if ( not ( udg_RandNumCp == 1 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func002Func004C takes nothing returns boolean
if ( not ( udg_RandNumCp == 2 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func002Func005C takes nothing returns boolean
if ( not ( udg_RandNumCp == 3 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func002C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_CreepRegion8)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func003Func003C takes nothing returns boolean
if ( not ( udg_RandNumCp == 1 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func003Func004C takes nothing returns boolean
if ( not ( udg_RandNumCp == 2 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func003Func005C takes nothing returns boolean
if ( not ( udg_RandNumCp == 3 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func003C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_Creep_region_2)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func004Func003C takes nothing returns boolean
if ( not ( udg_RandNumCp == 1 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func004Func004C takes nothing returns boolean
if ( not ( udg_RandNumCp == 2 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func004Func005C takes nothing returns boolean
if ( not ( udg_RandNumCp == 3 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func004C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_CreepRegion7)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func005Func003C takes nothing returns boolean
if ( not ( udg_RandNumCp == 1 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func005Func004C takes nothing returns boolean
if ( not ( udg_RandNumCp == 2 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func005Func005C takes nothing returns boolean
if ( not ( udg_RandNumCp == 3 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func005Func006C takes nothing returns boolean
if ( not ( udg_RandNumCp == 4 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func005Func007C takes nothing returns boolean
if ( not ( udg_RandNumCp == 5 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func005Func008C takes nothing returns boolean
if ( not ( udg_RandNumCp == 6 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func005C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_CreepRegion4)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func006Func003C takes nothing returns boolean
if ( not ( udg_RandNumCp == 1 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func006Func004C takes nothing returns boolean
if ( not ( udg_RandNumCp == 2 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func006Func005C takes nothing returns boolean
if ( not ( udg_RandNumCp == 3 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func006Func006C takes nothing returns boolean
if ( not ( udg_RandNumCp == 4 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func006Func007C takes nothing returns boolean
if ( not ( udg_RandNumCp == 5 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func006Func008C takes nothing returns boolean
if ( not ( udg_RandNumCp == 6 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func006C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_CreepRegion3)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func007Func003C takes nothing returns boolean
if ( not ( udg_RandNumCp == 1 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func007Func004C takes nothing returns boolean
if ( not ( udg_RandNumCp == 2 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func007Func005C takes nothing returns boolean
if ( not ( udg_RandNumCp == 3 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func007Func006C takes nothing returns boolean
if ( not ( udg_RandNumCp == 4 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func007Func007C takes nothing returns boolean
if ( not ( udg_RandNumCp == 5 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func007Func008C takes nothing returns boolean
if ( not ( udg_RandNumCp == 6 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func007C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_CreepRegion5)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func008Func003C takes nothing returns boolean
if ( not ( udg_RandNumCp == 1 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func008Func004C takes nothing returns boolean
if ( not ( udg_RandNumCp == 2 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func008Func005C takes nothing returns boolean
if ( not ( udg_RandNumCp == 3 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func008Func006C takes nothing returns boolean
if ( not ( udg_RandNumCp == 4 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func008Func007C takes nothing returns boolean
if ( not ( udg_RandNumCp == 5 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func008Func008C takes nothing returns boolean
if ( not ( udg_RandNumCp == 6 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func008C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_CreepRegion6)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func009C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_CreepRegion9)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func010C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_CreepRegion10)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Actions takes nothing returns nothing
if ( Trig_CreepSpawn_Func001C() ) then
set udg_RandNumCp = GetRandomInt(1, 3)
if ( Trig_CreepSpawn_Func001Func003C() ) then
call CreateNUnitsAtLoc( 2, 'nbdo', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion1), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nbds', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion1), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func001Func004C() ) then
call CreateNUnitsAtLoc( 2, 'ngst', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion1), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nggr', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion1), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func001Func005C() ) then
call CreateNUnitsAtLoc( 2, 'nbdk', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion1), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nbwm', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion1), bj_UNIT_FACING )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func002C() ) then
set udg_RandNumCp = GetRandomInt(1, 3)
if ( Trig_CreepSpawn_Func002Func003C() ) then
call CreateNUnitsAtLoc( 2, 'nbdo', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion8), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nbds', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion8), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func002Func004C() ) then
call CreateNUnitsAtLoc( 2, 'ngst', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion8), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nggr', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion8), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func002Func005C() ) then
call CreateNUnitsAtLoc( 2, 'nbdk', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion8), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nbwm', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion8), bj_UNIT_FACING )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func003C() ) then
set udg_RandNumCp = GetRandomInt(1, 3)
if ( Trig_CreepSpawn_Func003Func003C() ) then
call CreateNUnitsAtLoc( 2, 'nogm', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_Creep_region_2), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nomg', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_Creep_region_2), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func003Func004C() ) then
call CreateNUnitsAtLoc( 1, 'nfpc', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_Creep_region_2), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nfpu', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_Creep_region_2), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func003Func005C() ) then
call CreateNUnitsAtLoc( 1, 'nsth', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_Creep_region_2), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nstl', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_Creep_region_2), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nsat', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_Creep_region_2), bj_UNIT_FACING )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func004C() ) then
set udg_RandNumCp = GetRandomInt(1, 3)
if ( Trig_CreepSpawn_Func004Func003C() ) then
call CreateNUnitsAtLoc( 2, 'nogm', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion7), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nomg', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion7), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func004Func004C() ) then
call CreateNUnitsAtLoc( 1, 'nfpc', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion7), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nfpu', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion7), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func004Func005C() ) then
call CreateNUnitsAtLoc( 1, 'nsth', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion7), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nstl', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion7), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nsat', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion7), bj_UNIT_FACING )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func005C() ) then
set udg_RandNumCp = GetRandomInt(1, 6)
if ( Trig_CreepSpawn_Func005Func003C() ) then
call CreateNUnitsAtLoc( 3, 'nwlg', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func005Func004C() ) then
call CreateNUnitsAtLoc( 2, 'nstl', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 2, 'nsat', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func005Func005C() ) then
call CreateNUnitsAtLoc( 2, 'ngst', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func005Func006C() ) then
call CreateNUnitsAtLoc( 1, 'nkol', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 3, 'nkob', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nkot', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func005Func007C() ) then
call CreateNUnitsAtLoc( 2, 'nftb', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nfsh', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func005Func008C() ) then
call CreateNUnitsAtLoc( 1, 'ncnk', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncen', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func006C() ) then
set udg_RandNumCp = GetRandomInt(1, 6)
if ( Trig_CreepSpawn_Func006Func003C() ) then
call CreateNUnitsAtLoc( 3, 'nwlg', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func006Func004C() ) then
call CreateNUnitsAtLoc( 2, 'nstl', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 2, 'nsat', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func006Func005C() ) then
call CreateNUnitsAtLoc( 2, 'ngst', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func006Func006C() ) then
call CreateNUnitsAtLoc( 1, 'nkol', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 3, 'nkob', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nkot', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func006Func007C() ) then
call CreateNUnitsAtLoc( 2, 'nftb', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nfsh', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func006Func008C() ) then
call CreateNUnitsAtLoc( 1, 'ncnk', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncen', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func007C() ) then
set udg_RandNumCp = GetRandomInt(1, 6)
if ( Trig_CreepSpawn_Func007Func003C() ) then
call CreateNUnitsAtLoc( 3, 'nwlg', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func007Func004C() ) then
call CreateNUnitsAtLoc( 2, 'nstl', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 2, 'nsat', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func007Func005C() ) then
call CreateNUnitsAtLoc( 2, 'ngst', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func007Func006C() ) then
call CreateNUnitsAtLoc( 1, 'nkol', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 3, 'nkob', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nkot', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func007Func007C() ) then
call CreateNUnitsAtLoc( 2, 'nftb', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nfsh', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func007Func008C() ) then
call CreateNUnitsAtLoc( 1, 'ncnk', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncen', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func008C() ) then
set udg_RandNumCp = GetRandomInt(1, 6)
if ( Trig_CreepSpawn_Func008Func003C() ) then
call CreateNUnitsAtLoc( 3, 'nwlg', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func008Func004C() ) then
call CreateNUnitsAtLoc( 2, 'nstl', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 2, 'nsat', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func008Func005C() ) then
call CreateNUnitsAtLoc( 2, 'ngst', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func008Func006C() ) then
call CreateNUnitsAtLoc( 1, 'nkol', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 3, 'nkob', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nkot', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func008Func007C() ) then
call CreateNUnitsAtLoc( 2, 'nftb', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nfsh', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func008Func008C() ) then
call CreateNUnitsAtLoc( 1, 'ncnk', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncen', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func009C() ) then
call CreateNUnitsAtLoc( 3, 'ngns', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion9), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func010C() ) then
call CreateNUnitsAtLoc( 3, 'nftt', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion10), bj_UNIT_FACING )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_CreepSpawn takes nothing returns nothing
set gg_trg_CreepSpawn = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_CreepSpawn, 90.00 )
call TriggerAddAction( gg_trg_CreepSpawn, function Trig_CreepSpawn_Actions )
endfunction
//===========================================================================
// Trigger: Spawn
//===========================================================================
function Trig_Spawn_Conditions takes nothing returns boolean
if ( not ( udg_OneMin == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func002Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[3] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func002C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[3] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func004Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[2] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func004C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[2] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func006Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[1] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func006C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[1] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func008Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[4] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func008C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[4] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func010Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[5] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func010C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[5] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func012Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[6] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func012C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[6] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func014Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[7] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func014C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[7] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func016Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[8] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func016C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[8] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func018Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[9] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func018C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[9] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func020Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[10] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func020C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[10] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func022Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[11] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func022C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[11] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func024Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[12] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func024C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[12] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
if ( Trig_Spawn_Func002C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'u001', Player(6), GetRectCenter(gg_rct_Crypt_S), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func002Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'ugho', Player(6), GetRectCenter(gg_rct_Crypt_S), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00A_0006) )
if ( Trig_Spawn_Func004C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'u001', Player(6), GetRectCenter(gg_rct_Crypt_SW), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func004Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'ugho', Player(6), GetRectCenter(gg_rct_Crypt_SW), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00B_0005) )
if ( Trig_Spawn_Func006C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'u001', Player(6), GetRectCenter(gg_rct_Crypt_W), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func006Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'ugho', Player(6), GetRectCenter(gg_rct_Crypt_W), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00D_0004) )
if ( Trig_Spawn_Func008C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'u002', Player(6), GetRectCenter(gg_rct_Temple_W), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func008Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'unec', Player(6), GetRectCenter(gg_rct_Temple_W), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00D_0004) )
if ( Trig_Spawn_Func010C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'u002', Player(6), GetRectCenter(gg_rct_Temple_SW), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func010Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'unec', Player(6), GetRectCenter(gg_rct_Temple_SW), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00B_0005) )
if ( Trig_Spawn_Func012C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'u002', Player(6), GetRectCenter(gg_rct_Temple_S), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func012Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'unec', Player(6), GetRectCenter(gg_rct_Temple_S), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00A_0006) )
if ( Trig_Spawn_Func014C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'e00V', Player(0), GetRectCenter(gg_rct_War_N), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func014Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'esen', Player(0), GetRectCenter(gg_rct_War_N), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00D_0004) )
if ( Trig_Spawn_Func016C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'e00V', Player(0), GetRectCenter(gg_rct_War_NE), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func016Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'esen', Player(0), GetRectCenter(gg_rct_War_NE), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00B_0005) )
if ( Trig_Spawn_Func018C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'e00V', Player(0), GetRectCenter(gg_rct_War_E), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func018Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'esen', Player(0), GetRectCenter(gg_rct_War_E), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00A_0006) )
if ( Trig_Spawn_Func020C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'e00W', Player(0), GetRectCenter(gg_rct_Lore_N), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func020Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'edry', Player(0), GetRectCenter(gg_rct_Lore_N), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00D_0004) )
if ( Trig_Spawn_Func022C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'e00W', Player(0), GetRectCenter(gg_rct_Lore_NE), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func022Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'edry', Player(0), GetRectCenter(gg_rct_Lore_NE), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00B_0005) )
if ( Trig_Spawn_Func024C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'e00W', Player(0), GetRectCenter(gg_rct_Lore_E), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func024Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'edry', Player(0), GetRectCenter(gg_rct_Lore_E), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00A_0006) )
endfunction
//===========================================================================
function InitTrig_Spawn takes nothing returns nothing
set gg_trg_Spawn = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Spawn, 30.00 )
call TriggerAddCondition( gg_trg_Spawn, Condition( function Trig_Spawn_Conditions ) )
call TriggerAddAction( gg_trg_Spawn, function Trig_Spawn_Actions )
endfunction
//===========================================================================
// Trigger: SpawnGolemFish
//===========================================================================
function Trig_SpawnGolemFish_Func001C takes nothing returns boolean
if ( ( udg_SpawnBadAss[1] == true ) ) then
return true
endif
if ( ( udg_SpawnBadAss[2] == true ) ) then
return true
endif
if ( ( udg_SpawnBadAss[3] == true ) ) then
return true
endif
if ( ( udg_SpawnBadAss[4] == true ) ) then
return true
endif
return false
endfunction
function Trig_SpawnGolemFish_Conditions takes nothing returns boolean
if ( not Trig_SpawnGolemFish_Func001C() ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func003C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[1] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 2 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func004C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[1] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 3 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func005C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[1] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 4 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func006C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[2] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 5 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func007C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[2] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 6 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func008C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[2] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 7 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func009C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[3] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 8 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func010C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[3] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 9 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func011C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[3] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 10 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func012C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[4] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 11 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func013C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[4] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 12 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func014C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[4] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 13 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Actions takes nothing returns nothing
set udg_CreepRand = GetRandomInt(1, 30)
if ( Trig_SpawnGolemFish_Func003C() ) then
set udg_SpawnBadAss[1] = false
call CreateNUnitsAtLoc( 1, 'n00F', Player(0), GetRectCenter(gg_rct_Lore_E), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8852" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func004C() ) then
set udg_SpawnBadAss[1] = false
call CreateNUnitsAtLoc( 1, 'n00F', Player(0), GetRectCenter(gg_rct_Lore_N), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8853" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func005C() ) then
set udg_SpawnBadAss[1] = false
call CreateNUnitsAtLoc( 1, 'n00F', Player(0), GetRectCenter(gg_rct_Lore_NE), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8854" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func006C() ) then
set udg_SpawnBadAss[2] = false
call CreateNUnitsAtLoc( 1, 'n00F', Player(6), GetRectCenter(gg_rct_Temple_S), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8855" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func007C() ) then
set udg_SpawnBadAss[2] = false
call CreateNUnitsAtLoc( 1, 'n00F', Player(6), GetRectCenter(gg_rct_Temple_W), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8856" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func008C() ) then
set udg_SpawnBadAss[2] = false
call CreateNUnitsAtLoc( 1, 'n00F', Player(6), GetRectCenter(gg_rct_Temple_SW), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8857" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func009C() ) then
set udg_SpawnBadAss[3] = false
call CreateNUnitsAtLoc( 1, 'n00E', Player(0), GetRectCenter(gg_rct_Lore_E), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8858" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func010C() ) then
set udg_SpawnBadAss[3] = false
call CreateNUnitsAtLoc( 1, 'n00E', Player(0), GetRectCenter(gg_rct_Lore_N), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8859" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func011C() ) then
set udg_SpawnBadAss[3] = false
call CreateNUnitsAtLoc( 1, 'n00E', Player(0), GetRectCenter(gg_rct_Lore_NE), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8860" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func012C() ) then
set udg_SpawnBadAss[4] = false
call CreateNUnitsAtLoc( 1, 'n00E', Player(6), GetRectCenter(gg_rct_Temple_S), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8861" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func013C() ) then
set udg_SpawnBadAss[4] = false
call CreateNUnitsAtLoc( 1, 'n00E', Player(6), GetRectCenter(gg_rct_Temple_W), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8862" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func014C() ) then
set udg_SpawnBadAss[4] = false
call CreateNUnitsAtLoc( 1, 'n00E', Player(6), GetRectCenter(gg_rct_Temple_SW), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8863" )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_SpawnGolemFish takes nothing returns nothing
set gg_trg_SpawnGolemFish = CreateTrigger( )
call DisableTrigger( gg_trg_SpawnGolemFish )
call TriggerRegisterTimerEventPeriodic( gg_trg_SpawnGolemFish, 30.00 )
call TriggerAddCondition( gg_trg_SpawnGolemFish, Condition( function Trig_SpawnGolemFish_Conditions ) )
call TriggerAddAction( gg_trg_SpawnGolemFish, function Trig_SpawnGolemFish_Actions )
endfunction
//===========================================================================
// Trigger: SpawnHydra
//===========================================================================
function Trig_SpawnHydra_Func001C takes nothing returns boolean
if ( ( udg_SpawnBadAss[5] == true ) ) then
return true
endif
if ( ( udg_SpawnBadAss[6] == true ) ) then
return true
endif
return false
endfunction
function Trig_SpawnHydra_Conditions takes nothing returns boolean
if ( not Trig_SpawnHydra_Func001C() ) then
return false
endif
return true
endfunction
function Trig_SpawnHydra_Func003C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[5] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 2 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnHydra_Func004C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[5] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 3 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnHydra_Func005C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[5] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 4 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnHydra_Func006C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[6] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 5 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnHydra_Func007C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[6] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 6 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnHydra_Func008C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[6] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 7 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnHydra_Actions takes nothing returns nothing
set udg_CreepRand = GetRandomInt(1, 60)
if ( Trig_SpawnHydra_Func003C() ) then
call CreateNUnitsAtLoc( 1, 'n00D', Player(0), GetRectCenter(gg_rct_Lore_E), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8864" )
else
call DoNothing( )
endif
if ( Trig_SpawnHydra_Func004C() ) then
call CreateNUnitsAtLoc( 1, 'n00D', Player(0), GetRectCenter(gg_rct_Lore_N), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8865" )
else
call DoNothing( )
endif
if ( Trig_SpawnHydra_Func005C() ) then
call CreateNUnitsAtLoc( 1, 'n00D', Player(0), GetRectCenter(gg_rct_Lore_NE), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8866" )
else
call DoNothing( )
endif
if ( Trig_SpawnHydra_Func006C() ) then
call CreateNUnitsAtLoc( 1, 'n00D', Player(6), GetRectCenter(gg_rct_Temple_S), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8867" )
else
call DoNothing( )
endif
if ( Trig_SpawnHydra_Func007C() ) then
call CreateNUnitsAtLoc( 1, 'n00D', Player(6), GetRectCenter(gg_rct_Temple_W), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8868" )
else
call DoNothing( )
endif
if ( Trig_SpawnHydra_Func008C() ) then
call CreateNUnitsAtLoc( 1, 'n00D', Player(6), GetRectCenter(gg_rct_Temple_SW), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8869" )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_SpawnHydra takes nothing returns nothing
set gg_trg_SpawnHydra = CreateTrigger( )
call DisableTrigger( gg_trg_SpawnHydra )
call TriggerRegisterTimerEventPeriodic( gg_trg_SpawnHydra, 30.00 )
call TriggerAddCondition( gg_trg_SpawnHydra, Condition( function Trig_SpawnHydra_Conditions ) )
call TriggerAddAction( gg_trg_SpawnHydra, function Trig_SpawnHydra_Actions )
endfunction
//===========================================================================
// Trigger: Consumable charge
//===========================================================================
function Trig_Consumable_charge_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetItemType(GetManipulatedItem()) == ITEM_TYPE_PURCHASABLE ) ) then
return false
endif
return true
endfunction
function Trig_Consumable_charge_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
set udg_Consumable = GetLastRemovedItem()
call UnitRemoveItemSwapped( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), GetItemTypeId(GetManipulatedItem())), GetManipulatingUnit() )
call SetItemCharges( udg_Consumable, ( GetItemCharges(GetLastRemovedItem()) + GetItemCharges(udg_Consumable) ) )
call UnitAddItemSwapped( udg_Consumable, GetTriggerUnit() )
call RemoveItem( GetLastRemovedItem() )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Consumable_charge takes nothing returns nothing
set gg_trg_Consumable_charge = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Consumable_charge, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Consumable_charge, Condition( function Trig_Consumable_charge_Conditions ) )
call TriggerAddAction( gg_trg_Consumable_charge, function Trig_Consumable_charge_Actions )
endfunction
//===========================================================================
// Trigger: Aghanims Scepter
//===========================================================================
function Trig_Aghanims_Scepter_Func006C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Hjai' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00V' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Emns' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'UC18' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00H' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Orkn' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H004' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Ekee' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Ulic' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Hmbr' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'UC01' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'EC57' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Hmkg' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Hblm' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'U00E' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'E005' ) ) then
return true
endif
return false
endfunction
function Trig_Aghanims_Scepter_Conditions takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ram2') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'oslo') == true ) ) then
return false
endif
if ( not Trig_Aghanims_Scepter_Func006C() ) then
return false
endif
return true
endfunction
function Trig_Aghanims_Scepter_Func007Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Ulic' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00V' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Ekee' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'UC18' ) ) then
return true
endif
return false
endfunction
function Trig_Aghanims_Scepter_Func007C takes nothing returns boolean
if ( not Trig_Aghanims_Scepter_Func007Func001C() ) then
return false
endif
return true
endfunction
function Trig_Aghanims_Scepter_Func008Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00H' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Emns' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H004' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Hmbr' ) ) then
return true
endif
return false
endfunction
function Trig_Aghanims_Scepter_Func008C takes nothing returns boolean
if ( not Trig_Aghanims_Scepter_Func008Func001C() ) then
return false
endif
return true
endfunction
function Trig_Aghanims_Scepter_Func009Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Hjai' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Orkn' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'UC01' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'EC57' ) ) then
return true
endif
return false
endfunction
function Trig_Aghanims_Scepter_Func009C takes nothing returns boolean
if ( not Trig_Aghanims_Scepter_Func009Func001C() ) then
return false
endif
return true
endfunction
function Trig_Aghanims_Scepter_Func010Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Hblm' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'U00E' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'E005' ) ) then
return true
endif
return false
endfunction
function Trig_Aghanims_Scepter_Func010C takes nothing returns boolean
if ( not Trig_Aghanims_Scepter_Func010Func001C() ) then
return false
endif
return true
endfunction
function Trig_Aghanims_Scepter_Func011Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Hmkg' ) ) then
return true
endif
return false
endfunction
function Trig_Aghanims_Scepter_Func011C takes nothing returns boolean
if ( not Trig_Aghanims_Scepter_Func011Func001C() ) then
return false
endif
return true
endfunction
function Trig_Aghanims_Scepter_Actions takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ram2') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'oslo') )
if ( Trig_Aghanims_Scepter_Func007C() ) then
call UnitAddItemByIdSwapped( 'sor3', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_Aghanims_Scepter_Func008C() ) then
call UnitAddItemByIdSwapped( 'sor4', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_Aghanims_Scepter_Func009C() ) then
call UnitAddItemByIdSwapped( 'sor5', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_Aghanims_Scepter_Func010C() ) then
call UnitAddItemByIdSwapped( 'sor6', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_Aghanims_Scepter_Func011C() ) then
call UnitAddItemByIdSwapped( 'sor6', GetTriggerUnit() )
set udg_MCLvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_MCLvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Aghanims_Scepter takes nothing returns nothing
set gg_trg_Aghanims_Scepter = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Aghanims_Scepter, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Aghanims_Scepter, Condition( function Trig_Aghanims_Scepter_Conditions ) )
call TriggerAddAction( gg_trg_Aghanims_Scepter, function Trig_Aghanims_Scepter_Actions )
endfunction
//===========================================================================
// Trigger: ItemSimple
//===========================================================================
function Trig_ItemSimple_Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rots') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'mcri') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rump') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'stwa') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tbar') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rsps') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func003C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'shdt') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tbar') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'srrc') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func004C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ratf') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sor1') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ram3') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'vddl') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func005C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rump') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'oli2') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rwiz') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func006C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'srbd') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'whwd') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'fgrg') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func007C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tmsc') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sksh') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'spsh') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func008C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tgxp') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tmmt') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sand') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func009C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ram1') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rde0') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'wcyc') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func010C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'whwd') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'srtl') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'penr') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func011C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'srtl') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'lure') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rreb') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func012C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'flag') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'stwa') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rre1') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func013C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'soul') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rej2') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'lhst') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func015C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rst1') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tgxp') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'stre') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func016C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tbar') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sbok') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'lgdh') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func017C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'whwd') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ciri') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'shhn') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func018C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'shrs') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sora') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'srtl') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func019C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'bgst') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tbsm') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'mcou') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func020C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rdis') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tmmt') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ciri') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func021C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'modt') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'shhn') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func022C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tmmt') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sora') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rlif') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func023C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'scul') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'jdrn') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sbch') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func024C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ratf') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'flag') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sora') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func025C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rhe2') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sor2') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tmsc') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func026C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'shcw') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rej6') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func027C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'shcw') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'shtm') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ciri') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func028C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'jdrn') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'prvt') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func029C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'pgin') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'hbth') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'oli2') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func030C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'soul') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ratf') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'clfm') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func031C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sksh') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sor2') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'texp') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func032C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'shrs') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'crys') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func033C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'shtm') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tmsc') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rma2') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func034C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rej5') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rma2') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func035C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'lnrn') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rma2') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func036C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'mlst') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rma2') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func037C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'mnsf') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rma2') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func038C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tgxp') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rspl') == true ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) != 'Obla' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func039C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tbar') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tkno') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'stel') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func040C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tdex') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tbsm') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tmsc') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func041C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'pgma') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'stre') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func042C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'pclr') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sor1') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rej4') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'pgin') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func043C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'infs') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tfar') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sor9') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'gsou') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'gvsm') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func044C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'pinv') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ram3') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ciri') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Actions takes nothing returns nothing
if ( Trig_ItemSimple_Func001C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rots') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rump') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'mcri') )
call UnitAddItemByIdSwapped( 'bfhr', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func002C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'stwa') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tbar') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rsps') )
call UnitAddItemByIdSwapped( 'tfar', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func003C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shdt') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tbar') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'srrc') )
call UnitAddItemByIdSwapped( 'sor9', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func004C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ratf') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sor1') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ram3') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'vddl') )
call UnitAddItemByIdSwapped( 'olig', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func005C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rump') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'oli2') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rwiz') )
call UnitAddItemByIdSwapped( 'kgal', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func006C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'srbd') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'whwd') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'fgrg') )
call UnitAddItemByIdSwapped( 'rde4', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func007C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tmsc') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sksh') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'spsh') )
call UnitAddItemByIdSwapped( 'ram1', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func008C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tgxp') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tmmt') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sand') )
call UnitAddItemByIdSwapped( 'rde0', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func009C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ram1') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rde0') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'wcyc') )
call UnitAddItemByIdSwapped( 'rnsp', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func010C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'whwd') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'srtl') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'penr') )
call UnitAddItemByIdSwapped( 'rugt', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func011C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'srtl') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'lure') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rreb') )
call UnitAddItemByIdSwapped( 'ofir', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func012C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'flag') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'stwa') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rre1') )
call UnitAddItemByIdSwapped( 'ocor', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func013C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'soul') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rej2') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'lhst') )
call UnitAddItemByIdSwapped( 'spre', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func015C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rst1') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tgxp') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'stre') )
call UnitAddItemByIdSwapped( 'hlst', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func016C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tbar') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'lgdh') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sbok') )
call UnitAddItemByIdSwapped( 'gsou', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func017C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'whwd') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ciri') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shhn') )
call UnitAddItemByIdSwapped( 'soul', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func018C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'srtl') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shrs') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sora') )
call UnitAddItemByIdSwapped( 'pspd', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func019C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'bgst') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tbsm') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'mcou') )
call UnitAddItemByIdSwapped( 'sfog', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func020C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rdis') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tmmt') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ciri') )
call UnitAddItemByIdSwapped( 'wswd', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func021C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'modt') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shhn') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ratc') )
call UnitAddItemByIdSwapped( 'grsl', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func022C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tmmt') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sora') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rlif') )
call UnitAddItemByIdSwapped( 'ccmd', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func023C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'scul') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'jdrn') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sbch') )
call UnitAddItemByIdSwapped( 'rots', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func024C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ratf') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'flag') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sora') )
call UnitAddItemByIdSwapped( 'gldo', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func025C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rhe2') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sor2') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tmsc') )
call UnitAddItemByIdSwapped( 'lure', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func026C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shcw') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rej6') )
call UnitAddItemByIdSwapped( 'ratf', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func027C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shcw') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shtm') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ciri') )
call UnitAddItemByIdSwapped( 'rej2', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func028C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'jdrn') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'prvt') )
call UnitAddItemByIdSwapped( 'horl', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func029C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'pgin') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'hbth') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'oli2') )
call UnitAddItemByIdSwapped( 'oslo', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func030C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'soul') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ratf') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'clfm') )
call UnitAddItemByIdSwapped( 'oven', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func031C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sksh') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sor2') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'texp') )
call UnitAddItemByIdSwapped( 'ofro', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func032C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shrs') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'crys') )
call UnitAddItemByIdSwapped( 'ram4', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func033C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shtm') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tmsc') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rma2') )
call UnitAddItemByIdSwapped( 'rej5', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func034C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rej5') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rma2') )
call UnitAddItemByIdSwapped( 'lnrn', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func035C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'lnrn') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rma2') )
call UnitAddItemByIdSwapped( 'mlst', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func036C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'mlst') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rma2') )
call UnitAddItemByIdSwapped( 'mnsf', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func037C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'mnsf') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rma2') )
call UnitAddItemByIdSwapped( 'rej1', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func038C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tgxp') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rspl') )
call UnitAddItemByIdSwapped( 'tlum', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func039C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tbar') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tkno') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'stel') )
call UnitAddItemByIdSwapped( 'klmm', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func040C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tbsm') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tmsc') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tdex') )
call UnitAddItemByIdSwapped( 'rat6', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func041C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'pgma') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'stre') )
call UnitAddItemByIdSwapped( 'pdiv', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func042C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'pclr') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sor1') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rej4') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'pgin') )
call UnitAddItemByIdSwapped( 'kybl', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func043C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'infs') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tfar') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'gsou') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sor9') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'gvsm') )
call UnitAddItemByIdSwapped( 'mnst', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func044C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'pinv') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ram3') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ciri') )
call UnitAddItemByIdSwapped( 'rnec', GetTriggerUnit() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_ItemSimple takes nothing returns nothing
set gg_trg_ItemSimple = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ItemSimple, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_ItemSimple, function Trig_ItemSimple_Actions )
endfunction
//===========================================================================
// Trigger: ItemSwap
//===========================================================================
function Trig_ItemSwap_Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tsct' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tst2' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func003C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tpow' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func004C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tint' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func005C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tdx2' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func006C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rwat' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func007C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rspd' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func008C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rres' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func009C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rman' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func010C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rhe1' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func011C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rre2' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func012C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rhe3' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func013C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'manh' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func014C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'guvi' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func015C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'gfor' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func016C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'lmbr' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func017C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'evtl' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func018C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'ssil' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func019C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rag1' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func020C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'brac' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func021C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rde3' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func022C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rde1' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func023C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'pmna' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func024C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'odef' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func025C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rin1' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func026C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'kpin' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func027C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'hcun' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func028C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'gcel' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func029C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'dsum' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func030C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'clsd' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func031C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rat9' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func032C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'cnob' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func033C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'ajen' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func034C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'afac' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func035C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'wlsd' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func036C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'woms' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func037C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'totw' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func038C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'fgfh' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func039C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'sres' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func040C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rej3' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func041C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'pghe' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func042C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'shar' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func043C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'hslv' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func044C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'moon' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Actions takes nothing returns nothing
if ( Trig_ItemSwap_Func001C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tsct') )
call UnitAddItemByIdSwapped( 'mcri', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func002C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tst2') )
call UnitAddItemByIdSwapped( 'vddl', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func003C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tpow') )
call UnitAddItemByIdSwapped( 'tstr', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func004C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tint') )
call UnitAddItemByIdSwapped( 'tin2', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func005C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tdx2') )
call UnitAddItemByIdSwapped( 'texp', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func006C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rwat') )
call UnitAddItemByIdSwapped( 'tdex', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func007C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rspd') )
call UnitAddItemByIdSwapped( 'rspl', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func008C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rres') )
call UnitAddItemByIdSwapped( 'rsps', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func009C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rman') )
call UnitAddItemByIdSwapped( 'rreb', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func010C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rhe1') )
call UnitAddItemByIdSwapped( 'rre1', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func011C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rre2') )
call UnitAddItemByIdSwapped( 'rhe2', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func012C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rhe3') )
call UnitAddItemByIdSwapped( 'rma2', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func013C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'manh') )
call UnitAddItemByIdSwapped( 'rdis', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func014C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'guvi') )
call UnitAddItemByIdSwapped( 'gold', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func015C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'gfor') )
call UnitAddItemByIdSwapped( 'gomn', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func016C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'lmbr') )
call UnitAddItemByIdSwapped( 'ward', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func017C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'evtl') )
call UnitAddItemByIdSwapped( 'lhst', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func018C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ssil') )
call UnitAddItemByIdSwapped( 'stel', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func019C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rag1') )
call UnitAddItemByIdSwapped( 'rwiz', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func020C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'brac') )
call UnitAddItemByIdSwapped( 'sbch', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func021C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rde3') )
call UnitAddItemByIdSwapped( 'rlif', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func022C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rde1') )
call UnitAddItemByIdSwapped( 'rde2', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func023C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'pmna') )
call UnitAddItemByIdSwapped( 'prvt', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func024C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'odef') )
call UnitAddItemByIdSwapped( 'penr', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func025C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rin1') )
call UnitAddItemByIdSwapped( 'mcou', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func026C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'kpin') )
call UnitAddItemByIdSwapped( 'lgdh', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func027C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'hcun') )
call UnitAddItemByIdSwapped( 'rhth', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func028C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'gcel') )
call UnitAddItemByIdSwapped( 'hval', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func029C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'dsum') )
call UnitAddItemByIdSwapped( 'rst1', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func030C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'clsd') )
call UnitAddItemByIdSwapped( 'crys', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func031C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rat9') )
call UnitAddItemByIdSwapped( 'clfm', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func032C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'cnob') )
call UnitAddItemByIdSwapped( 'ratc', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func033C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ajen') )
call UnitAddItemByIdSwapped( 'bspd', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func034C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'afac') )
call UnitAddItemByIdSwapped( 'spsh', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func035C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'wlsd') )
call UnitAddItemByIdSwapped( 'wcyc', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func036C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'woms') )
call UnitAddItemByIdSwapped( 'wshs', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func037C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'totw') )
call UnitAddItemByIdSwapped( 'will', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func038C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'fgfh') )
call UnitAddItemByIdSwapped( 'fgrg', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func039C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sres') )
call UnitAddItemByIdSwapped( 'srrc', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func040C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rej3') )
call UnitAddItemByIdSwapped( 'sand', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func041C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'pghe') )
call UnitAddItemByIdSwapped( 'pgma', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func042C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shar') )
call UnitAddItemByIdSwapped( 'infs', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func043C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'hslv') )
call UnitAddItemByIdSwapped( 'pclr', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func044C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'moon') )
call UnitAddItemByIdSwapped( 'pinv', GetTriggerUnit() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_ItemSwap takes nothing returns nothing
set gg_trg_ItemSwap = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ItemSwap, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_ItemSwap, function Trig_ItemSwap_Actions )
endfunction
//===========================================================================
// Trigger: ItemComplex
//===========================================================================
function Trig_ItemComplex_Func003Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexA())) == 'flag' ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func004Func004Func001C takes nothing returns boolean
if ( not ( udg_HR < 2 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexB())) == 'flag' ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func004C takes nothing returns boolean
if ( not ( udg_HO > 1 ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'will') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func007Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexA())) == 'gvsm' ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func008Func005Func001C takes nothing returns boolean
if ( not ( udg_ItemR < 2 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexB())) == 'gvsm' ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func008C takes nothing returns boolean
if ( not ( udg_ItemO > 1 ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'hbth') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ward') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func011Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexA())) == 'belv' ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func012Func005Func001C takes nothing returns boolean
if ( not ( udg_ItemR < 2 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexB())) == 'belv' ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func012C takes nothing returns boolean
if ( not ( udg_ItemO > 1 ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rde2') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ram2') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func015Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexA())) == 'shtm' ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func016Func005Func001C takes nothing returns boolean
if ( not ( udg_ItemR < 2 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexB())) == 'shtm' ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func016C takes nothing returns boolean
if ( not ( udg_ItemO > 1 ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'bspd') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'scul') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Actions takes nothing returns nothing
set udg_HO = 0
set udg_HR = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ItemComplex_Func003Func001C() ) then
set udg_HO = ( udg_HO + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_ItemComplex_Func004C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'will') )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 6
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_ItemComplex_Func004Func004Func001C() ) then
set udg_HR = ( udg_HR + 1 )
call RemoveItem( UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexB()) )
else
call DoNothing( )
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call UnitAddItemByIdSwapped( 'tels', GetTriggerUnit() )
else
call DoNothing( )
endif
set udg_ItemO = 0
set udg_ItemR = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ItemComplex_Func007Func001C() ) then
set udg_ItemO = ( udg_ItemO + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_ItemComplex_Func008C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'hbth') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ward') )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 6
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_ItemComplex_Func008Func005Func001C() ) then
set udg_ItemR = ( udg_ItemR + 1 )
call RemoveItem( UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexB()) )
else
call DoNothing( )
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call UnitAddItemByIdSwapped( 'thdm', GetTriggerUnit() )
else
call DoNothing( )
endif
set udg_ItemO = 0
set udg_ItemR = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ItemComplex_Func011Func001C() ) then
set udg_ItemO = ( udg_ItemO + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_ItemComplex_Func012C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ram2') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rde2') )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 6
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_ItemComplex_Func012Func005Func001C() ) then
set udg_ItemR = ( udg_ItemR + 1 )
call RemoveItem( UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexB()) )
else
call DoNothing( )
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call UnitAddItemByIdSwapped( 'schl', GetTriggerUnit() )
else
call DoNothing( )
endif
set udg_ItemO = 0
set udg_ItemR = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ItemComplex_Func015Func001C() ) then
set udg_ItemO = ( udg_ItemO + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_ItemComplex_Func016C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'scul') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'bspd') )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 6
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_ItemComplex_Func016Func005Func001C() ) then
set udg_ItemR = ( udg_ItemR + 1 )
call RemoveItem( UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexB()) )
else
call DoNothing( )
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call UnitAddItemByIdSwapped( 'ches', GetTriggerUnit() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_ItemComplex takes nothing returns nothing
set gg_trg_ItemComplex = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ItemComplex, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_ItemComplex, function Trig_ItemComplex_Actions )
endfunction
//===========================================================================
// Trigger: forbidden items
//===========================================================================
function Trig_forbidden_items_Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rde0' ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rnsp') == true ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rnsp' ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rde0') == true ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func003Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Hvwd' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'U00F' ) ) then
return true
endif
return false
endfunction
function Trig_forbidden_items_Func003C takes nothing returns boolean
if ( not Trig_forbidden_items_Func003Func001C() ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'desc' ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func004C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'O00P' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'oven' ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func005Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'U00K' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'U00I' ) ) then
return true
endif
return false
endfunction
function Trig_forbidden_items_Func005C takes nothing returns boolean
if ( not Trig_forbidden_items_Func005Func001C() ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tels' ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func007Func001Func003C takes nothing returns boolean
if ( not ( udg_HO > 1 ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func007Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexA())) == 'oven' ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func008Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tbak' ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func008Func003C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'nspi' ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func008Func004C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'thdm' ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func008Func005C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'ocor' ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func008C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_MELEE_ATTACKER) == true ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Actions takes nothing returns nothing
if ( Trig_forbidden_items_Func001C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_forbidden_items_Func002C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_forbidden_items_Func003C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_forbidden_items_Func004C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_forbidden_items_Func005C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
call DoNothing( )
endif
set udg_HO = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_forbidden_items_Func007Func001C() ) then
set udg_HO = ( udg_HO + 1 )
if ( Trig_forbidden_items_Func007Func001Func003C() ) then
set udg_HO = ( udg_HO - 1 )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexA()), GetTriggerUnit() )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_forbidden_items_Func008C() ) then
if ( Trig_forbidden_items_Func008Func004C() ) then
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'tbak', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_forbidden_items_Func008Func005C() ) then
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'nspi', GetTriggerUnit() )
else
call DoNothing( )
endif
else
if ( Trig_forbidden_items_Func008Func002C() ) then
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'thdm', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_forbidden_items_Func008Func003C() ) then
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'ocor', GetTriggerUnit() )
else
call DoNothing( )
endif
endif
endfunction
//===========================================================================
function InitTrig_forbidden_items takes nothing returns nothing
set gg_trg_forbidden_items = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_forbidden_items, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_forbidden_items, function Trig_forbidden_items_Actions )
endfunction
//===========================================================================
// Trigger: upgrader
//===========================================================================
function Trig_upgrader_Actions takes nothing returns nothing
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
endfunction
//===========================================================================
function InitTrig_upgrader takes nothing returns nothing
set gg_trg_upgrader = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_upgrader, 450.00 )
call TriggerAddAction( gg_trg_upgrader, function Trig_upgrader_Actions )
endfunction
//===========================================================================
// Trigger: Leaderboard count
//===========================================================================
function Trig_Leaderboard_count_Func002001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'etrp' )
endfunction
function Trig_Leaderboard_count_Func002002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'e011' )
endfunction
function Trig_Leaderboard_count_Conditions takes nothing returns boolean
if ( not GetBooleanOr( Trig_Leaderboard_count_Func002001(), Trig_Leaderboard_count_Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_Leaderboard_count_Actions takes nothing returns nothing
set udg_LBTow[1] = ( udg_LBTow[1] + 1 )
endfunction
//===========================================================================
function InitTrig_Leaderboard_count takes nothing returns nothing
set gg_trg_Leaderboard_count = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Leaderboard_count, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Leaderboard_count, Condition( function Trig_Leaderboard_count_Conditions ) )
call TriggerAddAction( gg_trg_Leaderboard_count, function Trig_Leaderboard_count_Actions )
endfunction
//===========================================================================
// Trigger: Leaderboard count 2
//===========================================================================
function Trig_Leaderboard_count_2_Func002001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'uzg1' )
endfunction
function Trig_Leaderboard_count_2_Func002002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'u00D' )
endfunction
function Trig_Leaderboard_count_2_Conditions takes nothing returns boolean
if ( not GetBooleanOr( Trig_Leaderboard_count_2_Func002001(), Trig_Leaderboard_count_2_Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_Leaderboard_count_2_Actions takes nothing returns nothing
set udg_LBTow[2] = ( udg_LBTow[2] + 1 )
endfunction
//===========================================================================
function InitTrig_Leaderboard_count_2 takes nothing returns nothing
set gg_trg_Leaderboard_count_2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Leaderboard_count_2, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Leaderboard_count_2, Condition( function Trig_Leaderboard_count_2_Conditions ) )
call TriggerAddAction( gg_trg_Leaderboard_count_2, function Trig_Leaderboard_count_2_Actions )
endfunction
//===========================================================================
// Trigger: Sent trees die
//===========================================================================
function Trig_Sent_trees_die_Func013001 takes nothing returns boolean
return ( GetUnitTypeId(GetDyingUnit()) == 'etrp' )
endfunction
function Trig_Sent_trees_die_Func013002 takes nothing returns boolean
return ( GetUnitTypeId(GetDyingUnit()) == 'e011' )
endfunction
function Trig_Sent_trees_die_Conditions takes nothing returns boolean
if ( not GetBooleanOr( Trig_Sent_trees_die_Func013001(), Trig_Sent_trees_die_Func013002() ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func001C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_etrp_0102 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func002C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_etrp_0103 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func003C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_etrp_0104 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func004C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_e011_0105 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func005C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_e011_0106 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func006C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_e011_0107 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func007C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_etrp_0042 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func008C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_etrp_0043 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func009C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_etrp_0044 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func010C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_e011_0041 ) ) then
return false
endif
if ( not ( IsUnitDeadBJ(gg_unit_e011_0040) == true ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func011C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_e011_0040 ) ) then
return false
endif
if ( not ( IsUnitDeadBJ(gg_unit_e011_0041) == true ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func012Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetDyingUnit()) == 'edob' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'edos' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'eaow' ) ) then
return true
endif
return false
endfunction
function Trig_Sent_trees_die_Func012C takes nothing returns boolean
if ( not Trig_Sent_trees_die_Func012Func001C() ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Actions takes nothing returns nothing
if ( Trig_Sent_trees_die_Func001C() ) then
call SetUnitInvulnerable( gg_unit_e011_0107, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func002C() ) then
call SetUnitInvulnerable( gg_unit_e011_0106, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func003C() ) then
call SetUnitInvulnerable( gg_unit_e011_0105, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func004C() ) then
call SetUnitInvulnerable( gg_unit_etrp_0044, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func005C() ) then
call SetUnitInvulnerable( gg_unit_etrp_0043, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func006C() ) then
call SetUnitInvulnerable( gg_unit_etrp_0042, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func007C() ) then
call SetUnitInvulnerable( gg_unit_eaom_0056, false )
call SetUnitInvulnerable( gg_unit_eaoe_0057, false )
call SetUnitInvulnerable( gg_unit_emow_0067, false )
call SetUnitInvulnerable( gg_unit_emow_0059, false )
call SetUnitInvulnerable( gg_unit_emow_0058, false )
call SetUnitInvulnerable( gg_unit_eaow_0068, false )
call SetUnitInvulnerable( gg_unit_etrp_0043, false )
call SetUnitInvulnerable( gg_unit_e011_0040, false )
call SetUnitInvulnerable( gg_unit_e011_0041, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func008C() ) then
call SetUnitInvulnerable( gg_unit_eaoe_0054, false )
call SetUnitInvulnerable( gg_unit_eaom_0055, false )
call SetUnitInvulnerable( gg_unit_emow_0061, false )
call SetUnitInvulnerable( gg_unit_emow_0060, false )
call SetUnitInvulnerable( gg_unit_edob_0069, false )
call SetUnitInvulnerable( gg_unit_emow_0063, false )
call SetUnitInvulnerable( gg_unit_e011_0040, false )
call SetUnitInvulnerable( gg_unit_e011_0041, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func009C() ) then
call SetUnitInvulnerable( gg_unit_eaom_0052, false )
call SetUnitInvulnerable( gg_unit_eaoe_0053, false )
call SetUnitInvulnerable( gg_unit_emow_0066, false )
call SetUnitInvulnerable( gg_unit_emow_0065, false )
call SetUnitInvulnerable( gg_unit_emow_0064, false )
call SetUnitInvulnerable( gg_unit_emow_0063, false )
call SetUnitInvulnerable( gg_unit_emow_0065, false )
call SetUnitInvulnerable( gg_unit_e011_0041, false )
call SetUnitInvulnerable( gg_unit_e011_0040, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func010C() ) then
call SetUnitInvulnerable( gg_unit_etol_0039, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func011C() ) then
call SetUnitInvulnerable( gg_unit_etol_0039, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func012C() ) then
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
endfunction
//===========================================================================
function InitTrig_Sent_trees_die takes nothing returns nothing
set gg_trg_Sent_trees_die = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Sent_trees_die, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Sent_trees_die, Condition( function Trig_Sent_trees_die_Conditions ) )
call TriggerAddAction( gg_trg_Sent_trees_die, function Trig_Sent_trees_die_Actions )
endfunction
//===========================================================================
// Trigger: UD stuff dies
//===========================================================================
function Trig_UD_stuff_dies_Func013001 takes nothing returns boolean
return ( GetUnitTypeId(GetDyingUnit()) == 'uzg1' )
endfunction
function Trig_UD_stuff_dies_Func013002 takes nothing returns boolean
return ( GetUnitTypeId(GetDyingUnit()) == 'u00D' )
endfunction
function Trig_UD_stuff_dies_Conditions takes nothing returns boolean
if ( not GetBooleanOr( Trig_UD_stuff_dies_Func013001(), Trig_UD_stuff_dies_Func013002() ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func001C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_uzg1_0096 ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func002C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_uzg1_0097 ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func003C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_uzg1_0098 ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func004C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_u00D_0099 ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func005C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_u00D_0100 ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func006C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_u00D_0101 ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func007C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_uzg1_0072 ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func008C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_uzg1_0071 ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func009C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_uzg1_0073 ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func010C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_u00D_0082 ) ) then
return false
endif
if ( not ( IsUnitDeadBJ(gg_unit_u00D_0081) == true ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func011C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_u00D_0081 ) ) then
return false
endif
if ( not ( IsUnitDeadBJ(gg_unit_u00D_0082) == true ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func012Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetDyingUnit()) == 'uslh' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'ugrv' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'usap' ) ) then
return true
endif
return false
endfunction
function Trig_UD_stuff_dies_Func012C takes nothing returns boolean
if ( not Trig_UD_stuff_dies_Func012Func001C() ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Actions takes nothing returns nothing
if ( Trig_UD_stuff_dies_Func001C() ) then
call SetUnitInvulnerable( gg_unit_u00D_0101, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func002C() ) then
call SetUnitInvulnerable( gg_unit_u00D_0100, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func003C() ) then
call SetUnitInvulnerable( gg_unit_u00D_0099, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func004C() ) then
call SetUnitInvulnerable( gg_unit_uzg1_0073, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func005C() ) then
call SetUnitInvulnerable( gg_unit_uzg1_0071, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func006C() ) then
call SetUnitInvulnerable( gg_unit_uzg1_0072, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func007C() ) then
call SetUnitInvulnerable( gg_unit_uzig_0092, false )
call SetUnitInvulnerable( gg_unit_utod_0077, false )
call SetUnitInvulnerable( gg_unit_usep_0076, false )
call SetUnitInvulnerable( gg_unit_uzig_0085, false )
call SetUnitInvulnerable( gg_unit_usap_0093, false )
call SetUnitInvulnerable( gg_unit_uzig_0086, false )
call SetUnitInvulnerable( gg_unit_u00D_0082, false )
call SetUnitInvulnerable( gg_unit_uzig_0084, false )
call SetUnitInvulnerable( gg_unit_uzig_0087, false )
call SetUnitInvulnerable( gg_unit_u00D_0081, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func008C() ) then
call SetUnitInvulnerable( gg_unit_uzig_0083, false )
call SetUnitInvulnerable( gg_unit_utod_0078, false )
call SetUnitInvulnerable( gg_unit_usep_0075, false )
call SetUnitInvulnerable( gg_unit_uslh_0095, false )
call SetUnitInvulnerable( gg_unit_uzig_0088, false )
call SetUnitInvulnerable( gg_unit_uzig_0087, false )
call SetUnitInvulnerable( gg_unit_uzig_0086, false )
call SetUnitInvulnerable( gg_unit_u00D_0081, false )
call SetUnitInvulnerable( gg_unit_u00D_0082, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func009C() ) then
call SetUnitInvulnerable( gg_unit_utod_0079, false )
call SetUnitInvulnerable( gg_unit_usep_0074, false )
call SetUnitInvulnerable( gg_unit_ugrv_0094, false )
call SetUnitInvulnerable( gg_unit_uzig_0089, false )
call SetUnitInvulnerable( gg_unit_uzig_0088, false )
call SetUnitInvulnerable( gg_unit_uzig_0090, false )
call SetUnitInvulnerable( gg_unit_uzig_0091, false )
call SetUnitInvulnerable( gg_unit_uzig_0118, false )
call SetUnitInvulnerable( gg_unit_u00D_0081, false )
call SetUnitInvulnerable( gg_unit_u00D_0082, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func010C() ) then
call SetUnitInvulnerable( gg_unit_unpl_0080, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func011C() ) then
call SetUnitInvulnerable( gg_unit_unpl_0080, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func012C() ) then
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
endfunction
//===========================================================================
function InitTrig_UD_stuff_dies takes nothing returns nothing
set gg_trg_UD_stuff_dies = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_UD_stuff_dies, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_UD_stuff_dies, Condition( function Trig_UD_stuff_dies_Conditions ) )
call TriggerAddAction( gg_trg_UD_stuff_dies, function Trig_UD_stuff_dies_Actions )
endfunction
//===========================================================================
// Trigger: UL crypt
//===========================================================================
function Trig_UL_crypt_Actions takes nothing returns nothing
set udg_SpawnMRLMR[7] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_UL_crypt takes nothing returns nothing
set gg_trg_UL_crypt = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_UL_crypt, gg_unit_usep_0076, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_UL_crypt, function Trig_UL_crypt_Actions )
endfunction
//===========================================================================
// Trigger: M crypt
//===========================================================================
function Trig_M_crypt_Actions takes nothing returns nothing
set udg_SpawnMRLMR[8] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_M_crypt takes nothing returns nothing
set gg_trg_M_crypt = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_M_crypt, gg_unit_usep_0075, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_M_crypt, function Trig_M_crypt_Actions )
endfunction
//===========================================================================
// Trigger: LR crypt
//===========================================================================
function Trig_LR_crypt_Actions takes nothing returns nothing
set udg_SpawnMRLMR[9] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_LR_crypt takes nothing returns nothing
set gg_trg_LR_crypt = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_LR_crypt, gg_unit_usep_0074, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_LR_crypt, function Trig_LR_crypt_Actions )
endfunction
//===========================================================================
// Trigger: UL temple
//===========================================================================
function Trig_UL_temple_Actions takes nothing returns nothing
set udg_SpawnMRLMR[10] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_UL_temple takes nothing returns nothing
set gg_trg_UL_temple = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_UL_temple, gg_unit_utod_0077, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_UL_temple, function Trig_UL_temple_Actions )
endfunction
//===========================================================================
// Trigger: M temple
//===========================================================================
function Trig_M_temple_Actions takes nothing returns nothing
set udg_SpawnMRLMR[11] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_M_temple takes nothing returns nothing
set gg_trg_M_temple = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_M_temple, gg_unit_utod_0078, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_M_temple, function Trig_M_temple_Actions )
endfunction
//===========================================================================
// Trigger: LR temple
//===========================================================================
function Trig_LR_temple_Actions takes nothing returns nothing
set udg_SpawnMRLMR[12] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_LR_temple takes nothing returns nothing
set gg_trg_LR_temple = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_LR_temple, gg_unit_utod_0079, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_LR_temple, function Trig_LR_temple_Actions )
endfunction
//===========================================================================
// Trigger: UL war
//===========================================================================
function Trig_UL_war_Actions takes nothing returns nothing
set udg_SpawnMRLMR[1] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_UL_war takes nothing returns nothing
set gg_trg_UL_war = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_UL_war, gg_unit_eaom_0056, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_UL_war, function Trig_UL_war_Actions )
endfunction
//===========================================================================
// Trigger: M war
//===========================================================================
function Trig_M_war_Actions takes nothing returns nothing
set udg_SpawnMRLMR[2] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_M_war takes nothing returns nothing
set gg_trg_M_war = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_M_war, gg_unit_eaoe_0054, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_M_war, function Trig_M_war_Actions )
endfunction
//===========================================================================
// Trigger: R war
//===========================================================================
function Trig_R_war_Actions takes nothing returns nothing
set udg_SpawnMRLMR[3] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_R_war takes nothing returns nothing
set gg_trg_R_war = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_R_war, gg_unit_eaom_0052, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_R_war, function Trig_R_war_Actions )
endfunction
//===========================================================================
// Trigger: UL lore
//===========================================================================
function Trig_UL_lore_Actions takes nothing returns nothing
set udg_SpawnMRLMR[4] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_UL_lore takes nothing returns nothing
set gg_trg_UL_lore = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_UL_lore, gg_unit_eaoe_0057, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_UL_lore, function Trig_UL_lore_Actions )
endfunction
//===========================================================================
// Trigger: M lore
//===========================================================================
function Trig_M_lore_Actions takes nothing returns nothing
set udg_SpawnMRLMR[5] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_M_lore takes nothing returns nothing
set gg_trg_M_lore = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_M_lore, gg_unit_eaoe_0054, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_M_lore, function Trig_M_lore_Actions )
endfunction
//===========================================================================
// Trigger: R lore
//===========================================================================
function Trig_R_lore_Actions takes nothing returns nothing
set udg_SpawnMRLMR[6] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_R_lore takes nothing returns nothing
set gg_trg_R_lore = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_R_lore, gg_unit_eaoe_0053, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_R_lore, function Trig_R_lore_Actions )
endfunction
//===========================================================================
// Trigger: Sent Win
//===========================================================================
function Trig_Sent_Win_Actions takes nothing returns nothing
call CustomDefeatBJ( Player(7), "TRIGSTR_8882" )
call CustomDefeatBJ( Player(8), "TRIGSTR_8883" )
call CustomDefeatBJ( Player(9), "TRIGSTR_8884" )
call CustomDefeatBJ( Player(10), "TRIGSTR_8885" )
call CustomDefeatBJ( Player(11), "TRIGSTR_8886" )
call CustomVictoryBJ( Player(1), true, true )
call CustomVictoryBJ( Player(2), true, true )
call CustomVictoryBJ( Player(3), true, true )
call CustomVictoryBJ( Player(4), true, true )
call CustomVictoryBJ( Player(5), true, true )
call DisplayTimedTextToForce( GetPlayersAll(), 30, "TRIGSTR_8887" )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_Sent_Win takes nothing returns nothing
set gg_trg_Sent_Win = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Sent_Win, gg_unit_unpl_0080, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_Sent_Win, function Trig_Sent_Win_Actions )
endfunction
//===========================================================================
// Trigger: Scourge Win
//===========================================================================
function Trig_Scourge_Win_Actions takes nothing returns nothing
call CustomDefeatBJ( Player(1), "TRIGSTR_8888" )
call CustomDefeatBJ( Player(2), "TRIGSTR_8889" )
call CustomDefeatBJ( Player(3), "TRIGSTR_8890" )
call CustomDefeatBJ( Player(4), "TRIGSTR_8891" )
call CustomDefeatBJ( Player(5), "TRIGSTR_8892" )
call CustomVictoryBJ( Player(7), true, true )
call CustomVictoryBJ( Player(8), true, true )
call CustomVictoryBJ( Player(9), true, true )
call CustomVictoryBJ( Player(10), true, true )
call CustomVictoryBJ( Player(11), true, true )
call DisplayTimedTextToForce( GetPlayersAll(), 30, "TRIGSTR_8893" )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_Scourge_Win takes nothing returns nothing
set gg_trg_Scourge_Win = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Scourge_Win, gg_unit_etol_0039, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_Scourge_Win, function Trig_Scourge_Win_Actions )
endfunction
//===========================================================================
// Trigger: display leaderboard
//===========================================================================
function Trig_display_leaderboard_Actions takes nothing returns nothing
call CreateMultiboardBJ( 4, 16, ( "DotA Allstars" + udg_VersionString ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 1, "TRIGSTR_8894" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, 1, "TRIGSTR_8895" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 1, "TRIGSTR_8896" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, 1, "TRIGSTR_8897" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 2, ( udg_Colors[1] + ( "The Sentinel" + "|r" ) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 8, ( udg_Colors[7] + ( "The Scourge" + "|r" ) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 8, "TRIGSTR_8898" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, 8, "TRIGSTR_8899" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, 2, "TRIGSTR_8900" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 2, "TRIGSTR_8901" )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 16
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 1, GetForLoopIndexA(), 9.80 )
call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 2, GetForLoopIndexA(), 4.20 )
call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 3, GetForLoopIndexA(), 4.00 )
call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 4, GetForLoopIndexA(), 4.60 )
call MultiboardSetItemColorBJ( GetLastCreatedMultiboard(), 2, GetForLoopIndexA(), 86.20, 86.20, 0.00, 0 )
call MultiboardSetItemColorBJ( GetLastCreatedMultiboard(), 3, GetForLoopIndexA(), 100.00, 0.00, 0.00, 0 )
call MultiboardSetItemColorBJ( GetLastCreatedMultiboard(), 4, GetForLoopIndexA(), 0.00, 5.00, 100.00, 0 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 2
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, ( GetForLoopIndexA() + 1 ), ( udg_Colors[GetForLoopIndexA()] + ( GetPlayerName(ConvertedPlayer(GetForLoopIndexA())) + "|r" ) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, ( GetForLoopIndexA() + 1 ), "TRIGSTR_8902" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, ( GetForLoopIndexA() + 1 ), "TRIGSTR_8903" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, ( GetForLoopIndexA() + 1 ), "TRIGSTR_8904" )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 8
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, ( GetForLoopIndexA() + 1 ), ( udg_Colors[GetForLoopIndexA()] + ( GetPlayerName(ConvertedPlayer(GetForLoopIndexA())) + "|r" ) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, ( GetForLoopIndexA() + 1 ), "TRIGSTR_8905" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, ( GetForLoopIndexA() + 1 ), "TRIGSTR_8906" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, ( GetForLoopIndexA() + 1 ), "TRIGSTR_8907" )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 4
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 16
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call MultiboardSetItemStyleBJ( GetLastCreatedMultiboard(), GetForLoopIndexA(), GetForLoopIndexB(), true, false )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 14, "TRIGSTR_8908" )
call MultiboardSetItemColorBJ( GetLastCreatedMultiboard(), 3, 14, 100.00, 100.00, 100.00, 0 )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 15, ( udg_Colors[1] + ( "Towers Lost" + "|r" ) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 16, ( udg_Colors[7] + ( "Towers Lost" + "|r" ) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 16, ( udg_Colors[7] + ( " 0" + "|r" ) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 16, "TRIGSTR_8909" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 15, "TRIGSTR_8910" )
call MultiboardDisplayBJ( true, GetLastCreatedMultiboard() )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_display_leaderboard takes nothing returns nothing
set gg_trg_display_leaderboard = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_display_leaderboard, 1.00 )
call TriggerAddAction( gg_trg_display_leaderboard, function Trig_display_leaderboard_Actions )
endfunction
//===========================================================================
// Trigger: update leaderboard always
//===========================================================================
function Trig_update_leaderboard_always_Func001Func001Func002C takes nothing returns boolean
if ( not ( GetPlayerState(ConvertedPlayer(GetForLoopIndexB()), PLAYER_STATE_RESOURCE_FOOD_USED) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_update_leaderboard_always_Func001Func001C takes nothing returns boolean
if ( not ( GetForLoopIndexB() != 7 ) ) then
return false
endif
return true
endfunction
function Trig_update_leaderboard_always_Func004C takes nothing returns boolean
if ( not ( udg_Seconds < 10 ) ) then
return false
endif
return true
endfunction
function Trig_update_leaderboard_always_Actions takes nothing returns nothing
set bj_forLoopBIndex = 2
set bj_forLoopBIndexEnd = 12
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_update_leaderboard_always_Func001Func001C() ) then
if ( Trig_update_leaderboard_always_Func001Func001Func002C() ) then
set udg_TempCounter = R2I(TimerGetRemaining(udg_PTimer[GetForLoopIndexB()]))
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, ( GetForLoopIndexB() + 1 ), ( " " + I2S(udg_TempCounter) ) )
else
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, ( GetForLoopIndexB() + 1 ), "TRIGSTR_8911" )
endif
else
call DoNothing( )
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
set udg_Minutes = ( ( R2I(TimerGetElapsed(udg_LBTime)) / 60 ) - ( 1 / 2 ) )
set udg_Seconds = ModuloInteger(R2I(TimerGetElapsed(udg_LBTime)), 60)
if ( Trig_update_leaderboard_always_Func004C() ) then
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 14, ( " " + ( I2S(udg_Minutes) + ( ":0" + I2S(udg_Seconds) ) ) ) )
else
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 14, ( " " + ( I2S(udg_Minutes) + ( ":" + I2S(udg_Seconds) ) ) ) )
endif
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 15, ( " " + I2S(udg_LBTow[1]) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 16, ( udg_Colors[7] + ( ( " " + I2S(udg_LBTow[2]) ) + "|r" ) ) )
endfunction
//===========================================================================
function InitTrig_update_leaderboard_always takes nothing returns nothing
set gg_trg_update_leaderboard_always = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_update_leaderboard_always, 1.00 )
call TriggerAddAction( gg_trg_update_leaderboard_always, function Trig_update_leaderboard_always_Actions )
endfunction
//===========================================================================
// Trigger: update leaderboard CTF
//===========================================================================
function Trig_update_leaderboard_CTF_Func001Func001Func002C takes nothing returns boolean
if ( not ( GetPlayerState(ConvertedPlayer(GetForLoopIndexB()), PLAYER_STATE_RESOURCE_FOOD_USED) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_update_leaderboard_CTF_Func001Func001C takes nothing returns boolean
if ( not ( GetForLoopIndexB() != 7 ) ) then
return false
endif
return true
endfunction
function Trig_update_leaderboard_CTF_Func004C takes nothing returns boolean
if ( not ( udg_Seconds < 10 ) ) then
return false
endif
return true
endfunction
function Trig_update_leaderboard_CTF_Actions takes nothing returns nothing
set bj_forLoopBIndex = 2
set bj_forLoopBIndexEnd = 12
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_update_leaderboard_CTF_Func001Func001C() ) then
if ( Trig_update_leaderboard_CTF_Func001Func001Func002C() ) then
set udg_TempCounter = R2I(TimerGetRemaining(udg_PTimer[GetForLoopIndexB()]))
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, ( GetForLoopIndexB() + 1 ), ( " " + I2S(udg_TempCounter) ) )
else
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, ( GetForLoopIndexB() + 1 ), "TRIGSTR_8912" )
endif
else
call DoNothing( )
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
set udg_Minutes = ( ( R2I(TimerGetElapsed(udg_LBTime)) / 60 ) - ( 1 / 2 ) )
set udg_Seconds = ModuloInteger(R2I(TimerGetElapsed(udg_LBTime)), 60)
if ( Trig_update_leaderboard_CTF_Func004C() ) then
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 14, ( " " + ( I2S(udg_Minutes) + ( ":0" + I2S(udg_Seconds) ) ) ) )
else
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 14, ( " " + ( I2S(udg_Minutes) + ( ":" + I2S(udg_Seconds) ) ) ) )
endif
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 15, ( " " + I2S(udg_CTFScore[1]) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 16, ( udg_Colors[7] + ( ( " " + I2S(udg_CTFScore[2]) ) + "|r" ) ) )
endfunction
//===========================================================================
function InitTrig_update_leaderboard_CTF takes nothing returns nothing
set gg_trg_update_leaderboard_CTF = CreateTrigger( )
call DisableTrigger( gg_trg_update_leaderboard_CTF )
call TriggerRegisterTimerEventPeriodic( gg_trg_update_leaderboard_CTF, 1.00 )
call TriggerAddAction( gg_trg_update_leaderboard_CTF, function Trig_update_leaderboard_CTF_Actions )
endfunction
//===========================================================================
// Trigger: update leaderboard kills
//===========================================================================
function Trig_update_leaderboard_kills_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, ( GetForLoopIndexA() + 1 ), ( " " + I2S(udg_LBKills[GetForLoopIndexA()]) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, ( GetForLoopIndexA() + 1 ), ( " " + I2S(udg_LBDeaths[GetForLoopIndexA()]) ) )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_update_leaderboard_kills takes nothing returns nothing
set gg_trg_update_leaderboard_kills = CreateTrigger( )
call TriggerAddAction( gg_trg_update_leaderboard_kills, function Trig_update_leaderboard_kills_Actions )
endfunction
//===========================================================================
// Trigger: Sent Win Checksum
//===========================================================================
function Trig_Sent_Win_Checksum_Func010C takes nothing returns boolean
if ( not ( udg_LBKills[1] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_Win_Checksum_Func011C takes nothing returns boolean
if ( not ( udg_LBKills[7] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_Win_Checksum_Func012C takes nothing returns boolean
if ( not ( udg_LBDeaths[1] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_Win_Checksum_Func013C takes nothing returns boolean
if ( not ( udg_LBDeaths[7] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_Win_Checksum_Func029C takes nothing returns boolean
if ( not ( udg_semifChecksumMath[5] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_Win_Checksum_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Scourge_Win_Checksum )
call PauseAllUnitsBJ( true )
call DisplayTimedTextToForce( GetPlayersAll(), 30, "TRIGSTR_8913" )
set udg_scResult = 2
set udg_scFinalSeed = ( udg_ECsubstrings1[8] + ( udg_ECsubstrings1[9] + ( udg_ECsubstrings2[8] + udg_ECsubstrings2[9] ) ) )
set udg_LBKillsStr[1] = I2S(udg_LBKills[1])
set udg_LBKillsStr[7] = I2S(udg_LBKills[7])
set udg_LBDeathsSTR[1] = I2S(udg_LBDeaths[1])
set udg_LBDeathsSTR[7] = I2S(udg_LBDeaths[7])
if ( Trig_Sent_Win_Checksum_Func010C() ) then
set udg_LBKillsStr[1] = ( "0" + udg_LBKillsStr[1] )
else
call DoNothing( )
endif
if ( Trig_Sent_Win_Checksum_Func011C() ) then
set udg_LBKillsStr[7] = ( "0" + udg_LBKillsStr[7] )
else
call DoNothing( )
endif
if ( Trig_Sent_Win_Checksum_Func012C() ) then
set udg_LBDeathsSTR[1] = ( "0" + udg_LBDeathsSTR[1] )
else
call DoNothing( )
endif
if ( Trig_Sent_Win_Checksum_Func013C() ) then
set udg_LBDeathsSTR[7] = ( "0" + udg_LBDeathsSTR[7] )
else
call DoNothing( )
endif
set udg_scSemiFinal = ( I2S(udg_scResult) + ( udg_LBKillsStr[1] + ( udg_LBDeathsSTR[1] + ( udg_LBKillsStr[7] + udg_LBDeathsSTR[7] ) ) ) )
set udg_semifTempCheckSumINT[1] = S2I(SubStringBJ(udg_scSemiFinal, 1, 1))
set udg_semifTempCheckSumINT[2] = S2I(SubStringBJ(udg_scSemiFinal, 2, 2))
set udg_semifTempCheckSumINT[3] = S2I(SubStringBJ(udg_scSemiFinal, 3, 3))
set udg_semifTempCheckSumINT[4] = S2I(SubStringBJ(udg_scSemiFinal, 4, 4))
set udg_semifTempCheckSumINT[5] = S2I(SubStringBJ(udg_scSemiFinal, 5, 5))
set udg_semifTempCheckSumINT[6] = S2I(SubStringBJ(udg_scSemiFinal, 6, 6))
set udg_semifTempCheckSumINT[7] = S2I(SubStringBJ(udg_scSemiFinal, 7, 7))
set udg_semifTempCheckSumINT[8] = S2I(SubStringBJ(udg_scSemiFinal, 8, 8))
set udg_semifTempCheckSumINT[9] = S2I(SubStringBJ(udg_scSemiFinal, 9, 9))
set udg_semifChecksumMath[1] = ( udg_semifTempCheckSumINT[1] + ( udg_semifTempCheckSumINT[3] + ( udg_semifTempCheckSumINT[5] + ( udg_semifTempCheckSumINT[7] + udg_semifTempCheckSumINT[9] ) ) ) )
set udg_semifChecksumMath[2] = ( udg_semifChecksumMath[1] * 3 )
set udg_semifChecksumMath[3] = ( udg_semifTempCheckSumINT[2] + ( udg_semifTempCheckSumINT[4] + ( udg_semifTempCheckSumINT[6] + udg_semifTempCheckSumINT[8] ) ) )
set udg_semifChecksumMath[4] = ( udg_semifChecksumMath[2] + udg_semifChecksumMath[3] )
set udg_semifChecksumMath[5] = ModuloInteger(udg_semifChecksumMath[4], 100)
if ( Trig_Sent_Win_Checksum_Func029C() ) then
set udg_semifChecksumMath_STR[1] = ( "0" + I2S(udg_semifChecksumMath[5]) )
else
set udg_semifChecksumMath_STR[1] = I2S(udg_semifChecksumMath[5])
endif
set udg_scSemiFinal = ( udg_scSemiFinal + udg_semifChecksumMath_STR[1] )
call ConditionalTriggerExecute( gg_trg_S )
endfunction
//===========================================================================
function InitTrig_Sent_Win_Checksum takes nothing returns nothing
set gg_trg_Sent_Win_Checksum = CreateTrigger( )
call DisableTrigger( gg_trg_Sent_Win_Checksum )
call TriggerRegisterUnitEvent( gg_trg_Sent_Win_Checksum, gg_unit_unpl_0080, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_Sent_Win_Checksum, function Trig_Sent_Win_Checksum_Actions )
endfunction
//===========================================================================
// Trigger: Scourge Win Checksum
//===========================================================================
function Trig_Scourge_Win_Checksum_Func010C takes nothing returns boolean
if ( not ( udg_LBKills[1] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Scourge_Win_Checksum_Func011C takes nothing returns boolean
if ( not ( udg_LBKills[7] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Scourge_Win_Checksum_Func012C takes nothing returns boolean
if ( not ( udg_LBDeaths[1] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Scourge_Win_Checksum_Func013C takes nothing returns boolean
if ( not ( udg_LBDeaths[7] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Scourge_Win_Checksum_Func029C takes nothing returns boolean
if ( not ( udg_semifChecksumMath[5] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Scourge_Win_Checksum_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Sent_Win_Checksum )
call PauseAllUnitsBJ( true )
call DisplayTimedTextToForce( GetPlayersAll(), 30, "TRIGSTR_8914" )
set udg_scResult = 3
set udg_scFinalSeed = ( udg_ECsubstrings1[8] + ( udg_ECsubstrings1[9] + ( udg_ECsubstrings2[8] + udg_ECsubstrings2[9] ) ) )
set udg_LBKillsStr[1] = I2S(udg_LBKills[1])
set udg_LBKillsStr[7] = I2S(udg_LBKills[7])
set udg_LBDeathsSTR[1] = I2S(udg_LBDeaths[1])
set udg_LBDeathsSTR[7] = I2S(udg_LBDeaths[7])
if ( Trig_Scourge_Win_Checksum_Func010C() ) then
set udg_LBKillsStr[1] = ( "0" + udg_LBKillsStr[1] )
else
call DoNothing( )
endif
if ( Trig_Scourge_Win_Checksum_Func011C() ) then
set udg_LBKillsStr[7] = ( "0" + udg_LBKillsStr[7] )
else
call DoNothing( )
endif
if ( Trig_Scourge_Win_Checksum_Func012C() ) then
set udg_LBDeathsSTR[1] = ( "0" + udg_LBDeathsSTR[1] )
else
call DoNothing( )
endif
if ( Trig_Scourge_Win_Checksum_Func013C() ) then
set udg_LBDeathsSTR[7] = ( "0" + udg_LBDeathsSTR[7] )
else
call DoNothing( )
endif
set udg_scSemiFinal = ( I2S(udg_scResult) + ( udg_LBKillsStr[1] + ( udg_LBDeathsSTR[1] + ( udg_LBKillsStr[7] + udg_LBDeathsSTR[7] ) ) ) )
set udg_semifTempCheckSumINT[1] = S2I(SubStringBJ(udg_scSemiFinal, 1, 1))
set udg_semifTempCheckSumINT[2] = S2I(SubStringBJ(udg_scSemiFinal, 2, 2))
set udg_semifTempCheckSumINT[3] = S2I(SubStringBJ(udg_scSemiFinal, 3, 3))
set udg_semifTempCheckSumINT[4] = S2I(SubStringBJ(udg_scSemiFinal, 4, 4))
set udg_semifTempCheckSumINT[5] = S2I(SubStringBJ(udg_scSemiFinal, 5, 5))
set udg_semifTempCheckSumINT[6] = S2I(SubStringBJ(udg_scSemiFinal, 6, 6))
set udg_semifTempCheckSumINT[7] = S2I(SubStringBJ(udg_scSemiFinal, 7, 7))
set udg_semifTempCheckSumINT[8] = S2I(SubStringBJ(udg_scSemiFinal, 8, 8))
set udg_semifTempCheckSumINT[9] = S2I(SubStringBJ(udg_scSemiFinal, 9, 9))
set udg_semifChecksumMath[1] = ( udg_semifTempCheckSumINT[1] + ( udg_semifTempCheckSumINT[3] + ( udg_semifTempCheckSumINT[5] + ( udg_semifTempCheckSumINT[7] + udg_semifTempCheckSumINT[9] ) ) ) )
set udg_semifChecksumMath[2] = ( udg_semifChecksumMath[1] * 3 )
set udg_semifChecksumMath[3] = ( udg_semifTempCheckSumINT[2] + ( udg_semifTempCheckSumINT[4] + ( udg_semifTempCheckSumINT[6] + udg_semifTempCheckSumINT[8] ) ) )
set udg_semifChecksumMath[4] = ( udg_semifChecksumMath[2] + udg_semifChecksumMath[3] )
set udg_semifChecksumMath[5] = ModuloInteger(udg_semifChecksumMath[4], 100)
if ( Trig_Scourge_Win_Checksum_Func029C() ) then
set udg_semifChecksumMath_STR[1] = ( "0" + I2S(udg_semifChecksumMath[5]) )
else
set udg_semifChecksumMath_STR[1] = I2S(udg_semifChecksumMath[5])
endif
set udg_scSemiFinal = ( udg_scSemiFinal + udg_semifChecksumMath_STR[1] )
call ConditionalTriggerExecute( gg_trg_S )
endfunction
//===========================================================================
function InitTrig_Scourge_Win_Checksum takes nothing returns nothing
set gg_trg_Scourge_Win_Checksum = CreateTrigger( )
call DisableTrigger( gg_trg_Scourge_Win_Checksum )
call TriggerRegisterUnitEvent( gg_trg_Scourge_Win_Checksum, gg_unit_etol_0039, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_Scourge_Win_Checksum, function Trig_Scourge_Win_Checksum_Actions )
endfunction
//===========================================================================
// Trigger: S
//===========================================================================
function Trig_S_Actions takes nothing returns nothing
set udg_SemiFdigits[1] = SubStringBJ(udg_scSemiFinal, 1, 1)
set udg_SemiFdigits[2] = SubStringBJ(udg_scSemiFinal, 2, 2)
set udg_SemiFdigits[3] = SubStringBJ(udg_scSemiFinal, 3, 3)
set udg_SemiFdigits[4] = SubStringBJ(udg_scSemiFinal, 4, 4)
set udg_SemiFdigits[5] = SubStringBJ(udg_scSemiFinal, 5, 5)
set udg_SemiFdigits[6] = SubStringBJ(udg_scSemiFinal, 6, 6)
set udg_SemiFdigits[7] = SubStringBJ(udg_scSemiFinal, 7, 7)
set udg_SemiFdigits[8] = SubStringBJ(udg_scSemiFinal, 8, 8)
set udg_SemiFdigits[9] = SubStringBJ(udg_scSemiFinal, 9, 9)
set udg_SemiFdigits[10] = SubStringBJ(udg_scSemiFinal, 10, 10)
set udg_SemiFdigits[11] = SubStringBJ(udg_scSemiFinal, 11, 11)
set udg_semiSemiFinal = ( udg_SemiFdigits[3] + ( udg_SemiFdigits[11] + ( udg_SemiFdigits[7] + ( udg_SemiFdigits[9] + ( udg_SemiFdigits[4] + ( udg_SemiFdigits[6] + ( udg_SemiFdigits[1] + ( udg_SemiFdigits[10] + ( udg_SemiFdigits[2] + ( udg_SemiFdigits[5] + udg_SemiFdigits[8] ) ) ) ) ) ) ) ) ) )
set udg_scSemiFinal = udg_semiSemiFinal
set udg_LoopA = 0
loop
exitwhen udg_LoopA > ( StringLength(udg_scSemiFinal) - 1 )
set udg_scFinal = ( udg_scFinal + I2S(ModuloInteger(( S2I(SubStringBJ(udg_scSemiFinal, ( udg_LoopA + 1 ), ( udg_LoopA + 1 ))) + S2I(SubStringBJ(udg_scFinalSeed, ( ModuloInteger(udg_LoopA, ( StringLength(udg_scFinalSeed) - 0 )) + 1 ), ( ModuloInteger(udg_LoopA, ( StringLength(udg_scFinalSeed) - 0 )) + 1 ))) ), 10)) )
set udg_LoopA = udg_LoopA + 1
endloop
call DisplayTimedTextToForce( GetPlayersAll(), 9999.00, "TRIGSTR_8915" )
call DisplayTimedTextToForce( GetPlayersAll(), 9999.00, udg_scFinal )
endfunction
//===========================================================================
function InitTrig_S takes nothing returns nothing
set gg_trg_S = CreateTrigger( )
call TriggerAddAction( gg_trg_S, function Trig_S_Actions )
endfunction
//===========================================================================
// Trigger: MatchID team1
//===========================================================================
function Trig_MatchID_team1_Conditions takes nothing returns boolean
if ( not ( udg_DEC1 == "No" ) ) then
return false
endif
return true
endfunction
function Trig_MatchID_team1_Func008C takes nothing returns boolean
if ( not ( udg_DEC1 == "Yes" ) ) then
return false
endif
if ( not ( udg_DEC2 == "Yes" ) ) then
return false
endif
return true
endfunction
function Trig_MatchID_team1_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), ( "The " + ( udg_Colors[1] + "Sentinel|r have entered their match ID." ) ) )
set udg_EnteredMatchID1 = SubStringBJ(GetEventPlayerChatString(), 8, 10)
set udg_DEC1 = "Yes"
set udg_ECsubstrings1[8] = SubStringBJ(udg_EnteredMatchID1, 1, 1)
set udg_ECsubstrings1[9] = SubStringBJ(udg_EnteredMatchID1, 2, 2)
set udg_ECsubstrings1[10] = SubStringBJ(udg_EnteredMatchID1, 3, 3)
if ( Trig_MatchID_team1_Func008C() ) then
set udg_CSp1Int[1] = ( S2I(udg_ECsubstrings1[8]) + S2I(udg_ECsubstrings2[8]) )
set udg_CSp1Int[2] = ( udg_CSp1Int[1] * 3 )
set udg_CSp2Int[1] = ( S2I(udg_ECsubstrings1[9]) + S2I(udg_ECsubstrings2[9]) )
set udg_CSp1Int[5] = ( udg_CSp1Int[2] + udg_CSp2Int[1] )
call ConditionalTriggerExecute( gg_trg_Check_Sum )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_MatchID_team1 takes nothing returns nothing
set gg_trg_MatchID_team1 = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team1, Player(1), "-match ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team1, Player(2), "-match ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team1, Player(3), "-match ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team1, Player(4), "-match ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team1, Player(5), "-match ", false )
call TriggerAddCondition( gg_trg_MatchID_team1, Condition( function Trig_MatchID_team1_Conditions ) )
call TriggerAddAction( gg_trg_MatchID_team1, function Trig_MatchID_team1_Actions )
endfunction
//===========================================================================
// Trigger: MatchID team2
//===========================================================================
function Trig_MatchID_team2_Conditions takes nothing returns boolean
if ( not ( udg_DEC2 == "No" ) ) then
return false
endif
return true
endfunction
function Trig_MatchID_team2_Func008C takes nothing returns boolean
if ( not ( udg_DEC1 == "Yes" ) ) then
return false
endif
if ( not ( udg_DEC2 == "Yes" ) ) then
return false
endif
return true
endfunction
function Trig_MatchID_team2_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), ( "The " + ( udg_Colors[7] + "Scourge|r have entered their match ID." ) ) )
set udg_EnteredMatchID2 = SubStringBJ(GetEventPlayerChatString(), 8, 10)
set udg_DEC2 = "Yes"
set udg_ECsubstrings2[8] = SubStringBJ(udg_EnteredMatchID2, 1, 1)
set udg_ECsubstrings2[9] = SubStringBJ(udg_EnteredMatchID2, 2, 2)
set udg_ECsubstrings2[10] = SubStringBJ(udg_EnteredMatchID2, 3, 3)
if ( Trig_MatchID_team2_Func008C() ) then
set udg_CSp1Int[1] = ( S2I(udg_ECsubstrings1[8]) + S2I(udg_ECsubstrings2[8]) )
set udg_CSp1Int[2] = ( udg_CSp1Int[1] * 3 )
set udg_CSp2Int[1] = ( S2I(udg_ECsubstrings1[9]) + S2I(udg_ECsubstrings2[9]) )
set udg_CSp1Int[5] = ( udg_CSp1Int[2] + udg_CSp2Int[1] )
call ConditionalTriggerExecute( gg_trg_Check_Sum )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_MatchID_team2 takes nothing returns nothing
set gg_trg_MatchID_team2 = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team2, Player(7), "-match ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team2, Player(8), "-match ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team2, Player(9), "-match ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team2, Player(10), "-match ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team2, Player(11), "-match ", false )
call TriggerAddCondition( gg_trg_MatchID_team2, Condition( function Trig_MatchID_team2_Conditions ) )
call TriggerAddAction( gg_trg_MatchID_team2, function Trig_MatchID_team2_Actions )
endfunction
//===========================================================================
// Trigger: Check Sum
//===========================================================================
function Trig_Check_Sum_Func003C takes nothing returns boolean
if ( not ( udg_CheckCS[1] == udg_ECsubstrings1[10] ) ) then
return false
endif
if ( not ( udg_CheckCS[2] == udg_ECsubstrings2[10] ) ) then
return false
endif
return true
endfunction
function Trig_Check_Sum_Actions takes nothing returns nothing
set udg_CheckCS[1] = SubStringBJ(I2S(udg_CSp1Int[5]), 1, 1)
set udg_CheckCS[2] = SubStringBJ(I2S(udg_CSp1Int[5]), 2, 2)
if ( Trig_Check_Sum_Func003C() ) then
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_8917" )
call EnableTrigger( gg_trg_Sent_Win_Checksum )
call EnableTrigger( gg_trg_Scourge_Win_Checksum )
call DisableTrigger( gg_trg_Sent_Win )
call DisableTrigger( gg_trg_Scourge_Win )
else
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_8916" )
endif
endfunction
//===========================================================================
function InitTrig_Check_Sum takes nothing returns nothing
set gg_trg_Check_Sum = CreateTrigger( )
call TriggerAddAction( gg_trg_Check_Sum, function Trig_Check_Sum_Actions )
endfunction
//===========================================================================
// Trigger: Untitled Trigger 001
//===========================================================================
function Trig_Untitled_Trigger_001_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_ANCIENT) == false ) ) then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerAddCondition( gg_trg_Untitled_Trigger_001, Condition( function Trig_Untitled_Trigger_001_Conditions ) )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
//===========================================================================
// Trigger: First Blood
//===========================================================================
function Trig_First_Blood_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_First_Blood_Actions takes nothing returns nothing
call DestroyTrigger(GetTriggeringTrigger())
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))] + ( GetPlayerName(GetOwningPlayer(GetKillingUnitBJ())) + ( "|r just drew " + ( udg_Colors[1] + "first blood!|r (+200 gold)") ) ) ) )
call AdjustPlayerStateBJ( 200, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_GOLD )
call PlaySoundBJ( gg_snd_firstblood )
endfunction
//===========================================================================
function InitTrig_First_Blood takes nothing returns nothing
set gg_trg_First_Blood = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_First_Blood, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_First_Blood, Condition( function Trig_First_Blood_Conditions ) )
call TriggerAddAction( gg_trg_First_Blood, function Trig_First_Blood_Actions )
endfunction
//===========================================================================
// Trigger: Unstuck
//===========================================================================
function Trig_Unstuck_Func002001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Unstuck_Func002001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetTriggerPlayer() )
endfunction
function Trig_Unstuck_Func002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Unstuck_Func002001002001(), Trig_Unstuck_Func002001002002() )
endfunction
function Trig_Unstuck_Func002A takes nothing returns nothing
call UnitAddAbilityBJ( 'A0AT', GetEnumUnit() )
call IssueImmediateOrderBJ( GetEnumUnit(), "chemicalrage" )
endfunction
function Trig_Unstuck_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Unstuck_Func002001002)), function Trig_Unstuck_Func002A )
endfunction
//===========================================================================
function InitTrig_Unstuck takes nothing returns nothing
set gg_trg_Unstuck = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(1), "-unstuck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(2), "-unstuck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(3), "-unstuck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(4), "-unstuck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(5), "-unstuck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(7), "-unstuck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(8), "-unstuck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(9), "-unstuck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(10), "-unstuck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(11), "-unstuck", true )
call TriggerAddAction( gg_trg_Unstuck, function Trig_Unstuck_Actions )
endfunction
//===========================================================================
// Trigger: Unstick
//===========================================================================
function Trig_Unstick_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AT' ) ) then
return false
endif
return true
endfunction
function Trig_Unstick_Func001C takes nothing returns boolean
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Unstick_Actions takes nothing returns nothing
if ( Trig_Unstick_Func001C() ) then
call SetUnitPositionLoc( GetTriggerUnit(), GetRectCenter(gg_rct_Hero_Creation_NE) )
else
call SetUnitPositionLoc( GetTriggerUnit(), GetRectCenter(gg_rct_Hero_Creation_Evil) )
endif
endfunction
//===========================================================================
function InitTrig_Unstick takes nothing returns nothing
set gg_trg_Unstick = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Unstick, EVENT_PLAYER_UNIT_SPELL_FINISH )
call TriggerAddCondition( gg_trg_Unstick, Condition( function Trig_Unstick_Conditions ) )
call TriggerAddAction( gg_trg_Unstick, function Trig_Unstick_Actions )
endfunction
//===========================================================================
// Trigger: Untitled Trigger 002
//===========================================================================
function Trig_Untitled_Trigger_002_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_DestroyFX )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_002 takes nothing returns nothing
set gg_trg_Untitled_Trigger_002 = CreateTrigger( )
call TriggerAddAction( gg_trg_Untitled_Trigger_002, function Trig_Untitled_Trigger_002_Actions )
endfunction
//===========================================================================
function InitCustomTriggers takes nothing returns nothing
call InitTrig_Revival_trigger( )
call InitTrig_entry( )
call InitTrig_entryDE( )
call InitTrig_RS1( )
call InitTrig_RS2( )
call InitTrig_Money( )
call InitTrig_SM_Money( )
call InitTrig_Deathtrigger( )
call InitTrig_SentD_DE2( )
call InitTrig_SentD_DE3( )
call InitTrig_SentD_DE4( )
call InitTrig_SentD_DE5( )
call InitTrig_SentD_DE6( )
call InitTrig_ScouD_DE8( )
call InitTrig_ScouD_DE9( )
call InitTrig_ScouD_DE10( )
call InitTrig_ScouD_DE11( )
call InitTrig_ScouD_DE12( )
call InitTrig_Leave( )
call InitTrig_Bounty( )
call InitTrig_Tree( )
call InitTrig_NoDouble( )
call InitTrig_HeroL1( )
call InitTrig_HeroL2( )
call InitTrig_RandomUD( )
call InitTrig_RandomUDAP( )
call InitTrig_RandomS( )
call InitTrig_RandomSAP( )
call InitTrig_RepUD( )
call InitTrig_RepUDAP( )
call InitTrig_RepS( )
call InitTrig_RepSAP( )
call InitTrig_ARReUD( )
call InitTrig_ARReS( )
call InitTrig_TRReUD( )
call InitTrig_TRReS( )
call InitTrig_Tornado_barrier_2( )
call InitTrig_Tornado_Barrier( )
call InitTrig_Tornado_blast( )
call InitTrig_Displace( )
call InitTrig_Perdition( )
call InitTrig_Power_Word( )
call InitTrig_Shadow_Word( )
call InitTrig_Ostracize_new( )
call InitTrig_Shadow_Weave( )
call InitTrig_Protect_Roshan( )
call InitTrig_Protect_Roshan_2( )
call InitTrig_Natures_Attendants( )
call InitTrig_Optimiser( )
call InitTrig_Mirror_Shield( )
call InitTrig_Shukuchi( )
call InitTrig_Split_Shot( )
call InitTrig_Time_Lapse_Cast( )
call InitTrig_Time_Lapse_Set( )
call InitTrig_Time_Lapse_Begin( )
call InitTrig_Malefice( )
call InitTrig_Conversion( )
call InitTrig_Midnight_Pulse( )
call InitTrig_Black_Hole( )
call InitTrig_Black_Hole_suck( )
call InitTrig_Heartstopper_kill( )
call InitTrig_Rot( )
call InitTrig_Gaze_b( )
call InitTrig_Gaze_c( )
call InitTrig_Gaze_d( )
call InitTrig_Gaze_e( )
call InitTrig_mekansm( )
call InitTrig_Stoneform( )
call InitTrig_Roar( )
call InitTrig_Disarm( )
call InitTrig_Grow( )
call InitTrig_Divine_Intervention( )
call InitTrig_Rupture( )
call InitTrig_Bleed( )
call InitTrig_Bleed_two( )
call InitTrig_Wounding_Spear( )
call InitTrig_Backstab( )
call InitTrig_Smoke_Screen( )
call InitTrig_Culling_Blade( )
call InitTrig_Revenants( )
call InitTrig_Soul_Assumption( )
call InitTrig_Grave_Chill( )
call InitTrig_DestroyFX( )
call InitTrig_TossUnit( )
call InitTrig_six_orb_Copy( )
call InitTrig_Impetus( )
call InitTrig_Untouchable( )
call InitTrig_Enchant( )
call InitTrig_BlindStrike( )
call InitTrig_MASTER_CASTER( )
call InitTrig_ABILITY_SWITCHBOARD( )
call InitTrig_Battle_Hunger( )
call InitTrig_Berserkers_call( )
call InitTrig_Berserkers_call_Cast( )
call InitTrig_ScatterShot( )
call InitTrig_Counter_Helix( )
call InitTrig_Craggy_Exterior( )
call InitTrig_Mark_Rewrite( )
call InitTrig_Shadowraze( )
call InitTrig_Necromastry( )
call InitTrig_Time_Stop( )
call InitTrig_Spirit_Lance( )
call InitTrig_Dopplewalk( )
call InitTrig_Dopplewalk_Move( )
call InitTrig_Juxtapose( )
call InitTrig_Ante_Up( )
call InitTrig_Ante_Up_death( )
call InitTrig_Roulette_effect( )
call InitTrig_Roulette( )
call InitTrig_Lucky_Stars( )
call InitTrig_All_In( )
call InitTrig_Nether_Ward( )
call InitTrig_Healing_Ward( )
call InitTrig_IlluminateCast( )
call InitTrig_IlluminateCharge( )
call InitTrig_Mana_Leak_effect( )
call InitTrig_Mana_Leak_learn( )
call InitTrig_chakra_magic( )
call InitTrig_Burrowstrike( )
call InitTrig_Epicenter( )
call InitTrig_Entrench( )
call InitTrig_Meat_Hook_Cast( )
call InitTrig_Meat_Hook_Extend( )
call InitTrig_Meat_Hook_Retract( )
call InitTrig_Flesh_Heap( )
call InitTrig_Death_Pulse( )
call InitTrig_Reaper_Scythe( )
call InitTrig_Sadist( )
call InitTrig_Laser( )
call InitTrig_Rearm( )
call InitTrig_Nightmare_Attack( )
call InitTrig_Nightmare_HP( )
call InitTrig_Nightmare( )
call InitTrig_Fiends_Grip_stop( )
call InitTrig_Fiends_Grip_mana( )
call InitTrig_Fiends_Grip_begin( )
call InitTrig_KS_active( )
call InitTrig_KS_learned( )
call InitTrig_Gush( )
call InitTrig_ravage( )
call InitTrig_overgrowth( )
call InitTrig_assassinate( )
call InitTrig_Natures_Guise_check( )
call InitTrig_Natures_Guise_cast( )
call InitTrig_Berserker_Rage_learned( )
call InitTrig_Berserker_Rage( )
call InitTrig_Spider( )
call InitTrig_Spin_Web_Limit( )
call InitTrig_Spin_Web_Invis_Remove( )
call InitTrig_Spirit_Bear_learned( )
call InitTrig_bear_dies( )
call InitTrig_druid_dies( )
call InitTrig_synergy_learned( )
call InitTrig_lone_druid_bonus_learned( )
call InitTrig_Summon_Spirit_Bear( )
call InitTrig_Yggrasil( )
call InitTrig_too_far( )
call InitTrig_Return_Bear( )
call InitTrig_aegis( )
call InitTrig_sunder_switch( )
call InitTrig_Sunder_begin( )
call InitTrig_land_mines_limit( )
call InitTrig_double_edge( )
call InitTrig_death_pact( )
call InitTrig_static_field( )
call InitTrig_track( )
call InitTrig_return( )
call InitTrig_beam_counter( )
call InitTrig_beam_counter_on( )
call InitTrig_refresh( )
call InitTrig_detonate( )
call InitTrig_detonate_given( )
call InitTrig_detonate_1( )
call InitTrig_sprout( )
call InitTrig_holy_light( )
call InitTrig_devour( )
call InitTrig_death( )
call InitTrig_Nether_swap( )
call InitTrig_Purification( )
call InitTrig_new_HitN_3( )
call InitTrig_new_HitN_2( )
call InitTrig_new_HitN( )
call InitTrig_Hunter_in_the_Night( )
call InitTrig_song_of_the_siren_buff( )
call InitTrig_ManaVoid( )
call InitTrig_lightning_bolt( )
call InitTrig_Wrath_of_Zeus_Copy( )
call InitTrig_diabolicedict_new( )
call InitTrig_Reverse_Polarity( )
call InitTrig_omnislash_selection( )
call InitTrig_OmniSlashEffect( )
call InitTrig_omnislash( )
call InitTrig_Poison_Nova_effect( )
call InitTrig_Poison_Nova( )
call InitTrig_eclipse_effect( )
call InitTrig_Eclipse_Cast( )
call InitTrig_chain_freezing_effect( )
call InitTrig_Chain_Freezing_try( )
call InitTrig_void( )
call InitTrig_chaos_bolt( )
call InitTrig_phantom_refresh( )
call InitTrig_blur_learned( )
call InitTrig_moonglaive_3( )
call InitTrig_take_aim( )
call InitTrig_dragon_bug( )
call InitTrig_dragon_bug_2( )
call InitTrig_dragon_bug_3( )
call InitTrig_Freezing_field_Cast( )
call InitTrig_Freezing_field_end( )
call InitTrig_FreezingFieldSpawn2( )
call InitTrig_Morph_learned( )
call InitTrig_morph_turn_on( )
call InitTrig_morph_turn_off( )
call InitTrig_morph_str( )
call InitTrig_morph_agl( )
call InitTrig_morphling_attribute( )
call InitTrig_Copy_steal( )
call InitTrig_Copy_Activate( )
call InitTrig_Copy_Deactivate( )
call InitTrig_Overpower( )
call InitTrig_Enrage( )
call InitTrig_Aftershock( )
call InitTrig_Enchant_Totem( )
call InitTrig_Echo_Slam( )
call InitTrig_Fissure( )
call InitTrig_timer2( )
call InitTrig_timer3( )
call InitTrig_timer4( )
call InitTrig_timer5( )
call InitTrig_timer6( )
call InitTrig_timer8( )
call InitTrig_timer9( )
call InitTrig_timer10( )
call InitTrig_timer11( )
call InitTrig_timer12( )
call InitTrig_Suicide_death( )
call InitTrig_Flag_mana( )
call InitTrig_Mana( )
call InitTrig_NEFlag_Returned( )
call InitTrig_UDFlag_Returned( )
call InitTrig_NEFlag_Forbidden( )
call InitTrig_UDFlag_Forbidden( )
call InitTrig_NEScore( )
call InitTrig_UDScore( )
call InitTrig_PingReturnNE( )
call InitTrig_PingReturnUD( )
call InitTrig_CTFv( )
call InitTrig_IDv( )
call InitTrig_SCv( )
call InitTrig_DEv( )
call InitTrig_MMv( )
call InitTrig_MMa( )
call InitTrig_APv( )
call InitTrig_SMv( )
call InitTrig_DMv( )
call InitTrig_AR( )
call InitTrig_TR( )
call InitTrig_RV1( )
call InitTrig_RV2( )
call InitTrig_PUV( )
call InitTrig_sent_chosen( )
call InitTrig_elapsed_time( )
call InitTrig_Move( )
call InitTrig_multi_hero_correction( )
call InitTrig_ten_minute_elapsed( )
call InitTrig_sheep( )
call InitTrig_elapsed15sec( )
call InitTrig_map_init( )
call InitTrig_OneMinElapsed( )
call InitTrig_RoshanDies( )
call InitTrig_ItemSpawn( )
call InitTrig_SentLMove( )
call InitTrig_ScouLMove( )
call InitTrig_SentMMove( )
call InitTrig_ScouMMove( )
call InitTrig_SentRMove( )
call InitTrig_ScouRMove( )
call InitTrig_elapsed10( )
call InitTrig_elapsed20( )
call InitTrig_elapsed30( )
call InitTrig_spawn_multipler( )
call InitTrig_spawn_multiplier_range( )
call InitTrig_CreepSpawn( )
call InitTrig_Spawn( )
call InitTrig_SpawnGolemFish( )
call InitTrig_SpawnHydra( )
call InitTrig_Consumable_charge( )
call InitTrig_Aghanims_Scepter( )
call InitTrig_ItemSimple( )
call InitTrig_ItemSwap( )
call InitTrig_ItemComplex( )
call InitTrig_forbidden_items( )
call InitTrig_upgrader( )
call InitTrig_Leaderboard_count( )
call InitTrig_Leaderboard_count_2( )
call InitTrig_Sent_trees_die( )
call InitTrig_UD_stuff_dies( )
call InitTrig_UL_crypt( )
call InitTrig_M_crypt( )
call InitTrig_LR_crypt( )
call InitTrig_UL_temple( )
call InitTrig_M_temple( )
call InitTrig_LR_temple( )
call InitTrig_UL_war( )
call InitTrig_M_war( )
call InitTrig_R_war( )
call InitTrig_UL_lore( )
call InitTrig_M_lore( )
call InitTrig_R_lore( )
call InitTrig_Sent_Win( )
call InitTrig_Scourge_Win( )
call InitTrig_display_leaderboard( )
call InitTrig_update_leaderboard_always( )
call InitTrig_update_leaderboard_CTF( )
call InitTrig_update_leaderboard_kills( )
call InitTrig_Sent_Win_Checksum( )
call InitTrig_Scourge_Win_Checksum( )
call InitTrig_S( )
call InitTrig_MatchID_team1( )
call InitTrig_MatchID_team2( )
call InitTrig_Check_Sum( )
call InitTrig_Untitled_Trigger_001( )
call InitTrig_First_Blood( )
call InitTrig_Unstuck( )
call InitTrig_Unstick( )
call InitTrig_Untitled_Trigger_002( )
endfunction
//===========================================================================
function RunInitializationTriggers takes nothing returns nothing
call ConditionalTriggerExecute( gg_trg_Bounty )
call ConditionalTriggerExecute( gg_trg_map_init )
endfunction
//***************************************************************************
//*
//* Upgrades
//*
//***************************************************************************
function InitUpgrades_Player0 takes nothing returns nothing
call SetPlayerTechResearched( Player(0), 'Rhfl', 1 )
call SetPlayerTechResearched( Player(0), 'Rhse', 1 )
call SetPlayerTechResearched( Player(0), 'Rhri', 1 )
call SetPlayerTechResearched( Player(0), 'Rhst', 2 )
call SetPlayerTechResearched( Player(0), 'Rhpt', 2 )
call SetPlayerTechResearched( Player(0), 'Robs', 1 )
call SetPlayerTechResearched( Player(0), 'Rows', 1 )
call SetPlayerTechResearched( Player(0), 'Roen', 1 )
call SetPlayerTechResearched( Player(0), 'Rovs', 1 )
call SetPlayerTechResearched( Player(0), 'Rowd', 2 )
call SetPlayerTechResearched( Player(0), 'Rost', 2 )
call SetPlayerTechResearched( Player(0), 'Rotr', 1 )
call SetPlayerTechResearched( Player(0), 'Ruac', 1 )
call SetPlayerTechResearched( Player(0), 'Ruwb', 1 )
call SetPlayerTechResearched( Player(0), 'Rusf', 1 )
call SetPlayerTechResearched( Player(0), 'Rune', 2 )
call SetPlayerTechResearched( Player(0), 'Ruba', 2 )
call SetPlayerTechResearched( Player(0), 'Rufb', 1 )
call SetPlayerTechResearched( Player(0), 'Rusl', 1 )
call SetPlayerTechResearched( Player(0), 'Rupc', 1 )
call SetPlayerTechResearched( Player(0), 'Renb', 1 )
call SetPlayerTechResearched( Player(0), 'Reuv', 1 )
call SetPlayerTechResearched( Player(0), 'Rhgb', 1 )
endfunction
function InitUpgrades_Player1 takes nothing returns nothing
call SetPlayerTechResearched( Player(1), 'Rhfl', 1 )
call SetPlayerTechResearched( Player(1), 'Rhse', 1 )
call SetPlayerTechResearched( Player(1), 'Rhri', 1 )
call SetPlayerTechResearched( Player(1), 'Rhst', 2 )
call SetPlayerTechResearched( Player(1), 'Rhpt', 2 )
call SetPlayerTechResearched( Player(1), 'Robs', 1 )
call SetPlayerTechResearched( Player(1), 'Rows', 1 )
call SetPlayerTechResearched( Player(1), 'Roen', 1 )
call SetPlayerTechResearched( Player(1), 'Rovs', 1 )
call SetPlayerTechResearched( Player(1), 'Rowd', 2 )
call SetPlayerTechResearched( Player(1), 'Rost', 2 )
call SetPlayerTechResearched( Player(1), 'Rotr', 1 )
call SetPlayerTechResearched( Player(1), 'Ruac', 1 )
call SetPlayerTechResearched( Player(1), 'Ruwb', 1 )
call SetPlayerTechResearched( Player(1), 'Rusf', 1 )
call SetPlayerTechResearched( Player(1), 'Rune', 2 )
call SetPlayerTechResearched( Player(1), 'Ruba', 2 )
call SetPlayerTechResearched( Player(1), 'Rufb', 1 )
call SetPlayerTechResearched( Player(1), 'Rusl', 1 )
call SetPlayerTechResearched( Player(1), 'Rupc', 1 )
call SetPlayerTechResearched( Player(1), 'Resi', 1 )
call SetPlayerTechResearched( Player(1), 'Redc', 2 )
call SetPlayerTechResearched( Player(1), 'Redt', 2 )
call SetPlayerTechResearched( Player(1), 'Rhgb', 1 )
endfunction
function InitUpgrades_Player2 takes nothing returns nothing
call SetPlayerTechResearched( Player(2), 'Rhfl', 1 )
call SetPlayerTechResearched( Player(2), 'Rhse', 1 )
call SetPlayerTechResearched( Player(2), 'Rhri', 1 )
call SetPlayerTechResearched( Player(2), 'Rhst', 2 )
call SetPlayerTechResearched( Player(2), 'Rhpt', 2 )
call SetPlayerTechResearched( Player(2), 'Robs', 1 )
call SetPlayerTechResearched( Player(2), 'Rows', 1 )
call SetPlayerTechResearched( Player(2), 'Roen', 1 )
call SetPlayerTechResearched( Player(2), 'Rovs', 1 )
call SetPlayerTechResearched( Player(2), 'Rowd', 2 )
call SetPlayerTechResearched( Player(2), 'Rost', 2 )
call SetPlayerTechResearched( Player(2), 'Rotr', 1 )
call SetPlayerTechResearched( Player(2), 'Ruac', 1 )
call SetPlayerTechResearched( Player(2), 'Ruwb', 1 )
call SetPlayerTechResearched( Player(2), 'Rusf', 1 )
call SetPlayerTechResearched( Player(2), 'Rune', 2 )
call SetPlayerTechResearched( Player(2), 'Ruba', 2 )
call SetPlayerTechResearched( Player(2), 'Rufb', 1 )
call SetPlayerTechResearched( Player(2), 'Rusl', 1 )
call SetPlayerTechResearched( Player(2), 'Rupc', 1 )
call SetPlayerTechResearched( Player(2), 'Resi', 1 )
call SetPlayerTechResearched( Player(2), 'Redc', 2 )
call SetPlayerTechResearched( Player(2), 'Redt', 2 )
call SetPlayerTechResearched( Player(2), 'Rhgb', 1 )
endfunction
function InitUpgrades_Player3 takes nothing returns nothing
call SetPlayerTechResearched( Player(3), 'Rhfl', 1 )
call SetPlayerTechResearched( Player(3), 'Rhse', 1 )
call SetPlayerTechResearched( Player(3), 'Rhri', 1 )
call SetPlayerTechResearched( Player(3), 'Rhst', 2 )
call SetPlayerTechResearched( Player(3), 'Rhpt', 2 )
call SetPlayerTechResearched( Player(3), 'Robs', 1 )
call SetPlayerTechResearched( Player(3), 'Rows', 1 )
call SetPlayerTechResearched( Player(3), 'Roen', 1 )
call SetPlayerTechResearched( Player(3), 'Rovs', 1 )
call SetPlayerTechResearched( Player(3), 'Rowd', 2 )
call SetPlayerTechResearched( Player(3), 'Rost', 2 )
call SetPlayerTechResearched( Player(3), 'Rotr', 1 )
call SetPlayerTechResearched( Player(3), 'Ruac', 1 )
call SetPlayerTechResearched( Player(3), 'Ruwb', 1 )
call SetPlayerTechResearched( Player(3), 'Rusf', 1 )
call SetPlayerTechResearched( Player(3), 'Rune', 2 )
call SetPlayerTechResearched( Player(3), 'Ruba', 2 )
call SetPlayerTechResearched( Player(3), 'Rufb', 1 )
call SetPlayerTechResearched( Player(3), 'Rusl', 1 )
call SetPlayerTechResearched( Player(3), 'Rupc', 1 )
call SetPlayerTechResearched( Player(3), 'Resi', 1 )
call SetPlayerTechResearched( Player(3), 'Redc', 2 )
call SetPlayerTechResearched( Player(3), 'Redt', 2 )
call SetPlayerTechResearched( Player(3), 'Rhgb', 1 )
endfunction
function InitUpgrades_Player4 takes nothing returns nothing
call SetPlayerTechResearched( Player(4), 'Rhfl', 1 )
call SetPlayerTechResearched( Player(4), 'Rhse', 1 )
call SetPlayerTechResearched( Player(4), 'Rhri', 1 )
call SetPlayerTechResearched( Player(4), 'Rhst', 2 )
call SetPlayerTechResearched( Player(4), 'Rhpt', 2 )
call SetPlayerTechResearched( Player(4), 'Robs', 1 )
call SetPlayerTechResearched( Player(4), 'Rows', 1 )
call SetPlayerTechResearched( Player(4), 'Roen', 1 )
call SetPlayerTechResearched( Player(4), 'Rovs', 1 )
call SetPlayerTechResearched( Player(4), 'Rowd', 2 )
call SetPlayerTechResearched( Player(4), 'Rost', 2 )
call SetPlayerTechResearched( Player(4), 'Rotr', 1 )
call SetPlayerTechResearched( Player(4), 'Ruac', 1 )
call SetPlayerTechResearched( Player(4), 'Ruwb', 1 )
call SetPlayerTechResearched( Player(4), 'Rusf', 1 )
call SetPlayerTechResearched( Player(4), 'Rune', 2 )
call SetPlayerTechResearched( Player(4), 'Ruba', 2 )
call SetPlayerTechResearched( Player(4), 'Rufb', 1 )
call SetPlayerTechResearched( Player(4), 'Rusl', 1 )
call SetPlayerTechResearched( Player(4), 'Rupc', 1 )
call SetPlayerTechResearched( Player(4), 'Resi', 1 )
call SetPlayerTechResearched( Player(4), 'Redc', 2 )
call SetPlayerTechResearched( Player(4), 'Redt', 2 )
call SetPlayerTechResearched( Player(4), 'Rhgb', 1 )
endfunction
function InitUpgrades_Player5 takes nothing returns nothing
call SetPlayerTechResearched( Player(5), 'Rhfl', 1 )
call SetPlayerTechResearched( Player(5), 'Rhse', 1 )
call SetPlayerTechResearched( Player(5), 'Rhri', 1 )
call SetPlayerTechResearched( Player(5), 'Rhst', 2 )
call SetPlayerTechResearched( Player(5), 'Rhpt', 2 )
call SetPlayerTechResearched( Player(5), 'Robs', 1 )
call SetPlayerTechResearched( Player(5), 'Rows', 1 )
call SetPlayerTechResearched( Player(5), 'Roen', 1 )
call SetPlayerTechResearched( Player(5), 'Rovs', 1 )
call SetPlayerTechResearched( Player(5), 'Rowd', 2 )
call SetPlayerTechResearched( Player(5), 'Rost', 2 )
call SetPlayerTechResearched( Player(5), 'Rotr', 1 )
call SetPlayerTechResearched( Player(5), 'Ruac', 1 )
call SetPlayerTechResearched( Player(5), 'Ruwb', 1 )
call SetPlayerTechResearched( Player(5), 'Rusf', 1 )
call SetPlayerTechResearched( Player(5), 'Rune', 2 )
call SetPlayerTechResearched( Player(5), 'Ruba', 2 )
call SetPlayerTechResearched( Player(5), 'Rufb', 1 )
call SetPlayerTechResearched( Player(5), 'Rusl', 1 )
call SetPlayerTechResearched( Player(5), 'Rupc', 1 )
call SetPlayerTechResearched( Player(5), 'Resi', 1 )
call SetPlayerTechResearched( Player(5), 'Redc', 2 )
call SetPlayerTechResearched( Player(5), 'Redt', 2 )
call SetPlayerTechResearched( Player(5), 'Rhgb', 1 )
endfunction
function InitUpgrades_Player6 takes nothing returns nothing
call SetPlayerTechResearched( Player(6), 'Rhfl', 1 )
call SetPlayerTechResearched( Player(6), 'Rhse', 1 )
call SetPlayerTechResearched( Player(6), 'Rhri', 1 )
call SetPlayerTechResearched( Player(6), 'Rhst', 2 )
call SetPlayerTechResearched( Player(6), 'Rhpt', 2 )
call SetPlayerTechResearched( Player(6), 'Robs', 1 )
call SetPlayerTechResearched( Player(6), 'Rows', 1 )
call SetPlayerTechResearched( Player(6), 'Roen', 1 )
call SetPlayerTechResearched( Player(6), 'Rovs', 1 )
call SetPlayerTechResearched( Player(6), 'Rowd', 2 )
call SetPlayerTechResearched( Player(6), 'Rost', 2 )
call SetPlayerTechResearched( Player(6), 'Rotr', 1 )
call SetPlayerTechResearched( Player(6), 'Resi', 1 )
call SetPlayerTechResearched( Player(6), 'Redc', 2 )
call SetPlayerTechResearched( Player(6), 'Redt', 2 )
call SetPlayerTechResearched( Player(6), 'Rhgb', 1 )
endfunction
function InitUpgrades_Player7 takes nothing returns nothing
call SetPlayerTechResearched( Player(7), 'Rhfl', 1 )
call SetPlayerTechResearched( Player(7), 'Rhse', 1 )
call SetPlayerTechResearched( Player(7), 'Rhri', 1 )
call SetPlayerTechResearched( Player(7), 'Rhst', 2 )
call SetPlayerTechResearched( Player(7), 'Rhpt', 2 )
call SetPlayerTechResearched( Player(7), 'Robs', 1 )
call SetPlayerTechResearched( Player(7), 'Rows', 1 )
call SetPlayerTechResearched( Player(7), 'Roen', 1 )
call SetPlayerTechResearched( Player(7), 'Rovs', 1 )
call SetPlayerTechResearched( Player(7), 'Rowd', 2 )
call SetPlayerTechResearched( Player(7), 'Rost', 2 )
call SetPlayerTechResearched( Player(7), 'Rotr', 1 )
call SetPlayerTechResearched( Player(7), 'Ruac', 1 )
call SetPlayerTechResearched( Player(7), 'Ruwb', 1 )
call SetPlayerTechResearched( Player(7), 'Rusf', 1 )
call SetPlayerTechResearched( Player(7), 'Rune', 2 )
call SetPlayerTechResearched( Player(7), 'Ruba', 2 )
call SetPlayerTechResearched( Player(7), 'Rufb', 1 )
call SetPlayerTechResearched( Player(7), 'Rusl', 1 )
call SetPlayerTechResearched( Player(7), 'Rupc', 1 )
call SetPlayerTechResearched( Player(7), 'Resi', 1 )
call SetPlayerTechResearched( Player(7), 'Redc', 2 )
call SetPlayerTechResearched( Player(7), 'Redt', 2 )
call SetPlayerTechResearched( Player(7), 'Rhgb', 1 )
endfunction
function InitUpgrades_Player8 takes nothing returns nothing
call SetPlayerTechResearched( Player(8), 'Rhfl', 1 )
call SetPlayerTechResearched( Player(8), 'Rhse', 1 )
call SetPlayerTechResearched( Player(8), 'Rhri', 1 )
call SetPlayerTechResearched( Player(8), 'Rhst', 2 )
call SetPlayerTechResearched( Player(8), 'Rhpt', 2 )
call SetPlayerTechResearched( Player(8), 'Robs', 1 )
call SetPlayerTechResearched( Player(8), 'Rows', 1 )
call SetPlayerTechResearched( Player(8), 'Roen', 1 )
call SetPlayerTechResearched( Player(8), 'Rovs', 1 )
call SetPlayerTechResearched( Player(8), 'Rowd', 2 )
call SetPlayerTechResearched( Player(8), 'Rost', 2 )
call SetPlayerTechResearched( Player(8), 'Rotr', 1 )
call SetPlayerTechResearched( Player(8), 'Ruac', 1 )
call SetPlayerTechResearched( Player(8), 'Ruwb', 1 )
call SetPlayerTechResearched( Player(8), 'Rusf', 1 )
call SetPlayerTechResearched( Player(8), 'Rune', 2 )
call SetPlayerTechResearched( Player(8), 'Ruba', 2 )
call SetPlayerTechResearched( Player(8), 'Rufb', 1 )
call SetPlayerTechResearched( Player(8), 'Rusl', 1 )
call SetPlayerTechResearched( Player(8), 'Rupc', 1 )
call SetPlayerTechResearched( Player(8), 'Resi', 1 )
call SetPlayerTechResearched( Player(8), 'Redc', 2 )
call SetPlayerTechResearched( Player(8), 'Redt', 2 )
call SetPlayerTechResearched( Player(8), 'Rhgb', 1 )
endfunction
function InitUpgrades_Player9 takes nothing returns nothing
call SetPlayerTechResearched( Player(9), 'Rhfl', 1 )
call SetPlayerTechResearched( Player(9), 'Rhse', 1 )
call SetPlayerTechResearched( Player(9), 'Rhri', 1 )
call SetPlayerTechResearched( Player(9), 'Rhst', 2 )
call SetPlayerTechResearched( Player(9), 'Rhpt', 2 )
call SetPlayerTechResearched( Player(9), 'Robs', 1 )
call SetPlayerTechResearched( Player(9), 'Rows', 1 )
call SetPlayerTechResearched( Player(9), 'Roen', 1 )
call SetPlayerTechResearched( Player(9), 'Rovs', 1 )
call SetPlayerTechResearched( Player(9), 'Rowd', 2 )
call SetPlayerTechResearched( Player(9), 'Rost', 2 )
call SetPlayerTechResearched( Player(9), 'Rotr', 1 )
call SetPlayerTechResearched( Player(9), 'Ruac', 1 )
call SetPlayerTechResearched( Player(9), 'Ruwb', 1 )
call SetPlayerTechResearched( Player(9), 'Rusf', 1 )
call SetPlayerTechResearched( Player(9), 'Rune', 2 )
call SetPlayerTechResearched( Player(9), 'Ruba', 2 )
call SetPlayerTechResearched( Player(9), 'Rufb', 1 )
call SetPlayerTechResearched( Player(9), 'Rusl', 1 )
call SetPlayerTechResearched( Player(9), 'Rupc', 1 )
call SetPlayerTechResearched( Player(9), 'Resi', 1 )
call SetPlayerTechResearched( Player(9), 'Redc', 2 )
call SetPlayerTechResearched( Player(9), 'Redt', 2 )
call SetPlayerTechResearched( Player(9), 'Rhgb', 1 )
endfunction
function InitUpgrades_Player10 takes nothing returns nothing
call SetPlayerTechResearched( Player(10), 'Rhfl', 1 )
call SetPlayerTechResearched( Player(10), 'Rhse', 1 )
call SetPlayerTechResearched( Player(10), 'Rhri', 1 )
call SetPlayerTechResearched( Player(10), 'Rhst', 2 )
call SetPlayerTechResearched( Player(10), 'Rhpt', 2 )
call SetPlayerTechResearched( Player(10), 'Robs', 1 )
call SetPlayerTechResearched( Player(10), 'Rows', 1 )
call SetPlayerTechResearched( Player(10), 'Roen', 1 )
call SetPlayerTechResearched( Player(10), 'Rovs', 1 )
call SetPlayerTechResearched( Player(10), 'Rowd', 2 )
call SetPlayerTechResearched( Player(10), 'Rost', 2 )
call SetPlayerTechResearched( Player(10), 'Rotr', 1 )
call SetPlayerTechResearched( Player(10), 'Ruac', 1 )
call SetPlayerTechResearched( Player(10), 'Ruwb', 1 )
call SetPlayerTechResearched( Player(10), 'Rusf', 1 )
call SetPlayerTechResearched( Player(10), 'Rune', 2 )
call SetPlayerTechResearched( Player(10), 'Ruba', 2 )
call SetPlayerTechResearched( Player(10), 'Rufb', 1 )
call SetPlayerTechResearched( Player(10), 'Rusl', 1 )
call SetPlayerTechResearched( Player(10), 'Rupc', 1 )
call SetPlayerTechResearched( Player(10), 'Resi', 1 )
call SetPlayerTechResearched( Player(10), 'Redc', 2 )
call SetPlayerTechResearched( Player(10), 'Redt', 2 )
call SetPlayerTechResearched( Player(10), 'Rhgb', 1 )
endfunction
function InitUpgrades_Player11 takes nothing returns nothing
call SetPlayerTechResearched( Player(11), 'Rhfl', 1 )
call SetPlayerTechResearched( Player(11), 'Rhse', 1 )
call SetPlayerTechResearched( Player(11), 'Rhri', 1 )
call SetPlayerTechResearched( Player(11), 'Rhst', 2 )
call SetPlayerTechResearched( Player(11), 'Rhpt', 2 )
call SetPlayerTechResearched( Player(11), 'Robs', 1 )
call SetPlayerTechResearched( Player(11), 'Rows', 1 )
call SetPlayerTechResearched( Player(11), 'Roen', 1 )
call SetPlayerTechResearched( Player(11), 'Rovs', 1 )
call SetPlayerTechResearched( Player(11), 'Rowd', 2 )
call SetPlayerTechResearched( Player(11), 'Rost', 2 )
call SetPlayerTechResearched( Player(11), 'Rotr', 1 )
call SetPlayerTechResearched( Player(11), 'Ruac', 1 )
call SetPlayerTechResearched( Player(11), 'Ruwb', 1 )
call SetPlayerTechResearched( Player(11), 'Rusf', 1 )
call SetPlayerTechResearched( Player(11), 'Rune', 2 )
call SetPlayerTechResearched( Player(11), 'Ruba', 2 )
call SetPlayerTechResearched( Player(11), 'Rufb', 1 )
call SetPlayerTechResearched( Player(11), 'Rusl', 1 )
call SetPlayerTechResearched( Player(11), 'Rupc', 1 )
call SetPlayerTechResearched( Player(11), 'Resi', 1 )
call SetPlayerTechResearched( Player(11), 'Redc', 2 )
call SetPlayerTechResearched( Player(11), 'Redt', 2 )
call SetPlayerTechResearched( Player(11), 'Rhgb', 1 )
endfunction
function InitUpgrades takes nothing returns nothing
call InitUpgrades_Player0( )
call InitUpgrades_Player1( )
call InitUpgrades_Player2( )
call InitUpgrades_Player3( )
call InitUpgrades_Player4( )
call InitUpgrades_Player5( )
call InitUpgrades_Player6( )
call InitUpgrades_Player7( )
call InitUpgrades_Player8( )
call InitUpgrades_Player9( )
call InitUpgrades_Player10( )
call InitUpgrades_Player11( )
endfunction
//***************************************************************************
//*
//* TechTree
//*
//***************************************************************************
function InitTechTree_Player0 takes nothing returns nothing
call SetPlayerAbilityAvailable( Player(0), 'Aadm', false )
call SetPlayerAbilityAvailable( Player(0), 'Amim', false )
call SetPlayerAbilityAvailable( Player(0), 'Aspo', false )
call SetPlayerAbilityAvailable( Player(0), 'Auhf', false )
endfunction
function InitTechTree_Player6 takes nothing returns nothing
call SetPlayerAbilityAvailable( Player(6), 'Acri', false )
call SetPlayerAbilityAvailable( Player(6), 'Arai', false )
endfunction
function InitTechTree takes nothing returns nothing
call InitTechTree_Player0( )
call InitTechTree_Player6( )
endfunction
//***************************************************************************
//*
//* Players
//*
//***************************************************************************
function InitCustomPlayerSlots takes nothing returns nothing
// Player 0
call SetPlayerStartLocation( Player(0), 0 )
call ForcePlayerStartLocation( Player(0), 0 )
call SetPlayerColor( Player(0), ConvertPlayerColor(0) )
call SetPlayerRacePreference( Player(0), RACE_PREF_NIGHTELF )
call SetPlayerRaceSelectable( Player(0), false )
call SetPlayerController( Player(0), MAP_CONTROL_COMPUTER )
// Player 1
call SetPlayerStartLocation( Player(1), 1 )
call ForcePlayerStartLocation( Player(1), 1 )
call SetPlayerColor( Player(1), ConvertPlayerColor(1) )
call SetPlayerRacePreference( Player(1), RACE_PREF_NIGHTELF )
call SetPlayerRaceSelectable( Player(1), false )
call SetPlayerController( Player(1), MAP_CONTROL_USER )
// Player 2
call SetPlayerStartLocation( Player(2), 2 )
call ForcePlayerStartLocation( Player(2), 2 )
call SetPlayerColor( Player(2), ConvertPlayerColor(2) )
call SetPlayerRacePreference( Player(2), RACE_PREF_NIGHTELF )
call SetPlayerRaceSelectable( Player(2), false )
call SetPlayerController( Player(2), MAP_CONTROL_USER )
// Player 3
call SetPlayerStartLocation( Player(3), 3 )
call ForcePlayerStartLocation( Player(3), 3 )
call SetPlayerColor( Player(3), ConvertPlayerColor(3) )
call SetPlayerRacePreference( Player(3), RACE_PREF_NIGHTELF )
call SetPlayerRaceSelectable( Player(3), false )
call SetPlayerController( Player(3), MAP_CONTROL_USER )
// Player 4
call SetPlayerStartLocation( Player(4), 4 )
call ForcePlayerStartLocation( Player(4), 4 )
call SetPlayerColor( Player(4), ConvertPlayerColor(4) )
call SetPlayerRacePreference( Player(4), RACE_PREF_NIGHTELF )
call SetPlayerRaceSelectable( Player(4), false )
call SetPlayerController( Player(4), MAP_CONTROL_USER )
// Player 5
call SetPlayerStartLocation( Player(5), 5 )
call ForcePlayerStartLocation( Player(5), 5 )
call SetPlayerColor( Player(5), ConvertPlayerColor(5) )
call SetPlayerRacePreference( Player(5), RACE_PREF_NIGHTELF )
call SetPlayerRaceSelectable( Player(5), false )
call SetPlayerController( Player(5), MAP_CONTROL_USER )
// Player 6
call SetPlayerStartLocation( Player(6), 6 )
call ForcePlayerStartLocation( Player(6), 6 )
call SetPlayerColor( Player(6), ConvertPlayerColor(6) )
call SetPlayerRacePreference( Player(6), RACE_PREF_UNDEAD )
call SetPlayerRaceSelectable( Player(6), false )
call SetPlayerController( Player(6), MAP_CONTROL_COMPUTER )
// Player 7
call SetPlayerStartLocation( Player(7), 7 )
call ForcePlayerStartLocation( Player(7), 7 )
call SetPlayerColor( Player(7), ConvertPlayerColor(7) )
call SetPlayerRacePreference( Player(7), RACE_PREF_UNDEAD )
call SetPlayerRaceSelectable( Player(7), false )
call SetPlayerController( Player(7), MAP_CONTROL_USER )
// Player 8
call SetPlayerStartLocation( Player(8), 8 )
call ForcePlayerStartLocation( Player(8), 8 )
call SetPlayerColor( Player(8), ConvertPlayerColor(8) )
call SetPlayerRacePreference( Player(8), RACE_PREF_UNDEAD )
call SetPlayerRaceSelectable( Player(8), false )
call SetPlayerController( Player(8), MAP_CONTROL_USER )
// Player 9
call SetPlayerStartLocation( Player(9), 9 )
call ForcePlayerStartLocation( Player(9), 9 )
call SetPlayerColor( Player(9), ConvertPlayerColor(9) )
call SetPlayerRacePreference( Player(9), RACE_PREF_UNDEAD )
call SetPlayerRaceSelectable( Player(9), false )
call SetPlayerController( Player(9), MAP_CONTROL_USER )
// Player 10
call SetPlayerStartLocation( Player(10), 10 )
call ForcePlayerStartLocation( Player(10), 10 )
call SetPlayerColor( Player(10), ConvertPlayerColor(10) )
call SetPlayerRacePreference( Player(10), RACE_PREF_UNDEAD )
call SetPlayerRaceSelectable( Player(10), false )
call SetPlayerController( Player(10), MAP_CONTROL_USER )
// Player 11
call SetPlayerStartLocation( Player(11), 11 )
call ForcePlayerStartLocation( Player(11), 11 )
call SetPlayerColor( Player(11), ConvertPlayerColor(11) )
call SetPlayerRacePreference( Player(11), RACE_PREF_UNDEAD )
call SetPlayerRaceSelectable( Player(11), false )
call SetPlayerController( Player(11), MAP_CONTROL_USER )
endfunction
function InitCustomTeams takes nothing returns nothing
// Force: TRIGSTR_8970
call SetPlayerTeam( Player(0), 0 )
call SetPlayerState( Player(0), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(1), 0 )
call SetPlayerState( Player(1), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(2), 0 )
call SetPlayerState( Player(2), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(3), 0 )
call SetPlayerState( Player(3), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(4), 0 )
call SetPlayerState( Player(4), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(5), 0 )
call SetPlayerState( Player(5), PLAYER_STATE_ALLIED_VICTORY, 1 )
// Allied
call SetPlayerAllianceStateAllyBJ( Player(0), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(0), Player(2), true )
call SetPlayerAllianceStateAllyBJ( Player(0), Player(3), true )
call SetPlayerAllianceStateAllyBJ( Player(0), Player(4), true )
call SetPlayerAllianceStateAllyBJ( Player(0), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(0), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(2), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(3), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(4), true )
call SetPlayerAllianceStateAllyBJ( Player(1), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(2), Player(0), true )
call SetPlayerAllianceStateAllyBJ( Player(2), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(2), Player(3), true )
call SetPlayerAllianceStateAllyBJ( Player(2), Player(4), true )
call SetPlayerAllianceStateAllyBJ( Player(2), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(0), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(2), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(4), true )
call SetPlayerAllianceStateAllyBJ( Player(3), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(4), Player(0), true )
call SetPlayerAllianceStateAllyBJ( Player(4), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(4), Player(2), true )
call SetPlayerAllianceStateAllyBJ( Player(4), Player(3), true )
call SetPlayerAllianceStateAllyBJ( Player(4), Player(5), true )
call SetPlayerAllianceStateAllyBJ( Player(5), Player(0), true )
call SetPlayerAllianceStateAllyBJ( Player(5), Player(1), true )
call SetPlayerAllianceStateAllyBJ( Player(5), Player(2), true )
call SetPlayerAllianceStateAllyBJ( Player(5), Player(3), true )
call SetPlayerAllianceStateAllyBJ( Player(5), Player(4), true )
// Shared Vision
call SetPlayerAllianceStateVisionBJ( Player(0), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(0), Player(2), true )
call SetPlayerAllianceStateVisionBJ( Player(0), Player(3), true )
call SetPlayerAllianceStateVisionBJ( Player(0), Player(4), true )
call SetPlayerAllianceStateVisionBJ( Player(0), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(0), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(2), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(3), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(4), true )
call SetPlayerAllianceStateVisionBJ( Player(1), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(2), Player(0), true )
call SetPlayerAllianceStateVisionBJ( Player(2), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(2), Player(3), true )
call SetPlayerAllianceStateVisionBJ( Player(2), Player(4), true )
call SetPlayerAllianceStateVisionBJ( Player(2), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(0), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(2), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(4), true )
call SetPlayerAllianceStateVisionBJ( Player(3), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(4), Player(0), true )
call SetPlayerAllianceStateVisionBJ( Player(4), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(4), Player(2), true )
call SetPlayerAllianceStateVisionBJ( Player(4), Player(3), true )
call SetPlayerAllianceStateVisionBJ( Player(4), Player(5), true )
call SetPlayerAllianceStateVisionBJ( Player(5), Player(0), true )
call SetPlayerAllianceStateVisionBJ( Player(5), Player(1), true )
call SetPlayerAllianceStateVisionBJ( Player(5), Player(2), true )
call SetPlayerAllianceStateVisionBJ( Player(5), Player(3), true )
call SetPlayerAllianceStateVisionBJ( Player(5), Player(4), true )
// Force: TRIGSTR_8976
call SetPlayerTeam( Player(6), 1 )
call SetPlayerState( Player(6), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(7), 1 )
call SetPlayerState( Player(7), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(8), 1 )
call SetPlayerState( Player(8), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(9), 1 )
call SetPlayerState( Player(9), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(10), 1 )
call SetPlayerState( Player(10), PLAYER_STATE_ALLIED_VICTORY, 1 )
call SetPlayerTeam( Player(11), 1 )
call SetPlayerState( Player(11), PLAYER_STATE_ALLIED_VICTORY, 1 )
// Allied
call SetPlayerAllianceStateAllyBJ( Player(6), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(6), Player(8), true )
call SetPlayerAllianceStateAllyBJ( Player(6), Player(9), true )
call SetPlayerAllianceStateAllyBJ( Player(6), Player(10), true )
call SetPlayerAllianceStateAllyBJ( Player(6), Player(11), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(6), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(8), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(9), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(10), true )
call SetPlayerAllianceStateAllyBJ( Player(7), Player(11), true )
call SetPlayerAllianceStateAllyBJ( Player(8), Player(6), true )
call SetPlayerAllianceStateAllyBJ( Player(8), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(8), Player(9), true )
call SetPlayerAllianceStateAllyBJ( Player(8), Player(10), true )
call SetPlayerAllianceStateAllyBJ( Player(8), Player(11), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(6), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(8), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(10), true )
call SetPlayerAllianceStateAllyBJ( Player(9), Player(11), true )
call SetPlayerAllianceStateAllyBJ( Player(10), Player(6), true )
call SetPlayerAllianceStateAllyBJ( Player(10), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(10), Player(8), true )
call SetPlayerAllianceStateAllyBJ( Player(10), Player(9), true )
call SetPlayerAllianceStateAllyBJ( Player(10), Player(11), true )
call SetPlayerAllianceStateAllyBJ( Player(11), Player(6), true )
call SetPlayerAllianceStateAllyBJ( Player(11), Player(7), true )
call SetPlayerAllianceStateAllyBJ( Player(11), Player(8), true )
call SetPlayerAllianceStateAllyBJ( Player(11), Player(9), true )
call SetPlayerAllianceStateAllyBJ( Player(11), Player(10), true )
// Shared Vision
call SetPlayerAllianceStateVisionBJ( Player(6), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(6), Player(8), true )
call SetPlayerAllianceStateVisionBJ( Player(6), Player(9), true )
call SetPlayerAllianceStateVisionBJ( Player(6), Player(10), true )
call SetPlayerAllianceStateVisionBJ( Player(6), Player(11), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(6), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(8), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(9), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(10), true )
call SetPlayerAllianceStateVisionBJ( Player(7), Player(11), true )
call SetPlayerAllianceStateVisionBJ( Player(8), Player(6), true )
call SetPlayerAllianceStateVisionBJ( Player(8), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(8), Player(9), true )
call SetPlayerAllianceStateVisionBJ( Player(8), Player(10), true )
call SetPlayerAllianceStateVisionBJ( Player(8), Player(11), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(6), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(8), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(10), true )
call SetPlayerAllianceStateVisionBJ( Player(9), Player(11), true )
call SetPlayerAllianceStateVisionBJ( Player(10), Player(6), true )
call SetPlayerAllianceStateVisionBJ( Player(10), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(10), Player(8), true )
call SetPlayerAllianceStateVisionBJ( Player(10), Player(9), true )
call SetPlayerAllianceStateVisionBJ( Player(10), Player(11), true )
call SetPlayerAllianceStateVisionBJ( Player(11), Player(6), true )
call SetPlayerAllianceStateVisionBJ( Player(11), Player(7), true )
call SetPlayerAllianceStateVisionBJ( Player(11), Player(8), true )
call SetPlayerAllianceStateVisionBJ( Player(11), Player(9), true )
call SetPlayerAllianceStateVisionBJ( Player(11), Player(10), true )
endfunction
function InitAllyPriorities takes nothing returns nothing
call SetStartLocPrioCount( 0, 5 )
call SetStartLocPrio( 0, 0, 1, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 0, 1, 2, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 0, 2, 3, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 0, 3, 4, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 0, 4, 5, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 1, 2 )
call SetStartLocPrio( 1, 0, 2, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 1, 1, 4, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 2, 1 )
call SetStartLocPrio( 2, 0, 3, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 3, 1 )
call SetStartLocPrio( 3, 0, 2, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 4, 1 )
call SetStartLocPrio( 4, 0, 5, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 5, 1 )
call SetStartLocPrio( 5, 0, 4, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 7, 3 )
call SetStartLocPrio( 7, 0, 8, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 7, 1, 10, MAP_LOC_PRIO_LOW )
call SetStartLocPrio( 7, 2, 11, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 8, 2 )
call SetStartLocPrio( 8, 0, 7, MAP_LOC_PRIO_HIGH )
call SetStartLocPrio( 8, 1, 9, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 9, 1 )
call SetStartLocPrio( 9, 0, 8, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 10, 1 )
call SetStartLocPrio( 10, 0, 11, MAP_LOC_PRIO_HIGH )
call SetStartLocPrioCount( 11, 1 )
call SetStartLocPrio( 11, 0, 10, MAP_LOC_PRIO_HIGH )
endfunction
//***************************************************************************
//*
//* Main Initialization
//*
//***************************************************************************
//===========================================================================
function main takes nothing returns nothing
call SetCameraBounds( -7424.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), -7680.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 7424.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 7168.0 - GetCameraMargin(CAMERA_MARGIN_TOP), -7424.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 7168.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 7424.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), -7680.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) )
call SetDayNightModels( "Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl" )
call NewSoundEnvironment( "Default" )
call SetAmbientDaySound( "VillageDay" )
call SetAmbientNightSound( "VillageNight" )
call SetMapMusic( "Music", true, 0 )
call InitSounds( )
call CreateRegions( )
call CreateCameras( )
call InitUpgrades( )
call InitTechTree( )
call CreateAllUnits( )
call InitBlizzard( )
call InitGlobals( )
call InitCustomTriggers( )
call RunInitializationTriggers( )
endfunction
//***************************************************************************
//*
//* Map Configuration
//*
//***************************************************************************
function config takes nothing returns nothing
call SetMapName( "TRIGSTR_001" )
call SetMapDescription( "TRIGSTR_1862" )
call SetPlayers( 12 )
call SetTeams( 12 )
call SetGamePlacement( MAP_PLACEMENT_TEAMS_TOGETHER )
call DefineStartLocation( 0, -4800.0, -6912.0 )
call DefineStartLocation( 1, -6272.0, -6656.0 )
call DefineStartLocation( 2, -6464.0, -6912.0 )
call DefineStartLocation( 3, -6464.0, -7104.0 )
call DefineStartLocation( 4, -6016.0, -6912.0 )
call DefineStartLocation( 5, -6016.0, -7104.0 )
call DefineStartLocation( 6, 4992.0, 4608.0 )
call DefineStartLocation( 7, 6016.0, 6720.0 )
call DefineStartLocation( 8, 5696.0, 6528.0 )
call DefineStartLocation( 9, 5760.0, 6208.0 )
call DefineStartLocation( 10, 6272.0, 6272.0 )
call DefineStartLocation( 11, 6272.0, 6464.0 )
// Player setup
call InitCustomPlayerSlots( )
call InitCustomTeams( )
call InitAllyPriorities( )
endfunction
function Trig_Revival_trigger_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Revival_trigger_Func002C takes nothing returns boolean
if ( not ( udg_DisarmRestore[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] != GetItemTypeId(null) ) ) then
return false
endif
return true
endfunction
function Trig_Revival_trigger_Func003C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0EV', GetTriggerUnit()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Revival_trigger_Func004C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0E9', GetTriggerUnit()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Revival_trigger_Func005C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('SCva', GetTriggerUnit()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Revival_trigger_Func006C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0AZ', GetTriggerUnit()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Revival_trigger_Func007C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A09J', GetTriggerUnit()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Revival_trigger_Actions takes nothing returns nothing
call SetUnitInvulnerable( GetTriggerUnit(), false )
if ( Trig_Revival_trigger_Func002C() ) then
call UnitAddItemByIdSwapped( udg_DisarmRestore[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], GetTriggerUnit() )
call SetItemCharges( GetLastCreatedItem(), udg_DisarmRestoreNum[GetConvertedPlayerId(GetTriggerPlayer())] )
set udg_DisarmRestore[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemTypeId(null)
set udg_DisarmRestoreNum[GetConvertedPlayerId(GetTriggerPlayer())] = 0
else
endif
if ( Trig_Revival_trigger_Func003C() ) then
call UnitRemoveAbilityBJ( 'A0EV', GetTriggerUnit() )
else
endif
if ( Trig_Revival_trigger_Func004C() ) then
call UnitRemoveAbilityBJ( 'A0E9', GetTriggerUnit() )
else
endif
if ( Trig_Revival_trigger_Func005C() ) then
call UnitRemoveAbilityBJ( 'SCva', GetTriggerUnit() )
else
endif
if ( Trig_Revival_trigger_Func006C() ) then
call UnitRemoveAbilityBJ( 'A0AZ', GetTriggerUnit() )
else
endif
if ( Trig_Revival_trigger_Func007C() ) then
call UnitRemoveAbilityBJ( 'A09J', GetTriggerUnit() )
else
endif
endfunction
//===========================================================================
function InitTrig_Revival_trigger takes nothing returns nothing
set gg_trg_Revival_trigger = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Revival_trigger, EVENT_PLAYER_HERO_REVIVE_FINISH )
call TriggerAddCondition( gg_trg_Revival_trigger, Condition( function Trig_Revival_trigger_Conditions ) )
call TriggerAddAction( gg_trg_Revival_trigger, function Trig_Revival_trigger_Actions )
endfunction
function Trig_entry_Func004C takes nothing returns boolean
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_SUMMONED) == false ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetEnteringUnit()) == false ) ) then
return false
endif
return true
endfunction
function Trig_entry_Conditions takes nothing returns boolean
if ( not Trig_entry_Func004C() ) then
return false
endif
return true
endfunction
function Trig_entry_Func001C takes nothing returns boolean
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_entry_Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Hamg' ) ) then
return false
endif
return true
endfunction
function Trig_entry_Func003C takes nothing returns boolean
if ( not ( IsUnitAlly(GetEnteringUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_entry_Actions takes nothing returns nothing
if ( Trig_entry_Func001C() ) then
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_Hero_Creation_NE), 1.00 )
else
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetEnteringUnit()), GetRectCenter(gg_rct_Hero_Creation_Evil), 1.00 )
endif
if ( Trig_entry_Func002C() ) then
call IssuePointOrderLocBJ( GetTriggerUnit(), "move", PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 10.00, 30.00) )
else
call DoNothing( )
endif
if ( Trig_entry_Func003C() ) then
call SetUnitPositionLoc( GetEnteringUnit(), GetRandomLocInRect(gg_rct_Hero_Creation_NE) )
else
call SetUnitPositionLoc( GetEnteringUnit(), GetRandomLocInRect(gg_rct_Hero_Creation_Evil) )
endif
endfunction
//===========================================================================
function InitTrig_entry takes nothing returns nothing
set gg_trg_entry = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_entry, gg_rct_herospawnsent )
call TriggerRegisterEnterRectSimple( gg_trg_entry, gg_rct_herospawnud )
call TriggerAddCondition( gg_trg_entry, Condition( function Trig_entry_Conditions ) )
call TriggerAddAction( gg_trg_entry, function Trig_entry_Actions )
endfunction
function Trig_entryDE_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_SUMMONED) == false ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetEnteringUnit()) == false ) ) then
return false
endif
return true
endfunction
function Trig_entryDE_Func001Func001C takes nothing returns boolean
if ( not ( udg_DMHeroExp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] <= 14 ) ) then
return false
endif
return true
endfunction
function Trig_entryDE_Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_entryDE_Actions takes nothing returns nothing
if ( Trig_entryDE_Func001C() ) then
if ( Trig_entryDE_Func001Func001C() ) then
call SetHeroLevelBJ( GetTriggerUnit(), ( udg_DMHeroExp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] - 1 ), true )
else
call SetHeroLevelBJ( GetTriggerUnit(), ( udg_DMHeroExp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] - 2 ), true )
endif
else
call DoNothing( )
endif
call UnitAddItemByIdSwapped( udg_DMItemOne[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], GetTriggerUnit() )
call SetItemCharges( GetLastCreatedItem(), udg_DMChargeOne[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
call UnitAddItemByIdSwapped( udg_DMItemTwo[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], GetTriggerUnit() )
call SetItemCharges( GetLastCreatedItem(), udg_DMChargeTwo[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
call UnitAddItemByIdSwapped( udg_DmItemThree[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], GetTriggerUnit() )
call SetItemCharges( GetLastCreatedItem(), udg_DMChargeThree[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
call UnitAddItemByIdSwapped( udg_DMItemFour[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], GetTriggerUnit() )
call SetItemCharges( GetLastCreatedItem(), udg_DMChargeFour[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
call UnitAddItemByIdSwapped( udg_DMItemFive[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], GetTriggerUnit() )
call SetItemCharges( GetLastCreatedItem(), udg_DMChargeFive[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
call UnitAddItemByIdSwapped( udg_DMItemSix[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))], GetTriggerUnit() )
call SetItemCharges( GetLastCreatedItem(), udg_DMChargeSix[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] )
endfunction
//===========================================================================
function InitTrig_entryDE takes nothing returns nothing
set gg_trg_entryDE = CreateTrigger( )
call DisableTrigger( gg_trg_entryDE )
call TriggerRegisterEnterRectSimple( gg_trg_entryDE, GetEntireMapRect() )
call TriggerAddCondition( gg_trg_entryDE, Condition( function Trig_entryDE_Conditions ) )
call TriggerAddAction( gg_trg_entryDE, function Trig_entryDE_Actions )
endfunction
function Trig_RS1_Actions takes nothing returns nothing
call TriggerSleepAction( 0.01 )
call SetPlayerTechMaxAllowedSwap( 'Nbrn', 0, GetOwningPlayer(GetTriggerUnit()) )
call SetPlayerTechMaxAllowedSwap( 'Npbm', 0, GetOwningPlayer(GetTriggerUnit()) )
call SetPlayerTechMaxAllowedSwap( 'H000', 0, GetOwningPlayer(GetTriggerUnit()) )
call SetPlayerTechMaxAllowedSwap( 'Orkn', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Emoo', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Emns', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'O00P', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H004', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'HC92', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hjai', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hvwd', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H001', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hmbr', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Naka', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'E005', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Usyl', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H00K', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Harf', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'HC49', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hlgr', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Edem', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Nbbc', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'EC77', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'E002', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'EC45', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC01', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Eevi', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H00V', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC91', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC42', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U000', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'NC00', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ulic', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'EC57', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC76', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC18', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC11', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC60', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'E004', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00A', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U007', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Udre', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ewar', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U008', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ekee', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N016', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N01O', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N01A', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H00H', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U006', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Obla', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hamg', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ofar', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Oshd', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Huth', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ntin', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hmkg', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hblm', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00K', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00E', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00F', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Uktl', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ubal', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hvsh', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Opgh', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Uanb', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Nfir', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hdgo', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ogrh', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hpb2', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hant', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Otch', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ucrl', 0, GetTriggerPlayer() )
set udg_ReHT[( GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())) + 6 )] = GetUnitTypeId(GetTriggerUnit())
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "A Scourge player will control " + ( GetUnitName(GetTriggerUnit()) + "." ) ) )
call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call RemoveUnit( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_RS1 takes nothing returns nothing
set gg_trg_RS1 = CreateTrigger( )
call DisableTrigger( gg_trg_RS1 )
call TriggerRegisterEnterRectSimple( gg_trg_RS1, gg_rct_herospawnsent )
call TriggerAddAction( gg_trg_RS1, function Trig_RS1_Actions )
endfunction
function Trig_RS2_Actions takes nothing returns nothing
call TriggerSleepAction( 0.01 )
call SetPlayerTechMaxAllowedSwap( 'Nbrn', 0, GetOwningPlayer(GetTriggerUnit()) )
call SetPlayerTechMaxAllowedSwap( 'Npbm', 0, GetOwningPlayer(GetTriggerUnit()) )
call SetPlayerTechMaxAllowedSwap( 'H000', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Orkn', 0, GetOwningPlayer(GetTriggerUnit()) )
call SetPlayerTechMaxAllowedSwap( 'Emoo', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Emns', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'O00P', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H004', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'HC92', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hjai', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hvwd', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H001', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hmbr', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Naka', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'E005', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Usyl', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H00K', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Harf', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'HC49', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hlgr', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Edem', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Nbbc', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'EC77', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'E002', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'EC45', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC01', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Eevi', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H00V', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC91', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC42', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U000', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'NC00', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ulic', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'EC57', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC76', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC18', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC11', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC60', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'E004', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00A', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U007', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Udre', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ewar', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U008', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ekee', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N016', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N01O', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N01A', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H00H', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U006', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Obla', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hamg', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ofar', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Oshd', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Huth', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ntin', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hmkg', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hblm', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00F', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00K', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00E', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Uktl', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ubal', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hvsh', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Opgh', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Uanb', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Nfir', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hdgo', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ogrh', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hpb2', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hant', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Otch', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ucrl', 0, GetTriggerPlayer() )
set udg_ReHT[( GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())) - 6 )] = GetUnitTypeId(GetTriggerUnit())
call RemoveUnit( GetTriggerUnit() )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "A Sentinel player will control " + ( GetUnitName(GetTriggerUnit()) + "." ) ) )
call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
endfunction
//===========================================================================
function InitTrig_RS2 takes nothing returns nothing
set gg_trg_RS2 = CreateTrigger( )
call DisableTrigger( gg_trg_RS2 )
call TriggerRegisterEnterRectSimple( gg_trg_RS2, gg_rct_herospawnud )
call TriggerAddAction( gg_trg_RS2, function Trig_RS2_Actions )
endfunction
function Trig_Money_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 8, Player(1), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 8, Player(2), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 8, Player(3), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 8, Player(4), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 8, Player(5), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 8, Player(7), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 8, Player(8), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 8, Player(9), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 8, Player(10), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 8, Player(11), PLAYER_STATE_RESOURCE_GOLD )
endfunction
//===========================================================================
function InitTrig_Money takes nothing returns nothing
set gg_trg_Money = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Money, 7.00 )
call TriggerAddAction( gg_trg_Money, function Trig_Money_Actions )
endfunction
function Trig_SM_Money_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 10, Player(1), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, Player(2), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, Player(3), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, Player(4), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, Player(5), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, Player(7), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, Player(8), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, Player(9), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, Player(10), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 10, Player(11), PLAYER_STATE_RESOURCE_GOLD )
endfunction
//===========================================================================
function InitTrig_SM_Money takes nothing returns nothing
set gg_trg_SM_Money = CreateTrigger( )
call DisableTrigger( gg_trg_SM_Money )
call TriggerRegisterTimerEventPeriodic( gg_trg_SM_Money, 7.00 )
call TriggerAddAction( gg_trg_SM_Money, function Trig_SM_Money_Actions )
endfunction
function Trig_Deathtrigger_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Invulnerability takes unit Unyt returns nothing
call AddSpecialEffectTargetUnitBJ( "origin", Unyt, "Abilities\\Spells\\Human\\Resurrect\\ResurrectTarget.mdl" )
call TriggerExecute( gg_trg_DestroyFX )
call TriggerSleepAction( 4.00 )
call ReviveHeroLoc( Unyt, GetUnitLoc(Unyt), true )
call SetUnitInvulnerable( Unyt, true )
call TriggerSleepAction( 3.00 )
call SetUnitInvulnerable( Unyt, false )
endfunction
function Trig_Deathtrigger_Actions takes nothing returns nothing
if ( IsUnitEnemy(GetDyingUnit(), GetOwningPlayer(GetKillingUnitBJ())) == true ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))] + ( GetPlayerName(GetOwningPlayer(GetKillingUnitBJ())) + ( "|r just pawned " + ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))] + ( GetPlayerName(GetOwningPlayer(GetDyingUnit())) + ( "|r's head for an extra " + ( I2S(( 100 + ( GetHeroLevel(GetDyingUnit()) * 5 ) )) + " gold!" ) ) ) ) ) ) ) )
call AdjustPlayerStateBJ( ( 100 + ( GetHeroLevel(GetDyingUnit()) * 5 ) ), GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_GOLD )
endif
if ( udg_DMBool == true ) then
set udg_DMItemOne[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), 1))
set udg_DMItemTwo[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), 2))
set udg_DmItemThree[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), 3))
set udg_DMItemFour[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), 4))
set udg_DMItemFive[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), 5))
set udg_DMItemSix[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), 6))
set udg_DMChargeOne[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(), 1))
set udg_DMChargeTwo[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(), 2))
set udg_DMChargeThree[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(), 3))
set udg_DMChargeFour[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(), 4))
set udg_DMChargeFive[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(), 5))
set udg_DMChargeSix[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetItemCharges(UnitItemInSlotBJ(GetTriggerUnit(), 6))
endif
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(7) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(8) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(9) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(10) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(11) ) ) then
if ( udg_TeamReincarnation[1] > 0 ) then
set udg_TeamReincarnation[1] = ( udg_TeamReincarnation[1] - 1 )
call Invulnerability(GetTriggerUnit())
else
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "|cffff0000 Level " + ( I2S(GetHeroLevel(GetDyingUnit())) + ( " Sentinel Death.|r Revival in " + ( I2S(( GetHeroLevel(GetDyingUnit()) * 4 )) + " seconds." ) ) ) ) )
call HeroKillTally( GetDyingUnit(), GetKillingUnitBJ() )
if ( udg_ItemDrop == true ) then
call UnitRemoveItemFromSlotSwapped( GetRandomInt(1, 6), GetDyingUnit() )
else
call AdjustPlayerStateBJ( ( GetHeroLevel(GetDyingUnit()) * -30 ), GetOwningPlayer(GetDyingUnit()), PLAYER_STATE_RESOURCE_GOLD )
endif
call StartTimerBJ( udg_PTimer[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))], false, ( I2R(GetHeroLevel(GetDyingUnit())) * 4.00 ) )
if (udg_DMBool == false) then
call PolledWait( ( I2R(GetHeroLevel(GetDyingUnit())) * 4.00 ) )
if ( IsUnitDeadBJ(GetTriggerUnit()) == true ) then
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetDyingUnit()), GetRectCenter(gg_rct_Hero_Creation_NE), 1.00 )
endif
call ReviveHeroLoc( GetTriggerUnit(), GetRectCenter(gg_rct_Hero_Creation_NE), true )
else
set udg_HeroesDead[1] = ( udg_HeroesDead[1] + 1 )
set udg_DMHeroExp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetHeroLevel(GetTriggerUnit())
set udg_DMHeroMoney[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( 125 + ( 100 * udg_DMHeroExp[1] ) )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, 5 )
call RemoveUnit( GetDyingUnit() )
if ( udg_HeroesDead[1] == 30 ) then
call TriggerExecute( gg_trg_Scourge_Win )
endif
endif
endif
endif
endif
endif
endif
endif
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(1) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(2) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(3) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(4) ) ) then
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(5) ) ) then
if ( udg_TeamReincarnation[2] > 0 ) then
set udg_TeamReincarnation[2] = ( udg_TeamReincarnation[2] - 1 )
call Invulnerability(GetTriggerUnit())
else
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "|cff00ff00 Level " + ( I2S(GetHeroLevel(GetDyingUnit())) + ( " Scourge Death.|r Revival in " + ( I2S(( GetHeroLevel(GetDyingUnit()) * 4 )) + " seconds." ) ) ) ) )
call HeroKillTally( GetDyingUnit(), GetKillingUnitBJ() )
if ( udg_ItemDrop == true ) then
call UnitRemoveItemFromSlotSwapped( GetRandomInt(1, 6), GetDyingUnit() )
else
call AdjustPlayerStateBJ( ( GetHeroLevel(GetDyingUnit()) * -30 ), GetOwningPlayer(GetDyingUnit()), PLAYER_STATE_RESOURCE_GOLD )
endif
call StartTimerBJ( udg_PTimer[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))], false, ( I2R(GetHeroLevel(GetDyingUnit())) * 4.00 ) )
if (udg_DMBool == false) then
call PolledWait( ( I2R(GetHeroLevel(GetDyingUnit())) * 4.00 ) )
if ( IsUnitDeadBJ(GetTriggerUnit()) == true ) then
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetDyingUnit()), GetRectCenter(gg_rct_Hero_Creation_Evil), 1.00 )
endif
call ReviveHeroLoc( GetTriggerUnit(), GetRectCenter(gg_rct_Hero_Creation_Evil), true )
else
set udg_HeroesDead[2] = ( udg_HeroesDead[2] + 1 )
set udg_DMHeroExp[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = GetHeroLevel(GetTriggerUnit())
set udg_DMHeroMoney[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( 125 + ( 100 * udg_DMHeroExp[1] ) )
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_CAP, 5 )
call RemoveUnit( GetDyingUnit() )
if ( udg_HeroesDead[2] == 30 ) then
call TriggerExecute( gg_trg_Sent_Win )
endif
endif
endif
endif
endif
endif
endif
endif
endfunction
//===========================================================================
function InitTrig_Deathtrigger takes nothing returns nothing
set gg_trg_Deathtrigger = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Deathtrigger, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Deathtrigger, Condition( function Trig_Deathtrigger_Conditions ) )
call TriggerAddAction( gg_trg_Deathtrigger, function Trig_Deathtrigger_Actions )
endfunction
function Trig_SentD_DE2_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE2_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE2_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE2_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE2_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE2_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE2_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE2_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE2_Actions takes nothing returns nothing
if ( Trig_SentD_DE2_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_SentD_DE2_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(1), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(1), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE2_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_SentD_DE2_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(1), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(1), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE2_Func003C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 36
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE2_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(1) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE2_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE2_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(1) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_SentD_DE2 takes nothing returns nothing
set gg_trg_SentD_DE2 = CreateTrigger( )
call DisableTrigger( gg_trg_SentD_DE2 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_SentD_DE2, udg_PTimer[2] )
call TriggerAddAction( gg_trg_SentD_DE2, function Trig_SentD_DE2_Actions )
endfunction
function Trig_SentD_DE3_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE3_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE3_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE3_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE3_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE3_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE3_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE3_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE3_Actions takes nothing returns nothing
if ( Trig_SentD_DE3_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_SentD_DE3_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(2), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(2), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(2), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE3_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_SentD_DE3_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(2), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(2), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(2), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE3_Func003C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 36
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE3_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(2) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE3_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE3_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(2) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_SentD_DE3 takes nothing returns nothing
set gg_trg_SentD_DE3 = CreateTrigger( )
call DisableTrigger( gg_trg_SentD_DE3 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_SentD_DE3, udg_PTimer[3] )
call TriggerAddAction( gg_trg_SentD_DE3, function Trig_SentD_DE3_Actions )
endfunction
function Trig_SentD_DE4_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE4_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE4_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE4_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE4_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE4_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE4_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE4_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE4_Actions takes nothing returns nothing
if ( Trig_SentD_DE4_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_SentD_DE4_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(3), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(3), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(3), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE4_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_SentD_DE4_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(3), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(3), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(3), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE4_Func003C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 36
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE4_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(3) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE4_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE4_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(3) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_SentD_DE4 takes nothing returns nothing
set gg_trg_SentD_DE4 = CreateTrigger( )
call DisableTrigger( gg_trg_SentD_DE4 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_SentD_DE4, udg_PTimer[4] )
call TriggerAddAction( gg_trg_SentD_DE4, function Trig_SentD_DE4_Actions )
endfunction
function Trig_SentD_DE5_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE5_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE5_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE5_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE5_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE5_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE5_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE5_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE5_Actions takes nothing returns nothing
if ( Trig_SentD_DE5_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_SentD_DE5_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(4), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(4), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(4), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE5_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_SentD_DE5_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(4), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(4), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(4), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE5_Func003C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 36
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE5_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(4) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE5_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE5_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(4) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_SentD_DE5 takes nothing returns nothing
set gg_trg_SentD_DE5 = CreateTrigger( )
call DisableTrigger( gg_trg_SentD_DE5 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_SentD_DE5, udg_PTimer[5] )
call TriggerAddAction( gg_trg_SentD_DE5, function Trig_SentD_DE5_Actions )
endfunction
function Trig_SentD_DE6_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE6_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE6_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE6_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE6_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE6_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE6_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE6_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_SentD_DE6_Actions takes nothing returns nothing
if ( Trig_SentD_DE6_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_SentD_DE6_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(5), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(5), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(5), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE6_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_SentD_DE6_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(5), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(5), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(5), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE6_Func003C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 36
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE6_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(5) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_SentD_DE6_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_SentD_DE6_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(5) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_SentD_DE6 takes nothing returns nothing
set gg_trg_SentD_DE6 = CreateTrigger( )
call DisableTrigger( gg_trg_SentD_DE6 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_SentD_DE6, udg_PTimer[6] )
call TriggerAddAction( gg_trg_SentD_DE6, function Trig_SentD_DE6_Actions )
endfunction
function Trig_ScouD_DE8_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE8_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE8_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE8_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE8_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE8_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE8_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE8_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE8_Actions takes nothing returns nothing
if ( Trig_ScouD_DE8_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_ScouD_DE8_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(7), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(7), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(7), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE8_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_ScouD_DE8_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(7), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(7), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(7), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE8_Func003C() ) then
set bj_forLoopAIndex = 37
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE8_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(7) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE8_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE8_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(7) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_ScouD_DE8 takes nothing returns nothing
set gg_trg_ScouD_DE8 = CreateTrigger( )
call DisableTrigger( gg_trg_ScouD_DE8 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_ScouD_DE8, udg_PTimer[8] )
call TriggerAddAction( gg_trg_ScouD_DE8, function Trig_ScouD_DE8_Actions )
endfunction
function Trig_ScouD_DE9_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE9_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE9_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE9_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE9_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE9_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE9_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE9_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE9_Actions takes nothing returns nothing
if ( Trig_ScouD_DE9_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_ScouD_DE9_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(8), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(8), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(8), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE9_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_ScouD_DE9_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(8), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(8), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(8), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE9_Func003C() ) then
set bj_forLoopAIndex = 37
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE9_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(8) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE9_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE9_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(8) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_ScouD_DE9 takes nothing returns nothing
set gg_trg_ScouD_DE9 = CreateTrigger( )
call DisableTrigger( gg_trg_ScouD_DE9 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_ScouD_DE9, udg_PTimer[9] )
call TriggerAddAction( gg_trg_ScouD_DE9, function Trig_ScouD_DE9_Actions )
endfunction
function Trig_ScouD_DE10_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE10_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE10_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE10_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE10_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE10_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE10_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE10_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE10_Actions takes nothing returns nothing
if ( Trig_ScouD_DE10_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_ScouD_DE10_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(9), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(9), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(9), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE10_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_ScouD_DE10_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(9), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(9), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(9), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE10_Func003C() ) then
set bj_forLoopAIndex = 37
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE10_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(9) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE10_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE10_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(9) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_ScouD_DE10 takes nothing returns nothing
set gg_trg_ScouD_DE10 = CreateTrigger( )
call DisableTrigger( gg_trg_ScouD_DE10 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_ScouD_DE10, udg_PTimer[10] )
call TriggerAddAction( gg_trg_ScouD_DE10, function Trig_ScouD_DE10_Actions )
endfunction
function Trig_ScouD_DE11_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE11_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE11_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE11_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE11_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE11_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE11_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE11_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE11_Actions takes nothing returns nothing
if ( Trig_ScouD_DE11_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_ScouD_DE11_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(10), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(10), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(10), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE11_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_ScouD_DE11_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(10), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(10), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(10), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE11_Func003C() ) then
set bj_forLoopAIndex = 37
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE11_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(10) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE11_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE11_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(10) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_ScouD_DE11 takes nothing returns nothing
set gg_trg_ScouD_DE11 = CreateTrigger( )
call DisableTrigger( gg_trg_ScouD_DE11 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_ScouD_DE11, udg_PTimer[11] )
call TriggerAddAction( gg_trg_ScouD_DE11, function Trig_ScouD_DE11_Actions )
endfunction
function Trig_ScouD_DE12_Func001Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE12_Func001C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE12_Func002Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE12_Func002C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE12_Func003Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE12_Func003C takes nothing returns boolean
if ( not ( udg_AROn == false ) ) then
return false
endif
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_APOn == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE12_Func004Func002Func001C takes nothing returns boolean
if ( not ( udg_HeroFlags[GetForLoopIndexA()] == false ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE12_Func004C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_ScouD_DE12_Actions takes nothing returns nothing
if ( Trig_ScouD_DE12_Func001C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_ScouD_DE12_Func001Func005C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(11), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(11), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(11), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE12_Func002C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_ScouD_DE12_Func002Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(11), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(11), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(11), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE12_Func003C() ) then
set bj_forLoopAIndex = 37
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE12_Func003Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(11) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_ScouD_DE12_Func004C() ) then
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 72
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ScouD_DE12_Func004Func002Func001C() ) then
call SetPlayerTechMaxAllowedSwap( udg_RandHero[GetForLoopIndexA()], 1, Player(11) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_ScouD_DE12 takes nothing returns nothing
set gg_trg_ScouD_DE12 = CreateTrigger( )
call DisableTrigger( gg_trg_ScouD_DE12 )
call TriggerRegisterTimerExpireEventBJ( gg_trg_ScouD_DE12, udg_PTimer[12] )
call TriggerAddAction( gg_trg_ScouD_DE12, function Trig_ScouD_DE12_Actions )
endfunction
function Trig_Leave_Func002Func002Func001Func003C takes nothing returns boolean
if ( not ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Func002Func002Func001C takes nothing returns boolean
if ( not ( GetForLoopIndexA() != GetConvertedPlayerId(GetTriggerPlayer()) ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Func002Func005Func001Func003C takes nothing returns boolean
if ( not ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Func002Func005Func001C takes nothing returns boolean
if ( not ( GetForLoopIndexA() != GetConvertedPlayerId(GetTriggerPlayer()) ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Func002C takes nothing returns boolean
if ( not ( IsPlayerAlly(GetTriggerPlayer(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Leave_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 15.00, ( GetPlayerName(GetTriggerPlayer()) + " has left the game." ) )
if ( Trig_Leave_Func002C() ) then
set udg_SNum = ( udg_SNum - 1 )
set bj_forLoopAIndex = 2
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Leave_Func002Func005Func001C() ) then
call SetPlayerAllianceStateBJ( GetTriggerPlayer(), ConvertedPlayer(GetForLoopIndexA()), bj_ALLIANCE_ALLIED_UNITS )
if ( Trig_Leave_Func002Func005Func001Func003C() ) then
call AdjustPlayerStateBJ( ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) / udg_SNum ), ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_GOLD )
call SetPlayerTaxRateBJ( ( 100 / udg_SNum ), PLAYER_STATE_RESOURCE_GOLD, GetTriggerPlayer(), ConvertedPlayer(GetForLoopIndexA()) )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
set udg_UDNum = ( udg_UDNum - 1 )
set bj_forLoopAIndex = 8
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Leave_Func002Func002Func001C() ) then
call SetPlayerAllianceStateBJ( GetTriggerPlayer(), ConvertedPlayer(GetForLoopIndexA()), bj_ALLIANCE_ALLIED_UNITS )
if ( Trig_Leave_Func002Func002Func001Func003C() ) then
call AdjustPlayerStateBJ( ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) / udg_UDNum ), ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_GOLD )
call SetPlayerTaxRateBJ( ( 100 / udg_UDNum ), PLAYER_STATE_RESOURCE_GOLD, GetTriggerPlayer(), ConvertedPlayer(GetForLoopIndexA()) )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endif
call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD, 0 )
endfunction
//===========================================================================
function InitTrig_Leave takes nothing returns nothing
set gg_trg_Leave = CreateTrigger( )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(1) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(2) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(3) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(4) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(5) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(7) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(8) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(9) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(10) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leave, Player(11) )
call TriggerAddAction( gg_trg_Leave, function Trig_Leave_Actions )
endfunction
// Trigger: Bounty
//===========================================================================
function Trig_Exp_Decay_And_Bounty_Actions takes nothing returns nothing
call SetTimeOfDay( 6.00 )
call UseTimeOfDayBJ( true )
call SetTimeOfDayScalePercentBJ( 50.00 )
call SetSkyModel( "Environment\\Sky\\FoggedSky\\FoggedSky.mdl" )
call SetPlayerHandicapXPBJ( Player(1), 100.00 )
call SetPlayerHandicapXPBJ( Player(2), 100.00 )
call SetPlayerHandicapXPBJ( Player(3), 100.00 )
call SetPlayerHandicapXPBJ( Player(4), 100.00 )
call SetPlayerHandicapXPBJ( Player(5), 100.00 )
call SetPlayerHandicapXPBJ( Player(7), 100.00 )
call SetPlayerHandicapXPBJ( Player(8), 100.00 )
call SetPlayerHandicapXPBJ( Player(9), 100.00 )
call SetPlayerHandicapXPBJ( Player(10), 100.00 )
call SetPlayerHandicapXPBJ( Player(11), 100.00 )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(0) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(1) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(2) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(3) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(4) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(5) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(6) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(7) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(8) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(9) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(10) )
call SetPlayerFlagBJ( PLAYER_STATE_GIVES_BOUNTY, true, Player(11) )
endfunction
function InitTrig_Bounty takes nothing returns nothing
set gg_trg_Bounty = CreateTrigger( )
call TriggerAddAction( gg_trg_Bounty, function Trig_Exp_Decay_And_Bounty_Actions )
endfunction
function Trig_Tree_Recreation_Func002002 takes nothing returns nothing
call DestructableRestoreLife( GetEnumDestructable(), GetDestructableMaxLife(GetEnumDestructable()), false )
endfunction
function Trig_Tree_Recreation_Actions takes nothing returns nothing
call TriggerSleepAction( 30.00 )
call EnumDestructablesInRectAll( GetEntireMapRect(), function Trig_Tree_Recreation_Func002002 )
endfunction
function InitTrig_Tree takes nothing returns nothing
set gg_trg_Tree = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Tree, 300.00 )
call TriggerAddAction( gg_trg_Tree, function Trig_Tree_Recreation_Actions )
endfunction
function Trig_NoDouble_Actions takes nothing returns nothing
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(1) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(2) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(3) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(4) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(5) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(7) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(8) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(9) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(10) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetEnteringUnit()), 0, Player(11) )
set udg_HeroFlags[GetUnitPointValue(GetEnteringUnit())] = true
endfunction
//===========================================================================
function InitTrig_NoDouble takes nothing returns nothing
set gg_trg_NoDouble = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_NoDouble, gg_rct_herospawnud )
call TriggerRegisterEnterRectSimple( gg_trg_NoDouble, gg_rct_herospawnsent )
call TriggerAddAction( gg_trg_NoDouble, function Trig_NoDouble_Actions )
endfunction
function Trig_HeroL1_Actions takes nothing returns nothing
call SetPlayerStateBJ( GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call SetPlayerTechMaxAllowedSwap( 'Nbrn', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Npbm', 0, GetOwningPlayer(GetTriggerUnit()) )
call SetPlayerTechMaxAllowedSwap( 'H000', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Orkn', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Emoo', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Emns', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'O00P', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H004', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N01O', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'HC92', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hjai', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hvwd', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H001', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hmbr', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Naka', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'E005', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Usyl', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H00K', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Harf', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'HC49', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hlgr', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Edem', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Nbbc', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'EC77', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'E002', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'EC45', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC01', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Eevi', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H00V', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC91', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC42', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U000', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'NC00', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ulic', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'EC57', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC76', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC18', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC11', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'UC60', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'E004', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00A', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U007', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Udre', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ewar', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U008', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ekee', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N016', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N01O', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'N01A', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'H00H', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U006', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Obla', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hamg', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hmkg', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hblm', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ofar', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Oshd', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Huth', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ntin', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00F', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00E', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'U00K', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Otch', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hpb2', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Opgh', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hvsh', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ucrl', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Nfir', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hant', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ogrh', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Uktl', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Ubal', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Uanb', 0, GetTriggerPlayer() )
call SetPlayerTechMaxAllowedSwap( 'Hdgo', 0, GetTriggerPlayer() )
endfunction
//===========================================================================
function InitTrig_HeroL1 takes nothing returns nothing
set gg_trg_HeroL1 = CreateTrigger( )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(1), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(2), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(3), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(4), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(5), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(7), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(8), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(9), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(10), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroL1, Player(11), PLAYER_STATE_RESOURCE_FOOD_USED, EQUAL, 5.00 )
call TriggerAddAction( gg_trg_HeroL1, function Trig_HeroL1_Actions )
endfunction
function Trig_HeroL2_Func001Func001C takes nothing returns boolean
if ( not ( GetForLoopIndexA() != 7 ) ) then
return false
endif
return true
endfunction
function Trig_HeroL2_Actions takes nothing returns nothing
set bj_forLoopAIndex = 2
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_HeroL2_Func001Func001C() ) then
call SetPlayerTechMaxAllowedSwap( 'Ntin', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Npbm', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Naka', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'H000', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'N016', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Orkn', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Emoo', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Emns', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'O00P', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'H004', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hmbr', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Nbrn', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Huth', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Harf', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'HC49', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hlgr', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'H00K', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'E005', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'N01O', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'H001', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'HC92', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Usyl', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'UC01', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'H00V', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Nbbc', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Edem', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'U000', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Ulic', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'UC42', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'UC91', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'EC77', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'E002', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Eevi', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'E004', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'UC60', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'UC76', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'EC57', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'U00A', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Ewar', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'U007', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'U008', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'UC18', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'UC11', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'NC00', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'EC45', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Ekee', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Udre', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hjai', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'N01O', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'N01A', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'U006', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'H00H', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Obla', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hamg', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Ofar', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Oshd', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Npbm', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hvwd', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hmkg', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hblm', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'U00F', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'U00E', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'U00K', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Otch', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hpb2', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hvsh', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Ucrl', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Nfir', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hant', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Opgh', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Ogrh', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Hdgo', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Uktl', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Ubal', 0, ConvertedPlayer(GetForLoopIndexA()) )
call SetPlayerTechMaxAllowedSwap( 'Uanb', 0, ConvertedPlayer(GetForLoopIndexA()) )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_HeroL2 takes nothing returns nothing
set gg_trg_HeroL2 = CreateTrigger( )
call TriggerAddAction( gg_trg_HeroL2, function Trig_HeroL2_Actions )
endfunction
function Trig_RandomUD_Func007C takes nothing returns boolean
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_CAP) == 5 ) ) then
return false
endif
if ( not ( udg_Elapsed20 == true ) ) then
return false
endif
return true
endfunction
function Trig_RandomUD_Conditions takes nothing returns boolean
if ( not Trig_RandomUD_Func007C() ) then
return false
endif
return true
endfunction
function Trig_RandomUD_Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RandomUD_Actions takes nothing returns nothing
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 66)
if ( Trig_RandomUD_Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(1) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(2) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(3) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(4) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(5) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(7) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(8) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(9) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(10) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(11) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_RandomUD takes nothing returns nothing
set gg_trg_RandomUD = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUD, Player(7), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUD, Player(8), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUD, Player(9), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUD, Player(10), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUD, Player(11), "-random", true )
call TriggerAddCondition( gg_trg_RandomUD, Condition( function Trig_RandomUD_Conditions ) )
call TriggerAddAction( gg_trg_RandomUD, function Trig_RandomUD_Actions )
endfunction
function Trig_RandomUDAP_Func007C takes nothing returns boolean
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_CAP) == 5 ) ) then
return false
endif
if ( not ( udg_Elapsed20 == true ) ) then
return false
endif
return true
endfunction
function Trig_RandomUDAP_Conditions takes nothing returns boolean
if ( not Trig_RandomUDAP_Func007C() ) then
return false
endif
return true
endfunction
function Trig_RandomUDAP_Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RandomUDAP_Actions takes nothing returns nothing
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_RandomUDAP_Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(1) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(2) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(3) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(4) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(5) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(7) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(8) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(9) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(10) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(11) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_RandomUDAP takes nothing returns nothing
set gg_trg_RandomUDAP = CreateTrigger( )
call DisableTrigger( gg_trg_RandomUDAP )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUDAP, Player(7), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUDAP, Player(8), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUDAP, Player(9), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUDAP, Player(10), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomUDAP, Player(11), "-random", true )
call TriggerAddCondition( gg_trg_RandomUDAP, Condition( function Trig_RandomUDAP_Conditions ) )
call TriggerAddAction( gg_trg_RandomUDAP, function Trig_RandomUDAP_Actions )
endfunction
function Trig_RandomS_Func007C takes nothing returns boolean
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_CAP) == 5 ) ) then
return false
endif
if ( not ( udg_Elapsed20 == true ) ) then
return false
endif
return true
endfunction
function Trig_RandomS_Conditions takes nothing returns boolean
if ( not Trig_RandomS_Func007C() ) then
return false
endif
return true
endfunction
function Trig_RandomS_Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RandomS_Actions takes nothing returns nothing
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 30)
if ( Trig_RandomS_Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(1) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(2) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(3) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(4) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(5) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(7) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(8) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(9) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(10) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(11) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_RandomS takes nothing returns nothing
set gg_trg_RandomS = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomS, Player(1), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomS, Player(2), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomS, Player(3), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomS, Player(4), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomS, Player(5), "-random", true )
call TriggerAddCondition( gg_trg_RandomS, Condition( function Trig_RandomS_Conditions ) )
call TriggerAddAction( gg_trg_RandomS, function Trig_RandomS_Actions )
endfunction
function Trig_RandomSAP_Func007C takes nothing returns boolean
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_CAP) == 5 ) ) then
return false
endif
if ( not ( udg_Elapsed20 == true ) ) then
return false
endif
return true
endfunction
function Trig_RandomSAP_Conditions takes nothing returns boolean
if ( not Trig_RandomSAP_Func007C() ) then
return false
endif
return true
endfunction
function Trig_RandomSAP_Func004C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RandomSAP_Actions takes nothing returns nothing
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_RandomSAP_Func004C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(1) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(2) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(3) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(4) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(5) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(7) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(8) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(9) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(10) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(11) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_RandomSAP takes nothing returns nothing
set gg_trg_RandomSAP = CreateTrigger( )
call DisableTrigger( gg_trg_RandomSAP )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomSAP, Player(1), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomSAP, Player(2), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomSAP, Player(3), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomSAP, Player(4), "-random", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RandomSAP, Player(5), "-random", true )
call TriggerAddCondition( gg_trg_RandomSAP, Condition( function Trig_RandomSAP_Conditions ) )
call TriggerAddAction( gg_trg_RandomSAP, function Trig_RandomSAP_Actions )
endfunction
function Trig_RepUD_Func011C takes nothing returns boolean
if ( not ( udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
if ( not ( udg_OneMin == false ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) == 5 ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) >= 150 ) ) then
return false
endif
return true
endfunction
function Trig_RepUD_Conditions takes nothing returns boolean
if ( not Trig_RepUD_Func011C() ) then
return false
endif
return true
endfunction
function Trig_RepUD_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == GetTriggerPlayer() ) ) then
return false
endif
return true
endfunction
function Trig_RepUD_Func004A takes nothing returns nothing
if ( Trig_RepUD_Func004Func001C() ) then
set udg_ReT[GetConvertedPlayerId(GetTriggerPlayer())] = GetUnitTypeId(GetEnumUnit())
call DisplayTimedTextToForce( GetPlayersEnemies(ConvertedPlayer(udg_RePN)), 10.00, "TRIGSTR_8791" )
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_RepUD_Func008C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RepUD_Actions takes nothing returns nothing
set udg_RePN = GetConvertedPlayerId(GetTriggerPlayer())
call AdjustPlayerStateBJ( -150, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
set udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] = true
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_RepUD_Func004A )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 66)
if ( Trig_RepUD_Func008C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(1) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(2) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(3) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(4) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(5) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(7) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(8) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(9) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(10) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(11) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_RepUD takes nothing returns nothing
set gg_trg_RepUD = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUD, Player(7), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUD, Player(8), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUD, Player(9), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUD, Player(10), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUD, Player(11), "-repick", true )
call TriggerAddCondition( gg_trg_RepUD, Condition( function Trig_RepUD_Conditions ) )
call TriggerAddAction( gg_trg_RepUD, function Trig_RepUD_Actions )
endfunction
function Trig_RepUDAP_Func011C takes nothing returns boolean
if ( not ( udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
if ( not ( udg_OneMin == false ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) == 5 ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) >= 150 ) ) then
return false
endif
return true
endfunction
function Trig_RepUDAP_Conditions takes nothing returns boolean
if ( not Trig_RepUDAP_Func011C() ) then
return false
endif
return true
endfunction
function Trig_RepUDAP_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == GetTriggerPlayer() ) ) then
return false
endif
return true
endfunction
function Trig_RepUDAP_Func004A takes nothing returns nothing
if ( Trig_RepUDAP_Func004Func001C() ) then
set udg_ReT[GetConvertedPlayerId(GetTriggerPlayer())] = GetUnitTypeId(GetEnumUnit())
call DisplayTimedTextToForce( GetPlayersEnemies(ConvertedPlayer(udg_RePN)), 10.00, "TRIGSTR_8792" )
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_RepUDAP_Func008C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RepUDAP_Actions takes nothing returns nothing
set udg_RePN = GetConvertedPlayerId(GetTriggerPlayer())
call AdjustPlayerStateBJ( -150, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
set udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] = true
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_RepUDAP_Func004A )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_RepUDAP_Func008C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(1) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(2) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(3) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(4) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(5) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(7) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(8) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(9) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(10) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(11) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_RepUDAP takes nothing returns nothing
set gg_trg_RepUDAP = CreateTrigger( )
call DisableTrigger( gg_trg_RepUDAP )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUDAP, Player(7), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUDAP, Player(8), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUDAP, Player(9), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUDAP, Player(10), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepUDAP, Player(11), "-repick", true )
call TriggerAddCondition( gg_trg_RepUDAP, Condition( function Trig_RepUDAP_Conditions ) )
call TriggerAddAction( gg_trg_RepUDAP, function Trig_RepUDAP_Actions )
endfunction
function Trig_RepS_Func011C takes nothing returns boolean
if ( not ( udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
if ( not ( udg_OneMin == false ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) == 5 ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) >= 150 ) ) then
return false
endif
return true
endfunction
function Trig_RepS_Conditions takes nothing returns boolean
if ( not Trig_RepS_Func011C() ) then
return false
endif
return true
endfunction
function Trig_RepS_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == GetTriggerPlayer() ) ) then
return false
endif
return true
endfunction
function Trig_RepS_Func004A takes nothing returns nothing
if ( Trig_RepS_Func004Func001C() ) then
set udg_ReT[GetConvertedPlayerId(GetTriggerPlayer())] = GetUnitTypeId(GetEnumUnit())
call DisplayTimedTextToForce( GetPlayersEnemies(ConvertedPlayer(udg_RePN)), 10.00, "TRIGSTR_8793" )
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_RepS_Func008C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RepS_Actions takes nothing returns nothing
set udg_RePN = GetConvertedPlayerId(GetTriggerPlayer())
call AdjustPlayerStateBJ( -150, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
set udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] = true
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_RepS_Func004A )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 30)
if ( Trig_RepS_Func008C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(1) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(2) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(3) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(4) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(5) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(7) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(8) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(9) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(10) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(11) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_RepS takes nothing returns nothing
set gg_trg_RepS = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_RepS, Player(1), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepS, Player(2), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepS, Player(3), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepS, Player(4), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepS, Player(5), "-repick", true )
call TriggerAddCondition( gg_trg_RepS, Condition( function Trig_RepS_Conditions ) )
call TriggerAddAction( gg_trg_RepS, function Trig_RepS_Actions )
endfunction
function Trig_RepSAP_Func011C takes nothing returns boolean
if ( not ( udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
if ( not ( udg_OneMin == false ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) == 5 ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) >= 150 ) ) then
return false
endif
return true
endfunction
function Trig_RepSAP_Conditions takes nothing returns boolean
if ( not Trig_RepSAP_Func011C() ) then
return false
endif
return true
endfunction
function Trig_RepSAP_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == GetTriggerPlayer() ) ) then
return false
endif
return true
endfunction
function Trig_RepSAP_Func004A takes nothing returns nothing
if ( Trig_RepSAP_Func004Func001C() ) then
set udg_ReT[GetConvertedPlayerId(GetTriggerPlayer())] = GetUnitTypeId(GetEnumUnit())
call DisplayTimedTextToForce( GetPlayersEnemies(ConvertedPlayer(udg_RePN)), 10.00, "TRIGSTR_8794" )
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_RepSAP_Func008C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RepSAP_Actions takes nothing returns nothing
set udg_RePN = GetConvertedPlayerId(GetTriggerPlayer())
call AdjustPlayerStateBJ( -150, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
set udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] = true
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_RepSAP_Func004A )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 30)
if ( Trig_RepSAP_Func008C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(1) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(2) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(3) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(4) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(5) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(7) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(8) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(9) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(10) )
call SetPlayerTechMaxAllowedSwap( GetUnitTypeId(GetLastCreatedUnit()), 0, Player(11) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_RepSAP takes nothing returns nothing
set gg_trg_RepSAP = CreateTrigger( )
call DisableTrigger( gg_trg_RepSAP )
call TriggerRegisterPlayerChatEvent( gg_trg_RepSAP, Player(1), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepSAP, Player(2), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepSAP, Player(3), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepSAP, Player(4), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RepSAP, Player(5), "-repick", true )
call TriggerAddCondition( gg_trg_RepSAP, Condition( function Trig_RepSAP_Conditions ) )
call TriggerAddAction( gg_trg_RepSAP, function Trig_RepSAP_Actions )
endfunction
function Trig_ARReUD_Func011C takes nothing returns boolean
if ( not ( udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
if ( not ( udg_OneMin == false ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) == 5 ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) >= 500 ) ) then
return false
endif
return true
endfunction
function Trig_ARReUD_Conditions takes nothing returns boolean
if ( not Trig_ARReUD_Func011C() ) then
return false
endif
return true
endfunction
function Trig_ARReUD_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == GetTriggerPlayer() ) ) then
return false
endif
return true
endfunction
function Trig_ARReUD_Func004A takes nothing returns nothing
if ( Trig_ARReUD_Func004Func001C() ) then
set udg_ReT[GetConvertedPlayerId(GetTriggerPlayer())] = GetUnitTypeId(GetEnumUnit())
call DisplayTimedTextToForce( GetPlayersEnemies(ConvertedPlayer(udg_RePN)), 10.00, "TRIGSTR_8795" )
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_ARReUD_Func008C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ARReUD_Actions takes nothing returns nothing
set udg_RePN = GetConvertedPlayerId(GetTriggerPlayer())
call AdjustPlayerStateBJ( -500, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
set udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] = true
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_ARReUD_Func004A )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 66)
if ( Trig_ARReUD_Func008C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_ARReUD takes nothing returns nothing
set gg_trg_ARReUD = CreateTrigger( )
call DisableTrigger( gg_trg_ARReUD )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReUD, Player(7), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReUD, Player(8), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReUD, Player(9), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReUD, Player(10), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReUD, Player(11), "-repick", true )
call TriggerAddCondition( gg_trg_ARReUD, Condition( function Trig_ARReUD_Conditions ) )
call TriggerAddAction( gg_trg_ARReUD, function Trig_ARReUD_Actions )
endfunction
function Trig_ARReS_Func016C takes nothing returns boolean
if ( not ( udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
if ( not ( udg_OneMin == false ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) == 5 ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) >= 500 ) ) then
return false
endif
return true
endfunction
function Trig_ARReS_Conditions takes nothing returns boolean
if ( not Trig_ARReS_Func016C() ) then
return false
endif
return true
endfunction
function Trig_ARReS_Func009Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == GetTriggerPlayer() ) ) then
return false
endif
return true
endfunction
function Trig_ARReS_Func009A takes nothing returns nothing
if ( Trig_ARReS_Func009Func001C() ) then
set udg_ReT[GetConvertedPlayerId(GetTriggerPlayer())] = GetUnitTypeId(GetEnumUnit())
call DisplayTimedTextToForce( GetPlayersEnemies(ConvertedPlayer(udg_RePN)), 10.00, "TRIGSTR_8796" )
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_ARReS_Func013C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_ARReS_Actions takes nothing returns nothing
set udg_RePN = GetConvertedPlayerId(GetTriggerPlayer())
call AdjustPlayerStateBJ( -500, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
set udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] = true
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_ARReS_Func009A )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 66)
if ( Trig_ARReS_Func013C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_ARReS takes nothing returns nothing
set gg_trg_ARReS = CreateTrigger( )
call DisableTrigger( gg_trg_ARReS )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReS, Player(1), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReS, Player(2), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReS, Player(3), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReS, Player(4), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ARReS, Player(5), "-repick", true )
call TriggerAddCondition( gg_trg_ARReS, Condition( function Trig_ARReS_Conditions ) )
call TriggerAddAction( gg_trg_ARReS, function Trig_ARReS_Actions )
endfunction
function Trig_TRReUD_Func011C takes nothing returns boolean
if ( not ( udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
if ( not ( udg_OneMin == false ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) == 5 ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) >= 500 ) ) then
return false
endif
return true
endfunction
function Trig_TRReUD_Conditions takes nothing returns boolean
if ( not Trig_TRReUD_Func011C() ) then
return false
endif
return true
endfunction
function Trig_TRReUD_Func004Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == GetTriggerPlayer() ) ) then
return false
endif
return true
endfunction
function Trig_TRReUD_Func004A takes nothing returns nothing
if ( Trig_TRReUD_Func004Func001C() ) then
set udg_ReT[GetConvertedPlayerId(GetTriggerPlayer())] = GetUnitTypeId(GetEnumUnit())
call DisplayTimedTextToForce( GetPlayersEnemies(ConvertedPlayer(udg_RePN)), 10.00, "TRIGSTR_8797" )
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_TRReUD_Func008C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TRReUD_Actions takes nothing returns nothing
set udg_RePN = GetConvertedPlayerId(GetTriggerPlayer())
call AdjustPlayerStateBJ( -500, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
set udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] = true
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_TRReUD_Func004A )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 66)
if ( Trig_TRReUD_Func008C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_TRReUD takes nothing returns nothing
set gg_trg_TRReUD = CreateTrigger( )
call DisableTrigger( gg_trg_TRReUD )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReUD, Player(7), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReUD, Player(8), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReUD, Player(9), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReUD, Player(10), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReUD, Player(11), "-repick", true )
call TriggerAddCondition( gg_trg_TRReUD, Condition( function Trig_TRReUD_Conditions ) )
call TriggerAddAction( gg_trg_TRReUD, function Trig_TRReUD_Actions )
endfunction
function Trig_TRReS_Func016C takes nothing returns boolean
if ( not ( udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
if ( not ( udg_OneMin == false ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) == 5 ) ) then
return false
endif
if ( not ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD) >= 500 ) ) then
return false
endif
return true
endfunction
function Trig_TRReS_Conditions takes nothing returns boolean
if ( not Trig_TRReS_Func016C() ) then
return false
endif
return true
endfunction
function Trig_TRReS_Func009Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == GetTriggerPlayer() ) ) then
return false
endif
return true
endfunction
function Trig_TRReS_Func009A takes nothing returns nothing
if ( Trig_TRReS_Func009Func001C() ) then
set udg_ReT[GetConvertedPlayerId(GetTriggerPlayer())] = GetUnitTypeId(GetEnumUnit())
call DisplayTimedTextToForce( GetPlayersEnemies(ConvertedPlayer(udg_RePN)), 10.00, "TRIGSTR_8798" )
call RemoveUnit( GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_TRReS_Func013C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TRReS_Actions takes nothing returns nothing
set udg_RePN = GetConvertedPlayerId(GetTriggerPlayer())
call AdjustPlayerStateBJ( -500, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
set udg_ReD[GetConvertedPlayerId(GetTriggerPlayer())] = true
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_TRReS_Func009A )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 30)
if ( Trig_TRReS_Func013C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], GetTriggerPlayer(), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(GetTriggerPlayer()) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endfunction
//===========================================================================
function InitTrig_TRReS takes nothing returns nothing
set gg_trg_TRReS = CreateTrigger( )
call DisableTrigger( gg_trg_TRReS )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReS, Player(1), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReS, Player(2), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReS, Player(3), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReS, Player(4), "-repick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_TRReS, Player(5), "-repick", true )
call TriggerAddCondition( gg_trg_TRReS, Condition( function Trig_TRReS_Conditions ) )
call TriggerAddAction( gg_trg_TRReS, function Trig_TRReS_Actions )
endfunction
function Trig_Tornado_barrier_2_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08M' ) ) then
return false
endif
return true
endfunction
function Trig_Tornado_barrier_2_Actions takes nothing returns nothing
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A08K', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "innerfire", GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Tornado_barrier_2 takes nothing returns nothing
set gg_trg_Tornado_barrier_2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Tornado_barrier_2, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Tornado_barrier_2, Condition( function Trig_Tornado_barrier_2_Conditions ) )
call TriggerAddAction( gg_trg_Tornado_barrier_2, function Trig_Tornado_barrier_2_Actions )
endfunction
// Trigger: Tornado Barrier
//===========================================================================
function Trig_Lucent_Barrier_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08M' ) ) then
return false
endif
if udg_BarrierLife!=0 then
return false
endif
return true
endfunction
function LucentBarrier takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) + GetEventDamage() ) )
set udg_BarrierLife=udg_BarrierLife-GetEventDamage()
if udg_BarrierLife<=0 then
set udg_BarrierLife=0
call DestroyTrigger(t)
call UnitRemoveBuffBJ( 'B04B', GetTriggerUnit() )
endif
set t=null
endfunction
function Trig_Lucent_Barrier_Actions takes nothing returns nothing
local trigger t=CreateTrigger()
set udg_BarrierLife=(75*I2R(GetUnitAbilityLevel(GetTriggerUnit(),'A08M')))
call TriggerRegisterUnitEvent(t,GetTriggerUnit(),EVENT_UNIT_DAMAGED)
call TriggerAddAction( t,function LucentBarrier)
set t=null
endfunction
//===========================================================================
function InitTrig_Tornado_Barrier takes nothing returns nothing
set gg_trg_Tornado_Barrier = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Tornado_Barrier, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Tornado_Barrier, Condition( function Trig_Lucent_Barrier_Conditions ) )
call TriggerAddAction( gg_trg_Tornado_Barrier, function Trig_Lucent_Barrier_Actions )
endfunction
function Trig_Tornado_blast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08J' ) ) then
return false
endif
return true
endfunction
function Trig_Tornado_blast_Actions takes nothing returns nothing
local unit caster = GetTriggerUnit()
local unit target = GetSpellTargetUnit()
call SetUnitPositionLoc( target, PolarProjectionBJ(GetUnitLoc(target), 100.00, AngleBetweenPoints(GetUnitLoc(caster), GetUnitLoc(target))) )
endfunction
//===========================================================================
function InitTrig_Tornado_blast takes nothing returns nothing
set gg_trg_Tornado_blast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Tornado_blast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Tornado_blast, Condition( function Trig_Tornado_blast_Conditions ) )
call TriggerAddAction( gg_trg_Tornado_blast, function Trig_Tornado_blast_Actions )
endfunction
function Trig_Displace_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A082' ) ) then
return false
endif
return true
endfunction
function Trig_Displace_Func001001003001 takes nothing returns boolean
return ( IsUnitEnemy(GetTriggerUnit(), GetOwningPlayer(GetFilterUnit())) == true )
endfunction
function Trig_Displace_Func001001003002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Displace_Func001001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Displace_Func001001003001(), Trig_Displace_Func001001003002() )
endfunction
function Trig_Displace_Func001A takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), 100.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_SONIC )
endfunction
function Trig_Displace_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocMatching(150.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_Displace_Func001001003)), function Trig_Displace_Func001A )
endfunction
//===========================================================================
function InitTrig_Displace takes nothing returns nothing
set gg_trg_Displace = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Displace, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Displace, Condition( function Trig_Displace_Conditions ) )
call TriggerAddAction( gg_trg_Displace, function Trig_Displace_Actions )
endfunction
function Trig_Perdition_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07P' ) ) then
return false
endif
return true
endfunction
function Trig_Perdition_Actions takes nothing returns nothing
local unit target = GetSpellTargetUnit()
local unit caster = GetTriggerUnit()
local real damage = ( GetUnitStateSwap(UNIT_STATE_MAX_LIFE, caster) * ( 0.01 + ( 0.02 * I2R(GetUnitAbilityLevelSwapped('A07P', caster)) ) ) )
call PolledWait( ( DistanceBetweenPoints(GetUnitLoc(caster), GetUnitLoc(target)) / 1000.00 ) )
call UnitDamageTargetBJ( caster, target, damage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_DIVINE )
endfunction
//===========================================================================
function InitTrig_Perdition takes nothing returns nothing
set gg_trg_Perdition = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Perdition, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Perdition, Condition( function Trig_Perdition_Conditions ) )
call TriggerAddAction( gg_trg_Perdition, function Trig_Perdition_Actions )
endfunction
function Trig_Power_Word_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03V' ) ) then
return false
endif
return true
endfunction
function Trig_Power_Word_Func001C takes nothing returns boolean
if ( not ( IsUnitAlly(GetSpellTargetUnit(), GetOwningPlayer(GetTriggerUnit())) == true ) ) then
return false
endif
return true
endfunction
function Trig_Power_Word_Actions takes nothing returns nothing
if ( Trig_Power_Word_Func001C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A06E', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A06E', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A03V', GetTriggerUnit()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "innerfire", GetSpellTargetUnit() )
else
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A068', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A068', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A03V', GetTriggerUnit()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "acidbomb", GetSpellTargetUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Power_Word takes nothing returns nothing
set gg_trg_Power_Word = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Power_Word, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Power_Word, Condition( function Trig_Power_Word_Conditions ) )
call TriggerAddAction( gg_trg_Power_Word, function Trig_Power_Word_Actions )
endfunction
function Trig_Shadow_Word_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AS' ) ) then
return false
endif
return true
endfunction
function Trig_Shadow_Word_Func001C takes nothing returns boolean
if ( not ( IsUnitAlly(GetSpellTargetUnit(), GetOwningPlayer(GetTriggerUnit())) == true ) ) then
return false
endif
return true
endfunction
function Trig_Shadow_Word_Actions takes nothing returns nothing
if ( Trig_Shadow_Word_Func001C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A06S', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A06S', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0AS', GetTriggerUnit()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "rejuvination", GetSpellTargetUnit() )
else
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A06P', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A06P', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0AS', GetTriggerUnit()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "parasite", GetSpellTargetUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Shadow_Word takes nothing returns nothing
set gg_trg_Shadow_Word = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shadow_Word, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Shadow_Word, Condition( function Trig_Shadow_Word_Conditions ) )
call TriggerAddAction( gg_trg_Shadow_Word, function Trig_Shadow_Word_Actions )
endfunction
function Trig_Ostracize_new_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08O' ) ) then
return false
endif
return true
endfunction
function Trig_Ostracize_new_Actions takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), ( 60.00 * I2R(GetUnitAbilityLevelSwapped('A08O', GetTriggerUnit())) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )
endfunction
//===========================================================================
function InitTrig_Ostracize_new takes nothing returns nothing
set gg_trg_Ostracize_new = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ostracize_new, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Ostracize_new, Condition( function Trig_Ostracize_new_Conditions ) )
call TriggerAddAction( gg_trg_Ostracize_new, function Trig_Ostracize_new_Actions )
endfunction
function Trig_Shadow_Weave_Func008C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A03V' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AS' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A05X' ) ) then
return true
endif
return false
endfunction
function Trig_Shadow_Weave_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A05H', GetSpellTargetUnit()) < 4 ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A05I', GetSpellTargetUnit()) < 4 ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A04G', GetTriggerUnit()) > 0 ) ) then
return false
endif
if ( not Trig_Shadow_Weave_Func008C() ) then
return false
endif
return true
endfunction
function Trig_Shadow_Weave_Actions takes nothing returns nothing
local unit target = GetSpellTargetUnit()
if ( IsUnitAlly(GetTriggerUnit(), GetOwningPlayer(target)) == true ) then
if ( GetUnitAbilityLevelSwapped('A05H', target) > 0 ) then
call IncUnitAbilityLevelSwapped( 'A05H', target )
else
call UnitAddAbilityBJ( 'A05H', target )
endif
else
if ( GetUnitAbilityLevelSwapped('A05I', target) > 0 ) then
call IncUnitAbilityLevelSwapped( 'A05I', target )
else
call UnitAddAbilityBJ( 'A05I', target )
endif
endif
call PolledWait( 15.00 )
if ( GetUnitAbilityLevelSwapped('A05H', target) == 1 ) then
call UnitRemoveAbilityBJ( 'A05H', target )
else
if ( GetUnitAbilityLevelSwapped('A05H', target) > 1 ) then
call DecUnitAbilityLevelSwapped( 'A05H', target )
endif
endif
if ( GetUnitAbilityLevelSwapped('A05I', target) == 1 ) then
call UnitRemoveAbilityBJ( 'A05I', target )
else
if ( GetUnitAbilityLevelSwapped('A05I', target) > 1 ) then
call DecUnitAbilityLevelSwapped( 'A05I', target )
endif
endif
endfunction
//===========================================================================
function InitTrig_Shadow_Weave takes nothing returns nothing
set gg_trg_Shadow_Weave = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shadow_Weave, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Shadow_Weave, Condition( function Trig_Shadow_Weave_Conditions ) )
call TriggerAddAction( gg_trg_Shadow_Weave, function Trig_Shadow_Weave_Actions )
endfunction
function Trig_Protect_Roshan_Conditions takes nothing returns boolean
if ( not ( GetAttackedUnitBJ() == gg_unit_n00L_0115 ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetAttacker()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Protect_Roshan_Actions takes nothing returns nothing
call KillUnit( GetAttacker() )
endfunction
//===========================================================================
function InitTrig_Protect_Roshan takes nothing returns nothing
set gg_trg_Protect_Roshan = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Protect_Roshan, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Protect_Roshan, Condition( function Trig_Protect_Roshan_Conditions ) )
call TriggerAddAction( gg_trg_Protect_Roshan, function Trig_Protect_Roshan_Actions )
endfunction
function Trig_Protect_Roshan_2_Conditions takes nothing returns boolean
if ( not ( GetAttackedUnitBJ() == gg_unit_n00L_0115 ) ) then
return false
endif
return true
endfunction
function Trig_Protect_Roshan_2_Func001C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'BPSE') == true ) ) then
return false
endif
return true
endfunction
function Trig_Protect_Roshan_2_Actions takes nothing returns nothing
if ( Trig_Protect_Roshan_2_Func001C() ) then
call UnitRemoveBuffBJ( 'BPSE', GetAttackedUnitBJ() )
else
endif
endfunction
//===========================================================================
function InitTrig_Protect_Roshan_2 takes nothing returns nothing
set gg_trg_Protect_Roshan_2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Protect_Roshan_2, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Protect_Roshan_2, Condition( function Trig_Protect_Roshan_2_Conditions ) )
call TriggerAddAction( gg_trg_Protect_Roshan_2, function Trig_Protect_Roshan_2_Actions )
endfunction
function Trig_Natures_Attendants_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'uloc' ) ) then
return false
endif
return true
endfunction
function Trig_Natures_Attendants_Func001Func001003001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Natures_Attendants_Func001Func001003001003002001 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A04R', GetFilterUnit()) != 1 )
endfunction
function Trig_Natures_Attendants_Func001Func001003001003002002 takes nothing returns boolean
return ( IsUnitAlly(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Natures_Attendants_Func001Func001003001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Natures_Attendants_Func001Func001003001003002001(), Trig_Natures_Attendants_Func001Func001003001003002002() )
endfunction
function Trig_Natures_Attendants_Func001Func001003001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Natures_Attendants_Func001Func001003001003001(), Trig_Natures_Attendants_Func001Func001003001003002() )
endfunction
function Trig_Natures_Attendants_Func001A takes nothing returns nothing
call IssueTargetOrderBJ( GetEnumUnit(), "heal", GroupPickRandomUnit(GetUnitsInRangeOfLocMatching(500.00, GetUnitLoc(GetEnumUnit()), Condition(function Trig_Natures_Attendants_Func001Func001003001003))) )
endfunction
function Trig_Natures_Attendants_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetTriggerUnit()), 'uloc'), function Trig_Natures_Attendants_Func001A )
endfunction
//===========================================================================
function InitTrig_Natures_Attendants takes nothing returns nothing
set gg_trg_Natures_Attendants = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Natures_Attendants, GetEntireMapRect() )
call TriggerAddCondition( gg_trg_Natures_Attendants, Condition( function Trig_Natures_Attendants_Conditions ) )
call TriggerAddAction( gg_trg_Natures_Attendants, function Trig_Natures_Attendants_Actions )
endfunction
function Trig_Optimiser_Conditions takes nothing returns boolean
if ( not ( IsUnitIllusionBJ(GetLearningUnit()) == false ) ) then
return false
endif
if ( not ( IsUnitType(GetLearningUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Optimiser_Func002001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0DZ' )
endfunction
function Trig_Optimiser_Func003001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0DW' )
endfunction
function Trig_Optimiser_Func004001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0C6' )
endfunction
function Trig_Optimiser_Func005001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0BU' )
endfunction
function Trig_Optimiser_Func006001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0DB' )
endfunction
function Trig_Optimiser_Func007001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0D6' )
endfunction
function Trig_Optimiser_Func008001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A04Y' )
endfunction
function Trig_Optimiser_Func009001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A00V' )
endfunction
function Trig_Optimiser_Func010001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A059' )
endfunction
function Trig_Optimiser_Func011001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A050' )
endfunction
function Trig_Optimiser_Func012001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0DL' )
endfunction
function Trig_Optimiser_Func013001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0ED' )
endfunction
function Trig_Optimiser_Func015001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0C5' )
endfunction
function Trig_Optimiser_Func016001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A0BR' )
endfunction
function Trig_Optimiser_Func017001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A06U' )
endfunction
function Trig_Optimiser_Func018001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A06D' )
endfunction
function Trig_Optimiser_Func019001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A060' )
endfunction
function Trig_Optimiser_Func020001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A00F' )
endfunction
function Trig_Optimiser_Func021001 takes nothing returns boolean
return ( GetLearnedSkillBJ() == 'A03G' )
endfunction
function Trig_Optimiser_Actions takes nothing returns nothing
// ***************** Unit Is Attacked Event Triggers *******************
if ( Trig_Optimiser_Func002001() ) then
call EnableTrigger( gg_trg_Backstab )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func003001() ) then
call EnableTrigger( gg_trg_Untouchable )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func004001() ) then
call EnableTrigger( gg_trg_Counter_Helix )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func005001() ) then
call EnableTrigger( gg_trg_Craggy_Exterior )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func006001() ) then
call EnableTrigger( gg_trg_Juxtapose )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func007001() ) then
call EnableTrigger( gg_trg_Lucky_Stars )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func008001() ) then
call EnableTrigger( gg_trg_Nightmare_Attack )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func009001() ) then
call EnableTrigger( gg_trg_return )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func010001() ) then
call EnableTrigger( gg_trg_Overpower )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func011001() ) then
call EnableTrigger( gg_trg_Enrage )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func012001() ) then
call EnableTrigger( gg_trg_Enchant_Totem )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func013001() ) then
call EnableTrigger( gg_trg_Wounding_Spear )
else
call DoNothing( )
endif
// ************************ Unit Dies Event Triggers ******************************
if ( Trig_Optimiser_Func015001() ) then
call EnableTrigger( gg_trg_Battle_Hunger )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func016001() ) then
call EnableTrigger( gg_trg_Necromastry )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func017001() ) then
call EnableTrigger( gg_trg_Entrench )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func018001() ) then
call EnableTrigger( gg_trg_Flesh_Heap )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func019001() ) then
call EnableTrigger( gg_trg_Sadist )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func020001() ) then
call EnableTrigger( gg_trg_track )
else
call DoNothing( )
endif
if ( Trig_Optimiser_Func021001() ) then
call EnableTrigger( gg_trg_dragon_bug_3 )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Optimiser takes nothing returns nothing
set gg_trg_Optimiser = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Optimiser, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Optimiser, Condition( function Trig_Optimiser_Conditions ) )
call TriggerAddAction( gg_trg_Optimiser, function Trig_Optimiser_Actions )
endfunction
function Trig_Mirror_Shield_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSpellAbilityUnit()) != 'e00E' ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetSpellTargetUnit(), 'kybl') == true ) ) then
return false
endif
return true
endfunction
function Trig_Mirror_Shield_Func002C takes nothing returns boolean
if ( not ( udg_DeflectChance <= 25 ) ) then
return false
endif
return true
endfunction
function Trig_Mirror_Shield_Actions takes nothing returns nothing
set udg_DeflectChance = GetRandomInt(1, 100)
if ( Trig_Mirror_Shield_Func002C() ) then
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetSpellTargetUnit()), GetUnitLoc(GetSpellTargetUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( GetSpellAbilityId(), GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( GetSpellAbilityId(), GetLastCreatedUnit(), ( GetUnitAbilityLevelSwapped(GetSpellAbilityId(), GetTriggerUnit()) + 0 ) )
set udg_AbilityString = OrderId2StringBJ(GetUnitCurrentOrder(GetTriggerUnit()))
call IssueTargetOrderBJ( GetLastCreatedUnit(), udg_AbilityString, GetTriggerUnit() )
call AddSpecialEffectTargetUnitBJ( "overhead", GetSpellTargetUnit(), "Abilities\\Spells\\Undead\\ReplenishHealth\\ReplenishHealthCasterOverhead.mdl" )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Mirror_Shield takes nothing returns nothing
set gg_trg_Mirror_Shield = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mirror_Shield, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Mirror_Shield, Condition( function Trig_Mirror_Shield_Conditions ) )
call TriggerAddAction( gg_trg_Mirror_Shield, function Trig_Mirror_Shield_Actions )
endfunction
function Trig_Shukuchi_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0CA' ) ) then
return false
endif
return true
endfunction
function Trig_Shukuchi_Func004001 takes nothing returns boolean
return ( UnitHasBuffBJ(GetTriggerUnit(), 'BHfs') == false )
endfunction
function Trig_Shukuchi_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A0C9', GetTriggerUnit() )
call SetUnitAbilityLevelSwapped( 'A0C9', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A0CA', GetTriggerUnit()) )
call TriggerSleepAction( 0.10 )
loop
exitwhen ( Trig_Shukuchi_Func004001() )
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, 0.10))
endloop
call UnitRemoveAbilityBJ( 'A0C9', GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Shukuchi takes nothing returns nothing
set gg_trg_Shukuchi = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shukuchi, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Shukuchi, Condition( function Trig_Shukuchi_Conditions ) )
call TriggerAddAction( gg_trg_Shukuchi, function Trig_Shukuchi_Actions )
endfunction
function Trig_Split_Shot_Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A012', GetDyingUnit()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Split_Shot_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A012', GetTriggerUnit()) > 0 ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("defend") ) ) then
return false
endif
return true
endfunction
function Trig_Split_Shot_Func003C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A012', GetTriggerUnit()) > 0 ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("undefend") ) ) then
return false
endif
return true
endfunction
function Trig_Split_Shot_Actions takes nothing returns nothing
if ( Trig_Split_Shot_Func001C() ) then
call UnitRemoveAbilityBJ( 'A09J', GetDyingUnit() )
else
endif
if ( Trig_Split_Shot_Func002C() ) then
call UnitAddAbilityBJ( 'A09J', GetTriggerUnit() )
else
endif
if ( Trig_Split_Shot_Func003C() ) then
call UnitRemoveAbilityBJ( 'A09J', GetTriggerUnit() )
else
endif
endfunction
//===========================================================================
function InitTrig_Split_Shot takes nothing returns nothing
set gg_trg_Split_Shot = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Split_Shot, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Split_Shot, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Split_Shot, function Trig_Split_Shot_Actions )
endfunction
function Trig_Time_Lapse_Cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0CT' ) ) then
return false
endif
return true
endfunction
function Trig_Time_Lapse_Cast_Actions takes nothing returns nothing
call SetUnitPositionLoc( GetTriggerUnit(), udg_TLPoint[1] )
call SetUnitLifeBJ( GetTriggerUnit(), udg_TLLife[1] )
call SetUnitManaBJ( GetTriggerUnit(), udg_TLMana[1] )
call AddSpecialEffectLocBJ( GetUnitLoc(GetTriggerUnit()), "Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl" )
call UnitRemoveBuffsBJ( bj_REMOVEBUFFS_NEGATIVE, GetTriggerUnit() )
call TriggerSleepAction( 1.00 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
endfunction
//===========================================================================
function InitTrig_Time_Lapse_Cast takes nothing returns nothing
set gg_trg_Time_Lapse_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Time_Lapse_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Time_Lapse_Cast, Condition( function Trig_Time_Lapse_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Time_Lapse_Cast, function Trig_Time_Lapse_Cast_Actions )
endfunction
function Trig_Time_Lapse_Set_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_TLPoint[( GetForLoopIndexA() - 1 )] = udg_TLPoint[GetForLoopIndexA()]
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_TLLife[( GetForLoopIndexA() - 1 )] = udg_TLLife[GetForLoopIndexA()]
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_TLMana[( GetForLoopIndexA() - 1 )] = udg_TLMana[GetForLoopIndexA()]
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set udg_TLPoint[10] = GetUnitLoc(udg_TLaffector)
set udg_TLLife[10] = GetUnitStateSwap(UNIT_STATE_LIFE, udg_TLaffector)
set udg_TLMana[10] = GetUnitStateSwap(UNIT_STATE_MANA, udg_TLaffector)
endfunction
//===========================================================================
function InitTrig_Time_Lapse_Set takes nothing returns nothing
set gg_trg_Time_Lapse_Set = CreateTrigger( )
call DisableTrigger( gg_trg_Time_Lapse_Set )
call TriggerRegisterTimerEventPeriodic( gg_trg_Time_Lapse_Set, 0.50 )
call TriggerAddAction( gg_trg_Time_Lapse_Set, function Trig_Time_Lapse_Set_Actions )
endfunction
function Trig_Time_Lapse_Begin_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Ubal' ) ) then
return false
endif
return true
endfunction
function Trig_Time_Lapse_Begin_Actions takes nothing returns nothing
set udg_TLaffector = GetTriggerUnit()
call EnableTrigger( gg_trg_Time_Lapse_Set )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Time_Lapse_Begin takes nothing returns nothing
set gg_trg_Time_Lapse_Begin = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Time_Lapse_Begin, GetPlayableMapRect() )
call TriggerAddCondition( gg_trg_Time_Lapse_Begin, Condition( function Trig_Time_Lapse_Begin_Conditions ) )
call TriggerAddAction( gg_trg_Time_Lapse_Begin, function Trig_Time_Lapse_Begin_Actions )
endfunction
function Trig_Malefice_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0B3' ) ) then
return false
endif
return true
endfunction
function Trig_Malefice_Actions takes nothing returns nothing
set udg_Malefice = GetSpellTargetUnit()
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A01A', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", udg_Malefice )
call TriggerSleepAction( 2 )
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A01A', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", udg_Malefice )
call TriggerSleepAction( 2 )
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A01A', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", udg_Malefice )
call TriggerSleepAction( 2 )
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A01A', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", udg_Malefice )
endfunction
//===========================================================================
function InitTrig_Malefice takes nothing returns nothing
set gg_trg_Malefice = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Malefice, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Malefice, Condition( function Trig_Malefice_Conditions ) )
call TriggerAddAction( gg_trg_Malefice, function Trig_Malefice_Actions )
endfunction
function Trig_Conversion_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0B7' ) ) then
return false
endif
return true
endfunction
function Trig_Conversion_Actions takes nothing returns nothing
call UnitApplyTimedLifeBJ( 31.00, 'BTLF', GetSpellTargetUnit() )
call UnitAddAbilityBJ( 'A0BI', GetSpellTargetUnit() )
call SetUnitAbilityLevelSwapped( 'A0BI', GetSpellTargetUnit(), GetUnitAbilityLevelSwapped('A0B7', GetTriggerUnit()) )
call TriggerSleepAction( 0.05 )
call IssueImmediateOrderBJ( GetSpellTargetUnit(), "elementalfury" )
call TriggerSleepAction( 1.00 )
call IssueImmediateOrderBJ( GetSpellTargetUnit(), "elementalfury" )
endfunction
//===========================================================================
function InitTrig_Conversion takes nothing returns nothing
set gg_trg_Conversion = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Conversion, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Conversion, Condition( function Trig_Conversion_Conditions ) )
call TriggerAddAction( gg_trg_Conversion, function Trig_Conversion_Actions )
endfunction
function Trig_Midnight_Pulse_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0B1' ) ) then
return false
endif
return true
endfunction
function Trig_Midnight_Pulse_Actions takes nothing returns nothing
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetSpellTargetLoc() )
call ShowUnitHide( GetLastCreatedUnit() )
call UnitApplyTimedLifeBJ( 8.00, 'BTLF', GetLastCreatedUnit() )
call UnitAddAbilityBJ( 'A0B2', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A0B2', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0B1', GetTriggerUnit()) )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "deathanddecay", GetSpellTargetLoc() )
endfunction
//===========================================================================
function InitTrig_Midnight_Pulse takes nothing returns nothing
set gg_trg_Midnight_Pulse = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Midnight_Pulse, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Midnight_Pulse, Condition( function Trig_Midnight_Pulse_Conditions ) )
call TriggerAddAction( gg_trg_Midnight_Pulse, function Trig_Midnight_Pulse_Actions )
endfunction
function Trig_Black_Hole_Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0BY' ) ) then
return false
endif
return true
endfunction
function Trig_Black_Hole_Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'u004' ) ) then
return false
endif
return true
endfunction
function Trig_Black_Hole_Actions takes nothing returns nothing
if ( Trig_Black_Hole_Func001C() ) then
call DisableTrigger( gg_trg_Black_Hole_suck )
else
endif
if ( Trig_Black_Hole_Func002C() ) then
set udg_BlackHole = GetSummonedUnit()
call SetUnitAbilityLevelSwapped( 'A0C0', GetSummonedUnit(), GetUnitAbilityLevelSwapped('A0BY', GetSummoningUnit()) )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call EnableTrigger( gg_trg_Black_Hole_suck )
else
endif
endfunction
//===========================================================================
function InitTrig_Black_Hole takes nothing returns nothing
set gg_trg_Black_Hole = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Hole, EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Hole, EVENT_PLAYER_UNIT_SPELL_ENDCAST )
call TriggerAddAction( gg_trg_Black_Hole, function Trig_Black_Hole_Actions )
endfunction
function Trig_Black_Hole_suck_Func002001003001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Black_Hole_suck_Func002001003001002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_ANCIENT) == false )
endfunction
function Trig_Black_Hole_suck_Func002001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Black_Hole_suck_Func002001003001001(), Trig_Black_Hole_suck_Func002001003001002() )
endfunction
function Trig_Black_Hole_suck_Func002001003002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_BlackHole)) == true )
endfunction
function Trig_Black_Hole_suck_Func002001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Black_Hole_suck_Func002001003001(), Trig_Black_Hole_suck_Func002001003002() )
endfunction
function Trig_Black_Hole_suck_Func002A takes nothing returns nothing
call SetUnitPositionLoc( GetEnumUnit(), PolarProjectionBJ(GetUnitLoc(udg_BlackHole), ( DistanceBetweenPoints(GetUnitLoc(udg_BlackHole), GetUnitLoc(GetEnumUnit())) - 2.00 ), AngleBetweenPoints(GetUnitLoc(udg_BlackHole), GetUnitLoc(GetEnumUnit()))) )
endfunction
function Trig_Black_Hole_suck_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRangeOfLocMatching(400.00, GetUnitLoc(udg_BlackHole), Condition(function Trig_Black_Hole_suck_Func002001003)), function Trig_Black_Hole_suck_Func002A )
endfunction
//===========================================================================
function InitTrig_Black_Hole_suck takes nothing returns nothing
set gg_trg_Black_Hole_suck = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Black_Hole_suck, 0.05 )
call TriggerAddAction( gg_trg_Black_Hole_suck, function Trig_Black_Hole_suck_Actions )
endfunction
function Trig_Heartstopper_kill_Func001001002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B01L') == true )
endfunction
function Trig_Heartstopper_kill_Func001Func001C takes nothing returns boolean
if ( not ( GetUnitLifePercent(GetEnumUnit()) <= 1.01 ) ) then
return false
endif
return true
endfunction
function Trig_Heartstopper_kill_Func001A takes nothing returns nothing
if ( Trig_Heartstopper_kill_Func001Func001C() ) then
call UnitDamageTargetBJ( udg_Heartstopper, GetEnumUnit(), 1000.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
function Trig_Heartstopper_kill_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Heartstopper_kill_Func001001002)), function Trig_Heartstopper_kill_Func001A )
endfunction
//===========================================================================
function InitTrig_Heartstopper_kill takes nothing returns nothing
set gg_trg_Heartstopper_kill = CreateTrigger( )
call DisableTrigger( gg_trg_Heartstopper_kill )
call TriggerRegisterTimerEventPeriodic( gg_trg_Heartstopper_kill, 1.00 )
call TriggerAddAction( gg_trg_Heartstopper_kill, function Trig_Heartstopper_kill_Actions )
endfunction
function Trig_Rot_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A06K', GetTriggerUnit()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Rot_Func001C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("immolation") ) ) then
return false
endif
return true
endfunction
function Trig_Rot_Func002C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("unimmolation") ) ) then
return false
endif
return true
endfunction
function Trig_Rot_Actions takes nothing returns nothing
if ( Trig_Rot_Func001C() ) then
call UnitAddAbilityBJ( 'A0AZ', GetTriggerUnit() )
else
endif
if ( Trig_Rot_Func002C() ) then
call UnitRemoveAbilityBJ( 'A0AZ', GetTriggerUnit() )
else
endif
endfunction
//===========================================================================
function InitTrig_Rot takes nothing returns nothing
set gg_trg_Rot = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Rot, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Rot, Condition( function Trig_Rot_Conditions ) )
call TriggerAddAction( gg_trg_Rot, function Trig_Rot_Actions )
endfunction
function Trig_Gaze_b_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AW' ) ) then
return false
endif
return true
endfunction
function Trig_Gaze_b_Actions takes nothing returns nothing
set udg_Gazer = GetSpellAbilityUnit()
set udg_Gazee = GetSpellTargetUnit()
call CreateNUnitsAtLoc( 1, 'e00G', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attack", udg_Gazee )
call UnitApplyTimedLifeBJ( 0.80, 'BTLF', GetLastCreatedUnit() )
set udg_GazeCycle = 0
call EnableTrigger( gg_trg_Gaze_c )
endfunction
//===========================================================================
function InitTrig_Gaze_b takes nothing returns nothing
set gg_trg_Gaze_b = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Gaze_b, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
call TriggerAddCondition( gg_trg_Gaze_b, Condition( function Trig_Gaze_b_Conditions ) )
call TriggerAddAction( gg_trg_Gaze_b, function Trig_Gaze_b_Actions )
endfunction
function Trig_Gaze_c_Func010C takes nothing returns boolean
if ( not ( udg_GazeCycle >= 4 ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A0AW', udg_Gazer) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Gaze_c_Func011C takes nothing returns boolean
if ( not ( udg_GazeCycle >= 6 ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A0AW', udg_Gazer) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Gaze_c_Func012C takes nothing returns boolean
if ( not ( udg_GazeCycle >= 12 ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A0AW', udg_Gazer) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Gaze_c_Actions takes nothing returns nothing
set udg_GazeCycle = ( udg_GazeCycle + 1 )
call CreateNUnitsAtLoc( 1, 'e00G', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetUnitLoc(udg_Gazer), bj_UNIT_FACING )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attack", udg_Gazee )
call UnitApplyTimedLifeBJ( 0.80, 'BTLF', GetLastCreatedUnit() )
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(udg_Gazer), GetUnitLoc(udg_Gazer), GetUnitLoc(udg_Gazee) )
call UnitAddAbilityBJ( 'A0AY', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A0AY', GetLastCreatedUnit(), ( GetUnitAbilityLevelSwapped('A0AW', udg_Gazer) * udg_GazeCycle ) )
call UnitRemoveBuffBJ( 'B042', udg_Gazee )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "drunkenhaze", udg_Gazee )
if ( Trig_Gaze_c_Func010C() ) then
call IssueImmediateOrderBJ( udg_Gazer, "stop" )
set udg_Gazee = null
set udg_Gazer = null
call DisableTrigger( GetTriggeringTrigger() )
else
endif
if ( Trig_Gaze_c_Func011C() ) then
call IssueImmediateOrderBJ( udg_Gazer, "stop" )
set udg_Gazee = null
set udg_Gazer = null
call DisableTrigger( GetTriggeringTrigger() )
else
endif
if ( Trig_Gaze_c_Func012C() ) then
call IssueImmediateOrderBJ( udg_Gazer, "stop" )
set udg_Gazee = null
set udg_Gazer = null
call DisableTrigger( GetTriggeringTrigger() )
else
endif
endfunction
//===========================================================================
function InitTrig_Gaze_c takes nothing returns nothing
set gg_trg_Gaze_c = CreateTrigger( )
call DisableTrigger( gg_trg_Gaze_c )
call TriggerRegisterTimerEventPeriodic( gg_trg_Gaze_c, 1.00 )
call TriggerAddAction( gg_trg_Gaze_c, function Trig_Gaze_c_Actions )
endfunction
function Trig_Gaze_d_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AW' ) ) then
return false
endif
return true
endfunction
function Trig_Gaze_d_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Gaze_c )
endfunction
//===========================================================================
function InitTrig_Gaze_d takes nothing returns nothing
set gg_trg_Gaze_d = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Gaze_d, EVENT_PLAYER_UNIT_SPELL_ENDCAST )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Gaze_d, EVENT_PLAYER_UNIT_SPELL_FINISH )
call TriggerAddCondition( gg_trg_Gaze_d, Condition( function Trig_Gaze_d_Conditions ) )
call TriggerAddAction( gg_trg_Gaze_d, function Trig_Gaze_d_Actions )
endfunction
function Trig_Gaze_e_Func003C takes nothing returns boolean
if ( ( GetDyingUnit() == udg_Gazee ) ) then
return true
endif
if ( ( GetDyingUnit() == udg_Gazer ) ) then
return true
endif
return false
endfunction
function Trig_Gaze_e_Conditions takes nothing returns boolean
if ( not Trig_Gaze_e_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Gaze_e_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Gaze_c )
call IssueImmediateOrderBJ( udg_Gazer, "stop" )
endfunction
//===========================================================================
function InitTrig_Gaze_e takes nothing returns nothing
set gg_trg_Gaze_e = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Gaze_e, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Gaze_e, Condition( function Trig_Gaze_e_Conditions ) )
call TriggerAddAction( gg_trg_Gaze_e, function Trig_Gaze_e_Actions )
endfunction
// Trigger: mekansm
//===========================================================================
function Trig_Boomboom_Conditions takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetAttackedUnitBJ(), 'mnst') == true ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetAttackedUnitBJ()) == false ) ) then
return false
endif
return true
endfunction
function Trig_Boomboom_Actions takes nothing returns nothing
local integer rand = GetRandomInt(1,100)
local unit target = GetTriggerUnit()
local effect shield
if (rand < 7) then
call DisableTrigger( GetTriggeringTrigger() )
call AddSpecialEffectTargetUnitBJ( "origin", target, "Abilities\\Spells\\Human\\DivineShield\\DivineShieldTarget.mdl" )
set shield = GetLastCreatedEffectBJ()
call SetUnitInvulnerable( target, true )
call TriggerSleepAction( 2 )
call DestroyEffect(shield)
set shield = null
call SetUnitInvulnerable( target, false )
call TriggerSleepAction( 1.2 )
call EnableTrigger( GetTriggeringTrigger() )
endif
endfunction
//===========================================================================
function InitTrig_mekansm takes nothing returns nothing
set gg_trg_mekansm = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_mekansm, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_mekansm, Condition( function Trig_Boomboom_Conditions ) )
call TriggerAddAction( gg_trg_mekansm, function Trig_Boomboom_Actions )
endfunction
function Trig_Stoneform_Func003C takes nothing returns boolean
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("defend") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("undefend") ) ) then
return true
endif
return false
endfunction
function Trig_Stoneform_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0EU', GetTriggerUnit()) > 0 ) ) then
return false
endif
if ( not Trig_Stoneform_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Stoneform_Func002C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("defend") ) ) then
return false
endif
return true
endfunction
function Trig_Stoneform_Actions takes nothing returns nothing
if ( Trig_Stoneform_Func002C() ) then
call UnitAddAbilityBJ( 'A0EV', GetTriggerUnit() )
call SetUnitAbilityLevelSwapped( 'A0EV', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A0EU', GetTriggerUnit()) )
else
call UnitRemoveAbilityBJ( 'A0EV', GetTriggerUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Stoneform takes nothing returns nothing
set gg_trg_Stoneform = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Stoneform, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Stoneform, Condition( function Trig_Stoneform_Conditions ) )
call TriggerAddAction( gg_trg_Stoneform, function Trig_Stoneform_Actions )
endfunction
function Trig_Roar_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'B03Z') == true ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A0ET', GetTriggerUnit()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Roar_Actions takes nothing returns nothing
local integer rand = GetRandomInt(1,100)
call TriggerSleepAction( ( DistanceBetweenPoints(GetUnitLoc(GetAttacker()), GetUnitLoc(GetAttackedUnitBJ())) / 1000.00 ) )
if (rand <= ( 12 * GetUnitAbilityLevelSwapped('A0ET', GetAttacker()) ) ) then
set rand = GetRandomInt(1,10)
if (rand <= 6) then
call UnitDamageTargetBJ( GetAttacker(), GetAttackedUnitBJ(), 125.00, ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
else
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetAttacker()), GetUnitLoc(GetAttackedUnitBJ()), GetUnitLoc(GetAttackedUnitBJ()) )
call UnitAddAbilityBJ( 'A04U', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A04U', GetLastCreatedUnit(), 2)
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", GetAttackedUnitBJ() )
endif
endif
endfunction
//===========================================================================
function InitTrig_Roar takes nothing returns nothing
set gg_trg_Roar = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Roar, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Roar, Condition( function Trig_Roar_Conditions ) )
call TriggerAddAction( gg_trg_Roar, function Trig_Roar_Actions )
endfunction
function Trig_Disarm_Func003C takes nothing returns boolean
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetSpellTargetUnit(), 1)) != GetItemTypeId(null) ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetSpellTargetUnit(), 2)) != GetItemTypeId(null) ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetSpellTargetUnit(), 3)) != GetItemTypeId(null) ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetSpellTargetUnit(), 4)) != GetItemTypeId(null) ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetSpellTargetUnit(), 5)) != GetItemTypeId(null) ) ) then
return true
endif
if ( ( GetItemTypeId(UnitItemInSlotBJ(GetSpellTargetUnit(), 6)) != GetItemTypeId(null) ) ) then
return true
endif
return false
endfunction
function Trig_Disarm_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0ES' ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(GetSpellTargetUnit(), 'B03Y') == false ) ) then
return false
endif
if ( not Trig_Disarm_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Disarm_Actions takes nothing returns nothing
local unit target = GetSpellTargetUnit()
local player owned = GetOwningPlayer(target)
local integer wait = (3 + (2 * GetUnitAbilityLevelSwapped('A0ES', GetTriggerUnit()) ) )
local integer random
loop
set random = GetRandomInt(1,6)
if ( ( GetItemTypeId(UnitItemInSlotBJ(target, random)) != GetItemTypeId(null) ) ) then
set udg_DisarmRestore[GetConvertedPlayerId(owned)] = GetItemTypeId(UnitItemInSlotBJ(target, random) )
set udg_DisarmRestoreNum[GetConvertedPlayerId(owned)] = GetItemCharges(UnitItemInSlotBJ(target, random))
call RemoveItem( UnitItemInSlotBJ(target, random) )
exitwhen (1 == 1)
endif
endloop
call PolledWait (wait)
if ( IsUnitDeadBJ(target) == false ) then
call UnitAddItemByIdSwapped( udg_DisarmRestore[GetConvertedPlayerId(owned)], target )
call SetItemCharges( GetLastCreatedItem(), udg_DisarmRestoreNum[GetConvertedPlayerId(owned)] )
set udg_DisarmRestore[GetConvertedPlayerId(owned)] = GetItemTypeId(null)
set udg_DisarmRestoreNum[GetConvertedPlayerId(owned)] = 0
endif
endfunction
//===========================================================================
function InitTrig_Disarm takes nothing returns nothing
set gg_trg_Disarm = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Disarm, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Disarm, Condition( function Trig_Disarm_Conditions ) )
call TriggerAddAction( gg_trg_Disarm, function Trig_Disarm_Actions )
endfunction
function Trig_Grow_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0C1' ) ) then
return false
endif
return true
endfunction
function Trig_Grow_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0C1', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Grow_Func003C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0C1', GetTriggerUnit()) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Grow_Func004C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0C1', GetTriggerUnit()) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Grow_Actions takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'A0C2', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A0C1', GetTriggerUnit()) )
if ( Trig_Grow_Func002C() ) then
call UnitAddAbilityBJ( 'S000', GetTriggerUnit() )
else
endif
if ( Trig_Grow_Func003C() ) then
call UnitRemoveAbilityBJ( 'S000', GetTriggerUnit() )
call UnitAddAbilityBJ( 'S001', GetTriggerUnit() )
else
endif
if ( Trig_Grow_Func004C() ) then
call UnitRemoveAbilityBJ( 'S001', GetTriggerUnit() )
call UnitAddAbilityBJ( 'S006', GetTriggerUnit() )
else
endif
endfunction
//===========================================================================
function InitTrig_Grow takes nothing returns nothing
set gg_trg_Grow = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Grow, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Grow, Condition( function Trig_Grow_Conditions ) )
call TriggerAddAction( gg_trg_Grow, function Trig_Grow_Actions )
endfunction
function Trig_Divine_Intervention_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0D5' ) ) then
return false
endif
return true
endfunction
function Trig_Divine_Intervention_Func001Func003C takes nothing returns boolean
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(1) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(2) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(3) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(4) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(5) ) ) then
return true
endif
return false
endfunction
function Trig_Divine_Intervention_Func001C takes nothing returns boolean
if ( not Trig_Divine_Intervention_Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Divine_Intervention_Actions takes nothing returns nothing
if ( Trig_Divine_Intervention_Func001C() ) then
set udg_TeamReincarnation[1] = ( udg_TeamReincarnation[1] + 1 )
else
set udg_TeamReincarnation[2] = ( udg_TeamReincarnation[2] + 1 )
endif
endfunction
//===========================================================================
function InitTrig_Divine_Intervention takes nothing returns nothing
set gg_trg_Divine_Intervention = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Divine_Intervention, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Divine_Intervention, Condition( function Trig_Divine_Intervention_Conditions ) )
call TriggerAddAction( gg_trg_Divine_Intervention, function Trig_Divine_Intervention_Actions )
endfunction
function Trig_Rupture_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0EE' ) ) then
return false
endif
return true
endfunction
function Trig_Rupture_Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0EE', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Rupture_Actions takes nothing returns nothing
if ( Trig_Rupture_Func001C() ) then
call UnitAddAbilityBJ( 'A0EI', GetTriggerUnit() )
else
call IncUnitAbilityLevelSwapped( 'A0EI', GetTriggerUnit() )
endif
endfunction
//===========================================================================
function InitTrig_Rupture takes nothing returns nothing
set gg_trg_Rupture = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Rupture, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Rupture, Condition( function Trig_Rupture_Conditions ) )
call TriggerAddAction( gg_trg_Rupture, function Trig_Rupture_Actions )
endfunction
function Trig_Bleed_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0E8' ) ) then
return false
endif
return true
endfunction
function Trig_Bleed_Actions takes nothing returns nothing
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetUnitLoc(GetSpellTargetUnit()) )
call UnitAddAbilityBJ( 'A0EF', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A0EF', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0E8', GetSpellAbilityUnit()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "acidbomb", GetSpellTargetUnit() )
endfunction
//===========================================================================
function InitTrig_Bleed takes nothing returns nothing
set gg_trg_Bleed = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Bleed, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
call TriggerAddCondition( gg_trg_Bleed, Condition( function Trig_Bleed_Conditions ) )
call TriggerAddAction( gg_trg_Bleed, function Trig_Bleed_Actions )
endfunction
function Trig_Bleed_two_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0E8' ) ) then
return false
endif
return true
endfunction
function Trig_Bleed_two_Func003001002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B03Q') == true )
endfunction
function Trig_Bleed_two_Func003A takes nothing returns nothing
call UnitRemoveBuffBJ( 'B03Q', GetEnumUnit() )
endfunction
function Trig_Bleed_two_Actions takes nothing returns nothing
call TriggerSleepAction( 5.00 )
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Bleed_two_Func003001002)), function Trig_Bleed_two_Func003A )
endfunction
//===========================================================================
function InitTrig_Bleed_two takes nothing returns nothing
set gg_trg_Bleed_two = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Bleed_two, EVENT_PLAYER_UNIT_SPELL_ENDCAST )
call TriggerAddCondition( gg_trg_Bleed_two, Condition( function Trig_Bleed_two_Conditions ) )
call TriggerAddAction( gg_trg_Bleed_two, function Trig_Bleed_two_Actions )
endfunction
// Trigger: Wounding Spear
//===========================================================================
function Trig_Wither_New_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0ED', GetAttacker()) > 0 ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( GetHandleInt(GetAttackedUnitBJ(), "wq") >= GetUnitLevel(GetAttacker())) then
return false
endif
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "current quota = "+I2S(GetHandleInt(GetAttackedUnitBJ(), "wq")) )
return true
endfunction
function WitherUnit takes handle h returns unit
return GetHandleHandle(h,"witherunit")
endfunction
function WitherDry takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
call TriggerSleepAction(1.5)
loop
exitwhen UnitHasBuffBJ(WitherUnit(t),'B03G')==false
call TriggerSleepAction(1)
endloop
loop
exitwhen IsUnitDeadBJ(WitherUnit(t))==false
call TriggerSleepAction(1)
endloop
call GroupRemoveUnit(udg_WitherGroup, WitherUnit(t))
call ModifyHeroStat( bj_HEROSTAT_STR, WitherUnit(t), bj_MODIFYMETHOD_ADD, GetHandleInt(WitherUnit(t),"wq" ))
call SetHandleInt(WitherUnit(t),"wq",0)
call FlushHandleLocals(WitherUnit(t))
call FlushHandleLocals(t)
call DestroyTrigger(t)
set t=null
endfunction
function StartWither takes unit target returns nothing
local trigger t=CreateTrigger()
call TriggerAddAction(t,function WitherDry)
call SetHandleHandle(t,"witherunit",target)
call TriggerExecute(t)
set t=null
endfunction
function Trig_Wither_New_Actions takes nothing returns nothing
local integer quota=GetHandleInt(GetAttackedUnitBJ(), "wq")
local integer drain=GetUnitAbilityLevelSwapped('A0ED', GetAttacker())
if IsUnitInGroup(GetAttackedUnitBJ(), udg_WitherGroup)==false then
call StartWither(GetAttackedUnitBJ())
call GroupAddUnit(udg_WitherGroup, GetAttackedUnitBJ())
endif
loop
exitwhen quota==GetUnitLevel(GetAttacker()) or drain==0
if GetHeroStr(GetAttackedUnitBJ(),false) != 1 then
call ModifyHeroStat( bj_HEROSTAT_STR, GetAttackedUnitBJ(), bj_MODIFYMETHOD_SUB, 1 )
set quota=quota+1
endif
set drain=drain-1
endloop
call SetHandleInt(GetAttackedUnitBJ(),"wq", quota)
//
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "witherquota = " +I2S(GetHandleInt(GetAttackedUnitBJ(), "wq")) )
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "ability level = "+I2S( GetUnitAbilityLevelSwapped('A005', udg_ShadowFiend) ))
endfunction
//===========================================================================
function InitTrig_Wounding_Spear takes nothing returns nothing
set gg_trg_Wounding_Spear = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Wounding_Spear, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Wounding_Spear, Condition( function Trig_Wither_New_Conditions ) )
call TriggerAddAction( gg_trg_Wounding_Spear, function Trig_Wither_New_Actions )
endfunction
function Trig_Backstab_Func004C takes nothing returns boolean
if ( ( RAbsBJ(( GetUnitFacing(GetAttackedUnitBJ()) - GetUnitFacing(GetAttacker()) )) <= 105.00 ) ) then
return true
endif
return false
endfunction
function Trig_Backstab_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0DZ', GetAttacker()) > 0 ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
if ( not Trig_Backstab_Func004C() ) then
return false
endif
return true
endfunction
function Trig_Backstab_Actions takes nothing returns nothing
local texttag x=null
call UnitDamageTargetBJ( GetAttacker(), GetAttackedUnitBJ(), ( ( 0.20 * I2R(GetUnitAbilityLevelSwapped('A0DZ', GetAttacker())) ) * I2R(GetHeroStatBJ(bj_HEROSTAT_AGI, GetAttacker(), true)) ), ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
call AddSpecialEffectTargetUnitBJ( "chest", GetAttackedUnitBJ(), "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl" )
call TriggerExecute( gg_trg_DestroyFX )
call CreateTextTagUnitBJ( "TRIGSTR_035", GetAttacker(), 16.00, 8.75, 100, 20.00, 20.00, 30.00 )
set x=GetLastCreatedTextTag()
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call TriggerSleepAction( 1.50 )
call DestroyTextTagBJ( x)
set x=null
endfunction
//===========================================================================
function InitTrig_Backstab takes nothing returns nothing
set gg_trg_Backstab = CreateTrigger( )
call DisableTrigger( gg_trg_Backstab )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Backstab, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Backstab, Condition( function Trig_Backstab_Conditions ) )
call TriggerAddAction( gg_trg_Backstab, function Trig_Backstab_Actions )
endfunction
function Trig_Smoke_Screen_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'e003' ) ) then
return false
endif
return true
endfunction
function Trig_Smoke_Screen_Func001C takes nothing returns boolean
if ( not ( GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit())) < 7 ) ) then
return false
endif
return true
endfunction
function Trig_Smoke_Screen_Actions takes nothing returns nothing
if ( Trig_Smoke_Screen_Func001C() ) then
call SetUnitScalePercent( GetSummonedUnit(), ( 83.00 + ( 17.00 * I2R(GetUnitAbilityLevelSwapped('A0E6', GetSummoningUnit())) ) ), ( 83.00 + ( 17.00 * I2R(GetUnitAbilityLevelSwapped('A0E6', GetSummoningUnit())) ) ), ( 83.00 + ( 17.00 * I2R(GetUnitAbilityLevelSwapped('A0E6', GetSummoningUnit())) ) ) )
call UnitAddAbilityBJ( 'A0E7', GetSummonedUnit() )
call SetUnitAbilityLevelSwapped( 'A0E7', GetSummonedUnit(), GetUnitAbilityLevelSwapped('A0E6', GetSummoningUnit()) )
set udg_TempLoc = GetUnitLoc(GetSummonedUnit())
call IssuePointOrderLocBJ( GetSummonedUnit(), "cloudoffog", udg_TempLoc )
call RemoveLocation(udg_TempLoc)
else
call SetUnitScalePercent( GetSummonedUnit(), ( 83.00 + ( 17.00 * I2R(GetUnitAbilityLevelSwapped('A0E6', GetSummoningUnit())) ) ), ( 83.00 + ( 17.00 * I2R(GetUnitAbilityLevelSwapped('A0E6', GetSummoningUnit())) ) ), ( 83.00 + ( 17.00 * I2R(GetUnitAbilityLevelSwapped('A0E6', GetSummoningUnit())) ) ) )
call UnitAddAbilityBJ( 'A019', GetSummonedUnit() )
call SetUnitAbilityLevelSwapped( 'A019', GetSummonedUnit(), GetUnitAbilityLevelSwapped('A0E6', GetSummoningUnit()) )
set udg_TempLoc = GetUnitLoc(GetSummonedUnit())
call IssuePointOrderLocBJ( GetSummonedUnit(), "cloudoffog", udg_TempLoc )
call RemoveLocation(udg_TempLoc)
endif
endfunction
//===========================================================================
function InitTrig_Smoke_Screen takes nothing returns nothing
set gg_trg_Smoke_Screen = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Smoke_Screen, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Smoke_Screen, Condition( function Trig_Smoke_Screen_Conditions ) )
call TriggerAddAction( gg_trg_Smoke_Screen, function Trig_Smoke_Screen_Actions )
endfunction
function Trig_Culling_Blade_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0E2' ) ) then
return false
endif
return true
endfunction
function Trig_Culling_Blade_Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0E2', GetSpellAbilityUnit()) == 1 ) ) then
return false
endif
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) <= 175.00 ) ) then
return false
endif
return true
endfunction
function Trig_Culling_Blade_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0E2', GetSpellAbilityUnit()) == 2 ) ) then
return false
endif
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) <= 290.00 ) ) then
return false
endif
return true
endfunction
function Trig_Culling_Blade_Func003C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0E2', GetSpellAbilityUnit()) == 3 ) ) then
return false
endif
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) <= 400.00 ) ) then
return false
endif
return true
endfunction
function Trig_Culling_Blade_Actions takes nothing returns nothing
if ( Trig_Culling_Blade_Func001C() ) then
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call UnitDamageTargetBJ( GetLastCreatedUnit(), GetSpellTargetUnit(), 100000000.00, ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL )
else
endif
if ( Trig_Culling_Blade_Func002C() ) then
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), 100000000.00, ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL )
else
endif
if ( Trig_Culling_Blade_Func003C() ) then
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), 100000000.00, ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL )
else
endif
endfunction
//===========================================================================
function InitTrig_Culling_Blade takes nothing returns nothing
set gg_trg_Culling_Blade = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Culling_Blade, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Culling_Blade, Condition( function Trig_Culling_Blade_Conditions ) )
call TriggerAddAction( gg_trg_Culling_Blade, function Trig_Culling_Blade_Actions )
endfunction
function Trig_Revenants_Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetSummonedUnit()) == 'u003' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetSummonedUnit()) == 'u005' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetSummonedUnit()) == 'u009' ) ) then
return true
endif
return false
endfunction
function Trig_Revenants_Conditions takes nothing returns boolean
if ( not Trig_Revenants_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Revenants_Actions takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'A0E0', GetSummonedUnit(), GetUnitAbilityLevelSwapped('A07K', GetSummoningUnit()) )
endfunction
//===========================================================================
function InitTrig_Revenants takes nothing returns nothing
set gg_trg_Revenants = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Revenants, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Revenants, Condition( function Trig_Revenants_Conditions ) )
call TriggerAddAction( gg_trg_Revenants, function Trig_Revenants_Actions )
endfunction
function Trig_Soul_Assumption_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'ndr1' ) ) then
return false
endif
return true
endfunction
function Trig_Soul_Assumption_Func001001002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A0C4', GetFilterUnit()) != 0 )
endfunction
function Trig_Soul_Assumption_Func001A takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), ( ( 10.00 * I2R(GetUnitAbilityLevelSwapped('A0C4', GetEnumUnit())) ) + GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) ) )
endfunction
function Trig_Soul_Assumption_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsOfPlayerMatching(GetOwningPlayer(GetEnteringUnit()), Condition(function Trig_Soul_Assumption_Func001001002)), function Trig_Soul_Assumption_Func001A )
endfunction
//===========================================================================
function InitTrig_Soul_Assumption takes nothing returns nothing
set gg_trg_Soul_Assumption = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Soul_Assumption, GetPlayableMapRect() )
call TriggerAddCondition( gg_trg_Soul_Assumption, Condition( function Trig_Soul_Assumption_Conditions ) )
call TriggerAddAction( gg_trg_Soul_Assumption, function Trig_Soul_Assumption_Actions )
endfunction
function Trig_Grave_Chill_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08X' ) ) then
return false
endif
return true
endfunction
function Trig_Grave_Chill_Actions takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetSpellAbilityUnit()), udg_TempLoc, udg_TempLoc )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A09C', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A09C', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A08X', GetSpellAbilityUnit()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "bloodlust", GetSpellAbilityUnit() )
endfunction
//===========================================================================
function InitTrig_Grave_Chill takes nothing returns nothing
set gg_trg_Grave_Chill = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Grave_Chill, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Grave_Chill, Condition( function Trig_Grave_Chill_Conditions ) )
call TriggerAddAction( gg_trg_Grave_Chill, function Trig_Grave_Chill_Actions )
endfunction
function Trig_DestroyFX_Actions takes nothing returns nothing
local effect f=bj_lastCreatedEffect
call TriggerSleepAction( 1.00 )
call DestroyEffect(f)
set f=null
endfunction
//===========================================================================
function InitTrig_DestroyFX takes nothing returns nothing
set gg_trg_DestroyFX = CreateTrigger( )
call TriggerAddAction( gg_trg_DestroyFX, function Trig_DestroyFX_Actions )
endfunction
function Trig_TossUnit_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0BZ' ) ) then
return false
endif
return true
endfunction
function TossFilter takes nothing returns boolean
if IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) then
return false
elseif IsUnitType(GetFilterUnit(), UNIT_TYPE_FLYING) then
return false
elseif GetFilterUnit() == GetSpellAbilityUnit() then
return false
elseif IsUnitDeadBJ(GetFilterUnit()) then
return false
elseif IsUnitType(GetTriggerUnit(), UNIT_TYPE_ANCIENT) then
return false
elseif IsUnitVisible(GetFilterUnit(), GetOwningPlayer(GetSpellAbilityUnit())) == false then
return false
elseif GetUnitAbilityLevelSwapped('A04R', GetFilterUnit()) != 0 then
return false
endif
return true
endfunction
function Tree_Killer1 takes nothing returns nothing
call KillDestructable( GetEnumDestructable() )
endfunction
function TossFX takes nothing returns nothing
local effect f= bj_lastCreatedEffect
call TriggerSleepAction(0.4)
call DestroyEffect(f)
set f=null
endfunction
function TossMove takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit u=GetC(t,"t")
local real b=GetHandleReal(t,"r")
local real n=GetHandleReal(t,"n")
local real d=GetHandleReal(t,"d")
local location l=GetL(t,"l")
local real x=-d+(d*(b/50))
local location m=PolarProjectionBJ(l,x,n)
local real y=((b-25)*(b-25))
call SetUnitPositionLoc(u,m)
call SetUnitFlyHeight( u, ( 775-y ) , 10000.00 )
if GetRandomInt(1,4)==2 then
call AddSpecialEffectTargetUnitBJ( "origin", u, "Abilities\\Spells\\Undead\\Cripple\\CrippleTarget.mdl" )
call TriggerExecute(gg_trg_DestroyFX)
endif
//call DestroyEffect(AddSpellEffectTargetById('A0BZ', EFFECT_TYPE_SPECIAL , u,"origin" ))
set b=b+1
call SetHandleReal(t,"r",b)
set t=null
set u=null
set b=0
set n=0
set d=0
set l=null
set x=0
call RemoveLocation(m)
set m=null
set y=0
endfunction
function Trig_TossUnit_Actions takes nothing returns nothing
local group g=CreateGroup()
local unit c=GetTriggerUnit()
local unit a=null
local location l=GetSpellTargetLoc()
local timer t=null
local real b=1
local real d=0
local real n=0
call GroupEnumUnitsInRange(g,GetUnitX(c),GetUnitY(c),275,Condition(function TossFilter))
set a=GroupPickRandomUnit(g)
call GroupClear(g)
if a!=null then
call SetUnitAnimationByIndex(c,4)
call PauseUnitBJ( true, a )
call SetUnitPathing( a, false )
call SetUnitFacingToFaceLocTimed( a, l, 0 )
call UnitAddAbilityBJ( 'AEme', a )
call UnitRemoveAbilityBJ( 'AEme', a )
set t=CreateTimer()
call SetHandleHandle(t,"t",a)
call SetHandleReal(t,"r",b)
set d=ImpDist(GetUnitX(c),GetUnitY(c),GetLocationX(l),GetLocationY(l))
set n=Angle2Points(GetUnitX(c),GetUnitY(c),GetLocationX(l),GetLocationY(l))
call SetHandleReal(t,"d",d)
call SetHandleReal(t,"n",n)
call SetHandleHandle(t,"l",l)
call TimerStart(t,0.02,true,function TossMove)
call PolledWait(1.0)
call RemoveLocation(l)
set l=GetL(t,"l")
call RemoveLocation(l)
call FlushHandleLocals(t)
call DestroyTimer(t)
call SetUnitFlyHeightBJ( a, GetUnitDefaultFlyHeight(a), 10000.00 )
call PauseUnitBJ( false, a )
call SetUnitPathing( a, true )
set l=GetUnitLoc(a)
call DestroyEffect(AddSpellEffectByIdLoc('A0BZ', EFFECT_TYPE_TARGET, l))
call TerrainDeformationRippleBJ( 0.2, true, l, 1.00, 300.00, 96.00, 1, 64.00 )
call UnitDamageTargetBJ( c, a, 38.00 * I2R(GetUnitAbilityLevelSwapped('A0BZ', c)) , ATTACK_TYPE_NORMAL, DAMAGE_TYPE_DEMOLITION )
call DamageEnemyArea1(c, GetUnitX(a),GetUnitY(a), 300 , 75.00 * I2R(GetUnitAbilityLevelSwapped('A0BZ', c)) ,'A0BZ')
call EnumDestructablesInCircleBJ( 300,l , function Tree_Killer1 )
endif
call DestroyGroup(g)
set g=null
set c=null
set a=null
call RemoveLocation(l)
set l=null
set t=null
set b=0
set n=0
set d=0
endfunction
//===========================================================================
function InitTrig_TossUnit takes nothing returns nothing
set gg_trg_TossUnit = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_TossUnit, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_TossUnit, Condition( function Trig_TossUnit_Conditions ) )
call TriggerAddAction( gg_trg_TossUnit, function Trig_TossUnit_Actions )
endfunction
// Trigger: six orb Copy
//===========================================================================
function FlameOrbUpgrade takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'A0BT', GetEnumUnit(), GetUnitAbilityLevelSwapped('A0DR', GetLearningUnit()) )
endfunction
function Trig_Generator_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0DR' ) ) then
return false
endif
set bj_groupLastCreatedDest=GetUnitsOfTypeIdAll('e00F')
call ForGroupBJ( bj_groupLastCreatedDest , function FlameOrbUpgrade )
call DestroyGroup(bj_groupLastCreatedDest)
set bj_groupLastCreatedDest=null
if ( GetUnitAbilityLevelSwapped('A0DR', GetLearningUnit()) !=1 ) then
return false
endif
return true
endfunction
function GetTimer takes trigger t,string s returns timer
return GetHandleHandle(t,s)
endfunction
function GetUnit takes trigger t, string s returns unit
return GetHandleHandle(t,s)
endfunction
function GetOrbitAngle takes timer t , string s returns real
return GetHandleReal(t,s)
endfunction
function GetGenerator takes timer t, string s returns unit
return GetHandleHandle(t,s)
endfunction
function Generator_Orbit takes nothing returns nothing
local timer t=GetExpiredTimer()
local real o=GetOrbitAngle(t,"o")
call SetUnitX(GetC(t,"g"),GetUnitX(GetC(t,"c"))+InstanceGetMemberReal("so","r")*udg_orb_cos[R2I(o)])
call SetUnitY(GetC(t,"g"),GetUnitY(GetC(t,"c"))+InstanceGetMemberReal("so","r")*udg_orb_sin[R2I(o)])
if o >= 0x059 then
set o=0
else
set o=o+0x01
endif
call SetHandleReal(t, "o",o)
set o=0
set t=null
endfunction
function Radius_Change_Conditions takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("manashieldon") or GetIssuedOrderIdBJ() == String2OrderIdBJ("manashieldoff") or GetTriggerEventId()==EVENT_UNIT_DEATH ) ) then
return false
endif
return true
endfunction
function Radius_Timer takes nothing returns nothing
local real r=InstanceGetMemberReal("so","r")
if InstanceGetMemberReal("so","rI")==2 then
if r<0x02ee then
set r=r+0x05
call InstanceSetMemberReal("so","r",r)
else
call InstanceSetMemberReal("so","rI",1)
endif
elseif InstanceGetMemberReal("so","rI")==1 then
if r>0x096 then
set r=r-0x05
call InstanceSetMemberReal("so","r",r)
else
call InstanceSetMemberReal("so","rI",2)
endif
endif
set r=0
endfunction
function Radius_Change_Actions takes nothing returns nothing
local trigger t=GetTriggeringTrigger()
local timer i
if GetIssuedOrderIdBJ() == String2OrderIdBJ("manashieldon") then
set i = CreateTimer()
call SetHandleHandle(t,"radiustimer",i)
call TimerStart(i, 0.04, true, function Radius_Timer)
else
call DestroyTimer(GetTimer(t,"radiustimer"))
call FlushHandleLocals(t)
endif
set i=null
set t=null
endfunction
function GunControl takes nothing returns nothing
local trigger tr=GetTriggeringTrigger()
local unit gen=GetUnit(tr,"generator")
//call PingMinimapLocForForce( GetPlayersAll(), GetUnitLoc(gen), 1 )
if (GetTriggerEventId()==EVENT_UNIT_DEATH) then
call ShowUnit( gen ,false)
else
call ShowUnit( gen,true )
call UnitRemoveAbility(gen, 'Aloc')
call UnitAddAbility(gen,'Aloc')
endif
set tr=null
set gen=null
endfunction
function flameorb takes unit caster, real startangle returns nothing
local timer t=CreateTimer()
local trigger tr=CreateTrigger()
local location l=GetUnitLoc(caster)
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00F', GetOwningPlayer(caster), l, l )
call SetUnitFacing(GetLastCreatedUnit(),90)
call SetHandleReal(t,"o",startangle/4)
call SetHandleHandle(t, "g", GetLastCreatedUnit())
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "holdposition" )
call RemoveGuardPosition( GetLastCreatedUnit() )
call SetHandleHandle(t,"c", GetTriggerUnit())
call SetHandleHandle(tr,"generator",GetLastCreatedUnit())
call TimerStart(t, 0.025, true, function Generator_Orbit)
call TriggerRegisterUnitEvent( tr, caster, EVENT_UNIT_DEATH )
call TriggerRegisterUnitEvent( tr, caster, EVENT_UNIT_HERO_REVIVE_FINISH )
call TriggerAddAction(tr,function GunControl)
call RemoveLocation(l)
set l=null
set t=null
set tr=null
endfunction
function Trig_Generator_Actions takes nothing returns nothing
local trigger t=CreateTrigger()
local integer counter=0
local real sub=0
loop
exitwhen counter>89
set udg_orb_cos[counter]=CosBJ(4*sub)
set udg_orb_sin[counter]=SinBJ(4*sub)
set sub=sub+1
set counter=counter+1
endloop
call InstanceSetMemberReal("so","r",150)
call InstanceSetMemberReal("so","rI",2)
call flameorb(GetTriggerUnit(),0)
call flameorb(GetTriggerUnit(),72)
call flameorb(GetTriggerUnit(),144)
call flameorb(GetTriggerUnit(),216)
call flameorb(GetTriggerUnit(),288)
//call flameorb(GetTriggerUnit(),150)
call TriggerRegisterUnitEvent( t, GetTriggerUnit(), EVENT_UNIT_ISSUED_ORDER )
call TriggerRegisterUnitEvent( t, GetTriggerUnit(), EVENT_UNIT_DEATH )
call TriggerAddCondition(t,Condition(function Radius_Change_Conditions))
call TriggerAddAction(t,function Radius_Change_Actions)
set t=null
set counter=0
set sub=0
endfunction
//===========================================================================
function InitTrig_six_orb_Copy takes nothing returns nothing
set gg_trg_six_orb_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_six_orb_Copy, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_six_orb_Copy, Condition( function Trig_Generator_Conditions ) )
call TriggerAddAction( gg_trg_six_orb_Copy, function Trig_Generator_Actions )
endfunction
function Trig_Impetus_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0DY' ) ) then
return false
endif
return true
endfunction
function Impetus_Damage takes nothing returns nothing
local texttag g
local real d
local trigger t=GetTriggeringTrigger()
if UnitHasBuffBJ(GetTriggerUnit(), 'B03U') == true and GetUnitAbilityLevel( GetEventDamageSource(), 'A0DY' )>0 then
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "Applying Damage" )
call DestroyTrigger(t)
set d=0.04*I2R(GetUnitAbilityLevel( GetEventDamageSource(), 'A0DY' ))*ImpDist(GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),GetUnitX(GetEventDamageSource()),GetUnitY(GetEventDamageSource()) )
set g=CreateTextTagUnitBJ(I2S(R2I(d+GetEventDamage())), GetTriggerUnit(), 64 , 10 , 1 , 85 , 86 , 15 )
call SetTextTagVelocityBJ( g, 64, 90 )
call UnitDamageTargetBJ( GetEventDamageSource(), GetTriggerUnit(), d, ATTACK_TYPE_HERO, DAMAGE_TYPE_DIVINE )
call TriggerSleepAction(1)
call DestroyTextTagBJ( g )
endif
set d=0
set g=null
set t=null
endfunction
function Impetus_Condition takes nothing returns boolean
if GetTriggerEventId() == EVENT_PLAYER_UNIT_ATTACKED then
if GetUnitAbilityLevel( GetAttacker(), 'A0DY' ) == 0 then
return false
elseif GetHandleInt(GetAttacker(),"impetuson")==1 then
if IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false then
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "Unit is Attacking" )
return true
endif
else
return false
endif
elseif GetTriggerEventId() == EVENT_UNIT_ISSUED_ORDER then
if GetIssuedOrderId() == OrderId("poisonarrows") then
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "Impetus on" )
call SetHandleInt( GetTriggerUnit(), "impetuson", 1)
elseif GetIssuedOrderId() == OrderId("unpoisonarrows") then
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "Impetus off" )
call SetHandleInt( GetTriggerUnit(), "impetuson", 0)
endif
elseif GetTriggerEventId() == EVENT_UNIT_SPELL_EFFECT then
if GetSpellAbilityId()== 'A0DY' then
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "Unit Spell Effect" )
return true
else
return false
endif
endif
return false
endfunction
function Impetus_Actions takes nothing returns nothing
local trigger r=CreateTrigger()
local unit t
if GetTriggerEventId() == EVENT_UNIT_SPELL_EFFECT then
set t=GetSpellTargetUnit()
else
set t=GetAttackedUnitBJ()
endif
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "Creating Damage Trigger" )
call TriggerRegisterUnitEvent( r, t, EVENT_UNIT_DAMAGED )
call TriggerAddAction(r,function Impetus_Damage)
call TriggerSleepAction(2)
call DestroyTrigger(r)
set r=null
set t=null
endfunction
function Trig_Impetus_Actions takes nothing returns nothing
local trigger r=GetTriggeringTrigger()
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterUnitEvent( t, GetLearningUnit(), EVENT_UNIT_SPELL_EFFECT )
call TriggerRegisterUnitEvent( t, GetLearningUnit(), EVENT_UNIT_ISSUED_ORDER )
call TriggerAddCondition(t, Condition(function Impetus_Condition) )
call TriggerAddAction(t , function Impetus_Actions )
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "Impetus Trigger Setup Complete" )
call DestroyTrigger(r)
set r=null
set t=null
set gg_trg_Impetus=null
endfunction
//===========================================================================
function InitTrig_Impetus takes nothing returns nothing
set gg_trg_Impetus = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Impetus, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Impetus, Condition( function Trig_Impetus_Conditions ) )
call TriggerAddAction( gg_trg_Impetus, function Trig_Impetus_Actions )
endfunction
function Trig_Untouchable_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0DW', GetAttackedUnitBJ()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Untouchable_Actions takes nothing returns nothing
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetAttackedUnitBJ()), GetUnitLoc(GetAttackedUnitBJ()), GetUnitLoc(GetAttacker()) )
call UnitAddAbilityBJ( 'A0B0', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "acidbomb", GetAttacker() )
endfunction
//===========================================================================
function InitTrig_Untouchable takes nothing returns nothing
set gg_trg_Untouchable = CreateTrigger( )
call DisableTrigger( gg_trg_Untouchable )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Untouchable, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Untouchable, Condition( function Trig_Untouchable_Conditions ) )
call TriggerAddAction( gg_trg_Untouchable, function Trig_Untouchable_Actions )
endfunction
function Trig_Enchant_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DX' ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( IsUnitType(GetSpellTargetUnit(), UNIT_TYPE_ANCIENT) == false ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Func004001002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetTriggerUnit()) )
endfunction
function Trig_Enchant_Func004001002002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'Bslo') == true )
endfunction
function Trig_Enchant_Func004001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Enchant_Func004001002001(), Trig_Enchant_Func004001002002() )
endfunction
function Trig_Enchant_Func004A takes nothing returns nothing
call UnitRemoveBuffBJ( 'Bslo', GetEnumUnit() )
endfunction
function Trig_Enchant_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
if ( Trig_Enchant_Func002C() ) then
call UnitRemoveBuffBJ( 'Bslo', GetSpellTargetUnit() )
call SetUnitOwner( GetSpellTargetUnit(), GetOwningPlayer(GetSpellAbilityUnit()), true )
call UnitApplyTimedLifeBJ( 30.00, 'BTLF', GetSpellTargetUnit() )
call UnitRemoveBuffBJ( 'Bslo', GetSpellTargetUnit() )
else
endif
call TriggerSleepAction( 0.50 )
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Enchant_Func004001002)), function Trig_Enchant_Func004A )
endfunction
//===========================================================================
function InitTrig_Enchant takes nothing returns nothing
set gg_trg_Enchant = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Enchant, Condition( function Trig_Enchant_Conditions ) )
call TriggerAddAction( gg_trg_Enchant, function Trig_Enchant_Actions )
endfunction
function Trig_BlindStrike_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A09F' ) ) then
return false
endif
return true
endfunction
function AnglePoints takes real x1, real y1, real x2, real y2 returns real
return bj_RADTODEG * Atan2(y2 - y1, x2 - x1)
endfunction
function Trig_BlindStrike_Actions takes nothing returns nothing
//local effect fx=AddSpecialEffectTargetUnitBJ( "hand, right", GetTriggerUnit(), "Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl" )
//local effect fx1=AddSpecialEffectTargetUnitBJ( "hand, left", GetTriggerUnit(), "Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile_mini.mdl" )
local real angle=AnglePoints( GetUnitX(GetTriggerUnit()) , GetUnitY(GetTriggerUnit()) , GetUnitX(GetSpellTargetUnit()) , GetUnitY(GetSpellTargetUnit()) )
local unit caster=GetTriggerUnit()
local unit target=GetSpellTargetUnit()
call SetUnitTurnSpeedBJ( caster, 1.0 )
call UnitAddAbilityBJ( 'A0DV', caster )
call QueueUnitAnimation(caster, "attack")
call SetUnitTimeScale(caster,0.2)
//call TriggerSleepAction(0)
//call ShowUnit(caster, false)
call SetUnitX(caster, GetUnitX(target)+128*CosBJ(angle) )
call SetUnitY(caster, GetUnitY(target)+128*SinBJ(angle) )
//call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, R2S(GetUnitTurnSpeed(caster)) )
call SetUnitFacing(caster,angle-180)
//call ShowUnit(caster, true)
call SetUnitTimeScale(caster,1.0)
call IssueTargetOrderBJ( caster, "attack", target )
call TriggerSleepAction(0.3)
call UnitDamageTargetBJ( caster, target, ( 30.00 * I2R(GetUnitAbilityLevelSwapped('A09F', caster)) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_FIRE )
loop
exitwhen IsUnitDeadBJ(caster)==false
call TriggerSleepAction(1)
endloop
call UnitRemoveAbilityBJ( 'A0DV', caster )
call SetUnitTurnSpeedBJ( caster, 0.5 )
//call DestroyEffect(fx)
//call DestroyEffect(fx1)
//set fx=null
//set fx1=null
set caster=null
set target=null
endfunction
//===========================================================================
function InitTrig_BlindStrike takes nothing returns nothing
set gg_trg_BlindStrike = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BlindStrike, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_BlindStrike, Condition( function Trig_BlindStrike_Conditions ) )
call TriggerAddAction( gg_trg_BlindStrike, function Trig_BlindStrike_Actions )
endfunction
function Trig_MASTER_CASTER_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'e00E' ) ) then
return false
endif
return true
endfunction
function Trig_MASTER_CASTER_Actions takes nothing returns nothing
call ShowUnitHide( GetEnteringUnit() )
call SetUnitPathing( GetTriggerUnit(), false )
call SetUnitInvulnerable( GetTriggerUnit(), true )
call UnitApplyTimedLifeBJ( 5.00, 'BTLF', GetEnteringUnit() )
endfunction
//===========================================================================
function InitTrig_MASTER_CASTER takes nothing returns nothing
set gg_trg_MASTER_CASTER = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_MASTER_CASTER, GetPlayableMapRect() )
call TriggerAddCondition( gg_trg_MASTER_CASTER, Condition( function Trig_MASTER_CASTER_Conditions ) )
call TriggerAddAction( gg_trg_MASTER_CASTER, function Trig_MASTER_CASTER_Actions )
endfunction
function Trig_ABILITY_SWITCHBOARD_Func001C takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A01N' ) ) then
return false
endif
return true
endfunction
function Trig_ABILITY_SWITCHBOARD_Func002Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A07B', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_ABILITY_SWITCHBOARD_Func002C takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A07B' ) ) then
return false
endif
return true
endfunction
function Trig_ABILITY_SWITCHBOARD_Func003C takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0BR' ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A0BR', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_ABILITY_SWITCHBOARD_Func004C takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0C1' ) ) then
return false
endif
return true
endfunction
function Trig_ABILITY_SWITCHBOARD_Actions takes nothing returns nothing
if ( Trig_ABILITY_SWITCHBOARD_Func001C() ) then
set udg_Heartstopper = GetLearningUnit()
call EnableTrigger( gg_trg_Heartstopper_kill )
else
endif
if ( Trig_ABILITY_SWITCHBOARD_Func002C() ) then
if ( Trig_ABILITY_SWITCHBOARD_Func002Func002C() ) then
call UnitAddAbilityBJ( 'A0DQ', GetTriggerUnit() )
call UnitAddAbilityBJ( 'A0DP', GetTriggerUnit() )
else
call SetUnitAbilityLevelSwapped( 'A0DQ', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A07B', GetTriggerUnit()) )
call SetUnitAbilityLevelSwapped( 'A0DP', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A07B', GetTriggerUnit()) )
endif
else
endif
if ( Trig_ABILITY_SWITCHBOARD_Func003C() ) then
call UnitAddAbilityBJ( 'A0CQ', GetTriggerUnit() )
else
endif
if ( Trig_ABILITY_SWITCHBOARD_Func004C() ) then
call IncUnitAbilityLevelSwapped( 'A0C2', GetTriggerUnit() )
call SetUnitScalePercent( GetTriggerUnit(), ( 50.00 + ( 30.00 * I2R(GetUnitAbilityLevelSwapped('A0C1', GetTriggerUnit())) ) ), ( 50.00 + ( 30.00 * I2R(GetUnitAbilityLevelSwapped('A0C1', GetTriggerUnit())) ) ), ( 50.00 + ( 30.00 * I2R(GetUnitAbilityLevelSwapped('A0C1', GetTriggerUnit())) ) ) )
else
endif
endfunction
//===========================================================================
function InitTrig_ABILITY_SWITCHBOARD takes nothing returns nothing
set gg_trg_ABILITY_SWITCHBOARD = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ABILITY_SWITCHBOARD, EVENT_PLAYER_HERO_SKILL )
call TriggerAddAction( gg_trg_ABILITY_SWITCHBOARD, function Trig_ABILITY_SWITCHBOARD_Actions )
endfunction
function Trig_Battle_Hunger_Func001C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetKillingUnitBJ(), 'B03O') == true ) ) then
return false
endif
return true
endfunction
function Trig_Battle_Hunger_Func002Func001A takes nothing returns nothing
call UnitRemoveBuffBJ( 'B03O', GetEnumUnit() )
endfunction
function Trig_Battle_Hunger_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A04R', GetKillingUnitBJ()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Battle_Hunger_Actions takes nothing returns nothing
if ( Trig_Battle_Hunger_Func001C() ) then
call UnitRemoveBuffBJ( 'B03O', GetKillingUnitBJ() )
else
endif
if ( Trig_Battle_Hunger_Func002C() ) then
call ForGroupBJ( GetUnitsOfPlayerAll(GetOwningPlayer(GetKillingUnitBJ())), function Trig_Battle_Hunger_Func002Func001A )
else
endif
endfunction
//===========================================================================
function InitTrig_Battle_Hunger takes nothing returns nothing
set gg_trg_Battle_Hunger = CreateTrigger( )
call DisableTrigger( gg_trg_Battle_Hunger )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Battle_Hunger, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Battle_Hunger, function Trig_Battle_Hunger_Actions )
endfunction
function Trig_Berserkers_call_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetTriggerUnit(), 'BHwe') == true ) ) then
return false
endif
return true
endfunction
function Trig_Berserkers_call_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call IssueTargetOrderBJ( GetTriggerUnit(), "attack", udg_BerserkerCaller )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Berserkers_call takes nothing returns nothing
set gg_trg_Berserkers_call = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Berserkers_call, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Berserkers_call, EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Berserkers_call, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Berserkers_call, Condition( function Trig_Berserkers_call_Conditions ) )
call TriggerAddAction( gg_trg_Berserkers_call, function Trig_Berserkers_call_Actions )
endfunction
function Trig_Berserkers_call_Cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0C7' ) ) then
return false
endif
return true
endfunction
function Trig_Berserkers_call_Cast_Func010001003 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'BHwe') == true )
endfunction
function Trig_Berserkers_call_Cast_Func010A takes nothing returns nothing
call IssueTargetOrderBJ( GetEnumUnit(), "attack", udg_BerserkerCaller )
endfunction
function Trig_Berserkers_call_Cast_Func013001002001 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'BHwe') == true )
endfunction
function Trig_Berserkers_call_Cast_Func013001002002 takes nothing returns boolean
return ( GetPlayerController(GetOwningPlayer(GetFilterUnit())) == MAP_CONTROL_COMPUTER )
endfunction
function Trig_Berserkers_call_Cast_Func013001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Berserkers_call_Cast_Func013001002001(), Trig_Berserkers_call_Cast_Func013001002002() )
endfunction
function Trig_Berserkers_call_Cast_Func013Func001C takes nothing returns boolean
if ( not ( GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit())) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Berserkers_call_Cast_Func013Func002C takes nothing returns boolean
if ( not ( GetConvertedPlayerId(GetOwningPlayer(GetEnumUnit())) == 7 ) ) then
return false
endif
return true
endfunction
function Trig_Berserkers_call_Cast_Func013A takes nothing returns nothing
if ( Trig_Berserkers_call_Cast_Func013Func001C() ) then
call UnitRemoveBuffBJ( 'BHwe', GetEnumUnit() )
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", GetRectCenter(gg_rct_FlagScourgeBig) )
else
endif
if ( Trig_Berserkers_call_Cast_Func013Func002C() ) then
call UnitRemoveBuffBJ( 'BHwe', GetEnumUnit() )
call IssuePointOrderLocBJ( GetEnumUnit(), "attack", GetRectCenter(gg_rct_FlagSentBig) )
else
endif
endfunction
function Trig_Berserkers_call_Cast_Actions takes nothing returns nothing
set udg_BerserkerCaller = GetSpellAbilityUnit()
call TriggerSleepAction( 0.20 )
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, udg_TempLoc )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A0E1', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A0E1', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0C7', udg_BerserkerCaller) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "innerfire", GetTriggerUnit() )
set udg_TempLoc = GetUnitLoc(udg_BerserkerCaller)
call ForGroupBJ( GetUnitsInRangeOfLocMatching(550.00, udg_TempLoc, Condition(function Trig_Berserkers_call_Cast_Func010001003)), function Trig_Berserkers_call_Cast_Func010A )
call RemoveLocation(udg_TempLoc)
call TriggerSleepAction( 3.50 )
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Berserkers_call_Cast_Func013001002)), function Trig_Berserkers_call_Cast_Func013A )
endfunction
//===========================================================================
function InitTrig_Berserkers_call_Cast takes nothing returns nothing
set gg_trg_Berserkers_call_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Berserkers_call_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Berserkers_call_Cast, Condition( function Trig_Berserkers_call_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Berserkers_call_Cast, function Trig_Berserkers_call_Cast_Actions )
endfunction
function Trig_ScatterShot_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A064' ) ) then
return false
endif
return true
endfunction
function Trig_ScatterShot_Actions takes nothing returns nothing
local location l=GetSpellTargetLoc()
local location m=null
local location u=GetUnitLoc(GetTriggerUnit())
local integer c=4+4*GetUnitAbilityLevelSwapped('A064', GetTriggerUnit())
local unit t=GetTriggerUnit()
local unit p=null
call AddSpecialEffectLocBJ( u, "Abilities\\Spells\\Human\\Flare\\FlareTarget.mdl" )
call TriggerExecute(gg_trg_DestroyFX)
loop
exitwhen c<=0
set p=CreateUnit(GetOwningPlayer(t), 'e00J' , GetUnitX(t),GetUnitY(t),90)
set m=PolarProjectionBJ(l,GetRandomDirectionDeg(),GetRandomDirectionDeg())
call IssuePointOrderLocBJ(p, "attackground", m )
call UnitApplyTimedLifeBJ( 0.50, 'BTLF', p )
call RemoveLocation(m)
set c=c-1
endloop
call RemoveLocation(m)
call RemoveLocation(u)
call RemoveLocation(l)
set m=null
set u=null
set l=null
set t=null
set p=null
set c=0
endfunction
//===========================================================================
function InitTrig_ScatterShot takes nothing returns nothing
set gg_trg_ScatterShot = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ScatterShot, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ScatterShot, Condition( function Trig_ScatterShot_Conditions ) )
call TriggerAddAction( gg_trg_ScatterShot, function Trig_ScatterShot_Actions )
endfunction
function Trig_Counter_Helix_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'B03P') == true ) ) then
return false
endif
if ( not ( IsUnitType(GetAttacker(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
return true
endfunction
function Trig_Counter_Helix_Func001Func002001003001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Counter_Helix_Func001Func002001003001002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Counter_Helix_Func001Func002001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Counter_Helix_Func001Func002001003001001(), Trig_Counter_Helix_Func001Func002001003001002() )
endfunction
function Trig_Counter_Helix_Func001Func002001003002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Counter_Helix_Func001Func002001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Counter_Helix_Func001Func002001003001(), Trig_Counter_Helix_Func001Func002001003002() )
endfunction
function Trig_Counter_Helix_Func001Func002A takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ( "origin", GetEnumUnit(), "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl" )
call TriggerExecute( gg_trg_DestroyFX )
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), 150.00, ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
endfunction
function Trig_Counter_Helix_Func001C takes nothing returns boolean
if ( not ( GetRandomReal(0, 100.00) < ( 5.00 * I2R(GetUnitAbilityLevelSwapped('A0C6', GetTriggerUnit())) ) ) ) then
return false
endif
return true
endfunction
function Trig_Counter_Helix_Actions takes nothing returns nothing
if ( Trig_Counter_Helix_Func001C() ) then
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
call ForGroupBJ( GetUnitsInRangeOfLocMatching(300.00, udg_TempLoc, Condition(function Trig_Counter_Helix_Func001Func002001003)), function Trig_Counter_Helix_Func001Func002A )
call RemoveLocation(udg_TempLoc)
call SetUnitAnimation( GetTriggerUnit(), "spin" )
else
endif
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 0.25 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Counter_Helix takes nothing returns nothing
set gg_trg_Counter_Helix = CreateTrigger( )
call DisableTrigger( gg_trg_Counter_Helix )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Counter_Helix, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Counter_Helix, Condition( function Trig_Counter_Helix_Conditions ) )
call TriggerAddAction( gg_trg_Counter_Helix, function Trig_Counter_Helix_Actions )
endfunction
function Trig_Craggy_Exterior_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0BU', GetAttackedUnitBJ()) > 0 ) ) then
return false
endif
if ( not ( IsUnitType(GetAttacker(), UNIT_TYPE_MELEE_ATTACKER) == true ) ) then
return false
endif
return true
endfunction
function Trig_Craggy_Exterior_Func002C takes nothing returns boolean
if ( not ( udg_CraggyChance <= ( GetUnitAbilityLevelSwapped('A0BU', GetAttackedUnitBJ()) * 6 ) ) ) then
return false
endif
return true
endfunction
function Trig_Craggy_Exterior_Actions takes nothing returns nothing
set udg_CraggyChance = GetRandomInt(1, 100)
if ( Trig_Craggy_Exterior_Func002C() ) then
set udg_TempLoc = GetUnitLoc(GetAttackedUnitBJ())
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetAttackedUnitBJ()), udg_TempLoc, GetUnitLoc(GetAttacker()) )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A0BV', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A0BV', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0BU', GetAttackedUnitBJ()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", GetAttacker() )
else
endif
endfunction
//===========================================================================
function InitTrig_Craggy_Exterior takes nothing returns nothing
set gg_trg_Craggy_Exterior = CreateTrigger( )
call DisableTrigger( gg_trg_Craggy_Exterior )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Craggy_Exterior, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Craggy_Exterior, Condition( function Trig_Craggy_Exterior_Conditions ) )
call TriggerAddAction( gg_trg_Craggy_Exterior, function Trig_Craggy_Exterior_Actions )
endfunction
// Trigger: Mark Rewrite
//===========================================================================
function Trig_Mark_of_the_Abyss_new_Copy_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01J' ) ) then
return false
endif
return true
endfunction
function Trig_Mark_of_the_Abyss_new_Copy_Actions takes nothing returns nothing
local unit MarkedUnit = GetSpellTargetUnit()
local real MarkWait = ( 20.00 + ( 10.00 * I2R(GetUnitAbilityLevelSwapped('A01J', GetSpellAbilityUnit())) ) )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( IsUnitAlly(MarkedUnit, ConvertedPlayer(GetForLoopIndexA())) == true ) then
call SetPlayerAllianceStateBJ( ConvertedPlayer(GetForLoopIndexA()), GetOwningPlayer(MarkedUnit), bj_ALLIANCE_UNALLIED )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call TriggerSleepAction( MarkWait )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( IsUnitEnemy(MarkedUnit, ConvertedPlayer(GetForLoopIndexA())) == true ) then
if ( IsPlayerEnemy(ConvertedPlayer(GetForLoopIndexA()), GetOwningPlayer(MarkedUnit)) == false ) then
if ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING ) then
call SetPlayerAllianceStateBJ( ConvertedPlayer(GetForLoopIndexA()), GetOwningPlayer(MarkedUnit), bj_ALLIANCE_ALLIED_VISION )
else
if (GetForLoopIndexA() == 1) then
call SetPlayerAllianceStateBJ( ConvertedPlayer(GetForLoopIndexA()), GetOwningPlayer(MarkedUnit), bj_ALLIANCE_ALLIED_VISION )
else
if (GetForLoopIndexA() == 7) then
call SetPlayerAllianceStateBJ( ConvertedPlayer(GetForLoopIndexA()), GetOwningPlayer(MarkedUnit), bj_ALLIANCE_ALLIED_VISION )
else
call SetPlayerAllianceStateBJ( ConvertedPlayer(GetForLoopIndexA()), GetOwningPlayer(MarkedUnit), bj_ALLIANCE_ALLIED_UNITS )
endif
endif
endif
endif
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Mark_Rewrite takes nothing returns nothing
set gg_trg_Mark_Rewrite = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mark_Rewrite, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Mark_Rewrite, Condition( function Trig_Mark_of_the_Abyss_new_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Mark_Rewrite, function Trig_Mark_of_the_Abyss_new_Copy_Actions )
endfunction
function Trig_Shadowraze_Func001Func003001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Shadowraze_Func001Func003001003002001 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Shadowraze_Func001Func003001003002002 takes nothing returns boolean
return ( 'BNab' == 'BNab' )
endfunction
function Trig_Shadowraze_Func001Func003001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Shadowraze_Func001Func003001003002001(), Trig_Shadowraze_Func001Func003001003002002() )
endfunction
function Trig_Shadowraze_Func001Func003001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Shadowraze_Func001Func003001003001(), Trig_Shadowraze_Func001Func003001003002() )
endfunction
function Trig_Shadowraze_Func001Func003A takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), ( 75.00 * I2R(GetUnitAbilityLevelSwapped('A07B', GetTriggerUnit())) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
endfunction
function Trig_Shadowraze_Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07B' ) ) then
return false
endif
return true
endfunction
function Trig_Shadowraze_Func002Func003001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Shadowraze_Func002Func003001003002001 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Shadowraze_Func002Func003001003002002 takes nothing returns boolean
return ( 'BNab' == 'BNab' )
endfunction
function Trig_Shadowraze_Func002Func003001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Shadowraze_Func002Func003001003002001(), Trig_Shadowraze_Func002Func003001003002002() )
endfunction
function Trig_Shadowraze_Func002Func003001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Shadowraze_Func002Func003001003001(), Trig_Shadowraze_Func002Func003001003002() )
endfunction
function Trig_Shadowraze_Func002Func003A takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), ( 75.00 * I2R(GetUnitAbilityLevelSwapped('A07B', GetTriggerUnit())) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
endfunction
function Trig_Shadowraze_Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DP' ) ) then
return false
endif
return true
endfunction
function Trig_Shadowraze_Func003Func003001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Shadowraze_Func003Func003001003002001 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Shadowraze_Func003Func003001003002002 takes nothing returns boolean
return ( 'BNab' == 'BNab' )
endfunction
function Trig_Shadowraze_Func003Func003001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Shadowraze_Func003Func003001003002001(), Trig_Shadowraze_Func003Func003001003002002() )
endfunction
function Trig_Shadowraze_Func003Func003001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Shadowraze_Func003Func003001003001(), Trig_Shadowraze_Func003Func003001003002() )
endfunction
function Trig_Shadowraze_Func003Func003A takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), ( 75.00 * I2R(GetUnitAbilityLevelSwapped('A07B', GetTriggerUnit())) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
endfunction
function Trig_Shadowraze_Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DQ' ) ) then
return false
endif
return true
endfunction
function Trig_Shadowraze_Actions takes nothing returns nothing
if ( Trig_Shadowraze_Func001C() ) then
call CreateNUnitsAtLoc( 1, 'e006', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 200.00, GetUnitFacing(GetTriggerUnit())), bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(250.00, GetUnitLoc(GetLastCreatedUnit()), Condition(function Trig_Shadowraze_Func001Func003001003)), function Trig_Shadowraze_Func001Func003A )
else
endif
if ( Trig_Shadowraze_Func002C() ) then
call CreateNUnitsAtLoc( 1, 'e006', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 450.00, GetUnitFacing(GetTriggerUnit())), bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(250.00, GetUnitLoc(GetLastCreatedUnit()), Condition(function Trig_Shadowraze_Func002Func003001003)), function Trig_Shadowraze_Func002Func003A )
else
endif
if ( Trig_Shadowraze_Func003C() ) then
call CreateNUnitsAtLoc( 1, 'e006', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 700.00, GetUnitFacing(GetTriggerUnit())), bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(250.00, GetUnitLoc(GetLastCreatedUnit()), Condition(function Trig_Shadowraze_Func003Func003001003)), function Trig_Shadowraze_Func003Func003A )
else
endif
endfunction
//===========================================================================
function InitTrig_Shadowraze takes nothing returns nothing
set gg_trg_Shadowraze = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shadowraze, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddAction( gg_trg_Shadowraze, function Trig_Shadowraze_Actions )
endfunction
function Trig_Necromastry_Func004C takes nothing returns boolean
if ( ( GetUnitTypeId(GetKillingUnitBJ()) == 'Nfir' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'Nfir' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetKillingUnitBJ()) == 'e00F' ) ) then
return true
endif
return false
endfunction
function Trig_Necromastry_Conditions takes nothing returns boolean
if ( not Trig_Necromastry_Func004C() ) then
return false
endif
return true
endfunction
function Trig_Necromastry_Func001Func003002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_Necromastry_Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'Nfir' ) ) then
return false
endif
return true
endfunction
function Trig_Necromastry_Func002C takes nothing returns boolean
if ( not ( IsUnitIllusionBJ(GetDyingUnit()) == false ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A0CQ', GetKillingUnitBJ()) < ( 15 * GetUnitAbilityLevelSwapped('A0BR', GetKillingUnitBJ()) ) ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetKillingUnitBJ()) == 'Nfir' ) ) then
return false
endif
return true
endfunction
function Trig_Necromastry_Func003Func002Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0CQ', GetEnumUnit()) < ( 15 * GetUnitAbilityLevelSwapped('A0BR', GetEnumUnit()) ) ) ) then
return false
endif
return true
endfunction
function Trig_Necromastry_Func003Func002A takes nothing returns nothing
if ( Trig_Necromastry_Func003Func002Func001C() ) then
call SetUnitAbilityLevelSwapped( 'A0CQ', GetEnumUnit(), ( GetUnitAbilityLevelSwapped('A0CQ', GetEnumUnit()) + 1 ) )
else
endif
endfunction
function Trig_Necromastry_Func003C takes nothing returns boolean
if ( not ( IsUnitIllusionBJ(GetDyingUnit()) == false ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetKillingUnitBJ()) == 'e00F' ) ) then
return false
endif
return true
endfunction
function Trig_Necromastry_Actions takes nothing returns nothing
if ( Trig_Necromastry_Func001C() ) then
call SetUnitAbilityLevelSwapped( 'A0CQ', GetDyingUnit(), 1 )
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetDyingUnit()), 'e007'), function Trig_Necromastry_Func001Func003002 )
else
endif
if ( Trig_Necromastry_Func002C() ) then
call SetUnitAbilityLevelSwapped( 'A0CQ', GetKillingUnitBJ(), ( GetUnitAbilityLevelSwapped('A0CQ', GetKillingUnitBJ()) + 1 ) )
else
endif
if ( Trig_Necromastry_Func003C() ) then
call ForGroupBJ( GetUnitsOfPlayerAndTypeId(GetOwningPlayer(GetKillingUnitBJ()), 'Nfir'), function Trig_Necromastry_Func003Func002A )
else
endif
endfunction
//===========================================================================
function InitTrig_Necromastry takes nothing returns nothing
set gg_trg_Necromastry = CreateTrigger( )
call DisableTrigger( gg_trg_Necromastry )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Necromastry, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Necromastry, Condition( function Trig_Necromastry_Conditions ) )
call TriggerAddAction( gg_trg_Necromastry, function Trig_Necromastry_Actions )
endfunction
function Trig_Time_Stop_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A003' ) ) then
return false
endif
return true
endfunction
function Trig_Time_Stop_Func001001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Time_Stop_Func001A takes nothing returns nothing
call PauseUnitBJ( true, GetEnumUnit() )
call SetUnitTimeScalePercent( GetEnumUnit(), 0.00 )
endfunction
function Trig_Time_Stop_Func003001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Time_Stop_Func003A takes nothing returns nothing
call PauseAllUnitsBJ( false )
call SetUnitTimeScalePercent( GetEnumUnit(), 100.00 )
endfunction
function Trig_Time_Stop_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Time_Stop_Func001001002)), function Trig_Time_Stop_Func001A )
call TriggerSleepAction( 3.50 )
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Time_Stop_Func003001002)), function Trig_Time_Stop_Func003A )
endfunction
//===========================================================================
function InitTrig_Time_Stop takes nothing returns nothing
set gg_trg_Time_Stop = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Time_Stop, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Time_Stop, Condition( function Trig_Time_Stop_Conditions ) )
call TriggerAddAction( gg_trg_Time_Stop, function Trig_Time_Stop_Actions )
endfunction
function Trig_Spirit_Lance_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DA' ) ) then
return false
endif
return true
endfunction
function Trig_Spirit_Lance_Actions takes nothing returns nothing
set udg_SLTarget = GetSpellTargetUnit()
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetUnitLoc(GetSpellTargetUnit()) )
call UnitAddAbilityBJ( 'A00X', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A00X', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0DA', GetTriggerUnit()) )
call TriggerSleepAction( 0.10 )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "banish", udg_SLTarget )
endfunction
//===========================================================================
function InitTrig_Spirit_Lance takes nothing returns nothing
set gg_trg_Spirit_Lance = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Spirit_Lance, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Spirit_Lance, Condition( function Trig_Spirit_Lance_Conditions ) )
call TriggerAddAction( gg_trg_Spirit_Lance, function Trig_Spirit_Lance_Actions )
endfunction
function Trig_Dopplewalk_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0D7' ) ) then
return false
endif
return true
endfunction
function Trig_Dopplewalk_Actions takes nothing returns nothing
set udg_DPWalker = GetTriggerUnit()
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()) )
call UnitAddItemByIdSwapped( 'I010', GetLastCreatedUnit() )
call UnitUseItemTarget( GetLastCreatedUnit(), GetLastCreatedItem(), GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Dopplewalk takes nothing returns nothing
set gg_trg_Dopplewalk = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dopplewalk, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Dopplewalk, Condition( function Trig_Dopplewalk_Conditions ) )
call TriggerAddAction( gg_trg_Dopplewalk, function Trig_Dopplewalk_Actions )
endfunction
function Trig_Dopplewalk_Move_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetTriggerUnit(), 'B03A') == true ) ) then
return false
endif
return true
endfunction
function Trig_Dopplewalk_Move_Actions takes nothing returns nothing
call SetUnitPositionLoc( GetTriggerUnit(), GetUnitLoc(udg_DPWalker) )
endfunction
//===========================================================================
function InitTrig_Dopplewalk_Move takes nothing returns nothing
set gg_trg_Dopplewalk_Move = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Dopplewalk_Move, GetPlayableMapRect() )
call TriggerAddCondition( gg_trg_Dopplewalk_Move, Condition( function Trig_Dopplewalk_Move_Conditions ) )
call TriggerAddAction( gg_trg_Dopplewalk_Move, function Trig_Dopplewalk_Move_Actions )
endfunction
function Trig_Juxtapose_Conditions takes nothing returns boolean
if ( not ( IsUnitEnemy(GetAttackedUnitBJ(), GetOwningPlayer(GetAttacker())) == true ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(GetAttacker(), 'B03B') == true ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_ANCIENT) == false ) ) then
return false
endif
return true
endfunction
function Trig_Juxtapose_Func001Func002001001002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B03B') == true )
endfunction
function Trig_Juxtapose_Func001C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsOfPlayerMatching(GetOwningPlayer(GetAttacker()), Condition(function Trig_Juxtapose_Func001Func002001001002))) > 8 ) ) then
return false
endif
return true
endfunction
function Trig_Juxtapose_Func004C takes nothing returns boolean
if ( not ( IsUnitIllusionBJ(GetAttacker()) == false ) ) then
return false
endif
if ( not ( udg_Jux <= ( ( 0 + ( 3 * GetUnitAbilityLevelSwapped('A0DB', GetAttacker()) ) ) + ( 0 + ( 2 * GetUnitAbilityLevelSwapped('A0D9', GetAttacker()) ) ) ) ) ) then
return false
endif
return true
endfunction
function Trig_Juxtapose_Func005C takes nothing returns boolean
if ( not ( IsUnitIllusionBJ(GetAttacker()) == true ) ) then
return false
endif
if ( not ( udg_Jux <= ( ( 0 + ( 2 * GetUnitAbilityLevelSwapped('A0D9', GetAttacker()) ) ) + 0 ) ) ) then
return false
endif
return true
endfunction
function Trig_Juxtapose_Actions takes nothing returns nothing
if ( Trig_Juxtapose_Func001C() ) then
return
else
endif
set udg_Jux = GetRandomInt(1, 100)
if ( Trig_Juxtapose_Func004C() ) then
set udg_TempLoc = GetUnitLoc(GetAttacker())
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetAttacker()), udg_TempLoc, udg_TempLoc )
call RemoveLocation(udg_TempLoc)
call UnitAddItemByIdSwapped( 'I023', GetLastCreatedUnit() )
call UnitUseItemTarget( GetLastCreatedUnit(), GetLastCreatedItem(), GetAttacker() )
else
call DoNothing( )
endif
if ( Trig_Juxtapose_Func005C() ) then
set udg_TempLoc = GetUnitLoc(GetAttacker())
call CreateNUnitsAtLocFacingLocBJ( 1, 'e00E', GetOwningPlayer(GetAttacker()), udg_TempLoc, udg_TempLoc )
call RemoveLocation(udg_TempLoc)
call UnitAddItemByIdSwapped( 'I023', GetLastCreatedUnit() )
call UnitUseItemTarget( GetLastCreatedUnit(), GetLastCreatedItem(), GetAttacker() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Juxtapose takes nothing returns nothing
set gg_trg_Juxtapose = CreateTrigger( )
call DisableTrigger( gg_trg_Juxtapose )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Juxtapose, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Juxtapose, Condition( function Trig_Juxtapose_Conditions ) )
call TriggerAddAction( gg_trg_Juxtapose, function Trig_Juxtapose_Actions )
endfunction
function Trig_Ante_Up_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0D8' ) ) then
return false
endif
return true
endfunction
function Trig_Ante_Up_Func004C takes nothing returns boolean
if ( not ( IsUnitEnemy(GetTriggerUnit(), GetOwningPlayer(GetSpellTargetUnit())) == true ) ) then
return false
endif
return true
endfunction
function Trig_Ante_Up_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( -100, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
set udg_AnteUp = GetSpellTargetUnit()
set udg_AnteUpCaster = GetTriggerUnit()
if ( Trig_Ante_Up_Func004C() ) then
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), ( 50.00 * I2R(GetUnitAbilityLevelSwapped('A0D8', GetTriggerUnit())) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
call SetUnitLifeBJ( GetSpellTargetUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) + ( 50.00 * I2R(GetUnitAbilityLevelSwapped('A0D8', GetTriggerUnit())) ) ) )
endif
call EnableTrigger( gg_trg_Ante_Up_death )
call PolledWait( 60.00 )
set udg_AnteUp = null
set udg_AnteUpCaster = null
endfunction
//===========================================================================
function InitTrig_Ante_Up takes nothing returns nothing
set gg_trg_Ante_Up = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ante_Up, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Ante_Up, Condition( function Trig_Ante_Up_Conditions ) )
call TriggerAddAction( gg_trg_Ante_Up, function Trig_Ante_Up_Actions )
endfunction
function Trig_Ante_Up_death_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Ante_Up_death_Func001C takes nothing returns boolean
if ( not ( GetDyingUnit() == udg_AnteUp ) ) then
return false
endif
return true
endfunction
function Trig_Ante_Up_death_Func002C takes nothing returns boolean
if ( not ( GetKillingUnitBJ() == udg_AnteUp ) ) then
return false
endif
return true
endfunction
function Trig_Ante_Up_death_Func003001002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B038') == true )
endfunction
function Trig_Ante_Up_death_Func003A takes nothing returns nothing
call UnitRemoveBuffBJ( 'B038', GetEnumUnit() )
endfunction
function Trig_Ante_Up_death_Actions takes nothing returns nothing
if ( Trig_Ante_Up_death_Func001C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", udg_AnteUpCaster, "UI\\Feedback\\GoldCredit\\GoldCredit.mdl" )
call TriggerExecute( gg_trg_DestroyFX )
set udg_AnteUpNum = ( ( GetUnitAbilityLevelSwapped('A0D8', udg_AnteUpCaster) * 50 ) + 100 )
call AdjustPlayerStateBJ( udg_AnteUpNum, GetOwningPlayer(udg_AnteUpCaster), PLAYER_STATE_RESOURCE_GOLD )
call CreateTextTagUnitBJ( ( "+" + I2S(udg_AnteUpNum) ), udg_AnteUpCaster, 0, 10, 90.00, 84.00, 0.00, 0 )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 40.00, 90 )
call PolledWait( 1.00 )
call DestroyTextTagBJ( GetLastCreatedTextTag() )
else
call DoNothing( )
endif
if ( Trig_Ante_Up_death_Func002C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", udg_AnteUpCaster, "UI\\Feedback\\GoldCredit\\GoldCredit.mdl" )
call TriggerExecute( gg_trg_DestroyFX )
set udg_AnteUpNum = ( ( GetUnitAbilityLevelSwapped('A0D8', udg_AnteUpCaster) * 100 ) + 200 )
call AdjustPlayerStateBJ( udg_AnteUpNum, GetOwningPlayer(udg_AnteUpCaster), PLAYER_STATE_RESOURCE_GOLD )
call CreateTextTagUnitBJ( ( "+" + I2S(udg_AnteUpNum) ), udg_AnteUpCaster, 0, 10, 90.00, 84.00, 0.00, 0 )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 40.00, 90 )
call PolledWait( 1.00 )
call DestroyTextTagBJ( GetLastCreatedTextTag() )
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Ante_Up_death_Func003001002)), function Trig_Ante_Up_death_Func003A )
set udg_AnteUp = null
set udg_AnteUpCaster = null
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Ante_Up_death takes nothing returns nothing
set gg_trg_Ante_Up_death = CreateTrigger( )
call DisableTrigger( gg_trg_Ante_Up_death )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ante_Up_death, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Ante_Up_death, Condition( function Trig_Ante_Up_death_Conditions ) )
call TriggerAddAction( gg_trg_Ante_Up_death, function Trig_Ante_Up_death_Actions )
endfunction
function Trig_Roulette_effect_Func003C takes nothing returns boolean
if ( not ( IsUnitDeadBJ(udg_RouletteTarget) == true ) ) then
return false
endif
return true
endfunction
function Trig_Roulette_effect_Func008C takes nothing returns boolean
if ( not ( udg_RouletteCounter == 10 ) ) then
return false
endif
return true
endfunction
function Trig_Roulette_effect_Actions takes nothing returns nothing
call DestroyEffectBJ( udg_RouletteEffect )
set udg_RouletteTarget = GroupPickRandomUnit(udg_RouletteGroup)
if ( Trig_Roulette_effect_Func003C() ) then
call GroupRemoveUnitSimple( udg_RouletteTarget, udg_RouletteGroup )
else
call DoNothing( )
endif
set udg_RouletteCounter = ( udg_RouletteCounter + 1 )
call AddSpecialEffectTargetUnitBJ( "overhead", udg_RouletteTarget, "Abilities\\Spells\\Other\\Aneu\\AneuTarget.mdl" )
set udg_RouletteEffect = GetLastCreatedEffectBJ()
call PolledWait( ( 0.11 * I2R(udg_RouletteCounter) ) )
if ( Trig_Roulette_effect_Func008C() ) then
call DestroyEffectBJ( udg_RouletteEffect )
call AddSpecialEffectTargetUnitBJ( "overhead", udg_RouletteTarget, "Abilities\\Spells\\Other\\Incinerate\\FireLordDeathExplode.mdl" )
set udg_RouletteEffect = GetLastCreatedEffectBJ()
call UnitDamageTargetBJ( udg_RouletteUnit, udg_RouletteTarget, ( I2R(GetHeroLevel(udg_RouletteTarget)) * ( 15.00 + ( 5.00 * I2R(GetUnitAbilityLevelSwapped('A0D2', udg_RouletteUnit)) ) ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
call PolledWait( 1.00 )
call DestroyEffectBJ( udg_RouletteEffect )
else
call TriggerExecute( GetTriggeringTrigger() )
endif
endfunction
//===========================================================================
function InitTrig_Roulette_effect takes nothing returns nothing
set gg_trg_Roulette_effect = CreateTrigger( )
call TriggerAddAction( gg_trg_Roulette_effect, function Trig_Roulette_effect_Actions )
endfunction
function Trig_Roulette_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0D2' ) ) then
return false
endif
return true
endfunction
function Trig_Roulette_Func004001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Roulette_Func004001003002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetTriggerPlayer()) == true )
endfunction
function Trig_Roulette_Func004001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Roulette_Func004001003001(), Trig_Roulette_Func004001003002() )
endfunction
function Trig_Roulette_Func004A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_RouletteGroup )
set udg_RouletteNum = ( udg_RouletteNum + 1 )
endfunction
function Trig_Roulette_Func005C takes nothing returns boolean
if ( not ( udg_RouletteNum > 1 ) ) then
return false
endif
return true
endfunction
function Trig_Roulette_Actions takes nothing returns nothing
set udg_RouletteNum = 0
set udg_RouletteCounter = 0
set udg_RouletteUnit = GetTriggerUnit()
call ForGroupBJ( GetUnitsInRangeOfLocMatching(1500.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_Roulette_Func004001003)), function Trig_Roulette_Func004A )
if ( Trig_Roulette_Func005C() ) then
call TriggerExecute( gg_trg_Roulette_effect )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Roulette takes nothing returns nothing
set gg_trg_Roulette = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Roulette, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Roulette, Condition( function Trig_Roulette_Conditions ) )
call TriggerAddAction( gg_trg_Roulette, function Trig_Roulette_Actions )
endfunction
function Trig_Lucky_Stars_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0D6', GetAttacker()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Lucky_Stars_Func001Func001C takes nothing returns boolean
if ( ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == true ) ) then
return true
endif
if ( ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_HERO) == true ) ) then
return true
endif
return false
endfunction
function Trig_Lucky_Stars_Func001C takes nothing returns boolean
if ( not Trig_Lucky_Stars_Func001Func001C() ) then
return false
endif
if ( not ( GetRandomPercentageBJ() <= I2R(GetUnitAbilityLevelSwapped('A0D6', GetAttacker())) ) ) then
return false
endif
return true
endfunction
function Trig_Lucky_Stars_Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
if ( not ( GetRandomPercentageBJ() <= I2R(GetUnitAbilityLevelSwapped('A0D6', GetAttacker())) ) ) then
return false
endif
return true
endfunction
function Trig_Lucky_Stars_Actions takes nothing returns nothing
if ( Trig_Lucky_Stars_Func001C() ) then
call PolledWait( 0.20 )
call UnitDamageTargetBJ( GetAttacker(), GetAttackedUnitBJ(), 250.00, ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL )
call CreateTextTagUnitBJ( "TRIGSTR_8799", GetAttacker(), 0, 10, 100, 0.00, 0.00, 0 )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call PolledWait( 1.00 )
call DestroyTextTagBJ( GetLastCreatedTextTag() )
else
call DoNothing( )
endif
if ( Trig_Lucky_Stars_Func002C() ) then
call PolledWait( 0.20 )
call UnitDamageTargetBJ( GetAttacker(), GetAttackedUnitBJ(), 99999.00, ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL )
call CreateTextTagUnitBJ( "TRIGSTR_8801", GetAttacker(), 0, 10, 100, 0.00, 0.00, 0 )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call PolledWait( 1.00 )
call DestroyTextTagBJ( GetLastCreatedTextTag() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Lucky_Stars takes nothing returns nothing
set gg_trg_Lucky_Stars = CreateTrigger( )
call DisableTrigger( gg_trg_Lucky_Stars )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Lucky_Stars, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Lucky_Stars, Condition( function Trig_Lucky_Stars_Conditions ) )
call TriggerAddAction( gg_trg_Lucky_Stars, function Trig_Lucky_Stars_Actions )
endfunction
function Trig_All_In_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0CZ' ) ) then
return false
endif
return true
endfunction
function Trig_All_In_Func004C takes nothing returns boolean
if ( not ( udg_AllInDmg > ( 1000.00 + ( 500.00 * I2R(GetUnitAbilityLevelSwapped('A0CZ', GetTriggerUnit())) ) ) ) ) then
return false
endif
return true
endfunction
function Trig_All_In_Func005C takes nothing returns boolean
if ( not ( GetRandomPercentageBJ() <= ( udg_AllInDmg / 100.00 ) ) ) then
return false
endif
return true
endfunction
function Trig_All_In_Actions takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Other\\Transmute\\PileofGold.mdl" )
call AddSpecialEffectTargetUnitBJ( "overhead", GetSpellTargetUnit(), "Abilities\\Spells\\Other\\Transmute\\PileofGold.mdl" )
set udg_AllInDmg = ( ( 0.16 + ( 0.04 * I2R(GetUnitAbilityLevelSwapped('A0CZ', GetTriggerUnit())) ) ) * I2R(GetPlayerState(GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD)) )
if ( Trig_All_In_Func004C() ) then
set udg_AllInDmg = ( 1000.00 + ( 500.00 * I2R(GetUnitAbilityLevelSwapped('A0CZ', GetTriggerUnit())) ) )
else
call DoNothing( )
endif
if ( Trig_All_In_Func005C() ) then
call SetPlayerStateBJ( GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD, 0 )
call CreateTextTagUnitBJ( ( "0" + "!" ), GetTriggerUnit(), 0, 10, 100, 0.00, 0.00, 0 )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call PolledWait( 1.00 )
call DestroyTextTagBJ( GetLastCreatedTextTag() )
else
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_AllInDmg, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
call CreateTextTagUnitBJ( ( I2S(R2I(udg_AllInDmg)) + "!" ), GetSpellTargetUnit(), 0, 10, 100, 0.00, 0.00, 0 )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call PolledWait( 1.00 )
call DestroyTextTagBJ( GetLastCreatedTextTag() )
endif
endfunction
//===========================================================================
function InitTrig_All_In takes nothing returns nothing
set gg_trg_All_In = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_All_In, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_All_In, Condition( function Trig_All_In_Conditions ) )
call TriggerAddAction( gg_trg_All_In, function Trig_All_In_Actions )
endfunction
function Trig_Nether_Ward_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'o00M' ) ) then
return false
endif
return true
endfunction
function Trig_Nether_Ward_Actions takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'A08T', GetSummonedUnit(), GetUnitAbilityLevelSwapped('A09D', GetSummoningUnit()) )
call IssueImmediateOrderBJ( GetSummonedUnit(), "manaflareon" )
endfunction
//===========================================================================
function InitTrig_Nether_Ward takes nothing returns nothing
set gg_trg_Nether_Ward = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Nether_Ward, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Nether_Ward, Condition( function Trig_Nether_Ward_Conditions ) )
call TriggerAddAction( gg_trg_Nether_Ward, function Trig_Nether_Ward_Actions )
endfunction
function Trig_Healing_Ward_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'o00C' ) ) then
return false
endif
return true
endfunction
function Trig_Healing_Ward_Actions takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'A058', GetSummonedUnit(), GetUnitAbilityLevelSwapped('A047', GetSummoningUnit()) )
endfunction
//===========================================================================
function InitTrig_Healing_Ward takes nothing returns nothing
set gg_trg_Healing_Ward = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Healing_Ward, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Healing_Ward, Condition( function Trig_Healing_Ward_Conditions ) )
call TriggerAddAction( gg_trg_Healing_Ward, function Trig_Healing_Ward_Actions )
endfunction
function Trig_IlluminateCast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A085' ) ) then
return false
endif
return true
endfunction
function Trig_IlluminateCast_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(udg_IlCaster), GetUnitLoc(udg_IlCaster), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A087', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A087', GetLastCreatedUnit(), udg_IllLvl )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "breathoffire", PolarProjectionBJ(GetUnitLoc(udg_IlCaster), 200.00, GetUnitFacing(GetTriggerUnit())) )
call KillUnit( udg_IlCaster )
endfunction
//===========================================================================
function InitTrig_IlluminateCast takes nothing returns nothing
set gg_trg_IlluminateCast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_IlluminateCast, EVENT_PLAYER_UNIT_SPELL_ENDCAST )
call TriggerAddCondition( gg_trg_IlluminateCast, Condition( function Trig_IlluminateCast_Conditions ) )
call TriggerAddAction( gg_trg_IlluminateCast, function Trig_IlluminateCast_Actions )
endfunction
function Trig_IlluminateCharge_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A085' ) ) then
return false
endif
return true
endfunction
function Trig_IlluminateCharge_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'u00J', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), 150.00, GetUnitFacing(GetTriggerUnit())), GetUnitFacing(GetTriggerUnit()) )
set udg_IlCaster = GetLastCreatedUnit()
set udg_IllLvl = 1
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 10
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_IllLvl = ( udg_IllLvl + 1 )
call SetUnitScalePercent( udg_IlCaster, ( 100.00 + ( 15.00 * I2R(GetForLoopIndexA()) ) ), ( 100.00 + ( 15.00 * I2R(GetForLoopIndexA()) ) ), ( 100.00 + ( 15.00 * I2R(GetForLoopIndexA()) ) ) )
call TriggerSleepAction( 0.50 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_IlluminateCharge takes nothing returns nothing
set gg_trg_IlluminateCharge = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_IlluminateCharge, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_IlluminateCharge, Condition( function Trig_IlluminateCharge_Conditions ) )
call TriggerAddAction( gg_trg_IlluminateCharge, function Trig_IlluminateCharge_Actions )
endfunction
function Trig_Mana_Leak_effect_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetTriggerUnit(), 'B03V') == true ) ) then
return false
endif
return true
endfunction
function Trig_Mana_Leak_effect_Actions takes nothing returns nothing
call SetUnitManaBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) * ( 1.00 - ( 0.13 * I2R(udg_MLL) ) ) ) )
endfunction
//===========================================================================
function InitTrig_Mana_Leak_effect takes nothing returns nothing
set gg_trg_Mana_Leak_effect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mana_Leak_effect, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Mana_Leak_effect, Condition( function Trig_Mana_Leak_effect_Conditions ) )
call TriggerAddAction( gg_trg_Mana_Leak_effect, function Trig_Mana_Leak_effect_Actions )
endfunction
function Trig_Mana_Leak_learn_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0EP' ) ) then
return false
endif
return true
endfunction
function Trig_Mana_Leak_learn_Actions takes nothing returns nothing
set udg_MLL = GetUnitAbilityLevelSwapped('A07Y', GetTriggerUnit())
endfunction
//===========================================================================
function InitTrig_Mana_Leak_learn takes nothing returns nothing
set gg_trg_Mana_Leak_learn = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mana_Leak_learn, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Mana_Leak_learn, Condition( function Trig_Mana_Leak_learn_Conditions ) )
call TriggerAddAction( gg_trg_Mana_Leak_learn, function Trig_Mana_Leak_learn_Actions )
endfunction
function Trig_chakra_magic_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07N' ) ) then
return false
endif
return true
endfunction
function Trig_chakra_magic_Func001C takes nothing returns boolean
if ( not ( GetTriggerUnit() == GetSpellTargetUnit() ) ) then
return false
endif
return true
endfunction
function Trig_chakra_magic_Actions takes nothing returns nothing
if ( Trig_chakra_magic_Func001C() ) then
call SetUnitManaBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) + ( 40.00 * I2R(GetUnitAbilityLevelSwapped('A07N', GetTriggerUnit())) ) ) )
else
call SetUnitManaBJ( GetSpellTargetUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetSpellTargetUnit()) + ( 100.00 * I2R(GetUnitAbilityLevelSwapped('A07N', GetTriggerUnit())) ) ) )
endif
endfunction
//===========================================================================
function InitTrig_chakra_magic takes nothing returns nothing
set gg_trg_chakra_magic = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_chakra_magic, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_chakra_magic, Condition( function Trig_chakra_magic_Conditions ) )
call TriggerAddAction( gg_trg_chakra_magic, function Trig_chakra_magic_Actions )
endfunction
function Trig_Burrowstrike_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06O' ) ) then
return false
endif
return true
endfunction
function Trig_Burrowstrike_Func004C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A06O', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Burrowstrike_Func005C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A06O', GetTriggerUnit()) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Burrowstrike_Func006C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A06O', GetTriggerUnit()) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Burrowstrike_Func007C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A06O', GetTriggerUnit()) == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Burrowstrike_Actions takes nothing returns nothing
set udg_BSUnit = GetTriggerUnit()
set udg_BSPosition[1] = GetLocationX(GetSpellTargetLoc())
set udg_BSPosition[2] = GetLocationY(GetSpellTargetLoc())
if ( Trig_Burrowstrike_Func004C() ) then
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), -100.00, AngleBetweenPoints(GetUnitLoc(GetTriggerUnit()), Location(udg_BSPosition[1], udg_BSPosition[2]))), GetUnitFacing(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A075', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A075', GetLastCreatedUnit(), ( R2I(DistanceBetweenPoints(GetUnitLoc(GetTriggerUnit()), GetSpellTargetLoc())) / 100 ) )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "impale", Location(udg_BSPosition[1], udg_BSPosition[2]) )
call TriggerSleepAction( ( DistanceBetweenPoints(GetUnitLoc(udg_BSUnit), Location(udg_BSPosition[1], udg_BSPosition[2])) / 4000.00 ) )
call SetUnitPositionLoc( udg_BSUnit, Location(udg_BSPosition[1], udg_BSPosition[2]) )
call SetUnitAnimation( udg_BSUnit, "morph ALTERNATE" )
else
endif
if ( Trig_Burrowstrike_Func005C() ) then
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), -100.00, AngleBetweenPoints(GetUnitLoc(GetTriggerUnit()), Location(udg_BSPosition[1], udg_BSPosition[2]))), GetUnitFacing(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A070', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A070', GetLastCreatedUnit(), ( R2I(DistanceBetweenPoints(GetUnitLoc(GetTriggerUnit()), GetSpellTargetLoc())) / 100 ) )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "impale", Location(udg_BSPosition[1], udg_BSPosition[2]) )
call TriggerSleepAction( ( DistanceBetweenPoints(GetUnitLoc(udg_BSUnit), Location(udg_BSPosition[1], udg_BSPosition[2])) / 4000.00 ) )
call SetUnitPositionLoc( udg_BSUnit, Location(udg_BSPosition[1], udg_BSPosition[2]) )
call SetUnitAnimation( udg_BSUnit, "morph ALTERNATE" )
else
endif
if ( Trig_Burrowstrike_Func006C() ) then
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), -100.00, AngleBetweenPoints(GetUnitLoc(GetTriggerUnit()), Location(udg_BSPosition[1], udg_BSPosition[2]))), GetUnitFacing(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A06Z', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A06Z', GetLastCreatedUnit(), ( R2I(DistanceBetweenPoints(GetUnitLoc(GetTriggerUnit()), GetSpellTargetLoc())) / 100 ) )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "impale", Location(udg_BSPosition[1], udg_BSPosition[2]) )
call TriggerSleepAction( ( DistanceBetweenPoints(GetUnitLoc(udg_BSUnit), Location(udg_BSPosition[1], udg_BSPosition[2])) / 4000.00 ) )
call SetUnitPositionLoc( udg_BSUnit, Location(udg_BSPosition[1], udg_BSPosition[2]) )
call SetUnitAnimation( udg_BSUnit, "morph ALTERNATE" )
else
endif
if ( Trig_Burrowstrike_Func007C() ) then
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), PolarProjectionBJ(GetUnitLoc(GetTriggerUnit()), -100.00, AngleBetweenPoints(GetUnitLoc(GetTriggerUnit()), Location(udg_BSPosition[1], udg_BSPosition[2]))), GetUnitFacing(GetTriggerUnit()) )
call UnitAddAbilityBJ( 'A077', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A077', GetLastCreatedUnit(), ( R2I(DistanceBetweenPoints(GetUnitLoc(GetTriggerUnit()), GetSpellTargetLoc())) / 100 ) )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "impale", Location(udg_BSPosition[1], udg_BSPosition[2]) )
call TriggerSleepAction( ( DistanceBetweenPoints(GetUnitLoc(udg_BSUnit), Location(udg_BSPosition[1], udg_BSPosition[2])) / 4000.00 ) )
call SetUnitPositionLoc( udg_BSUnit, Location(udg_BSPosition[1], udg_BSPosition[2]) )
call SetUnitAnimation( udg_BSUnit, "morph ALTERNATE" )
else
endif
endfunction
//===========================================================================
function InitTrig_Burrowstrike takes nothing returns nothing
set gg_trg_Burrowstrike = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Burrowstrike, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Burrowstrike, Condition( function Trig_Burrowstrike_Conditions ) )
call TriggerAddAction( gg_trg_Burrowstrike, function Trig_Burrowstrike_Actions )
endfunction
function Trig_Epicenter_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06R' ) ) then
return false
endif
return true
endfunction
function Trig_Epicenter_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = ( 4 + ( GetUnitAbilityLevelSwapped('A06R', GetTriggerUnit()) * 2 ) )
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A07L', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A07L', GetLastCreatedUnit(), GetForLoopIndexA() )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "thunderclap" )
call TriggerSleepAction( 0.05 )
call TerrainDeformationRippleBJ( 0.03, false, GetUnitLoc(GetLastCreatedUnit()), ( 150.00 + ( 100.00 * I2R(GetForLoopIndexA()) ) ), ( 150.00 + ( 100.00 * I2R(GetForLoopIndexA()) ) ), 72.00, 0.03, 512 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Epicenter takes nothing returns nothing
set gg_trg_Epicenter = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Epicenter, EVENT_PLAYER_UNIT_SPELL_FINISH )
call TriggerAddCondition( gg_trg_Epicenter, Condition( function Trig_Epicenter_Conditions ) )
call TriggerAddAction( gg_trg_Epicenter, function Trig_Epicenter_Actions )
endfunction
function Trig_Entrench_Func001Func002001 takes nothing returns boolean
return ( GetUnitTypeId(GetDyingUnit()) == 'U00K' )
endfunction
function Trig_Entrench_Func001Func002002 takes nothing returns boolean
return ( GetUnitTypeId(GetDyingUnit()) == 'U00I' )
endfunction
function Trig_Entrench_Func001C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Entrench_Func001Func002001(), Trig_Entrench_Func001Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_Entrench_Func003Func002001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'U00K' )
endfunction
function Trig_Entrench_Func003Func002002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'U00I' )
endfunction
function Trig_Entrench_Func003C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Entrench_Func003Func002001(), Trig_Entrench_Func003Func002002() ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("burrow") ) ) then
return false
endif
return true
endfunction
function Trig_Entrench_Func004Func002001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'U00K' )
endfunction
function Trig_Entrench_Func004Func002002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'U00I' )
endfunction
function Trig_Entrench_Func004C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Entrench_Func004Func002001(), Trig_Entrench_Func004Func002002() ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("unburrow") ) ) then
return false
endif
return true
endfunction
function Trig_Entrench_Actions takes nothing returns nothing
if ( Trig_Entrench_Func001C() ) then
set udg_Burrowed[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = false
else
endif
if ( Trig_Entrench_Func003C() ) then
set udg_Burrowed[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = true
else
endif
if ( Trig_Entrench_Func004C() ) then
set udg_Burrowed[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = false
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A07G', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A07G', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A06U', GetTriggerUnit()) )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "stomp" )
else
endif
endfunction
//===========================================================================
function InitTrig_Entrench takes nothing returns nothing
set gg_trg_Entrench = CreateTrigger( )
call DisableTrigger( gg_trg_Entrench )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Entrench, EVENT_PLAYER_UNIT_DEATH )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Entrench, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddAction( gg_trg_Entrench, function Trig_Entrench_Actions )
endfunction
function Trig_Meat_Hook_Cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06I' ) ) then
return false
endif
return true
endfunction
function Trig_Meat_Hook_Cast_Actions takes nothing returns nothing
set udg_MHLevel = GetUnitAbilityLevelSwapped('A06I', GetTriggerUnit())
set udg_MHAngle = AngleBetweenPoints(GetUnitLoc(GetSpellAbilityUnit()), GetSpellTargetLoc())
set udg_MHUnits[1] = GetTriggerUnit()
call EnableTrigger( gg_trg_Meat_Hook_Extend )
endfunction
//===========================================================================
function InitTrig_Meat_Hook_Cast takes nothing returns nothing
set gg_trg_Meat_Hook_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Meat_Hook_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Meat_Hook_Cast, Condition( function Trig_Meat_Hook_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Meat_Hook_Cast, function Trig_Meat_Hook_Cast_Actions )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003001002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A04R', GetFilterUnit()) != 1 )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Meat_Hook_Extend_Func001Func007001003001001(), Trig_Meat_Hook_Extend_Func001Func007001003001002() )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003002001 takes nothing returns boolean
return ( IsUnitDeadBJ(GetFilterUnit()) == false )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003002002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'u00H' )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003002002002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'U00F' )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003002002002002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_ANCIENT) == false )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003002002002002002 takes nothing returns boolean
return ( 'Bmlt' == 'Bmlt' )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003002002002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Meat_Hook_Extend_Func001Func007001003002002002002001(), Trig_Meat_Hook_Extend_Func001Func007001003002002002002002() )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003002002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Meat_Hook_Extend_Func001Func007001003002002002001(), Trig_Meat_Hook_Extend_Func001Func007001003002002002002() )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Meat_Hook_Extend_Func001Func007001003002002001(), Trig_Meat_Hook_Extend_Func001Func007001003002002002() )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Meat_Hook_Extend_Func001Func007001003002001(), Trig_Meat_Hook_Extend_Func001Func007001003002002() )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Meat_Hook_Extend_Func001Func007001003001(), Trig_Meat_Hook_Extend_Func001Func007001003002() )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007Func001001 takes nothing returns boolean
return ( udg_ChainLinkNumber > 3 )
endfunction
function Trig_Meat_Hook_Extend_Func001Func007Func002C takes nothing returns boolean
if ( not ( IsUnitAlly(udg_MHUnits[2], GetOwningPlayer(udg_MHUnits[1])) == false ) ) then
return false
endif
return true
endfunction
function Trig_Meat_Hook_Extend_Func001Func007Func003C takes nothing returns boolean
if ( not ( udg_MHUnits[2] == null ) ) then
return false
endif
return true
endfunction
function Trig_Meat_Hook_Extend_Func001Func007A takes nothing returns nothing
if ( Trig_Meat_Hook_Extend_Func001Func007Func001001() ) then
set udg_MHUnits[2] = GetEnumUnit()
else
call DoNothing( )
endif
if ( Trig_Meat_Hook_Extend_Func001Func007Func002C() ) then
call UnitDamageTargetBJ( udg_MHUnits[1], udg_MHUnits[2], ( I2R(udg_MHLevel) * 100.00 ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_ENHANCED )
else
endif
if ( Trig_Meat_Hook_Extend_Func001Func007Func003C() ) then
call DoNothing( )
else
call DisableTrigger( GetTriggeringTrigger() )
call EnableTrigger( gg_trg_Meat_Hook_Retract )
endif
endfunction
function Trig_Meat_Hook_Extend_Func001C takes nothing returns boolean
if ( not ( udg_ChainLinkNumber < ( 5 + ( 6 * udg_MHLevel ) ) ) ) then
return false
endif
return true
endfunction
function Trig_Meat_Hook_Extend_Actions takes nothing returns nothing
if ( Trig_Meat_Hook_Extend_Func001C() ) then
set udg_ChainLinkNumber = ( udg_ChainLinkNumber + 1 )
call CreateNUnitsAtLoc( 1, 'u00H', GetOwningPlayer(udg_MHUnits[1]), PolarProjectionBJ(GetUnitLoc(udg_MHUnits[1]), ( I2R(udg_ChainLinkNumber) * 40.00 ), udg_MHAngle), udg_MHAngle )
set udg_ChainLinks[udg_ChainLinkNumber] = GetLastCreatedUnit()
call ForGroupBJ( GetUnitsInRangeOfLocMatching(115.00, GetUnitLoc(GetLastCreatedUnit()), Condition(function Trig_Meat_Hook_Extend_Func001Func007001003)), function Trig_Meat_Hook_Extend_Func001Func007A )
else
call DisableTrigger( GetTriggeringTrigger() )
call EnableTrigger( gg_trg_Meat_Hook_Retract )
endif
endfunction
//===========================================================================
function InitTrig_Meat_Hook_Extend takes nothing returns nothing
set gg_trg_Meat_Hook_Extend = CreateTrigger( )
call DisableTrigger( gg_trg_Meat_Hook_Extend )
call TriggerRegisterTimerEventPeriodic( gg_trg_Meat_Hook_Extend, 0.03 )
call TriggerAddAction( gg_trg_Meat_Hook_Extend, function Trig_Meat_Hook_Extend_Actions )
endfunction
function Trig_Meat_Hook_Retract_Func004C takes nothing returns boolean
if ( not ( udg_ChainLinkNumber == 0 ) ) then
return false
endif
return true
endfunction
function Trig_Meat_Hook_Retract_Actions takes nothing returns nothing
call SetUnitPositionLoc( udg_MHUnits[2], GetUnitLoc(udg_ChainLinks[udg_ChainLinkNumber]) )
call RemoveUnit( udg_ChainLinks[udg_ChainLinkNumber] )
set udg_ChainLinkNumber = ( udg_ChainLinkNumber - 1 )
if ( Trig_Meat_Hook_Retract_Func004C() ) then
set udg_MHUnits[2] = null
call DisableTrigger( GetTriggeringTrigger() )
else
endif
endfunction
//===========================================================================
function InitTrig_Meat_Hook_Retract takes nothing returns nothing
set gg_trg_Meat_Hook_Retract = CreateTrigger( )
call DisableTrigger( gg_trg_Meat_Hook_Retract )
call TriggerRegisterTimerEventPeriodic( gg_trg_Meat_Hook_Retract, 0.03 )
call TriggerAddAction( gg_trg_Meat_Hook_Retract, function Trig_Meat_Hook_Retract_Actions )
endfunction
function Trig_Flesh_Heap_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A06D', GetKillingUnitBJ()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_Flesh_Heap_Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Flesh_Heap_Func003C takes nothing returns boolean
if ( not ( udg_FleshHeap >= 1.00 ) ) then
return false
endif
return true
endfunction
function Trig_Flesh_Heap_Actions takes nothing returns nothing
set udg_FleshHeap = ( udg_FleshHeap + ( 0.03 * I2R(GetUnitAbilityLevelSwapped('A06D', GetKillingUnitBJ())) ) )
if ( Trig_Flesh_Heap_Func002C() ) then
set udg_FleshHeap = ( udg_FleshHeap + ( 0.27 * I2R(GetUnitAbilityLevelSwapped('A06D', GetKillingUnitBJ())) ) )
else
endif
if ( Trig_Flesh_Heap_Func003C() ) then
set udg_FleshHeap = ( udg_FleshHeap - 1 )
call ModifyHeroStat( bj_HEROSTAT_STR, GetKillingUnitBJ(), bj_MODIFYMETHOD_ADD, 1 )
else
endif
endfunction
//===========================================================================
function InitTrig_Flesh_Heap takes nothing returns nothing
set gg_trg_Flesh_Heap = CreateTrigger( )
call DisableTrigger( gg_trg_Flesh_Heap )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Flesh_Heap, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Flesh_Heap, Condition( function Trig_Flesh_Heap_Conditions ) )
call TriggerAddAction( gg_trg_Flesh_Heap, function Trig_Flesh_Heap_Actions )
endfunction
function Trig_Death_Pulse_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05V' ) ) then
return false
endif
return true
endfunction
function Trig_Death_Pulse_Actions takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A05W', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A05W', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A05V', GetTriggerUnit()) )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "fanofknives" )
endfunction
//===========================================================================
function InitTrig_Death_Pulse takes nothing returns nothing
set gg_trg_Death_Pulse = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Death_Pulse, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Death_Pulse, Condition( function Trig_Death_Pulse_Conditions ) )
call TriggerAddAction( gg_trg_Death_Pulse, function Trig_Death_Pulse_Actions )
endfunction
function Trig_Reaper_Scythe_Func001001 takes nothing returns boolean
return ( GetSpellAbilityId() == 'A067' )
endfunction
function Trig_Reaper_Scythe_Func001002 takes nothing returns boolean
return ( GetSpellAbilityId() == 'A08P' )
endfunction
function Trig_Reaper_Scythe_Conditions takes nothing returns boolean
if ( not GetBooleanOr( Trig_Reaper_Scythe_Func001001(), Trig_Reaper_Scythe_Func001002() ) ) then
return false
endif
return true
endfunction
function Trig_Reaper_Scythe_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A067', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Reaper_Scythe_Func003Func003001 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A067', GetTriggerUnit()) == 2 )
endfunction
function Trig_Reaper_Scythe_Func003Func003002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A08P', GetTriggerUnit()) == 1 )
endfunction
function Trig_Reaper_Scythe_Func003C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Reaper_Scythe_Func003Func003001(), Trig_Reaper_Scythe_Func003Func003002() ) ) then
return false
endif
return true
endfunction
function Trig_Reaper_Scythe_Func004Func003001 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A067', GetTriggerUnit()) == 3 )
endfunction
function Trig_Reaper_Scythe_Func004Func003002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A08P', GetTriggerUnit()) == 2 )
endfunction
function Trig_Reaper_Scythe_Func004C takes nothing returns boolean
if ( not GetBooleanOr( Trig_Reaper_Scythe_Func004Func003001(), Trig_Reaper_Scythe_Func004Func003002() ) ) then
return false
endif
return true
endfunction
function Trig_Reaper_Scythe_Func005C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A08P', GetTriggerUnit()) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Reaper_Scythe_Actions takes nothing returns nothing
if ( Trig_Reaper_Scythe_Func002C() ) then
set udg_BSDam = 0.40
else
call DoNothing( )
endif
if ( Trig_Reaper_Scythe_Func003C() ) then
set udg_BSDam = 0.60
else
call DoNothing( )
endif
if ( Trig_Reaper_Scythe_Func004C() ) then
set udg_BSDam = 0.90
else
call DoNothing( )
endif
if ( Trig_Reaper_Scythe_Func005C() ) then
set udg_BSDam = 1.10
else
call DoNothing( )
endif
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), ( udg_BSDam * ( GetUnitStateSwap(UNIT_STATE_MAX_LIFE, GetSpellTargetUnit()) - GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_FIRE )
endfunction
//===========================================================================
function InitTrig_Reaper_Scythe takes nothing returns nothing
set gg_trg_Reaper_Scythe = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Reaper_Scythe, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Reaper_Scythe, Condition( function Trig_Reaper_Scythe_Conditions ) )
call TriggerAddAction( gg_trg_Reaper_Scythe, function Trig_Reaper_Scythe_Actions )
endfunction
function Trig_Sadist_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetKillingUnitBJ(), 'B02R') == true ) ) then
return false
endif
return true
endfunction
function Trig_Sadist_Actions takes nothing returns nothing
call SetUnitManaBJ( GetKillingUnitBJ(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetKillingUnitBJ()) + ( 12.00 * I2R(GetUnitAbilityLevelSwapped('A060', GetKillingUnitBJ())) ) ) )
endfunction
//===========================================================================
function InitTrig_Sadist takes nothing returns nothing
set gg_trg_Sadist = CreateTrigger( )
call DisableTrigger( gg_trg_Sadist )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Sadist, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Sadist, Condition( function Trig_Sadist_Conditions ) )
call TriggerAddAction( gg_trg_Sadist, function Trig_Sadist_Actions )
endfunction
function Trig_Laser_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A049' ) ) then
return false
endif
return true
endfunction
function Trig_Laser_Actions takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), ( I2R(GetUnitAbilityLevelSwapped('A049', GetTriggerUnit())) * 80.00 ), ATTACK_TYPE_MELEE, DAMAGE_TYPE_UNKNOWN )
endfunction
//===========================================================================
function InitTrig_Laser takes nothing returns nothing
set gg_trg_Laser = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Laser, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Laser, Condition( function Trig_Laser_Conditions ) )
call TriggerAddAction( gg_trg_Laser, function Trig_Laser_Actions )
endfunction
function Trig_Rearm_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A065' ) ) then
return false
endif
return true
endfunction
function Trig_Rearm_Actions takes nothing returns nothing
call UnitResetCooldown( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Rearm takes nothing returns nothing
set gg_trg_Rearm = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Rearm, EVENT_PLAYER_UNIT_SPELL_FINISH )
call TriggerAddCondition( gg_trg_Rearm, Condition( function Trig_Rearm_Conditions ) )
call TriggerAddAction( gg_trg_Rearm, function Trig_Rearm_Actions )
endfunction
function Trig_Nightmare_Attack_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'B02F') == true ) ) then
return false
endif
return true
endfunction
function Trig_Nightmare_Attack_Actions takes nothing returns nothing
call TriggerSleepAction( 0.25 )
set udg_TempLoc = GetUnitLoc(GetAttackedUnitBJ())
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(udg_NightCaster), udg_TempLoc, bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call UnitAddAbilityBJ( 'A04Z', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A04Z', GetLastCreatedUnit(), udg_NightLvl )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "sleep", GetAttacker() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
endfunction
//===========================================================================
function InitTrig_Nightmare_Attack takes nothing returns nothing
set gg_trg_Nightmare_Attack = CreateTrigger( )
call DisableTrigger( gg_trg_Nightmare_Attack )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Nightmare_Attack, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Nightmare_Attack, Condition( function Trig_Nightmare_Attack_Conditions ) )
call TriggerAddAction( gg_trg_Nightmare_Attack, function Trig_Nightmare_Attack_Actions )
endfunction
function Trig_Nightmare_HP_Func002001002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B02F') == true )
endfunction
function Trig_Nightmare_HP_Func002Func002C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) > 20.00 ) ) then
return false
endif
return true
endfunction
function Trig_Nightmare_HP_Func002A takes nothing returns nothing
set udg_NightBool = true
if ( Trig_Nightmare_HP_Func002Func002C() ) then
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - 20.00 ) )
else
call UnitDamageTargetBJ( udg_NightCaster, GetEnumUnit(), 50.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )
endif
endfunction
function Trig_Nightmare_HP_Func003C takes nothing returns boolean
if ( not ( udg_NightBool == false ) ) then
return false
endif
return true
endfunction
function Trig_Nightmare_HP_Actions takes nothing returns nothing
set udg_NightBool = false
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Nightmare_HP_Func002001002)), function Trig_Nightmare_HP_Func002A )
if ( Trig_Nightmare_HP_Func003C() ) then
call DisableTrigger( GetTriggeringTrigger() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Nightmare_HP takes nothing returns nothing
set gg_trg_Nightmare_HP = CreateTrigger( )
call DisableTrigger( gg_trg_Nightmare_HP )
call TriggerRegisterTimerEventPeriodic( gg_trg_Nightmare_HP, 1.00 )
call TriggerAddAction( gg_trg_Nightmare_HP, function Trig_Nightmare_HP_Actions )
endfunction
function Trig_Nightmare_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A04Y' ) ) then
return false
endif
return true
endfunction
function Trig_Nightmare_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_Nightmare_HP )
set udg_NightCaster = GetTriggerUnit()
set udg_NightLvl = GetUnitAbilityLevelSwapped('A04Y', GetTriggerUnit())
endfunction
//===========================================================================
function InitTrig_Nightmare takes nothing returns nothing
set gg_trg_Nightmare = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Nightmare, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Nightmare, Condition( function Trig_Nightmare_Conditions ) )
call TriggerAddAction( gg_trg_Nightmare, function Trig_Nightmare_Actions )
endfunction
function Trig_Fiends_Grip_stop_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02Q' ) ) then
return false
endif
return true
endfunction
function Trig_Fiends_Grip_stop_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Fiends_Grip_mana )
endfunction
//===========================================================================
function InitTrig_Fiends_Grip_stop takes nothing returns nothing
set gg_trg_Fiends_Grip_stop = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Fiends_Grip_stop, EVENT_PLAYER_UNIT_SPELL_ENDCAST )
call TriggerAddCondition( gg_trg_Fiends_Grip_stop, Condition( function Trig_Fiends_Grip_stop_Conditions ) )
call TriggerAddAction( gg_trg_Fiends_Grip_stop, function Trig_Fiends_Grip_stop_Actions )
endfunction
function Trig_Fiends_Grip_mana_Func004C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, udg_FGCaster) <= 20.00 ) ) then
return false
endif
return true
endfunction
function Trig_Fiends_Grip_mana_Actions takes nothing returns nothing
set udg_FGNum = ( 4.00 + ( 4.00 * I2R(GetUnitAbilityLevelSwapped('A02Q', udg_FGCaster)) ) )
call SetUnitManaBJ( udg_FGCaster, ( GetUnitStateSwap(UNIT_STATE_MANA, udg_FGCaster) - udg_FGNum ) )
call UnitDamageTargetBJ( udg_FGCaster, udg_FGCaster, udg_FGNum, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MIND )
if ( Trig_Fiends_Grip_mana_Func004C() ) then
call IssueImmediateOrderBJ( udg_FGCaster, "stop" )
call DisableTrigger( GetTriggeringTrigger() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Fiends_Grip_mana takes nothing returns nothing
set gg_trg_Fiends_Grip_mana = CreateTrigger( )
call DisableTrigger( gg_trg_Fiends_Grip_mana )
call TriggerRegisterTimerEventPeriodic( gg_trg_Fiends_Grip_mana, 0.20 )
call TriggerAddAction( gg_trg_Fiends_Grip_mana, function Trig_Fiends_Grip_mana_Actions )
endfunction
function Trig_Fiends_Grip_begin_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02Q' ) ) then
return false
endif
return true
endfunction
function Trig_Fiends_Grip_begin_Actions takes nothing returns nothing
set udg_FGCaster = GetTriggerUnit()
call EnableTrigger( gg_trg_Fiends_Grip_mana )
call TriggerSleepAction( 5.00 )
call DisableTrigger( gg_trg_Fiends_Grip_mana )
endfunction
//===========================================================================
function InitTrig_Fiends_Grip_begin takes nothing returns nothing
set gg_trg_Fiends_Grip_begin = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Fiends_Grip_begin, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Fiends_Grip_begin, Condition( function Trig_Fiends_Grip_begin_Conditions ) )
call TriggerAddAction( gg_trg_Fiends_Grip_begin, function Trig_Fiends_Grip_begin_Actions )
endfunction
function Trig_KS_active_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(udg_Leviathan, 'BNsi') == false ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(udg_Leviathan, 'B01T') == false ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(udg_Leviathan, 'B02M') == false ) ) then
return false
endif
return true
endfunction
function Trig_KS_active_Actions takes nothing returns nothing
call UnitRemoveBuffsBJ( bj_REMOVEBUFFS_NEGATIVE, udg_Leviathan )
endfunction
//===========================================================================
function InitTrig_KS_active takes nothing returns nothing
set gg_trg_KS_active = CreateTrigger( )
call DisableTrigger( gg_trg_KS_active )
call TriggerRegisterTimerEventPeriodic( gg_trg_KS_active, 10.00 )
call TriggerAddCondition( gg_trg_KS_active, Condition( function Trig_KS_active_Conditions ) )
call TriggerAddAction( gg_trg_KS_active, function Trig_KS_active_Actions )
endfunction
function Trig_KS_learned_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A04E' ) ) then
return false
endif
return true
endfunction
function Trig_KS_learned_Actions takes nothing returns nothing
set udg_Leviathan = GetTriggerUnit()
call EnableTrigger( gg_trg_KS_active )
endfunction
//===========================================================================
function InitTrig_KS_learned takes nothing returns nothing
set gg_trg_KS_learned = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_KS_learned, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_KS_learned, Condition( function Trig_KS_learned_Conditions ) )
call TriggerAddAction( gg_trg_KS_learned, function Trig_KS_learned_Actions )
endfunction
function Trig_Gush_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A046' ) ) then
return false
endif
return true
endfunction
function Trig_Gush_Actions takes nothing returns nothing
local unit t=GetSpellTargetUnit()
local real gush = ( 60.00 + ( 50.00 * I2R(GetUnitAbilityLevelSwapped('A046', GetTriggerUnit())) ) )
call TriggerSleepAction( 0.00 )
call AddSpecialEffectTargetUnitBJ( "chest", t , "Objects\\Spawnmodels\\Naga\\NagaDeath\\NagaDeath.mdl" )
call UnitDamageTargetBJ( GetTriggerUnit(), t , gush, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_COLD )
set t=null
endfunction
//===========================================================================
function InitTrig_Gush takes nothing returns nothing
set gg_trg_Gush = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Gush, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Gush, Condition( function Trig_Gush_Conditions ) )
call TriggerAddAction( gg_trg_Gush, function Trig_Gush_Actions )
endfunction
function Trig_ravage_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03Z' ) ) then
return false
endif
return true
endfunction
function Trig_ravage_Actions takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A084', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A084', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A03Z', GetTriggerUnit()) )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "impale", PolarProjectionBJ(udg_TempLoc, 100.00, ( 45.00 * I2R(GetForLoopIndexA()) )) )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call RemoveLocation(udg_TempLoc)
endfunction
//===========================================================================
function InitTrig_ravage takes nothing returns nothing
set gg_trg_ravage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ravage, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ravage, Condition( function Trig_ravage_Conditions ) )
call TriggerAddAction( gg_trg_ravage, function Trig_ravage_Actions )
endfunction
function Trig_overgrowth_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07Z' ) ) then
return false
endif
return true
endfunction
function Trig_overgrowth_Func001001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_overgrowth_Func001001003002001 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_overgrowth_Func001001003002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_overgrowth_Func001001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_overgrowth_Func001001003002001(), Trig_overgrowth_Func001001003002002() )
endfunction
function Trig_overgrowth_Func001001003 takes nothing returns boolean
return GetBooleanAnd( Trig_overgrowth_Func001001003001(), Trig_overgrowth_Func001001003002() )
endfunction
function Trig_overgrowth_Func001A takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A06T', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A06T', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A07Z', GetTriggerUnit()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "entanglingroots", GetEnumUnit() )
endfunction
function Trig_overgrowth_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocMatching(750.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_overgrowth_Func001001003)), function Trig_overgrowth_Func001A )
endfunction
//===========================================================================
function InitTrig_overgrowth takes nothing returns nothing
set gg_trg_overgrowth = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_overgrowth, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_overgrowth, Condition( function Trig_overgrowth_Conditions ) )
call TriggerAddAction( gg_trg_overgrowth, function Trig_overgrowth_Actions )
endfunction
function Trig_assassinate_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetOrderedUnit()) == 'Usyl' ) ) then
return false
endif
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("thunderbolt") ) ) then
return false
endif
return true
endfunction
function Trig_assassinate_Actions takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetOrderTargetUnit())
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetOrderedUnit()), GetUnitLoc(GetOrderTargetUnit()), bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call UnitAddAbilityBJ( 'A03W', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "faeriefire", GetOrderTargetUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
endfunction
//===========================================================================
function InitTrig_assassinate takes nothing returns nothing
set gg_trg_assassinate = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_assassinate, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerAddCondition( gg_trg_assassinate, Condition( function Trig_assassinate_Conditions ) )
call TriggerAddAction( gg_trg_assassinate, function Trig_assassinate_Actions )
endfunction
function Trig_Natures_Guise_check_Func003001002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B021') == true )
endfunction
function Trig_Natures_Guise_check_Func003Func003Func001Func001C takes nothing returns boolean
if ( ( GetDestructableTypeId(GetEnumDestructable()) == 'ATtr' ) ) then
return true
endif
if ( ( GetDestructableTypeId(GetEnumDestructable()) == 'ATtc' ) ) then
return true
endif
return false
endfunction
function Trig_Natures_Guise_check_Func003Func003Func001C takes nothing returns boolean
if ( not Trig_Natures_Guise_check_Func003Func003Func001Func001C() ) then
return false
endif
return true
endfunction
function Trig_Natures_Guise_check_Func003Func003A takes nothing returns nothing
if ( Trig_Natures_Guise_check_Func003Func003Func001C() ) then
set udg_NGUS = true
else
call DoNothing( )
endif
endfunction
function Trig_Natures_Guise_check_Func003Func004C takes nothing returns boolean
if ( not ( udg_NGUS == false ) ) then
return false
endif
return true
endfunction
function Trig_Natures_Guise_check_Func003A takes nothing returns nothing
set udg_NGBool = true
set udg_NGUS = false
call EnumDestructablesInCircleBJ( 375.00, GetUnitLoc(GetEnumUnit()), function Trig_Natures_Guise_check_Func003Func003A )
if ( Trig_Natures_Guise_check_Func003Func004C() ) then
call UnitRemoveBuffBJ( 'B021', GetEnumUnit() )
else
call DoNothing( )
endif
endfunction
function Trig_Natures_Guise_check_Func004C takes nothing returns boolean
if ( not ( udg_NGBool == false ) ) then
return false
endif
return true
endfunction
function Trig_Natures_Guise_check_Actions takes nothing returns nothing
set udg_NGBool = false
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Natures_Guise_check_Func003001002)), function Trig_Natures_Guise_check_Func003A )
if ( Trig_Natures_Guise_check_Func004C() ) then
call DisableTrigger( GetTriggeringTrigger() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Natures_Guise_check takes nothing returns nothing
set gg_trg_Natures_Guise_check = CreateTrigger( )
call DisableTrigger( gg_trg_Natures_Guise_check )
call TriggerRegisterTimerEventPeriodic( gg_trg_Natures_Guise_check, 1.00 )
call TriggerAddAction( gg_trg_Natures_Guise_check, function Trig_Natures_Guise_check_Actions )
endfunction
function Trig_Natures_Guise_cast_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01Z' ) ) then
return false
endif
return true
endfunction
function Trig_Natures_Guise_cast_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_Natures_Guise_check )
endfunction
//===========================================================================
function InitTrig_Natures_Guise_cast takes nothing returns nothing
set gg_trg_Natures_Guise_cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Natures_Guise_cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Natures_Guise_cast, Condition( function Trig_Natures_Guise_cast_Conditions ) )
call TriggerAddAction( gg_trg_Natures_Guise_cast, function Trig_Natures_Guise_cast_Actions )
endfunction
function Trig_Berserker_Rage_learned_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0BE' ) ) then
return false
endif
return true
endfunction
function Trig_Berserker_Rage_learned_Actions takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'A09E', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A0BE', GetTriggerUnit()) )
endfunction
//===========================================================================
function InitTrig_Berserker_Rage_learned takes nothing returns nothing
set gg_trg_Berserker_Rage_learned = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Berserker_Rage_learned, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Berserker_Rage_learned, Condition( function Trig_Berserker_Rage_learned_Conditions ) )
call TriggerAddAction( gg_trg_Berserker_Rage_learned, function Trig_Berserker_Rage_learned_Actions )
endfunction
function Trig_Berserker_Rage_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0BE' ) ) then
return false
endif
return true
endfunction
function Trig_Berserker_Rage_Actions takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'A09E', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A0BE', GetTriggerUnit()) )
endfunction
//===========================================================================
function InitTrig_Berserker_Rage takes nothing returns nothing
set gg_trg_Berserker_Rage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Berserker_Rage, EVENT_PLAYER_UNIT_SPELL_FINISH )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Berserker_Rage, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Berserker_Rage, Condition( function Trig_Berserker_Rage_Conditions ) )
call TriggerAddAction( gg_trg_Berserker_Rage, function Trig_Berserker_Rage_Actions )
endfunction
function Trig_Spider_Conditions takes nothing returns boolean
if ( not ( IsUnitIllusionBJ(GetTriggerUnit()) == false ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'U006' ) ) then
return false
endif
return true
endfunction
function Trig_Spider_Actions takes nothing returns nothing
set udg_Spider = GetTriggerUnit()
endfunction
//===========================================================================
function InitTrig_Spider takes nothing returns nothing
set gg_trg_Spider = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Spider, GetEntireMapRect() )
call TriggerAddCondition( gg_trg_Spider, Condition( function Trig_Spider_Conditions ) )
call TriggerAddAction( gg_trg_Spider, function Trig_Spider_Actions )
endfunction
function Trig_Spin_Web_Limit_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetSummonedUnit()) == 'o003' ) ) then
return false
endif
return true
endfunction
function Trig_Spin_Web_Limit_Func004C takes nothing returns boolean
if ( not ( udg_WebInt < ( GetUnitAbilityLevelSwapped('A0BG', GetSummoningUnit()) * 2 ) ) ) then
return false
endif
return true
endfunction
function Trig_Spin_Web_Limit_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_Spin_Web_Invis_Remove )
call SetUnitVertexColorBJ( GetSummonedUnit(), 100, 100, 100, 70.00 )
call UnitAddAbilityBJ( 'Aloc', GetSummonedUnit() )
if ( Trig_Spin_Web_Limit_Func004C() ) then
call KillUnit( udg_WebGroup[( udg_WebInt + 1 )] )
set udg_WebInt = ( udg_WebInt + 1 )
set udg_WebGroup[udg_WebInt] = GetTriggerUnit()
else
set udg_WebInt = 1
call KillUnit( udg_WebGroup[udg_WebInt] )
set udg_WebGroup[udg_WebInt] = GetTriggerUnit()
endif
endfunction
//===========================================================================
function InitTrig_Spin_Web_Limit takes nothing returns nothing
set gg_trg_Spin_Web_Limit = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Spin_Web_Limit, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Spin_Web_Limit, Condition( function Trig_Spin_Web_Limit_Conditions ) )
call TriggerAddAction( gg_trg_Spin_Web_Limit, function Trig_Spin_Web_Limit_Actions )
endfunction
function Trig_Spin_Web_Invis_Remove_Func001C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(udg_Spider, 'B01C') == true ) ) then
return false
endif
return true
endfunction
function Trig_Spin_Web_Invis_Remove_Func002C takes nothing returns boolean
if ( not ( UnitHasBuffBJ(udg_Spider, 'B01C') == false ) ) then
return false
endif
return true
endfunction
function Trig_Spin_Web_Invis_Remove_Actions takes nothing returns nothing
if ( Trig_Spin_Web_Invis_Remove_Func001C() ) then
call UnitAddAbilityBJ( 'A021', udg_Spider )
else
call DoNothing( )
endif
if ( Trig_Spin_Web_Invis_Remove_Func002C() ) then
call UnitRemoveAbilityBJ( 'A021', udg_Spider )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Spin_Web_Invis_Remove takes nothing returns nothing
set gg_trg_Spin_Web_Invis_Remove = CreateTrigger( )
call DisableTrigger( gg_trg_Spin_Web_Invis_Remove )
call TriggerRegisterTimerEventPeriodic( gg_trg_Spin_Web_Invis_Remove, 1.50 )
call TriggerAddAction( gg_trg_Spin_Web_Invis_Remove, function Trig_Spin_Web_Invis_Remove_Actions )
endfunction
function Trig_Spirit_Bear_learned_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0A5' ) ) then
return false
endif
return true
endfunction
function Trig_Spirit_Bear_learned_Func002001002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetTriggerUnit()) )
endfunction
function Trig_Spirit_Bear_learned_Func002001002002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Spirit_Bear_learned_Func002001002002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == false )
endfunction
function Trig_Spirit_Bear_learned_Func002001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_Spirit_Bear_learned_Func002001002002001(), Trig_Spirit_Bear_learned_Func002001002002002() )
endfunction
function Trig_Spirit_Bear_learned_Func002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Spirit_Bear_learned_Func002001002001(), Trig_Spirit_Bear_learned_Func002001002002() )
endfunction
function Trig_Spirit_Bear_learned_Func002Func001Func003C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0A5', GetTriggerUnit()) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Spirit_Bear_learned_Func002Func001Func004C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0A5', GetTriggerUnit()) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Spirit_Bear_learned_Func002Func001Func005C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0A5', GetTriggerUnit()) == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Spirit_Bear_learned_Func002Func001Func010C takes nothing returns boolean
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n01C' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n018' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n004' ) ) then
return true
endif
return false
endfunction
function Trig_Spirit_Bear_learned_Func002Func001C takes nothing returns boolean
if ( not Trig_Spirit_Bear_learned_Func002Func001Func010C() ) then
return false
endif
return true
endfunction
function Trig_Spirit_Bear_learned_Func002A takes nothing returns nothing
if ( Trig_Spirit_Bear_learned_Func002Func001C() ) then
set udg_BearPercentLife = GetUnitLifePercent(GetEnumUnit())
call RemoveUnit( GetEnumUnit() )
if ( Trig_Spirit_Bear_learned_Func002Func001Func003C() ) then
call CreateNUnitsAtLoc( 1, 'n018', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call AddSpecialEffectTargetUnitBJ( "chest", GetLastCreatedUnit(), "Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl" )
else
call DoNothing( )
endif
if ( Trig_Spirit_Bear_learned_Func002Func001Func004C() ) then
call CreateNUnitsAtLoc( 1, 'n01C', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call AddSpecialEffectTargetUnitBJ( "chest", GetLastCreatedUnit(), "Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl" )
else
call DoNothing( )
endif
if ( Trig_Spirit_Bear_learned_Func002Func001Func005C() ) then
call CreateNUnitsAtLoc( 1, 'n01G', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call AddSpecialEffectTargetUnitBJ( "chest", GetLastCreatedUnit(), "Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl" )
else
call DoNothing( )
endif
call SetUnitAbilityLevelSwapped( 'A09Y', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0A5', udg_Yggrasil) )
call SetUnitLifePercentBJ( GetLastCreatedUnit(), udg_BearPercentLife )
set udg_Bear = GetLastCreatedUnit()
else
call DoNothing( )
endif
endfunction
function Trig_Spirit_Bear_learned_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Spirit_Bear_learned_Func002001002)), function Trig_Spirit_Bear_learned_Func002A )
endfunction
//===========================================================================
function InitTrig_Spirit_Bear_learned takes nothing returns nothing
set gg_trg_Spirit_Bear_learned = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Spirit_Bear_learned, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Spirit_Bear_learned, Condition( function Trig_Spirit_Bear_learned_Conditions ) )
call TriggerAddAction( gg_trg_Spirit_Bear_learned, function Trig_Spirit_Bear_learned_Actions )
endfunction
function Trig_bear_dies_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_Bear ) ) then
return false
endif
return true
endfunction
function Trig_bear_dies_Func005Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetEnumItem()) != 'pspd' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetEnumItem()) != 'oflg' ) ) then
return false
endif
return true
endfunction
function Trig_bear_dies_Func005A takes nothing returns nothing
if ( Trig_bear_dies_Func005Func001C() ) then
call SetItemVisibleBJ( false, GetEnumItem() )
else
call DoNothing( )
endif
endfunction
function Trig_bear_dies_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call SetHeroXP( udg_Yggrasil, ( GetHeroXP(udg_Yggrasil) - ( GetHeroXP(udg_Yggrasil) / ( 125 - ( 25 * GetUnitAbilityLevelSwapped('A0A5', udg_Yggrasil) ) ) ) ), false )
call UnitDamageTargetBJ( GetKillingUnitBJ(), udg_Yggrasil, ( 100.00 * I2R(GetUnitAbilityLevelSwapped('A0A5', udg_Yggrasil)) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
call EnumItemsInRectBJ( RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 150.00, 150.00), function Trig_bear_dies_Func005A )
set udg_Bear = null
endfunction
//===========================================================================
function InitTrig_bear_dies takes nothing returns nothing
set gg_trg_bear_dies = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_bear_dies, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_bear_dies, Condition( function Trig_bear_dies_Conditions ) )
call TriggerAddAction( gg_trg_bear_dies, function Trig_bear_dies_Actions )
endfunction
function Trig_druid_dies_Conditions takes nothing returns boolean
if ( not ( GetTriggerUnit() == udg_Yggrasil ) ) then
return false
endif
return true
endfunction
function Trig_druid_dies_Func002001002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetTriggerUnit()) )
endfunction
function Trig_druid_dies_Func002001002002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_druid_dies_Func002001002002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == false )
endfunction
function Trig_druid_dies_Func002001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_druid_dies_Func002001002002001(), Trig_druid_dies_Func002001002002002() )
endfunction
function Trig_druid_dies_Func002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_druid_dies_Func002001002001(), Trig_druid_dies_Func002001002002() )
endfunction
function Trig_druid_dies_Func002Func001Func002Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetEnumItem()) != 'pspd' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetEnumItem()) != 'oflg' ) ) then
return false
endif
return true
endfunction
function Trig_druid_dies_Func002Func001Func002A takes nothing returns nothing
if ( Trig_druid_dies_Func002Func001Func002Func001C() ) then
call SetItemVisibleBJ( false, GetEnumItem() )
else
call DoNothing( )
endif
endfunction
function Trig_druid_dies_Func002Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnumUnit()) == 'n01G' ) ) then
return false
endif
return true
endfunction
function Trig_druid_dies_Func002A takes nothing returns nothing
if ( Trig_druid_dies_Func002Func001C() ) then
call KillUnit( GetEnumUnit() )
call EnumItemsInRectBJ( RectFromCenterSizeBJ(GetUnitLoc(GetTriggerUnit()), 150.00, 150.00), function Trig_druid_dies_Func002Func001Func002A )
else
call KillUnit( GetEnumUnit() )
endif
endfunction
function Trig_druid_dies_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_druid_dies_Func002001002)), function Trig_druid_dies_Func002A )
endfunction
//===========================================================================
function InitTrig_druid_dies takes nothing returns nothing
set gg_trg_druid_dies = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_druid_dies, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_druid_dies, Condition( function Trig_druid_dies_Conditions ) )
call TriggerAddAction( gg_trg_druid_dies, function Trig_druid_dies_Actions )
endfunction
function Trig_synergy_learned_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0A8' ) ) then
return false
endif
return true
endfunction
function Trig_synergy_learned_Actions takes nothing returns nothing
call SetPlayerTechResearchedSwap( 'R000', ( GetPlayerTechCountSimple('R000', GetOwningPlayer(GetTriggerUnit())) + 1 ), GetOwningPlayer(GetTriggerUnit()) )
call SetPlayerTechResearchedSwap( 'R001', ( GetPlayerTechCountSimple('R001', GetOwningPlayer(GetTriggerUnit())) + 1 ), GetOwningPlayer(GetTriggerUnit()) )
endfunction
//===========================================================================
function InitTrig_synergy_learned takes nothing returns nothing
set gg_trg_synergy_learned = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_synergy_learned, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_synergy_learned, Condition( function Trig_synergy_learned_Conditions ) )
call TriggerAddAction( gg_trg_synergy_learned, function Trig_synergy_learned_Actions )
endfunction
function Trig_lone_druid_bonus_learned_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0AJ' ) ) then
return false
endif
return true
endfunction
function Trig_lone_druid_bonus_learned_Actions takes nothing returns nothing
call ModifyHeroStat( bj_HEROSTAT_STR, GetTriggerUnit(), bj_MODIFYMETHOD_ADD, 2 )
call ModifyHeroStat( bj_HEROSTAT_AGI, GetTriggerUnit(), bj_MODIFYMETHOD_ADD, 2 )
call ModifyHeroStat( bj_HEROSTAT_INT, GetTriggerUnit(), bj_MODIFYMETHOD_ADD, 2 )
endfunction
//===========================================================================
function InitTrig_lone_druid_bonus_learned takes nothing returns nothing
set gg_trg_lone_druid_bonus_learned = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_lone_druid_bonus_learned, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_lone_druid_bonus_learned, Condition( function Trig_lone_druid_bonus_learned_Conditions ) )
call TriggerAddAction( gg_trg_lone_druid_bonus_learned, function Trig_lone_druid_bonus_learned_Actions )
endfunction
function Trig_Summon_Spirit_Bear_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0A5' ) ) then
return false
endif
return true
endfunction
function Trig_Summon_Spirit_Bear_Func003001002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetTriggerUnit()) )
endfunction
function Trig_Summon_Spirit_Bear_Func003001002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == false )
endfunction
function Trig_Summon_Spirit_Bear_Func003001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Summon_Spirit_Bear_Func003001002001(), Trig_Summon_Spirit_Bear_Func003001002002() )
endfunction
function Trig_Summon_Spirit_Bear_Func003Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n01G' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n01C' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n018' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetEnumUnit()) == 'n004' ) ) then
return true
endif
return false
endfunction
function Trig_Summon_Spirit_Bear_Func003Func001C takes nothing returns boolean
if ( not Trig_Summon_Spirit_Bear_Func003Func001Func003C() ) then
return false
endif
return true
endfunction
function Trig_Summon_Spirit_Bear_Func003A takes nothing returns nothing
if ( Trig_Summon_Spirit_Bear_Func003Func001C() ) then
set udg_HaveABear = true
else
call DoNothing( )
endif
endfunction
function Trig_Summon_Spirit_Bear_Func005C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0A5', GetTriggerUnit()) == 1 ) ) then
return false
endif
if ( not ( udg_HaveABear == false ) ) then
return false
endif
return true
endfunction
function Trig_Summon_Spirit_Bear_Func006C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0A5', GetTriggerUnit()) == 2 ) ) then
return false
endif
if ( not ( udg_HaveABear == false ) ) then
return false
endif
return true
endfunction
function Trig_Summon_Spirit_Bear_Func007C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0A5', GetTriggerUnit()) == 3 ) ) then
return false
endif
if ( not ( udg_HaveABear == false ) ) then
return false
endif
return true
endfunction
function Trig_Summon_Spirit_Bear_Func008Func003Func001C takes nothing returns boolean
if ( not ( IsItemHiddenBJ(GetEnumItem()) == true ) ) then
return false
endif
return true
endfunction
function Trig_Summon_Spirit_Bear_Func008Func003A takes nothing returns nothing
if ( Trig_Summon_Spirit_Bear_Func008Func003Func001C() ) then
call SetItemVisibleBJ( true, GetEnumItem() )
call UnitAddItemSwapped( GetEnumItem(), udg_Bear )
else
call DoNothing( )
endif
endfunction
function Trig_Summon_Spirit_Bear_Func008C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0A5', GetTriggerUnit()) == 4 ) ) then
return false
endif
if ( not ( udg_HaveABear == false ) ) then
return false
endif
return true
endfunction
function Trig_Summon_Spirit_Bear_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_HaveABear = false
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Summon_Spirit_Bear_Func003001002)), function Trig_Summon_Spirit_Bear_Func003A )
call TriggerSleepAction( 0.01 )
if ( Trig_Summon_Spirit_Bear_Func005C() ) then
call CreateNUnitsAtLoc( 1, 'n004', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
set udg_Bear = GetLastCreatedUnit()
call AddSpecialEffectTargetUnitBJ( "chest", GetLastCreatedUnit(), "Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl" )
else
call DoNothing( )
endif
if ( Trig_Summon_Spirit_Bear_Func006C() ) then
call CreateNUnitsAtLoc( 1, 'n018', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
set udg_Bear = GetLastCreatedUnit()
call AddSpecialEffectTargetUnitBJ( "chest", GetLastCreatedUnit(), "Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl" )
else
call DoNothing( )
endif
if ( Trig_Summon_Spirit_Bear_Func007C() ) then
call CreateNUnitsAtLoc( 1, 'n01C', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
set udg_Bear = GetLastCreatedUnit()
call AddSpecialEffectTargetUnitBJ( "chest", GetLastCreatedUnit(), "Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl" )
else
call DoNothing( )
endif
if ( Trig_Summon_Spirit_Bear_Func008C() ) then
call CreateNUnitsAtLoc( 1, 'n01G', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
set udg_Bear = GetLastCreatedUnit()
call EnumItemsInRectBJ( GetPlayableMapRect(), function Trig_Summon_Spirit_Bear_Func008Func003A )
call AddSpecialEffectTargetUnitBJ( "chest", GetLastCreatedUnit(), "Abilities\\Spells\\Orc\\FeralSpirit\\feralspiritdone.mdl" )
else
call DoNothing( )
endif
call SetUnitAbilityLevelSwapped( 'A09Y', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0A5', udg_Yggrasil) )
endfunction
//===========================================================================
function InitTrig_Summon_Spirit_Bear takes nothing returns nothing
set gg_trg_Summon_Spirit_Bear = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Summon_Spirit_Bear, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Summon_Spirit_Bear, Condition( function Trig_Summon_Spirit_Bear_Conditions ) )
call TriggerAddAction( gg_trg_Summon_Spirit_Bear, function Trig_Summon_Spirit_Bear_Actions )
endfunction
function Trig_Yggrasil_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'N01O' ) ) then
return false
endif
return true
endfunction
function Trig_Yggrasil_Actions takes nothing returns nothing
set udg_Yggrasil = GetTriggerUnit()
call EnableTrigger( gg_trg_too_far )
endfunction
//===========================================================================
function InitTrig_Yggrasil takes nothing returns nothing
set gg_trg_Yggrasil = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Yggrasil, GetEntireMapRect() )
call TriggerAddCondition( gg_trg_Yggrasil, Condition( function Trig_Yggrasil_Conditions ) )
call TriggerAddAction( gg_trg_Yggrasil, function Trig_Yggrasil_Actions )
endfunction
function Trig_too_far_Conditions takes nothing returns boolean
if ( not ( GetAttacker() == udg_Bear ) ) then
return false
endif
if ( not ( DistanceBetweenPoints(GetUnitLoc(udg_Bear), GetUnitLoc(udg_Yggrasil)) >= 1500.00 ) ) then
return false
endif
return true
endfunction
function Trig_too_far_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_Return_Bear )
endfunction
//===========================================================================
function InitTrig_too_far takes nothing returns nothing
set gg_trg_too_far = CreateTrigger( )
call DisableTrigger( gg_trg_too_far )
call TriggerRegisterAnyUnitEventBJ( gg_trg_too_far, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_too_far, Condition( function Trig_too_far_Conditions ) )
call TriggerAddAction( gg_trg_too_far, function Trig_too_far_Actions )
endfunction
function Trig_Return_Bear_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0A7' ) ) then
return false
endif
return true
endfunction
function Trig_Return_Bear_Actions takes nothing returns nothing
call AddSpecialEffectLocBJ( GetUnitLoc(udg_Bear), "Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl" )
call SetUnitPositionLocFacingLocBJ( udg_Bear, PolarProjectionBJ(GetUnitLoc(udg_Yggrasil), GetRandomReal(25.00, 50.00), GetRandomDirectionDeg()), GetUnitLoc(udg_Yggrasil) )
call AddSpecialEffectTargetUnitBJ( "overhead", udg_Bear, "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl" )
endfunction
//===========================================================================
function InitTrig_Return_Bear takes nothing returns nothing
set gg_trg_Return_Bear = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Return_Bear, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Return_Bear, Condition( function Trig_Return_Bear_Conditions ) )
call TriggerAddAction( gg_trg_Return_Bear, function Trig_Return_Bear_Actions )
endfunction
function Trig_aegis_Conditions takes nothing returns boolean
if ( not ( GetManipulatedItem() == GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'olig') ) ) then
return false
endif
return true
endfunction
function Trig_aegis_Func002C takes nothing returns boolean
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_aegis_Actions takes nothing returns nothing
if ( Trig_aegis_Func002C() ) then
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetTriggerUnit()), GetRectCenter(gg_rct_Hero_Creation_NE), 1.00 )
call SetUnitPositionLoc( GetTriggerUnit(), GetRectCenter(gg_rct_Hero_Creation_NE) )
else
call PanCameraToTimedLocForPlayer( GetOwningPlayer(GetTriggerUnit()), GetRectCenter(gg_rct_Hero_Creation_Evil), 1.00 )
call SetUnitPositionLoc( GetTriggerUnit(), GetRectCenter(gg_rct_Hero_Creation_Evil) )
endif
endfunction
//===========================================================================
function InitTrig_aegis takes nothing returns nothing
set gg_trg_aegis = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_aegis, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_aegis, Condition( function Trig_aegis_Conditions ) )
call TriggerAddAction( gg_trg_aegis, function Trig_aegis_Actions )
endfunction
function Trig_sunder_switch_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07R' ) ) then
return false
endif
return true
endfunction
function Trig_sunder_switch_Func001C takes nothing returns boolean
if ( not ( GetSpellTargetUnit() == udg_SunderTargets[1] ) ) then
return false
endif
return true
endfunction
function Trig_sunder_switch_Func002Func002C takes nothing returns boolean
if ( not ( GetUnitLifePercent(udg_SunderTargets[2]) < 33.00 ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A07Q', udg_SunderTargets[1]) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_sunder_switch_Func002Func003C takes nothing returns boolean
if ( not ( GetUnitLifePercent(udg_SunderTargets[2]) < 28.00 ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A07Q', udg_SunderTargets[1]) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_sunder_switch_Func002Func004C takes nothing returns boolean
if ( not ( GetUnitLifePercent(udg_SunderTargets[2]) < 23.00 ) ) then
return false
endif
if ( not ( GetUnitAbilityLevelSwapped('A07Q', udg_SunderTargets[1]) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_sunder_switch_Func002C takes nothing returns boolean
if ( not ( GetSpellTargetUnit() == udg_SunderTargets[2] ) ) then
return false
endif
return true
endfunction
function Trig_sunder_switch_Actions takes nothing returns nothing
if ( Trig_sunder_switch_Func001C() ) then
call SetUnitLifePercentBJ( udg_SunderTargets[1], udg_SunderPercentLife[2] )
else
call DoNothing( )
endif
if ( Trig_sunder_switch_Func002C() ) then
call SetUnitLifePercentBJ( udg_SunderTargets[2], udg_SunderPercentLife[1] )
if ( Trig_sunder_switch_Func002Func002C() ) then
call SetUnitLifePercentBJ( udg_SunderTargets[2], 33.00 )
else
call DoNothing( )
endif
if ( Trig_sunder_switch_Func002Func003C() ) then
call SetUnitLifePercentBJ( udg_SunderTargets[2], 28.00 )
else
call DoNothing( )
endif
if ( Trig_sunder_switch_Func002Func004C() ) then
call SetUnitLifePercentBJ( udg_SunderTargets[2], 23.00 )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_sunder_switch takes nothing returns nothing
set gg_trg_sunder_switch = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_sunder_switch, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_sunder_switch, Condition( function Trig_sunder_switch_Conditions ) )
call TriggerAddAction( gg_trg_sunder_switch, function Trig_sunder_switch_Actions )
endfunction
function Trig_Sunder_begin_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07Q' ) ) then
return false
endif
return true
endfunction
function Trig_Sunder_begin_Actions takes nothing returns nothing
set udg_SunderTargets[1] = GetTriggerUnit()
set udg_SunderTargets[2] = GetSpellTargetUnit()
set udg_SunderPercentLife[1] = GetUnitLifePercent(udg_SunderTargets[1])
set udg_SunderPercentLife[2] = GetUnitLifePercent(udg_SunderTargets[2])
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(udg_SunderTargets[1]), GetUnitLoc(udg_SunderTargets[1]), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A07R', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", udg_SunderTargets[2] )
call UnitApplyTimedLifeBJ( 10.00, 'BTLF', GetLastCreatedUnit() )
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(udg_SunderTargets[2]), GetUnitLoc(udg_SunderTargets[2]), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A07R', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", udg_SunderTargets[1] )
call UnitApplyTimedLifeBJ( 10.00, 'BTLF', GetLastCreatedUnit() )
endfunction
//===========================================================================
function InitTrig_Sunder_begin takes nothing returns nothing
set gg_trg_Sunder_begin = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Sunder_begin, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Sunder_begin, Condition( function Trig_Sunder_begin_Conditions ) )
call TriggerAddAction( gg_trg_Sunder_begin, function Trig_Sunder_begin_Actions )
endfunction
function Trig_land_mines_limit_Func008C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n00O' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n00P' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n00Q' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'n00N' ) ) then
return true
endif
return false
endfunction
function Trig_land_mines_limit_Conditions takes nothing returns boolean
if ( not Trig_land_mines_limit_Func008C() ) then
return false
endif
return true
endfunction
function Trig_land_mines_limit_Func006001002001001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'n00O' )
endfunction
function Trig_land_mines_limit_Func006001002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'n00P' )
endfunction
function Trig_land_mines_limit_Func006001002001 takes nothing returns boolean
return GetBooleanOr( Trig_land_mines_limit_Func006001002001001(), Trig_land_mines_limit_Func006001002001002() )
endfunction
function Trig_land_mines_limit_Func006001002002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'n00Q' )
endfunction
function Trig_land_mines_limit_Func006001002002002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'n00N' )
endfunction
function Trig_land_mines_limit_Func006001002002 takes nothing returns boolean
return GetBooleanOr( Trig_land_mines_limit_Func006001002002001(), Trig_land_mines_limit_Func006001002002002() )
endfunction
function Trig_land_mines_limit_Func006001002 takes nothing returns boolean
return GetBooleanOr( Trig_land_mines_limit_Func006001002001(), Trig_land_mines_limit_Func006001002002() )
endfunction
function Trig_land_mines_limit_Func006A takes nothing returns nothing
set udg_GMTot = ( udg_GMTot + 1 )
endfunction
function Trig_land_mines_limit_Func007Func003Func001C takes nothing returns boolean
if ( not ( R2I(TimerGetRemaining(udg_GMTimer[GetForLoopIndexA()])) < udg_GMT2B ) ) then
return false
endif
if ( not ( IsUnitDeadBJ(udg_GMUnit[GetForLoopIndexA()]) == false ) ) then
return false
endif
return true
endfunction
function Trig_land_mines_limit_Func007C takes nothing returns boolean
if ( not ( udg_GMTot > 16 ) ) then
return false
endif
return true
endfunction
function Trig_land_mines_limit_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_GMTot = 0
set udg_GMCount = ( udg_GMCount + 1 )
call StartTimerBJ( udg_GMTimer[udg_GMCount], false, 15000.00 )
set udg_GMUnit[udg_GMCount] = GetTriggerUnit()
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_land_mines_limit_Func006001002)), function Trig_land_mines_limit_Func006A )
if ( Trig_land_mines_limit_Func007C() ) then
set udg_GMT2B = 99999
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_GMCount
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_land_mines_limit_Func007Func003Func001C() ) then
set udg_GMOldest = udg_GMUnit[GetForLoopIndexA()]
set udg_GMT2B = R2I(TimerGetRemaining(udg_GMTimer[GetForLoopIndexA()]))
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call ExplodeUnitBJ( udg_GMOldest )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_land_mines_limit takes nothing returns nothing
set gg_trg_land_mines_limit = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_land_mines_limit, GetEntireMapRect() )
call TriggerAddCondition( gg_trg_land_mines_limit, Condition( function Trig_land_mines_limit_Conditions ) )
call TriggerAddAction( gg_trg_land_mines_limit, function Trig_land_mines_limit_Actions )
endfunction
function Trig_double_edge_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00L' ) ) then
return false
endif
return true
endfunction
function Trig_double_edge_Func001C takes nothing returns boolean
if ( not ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) >= ( 100.00 * I2R(GetUnitAbilityLevelSwapped('A00L', GetTriggerUnit())) ) ) ) then
return false
endif
return true
endfunction
function Trig_double_edge_Actions takes nothing returns nothing
if ( Trig_double_edge_Func001C() ) then
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) - ( 100.00 * I2R(GetUnitAbilityLevelSwapped('A00L', GetTriggerUnit())) ) ) )
else
call SetUnitLifeBJ( GetTriggerUnit(), 1.00 )
endif
endfunction
//===========================================================================
function InitTrig_double_edge takes nothing returns nothing
set gg_trg_double_edge = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_double_edge, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_double_edge, Condition( function Trig_double_edge_Conditions ) )
call TriggerAddAction( gg_trg_double_edge, function Trig_double_edge_Actions )
endfunction
function Trig_death_pact_Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A04Q' ) ) then
return false
endif
return true
endfunction
function Trig_death_pact_Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A053' ) ) then
return false
endif
return true
endfunction
function Trig_death_pact_Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08L' ) ) then
return false
endif
return true
endfunction
function Trig_death_pact_Actions takes nothing returns nothing
if ( Trig_death_pact_Func001C() ) then
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) + ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) * ( 0.15 + ( I2R(GetUnitAbilityLevelSwapped('A04Q', GetTriggerUnit())) * 0.40 ) ) ) ) )
call KillUnit( GetSpellTargetUnit() )
else
call DoNothing( )
endif
if ( Trig_death_pact_Func002C() ) then
call SetUnitManaBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) + ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) * ( I2R(GetUnitAbilityLevelSwapped('A053', GetTriggerUnit())) * 0.15 ) ) ) )
call KillUnit( GetSpellTargetUnit() )
else
call DoNothing( )
endif
if ( Trig_death_pact_Func003C() ) then
call SetUnitManaBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_MANA, GetTriggerUnit()) + ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) * 0.15 ) ) )
call SetUnitLifeBJ( GetTriggerUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) + ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) * 0.85 ) ) )
call KillUnit( GetSpellTargetUnit() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_death_pact takes nothing returns nothing
set gg_trg_death_pact = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_death_pact, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddAction( gg_trg_death_pact, function Trig_death_pact_Actions )
endfunction
function Trig_static_field_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01X' ) ) then
return false
endif
return true
endfunction
function Trig_static_field_Func003001003001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_static_field_Func003001003001002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'BUst') == false )
endfunction
function Trig_static_field_Func003001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_static_field_Func003001003001001(), Trig_static_field_Func003001003001002() )
endfunction
function Trig_static_field_Func003001003002001 takes nothing returns boolean
return ( IsUnitDeadBJ(GetFilterUnit()) == false )
endfunction
function Trig_static_field_Func003001003002002001 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_static_field_Func003001003002002002001001 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B02J') == false )
endfunction
function Trig_static_field_Func003001003002002002001002001 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'BUsp') == false )
endfunction
function Trig_static_field_Func003001003002002002001002002001 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'BUst') == false )
endfunction
function Trig_static_field_Func003001003002002002001002002002001 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'Bcyc') == false )
endfunction
function Trig_static_field_Func003001003002002002001002002002002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'Bcy2') == false )
endfunction
function Trig_static_field_Func003001003002002002001002002002 takes nothing returns boolean
return GetBooleanAnd( Trig_static_field_Func003001003002002002001002002002001(), Trig_static_field_Func003001003002002002001002002002002() )
endfunction
function Trig_static_field_Func003001003002002002001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_static_field_Func003001003002002002001002002001(), Trig_static_field_Func003001003002002002001002002002() )
endfunction
function Trig_static_field_Func003001003002002002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_static_field_Func003001003002002002001002001(), Trig_static_field_Func003001003002002002001002002() )
endfunction
function Trig_static_field_Func003001003002002002001 takes nothing returns boolean
return GetBooleanAnd( Trig_static_field_Func003001003002002002001001(), Trig_static_field_Func003001003002002002001002() )
endfunction
function Trig_static_field_Func003001003002002002002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'n00L' )
endfunction
function Trig_static_field_Func003001003002002002 takes nothing returns boolean
return GetBooleanAnd( Trig_static_field_Func003001003002002002001(), Trig_static_field_Func003001003002002002002() )
endfunction
function Trig_static_field_Func003001003002002 takes nothing returns boolean
return GetBooleanAnd( Trig_static_field_Func003001003002002001(), Trig_static_field_Func003001003002002002() )
endfunction
function Trig_static_field_Func003001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_static_field_Func003001003002001(), Trig_static_field_Func003001003002002() )
endfunction
function Trig_static_field_Func003001003 takes nothing returns boolean
return GetBooleanAnd( Trig_static_field_Func003001003001(), Trig_static_field_Func003001003002() )
endfunction
function Trig_static_field_Func003A takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) * udg_BSDam ) )
endfunction
function Trig_static_field_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_BSDam = ( 0.95 - ( 0.02 * I2R(GetUnitAbilityLevelSwapped('A01X', GetTriggerUnit())) ) )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(400.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_static_field_Func003001003)), function Trig_static_field_Func003A )
endfunction
//===========================================================================
function InitTrig_static_field takes nothing returns nothing
set gg_trg_static_field = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_static_field, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_static_field, Condition( function Trig_static_field_Conditions ) )
call TriggerAddAction( gg_trg_static_field, function Trig_static_field_Actions )
endfunction
function Trig_track_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A00F', GetKillingUnitBJ()) > 0 ) ) then
return false
endif
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_track_Actions takes nothing returns nothing
call SetPlayerStateBJ( GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_GOLD) + ( 50 * GetUnitAbilityLevelSwapped('A00F', GetKillingUnitBJ()) ) ) )
call CreateTextTagUnitBJ( ( "+" + I2S(( GetUnitAbilityLevelSwapped('A00F', GetKillingUnitBJ()) * 50 )) ), GetDyingUnit(), 0, 10, 90.00, 84.00, 0.00, 0 )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call PolledWait( 2.00 )
call DestroyTextTagBJ( GetLastCreatedTextTag() )
endfunction
//===========================================================================
function InitTrig_track takes nothing returns nothing
set gg_trg_track = CreateTrigger( )
call DisableTrigger( gg_trg_track )
call TriggerRegisterAnyUnitEventBJ( gg_trg_track, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_track, Condition( function Trig_track_Conditions ) )
call TriggerAddAction( gg_trg_track, function Trig_track_Actions )
endfunction
function Trig_return_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A00V', GetAttackedUnitBJ()) > 0 ) ) then
return false
endif
return true
endfunction
function Trig_return_Actions takes nothing returns nothing
call UnitDamageTargetBJ( GetAttackedUnitBJ(), GetAttacker(), ( 5.00 * I2R(GetUnitAbilityLevelSwapped('A00V', GetAttackedUnitBJ())) ), ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
endfunction
//===========================================================================
function InitTrig_return takes nothing returns nothing
set gg_trg_return = CreateTrigger( )
call DisableTrigger( gg_trg_return )
call TriggerRegisterAnyUnitEventBJ( gg_trg_return, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_return, Condition( function Trig_return_Conditions ) )
call TriggerAddAction( gg_trg_return, function Trig_return_Actions )
endfunction
function Trig_beam_counter_Func003C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A054' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A042' ) ) then
return true
endif
return false
endfunction
function Trig_beam_counter_Conditions takes nothing returns boolean
if ( not Trig_beam_counter_Func003C() ) then
return false
endif
return true
endfunction
function Trig_beam_counter_Actions takes nothing returns nothing
set udg_BeamCounter = ( udg_BeamCounter + 1 )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "|c0000ffffBeam Counter: " + ( I2S(udg_BeamCounter) + "|r" ) ) )
endfunction
//===========================================================================
function InitTrig_beam_counter takes nothing returns nothing
set gg_trg_beam_counter = CreateTrigger( )
call DisableTrigger( gg_trg_beam_counter )
call TriggerRegisterAnyUnitEventBJ( gg_trg_beam_counter, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_beam_counter, Condition( function Trig_beam_counter_Conditions ) )
call TriggerAddAction( gg_trg_beam_counter, function Trig_beam_counter_Actions )
endfunction
function Trig_beam_counter_on_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_beam_counter )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_beam_counter_on takes nothing returns nothing
set gg_trg_beam_counter_on = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(1), "-beamcounter", true )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(2), "-beamcounter", true )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(3), "-beamcounter", true )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(4), "-beamcounter", true )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(5), "-beamcounter", true )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(7), "-beamcounter", true )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(8), "-beamcounter", true )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(9), "-beamcounter", true )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(10), "-beamcounter", true )
call TriggerRegisterPlayerChatEvent( gg_trg_beam_counter_on, Player(11), "-beamcounter", true )
call TriggerAddAction( gg_trg_beam_counter_on, function Trig_beam_counter_on_Actions )
endfunction
function Trig_refresh_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02W' ) ) then
return false
endif
return true
endfunction
function Trig_refresh_Actions takes nothing returns nothing
call UnitResetCooldown( GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_refresh takes nothing returns nothing
set gg_trg_refresh = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_refresh, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_refresh, Condition( function Trig_refresh_Conditions ) )
call TriggerAddAction( gg_trg_refresh, function Trig_refresh_Actions )
endfunction
function Trig_detonate_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02T' ) ) then
return false
endif
return true
endfunction
function Trig_detonate_Func003001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'o018' )
endfunction
function Trig_detonate_Func003001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetTriggerUnit()) )
endfunction
function Trig_detonate_Func003001002 takes nothing returns boolean
return GetBooleanAnd( Trig_detonate_Func003001002001(), Trig_detonate_Func003001002002() )
endfunction
function Trig_detonate_Func003A takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'A036', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A036', GetLastCreatedUnit(), 1 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "inferno", udg_TempLoc )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call ExplodeUnitBJ( GetEnumUnit() )
call RemoveLocation(udg_TempLoc)
endfunction
function Trig_detonate_Func004001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'o002' )
endfunction
function Trig_detonate_Func004001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetTriggerUnit()) )
endfunction
function Trig_detonate_Func004001002 takes nothing returns boolean
return GetBooleanAnd( Trig_detonate_Func004001002001(), Trig_detonate_Func004001002002() )
endfunction
function Trig_detonate_Func004A takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'A036', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A036', GetLastCreatedUnit(), 2 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "inferno", udg_TempLoc )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call ExplodeUnitBJ( GetEnumUnit() )
call RemoveLocation(udg_TempLoc)
endfunction
function Trig_detonate_Func005001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'o00B' )
endfunction
function Trig_detonate_Func005001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetOwningPlayer(GetTriggerUnit()) )
endfunction
function Trig_detonate_Func005001002 takes nothing returns boolean
return GetBooleanAnd( Trig_detonate_Func005001002001(), Trig_detonate_Func005001002002() )
endfunction
function Trig_detonate_Func005A takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'A036', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A036', GetLastCreatedUnit(), 3 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "inferno", udg_TempLoc )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call ExplodeUnitBJ( GetEnumUnit() )
call RemoveLocation(udg_TempLoc)
endfunction
function Trig_detonate_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_Techies = GetTriggerUnit()
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_detonate_Func003001002)), function Trig_detonate_Func003A )
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_detonate_Func004001002)), function Trig_detonate_Func004A )
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_detonate_Func005001002)), function Trig_detonate_Func005A )
endfunction
//===========================================================================
function InitTrig_detonate takes nothing returns nothing
set gg_trg_detonate = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_detonate, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_detonate, Condition( function Trig_detonate_Conditions ) )
call TriggerAddAction( gg_trg_detonate, function Trig_detonate_Actions )
endfunction
function Trig_detonate_given_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A0AK' ) ) then
return false
endif
return true
endfunction
function Trig_detonate_given_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A02T', GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_detonate_given takes nothing returns nothing
set gg_trg_detonate_given = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_detonate_given, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_detonate_given, Condition( function Trig_detonate_given_Conditions ) )
call TriggerAddAction( gg_trg_detonate_given, function Trig_detonate_given_Actions )
endfunction
function Trig_detonate_1_Func004C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0AM' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A3' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A4' ) ) then
return true
endif
return false
endfunction
function Trig_detonate_1_Conditions takes nothing returns boolean
if ( not Trig_detonate_1_Func004C() ) then
return false
endif
return true
endfunction
function Trig_detonate_1_Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AM' ) ) then
return false
endif
return true
endfunction
function Trig_detonate_1_Func002C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0A3' ) ) then
return false
endif
return true
endfunction
function Trig_detonate_1_Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0A4' ) ) then
return false
endif
return true
endfunction
function Trig_detonate_1_Actions takes nothing returns nothing
if ( Trig_detonate_1_Func001C() ) then
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'A036', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A036', GetLastCreatedUnit(), 1 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "inferno", GetUnitLoc(GetTriggerUnit()) )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call ExplodeUnitBJ( GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_detonate_1_Func002C() ) then
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'A036', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A036', GetLastCreatedUnit(), 2 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "inferno", GetUnitLoc(GetTriggerUnit()) )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call ExplodeUnitBJ( GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_detonate_1_Func003C() ) then
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetTriggerUnit()), bj_UNIT_FACING )
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'A036', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A036', GetLastCreatedUnit(), 3 )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "inferno", GetUnitLoc(GetTriggerUnit()) )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call ExplodeUnitBJ( GetTriggerUnit() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_detonate_1 takes nothing returns nothing
set gg_trg_detonate_1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_detonate_1, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_detonate_1, Condition( function Trig_detonate_1_Conditions ) )
call TriggerAddAction( gg_trg_detonate_1, function Trig_detonate_1_Actions )
endfunction
function Trig_sprout_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06Q' ) ) then
return false
endif
return true
endfunction
function Trig_sprout_Actions takes nothing returns nothing
local destructable array dx
call CreateFogModifierRadiusLocBJ( true, GetOwningPlayer(GetTriggerUnit()), FOG_OF_WAR_VISIBLE, GetUnitLoc(GetSpellTargetUnit()), 1000.00 )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 8
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call CreateDestructableLoc( 'LTlt', PolarProjectionBJ(GetUnitLoc(GetSpellTargetUnit()), 120.00, ( I2R(GetForLoopIndexB()) * 45.00 )), GetRandomDirectionDeg(), 1, 0 )
set dx[GetForLoopIndexB()] = GetLastCreatedDestructable()
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call TriggerSleepAction( ( 2.00 + I2R(GetUnitAbilityLevelSwapped('A06Q', GetTriggerUnit())) ) )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call KillDestructable( dx[GetForLoopIndexA()] )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call DestroyFogModifier( GetLastCreatedFogModifier() )
call TriggerSleepAction( 4.00 )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 8
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call RemoveDestructable( dx[GetForLoopIndexA()] )
set dx[GetForLoopIndexA()] =null
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_sprout takes nothing returns nothing
set gg_trg_sprout = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_sprout, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_sprout, Condition( function Trig_sprout_Conditions ) )
call TriggerAddAction( gg_trg_sprout, function Trig_sprout_Actions )
endfunction
function Trig_holy_light_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02F' ) ) then
return false
endif
return true
endfunction
function Trig_holy_light_Func001C takes nothing returns boolean
if ( not ( IsUnitEnemy(GetSpellTargetUnit(), GetOwningPlayer(GetTriggerUnit())) == true ) ) then
return false
endif
return true
endfunction
function Trig_holy_light_Actions takes nothing returns nothing
if ( Trig_holy_light_Func001C() ) then
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), ( 75.00 * I2R(GetUnitAbilityLevelSwapped('A02F', GetTriggerUnit())) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
call SetUnitLifeBJ( GetSpellTargetUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) + ( 125.00 * I2R(GetUnitAbilityLevelSwapped('A02F', GetTriggerUnit())) ) ) )
endif
endfunction
//===========================================================================
function InitTrig_holy_light takes nothing returns nothing
set gg_trg_holy_light = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_holy_light, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_holy_light, Condition( function Trig_holy_light_Conditions ) )
call TriggerAddAction( gg_trg_holy_light, function Trig_holy_light_Actions )
endfunction
function Trig_devour_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTransportUnitBJ()) == 'UC42' ) ) then
return false
endif
return true
endfunction
function Trig_devour_Func002C takes nothing returns boolean
if ( not ( IsUnitInTransportBJ(GetTriggerUnit(), GetTransportUnitBJ()) == true ) ) then
return false
endif
return true
endfunction
function Trig_devour_Actions takes nothing returns nothing
call PolledWait( ( ( GetUnitStateSwap(UNIT_STATE_LIFE, GetTriggerUnit()) - 20.00 ) / 20.00 ) )
if ( Trig_devour_Func002C() ) then
call SetPlayerStateBJ( GetOwningPlayer(GetTransportUnitBJ()), PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(GetOwningPlayer(GetTransportUnitBJ()), PLAYER_STATE_RESOURCE_GOLD) + ( 10 * GetUnitAbilityLevelSwapped('A05Y', GetTransportUnitBJ()) ) ) )
call CreateTextTagUnitBJ( ( "+" + I2S(( GetUnitAbilityLevelSwapped('A05Y', GetTransportUnitBJ()) * 10 )) ), GetTransportUnitBJ(), 0, 10, 90.00, 84.00, 0.00, 0 )
call SetTextTagVelocityBJ( GetLastCreatedTextTag(), 64, 90 )
call PolledWait( 2.00 )
call DestroyTextTagBJ( GetLastCreatedTextTag() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_devour takes nothing returns nothing
set gg_trg_devour = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_devour, EVENT_PLAYER_UNIT_LOADED )
call TriggerAddCondition( gg_trg_devour, Condition( function Trig_devour_Conditions ) )
call TriggerAddAction( gg_trg_devour, function Trig_devour_Actions )
endfunction
function Trig_death_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A094' ) ) then
return false
endif
return true
endfunction
function Trig_death_Func001C takes nothing returns boolean
if ( not ( ModuloReal(I2R(GetHeroLevel(GetSpellTargetUnit())), ( 7.00 - I2R(GetUnitAbilityLevelSwapped('A094', GetTriggerUnit())) )) == 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_death_Actions takes nothing returns nothing
if ( Trig_death_Func001C() ) then
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), 250.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_death takes nothing returns nothing
set gg_trg_death = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_death, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_death, Condition( function Trig_death_Conditions ) )
call TriggerAddAction( gg_trg_death, function Trig_death_Actions )
endfunction
function Trig_Nether_swap_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00G' ) ) then
return false
endif
return true
endfunction
function Trig_Nether_swap_Actions takes nothing returns nothing
set udg_NetherUnits[1] = GetSpellAbilityUnit()
set udg_NetherUnits[2] = GetSpellTargetUnit()
set udg_NetherPosition[1] = GetUnitLoc(udg_NetherUnits[1])
set udg_NetherPosition[2] = GetUnitLoc(udg_NetherUnits[2])
call SetUnitPositionLoc( udg_NetherUnits[1], udg_NetherPosition[2] )
call SetUnitPositionLoc( udg_NetherUnits[2], udg_NetherPosition[1] )
endfunction
//===========================================================================
function InitTrig_Nether_swap takes nothing returns nothing
set gg_trg_Nether_swap = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Nether_swap, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Nether_swap, Condition( function Trig_Nether_swap_Conditions ) )
call TriggerAddAction( gg_trg_Nether_swap, function Trig_Nether_swap_Actions )
endfunction
function Trig_Purification_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A08N' ) ) then
return false
endif
return true
endfunction
function Trig_Purification_Func003001003001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Purification_Func003001003001002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A04R', GetFilterUnit()) != 1 )
endfunction
function Trig_Purification_Func003001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Purification_Func003001003001001(), Trig_Purification_Func003001003001002() )
endfunction
function Trig_Purification_Func003001003002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Purification_Func003001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Purification_Func003001003001(), Trig_Purification_Func003001003002() )
endfunction
function Trig_Purification_Func003A takes nothing returns nothing
call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), ( 75.00 * I2R(GetUnitAbilityLevelSwapped('A08N', GetTriggerUnit())) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
endfunction
function Trig_Purification_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call SetUnitLifeBJ( GetSpellTargetUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellTargetUnit()) + ( 100.00 * I2R(GetUnitAbilityLevelSwapped('A08N', GetTriggerUnit())) ) ) )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(250.00, GetUnitLoc(GetSpellTargetUnit()), Condition(function Trig_Purification_Func003001003)), function Trig_Purification_Func003A )
endfunction
//===========================================================================
function InitTrig_Purification takes nothing returns nothing
set gg_trg_Purification = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Purification, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Purification, Condition( function Trig_Purification_Conditions ) )
call TriggerAddAction( gg_trg_Purification, function Trig_Purification_Actions )
endfunction
function Trig_new_HitN_3_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Udre' ) ) then
return false
endif
return true
endfunction
function Trig_new_HitN_3_Func001C takes nothing returns boolean
if ( not ( GetTimeOfDay() >= 6.00 ) ) then
return false
endif
if ( not ( GetTimeOfDay() <= 18.00 ) ) then
return false
endif
return true
endfunction
function Trig_new_HitN_3_Actions takes nothing returns nothing
if ( Trig_new_HitN_3_Func001C() ) then
call SetUnitAbilityLevelSwapped( 'S00A', GetTriggerUnit(), 5 )
call SetUnitAbilityLevelSwapped( 'A08C', GetTriggerUnit(), 5 )
else
call SetUnitAbilityLevelSwapped( 'S00A', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A086', GetTriggerUnit()) )
call SetUnitAbilityLevelSwapped( 'A08C', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A08E', GetTriggerUnit()) )
endif
endfunction
//===========================================================================
function InitTrig_new_HitN_3 takes nothing returns nothing
set gg_trg_new_HitN_3 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_new_HitN_3, EVENT_PLAYER_HERO_REVIVE_FINISH )
call TriggerAddCondition( gg_trg_new_HitN_3, Condition( function Trig_new_HitN_3_Conditions ) )
call TriggerAddAction( gg_trg_new_HitN_3, function Trig_new_HitN_3_Actions )
endfunction
function Trig_new_HitN_2_Func002001002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_new_HitN_2_Func002001002002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'Udre' )
endfunction
function Trig_new_HitN_2_Func002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_new_HitN_2_Func002001002001(), Trig_new_HitN_2_Func002001002002() )
endfunction
function Trig_new_HitN_2_Func002A takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'S00A', GetEnumUnit(), GetUnitAbilityLevelSwapped('A086', GetEnumUnit()) )
call SetUnitAbilityLevelSwapped( 'A08C', GetEnumUnit(), GetUnitAbilityLevelSwapped('A08E', GetEnumUnit()) )
endfunction
function Trig_new_HitN_2_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_new_HitN_2_Func002001002)), function Trig_new_HitN_2_Func002A )
endfunction
//===========================================================================
function InitTrig_new_HitN_2 takes nothing returns nothing
set gg_trg_new_HitN_2 = CreateTrigger( )
call TriggerRegisterGameStateEventTimeOfDay( gg_trg_new_HitN_2, LESS_THAN, 6.00 )
call TriggerRegisterGameStateEventTimeOfDay( gg_trg_new_HitN_2, GREATER_THAN_OR_EQUAL, 18.00 )
call TriggerAddAction( gg_trg_new_HitN_2, function Trig_new_HitN_2_Actions )
endfunction
function Trig_new_HitN_Conditions takes nothing returns boolean
if ( not ( GetTimeOfDay() < 18.00 ) ) then
return false
endif
return true
endfunction
function Trig_new_HitN_Func002001002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_new_HitN_Func002001002002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'Udre' )
endfunction
function Trig_new_HitN_Func002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_new_HitN_Func002001002001(), Trig_new_HitN_Func002001002002() )
endfunction
function Trig_new_HitN_Func002A takes nothing returns nothing
call SetUnitAbilityLevelSwapped( 'S00A', GetEnumUnit(), 5 )
call SetUnitAbilityLevelSwapped( 'A08C', GetEnumUnit(), 5 )
endfunction
function Trig_new_HitN_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_new_HitN_Func002001002)), function Trig_new_HitN_Func002A )
endfunction
//===========================================================================
function InitTrig_new_HitN takes nothing returns nothing
set gg_trg_new_HitN = CreateTrigger( )
call TriggerRegisterGameStateEventTimeOfDay( gg_trg_new_HitN, GREATER_THAN_OR_EQUAL, 6.00 )
call TriggerAddCondition( gg_trg_new_HitN, Condition( function Trig_new_HitN_Conditions ) )
call TriggerAddAction( gg_trg_new_HitN, function Trig_new_HitN_Actions )
endfunction
function Trig_Hunter_in_the_Night_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Udre' ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_in_the_Night_Func002Func003C takes nothing returns boolean
if ( not ( GetTimeOfDay() >= 6.00 ) ) then
return false
endif
if ( not ( GetTimeOfDay() <= 18.00 ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_in_the_Night_Func002C takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A086' ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_in_the_Night_Func003Func002C takes nothing returns boolean
if ( not ( GetTimeOfDay() >= 6.00 ) ) then
return false
endif
if ( not ( GetTimeOfDay() <= 18.00 ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_in_the_Night_Func003C takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A08E' ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_in_the_Night_Actions takes nothing returns nothing
if ( Trig_Hunter_in_the_Night_Func002C() ) then
call UnitAddAbilityBJ( 'S00A', GetTriggerUnit() )
if ( Trig_Hunter_in_the_Night_Func002Func003C() ) then
call SetUnitAbilityLevelSwapped( 'S00A', GetTriggerUnit(), 5 )
else
call SetUnitAbilityLevelSwapped( 'S00A', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A086', GetTriggerUnit()) )
endif
else
call DoNothing( )
endif
if ( Trig_Hunter_in_the_Night_Func003C() ) then
call UnitAddAbilityBJ( 'A08C', GetTriggerUnit() )
if ( Trig_Hunter_in_the_Night_Func003Func002C() ) then
call SetUnitAbilityLevelSwapped( 'A08C', GetTriggerUnit(), 5 )
else
call SetUnitAbilityLevelSwapped( 'A08C', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A08E', GetTriggerUnit()) )
endif
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Hunter_in_the_Night takes nothing returns nothing
set gg_trg_Hunter_in_the_Night = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hunter_in_the_Night, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Hunter_in_the_Night, Condition( function Trig_Hunter_in_the_Night_Conditions ) )
call TriggerAddAction( gg_trg_Hunter_in_the_Night, function Trig_Hunter_in_the_Night_Actions )
endfunction
function Trig_song_of_the_siren_buff_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07U' ) ) then
return false
endif
return true
endfunction
function Trig_song_of_the_siren_buff_Func003001003001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_song_of_the_siren_buff_Func003001003002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_song_of_the_siren_buff_Func003001003 takes nothing returns boolean
return GetBooleanAnd( Trig_song_of_the_siren_buff_Func003001003001(), Trig_song_of_the_siren_buff_Func003001003002() )
endfunction
function Trig_song_of_the_siren_buff_Func003A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(udg_NagaSiren), GetUnitLoc(udg_NagaSiren), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A07T', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A07U', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A07U', GetTriggerUnit()) )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "sleep", GetEnumUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
endfunction
function Trig_song_of_the_siren_buff_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_NagaSiren = GetTriggerUnit()
call ForGroupBJ( GetUnitsInRangeOfLocMatching(( 500.00 + ( 500.00 * I2R(GetUnitAbilityLevelSwapped('A07U', GetTriggerUnit())) ) ), GetUnitLoc(GetTriggerUnit()), Condition(function Trig_song_of_the_siren_buff_Func003001003)), function Trig_song_of_the_siren_buff_Func003A )
endfunction
//===========================================================================
function InitTrig_song_of_the_siren_buff takes nothing returns nothing
set gg_trg_song_of_the_siren_buff = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_song_of_the_siren_buff, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_song_of_the_siren_buff, Condition( function Trig_song_of_the_siren_buff_Conditions ) )
call TriggerAddAction( gg_trg_song_of_the_siren_buff, function Trig_song_of_the_siren_buff_Actions )
endfunction
function Trig_ManaVoid_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A09R' ) ) then
return false
endif
return true
endfunction
function Trig_ManaVoid_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A09R', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_ManaVoid_Func003C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A09R', GetTriggerUnit()) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_ManaVoid_Func004C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A09R', GetTriggerUnit()) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_ManaVoid_Actions takes nothing returns nothing
if ( Trig_ManaVoid_Func002C() ) then
set udg_ManaVoid = ( ( GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetSpellTargetUnit()) - GetUnitStateSwap(UNIT_STATE_MANA, GetSpellTargetUnit()) ) * 0.60 )
else
call DoNothing( )
endif
if ( Trig_ManaVoid_Func003C() ) then
set udg_ManaVoid = ( ( GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetSpellTargetUnit()) - GetUnitStateSwap(UNIT_STATE_MANA, GetSpellTargetUnit()) ) * 0.85 )
else
call DoNothing( )
endif
if ( Trig_ManaVoid_Func004C() ) then
set udg_ManaVoid = ( ( GetUnitStateSwap(UNIT_STATE_MAX_MANA, GetSpellTargetUnit()) - GetUnitStateSwap(UNIT_STATE_MANA, GetSpellTargetUnit()) ) * 1.10 )
else
call DoNothing( )
endif
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), udg_ManaVoid, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )
endfunction
//===========================================================================
function InitTrig_ManaVoid takes nothing returns nothing
set gg_trg_ManaVoid = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ManaVoid, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_ManaVoid, Condition( function Trig_ManaVoid_Conditions ) )
call TriggerAddAction( gg_trg_ManaVoid, function Trig_ManaVoid_Actions )
endfunction
function Trig_lightning_bolt_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A006' ) ) then
return false
endif
return true
endfunction
function Trig_lightning_bolt_Actions takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'e000', GetOwningPlayer(GetSpellAbilityUnit()), udg_TempLoc, bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A05S', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A05S', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A006', GetTriggerUnit()) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "chainlightning", GetSpellTargetUnit() )
call UnitApplyTimedLifeBJ( 3.00, 'BTLF', GetLastCreatedUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
endfunction
//===========================================================================
function InitTrig_lightning_bolt takes nothing returns nothing
set gg_trg_lightning_bolt = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_lightning_bolt, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_lightning_bolt, Condition( function Trig_lightning_bolt_Conditions ) )
call TriggerAddAction( gg_trg_lightning_bolt, function Trig_lightning_bolt_Actions )
endfunction
function Trig_Wrath_of_Zeus_Copy_Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A07C' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A06L' ) ) then
return true
endif
return false
endfunction
function Trig_Wrath_of_Zeus_Copy_Conditions takes nothing returns boolean
if ( not Trig_Wrath_of_Zeus_Copy_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Wrath_of_Zeus_Copy_Func003001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Wrath_of_Zeus_Copy_Func003001002002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Wrath_of_Zeus_Copy_Func003001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Wrath_of_Zeus_Copy_Func003001002001(), Trig_Wrath_of_Zeus_Copy_Func003001002002() )
endfunction
function Trig_Wrath_of_Zeus_Copy_Func003Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A07C' ) ) then
return false
endif
return true
endfunction
function Trig_Wrath_of_Zeus_Copy_Func003A takes nothing returns nothing
if ( Trig_Wrath_of_Zeus_Copy_Func003Func001C() ) then
call CreateNUnitsAtLoc( 1, 'e000', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A05S', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A05S', GetLastCreatedUnit(), ( 4 + GetUnitAbilityLevelSwapped('A07C', GetTriggerUnit()) ) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "chainlightning", GetEnumUnit() )
call UnitApplyTimedLifeBJ( 3.00, 'BTLF', GetLastCreatedUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
else
call CreateNUnitsAtLoc( 1, 'e000', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A05S', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A05S', GetLastCreatedUnit(), ( 5 + GetUnitAbilityLevelSwapped('A06L', GetTriggerUnit()) ) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "chainlightning", GetEnumUnit() )
call UnitApplyTimedLifeBJ( 3.00, 'BTLF', GetLastCreatedUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
endif
endfunction
function Trig_Wrath_of_Zeus_Copy_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Wrath_of_Zeus_Copy_Func003001002)), function Trig_Wrath_of_Zeus_Copy_Func003A )
endfunction
//===========================================================================
function InitTrig_Wrath_of_Zeus_Copy takes nothing returns nothing
set gg_trg_Wrath_of_Zeus_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Wrath_of_Zeus_Copy, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Wrath_of_Zeus_Copy, Condition( function Trig_Wrath_of_Zeus_Copy_Conditions ) )
call TriggerAddAction( gg_trg_Wrath_of_Zeus_Copy, function Trig_Wrath_of_Zeus_Copy_Actions )
endfunction
function Trig_diabolicedict_new_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A035' ) ) then
return false
endif
return true
endfunction
function Trig_diabolicedict_new_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A0E9', GetTriggerUnit() )
call TriggerSleepAction( 8.00 )
call UnitRemoveAbilityBJ( 'A0E9', GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_diabolicedict_new takes nothing returns nothing
set gg_trg_diabolicedict_new = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_diabolicedict_new, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_diabolicedict_new, Condition( function Trig_diabolicedict_new_Conditions ) )
call TriggerAddAction( gg_trg_diabolicedict_new, function Trig_diabolicedict_new_Actions )
endfunction
function Trig_Reverse_Polarity_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A06F' ) ) then
return false
endif
return true
endfunction
function Trig_Reverse_Polarity_Func002001003001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Reverse_Polarity_Func002001003001002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A04R', GetFilterUnit()) != 1 )
endfunction
function Trig_Reverse_Polarity_Func002001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Reverse_Polarity_Func002001003001001(), Trig_Reverse_Polarity_Func002001003001002() )
endfunction
function Trig_Reverse_Polarity_Func002001003002001 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Reverse_Polarity_Func002001003002002 takes nothing returns boolean
return ( IsUnitDeadBJ(GetFilterUnit()) == false )
endfunction
function Trig_Reverse_Polarity_Func002001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Reverse_Polarity_Func002001003002001(), Trig_Reverse_Polarity_Func002001003002002() )
endfunction
function Trig_Reverse_Polarity_Func002001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Reverse_Polarity_Func002001003001(), Trig_Reverse_Polarity_Func002001003002() )
endfunction
function Trig_Reverse_Polarity_Func002A takes nothing returns nothing
call SetUnitPositionLoc( GetEnumUnit(), PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), GetRandomReal(20.00, 70.00), GetRandomDirectionDeg()) )
endfunction
function Trig_Reverse_Polarity_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRangeOfLocMatching(460.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_Reverse_Polarity_Func002001003)), function Trig_Reverse_Polarity_Func002A )
endfunction
//===========================================================================
function InitTrig_Reverse_Polarity takes nothing returns nothing
set gg_trg_Reverse_Polarity = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Reverse_Polarity, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Reverse_Polarity, Condition( function Trig_Reverse_Polarity_Conditions ) )
call TriggerAddAction( gg_trg_Reverse_Polarity, function Trig_Reverse_Polarity_Actions )
endfunction
function Trig_omnislash_selection_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'Nbbc' ) ) then
return false
endif
return true
endfunction
function Trig_omnislash_selection_Actions takes nothing returns nothing
call SelectUnitRemoveForPlayer( GetTriggerUnit(), GetTriggerPlayer() )
endfunction
//===========================================================================
function InitTrig_omnislash_selection takes nothing returns nothing
set gg_trg_omnislash_selection = CreateTrigger( )
call DisableTrigger( gg_trg_omnislash_selection )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(2), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(3), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(4), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(5), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(7), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(8), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(9), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(10), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_omnislash_selection, Player(11), true )
call TriggerAddCondition( gg_trg_omnislash_selection, Condition( function Trig_omnislash_selection_Conditions ) )
call TriggerAddAction( gg_trg_omnislash_selection, function Trig_omnislash_selection_Actions )
endfunction
function Trig_OmniSlashEffect_Func005001003001001001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_OmniSlashEffect_Func005001003001001001002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A04R', GetFilterUnit()) != 1 )
endfunction
function Trig_OmniSlashEffect_Func005001003001001001 takes nothing returns boolean
return GetBooleanAnd( Trig_OmniSlashEffect_Func005001003001001001001(), Trig_OmniSlashEffect_Func005001003001001001002() )
endfunction
function Trig_OmniSlashEffect_Func005001003001001002 takes nothing returns boolean
return ( IsUnitVisible(GetFilterUnit(), udg_BushidoOwner) == true )
endfunction
function Trig_OmniSlashEffect_Func005001003001001 takes nothing returns boolean
return GetBooleanAnd( Trig_OmniSlashEffect_Func005001003001001001(), Trig_OmniSlashEffect_Func005001003001001002() )
endfunction
function Trig_OmniSlashEffect_Func005001003001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_BushidoBladeUnit)) == true )
endfunction
function Trig_OmniSlashEffect_Func005001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_OmniSlashEffect_Func005001003001001(), Trig_OmniSlashEffect_Func005001003001002() )
endfunction
function Trig_OmniSlashEffect_Func005001003002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_OmniSlashEffect_Func005001003002002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'e00C' )
endfunction
function Trig_OmniSlashEffect_Func005001003002002002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'o003' )
endfunction
function Trig_OmniSlashEffect_Func005001003002002 takes nothing returns boolean
return GetBooleanAnd( Trig_OmniSlashEffect_Func005001003002002001(), Trig_OmniSlashEffect_Func005001003002002002() )
endfunction
function Trig_OmniSlashEffect_Func005001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_OmniSlashEffect_Func005001003002001(), Trig_OmniSlashEffect_Func005001003002002() )
endfunction
function Trig_OmniSlashEffect_Func005001003 takes nothing returns boolean
return GetBooleanAnd( Trig_OmniSlashEffect_Func005001003001(), Trig_OmniSlashEffect_Func005001003002() )
endfunction
function Trig_OmniSlashEffect_Func005A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_BushidoGroup )
endfunction
function Trig_OmniSlashEffect_Func006C takes nothing returns boolean
if ( not ( udg_Omni1 == false ) ) then
return false
endif
return true
endfunction
function Trig_OmniSlashEffect_Func007Func001C takes nothing returns boolean
if ( ( IsUnitDeadBJ(udg_BushidoBladeUnit) == true ) ) then
return true
endif
if ( ( IsUnitGroupEmptyBJ(udg_BushidoGroup) == true ) ) then
return true
endif
return false
endfunction
function Trig_OmniSlashEffect_Func007C takes nothing returns boolean
if ( not Trig_OmniSlashEffect_Func007Func001C() ) then
return false
endif
return true
endfunction
function Trig_OmniSlashEffect_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call AddSpecialEffectTargetUnitBJ( "chest", udg_BushidoBladeUnit, "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl" )
set udg_BushidoRandomNumber = GetRandomInt(150, 250)
call GroupClear( udg_BushidoGroup )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(550.00, GetUnitLoc(udg_RandPer), Condition(function Trig_OmniSlashEffect_Func005001003)), function Trig_OmniSlashEffect_Func005A )
if ( Trig_OmniSlashEffect_Func006C() ) then
set udg_RandPer = GroupPickRandomUnit(udg_BushidoGroup)
else
call DoNothing( )
endif
if ( Trig_OmniSlashEffect_Func007C() ) then
call DoNothing( )
else
call SetUnitPositionLocFacingBJ( udg_BushidoBladeUnit, PolarProjectionBJ(GetUnitLoc(udg_RandPer), 50.00, GetRandomDirectionDeg()), AngleBetweenPoints(GetUnitLoc(udg_BushidoBladeUnit), GetUnitLoc(udg_RandPer)) )
call SetUnitAnimation( udg_BushidoBladeUnit, "Attack" )
call UnitDamageTargetBJ( udg_BushidoBladeUnit, udg_RandPer, I2R(udg_BushidoRandomNumber), ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
call AddSpecialEffectTargetUnitBJ( "chest", udg_BushidoBladeUnit, "Abilities\\Spells\\NightElf\\Blink\\BlinkCaster.mdl" )
endif
endfunction
//===========================================================================
function InitTrig_OmniSlashEffect takes nothing returns nothing
set gg_trg_OmniSlashEffect = CreateTrigger( )
call TriggerAddAction( gg_trg_OmniSlashEffect, function Trig_OmniSlashEffect_Actions )
endfunction
function Trig_omnislash_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A066' ) ) then
return false
endif
return true
endfunction
function Trig_omnislash_Func020C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A066', udg_BushidoBladeUnit) > 1 ) ) then
return false
endif
return true
endfunction
function Trig_omnislash_Func021C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A066', udg_BushidoBladeUnit) > 2 ) ) then
return false
endif
return true
endfunction
function Trig_omnislash_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_omnislash_selection )
set udg_BushidoOwner = GetOwningPlayer(GetTriggerUnit())
set udg_BushidoBladeUnit = GetTriggerUnit()
call SelectUnitRemoveForPlayer( udg_BushidoBladeUnit, udg_BushidoOwner )
call SetUnitVertexColorBJ( udg_BushidoBladeUnit, 100, 100, 100, 50.00 )
call SetUnitPathing( udg_BushidoBladeUnit, false )
call SetUnitInvulnerable( udg_BushidoBladeUnit, true )
set udg_RandPer = GetSpellTargetUnit()
set udg_Omni1 = true
call ConditionalTriggerExecute( gg_trg_OmniSlashEffect )
set udg_Omni1 = false
call PolledWait( 0.25 )
call ConditionalTriggerExecute( gg_trg_OmniSlashEffect )
call PolledWait( 0.25 )
call ConditionalTriggerExecute( gg_trg_OmniSlashEffect )
call PolledWait( 0.25 )
call ConditionalTriggerExecute( gg_trg_OmniSlashEffect )
call PolledWait( 0.25 )
if ( Trig_omnislash_Func020C() ) then
call ConditionalTriggerExecute( gg_trg_OmniSlashEffect )
call PolledWait( 0.25 )
call ConditionalTriggerExecute( gg_trg_OmniSlashEffect )
call PolledWait( 0.25 )
else
call DoNothing( )
endif
if ( Trig_omnislash_Func021C() ) then
call ConditionalTriggerExecute( gg_trg_OmniSlashEffect )
call PolledWait( 0.25 )
call ConditionalTriggerExecute( gg_trg_OmniSlashEffect )
call PolledWait( 0.25 )
call ConditionalTriggerExecute( gg_trg_OmniSlashEffect )
call PolledWait( 0.25 )
else
call DoNothing( )
endif
call GroupClear( udg_BushidoGroup )
call SetUnitPathing( udg_BushidoBladeUnit, true )
call SetUnitInvulnerable( udg_BushidoBladeUnit, false )
call SetUnitScalePercent( udg_BushidoBladeUnit, 100.00, 100.00, 100.00 )
call SetUnitVertexColorBJ( udg_BushidoBladeUnit, 100, 100, 100, 0.00 )
call SelectUnitAddForPlayer( udg_BushidoBladeUnit, udg_BushidoOwner )
call DisableTrigger( gg_trg_omnislash_selection )
endfunction
//===========================================================================
function InitTrig_omnislash takes nothing returns nothing
set gg_trg_omnislash = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_omnislash, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_omnislash, Condition( function Trig_omnislash_Conditions ) )
call TriggerAddAction( gg_trg_omnislash, function Trig_omnislash_Actions )
endfunction
function Trig_Poison_Nova_effect_Func001001003001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Poison_Nova_effect_Func001001003001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Poison_Nova_effect_Func001001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_Poison_Nova_effect_Func001001003001001(), Trig_Poison_Nova_effect_Func001001003001002() )
endfunction
function Trig_Poison_Nova_effect_Func001001003002001001 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B027') == false )
endfunction
function Trig_Poison_Nova_effect_Func001001003002001002 takes nothing returns boolean
return ( UnitHasBuffBJ(GetFilterUnit(), 'B028') == false )
endfunction
function Trig_Poison_Nova_effect_Func001001003002001 takes nothing returns boolean
return GetBooleanAnd( Trig_Poison_Nova_effect_Func001001003002001001(), Trig_Poison_Nova_effect_Func001001003002001002() )
endfunction
function Trig_Poison_Nova_effect_Func001001003002002 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_Poison_Nova_effect_Func001001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Poison_Nova_effect_Func001001003002001(), Trig_Poison_Nova_effect_Func001001003002002() )
endfunction
function Trig_Poison_Nova_effect_Func001001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Poison_Nova_effect_Func001001003001(), Trig_Poison_Nova_effect_Func001001003002() )
endfunction
function Trig_Poison_Nova_effect_Func001A takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'o00I', GetOwningPlayer(udg_PNovaCaster), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A076', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A076', GetLastCreatedUnit(), udg_PNLv )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "attack", GetEnumUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
endfunction
function Trig_Poison_Nova_effect_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocMatching(udg_PNovaDist, udg_PNPt, Condition(function Trig_Poison_Nova_effect_Func001001003)), function Trig_Poison_Nova_effect_Func001A )
set udg_PNovaDist = ( udg_PNovaDist + 200.00 )
endfunction
//===========================================================================
function InitTrig_Poison_Nova_effect takes nothing returns nothing
set gg_trg_Poison_Nova_effect = CreateTrigger( )
call TriggerAddAction( gg_trg_Poison_Nova_effect, function Trig_Poison_Nova_effect_Actions )
endfunction
function Trig_Poison_Nova_Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A013' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0A6' ) ) then
return true
endif
return false
endfunction
function Trig_Poison_Nova_Conditions takes nothing returns boolean
if ( not Trig_Poison_Nova_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Poison_Nova_Func006C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A013' ) ) then
return false
endif
return true
endfunction
function Trig_Poison_Nova_Func008Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A013' ) ) then
return false
endif
return true
endfunction
function Trig_Poison_Nova_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_PNPt = GetUnitLoc(GetTriggerUnit())
set udg_PNovaCaster = GetTriggerUnit()
set udg_PNovaDist = 200.00
if ( Trig_Poison_Nova_Func006C() ) then
set udg_PNLv = GetUnitAbilityLevelSwapped('A013', GetTriggerUnit())
else
set udg_PNLv = ( GetUnitAbilityLevelSwapped('A0A6', GetTriggerUnit()) + 1 )
endif
call GroupClear( udg_PNG )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 36
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc( 1, 'e017', GetOwningPlayer(udg_PNovaCaster), udg_TempLoc, udg_PN[GetForLoopIndexA()] )
if ( Trig_Poison_Nova_Func008Func003C() ) then
call SetUnitAbilityLevelSwapped( 'A057', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A013', GetSpellAbilityUnit()) )
else
call SetUnitAbilityLevelSwapped( 'A057', GetLastCreatedUnit(), ( GetUnitAbilityLevelSwapped('A0A6', GetSpellAbilityUnit()) + 1 ) )
endif
set udg_PNU[GetForLoopIndexA()] = GetLastCreatedUnit()
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", PolarProjectionBJ(udg_TempLoc, 1500.00, ( I2R(GetForLoopIndexA()) * 10.00 )) )
call RemoveLocation(udg_TempLoc)
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 5
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call TriggerExecute( gg_trg_Poison_Nova_effect )
call TriggerSleepAction( 0.40 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 36
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call RemoveUnit( udg_PNU[GetForLoopIndexB()] )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_Poison_Nova takes nothing returns nothing
set gg_trg_Poison_Nova = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Poison_Nova, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Poison_Nova, Condition( function Trig_Poison_Nova_Conditions ) )
call TriggerAddAction( gg_trg_Poison_Nova, function Trig_Poison_Nova_Actions )
endfunction
function Trig_eclipse_effect_Func001001003001001001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_eclipse_effect_Func001001003001001001002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A04R', GetFilterUnit()) != 1 )
endfunction
function Trig_eclipse_effect_Func001001003001001001 takes nothing returns boolean
return GetBooleanAnd( Trig_eclipse_effect_Func001001003001001001001(), Trig_eclipse_effect_Func001001003001001001002() )
endfunction
function Trig_eclipse_effect_Func001001003001001002 takes nothing returns boolean
return ( GetUnitUserData(GetFilterUnit()) < udg_EclipseLim )
endfunction
function Trig_eclipse_effect_Func001001003001001 takes nothing returns boolean
return GetBooleanAnd( Trig_eclipse_effect_Func001001003001001001(), Trig_eclipse_effect_Func001001003001001002() )
endfunction
function Trig_eclipse_effect_Func001001003001002 takes nothing returns boolean
return ( IsUnitDeadBJ(GetFilterUnit()) == false )
endfunction
function Trig_eclipse_effect_Func001001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_eclipse_effect_Func001001003001001(), Trig_eclipse_effect_Func001001003001002() )
endfunction
function Trig_eclipse_effect_Func001001003002001001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'o003' )
endfunction
function Trig_eclipse_effect_Func001001003002001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'e00C' )
endfunction
function Trig_eclipse_effect_Func001001003002001 takes nothing returns boolean
return GetBooleanAnd( Trig_eclipse_effect_Func001001003002001001(), Trig_eclipse_effect_Func001001003002001002() )
endfunction
function Trig_eclipse_effect_Func001001003002002 takes nothing returns boolean
return ( IsUnitAlly(GetFilterUnit(), GetOwningPlayer(udg_EclipseCaster)) == false )
endfunction
function Trig_eclipse_effect_Func001001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_eclipse_effect_Func001001003002001(), Trig_eclipse_effect_Func001001003002002() )
endfunction
function Trig_eclipse_effect_Func001001003 takes nothing returns boolean
return GetBooleanAnd( Trig_eclipse_effect_Func001001003001(), Trig_eclipse_effect_Func001001003002() )
endfunction
function Trig_eclipse_effect_Func001A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_EclipseGroup )
endfunction
function Trig_eclipse_effect_Func003C takes nothing returns boolean
if ( not ( IsUnitDeadBJ(udg_EclipseTarget) == true ) ) then
return false
endif
if ( not ( IsUnitGroupEmptyBJ(udg_EclipseGroup) == false ) ) then
return false
endif
return true
endfunction
function Trig_eclipse_effect_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRangeOfLocMatching(700.00, GetUnitLoc(udg_EclipseCaster), Condition(function Trig_eclipse_effect_Func001001003)), function Trig_eclipse_effect_Func001A )
set udg_EclipseTarget = GroupPickRandomUnit(udg_EclipseGroup)
if ( Trig_eclipse_effect_Func003C() ) then
call GroupRemoveUnitSimple( udg_EclipseTarget, udg_EclipseGroup )
call TriggerExecute( GetTriggeringTrigger() )
else
call DoNothing( )
endif
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(udg_EclipseCaster), GetUnitLoc(udg_EclipseTarget), bj_UNIT_FACING )
call UnitAddAbilityBJ( udg_EclipseBeam, GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "firebolt", udg_EclipseTarget )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitUserData( udg_EclipseTarget, ( GetUnitUserData(udg_EclipseTarget) + 1 ) )
call GroupClear( udg_EclipseGroup )
endfunction
//===========================================================================
function InitTrig_eclipse_effect takes nothing returns nothing
set gg_trg_eclipse_effect = CreateTrigger( )
call TriggerAddAction( gg_trg_eclipse_effect, function Trig_eclipse_effect_Actions )
endfunction
function Trig_Eclipse_Cast_Func002001 takes nothing returns boolean
return ( GetSpellAbilityId() == 'A054' )
endfunction
function Trig_Eclipse_Cast_Func002002 takes nothing returns boolean
return ( GetSpellAbilityId() == 'A00U' )
endfunction
function Trig_Eclipse_Cast_Conditions takes nothing returns boolean
if ( not GetBooleanOr( Trig_Eclipse_Cast_Func002001(), Trig_Eclipse_Cast_Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func001C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A054' ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func004C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A042', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func005C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A042', GetTriggerUnit()) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func006C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A042', GetTriggerUnit()) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func007C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A042', GetTriggerUnit()) == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func008Func003C takes nothing returns boolean
if ( ( GetUnitAbilityLevelSwapped('A054', GetTriggerUnit()) == 1 ) ) then
return true
endif
if ( ( GetUnitAbilityLevelSwapped('A00U', GetTriggerUnit()) == 1 ) ) then
return true
endif
return false
endfunction
function Trig_Eclipse_Cast_Func008C takes nothing returns boolean
if ( not Trig_Eclipse_Cast_Func008Func003C() ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func009Func002C takes nothing returns boolean
if ( ( GetUnitAbilityLevelSwapped('A054', GetTriggerUnit()) == 2 ) ) then
return true
endif
if ( ( GetUnitAbilityLevelSwapped('A00U', GetTriggerUnit()) == 2 ) ) then
return true
endif
return false
endfunction
function Trig_Eclipse_Cast_Func009C takes nothing returns boolean
if ( not Trig_Eclipse_Cast_Func009Func002C() ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func010Func002C takes nothing returns boolean
if ( ( GetUnitAbilityLevelSwapped('A054', GetTriggerUnit()) == 3 ) ) then
return true
endif
if ( ( GetUnitAbilityLevelSwapped('A00U', GetTriggerUnit()) == 3 ) ) then
return true
endif
return false
endfunction
function Trig_Eclipse_Cast_Func010C takes nothing returns boolean
if ( not Trig_Eclipse_Cast_Func010Func002C() ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func019C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00U' ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func020C takes nothing returns boolean
if ( not ( udg_EclipseLvl >= 2 ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func021Func006C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00U' ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func021C takes nothing returns boolean
if ( not ( udg_EclipseLvl >= 3 ) ) then
return false
endif
return true
endfunction
function Trig_Eclipse_Cast_Func022002 takes nothing returns nothing
call SetUnitUserData( GetEnumUnit(), 0 )
endfunction
function Trig_Eclipse_Cast_Actions takes nothing returns nothing
if ( Trig_Eclipse_Cast_Func001C() ) then
set udg_EclipseLim = 5
else
set udg_EclipseLim = 6
endif
set udg_EclipseCaster = GetTriggerUnit()
if ( Trig_Eclipse_Cast_Func004C() ) then
set udg_EclipseBeam = 'A05O'
else
call DoNothing( )
endif
if ( Trig_Eclipse_Cast_Func005C() ) then
set udg_EclipseBeam = 'A031'
else
call DoNothing( )
endif
if ( Trig_Eclipse_Cast_Func006C() ) then
set udg_EclipseBeam = 'A032'
else
call DoNothing( )
endif
if ( Trig_Eclipse_Cast_Func007C() ) then
set udg_EclipseBeam = 'A033'
else
call DoNothing( )
endif
if ( Trig_Eclipse_Cast_Func008C() ) then
set udg_EclipseLvl = 1
else
call DoNothing( )
endif
if ( Trig_Eclipse_Cast_Func009C() ) then
set udg_EclipseLvl = 2
else
call DoNothing( )
endif
if ( Trig_Eclipse_Cast_Func010C() ) then
set udg_EclipseLvl = 3
else
call DoNothing( )
endif
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
if ( Trig_Eclipse_Cast_Func019C() ) then
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
else
call DoNothing( )
endif
if ( Trig_Eclipse_Cast_Func020C() ) then
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
else
call DoNothing( )
endif
if ( Trig_Eclipse_Cast_Func021C() ) then
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
call TriggerExecute( gg_trg_eclipse_effect )
call TriggerSleepAction( 0.05 )
call TriggerExecute( gg_trg_eclipse_effect )
if ( Trig_Eclipse_Cast_Func021Func006C() ) then
call TriggerSleepAction( 0.05 )
call TriggerExecute( gg_trg_eclipse_effect )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
call ForGroupBJ( GetUnitsInRectAll(GetPlayableMapRect()), function Trig_Eclipse_Cast_Func022002 )
endfunction
//===========================================================================
function InitTrig_Eclipse_Cast takes nothing returns nothing
set gg_trg_Eclipse_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Eclipse_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Eclipse_Cast, Condition( function Trig_Eclipse_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Eclipse_Cast, function Trig_Eclipse_Cast_Actions )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003001001001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003001001002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A04R', GetFilterUnit()) != 1 )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003001001 takes nothing returns boolean
return GetBooleanAnd( Trig_chain_freezing_effect_Func012Func004001003001001001(), Trig_chain_freezing_effect_Func012Func004001003001001002() )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003001002 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), udg_ChainFrostPlayer) == true )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003001 takes nothing returns boolean
return GetBooleanAnd( Trig_chain_freezing_effect_Func012Func004001003001001(), Trig_chain_freezing_effect_Func012Func004001003001002() )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003002001001 takes nothing returns boolean
return ( GetFilterUnit() != udg_FrostTarget )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003002001002 takes nothing returns boolean
return ( IsUnitVisible(GetFilterUnit(), udg_ChainFrostPlayer) == true )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003002001 takes nothing returns boolean
return GetBooleanAnd( Trig_chain_freezing_effect_Func012Func004001003002001001(), Trig_chain_freezing_effect_Func012Func004001003002001002() )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003002002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003002002002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) != 'o003' )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003002002002002 takes nothing returns boolean
return ( IsUnitVisible(GetFilterUnit(), udg_ChainFrostPlayer) == true )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003002002002 takes nothing returns boolean
return GetBooleanAnd( Trig_chain_freezing_effect_Func012Func004001003002002002001(), Trig_chain_freezing_effect_Func012Func004001003002002002002() )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003002002 takes nothing returns boolean
return GetBooleanAnd( Trig_chain_freezing_effect_Func012Func004001003002002001(), Trig_chain_freezing_effect_Func012Func004001003002002002() )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_chain_freezing_effect_Func012Func004001003002001(), Trig_chain_freezing_effect_Func012Func004001003002002() )
endfunction
function Trig_chain_freezing_effect_Func012Func004001003 takes nothing returns boolean
return GetBooleanAnd( Trig_chain_freezing_effect_Func012Func004001003001(), Trig_chain_freezing_effect_Func012Func004001003002() )
endfunction
function Trig_chain_freezing_effect_Func012Func004A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_ChainFrostGroup )
endfunction
function Trig_chain_freezing_effect_Func012Func005C takes nothing returns boolean
if ( not ( IsUnitGroupEmptyBJ(udg_ChainFrostGroup) == false ) ) then
return false
endif
return true
endfunction
function Trig_chain_freezing_effect_Func012C takes nothing returns boolean
if ( not ( udg_ChainFreezingCounter < 7 ) ) then
return false
endif
return true
endfunction
function Trig_chain_freezing_effect_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_ChainFreezingCounter = ( udg_ChainFreezingCounter + 1 )
call CreateNUnitsAtLoc( 1, 'e00C', udg_ChainFrostPlayer, GetUnitLoc(udg_FrostTarget), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A091', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A091', GetLastCreatedUnit(), udg_CFLv )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "frostnova", udg_FrostTarget )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call UnitApplyTimedLifeBJ( 2.00, 'BTLF', GetLastCreatedUnit() )
call RemoveUnit( udg_ChainFreezingUnit )
if ( Trig_chain_freezing_effect_Func012C() ) then
call GroupClear( udg_ChainFrostGroup )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(600.00, GetUnitLoc(udg_FrostTarget), Condition(function Trig_chain_freezing_effect_Func012Func004001003)), function Trig_chain_freezing_effect_Func012Func004A )
if ( Trig_chain_freezing_effect_Func012Func005C() ) then
call CreateNUnitsAtLoc( 1, 'e009', udg_ChainFrostPlayer, GetUnitLoc(udg_FrostTarget), bj_UNIT_FACING )
set udg_ChainFreezingUnit = GetLastCreatedUnit()
set udg_FrostTarget = GroupPickRandomUnit(udg_ChainFrostGroup)
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", GetUnitLoc(udg_FrostTarget) )
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call PolledWait( ( ( DistanceBetweenPoints(GetUnitLoc(udg_ChainFreezingUnit), GetUnitLoc(udg_FrostTarget)) - 90.00 ) / 575.00 ) )
call TriggerExecute( GetTriggeringTrigger() )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_chain_freezing_effect takes nothing returns nothing
set gg_trg_chain_freezing_effect = CreateTrigger( )
call TriggerAddAction( gg_trg_chain_freezing_effect, function Trig_chain_freezing_effect_Actions )
endfunction
function Trig_Chain_Freezing_try_Func004C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A05T' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A08H' ) ) then
return true
endif
return false
endfunction
function Trig_Chain_Freezing_try_Conditions takes nothing returns boolean
if ( not Trig_Chain_Freezing_try_Func004C() ) then
return false
endif
return true
endfunction
function Trig_Chain_Freezing_try_Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A05T' ) ) then
return false
endif
return true
endfunction
function Trig_Chain_Freezing_try_Actions takes nothing returns nothing
set udg_ChainFrostPlayer = GetOwningPlayer(GetTriggerUnit())
set udg_ChainFreezingCounter = 0
if ( Trig_Chain_Freezing_try_Func003C() ) then
set udg_CFLv = GetUnitAbilityLevelSwapped('A05T', GetTriggerUnit())
else
set udg_CFLv = ( GetUnitAbilityLevelSwapped('A08H', GetTriggerUnit()) + 1 )
endif
set udg_FrostTarget = GetSpellTargetUnit()
call CreateNUnitsAtLoc( 1, 'e009', udg_ChainFrostPlayer, GetUnitLoc(GetSpellAbilityUnit()), bj_UNIT_FACING )
set udg_ChainFreezingUnit = GetLastCreatedUnit()
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", GetUnitLoc(udg_FrostTarget) )
call SetUnitPathing( GetLastCreatedUnit(), false )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call PolledWait( ( ( DistanceBetweenPoints(GetUnitLoc(udg_ChainFreezingUnit), GetUnitLoc(udg_FrostTarget)) - 90.00 ) / 575.00 ) )
call TriggerExecute( gg_trg_chain_freezing_effect )
endfunction
//===========================================================================
function InitTrig_Chain_Freezing_try takes nothing returns nothing
set gg_trg_Chain_Freezing_try = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Chain_Freezing_try, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Chain_Freezing_try, Condition( function Trig_Chain_Freezing_try_Conditions ) )
call TriggerAddAction( gg_trg_Chain_Freezing_try, function Trig_Chain_Freezing_try_Actions )
endfunction
function Trig_void_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02H' ) ) then
return false
endif
return true
endfunction
function Trig_void_Func001C takes nothing returns boolean
if ( not ( GetTimeOfDay() >= 6.00 ) ) then
return false
endif
if ( not ( GetTimeOfDay() <= 18.00 ) ) then
return false
endif
return true
endfunction
function Trig_void_Actions takes nothing returns nothing
if ( Trig_void_Func001C() ) then
call DoNothing( )
else
set udg_TempLoc = GetUnitLoc(GetSpellTargetUnit())
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A02R', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "slow", GetSpellTargetUnit() )
endif
endfunction
//===========================================================================
function InitTrig_void takes nothing returns nothing
set gg_trg_void = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_void, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_void, Condition( function Trig_void_Conditions ) )
call TriggerAddAction( gg_trg_void, function Trig_void_Actions )
endfunction
function Trig_chaos_bolt_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A055' ) ) then
return false
endif
return true
endfunction
function Trig_chaos_bolt_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), GetUnitLoc(GetSpellTargetUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A04U', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A04U', GetLastCreatedUnit(), GetRandomInt(1, 5) )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "thunderbolt", GetSpellTargetUnit() )
endfunction
//===========================================================================
function InitTrig_chaos_bolt takes nothing returns nothing
set gg_trg_chaos_bolt = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_chaos_bolt, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_chaos_bolt, Condition( function Trig_chaos_bolt_Conditions ) )
call TriggerAddAction( gg_trg_chaos_bolt, function Trig_chaos_bolt_Actions )
endfunction
function Trig_phantom_refresh_Func002001002001 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'U00B' )
endfunction
function Trig_phantom_refresh_Func002001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetTriggerPlayer() )
endfunction
function Trig_phantom_refresh_Func002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_phantom_refresh_Func002001002001(), Trig_phantom_refresh_Func002001002002() )
endfunction
function Trig_phantom_refresh_Func002A takes nothing returns nothing
call SetUnitVertexColorBJ( GetEnumUnit(), 100, 100, 100, ( 20.00 * I2R(GetUnitAbilityLevelSwapped('A03P', GetEnumUnit())) ) )
call CreateNUnitsAtLoc( 1, 'e00C', GetTriggerPlayer(), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 3.00, 'BTLF', GetLastCreatedUnit() )
call UnitAddAbilityBJ( 'A05Q', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "frostnova", GetEnumUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
endfunction
function Trig_phantom_refresh_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_phantom_refresh_Func002001002)), function Trig_phantom_refresh_Func002A )
endfunction
//===========================================================================
function InitTrig_phantom_refresh takes nothing returns nothing
set gg_trg_phantom_refresh = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(1), "-refresh", true )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(2), "-refresh", true )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(3), "-refresh", true )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(4), "-refresh", true )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(5), "-refresh", true )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(7), "-refresh", true )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(8), "-refresh", true )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(9), "-refresh", true )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(10), "-refresh", true )
call TriggerRegisterPlayerChatEvent( gg_trg_phantom_refresh, Player(11), "-refresh", true )
call TriggerAddAction( gg_trg_phantom_refresh, function Trig_phantom_refresh_Actions )
endfunction
function Trig_blur_learned_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A03P' ) ) then
return false
endif
return true
endfunction
function Trig_blur_learned_Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A03P', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_blur_learned_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A03P', GetTriggerUnit()) == 2 ) ) then
return false
endif
return true
endfunction
function Trig_blur_learned_Func003C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A03P', GetTriggerUnit()) == 3 ) ) then
return false
endif
return true
endfunction
function Trig_blur_learned_Func004C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A03P', GetTriggerUnit()) == 4 ) ) then
return false
endif
return true
endfunction
function Trig_blur_learned_Actions takes nothing returns nothing
if ( Trig_blur_learned_Func001C() ) then
call SetUnitVertexColorBJ( GetTriggerUnit(), 100, 100, 100, 40.00 )
else
call DoNothing( )
endif
if ( Trig_blur_learned_Func002C() ) then
call SetUnitVertexColorBJ( GetTriggerUnit(), 100, 100, 100, 60.00 )
else
call DoNothing( )
endif
if ( Trig_blur_learned_Func003C() ) then
call SetUnitVertexColorBJ( GetTriggerUnit(), 100, 100, 100, 80.00 )
else
call DoNothing( )
endif
if ( Trig_blur_learned_Func004C() ) then
call SetUnitVertexColorBJ( GetTriggerUnit(), 100, 100, 100, 99.00 )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_blur_learned takes nothing returns nothing
set gg_trg_blur_learned = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_blur_learned, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_blur_learned, Condition( function Trig_blur_learned_Conditions ) )
call TriggerAddAction( gg_trg_blur_learned, function Trig_blur_learned_Actions )
endfunction
function Trig_moonglaive_3_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A041' ) ) then
return false
endif
return true
endfunction
function Trig_moonglaive_3_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A041', GetTriggerUnit()) == 4 ) ) then
return false
endif
return true
endfunction
function Trig_moonglaive_3_Actions takes nothing returns nothing
call SetPlayerTechResearchedSwap( 'Remg', GetUnitAbilityLevelSwapped('A041', GetTriggerUnit()), GetOwningPlayer(GetLearningUnit()) )
if ( Trig_moonglaive_3_Func002C() ) then
call DestroyTrigger(GetTriggeringTrigger())
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_moonglaive_3 takes nothing returns nothing
set gg_trg_moonglaive_3 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_moonglaive_3, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_moonglaive_3, Condition( function Trig_moonglaive_3_Conditions ) )
call TriggerAddAction( gg_trg_moonglaive_3, function Trig_moonglaive_3_Actions )
endfunction
function Trig_take_aim_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A03U' ) ) then
return false
endif
return true
endfunction
function Trig_take_aim_Func002C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A03U', GetTriggerUnit()) == 4 ) ) then
return false
endif
return true
endfunction
function Trig_take_aim_Actions takes nothing returns nothing
call SetPlayerTechResearchedSwap( 'R005', GetUnitAbilityLevelSwapped('A03U', GetTriggerUnit()), GetOwningPlayer(GetLearningUnit()) )
if ( Trig_take_aim_Func002C() ) then
call DestroyTrigger(GetTriggeringTrigger())
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_take_aim takes nothing returns nothing
set gg_trg_take_aim = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_take_aim, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_take_aim, Condition( function Trig_take_aim_Conditions ) )
call TriggerAddAction( gg_trg_take_aim, function Trig_take_aim_Actions )
endfunction
function Trig_dragon_bug_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03G' ) ) then
return false
endif
return true
endfunction
function Trig_dragon_bug_Func005C takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_DragonUser) == true ) ) then
return false
endif
return true
endfunction
function Trig_dragon_bug_Actions takes nothing returns nothing
set udg_DragonUser = GetSpellAbilityUnit()
set udg_dragonskills = GetHeroSkillPoints(udg_DragonUser)
call ModifyHeroSkillPoints( udg_DragonUser, bj_MODIFYMETHOD_SET, 0 )
call PolledWait( 60.00 )
if ( Trig_dragon_bug_Func005C() ) then
call ModifyHeroSkillPoints( udg_DragonUser, bj_MODIFYMETHOD_SET, udg_dragonskills )
set udg_dragonskills = 0
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_dragon_bug takes nothing returns nothing
set gg_trg_dragon_bug = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_dragon_bug, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_dragon_bug, Condition( function Trig_dragon_bug_Conditions ) )
call TriggerAddAction( gg_trg_dragon_bug, function Trig_dragon_bug_Actions )
endfunction
function Trig_dragon_bug_2_Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00G' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00F' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00E' ) ) then
return true
endif
return false
endfunction
function Trig_dragon_bug_2_Conditions takes nothing returns boolean
if ( not Trig_dragon_bug_2_Func003C() ) then
return false
endif
return true
endfunction
function Trig_dragon_bug_2_Actions takes nothing returns nothing
set udg_dragonskills = ( udg_dragonskills + 1 )
call ModifyHeroSkillPoints( GetLevelingUnit(), bj_MODIFYMETHOD_SUB, 1 )
endfunction
//===========================================================================
function InitTrig_dragon_bug_2 takes nothing returns nothing
set gg_trg_dragon_bug_2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_dragon_bug_2, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddCondition( gg_trg_dragon_bug_2, Condition( function Trig_dragon_bug_2_Conditions ) )
call TriggerAddAction( gg_trg_dragon_bug_2, function Trig_dragon_bug_2_Actions )
endfunction
function Trig_dragon_bug_3_Func004C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00G' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00F' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00E' ) ) then
return true
endif
return false
endfunction
function Trig_dragon_bug_3_Conditions takes nothing returns boolean
if ( not Trig_dragon_bug_3_Func004C() ) then
return false
endif
return true
endfunction
function Trig_dragon_bug_3_Func001001 takes nothing returns boolean
return ( IsUnitAliveBJ(udg_DragonUser) == true )
endfunction
function Trig_dragon_bug_3_Actions takes nothing returns nothing
loop
exitwhen ( Trig_dragon_bug_3_Func001001() )
call TriggerSleepAction(RMaxBJ(bj_WAIT_FOR_COND_MIN_INTERVAL, 1))
endloop
call ModifyHeroSkillPoints( udg_DragonUser, bj_MODIFYMETHOD_SET, udg_dragonskills )
set udg_dragonskills = 0
endfunction
//===========================================================================
function InitTrig_dragon_bug_3 takes nothing returns nothing
set gg_trg_dragon_bug_3 = CreateTrigger( )
call DisableTrigger( gg_trg_dragon_bug_3 )
call TriggerRegisterAnyUnitEventBJ( gg_trg_dragon_bug_3, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_dragon_bug_3, Condition( function Trig_dragon_bug_3_Conditions ) )
call TriggerAddAction( gg_trg_dragon_bug_3, function Trig_dragon_bug_3_Actions )
endfunction
function Trig_Freezing_field_Cast_Func001C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A03R' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AV' ) ) then
return true
endif
return false
endfunction
function Trig_Freezing_field_Cast_Conditions takes nothing returns boolean
if ( not Trig_Freezing_field_Cast_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Freezing_field_Cast_Func003C takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03R' ) ) then
return false
endif
return true
endfunction
function Trig_Freezing_field_Cast_Actions takes nothing returns nothing
set udg_FFHero = GetTriggerUnit()
if ( Trig_Freezing_field_Cast_Func003C() ) then
set udg_FFLv = GetUnitAbilityLevelSwapped('A03R', GetTriggerUnit())
else
set udg_FFLv = ( GetUnitAbilityLevelSwapped('A0AV', GetTriggerUnit()) + 1 )
endif
call EnableTrigger( gg_trg_FreezingFieldSpawn2 )
endfunction
//===========================================================================
function InitTrig_Freezing_field_Cast takes nothing returns nothing
set gg_trg_Freezing_field_Cast = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Freezing_field_Cast, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
call TriggerAddCondition( gg_trg_Freezing_field_Cast, Condition( function Trig_Freezing_field_Cast_Conditions ) )
call TriggerAddAction( gg_trg_Freezing_field_Cast, function Trig_Freezing_field_Cast_Actions )
endfunction
function Trig_Freezing_field_end_Func002C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A03R' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0AV' ) ) then
return true
endif
return false
endfunction
function Trig_Freezing_field_end_Conditions takes nothing returns boolean
if ( not Trig_Freezing_field_end_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Freezing_field_end_Func004001003001 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_FFHero)) == false )
endfunction
function Trig_Freezing_field_end_Func004001003002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'e00C' )
endfunction
function Trig_Freezing_field_end_Func004001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Freezing_field_end_Func004001003001(), Trig_Freezing_field_end_Func004001003002() )
endfunction
function Trig_Freezing_field_end_Func004A takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_Freezing_field_end_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call DisableTrigger( gg_trg_FreezingFieldSpawn2 )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(1200.00, GetUnitLoc(udg_FFHero), Condition(function Trig_Freezing_field_end_Func004001003)), function Trig_Freezing_field_end_Func004A )
endfunction
//===========================================================================
function InitTrig_Freezing_field_end takes nothing returns nothing
set gg_trg_Freezing_field_end = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Freezing_field_end, EVENT_PLAYER_UNIT_SPELL_ENDCAST )
call TriggerAddCondition( gg_trg_Freezing_field_end, Condition( function Trig_Freezing_field_end_Conditions ) )
call TriggerAddAction( gg_trg_Freezing_field_end, function Trig_Freezing_field_end_Actions )
endfunction
function Trig_FreezingFieldSpawn2_Actions takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(udg_FFHero)
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(udg_FFHero), PolarProjectionBJ(GetUnitLoc(udg_FFHero), GetRandomReal(125.00, 635.00), GetRandomDirectionDeg()), bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A03X', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A03X', GetLastCreatedUnit(), udg_FFLv )
call SetUnitPathing( GetLastCreatedUnit(), false )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "frostnova", GetLastCreatedUnit() )
call UnitApplyTimedLifeBJ( 0.25, 'BTLF', GetLastCreatedUnit() )
endfunction
//===========================================================================
function InitTrig_FreezingFieldSpawn2 takes nothing returns nothing
set gg_trg_FreezingFieldSpawn2 = CreateTrigger( )
call DisableTrigger( gg_trg_FreezingFieldSpawn2 )
call TriggerRegisterTimerEventPeriodic( gg_trg_FreezingFieldSpawn2, 0.10 )
call TriggerAddAction( gg_trg_FreezingFieldSpawn2, function Trig_FreezingFieldSpawn2_Actions )
endfunction
function Trig_Morph_learned_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A040' ) ) then
return false
endif
return true
endfunction
function Trig_Morph_learned_Func001C takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A040', GetTriggerUnit()) == 1 ) ) then
return false
endif
return true
endfunction
function Trig_Morph_learned_Actions takes nothing returns nothing
if ( Trig_Morph_learned_Func001C() ) then
call UnitAddAbilityBJ( 'A048', GetTriggerUnit() )
else
call SetUnitAbilityLevelSwapped( 'A048', GetTriggerUnit(), GetUnitAbilityLevelSwapped('A040', GetTriggerUnit()) )
endif
endfunction
//===========================================================================
function InitTrig_Morph_learned takes nothing returns nothing
set gg_trg_Morph_learned = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Morph_learned, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_Morph_learned, Condition( function Trig_Morph_learned_Conditions ) )
call TriggerAddAction( gg_trg_Morph_learned, function Trig_Morph_learned_Actions )
endfunction
function Trig_morph_turn_on_Func004Func002C takes nothing returns boolean
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("blackarrowon") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("flamingarrows") ) ) then
return true
endif
return false
endfunction
function Trig_morph_turn_on_Func004C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'O00P' ) ) then
return false
endif
if ( not Trig_morph_turn_on_Func004Func002C() ) then
return false
endif
return true
endfunction
function Trig_morph_turn_on_Conditions takes nothing returns boolean
if ( not Trig_morph_turn_on_Func004C() ) then
return false
endif
return true
endfunction
function Trig_morph_turn_on_Func002C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("flamingarrows") ) ) then
return false
endif
return true
endfunction
function Trig_morph_turn_on_Func003C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("blackarrowon") ) ) then
return false
endif
return true
endfunction
function Trig_morph_turn_on_Actions takes nothing returns nothing
set udg_MorphlingHero = GetTriggerUnit()
if ( Trig_morph_turn_on_Func002C() ) then
call EnableTrigger( gg_trg_morph_str )
call DisableTrigger( gg_trg_morph_agl )
else
call DoNothing( )
endif
if ( Trig_morph_turn_on_Func003C() ) then
call EnableTrigger( gg_trg_morph_agl )
call DisableTrigger( gg_trg_morph_str )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_morph_turn_on takes nothing returns nothing
set gg_trg_morph_turn_on = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_morph_turn_on, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_morph_turn_on, Condition( function Trig_morph_turn_on_Conditions ) )
call TriggerAddAction( gg_trg_morph_turn_on, function Trig_morph_turn_on_Actions )
endfunction
function Trig_morph_turn_off_Func003Func002C takes nothing returns boolean
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("blackarrowoff") ) ) then
return true
endif
if ( ( GetIssuedOrderIdBJ() == String2OrderIdBJ("unflamingarrows") ) ) then
return true
endif
return false
endfunction
function Trig_morph_turn_off_Func003C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'O00P' ) ) then
return false
endif
if ( not Trig_morph_turn_off_Func003Func002C() ) then
return false
endif
return true
endfunction
function Trig_morph_turn_off_Conditions takes nothing returns boolean
if ( not Trig_morph_turn_off_Func003C() ) then
return false
endif
return true
endfunction
function Trig_morph_turn_off_Func001C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("unflamingarrows") ) ) then
return false
endif
return true
endfunction
function Trig_morph_turn_off_Func002C takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("blackarrowoff") ) ) then
return false
endif
return true
endfunction
function Trig_morph_turn_off_Actions takes nothing returns nothing
if ( Trig_morph_turn_off_Func001C() ) then
call DisableTrigger( gg_trg_morph_str )
else
call DoNothing( )
endif
if ( Trig_morph_turn_off_Func002C() ) then
call DisableTrigger( gg_trg_morph_agl )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_morph_turn_off takes nothing returns nothing
set gg_trg_morph_turn_off = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_morph_turn_off, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_morph_turn_off, Condition( function Trig_morph_turn_off_Conditions ) )
call TriggerAddAction( gg_trg_morph_turn_off, function Trig_morph_turn_off_Actions )
endfunction
function Trig_morph_str_Func001C takes nothing returns boolean
if ( not ( GetHeroStatBJ(bj_HEROSTAT_AGI, udg_MorphlingHero, false) > ( 2 * GetUnitAbilityLevelSwapped('A040', udg_MorphlingHero) ) ) ) then
return false
endif
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, udg_MorphlingHero) >= 10.00 ) ) then
return false
endif
return true
endfunction
function Trig_morph_str_Actions takes nothing returns nothing
if ( Trig_morph_str_Func001C() ) then
call SetUnitManaBJ( udg_MorphlingHero, ( GetUnitStateSwap(UNIT_STATE_MANA, udg_MorphlingHero) - 10.00 ) )
call ModifyHeroStat( bj_HEROSTAT_STR, udg_MorphlingHero, bj_MODIFYMETHOD_ADD, ( 2 * GetUnitAbilityLevelSwapped('A040', udg_MorphlingHero) ) )
call ModifyHeroStat( bj_HEROSTAT_AGI, udg_MorphlingHero, bj_MODIFYMETHOD_SUB, ( 2 * GetUnitAbilityLevelSwapped('A040', udg_MorphlingHero) ) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_morph_str takes nothing returns nothing
set gg_trg_morph_str = CreateTrigger( )
call DisableTrigger( gg_trg_morph_str )
call TriggerRegisterTimerEventPeriodic( gg_trg_morph_str, 1.00 )
call TriggerAddAction( gg_trg_morph_str, function Trig_morph_str_Actions )
endfunction
function Trig_morph_agl_Func001C takes nothing returns boolean
if ( not ( GetHeroStatBJ(bj_HEROSTAT_STR, udg_MorphlingHero, false) > ( 2 * GetUnitAbilityLevelSwapped('A040', udg_MorphlingHero) ) ) ) then
return false
endif
if ( not ( GetUnitStateSwap(UNIT_STATE_MANA, udg_MorphlingHero) >= 10.00 ) ) then
return false
endif
return true
endfunction
function Trig_morph_agl_Actions takes nothing returns nothing
if ( Trig_morph_agl_Func001C() ) then
call SetUnitManaBJ( udg_MorphlingHero, ( GetUnitStateSwap(UNIT_STATE_MANA, udg_MorphlingHero) - 10.00 ) )
call ModifyHeroStat( bj_HEROSTAT_STR, udg_MorphlingHero, bj_MODIFYMETHOD_SUB, ( 2 * GetUnitAbilityLevelSwapped('A040', udg_MorphlingHero) ) )
call ModifyHeroStat( bj_HEROSTAT_AGI, udg_MorphlingHero, bj_MODIFYMETHOD_ADD, ( 2 * GetUnitAbilityLevelSwapped('A040', udg_MorphlingHero) ) )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_morph_agl takes nothing returns nothing
set gg_trg_morph_agl = CreateTrigger( )
call DisableTrigger( gg_trg_morph_agl )
call TriggerRegisterTimerEventPeriodic( gg_trg_morph_agl, 1.00 )
call TriggerAddAction( gg_trg_morph_agl, function Trig_morph_agl_Actions )
endfunction
function Trig_morphling_attribute_Conditions takes nothing returns boolean
if ( not ( GetLearnedSkillBJ() == 'A04H' ) ) then
return false
endif
return true
endfunction
function Trig_morphling_attribute_Actions takes nothing returns nothing
call ModifyHeroStat( bj_HEROSTAT_STR, GetTriggerUnit(), bj_MODIFYMETHOD_ADD, 2 )
call ModifyHeroStat( bj_HEROSTAT_AGI, GetTriggerUnit(), bj_MODIFYMETHOD_ADD, 2 )
endfunction
//===========================================================================
function InitTrig_morphling_attribute takes nothing returns nothing
set gg_trg_morphling_attribute = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_morphling_attribute, EVENT_PLAYER_HERO_SKILL )
call TriggerAddCondition( gg_trg_morphling_attribute, Condition( function Trig_morphling_attribute_Conditions ) )
call TriggerAddAction( gg_trg_morphling_attribute, function Trig_morphling_attribute_Actions )
endfunction
function Trig_Copy_steal_Func006C takes nothing returns boolean
if ( not ( GetTriggerUnit() != udg_MorphlingCopyUnit ) ) then
return false
endif
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A02W' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIsw' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AEbl' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'ACr2' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0DR' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A03G' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0BG' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0A5' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0A7' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIrc' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A054' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A05Y' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A08L' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A092' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A090' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A08Z' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A08Y' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'Afod' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0AE' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0AD' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0AC' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0AB' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0AA' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0A9' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0AI' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AChx' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'ACrj' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIpg' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'ACch' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A017' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIil' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIxk' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A05Z' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIcy' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIdb' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0BE' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0AG' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AEvi' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A03R' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0AV' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A066' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIpl' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIsw' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A00G' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A06Q' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AEtq' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A07Y' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A06U' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A07C' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A06L' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A093' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AHfa' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'A0D8' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() != 'AIpr' ) ) then
return false
endif
if ( not ( DistanceBetweenPoints(GetUnitLoc(GetTriggerUnit()), GetUnitLoc(udg_MorphlingCopyUnit)) <= 800.00 ) ) then
return false
endif
return true
endfunction
function Trig_Copy_steal_Conditions takes nothing returns boolean
if ( not Trig_Copy_steal_Func006C() ) then
return false
endif
return true
endfunction
function Trig_Copy_steal_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( udg_MorphAbil, udg_MorphlingCopyUnit )
set udg_MorphAbil = GetSpellAbilityId()
call UnitAddAbilityBJ( udg_MorphAbil, udg_MorphlingCopyUnit )
call SetUnitAbilityLevelSwapped( udg_MorphAbil, udg_MorphlingCopyUnit, GetUnitAbilityLevelSwapped(udg_MorphAbil, GetTriggerUnit()) )
call DisableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Copy_steal takes nothing returns nothing
set gg_trg_Copy_steal = CreateTrigger( )
call DisableTrigger( gg_trg_Copy_steal )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Copy_steal, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Copy_steal, Condition( function Trig_Copy_steal_Conditions ) )
call TriggerAddAction( gg_trg_Copy_steal, function Trig_Copy_steal_Actions )
endfunction
function Trig_Copy_Activate_Conditions takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("manashieldon") ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetOrderedUnit()) == 'O00P' ) ) then
return false
endif
return true
endfunction
function Trig_Copy_Activate_Actions takes nothing returns nothing
set udg_MorphlingCopyUnit = GetOrderedUnit()
call EnableTrigger( gg_trg_Copy_steal )
endfunction
//===========================================================================
function InitTrig_Copy_Activate takes nothing returns nothing
set gg_trg_Copy_Activate = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Copy_Activate, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Copy_Activate, Condition( function Trig_Copy_Activate_Conditions ) )
call TriggerAddAction( gg_trg_Copy_Activate, function Trig_Copy_Activate_Actions )
endfunction
function Trig_Copy_Deactivate_Conditions takes nothing returns boolean
if ( not ( GetIssuedOrderIdBJ() == String2OrderIdBJ("manashieldoff") ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetOrderedUnit()) == 'O00P' ) ) then
return false
endif
return true
endfunction
function Trig_Copy_Deactivate_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Copy_steal )
endfunction
//===========================================================================
function InitTrig_Copy_Deactivate takes nothing returns nothing
set gg_trg_Copy_Deactivate = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Copy_Deactivate, EVENT_PLAYER_UNIT_ISSUED_ORDER )
call TriggerAddCondition( gg_trg_Copy_Deactivate, Condition( function Trig_Copy_Deactivate_Conditions ) )
call TriggerAddAction( gg_trg_Copy_Deactivate, function Trig_Copy_Deactivate_Actions )
endfunction
function Trig_Overpower_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetAttacker(), 'B02O') == true ) ) then
return false
endif
return true
endfunction
function Trig_Overpower_Func003C takes nothing returns boolean
if ( not ( udg_OPCount[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] >= 5 ) ) then
return false
endif
return true
endfunction
function Trig_Overpower_Actions takes nothing returns nothing
set udg_OPCount[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))] = 0
set udg_OPCount[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] = ( udg_OPCount[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] + 1 )
if ( Trig_Overpower_Func003C() ) then
call UnitRemoveBuffBJ( 'B02O', GetAttacker() )
set udg_OPCount[GetConvertedPlayerId(GetOwningPlayer(GetAttacker()))] = 0
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Overpower takes nothing returns nothing
set gg_trg_Overpower = CreateTrigger( )
call DisableTrigger( gg_trg_Overpower )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Overpower, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Overpower, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Overpower, Condition( function Trig_Overpower_Conditions ) )
call TriggerAddAction( gg_trg_Overpower, function Trig_Overpower_Actions )
endfunction
function Trig_Enrage_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetAttacker(), 'B02H') == true ) ) then
return false
endif
return true
endfunction
function Trig_Enrage_Actions takes nothing returns nothing
call UnitDamageTargetBJ( GetAttacker(), GetAttackedUnitBJ(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetAttacker()) * ( 0.02 + ( 0.02 * I2R(GetUnitAbilityLevelSwapped('A050', GetAttacker())) ) ) ), ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL )
endfunction
//===========================================================================
function InitTrig_Enrage takes nothing returns nothing
set gg_trg_Enrage = CreateTrigger( )
call DisableTrigger( gg_trg_Enrage )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enrage, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Enrage, Condition( function Trig_Enrage_Conditions ) )
call TriggerAddAction( gg_trg_Enrage, function Trig_Enrage_Actions )
endfunction
function Trig_Aftershock_Func008C takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A0DK' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DL' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A0DH' ) ) then
return true
endif
return false
endfunction
function Trig_Aftershock_Conditions takes nothing returns boolean
if ( not ( GetUnitAbilityLevelSwapped('A0DJ', GetSpellAbilityUnit()) > 0 ) ) then
return false
endif
if ( not Trig_Aftershock_Func008C() ) then
return false
endif
return true
endfunction
function Trig_Aftershock_Actions takes nothing returns nothing
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call RemoveLocation(udg_TempLoc)
call UnitAddAbilityBJ( 'A0DI', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A0DI', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0DJ', GetSpellAbilityUnit()) )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "stomp" )
endfunction
//===========================================================================
function InitTrig_Aftershock takes nothing returns nothing
set gg_trg_Aftershock = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Aftershock, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Aftershock, Condition( function Trig_Aftershock_Conditions ) )
call TriggerAddAction( gg_trg_Aftershock, function Trig_Aftershock_Actions )
endfunction
function Trig_Enchant_Totem_Conditions takes nothing returns boolean
if ( not ( UnitHasBuffBJ(GetAttacker(), 'Broa') == true ) ) then
return false
endif
return true
endfunction
function Trig_Enchant_Totem_Actions takes nothing returns nothing
call TriggerSleepAction( 0.35 )
call UnitRemoveBuffBJ( 'Broa', GetAttacker() )
endfunction
//===========================================================================
function InitTrig_Enchant_Totem takes nothing returns nothing
set gg_trg_Enchant_Totem = CreateTrigger( )
call DisableTrigger( gg_trg_Enchant_Totem )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Enchant_Totem, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Enchant_Totem, Condition( function Trig_Enchant_Totem_Conditions ) )
call TriggerAddAction( gg_trg_Enchant_Totem, function Trig_Enchant_Totem_Actions )
endfunction
function Trig_Echo_Slam_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DH' ) ) then
return false
endif
return true
endfunction
function Trig_Echo_Slam_Func003001003001 takes nothing returns boolean
return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true )
endfunction
function Trig_Echo_Slam_Func003001003002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction
function Trig_Echo_Slam_Func003001003002002 takes nothing returns boolean
return ( GetUnitAbilityLevelSwapped('A04R', GetFilterUnit()) != 1 )
endfunction
function Trig_Echo_Slam_Func003001003002 takes nothing returns boolean
return GetBooleanAnd( Trig_Echo_Slam_Func003001003002001(), Trig_Echo_Slam_Func003001003002002() )
endfunction
function Trig_Echo_Slam_Func003001003 takes nothing returns boolean
return GetBooleanAnd( Trig_Echo_Slam_Func003001003001(), Trig_Echo_Slam_Func003001003002() )
endfunction
function Trig_Echo_Slam_Func003A takes nothing returns nothing
call RemoveLocation(udg_TempLoc)
set udg_TempLoc = GetUnitLoc(GetEnumUnit())
call CreateNUnitsAtLoc( 1, 'e00E', GetOwningPlayer(GetTriggerUnit()), udg_TempLoc, bj_UNIT_FACING )
call SetUnitScalePercent( GetLastCreatedUnit(), 25.00, 25.00, 25.00 )
call UnitAddAbilityBJ( 'A0DM', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A0DM', GetLastCreatedUnit(), GetUnitAbilityLevelSwapped('A0DH', GetTriggerUnit()) )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "fanofknives" )
endfunction
function Trig_Echo_Slam_Actions takes nothing returns nothing
call TriggerSleepAction( 0.30 )
set udg_TempLoc = GetUnitLoc(GetTriggerUnit())
call ForGroupBJ( GetUnitsInRangeOfLocMatching(500.00, udg_TempLoc, Condition(function Trig_Echo_Slam_Func003001003)), function Trig_Echo_Slam_Func003A )
endfunction
//===========================================================================
function InitTrig_Echo_Slam takes nothing returns nothing
set gg_trg_Echo_Slam = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Echo_Slam, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Echo_Slam, Condition( function Trig_Echo_Slam_Conditions ) )
call TriggerAddAction( gg_trg_Echo_Slam, function Trig_Echo_Slam_Actions )
endfunction
function Trig_Fissure_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0DK' ) ) then
return false
endif
return true
endfunction
function GetTimerTrigger takes timer t, string s returns trigger
return GetHandleHandle(t,s)
endfunction
function Tree_Killer takes nothing returns nothing
if GetDestructableTypeId(GetEnumDestructable() )!= 'YTpb' then
call KillDestructable( GetEnumDestructable() )
endif
endfunction
function DestroyFissure takes nothing returns nothing
local unit f=bj_ghoul[0]
local destructable d=bj_lastCreatedDestructable
local real x=bj_randomSubGroupChance
local location p=bj_enumDestructableCenter
local boolean e=bj_makeUnitRescuableFlag
call TriggerSleepAction( 8.93 - (x*0.03))
call RemoveUnit(f)
call RemoveDestructable(d)
if e then
call TerrainDeformationCraterBJ( 0.05, true, p, 50.00, -150.00 )
endif
call RemoveLocation(p)
set p=null
set x=0
set f=null
set d=null
endfunction
function FissureMake takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit c=GetC(t,"c")
local location q=GetL(t,"q")
local real a=GetHandleReal(t,"a")
local real x=GetHandleReal(t,"x")
local location p=Location(GetLocationX(q)+(x*40*CosBJ(a)),GetLocationY(q)+(x*40*SinBJ(a)))
local boolean e=false
//call DestroyEffect(AddSpellEffectByIdLoc('A0DK', EFFECT_TYPE_CASTER, p) )
call DestroyEffect(AddSpellEffectByIdLoc('A0DK', EFFECT_TYPE_TARGET, p) )
call EnumDestructablesInCircleBJ( 150.00, p, function Tree_Killer )
set bj_ghoul[0]=CreateUnitAtLoc(Player(PLAYER_NEUTRAL_PASSIVE), 'e00H', p , GetRandomReal(0,360))
if GetRandomInt(1,5)==1 then
call TerrainDeformationCraterBJ( 0.05, true, p, 50.00, 150.00 )
set e=true
set bj_makeUnitRescuableFlag=e
else
set bj_makeUnitRescuableFlag=false
endif
set bj_lastCreatedDestructable=CreateDestructableLoc( 'YTpb', p, GetRandomDirectionDeg(), 1, 0 )
set bj_randomSubGroupChance=x
call TriggerExecute(GetTimerTrigger(t,"r"))
set bj_enumDestructableCenter=p
set p=null
set x=x+1
call SetHandleReal(t,"x",x)
set c=null
set a=0
if x>=32 then
call FlushHandleLocals(t)
call DestroyTimer(t)
call RemoveLocation(q)
endif
set q=null
set t=null
set x=0
endfunction
//call CreateNUnitsAtLoc( 1, 'e007', Player(PLAYER_NEUTRAL_PASSIVE), PolarProjectionBJ(udg_FissurePoint, ( 40.00 * I2R(udg_FissureTicker) ), udg_FissureFacing), ( udg_FissureFacing + GetRandomReal(-90.00, 90.00) ) )
function Trig_Fissure_Actions takes nothing returns nothing
local unit c=GetTriggerUnit()
local timer t=CreateTimer()
local location l=GetSpellTargetLoc()
local real a=Angle2Points(GetUnitX(c),GetUnitY(c),GetLocationX(l),GetLocationY(l))
local real x=1
local location q=GetUnitLoc(c)
local trigger r=CreateTrigger()
call SetHandleHandle(t,"c",c)
call SetHandleReal(t,"a",a)
call SetHandleReal(t,"x",x)
call SetHandleHandle(t,"q",q)
call TriggerAddAction(r,function DestroyFissure)
call SetHandleHandle(t,"r",r)
call TimerStart(t,0.03,true,function FissureMake)
call RemoveLocation(l)
set l=null
set q=null
set a=0
set x=0
set c=null
set t=null
call TriggerSleepAction(11)
call DestroyTrigger(r)
set r=null
endfunction
//===========================================================================
function InitTrig_Fissure takes nothing returns nothing
set gg_trg_Fissure = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Fissure, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Fissure, Condition( function Trig_Fissure_Conditions ) )
call TriggerAddAction( gg_trg_Fissure, function Trig_Fissure_Actions )
endfunction
function Trig_timer2_Actions takes nothing returns nothing
set udg_KillInt[2] = 0
endfunction
//===========================================================================
function InitTrig_timer2 takes nothing returns nothing
set gg_trg_timer2 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer2, udg_KillTimer[2] )
call TriggerAddAction( gg_trg_timer2, function Trig_timer2_Actions )
endfunction
function Trig_timer3_Actions takes nothing returns nothing
set udg_KillInt[3] = 0
endfunction
//===========================================================================
function InitTrig_timer3 takes nothing returns nothing
set gg_trg_timer3 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer3, udg_KillTimer[3] )
call TriggerAddAction( gg_trg_timer3, function Trig_timer3_Actions )
endfunction
function Trig_timer4_Actions takes nothing returns nothing
set udg_KillInt[4] = 0
endfunction
//===========================================================================
function InitTrig_timer4 takes nothing returns nothing
set gg_trg_timer4 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer4, udg_KillTimer[4] )
call TriggerAddAction( gg_trg_timer4, function Trig_timer4_Actions )
endfunction
function Trig_timer5_Actions takes nothing returns nothing
set udg_KillInt[5] = 0
endfunction
//===========================================================================
function InitTrig_timer5 takes nothing returns nothing
set gg_trg_timer5 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer5, udg_KillTimer[5] )
call TriggerAddAction( gg_trg_timer5, function Trig_timer5_Actions )
endfunction
function Trig_timer6_Actions takes nothing returns nothing
set udg_KillInt[6] = 0
endfunction
//===========================================================================
function InitTrig_timer6 takes nothing returns nothing
set gg_trg_timer6 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer6, udg_KillTimer[6] )
call TriggerAddAction( gg_trg_timer6, function Trig_timer6_Actions )
endfunction
function Trig_timer8_Actions takes nothing returns nothing
set udg_KillInt[8] = 0
endfunction
//===========================================================================
function InitTrig_timer8 takes nothing returns nothing
set gg_trg_timer8 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer8, udg_KillTimer[8] )
call TriggerAddAction( gg_trg_timer8, function Trig_timer8_Actions )
endfunction
function Trig_timer9_Actions takes nothing returns nothing
set udg_KillInt[9] = 0
endfunction
//===========================================================================
function InitTrig_timer9 takes nothing returns nothing
set gg_trg_timer9 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer9, udg_KillTimer[9] )
call TriggerAddAction( gg_trg_timer9, function Trig_timer9_Actions )
endfunction
function Trig_timer10_Actions takes nothing returns nothing
set udg_KillInt[10] = 0
endfunction
//===========================================================================
function InitTrig_timer10 takes nothing returns nothing
set gg_trg_timer10 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer10, udg_KillTimer[10] )
call TriggerAddAction( gg_trg_timer10, function Trig_timer10_Actions )
endfunction
function Trig_timer11_Actions takes nothing returns nothing
set udg_KillInt[11] = 0
endfunction
//===========================================================================
function InitTrig_timer11 takes nothing returns nothing
set gg_trg_timer11 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer11, udg_KillTimer[11] )
call TriggerAddAction( gg_trg_timer11, function Trig_timer11_Actions )
endfunction
function Trig_timer12_Actions takes nothing returns nothing
set udg_KillInt[12] = 0
endfunction
//===========================================================================
function InitTrig_timer12 takes nothing returns nothing
set gg_trg_timer12 = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_timer12, udg_KillTimer[12] )
call TriggerAddAction( gg_trg_timer12, function Trig_timer12_Actions )
endfunction
function Trig_Suicide_death_Conditions takes nothing returns boolean
if ( not ( IsUnitInGroup(GetTriggerUnit(), udg_UnitsDNP) == false ) ) then
return false
endif
if ( not ( GetSpellAbilityId() == 'A06B' ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func006C takes nothing returns boolean
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func009C takes nothing returns boolean
if ( not ( udg_Killsinarow[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 3 ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func010C takes nothing returns boolean
if ( not ( udg_Killsinarow[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 4 ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func011C takes nothing returns boolean
if ( not ( udg_Killsinarow[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 5 ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func012C takes nothing returns boolean
if ( not ( udg_Killsinarow[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 6 ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func013C takes nothing returns boolean
if ( not ( udg_Killsinarow[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 7 ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func014C takes nothing returns boolean
if ( not ( udg_Killsinarow[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit()))] == 8 ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func015C takes nothing returns boolean
if ( not ( udg_Killsinarow[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] == 9 ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func016C takes nothing returns boolean
if ( not ( udg_Killsinarow[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] > 9 ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Func020C takes nothing returns boolean
if ( not ( udg_TeamOwnage[1] > 4 ) ) then
return false
endif
return true
endfunction
function Trig_Suicide_death_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + ( GetPlayerName(GetOwningPlayer(GetTriggerUnit())) + ( "|r just killed himself!" + " " ) ) ) )
if ( Trig_Suicide_death_Func006C() ) then
set udg_LBDeaths[1] = ( udg_LBDeaths[1] + 1 )
set udg_LBKills[7] = ( udg_LBKills[7] + 1 )
else
set udg_LBDeaths[7] = ( udg_LBDeaths[7] + 1 )
set udg_LBKills[1] = ( udg_LBKills[1] + 1 )
endif
set udg_LBDeaths[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_LBDeaths[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
call ConditionalTriggerExecute( gg_trg_update_leaderboard_kills )
if ( Trig_Suicide_death_Func009C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "|r's |c0000ff40killing spree|r has been ended!" ) )
else
call DoNothing( )
endif
if ( Trig_Suicide_death_Func010C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "|r's |c00400080dominating|r streak has been ended!" ) )
else
call DoNothing( )
endif
if ( Trig_Suicide_death_Func011C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "|r's |c00ff0080mega kill|r has been ended!" ) )
else
call DoNothing( )
endif
if ( Trig_Suicide_death_Func012C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "|r's |c00ff8000unstoppable|r streak has been ended!" ) )
else
call DoNothing( )
endif
if ( Trig_Suicide_death_Func013C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "|r's |c00808000wicked sick|r streak has been ended!" ) )
else
call DoNothing( )
endif
if ( Trig_Suicide_death_Func014C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "|r's |c00ff80ffmonster kill|r has been ended!" ) )
else
call DoNothing( )
endif
if ( Trig_Suicide_death_Func015C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "|r's |c00ff0000is GODLIKE|r streak has been ended!" ) )
else
call DoNothing( )
endif
if ( Trig_Suicide_death_Func016C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + GetPlayerName(GetOwningPlayer(GetTriggerUnit())) ) + "|r's |c00ff8000beyond GODLIKE streak|r has been ended!" ) )
else
call DoNothing( )
endif
set udg_TeamOwnage[2] = 0
set udg_TeamOwnage[1] = ( udg_TeamOwnage[1] + 1 )
set udg_Killsinarow[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = 0
if ( Trig_Suicide_death_Func020C() ) then
call PolledWait( 1.50 )
call PlaySoundBJ( gg_snd_Ownage )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8806" )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Suicide_death takes nothing returns nothing
set gg_trg_Suicide_death = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Suicide_death, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Suicide_death, Condition( function Trig_Suicide_death_Conditions ) )
call TriggerAddAction( gg_trg_Suicide_death, function Trig_Suicide_death_Actions )
endfunction
function Trig_Flag_mana_Func002001 takes nothing returns boolean
return ( GetItemTypeId(GetManipulatedItem()) == 'uflg' )
endfunction
function Trig_Flag_mana_Func002002 takes nothing returns boolean
return ( GetItemTypeId(GetManipulatedItem()) == 'nflg' )
endfunction
function Trig_Flag_mana_Conditions takes nothing returns boolean
if ( not GetBooleanOr( Trig_Flag_mana_Func002001(), Trig_Flag_mana_Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_Flag_mana_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_Mana )
endfunction
//===========================================================================
function InitTrig_Flag_mana takes nothing returns nothing
set gg_trg_Flag_mana = CreateTrigger( )
call DisableTrigger( gg_trg_Flag_mana )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Flag_mana, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Flag_mana, Condition( function Trig_Flag_mana_Conditions ) )
call TriggerAddAction( gg_trg_Flag_mana, function Trig_Flag_mana_Actions )
endfunction
function Trig_Mana_Func003001002001 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(GetFilterUnit(), 'uflg') == true )
endfunction
function Trig_Mana_Func003001002002 takes nothing returns boolean
return ( UnitHasItemOfTypeBJ(GetFilterUnit(), 'nflg') == true )
endfunction
function Trig_Mana_Func003001002 takes nothing returns boolean
return GetBooleanOr( Trig_Mana_Func003001002001(), Trig_Mana_Func003001002002() )
endfunction
function Trig_Mana_Func003A takes nothing returns nothing
call SetUnitManaBJ( GetEnumUnit(), 0 )
set udg_FlagTaken = true
call CreateNUnitsAtLoc( 1, 'e00C', ForcePickRandomPlayer(GetPlayersEnemies(GetOwningPlayer(GetEnumUnit()))), GetUnitLoc(GetEnumUnit()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'AOfs', GetLastCreatedUnit() )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "farsight", GetUnitLoc(GetEnumUnit()) )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
call PingMinimapLocForForceEx( GetPlayersEnemies(GetOwningPlayer(GetEnumUnit())), GetUnitLoc(GetEnumUnit()), 1, bj_MINIMAPPINGSTYLE_ATTACK, 100, 100, 100 )
call PingMinimapLocForForceEx( GetPlayersAllies(GetOwningPlayer(GetEnumUnit())), GetUnitLoc(GetEnumUnit()), 1, bj_MINIMAPPINGSTYLE_SIMPLE, 0.00, 100, 0.00 )
endfunction
function Trig_Mana_Func004C takes nothing returns boolean
if ( not ( udg_FlagTaken == false ) ) then
return false
endif
return true
endfunction
function Trig_Mana_Actions takes nothing returns nothing
set udg_FlagTaken = false
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Mana_Func003001002)), function Trig_Mana_Func003A )
if ( Trig_Mana_Func004C() ) then
call DisableTrigger( GetTriggeringTrigger() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Mana takes nothing returns nothing
set gg_trg_Mana = CreateTrigger( )
call DisableTrigger( gg_trg_Mana )
call TriggerRegisterTimerEventPeriodic( gg_trg_Mana, 2.00 )
call TriggerAddAction( gg_trg_Mana, function Trig_Mana_Actions )
endfunction
function Trig_NEFlag_Returned_Conditions takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'nflg') == true ) ) then
return false
endif
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_NEFlag_Returned_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 13.00, "TRIGSTR_8807" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'nflg') )
call CreateItemLoc( 'nflg', GetRectCenter(gg_rct_FlagSent) )
endfunction
//===========================================================================
function InitTrig_NEFlag_Returned takes nothing returns nothing
set gg_trg_NEFlag_Returned = CreateTrigger( )
call DisableTrigger( gg_trg_NEFlag_Returned )
call TriggerRegisterEnterRectSimple( gg_trg_NEFlag_Returned, gg_rct_FlagSent )
call TriggerAddCondition( gg_trg_NEFlag_Returned, Condition( function Trig_NEFlag_Returned_Conditions ) )
call TriggerAddAction( gg_trg_NEFlag_Returned, function Trig_NEFlag_Returned_Actions )
endfunction
function Trig_UDFlag_Returned_Conditions takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'uflg') == true ) ) then
return false
endif
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(6)) == true ) ) then
return false
endif
return true
endfunction
function Trig_UDFlag_Returned_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 13.00, "TRIGSTR_8808" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'uflg') )
call CreateItemLoc( 'uflg', GetRectCenter(gg_rct_FlagScourge) )
endfunction
//===========================================================================
function InitTrig_UDFlag_Returned takes nothing returns nothing
set gg_trg_UDFlag_Returned = CreateTrigger( )
call DisableTrigger( gg_trg_UDFlag_Returned )
call TriggerRegisterEnterRectSimple( gg_trg_UDFlag_Returned, gg_rct_FlagScourge )
call TriggerAddCondition( gg_trg_UDFlag_Returned, Condition( function Trig_UDFlag_Returned_Conditions ) )
call TriggerAddAction( gg_trg_UDFlag_Returned, function Trig_UDFlag_Returned_Actions )
endfunction
function Trig_NEFlag_Forbidden_Conditions takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_FlagSentBig, GetTriggerUnit()) == true ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'nflg' ) ) then
return false
endif
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_NEFlag_Forbidden_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call CreateItemLoc( 'nflg', GetRectCenter(gg_rct_FlagSent) )
endfunction
//===========================================================================
function InitTrig_NEFlag_Forbidden takes nothing returns nothing
set gg_trg_NEFlag_Forbidden = CreateTrigger( )
call DisableTrigger( gg_trg_NEFlag_Forbidden )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NEFlag_Forbidden, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_NEFlag_Forbidden, Condition( function Trig_NEFlag_Forbidden_Conditions ) )
call TriggerAddAction( gg_trg_NEFlag_Forbidden, function Trig_NEFlag_Forbidden_Actions )
endfunction
function Trig_UDFlag_Forbidden_Conditions takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_FlagScourgeBig, GetTriggerUnit()) == true ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'uflg' ) ) then
return false
endif
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(6)) == true ) ) then
return false
endif
return true
endfunction
function Trig_UDFlag_Forbidden_Actions takes nothing returns nothing
call RemoveItem( GetManipulatedItem() )
call CreateItemLoc( 'uflg', GetRectCenter(gg_rct_FlagScourge) )
endfunction
//===========================================================================
function InitTrig_UDFlag_Forbidden takes nothing returns nothing
set gg_trg_UDFlag_Forbidden = CreateTrigger( )
call DisableTrigger( gg_trg_UDFlag_Forbidden )
call TriggerRegisterAnyUnitEventBJ( gg_trg_UDFlag_Forbidden, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_UDFlag_Forbidden, Condition( function Trig_UDFlag_Forbidden_Conditions ) )
call TriggerAddAction( gg_trg_UDFlag_Forbidden, function Trig_UDFlag_Forbidden_Actions )
endfunction
function Trig_NEScore_Conditions takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'uflg') == true ) ) then
return false
endif
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_NEScore_Func003Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetEnumItem()) == 'nflg' ) ) then
return false
endif
return true
endfunction
function Trig_NEScore_Func003A takes nothing returns nothing
if ( Trig_NEScore_Func003Func001C() ) then
set udg_FlagTaken = false
else
call DoNothing( )
endif
endfunction
function Trig_NEScore_Func004Func006C takes nothing returns boolean
if ( not ( udg_CTFScore[1] == 5 ) ) then
return false
endif
return true
endfunction
function Trig_NEScore_Func004C takes nothing returns boolean
if ( not ( udg_FlagTaken == false ) ) then
return false
endif
return true
endfunction
function Trig_NEScore_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_FlagTaken = true
call EnumItemsInRectBJ( gg_rct_FlagSent, function Trig_NEScore_Func003A )
if ( Trig_NEScore_Func004C() ) then
set udg_CTFScore[1] = ( udg_CTFScore[1] + 1 )
call DisplayTimedTextToForce( GetPlayersAll(), 15.00, "TRIGSTR_8810" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'uflg') )
call CreateItemLoc( 'uflg', GetRectCenter(gg_rct_FlagScourge) )
if ( Trig_NEScore_Func004Func006C() ) then
call TriggerExecute( gg_trg_Sent_Win )
else
call DoNothing( )
endif
else
call DisplayTimedTextToForce( GetPlayersAllies(Player(0)), 15.00, "TRIGSTR_8809" )
endif
endfunction
//===========================================================================
function InitTrig_NEScore takes nothing returns nothing
set gg_trg_NEScore = CreateTrigger( )
call DisableTrigger( gg_trg_NEScore )
call TriggerRegisterEnterRectSimple( gg_trg_NEScore, gg_rct_FlagSent )
call TriggerAddCondition( gg_trg_NEScore, Condition( function Trig_NEScore_Conditions ) )
call TriggerAddAction( gg_trg_NEScore, function Trig_NEScore_Actions )
endfunction
function Trig_UDScore_Conditions takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'nflg') == true ) ) then
return false
endif
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(6)) == true ) ) then
return false
endif
return true
endfunction
function Trig_UDScore_Func003Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetEnumItem()) == 'uflg' ) ) then
return false
endif
return true
endfunction
function Trig_UDScore_Func003A takes nothing returns nothing
if ( Trig_UDScore_Func003Func001C() ) then
set udg_FlagTaken = false
else
call DoNothing( )
endif
endfunction
function Trig_UDScore_Func004Func006C takes nothing returns boolean
if ( not ( udg_CTFScore[2] == 5 ) ) then
return false
endif
return true
endfunction
function Trig_UDScore_Func004C takes nothing returns boolean
if ( not ( udg_FlagTaken == false ) ) then
return false
endif
return true
endfunction
function Trig_UDScore_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_FlagTaken = true
call EnumItemsInRectBJ( gg_rct_FlagScourge, function Trig_UDScore_Func003A )
if ( Trig_UDScore_Func004C() ) then
set udg_CTFScore[2] = ( udg_CTFScore[2] + 1 )
call DisplayTimedTextToForce( GetPlayersAll(), 15.00, "TRIGSTR_8812" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'nflg') )
call CreateItemLoc( 'nflg', GetRectCenter(gg_rct_FlagSent) )
if ( Trig_UDScore_Func004Func006C() ) then
call TriggerExecute( gg_trg_Scourge_Win )
else
call DoNothing( )
endif
else
call DisplayTimedTextToForce( GetPlayersAllies(Player(6)), 15.00, "TRIGSTR_8811" )
endif
endfunction
//===========================================================================
function InitTrig_UDScore takes nothing returns nothing
set gg_trg_UDScore = CreateTrigger( )
call DisableTrigger( gg_trg_UDScore )
call TriggerRegisterEnterRectSimple( gg_trg_UDScore, gg_rct_FlagScourge )
call TriggerAddCondition( gg_trg_UDScore, Condition( function Trig_UDScore_Conditions ) )
call TriggerAddAction( gg_trg_UDScore, function Trig_UDScore_Actions )
endfunction
function Trig_PingReturnNE_Conditions takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_FlagSentBig, GetTriggerUnit()) == false ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'nflg' ) ) then
return false
endif
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_PingReturnNE_Actions takes nothing returns nothing
call PingMinimapLocForForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), GetRectCenter(gg_rct_FlagSent), 1 )
call DisplayTimedTextToForce( GetPlayersAllies(Player(0)), 15.00, "TRIGSTR_8813" )
endfunction
//===========================================================================
function InitTrig_PingReturnNE takes nothing returns nothing
set gg_trg_PingReturnNE = CreateTrigger( )
call DisableTrigger( gg_trg_PingReturnNE )
call TriggerRegisterAnyUnitEventBJ( gg_trg_PingReturnNE, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_PingReturnNE, Condition( function Trig_PingReturnNE_Conditions ) )
call TriggerAddAction( gg_trg_PingReturnNE, function Trig_PingReturnNE_Actions )
endfunction
function Trig_PingReturnUD_Conditions takes nothing returns boolean
if ( not ( RectContainsUnit(gg_rct_FlagScourgeBig, GetTriggerUnit()) == false ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'uflg' ) ) then
return false
endif
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(6)) == true ) ) then
return false
endif
return true
endfunction
function Trig_PingReturnUD_Actions takes nothing returns nothing
call PingMinimapLocForForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), GetRectCenter(gg_rct_FlagScourge), 1 )
call DisplayTimedTextToForce( GetPlayersAllies(Player(6)), 15.00, "TRIGSTR_8814" )
endfunction
//===========================================================================
function InitTrig_PingReturnUD takes nothing returns nothing
set gg_trg_PingReturnUD = CreateTrigger( )
call DisableTrigger( gg_trg_PingReturnUD )
call TriggerRegisterAnyUnitEventBJ( gg_trg_PingReturnUD, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_PingReturnUD, Condition( function Trig_PingReturnUD_Conditions ) )
call TriggerAddAction( gg_trg_PingReturnUD, function Trig_PingReturnUD_Actions )
endfunction
function Trig_CTFv_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_CTFv_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8815" )
call RemoveUnit( gg_unit_etol_0039 )
call RemoveUnit( gg_unit_e011_0040 )
call RemoveUnit( gg_unit_e011_0041 )
call RemoveUnit( gg_unit_u00D_0082 )
call RemoveUnit( gg_unit_unpl_0080 )
call RemoveUnit( gg_unit_u00D_0081 )
call CreateNUnitsAtLoc( 1, 'ncop', Player(0), GetRectCenter(gg_rct_CTF1), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncop', Player(0), GetRectCenter(gg_rct_CTF2), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncop', Player(0), GetRectCenter(gg_rct_CTF3), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncop', Player(6), GetRectCenter(gg_rct_CTF4), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncop', Player(6), GetRectCenter(gg_rct_CTF5), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncop', Player(6), GetRectCenter(gg_rct_CTF6), bj_UNIT_FACING )
call CreateItemLoc( 'nflg', GetRectCenter(gg_rct_FlagSent) )
call CreateItemLoc( 'uflg', GetRectCenter(gg_rct_FlagScourge) )
call DestroyTrigger(gg_trg_TR)
call DestroyTrigger(gg_trg_AR)
call DestroyTrigger(gg_trg_RV1)
call DestroyTrigger(gg_trg_RV2)
call DestroyTrigger(gg_trg_DEv)
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 15, ( udg_Colors[1] + ( "Flags Captured" + "|r" ) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 16, ( udg_Colors[7] + ( "Flags Captured" + "|r" ) ) )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Capture the Flag" + udg_VersionString ) )
call DisableTrigger( gg_trg_update_leaderboard_always )
call EnableTrigger( gg_trg_update_leaderboard_CTF )
call DisableTrigger( gg_trg_Sent_Win )
call DisableTrigger( gg_trg_Scourge_Win )
call EnableTrigger( gg_trg_Flag_mana )
call EnableTrigger( gg_trg_NEFlag_Forbidden )
call EnableTrigger( gg_trg_NEFlag_Returned )
call EnableTrigger( gg_trg_NEScore )
call EnableTrigger( gg_trg_UDFlag_Forbidden )
call EnableTrigger( gg_trg_UDFlag_Returned )
call EnableTrigger( gg_trg_UDScore )
call EnableTrigger( gg_trg_PingReturnNE )
call EnableTrigger( gg_trg_PingReturnUD )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_CTFv takes nothing returns nothing
set gg_trg_CTFv = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_CTFv, Player(1), "-capturetheflag", true )
call TriggerRegisterPlayerChatEvent( gg_trg_CTFv, Player(1), "-ctf", true )
call TriggerAddCondition( gg_trg_CTFv, Condition( function Trig_CTFv_Conditions ) )
call TriggerAddAction( gg_trg_CTFv, function Trig_CTFv_Actions )
endfunction
function Trig_IDv_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_IDv_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8816" )
set udg_ItemDrop = true
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_IDv takes nothing returns nothing
set gg_trg_IDv = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_IDv, Player(1), "-itemdrops", true )
call TriggerRegisterPlayerChatEvent( gg_trg_IDv, Player(1), "-id", true )
call TriggerAddCondition( gg_trg_IDv, Condition( function Trig_IDv_Conditions ) )
call TriggerAddAction( gg_trg_IDv, function Trig_IDv_Actions )
endfunction
function Trig_SCv_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_SCv_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8817" )
call EnableTrigger( gg_trg_SpawnGolemFish )
call EnableTrigger( gg_trg_SpawnHydra )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_SCv takes nothing returns nothing
set gg_trg_SCv = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_SCv, Player(1), "-supercreeps", true )
call TriggerRegisterPlayerChatEvent( gg_trg_SCv, Player(1), "-sc", true )
call TriggerAddCondition( gg_trg_SCv, Condition( function Trig_SCv_Conditions ) )
call TriggerAddAction( gg_trg_SCv, function Trig_SCv_Actions )
endfunction
function Trig_DEv_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_DEv_Func008C takes nothing returns boolean
if ( not ( udg_AROn == true ) ) then
return false
endif
return true
endfunction
function Trig_DEv_Func009C takes nothing returns boolean
if ( not ( udg_TROn == true ) ) then
return false
endif
return true
endfunction
function Trig_DEv_Func010C takes nothing returns boolean
if ( not ( udg_APOn == true ) ) then
return false
endif
return true
endfunction
function Trig_DEv_Func011C takes nothing returns boolean
if ( not ( udg_TROn == false ) ) then
return false
endif
if ( not ( udg_AROn == false ) ) then
return false
endif
return true
endfunction
function Trig_DEv_Actions takes nothing returns nothing
call DestroyTrigger(gg_trg_RV1)
call DestroyTrigger(gg_trg_RV2)
call DestroyTrigger(gg_trg_MMv)
call DestroyTrigger(gg_trg_DMv)
call DestroyTrigger(gg_trg_RepS)
call DestroyTrigger(gg_trg_RepUD)
set udg_DMBool = true
if ( Trig_DEv_Func008C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8818" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Allrandom Deathmatch" + udg_VersionString ) )
call DestroyTrigger(gg_trg_TR)
call DestroyTrigger(gg_trg_APv)
else
call DoNothing( )
endif
if ( Trig_DEv_Func009C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8819" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Teamrandom Deathmatch" + udg_VersionString ) )
call DestroyTrigger(gg_trg_AR)
call DestroyTrigger(gg_trg_APv)
else
call DoNothing( )
endif
if ( Trig_DEv_Func010C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8820" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Allpick Deathmatch" + udg_VersionString ) )
call DestroyTrigger(gg_trg_AR)
call DestroyTrigger(gg_trg_TR)
else
call DoNothing( )
endif
if ( Trig_DEv_Func011C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8821" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Deathmatch" + udg_VersionString ) )
else
call DoNothing( )
endif
call DestroyTrigger(gg_trg_entry)
call EnableTrigger( gg_trg_entryDE )
call EnableTrigger( gg_trg_ScouD_DE8 )
call EnableTrigger( gg_trg_ScouD_DE9 )
call EnableTrigger( gg_trg_ScouD_DE10 )
call EnableTrigger( gg_trg_ScouD_DE11 )
call EnableTrigger( gg_trg_ScouD_DE12 )
call EnableTrigger( gg_trg_SentD_DE2 )
call EnableTrigger( gg_trg_SentD_DE3 )
call EnableTrigger( gg_trg_SentD_DE4 )
call EnableTrigger( gg_trg_SentD_DE5 )
call EnableTrigger( gg_trg_SentD_DE6 )
call RemoveUnit( gg_unit_n002_0117 )
call RemoveUnit( gg_unit_n002_0050 )
call CreateNUnitsAtLoc( 1, 'n001', Player(PLAYER_NEUTRAL_PASSIVE), OffsetLocation(GetUnitLoc(gg_unit_n00V_0033), -150.00, 10.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n001', Player(PLAYER_NEUTRAL_PASSIVE), OffsetLocation(GetUnitLoc(gg_unit_n00W_0026), 75.00, -150.00), bj_UNIT_FACING )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_DEv takes nothing returns nothing
set gg_trg_DEv = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_DEv, Player(1), "-deathmatch", true )
call TriggerRegisterPlayerChatEvent( gg_trg_DEv, Player(1), "-dm", true )
call TriggerAddCondition( gg_trg_DEv, Condition( function Trig_DEv_Conditions ) )
call TriggerAddAction( gg_trg_DEv, function Trig_DEv_Actions )
endfunction
function Trig_MMv_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_MMv_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8822" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Mirrormatch" + udg_VersionString ) )
call EnableTrigger( gg_trg_MMa )
call DestroyTrigger(gg_trg_TR)
call DestroyTrigger(gg_trg_RV1)
call DestroyTrigger(gg_trg_RV2)
call DestroyTrigger(gg_trg_DEv)
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_MMv takes nothing returns nothing
set gg_trg_MMv = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_MMv, Player(1), "-mirrormatch", true )
call TriggerRegisterPlayerChatEvent( gg_trg_MMv, Player(1), "-mm", true )
call TriggerAddCondition( gg_trg_MMv, Condition( function Trig_MMv_Conditions ) )
call TriggerAddAction( gg_trg_MMv, function Trig_MMv_Actions )
endfunction
function Trig_MMa_Func001001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_MMa_Func001001002002001 takes nothing returns boolean
return ( IsUnitIllusionBJ(GetFilterUnit()) == false )
endfunction
function Trig_MMa_Func001001002002002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(1) )
endfunction
function Trig_MMa_Func001001002002002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(7) )
endfunction
function Trig_MMa_Func001001002002002 takes nothing returns boolean
return GetBooleanOr( Trig_MMa_Func001001002002002001(), Trig_MMa_Func001001002002002002() )
endfunction
function Trig_MMa_Func001001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func001001002002001(), Trig_MMa_Func001001002002002() )
endfunction
function Trig_MMa_Func001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func001001002001(), Trig_MMa_Func001001002002() )
endfunction
function Trig_MMa_Func001A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_MMGroup )
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_MMa_Func002C takes nothing returns boolean
if ( not ( IsUnitGroupEmptyBJ(udg_MMGroup) == false ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func004C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func005C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(7)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func007001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_MMa_Func007001002002001 takes nothing returns boolean
return ( IsUnitIllusionBJ(GetFilterUnit()) == false )
endfunction
function Trig_MMa_Func007001002002002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(2) )
endfunction
function Trig_MMa_Func007001002002002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(8) )
endfunction
function Trig_MMa_Func007001002002002 takes nothing returns boolean
return GetBooleanOr( Trig_MMa_Func007001002002002001(), Trig_MMa_Func007001002002002002() )
endfunction
function Trig_MMa_Func007001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func007001002002001(), Trig_MMa_Func007001002002002() )
endfunction
function Trig_MMa_Func007001002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func007001002001(), Trig_MMa_Func007001002002() )
endfunction
function Trig_MMa_Func007A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_MMGroup )
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_MMa_Func008C takes nothing returns boolean
if ( not ( IsUnitGroupEmptyBJ(udg_MMGroup) == false ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func010C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func011C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func013001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_MMa_Func013001002002001 takes nothing returns boolean
return ( IsUnitIllusionBJ(GetFilterUnit()) == false )
endfunction
function Trig_MMa_Func013001002002002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(3) )
endfunction
function Trig_MMa_Func013001002002002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(9) )
endfunction
function Trig_MMa_Func013001002002002 takes nothing returns boolean
return GetBooleanOr( Trig_MMa_Func013001002002002001(), Trig_MMa_Func013001002002002002() )
endfunction
function Trig_MMa_Func013001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func013001002002001(), Trig_MMa_Func013001002002002() )
endfunction
function Trig_MMa_Func013001002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func013001002001(), Trig_MMa_Func013001002002() )
endfunction
function Trig_MMa_Func013A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_MMGroup )
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_MMa_Func014C takes nothing returns boolean
if ( not ( IsUnitGroupEmptyBJ(udg_MMGroup) == false ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func016C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func017C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func019001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_MMa_Func019001002002001 takes nothing returns boolean
return ( IsUnitIllusionBJ(GetFilterUnit()) == false )
endfunction
function Trig_MMa_Func019001002002002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(4) )
endfunction
function Trig_MMa_Func019001002002002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(10) )
endfunction
function Trig_MMa_Func019001002002002 takes nothing returns boolean
return GetBooleanOr( Trig_MMa_Func019001002002002001(), Trig_MMa_Func019001002002002002() )
endfunction
function Trig_MMa_Func019001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func019001002002001(), Trig_MMa_Func019001002002002() )
endfunction
function Trig_MMa_Func019001002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func019001002001(), Trig_MMa_Func019001002002() )
endfunction
function Trig_MMa_Func019A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_MMGroup )
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_MMa_Func020C takes nothing returns boolean
if ( not ( IsUnitGroupEmptyBJ(udg_MMGroup) == false ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func022C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func023C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(10)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func025001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_MMa_Func025001002002001 takes nothing returns boolean
return ( IsUnitIllusionBJ(GetFilterUnit()) == false )
endfunction
function Trig_MMa_Func025001002002002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(5) )
endfunction
function Trig_MMa_Func025001002002002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(11) )
endfunction
function Trig_MMa_Func025001002002002 takes nothing returns boolean
return GetBooleanOr( Trig_MMa_Func025001002002002001(), Trig_MMa_Func025001002002002002() )
endfunction
function Trig_MMa_Func025001002002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func025001002002001(), Trig_MMa_Func025001002002002() )
endfunction
function Trig_MMa_Func025001002 takes nothing returns boolean
return GetBooleanAnd( Trig_MMa_Func025001002001(), Trig_MMa_Func025001002002() )
endfunction
function Trig_MMa_Func025A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_MMGroup )
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_MMa_Func026C takes nothing returns boolean
if ( not ( IsUnitGroupEmptyBJ(udg_MMGroup) == false ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func028C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(5)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Func029C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(11)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_MMa_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_MMa_Func001001002)), function Trig_MMa_Func001A )
if ( Trig_MMa_Func002C() ) then
set udg_MMUnit = GetUnitTypeId(GroupPickRandomUnit(udg_MMGroup))
else
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8823" )
endif
call GroupClear( udg_MMGroup )
if ( Trig_MMa_Func004C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(1), GetRectCenter(gg_rct_Hero_Creation_NE), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_MMa_Func005C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(7), GetRectCenter(gg_rct_Hero_Creation_Evil), bj_UNIT_FACING )
else
call DoNothing( )
endif
set udg_MMUnit = 0
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_MMa_Func007001002)), function Trig_MMa_Func007A )
if ( Trig_MMa_Func008C() ) then
set udg_MMUnit = GetUnitTypeId(GroupPickRandomUnit(udg_MMGroup))
else
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8824" )
endif
call GroupClear( udg_MMGroup )
if ( Trig_MMa_Func010C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(2), GetRectCenter(gg_rct_Hero_Creation_NE), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_MMa_Func011C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(8), GetRectCenter(gg_rct_Hero_Creation_Evil), bj_UNIT_FACING )
else
call DoNothing( )
endif
set udg_MMUnit = 0
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_MMa_Func013001002)), function Trig_MMa_Func013A )
if ( Trig_MMa_Func014C() ) then
set udg_MMUnit = GetUnitTypeId(GroupPickRandomUnit(udg_MMGroup))
else
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8825" )
endif
call GroupClear( udg_MMGroup )
if ( Trig_MMa_Func016C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(3), GetRectCenter(gg_rct_Hero_Creation_NE), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_MMa_Func017C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(9), GetRectCenter(gg_rct_Hero_Creation_Evil), bj_UNIT_FACING )
else
call DoNothing( )
endif
set udg_MMUnit = 0
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_MMa_Func019001002)), function Trig_MMa_Func019A )
if ( Trig_MMa_Func020C() ) then
set udg_MMUnit = GetUnitTypeId(GroupPickRandomUnit(udg_MMGroup))
else
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8826" )
endif
call GroupClear( udg_MMGroup )
if ( Trig_MMa_Func022C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(4), GetRectCenter(gg_rct_Hero_Creation_NE), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_MMa_Func023C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(10), GetRectCenter(gg_rct_Hero_Creation_Evil), bj_UNIT_FACING )
else
call DoNothing( )
endif
set udg_MMUnit = 0
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_MMa_Func025001002)), function Trig_MMa_Func025A )
if ( Trig_MMa_Func026C() ) then
set udg_MMUnit = GetUnitTypeId(GroupPickRandomUnit(udg_MMGroup))
else
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8827" )
endif
call GroupClear( udg_MMGroup )
if ( Trig_MMa_Func028C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(5), GetRectCenter(gg_rct_Hero_Creation_NE), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_MMa_Func029C() ) then
call CreateNUnitsAtLoc( 1, udg_MMUnit, Player(11), GetRectCenter(gg_rct_Hero_Creation_Evil), bj_UNIT_FACING )
else
call DoNothing( )
endif
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_MMa takes nothing returns nothing
set gg_trg_MMa = CreateTrigger( )
call DisableTrigger( gg_trg_MMa )
call TriggerRegisterTimerEventSingle( gg_trg_MMa, 60.00 )
call TriggerAddAction( gg_trg_MMa, function Trig_MMa_Actions )
endfunction
function Trig_APv_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_APv_Func008C takes nothing returns boolean
if ( not ( udg_DMBool == true ) ) then
return false
endif
return true
endfunction
function Trig_APv_Func028Func003001002 takes nothing returns boolean
return ( GetUnitTypeId(GetFilterUnit()) == 'n00C' )
endfunction
function Trig_APv_Func028Func003A takes nothing returns nothing
call RemoveUnit( GetEnumUnit() )
endfunction
function Trig_APv_Func028C takes nothing returns boolean
if ( not ( udg_DMBool == false ) ) then
return false
endif
return true
endfunction
function Trig_APv_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call DestroyTrigger(gg_trg_TR)
call DestroyTrigger(gg_trg_RandomUD)
call DestroyTrigger(gg_trg_RandomS)
call DestroyTrigger(gg_trg_RepS)
call DestroyTrigger(gg_trg_RepUD)
call DestroyTrigger(gg_trg_AR)
if ( Trig_APv_Func008C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8828" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Allpick Deathmatch" + udg_VersionString ) )
else
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8829" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Allpick" + udg_VersionString ) )
endif
call DisableTrigger( gg_trg_entry )
call EnableTrigger( gg_trg_RandomSAP )
call EnableTrigger( gg_trg_RandomUDAP )
call EnableTrigger( gg_trg_RepSAP )
call EnableTrigger( gg_trg_RepUDAP )
set udg_APOn = true
call TriggerSleepAction( 0.01 )
call CreateNUnitsAtLoc( 1, 'n00C', Player(1), GetRectCenter(gg_rct_Allpick_Scourge), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n00C', Player(2), GetRectCenter(gg_rct_Allpick_Scourge), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n00C', Player(3), GetRectCenter(gg_rct_Allpick_Scourge), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n00C', Player(4), GetRectCenter(gg_rct_Allpick_Scourge), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n00C', Player(5), GetRectCenter(gg_rct_Allpick_Scourge), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n00C', Player(7), GetRectCenter(gg_rct_Allpick_Sent), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n00C', Player(8), GetRectCenter(gg_rct_Allpick_Sent), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n00C', Player(9), GetRectCenter(gg_rct_Allpick_Sent), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n00C', Player(10), GetRectCenter(gg_rct_Allpick_Sent), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n00C', Player(11), GetRectCenter(gg_rct_Allpick_Sent), bj_UNIT_FACING )
call TriggerSleepAction( 0.01 )
call EnableTrigger( gg_trg_entry )
if ( Trig_APv_Func028C() ) then
call TriggerSleepAction( 90.00 )
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_APv_Func028Func003001002)), function Trig_APv_Func028Func003A )
else
call DoNothing( )
endif
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_APv takes nothing returns nothing
set gg_trg_APv = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_APv, Player(1), "-allpick", true )
call TriggerRegisterPlayerChatEvent( gg_trg_APv, Player(1), "-ap", true )
call TriggerAddCondition( gg_trg_APv, Condition( function Trig_APv_Conditions ) )
call TriggerAddAction( gg_trg_APv, function Trig_APv_Actions )
endfunction
function Trig_SMv_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_SMv_Func007A takes nothing returns nothing
call SetPlayerHandicapXPBJ( GetEnumPlayer(), 115.00 )
endfunction
function Trig_SMv_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8830" )
call SetPlayerTechResearchedSwap( 'R004', 1, Player(0) )
call SetPlayerTechResearchedSwap( 'R004', 1, Player(6) )
call DisableTrigger( gg_trg_Money )
call EnableTrigger( gg_trg_SM_Money )
set bj_wantDestroyGroup = true
call ForForce( GetPlayersAll(), function Trig_SMv_Func007A )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_SMv takes nothing returns nothing
set gg_trg_SMv = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_SMv, Player(1), "-shortmode", true )
call TriggerRegisterPlayerChatEvent( gg_trg_SMv, Player(1), "-sm", true )
call TriggerAddCondition( gg_trg_SMv, Condition( function Trig_SMv_Conditions ) )
call TriggerAddAction( gg_trg_SMv, function Trig_SMv_Actions )
endfunction
function Trig_DMv_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_DMv_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8831" )
call DestroyTrigger(gg_trg_DEv)
set udg_RandHero[2] = 'Nbrn'
set udg_RandHero[3] = 'Npbm'
set udg_RandHero[4] = 'Edem'
set udg_RandHero[5] = 'Hlgr'
set udg_RandHero[6] = 'Harf'
set udg_RandHero[7] = 'N016'
set udg_RandHero[8] = 'Nbbc'
set udg_RandHero[9] = 'Naka'
set udg_RandHero[10] = 'H000'
set udg_RandHero[11] = 'Orkn'
set udg_RandHero[12] = 'Emoo'
set udg_RandHero[13] = 'Emns'
set udg_RandHero[14] = 'O00P'
set udg_RandHero[15] = 'Usyl'
set udg_RandHero[16] = 'H004'
set udg_RandHero[17] = 'E005'
set udg_RandHero[18] = 'N01O'
set udg_RandHero[19] = 'HC92'
set udg_RandHero[20] = 'Hjai'
set udg_RandHero[21] = 'Hvwd'
set udg_RandHero[22] = 'HC49'
set udg_RandHero[23] = 'H00K'
set udg_RandHero[24] = 'H001'
set udg_RandHero[25] = 'Hmbr'
set udg_RandHero[26] = 'N01A'
set udg_RandHero[27] = 'Hamg'
set udg_RandHero[28] = 'Huth'
set udg_RandHero[29] = 'Ntin'
set udg_RandHero[30] = 'Hmkg'
set udg_RandHero[31] = 'Hblm'
set udg_RandHero[32] = 'Hpb2'
set udg_RandHero[33] = 'Hant'
set udg_RandHero[34] = 'Hdgo'
set udg_RandHero[35] = 'Ucrl'
set udg_RandHero[36] = 'Ogrh'
set udg_RandHero[1] = 'Otch'
set udg_RandHero[38] = 'E004'
set udg_RandHero[39] = 'EC77'
set udg_RandHero[40] = 'E002'
set udg_RandHero[41] = 'EC45'
set udg_RandHero[42] = 'U00A'
set udg_RandHero[43] = 'Ewar'
set udg_RandHero[44] = 'UC01'
set udg_RandHero[45] = 'U007'
set udg_RandHero[46] = 'UC91'
set udg_RandHero[47] = 'UC42'
set udg_RandHero[48] = 'U008'
set udg_RandHero[49] = 'U000'
set udg_RandHero[50] = 'NC00'
set udg_RandHero[51] = 'Ulic'
set udg_RandHero[52] = 'U006'
set udg_RandHero[53] = 'Ekee'
set udg_RandHero[54] = 'Udre'
set udg_RandHero[55] = 'UC76'
set udg_RandHero[56] = 'EC57'
set udg_RandHero[57] = 'UC18'
set udg_RandHero[58] = 'UC11'
set udg_RandHero[59] = 'H00V'
set udg_RandHero[60] = 'Eevi'
set udg_RandHero[61] = 'UC60'
set udg_RandHero[62] = 'H00H'
set udg_RandHero[63] = 'Ofar'
set udg_RandHero[64] = 'Oshd'
set udg_RandHero[65] = 'U00F'
set udg_RandHero[66] = 'U00K'
set udg_RandHero[67] = 'U00E'
set udg_RandHero[68] = 'Uanb'
set udg_RandHero[69] = 'Ubal'
set udg_RandHero[70] = 'Nfir'
set udg_RandHero[71] = 'Opgh'
set udg_RandHero[72] = 'Hvsh'
set udg_RandHero[37] = 'Uktl'
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_DMv takes nothing returns nothing
set gg_trg_DMv = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_DMv, Player(1), "-dupemode", true )
call TriggerRegisterPlayerChatEvent( gg_trg_DMv, Player(1), "-du", true )
call TriggerAddCondition( gg_trg_DMv, Condition( function Trig_DMv_Conditions ) )
call TriggerAddAction( gg_trg_DMv, function Trig_DMv_Actions )
endfunction
function Trig_AR_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func007C takes nothing returns boolean
if ( not ( udg_DMBool == true ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func020Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func020C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(1)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func021Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func021C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(2)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func022Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func022C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(3)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func023Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func023C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(4)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func024Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func024C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(5)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(5)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func025Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func025C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(7)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(7)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func026Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func026C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(8)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func027Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func027C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(9)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func028Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func028C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(10)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(10)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func029Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_AR_Func029C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(11)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(11)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_AR_Actions takes nothing returns nothing
call DestroyTrigger(gg_trg_TR)
call DestroyTrigger(gg_trg_RV1)
call DestroyTrigger(gg_trg_RV2)
call DestroyTrigger(gg_trg_APv)
call DestroyTrigger(gg_trg_MMv)
call DisableTrigger( GetTriggeringTrigger() )
if ( Trig_AR_Func007C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8832" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Allrandom Deathmatch" + udg_VersionString ) )
else
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8833" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Allrandom" + udg_VersionString ) )
endif
call DisableTrigger( gg_trg_HeroL1 )
call DisableTrigger( gg_trg_RandomUD )
call DisableTrigger( gg_trg_RandomS )
call TriggerExecute( gg_trg_HeroL2 )
call DisableTrigger( gg_trg_RepUD )
call DisableTrigger( gg_trg_RepS )
call EnableTrigger( gg_trg_ARReUD )
call EnableTrigger( gg_trg_ARReS )
set udg_AROn = true
if ( Trig_AR_Func020C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func020Func007C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(1), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(1), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_AR_Func021C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func021Func007C() ) then
call SetPlayerStateBJ( Player(2), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(2), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(2)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(2), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_AR_Func022C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func022Func007C() ) then
call SetPlayerStateBJ( Player(3), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(3), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(3)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(3), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_AR_Func023C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func023Func007C() ) then
call SetPlayerStateBJ( Player(4), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(4), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(4)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(4), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_AR_Func024C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func024Func007C() ) then
call SetPlayerStateBJ( Player(5), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(5), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(5)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(5), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_AR_Func025C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func025Func007C() ) then
call SetPlayerStateBJ( Player(7), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(7), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(7), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_AR_Func026C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func026Func007C() ) then
call SetPlayerStateBJ( Player(8), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(8), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(8)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(8), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_AR_Func027C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func027Func007C() ) then
call SetPlayerStateBJ( Player(9), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(9), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(9)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(9), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_AR_Func028C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func028Func007C() ) then
call SetPlayerStateBJ( Player(10), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(10), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(10)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(10), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_AR_Func029C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 72)
if ( Trig_AR_Func029Func007C() ) then
call SetPlayerStateBJ( Player(11), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(11), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(11)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(11), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_AR takes nothing returns nothing
set gg_trg_AR = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_AR, Player(1), "-allrandom", true )
call TriggerRegisterPlayerChatEvent( gg_trg_AR, Player(1), "-ar", true )
call TriggerAddCondition( gg_trg_AR, Condition( function Trig_AR_Conditions ) )
call TriggerAddAction( gg_trg_AR, function Trig_AR_Actions )
endfunction
function Trig_TR_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func007C takes nothing returns boolean
if ( not ( udg_DMBool == true ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func020Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func020C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(1)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func021Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func021C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(2)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func022Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func022C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(3)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func023Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func023C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(4)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func024Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func024C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(5)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(5)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func025Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func025C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(7)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(7)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func026Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func026C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(8)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func027Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func027C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(9)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func028Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func028C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(10)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(10)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func029Func007C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_TR_Func029C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(11)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
if ( not ( GetPlayerController(Player(11)) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_TR_Actions takes nothing returns nothing
call DestroyTrigger(gg_trg_AR)
call DestroyTrigger(gg_trg_RV1)
call DestroyTrigger(gg_trg_RV2)
call DestroyTrigger(gg_trg_APv)
call DestroyTrigger(gg_trg_MMv)
call DisableTrigger( GetTriggeringTrigger() )
if ( Trig_TR_Func007C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8834" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Teamrandom Deathmatch" + udg_VersionString ) )
else
call DisplayTimedTextToForce( GetPlayersAll(), 20.00, "TRIGSTR_8835" )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Teamrandom" + udg_VersionString ) )
endif
call DisableTrigger( gg_trg_HeroL1 )
call DisableTrigger( gg_trg_RandomUD )
call DisableTrigger( gg_trg_RandomS )
call TriggerExecute( gg_trg_HeroL2 )
call DisableTrigger( gg_trg_RepUD )
call DisableTrigger( gg_trg_RepS )
call EnableTrigger( gg_trg_TRReUD )
call EnableTrigger( gg_trg_TRReS )
set udg_TROn = true
if ( Trig_TR_Func020C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_TR_Func020Func007C() ) then
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(1), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(1), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_TR_Func021C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_TR_Func021Func007C() ) then
call SetPlayerStateBJ( Player(2), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(2), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(2)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(2), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_TR_Func022C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_TR_Func022Func007C() ) then
call SetPlayerStateBJ( Player(3), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(3), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(3)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(3), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_TR_Func023C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_TR_Func023Func007C() ) then
call SetPlayerStateBJ( Player(4), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(4), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(4)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(4), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_TR_Func024C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_TR_Func024Func007C() ) then
call SetPlayerStateBJ( Player(5), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(5), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(5)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(5), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_TR_Func025C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_TR_Func025Func007C() ) then
call SetPlayerStateBJ( Player(7), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(7), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(7)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(7), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_TR_Func026C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_TR_Func026Func007C() ) then
call SetPlayerStateBJ( Player(8), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(8), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(8)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(8), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_TR_Func027C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_TR_Func027Func007C() ) then
call SetPlayerStateBJ( Player(9), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(9), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(9)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(9), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_TR_Func028C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_TR_Func028Func007C() ) then
call SetPlayerStateBJ( Player(10), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(10), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(10)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(10), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
if ( Trig_TR_Func029C() ) then
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_TR_Func029Func007C() ) then
call SetPlayerStateBJ( Player(11), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(11), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(11)) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(11), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
else
call DoNothing( )
endif
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_TR takes nothing returns nothing
set gg_trg_TR = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_TR, Player(1), "-teamrandom", true )
call TriggerRegisterPlayerChatEvent( gg_trg_TR, Player(1), "-tr", true )
call TriggerAddCondition( gg_trg_TR, Condition( function Trig_TR_Conditions ) )
call TriggerAddAction( gg_trg_TR, function Trig_TR_Actions )
endfunction
function Trig_RV1_Conditions takes nothing returns boolean
if ( not ( udg_Elapsed20 == false ) ) then
return false
endif
return true
endfunction
function Trig_RV1_Func011A takes nothing returns nothing
call AdjustPlayerStateBJ( 375, GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD )
endfunction
function Trig_RV1_Actions takes nothing returns nothing
call DestroyTrigger(gg_trg_TR)
call DestroyTrigger(gg_trg_AR)
call DestroyTrigger(gg_trg_APv)
call DestroyTrigger(gg_trg_MMv)
call DestroyTrigger(gg_trg_DEv)
call DisableTrigger( GetTriggeringTrigger() )
call MultiboardSetTitleText( GetLastCreatedMultiboard(), ( "Reverse" + udg_VersionString ) )
call ForForce( GetPlayersAll(), function Trig_RV1_Func011A )
call DisableTrigger( gg_trg_sent_chosen )
call DisableTrigger( gg_trg_RandomUD )
call DisableTrigger( gg_trg_RandomS )
call DisableTrigger( gg_trg_RepUD )
call DisableTrigger( gg_trg_RepS )
call DisableTrigger( gg_trg_entry )
call TriggerSleepAction( 0.02 )
call RemoveUnit( gg_unit_n007_0018 )
call RemoveUnit( gg_unit_n005_0019 )
call RemoveUnit( gg_unit_n01B_0020 )
call RemoveUnit( gg_unit_n008_0009 )
call RemoveUnit( gg_unit_n01D_0012 )
call RemoveUnit( gg_unit_ntav_0000 )
call CreateNUnitsAtLoc( 1, 'ntav', Player(6), GetRectCenter(gg_rct_Scourge_Top_Tavern), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n008', Player(6), GetRectCenter(gg_rct_Scourge_Bottom_Tavern), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n01D', Player(6), GetRectCenter(gg_rct_Scourge_New_Tavern), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n005', Player(0), GetRectCenter(gg_rct_Sent_Bottom_Tavern), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n007', Player(0), GetRectCenter(gg_rct_Sent_Top_Tavern), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'n01B', Player(0), GetRectCenter(gg_rct_Sent_New_Tavern), bj_UNIT_FACING )
call TriggerSleepAction( 0.02 )
call EnableTrigger( gg_trg_RV2 )
call EnableTrigger( gg_trg_RS1 )
call EnableTrigger( gg_trg_RS2 )
call DisplayTimedTextToForce( GetPlayersAll(), 30, "TRIGSTR_8836" )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_RV1 takes nothing returns nothing
set gg_trg_RV1 = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_RV1, Player(1), "-reverse", true )
call TriggerRegisterPlayerChatEvent( gg_trg_RV1, Player(1), "-re", true )
call TriggerAddCondition( gg_trg_RV1, Condition( function Trig_RV1_Conditions ) )
call TriggerAddAction( gg_trg_RV1, function Trig_RV1_Actions )
endfunction
function Trig_RV2_Func005Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func005Func002C takes nothing returns boolean
if ( not ( udg_ReHT[2] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func005C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(1)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func006Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func006Func002C takes nothing returns boolean
if ( not ( udg_ReHT[3] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func006C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(2)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func007Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func007Func002C takes nothing returns boolean
if ( not ( udg_ReHT[4] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func007C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(3)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func008Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func008Func002C takes nothing returns boolean
if ( not ( udg_ReHT[5] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func008C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(4)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func009Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func009Func002C takes nothing returns boolean
if ( not ( udg_ReHT[6] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func009C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(5)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func010Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func010Func002C takes nothing returns boolean
if ( not ( udg_ReHT[8] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func010C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(7)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func011Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func011Func002C takes nothing returns boolean
if ( not ( udg_ReHT[9] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func011C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(8)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func012Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func012Func002C takes nothing returns boolean
if ( not ( udg_ReHT[10] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func012C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(9)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func013Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func013Func002C takes nothing returns boolean
if ( not ( udg_ReHT[11] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func013C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(10)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func014Func002Func005C takes nothing returns boolean
if ( not ( udg_HeroFlags[udg_Rand] == false ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func014Func002C takes nothing returns boolean
if ( not ( udg_ReHT[12] != 0 ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Func014C takes nothing returns boolean
if ( not ( GetPlayerSlotState(Player(11)) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_RV2_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_RS2 )
call DisableTrigger( gg_trg_RS1 )
call EnableTrigger( gg_trg_entry )
call TriggerSleepAction( 0.01 )
if ( Trig_RV2_Func005C() ) then
if ( Trig_RV2_Func005Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[2], Player(1), GetRectCenter(gg_rct_herospawnsent), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(7), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_RV2_Func005Func002Func005C() ) then
call SetPlayerStateBJ( Player(7), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(1), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Blue will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(1), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
if ( Trig_RV2_Func006C() ) then
if ( Trig_RV2_Func006Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[3], Player(2), GetRectCenter(gg_rct_herospawnsent), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(8), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_RV2_Func006Func002Func005C() ) then
call SetPlayerStateBJ( Player(8), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(2), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Teal will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(2), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
if ( Trig_RV2_Func007C() ) then
if ( Trig_RV2_Func007Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[4], Player(3), GetRectCenter(gg_rct_herospawnsent), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(9), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_RV2_Func007Func002Func005C() ) then
call SetPlayerStateBJ( Player(9), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(3), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Purple will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(3), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
if ( Trig_RV2_Func008C() ) then
if ( Trig_RV2_Func008Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[5], Player(4), GetRectCenter(gg_rct_herospawnsent), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(10), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_RV2_Func008Func002Func005C() ) then
call SetPlayerStateBJ( Player(10), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(4), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Yellow will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(4), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
if ( Trig_RV2_Func009C() ) then
if ( Trig_RV2_Func009Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[6], Player(5), GetRectCenter(gg_rct_herospawnsent), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(11), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(1, 36)
if ( Trig_RV2_Func009Func002Func005C() ) then
call SetPlayerStateBJ( Player(11), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(5), GetRectCenter(gg_rct_herospawnsent), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Orange will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(5), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
if ( Trig_RV2_Func010C() ) then
if ( Trig_RV2_Func010Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[8], Player(7), GetRectCenter(gg_rct_herospawnud), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_RV2_Func010Func002Func005C() ) then
call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(7), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Pink will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(7), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
if ( Trig_RV2_Func011C() ) then
if ( Trig_RV2_Func011Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[9], Player(8), GetRectCenter(gg_rct_herospawnud), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(2), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_RV2_Func011Func002Func005C() ) then
call SetPlayerStateBJ( Player(2), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(8), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Gray will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(8), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
if ( Trig_RV2_Func012C() ) then
if ( Trig_RV2_Func012Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[10], Player(9), GetRectCenter(gg_rct_herospawnud), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(3), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_RV2_Func012Func002Func005C() ) then
call SetPlayerStateBJ( Player(3), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(9), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Light Blue will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(9), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
if ( Trig_RV2_Func013C() ) then
if ( Trig_RV2_Func013Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[11], Player(10), GetRectCenter(gg_rct_herospawnud), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(4), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_RV2_Func013Func002Func005C() ) then
call SetPlayerStateBJ( Player(4), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(10), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Dark Green will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(10), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
if ( Trig_RV2_Func014C() ) then
if ( Trig_RV2_Func014Func002C() ) then
call CreateNUnitsAtLoc( 1, udg_ReHT[12], Player(11), GetRectCenter(gg_rct_herospawnud), bj_UNIT_FACING )
else
call SetPlayerStateBJ( Player(5), PLAYER_STATE_RESOURCE_GOLD, 0 )
loop
call PolledWait( 0.01 )
set udg_Rand = GetRandomInt(37, 72)
if ( Trig_RV2_Func014Func002Func005C() ) then
call SetPlayerStateBJ( Player(5), PLAYER_STATE_RESOURCE_FOOD_CAP, 6 )
call CreateNUnitsAtLocFacingLocBJ( 1, udg_RandHero[udg_Rand], Player(11), GetRectCenter(gg_rct_herospawnud), GetPlayerStartLocationLoc(Player(1)) )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( "Brown will control " + ( GetUnitName(GetLastCreatedUnit()) + "." ) ) )
set udg_HeroFlags[GetUnitPointValue(GetLastCreatedUnit())] = true
else
call DoNothing( )
endif
exitwhen ( GetPlayerState(Player(11), PLAYER_STATE_RESOURCE_FOOD_USED) >= 5 )
endloop
endif
else
call DoNothing( )
endif
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_RV2 takes nothing returns nothing
set gg_trg_RV2 = CreateTrigger( )
call DisableTrigger( gg_trg_RV2 )
call TriggerRegisterTimerEventSingle( gg_trg_RV2, 60.00 )
call TriggerAddAction( gg_trg_RV2, function Trig_RV2_Actions )
endfunction
function Trig_PUV_Conditions takes nothing returns boolean
if ( not ( udg_NPU[GetConvertedPlayerId(GetTriggerPlayer())] == false ) ) then
return false
endif
return true
endfunction
function Trig_PUV_Func004Func001Func001C takes nothing returns boolean
if ( not ( GetItemType(GetEnumItem()) == ITEM_TYPE_POWERUP ) ) then
return false
endif
return true
endfunction
function Trig_PUV_Func004Func001A takes nothing returns nothing
if ( Trig_PUV_Func004Func001Func001C() ) then
call RemoveItem( GetEnumItem() )
else
call DoNothing( )
endif
endfunction
function Trig_PUV_Func004C takes nothing returns boolean
if ( not ( udg_NPTot > 2 ) ) then
return false
endif
return true
endfunction
function Trig_PUV_Actions takes nothing returns nothing
set udg_NPTot = ( udg_NPTot + 1 )
set udg_NPU[GetConvertedPlayerId(GetTriggerPlayer())] = true
if ( Trig_PUV_Func004C() ) then
call EnumItemsInRectBJ( GetPlayableMapRect(), function Trig_PUV_Func004Func001A )
call DisableTrigger( gg_trg_ItemSpawn )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8837" )
call DestroyTrigger(GetTriggeringTrigger())
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_PUV takes nothing returns nothing
set gg_trg_PUV = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(1), "-nopowerups", true )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(2), "-nopowerups", true )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(3), "-nopowerups", true )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(4), "-nopowerups", true )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(5), "-nopowerups", true )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(7), "-nopowerups", true )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(8), "-nopowerups", true )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(9), "-nopowerups", true )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(10), "-nopowerups", true )
call TriggerRegisterPlayerChatEvent( gg_trg_PUV, Player(11), "-nopowerups", true )
call TriggerAddCondition( gg_trg_PUV, Condition( function Trig_PUV_Conditions ) )
call TriggerAddAction( gg_trg_PUV, function Trig_PUV_Actions )
endfunction
function Trig_sent_chosen_Conditions takes nothing returns boolean
if ( not ( udg_ElapsedTime == false ) ) then
return false
endif
return true
endfunction
function Trig_sent_chosen_Func002C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'E005' ) ) then
return false
endif
return true
endfunction
function Trig_sent_chosen_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersEnemies(GetOwningPlayer(GetTriggerUnit())), 10.00, ( "An enemy has chosen " + ( GetUnitName(GetTriggerUnit()) + "." ) ) )
if ( Trig_sent_chosen_Func002C() ) then
call DisplayTimedTextToForce( GetForceOfPlayer(GetOwningPlayer(GetTriggerUnit())), 30.00, "TRIGSTR_8838" )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_sent_chosen takes nothing returns nothing
set gg_trg_sent_chosen = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_sent_chosen, gg_rct_herospawnsent )
call TriggerRegisterEnterRectSimple( gg_trg_sent_chosen, gg_rct_herospawnud )
call TriggerAddCondition( gg_trg_sent_chosen, Condition( function Trig_sent_chosen_Conditions ) )
call TriggerAddAction( gg_trg_sent_chosen, function Trig_sent_chosen_Actions )
endfunction
function Trig_elapsed_time_Actions takes nothing returns nothing
set udg_ElapsedTime = true
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_elapsed_time takes nothing returns nothing
set gg_trg_elapsed_time = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_elapsed_time, 120.00 )
call TriggerAddAction( gg_trg_elapsed_time, function Trig_elapsed_time_Actions )
endfunction
function Trig_Move_Func002C takes nothing returns boolean
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(0) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetTriggerUnit()) == Player(6) ) ) then
return true
endif
return false
endfunction
function Trig_Move_Conditions takes nothing returns boolean
if ( not Trig_Move_Func002C() ) then
return false
endif
return true
endfunction
function Trig_Move_Func001C takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(0) ) ) then
return false
endif
return true
endfunction
function Trig_Move_Actions takes nothing returns nothing
if ( Trig_Move_Func001C() ) then
call IssuePointOrderLocBJ( GetTriggerUnit(), "attack", GetUnitLoc(gg_unit_e001_0008) )
else
call IssuePointOrderLocBJ( GetTriggerUnit(), "attack", GetUnitLoc(gg_unit_e008_0007) )
endif
endfunction
//===========================================================================
function InitTrig_Move takes nothing returns nothing
set gg_trg_Move = CreateTrigger( )
call TriggerRegisterUnitInRangeSimple( gg_trg_Move, 300.00, gg_unit_e00A_0006 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Move, 300.00, gg_unit_e00B_0005 )
call TriggerRegisterUnitInRangeSimple( gg_trg_Move, 300.00, gg_unit_e00D_0004 )
call TriggerAddCondition( gg_trg_Move, Condition( function Trig_Move_Conditions ) )
call TriggerAddAction( gg_trg_Move, function Trig_Move_Actions )
endfunction
function Trig_multi_hero_correction_Func002Func001Func001C takes nothing returns boolean
if ( not ( IsUnitType(GetEnumUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( IsUnitIllusionBJ(GetEnumUnit()) == false ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetEnumUnit()) == ConvertedPlayer(GetForLoopIndexA()) ) ) then
return false
endif
return true
endfunction
function Trig_multi_hero_correction_Func002Func001A takes nothing returns nothing
if ( Trig_multi_hero_correction_Func002Func001Func001C() ) then
set udg_HeroNum[GetForLoopIndexA()] = ( udg_HeroNum[GetForLoopIndexA()] + 1 )
else
call DoNothing( )
endif
endfunction
function Trig_multi_hero_correction_Func003Func001Func003001001002001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == ConvertedPlayer(GetForLoopIndexB()) )
endfunction
function Trig_multi_hero_correction_Func003Func001Func003001001002002 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_multi_hero_correction_Func003Func001Func003001001002 takes nothing returns boolean
return GetBooleanAnd( Trig_multi_hero_correction_Func003Func001Func003001001002001(), Trig_multi_hero_correction_Func003Func001Func003001001002002() )
endfunction
function Trig_multi_hero_correction_Func003Func001C takes nothing returns boolean
if ( not ( udg_HeroNum[GetForLoopIndexB()] > 1 ) ) then
return false
endif
return true
endfunction
function Trig_multi_hero_correction_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call ForGroupBJ( GetUnitsInRectAll(GetEntireMapRect()), function Trig_multi_hero_correction_Func002Func001A )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 12
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_multi_hero_correction_Func003Func001C() ) then
loop
call RemoveUnit( GroupPickRandomUnit(GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_multi_hero_correction_Func003Func001Func003001001002))) )
set udg_HeroNum[GetForLoopIndexB()] = ( udg_HeroNum[GetForLoopIndexB()] - 1 )
exitwhen ( udg_HeroNum[GetForLoopIndexB()] == 1 )
endloop
else
call DoNothing( )
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_multi_hero_correction takes nothing returns nothing
set gg_trg_multi_hero_correction = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_multi_hero_correction, 65.00 )
call TriggerAddAction( gg_trg_multi_hero_correction, function Trig_multi_hero_correction_Actions )
endfunction
function Trig_ten_minute_elapsed_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_PUV )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_ten_minute_elapsed takes nothing returns nothing
set gg_trg_ten_minute_elapsed = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_ten_minute_elapsed, 600.00 )
call TriggerAddAction( gg_trg_ten_minute_elapsed, function Trig_ten_minute_elapsed_Actions )
endfunction
function Trig_sheep_Conditions takes nothing returns boolean
if ( not ( IsUnitAlly(GetAttackedUnitBJ(), GetOwningPlayer(GetAttacker())) == true ) ) then
return false
endif
return true
endfunction
function Trig_sheep_Func001Func010001 takes nothing returns boolean
return ( GetUnitTypeId(GetAttackedUnitBJ()) == 'etol' )
endfunction
function Trig_sheep_Func001Func010002 takes nothing returns boolean
return ( GetUnitTypeId(GetAttackedUnitBJ()) == 'unpl' )
endfunction
function Trig_sheep_Func001C takes nothing returns boolean
if ( not GetBooleanOr( Trig_sheep_Func001Func010001(), Trig_sheep_Func001Func010002() ) ) then
return false
endif
return true
endfunction
function Trig_sheep_Func002C takes nothing returns boolean
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'BNdo') == false ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'B03I') == false ) ) then
return false
endif
if ( not ( UnitHasBuffBJ(GetAttackedUnitBJ(), 'BEsh') == false ) ) then
return false
endif
return true
endfunction
function Trig_sheep_Func003C takes nothing returns boolean
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_HERO) == false ) ) then
return false
endif
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == false ) ) then
return false
endif
if ( not ( GetUnitLifePercent(GetAttackedUnitBJ()) >= 50.00 ) ) then
return false
endif
return true
endfunction
function Trig_sheep_Func004Func003001 takes nothing returns boolean
return ( GetUnitTypeId(GetAttackedUnitBJ()) != 'etol' )
endfunction
function Trig_sheep_Func004Func003002 takes nothing returns boolean
return ( GetUnitTypeId(GetAttackedUnitBJ()) != 'unpl' )
endfunction
function Trig_sheep_Func004C takes nothing returns boolean
if ( not ( IsUnitType(GetAttackedUnitBJ(), UNIT_TYPE_STRUCTURE) == true ) ) then
return false
endif
if ( not GetBooleanOr( Trig_sheep_Func004Func003001(), Trig_sheep_Func004Func003002() ) ) then
return false
endif
if ( not ( GetUnitLifePercent(GetAttackedUnitBJ()) >= 10 ) ) then
return false
endif
return true
endfunction
function Trig_sheep_Actions takes nothing returns nothing
if ( Trig_sheep_Func001C() ) then
call IssueImmediateOrderBJ( GetAttacker(), "stop" )
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetAttackedUnitBJ()), GetUnitLoc(GetAttackedUnitBJ()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A08U', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "hex", GetAttacker() )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
else
call DoNothing( )
endif
if ( Trig_sheep_Func002C() ) then
call IssueImmediateOrderBJ( GetAttacker(), "stop" )
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetAttackedUnitBJ()), GetUnitLoc(GetAttackedUnitBJ()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A08U', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "hex", GetAttacker() )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
else
call DoNothing( )
endif
if ( Trig_sheep_Func003C() ) then
call IssueImmediateOrderBJ( GetAttacker(), "stop" )
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetAttackedUnitBJ()), GetUnitLoc(GetAttackedUnitBJ()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A08U', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "hex", GetAttacker() )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
else
call DoNothing( )
endif
if ( Trig_sheep_Func004C() ) then
call IssueImmediateOrderBJ( GetAttacker(), "stop" )
call CreateNUnitsAtLoc( 1, 'e00C', GetOwningPlayer(GetAttackedUnitBJ()), GetUnitLoc(GetAttackedUnitBJ()), bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A08U', GetLastCreatedUnit() )
call IssueTargetOrderBJ( GetLastCreatedUnit(), "hex", GetAttacker() )
call UnitApplyTimedLifeBJ( 1.00, 'BTLF', GetLastCreatedUnit() )
call SetUnitPathing( GetLastCreatedUnit(), false )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
call UnitAddAbilityBJ( 'Aloc', GetLastCreatedUnit() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_sheep takes nothing returns nothing
set gg_trg_sheep = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_sheep, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_sheep, Condition( function Trig_sheep_Conditions ) )
call TriggerAddAction( gg_trg_sheep, function Trig_sheep_Actions )
endfunction
function Trig_elapsed15sec_Actions takes nothing returns nothing
set udg_Elapsed20 = true
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_elapsed15sec takes nothing returns nothing
set gg_trg_elapsed15sec = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_elapsed15sec, 15.00 )
call TriggerAddAction( gg_trg_elapsed15sec, function Trig_elapsed15sec_Actions )
endfunction
function Trig_map_init_Func006Func001C takes nothing returns boolean
if ( not ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_map_init_Func007Func001C takes nothing returns boolean
if ( not ( GetPlayerSlotState(ConvertedPlayer(GetForLoopIndexA())) == PLAYER_SLOT_STATE_PLAYING ) ) then
return false
endif
return true
endfunction
function Trig_map_init_Actions takes nothing returns nothing
call StartTimerBJ( udg_LBTime, false, 99999.00 )
call InitGameCacheBJ( "allstars.w3v" )
set udg_classes = GetLastCreatedGameCacheBJ()
set udg_UDNum = ( CountPlayersInForceBJ(GetPlayersAllies(Player(6))) - 1 )
set udg_SNum = ( CountPlayersInForceBJ(GetPlayersAllies(Player(0))) - 1 )
set bj_forLoopAIndex = 2
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_map_init_Func006Func001C() ) then
call SetPlayerStateBJ( ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_GOLD, ( 3500 / udg_SNum ) )
call SetPlayerStateBJ( ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_LUMBER, 0 )
call SetPlayerStateBJ( ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_FOOD_CAP, 5 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 8
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_map_init_Func007Func001C() ) then
call SetPlayerStateBJ( ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_GOLD, ( 3500 / udg_UDNum ) )
call SetPlayerStateBJ( ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_LUMBER, 0 )
call SetPlayerStateBJ( ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_FOOD_CAP, 5 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_8840", "TRIGSTR_8841", "ReplaceableTextures\\CommandButtons\\BTNAmbush.blp" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_8842", "TRIGSTR_8843", "ReplaceableTextures\\CommandButtons\\BTNSlow.blp" )
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_8844", "TRIGSTR_8845", "ReplaceableTextures\\WorldEditUI\\StartingLocation.blp" )
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_8846", "TRIGSTR_8847", "ReplaceableTextures\\CommandButtons\\BTNAnimateDead.blp" )
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_8848", "TRIGSTR_8849", "ReplaceableTextures\\CommandButtons\\BTNSpy.blp" )
set udg_VersionString = " v6.00"
set udg_Colors[1] = "|c00ff0303"
set udg_Colors[2] = "|c000042ff"
set udg_Colors[3] = "|c001ce6b9"
set udg_Colors[4] = "|c00540081"
set udg_Colors[5] = "|c00fffc01"
set udg_Colors[6] = "|c00ff8000"
set udg_Colors[7] = "|c0020c000"
set udg_Colors[8] = "|c00e55bb0"
set udg_Colors[9] = "|c00959697"
set udg_Colors[10] = "|c007ebff1"
set udg_Colors[11] = "|c00106246"
set udg_Colors[12] = "|c004e2a04"
set udg_RandHero[1] = 'Nbrn'
set udg_RandHero[2] = 'Npbm'
set udg_RandHero[3] = 'Edem'
set udg_RandHero[4] = 'Hlgr'
set udg_RandHero[5] = 'Harf'
set udg_RandHero[6] = 'N016'
set udg_RandHero[7] = 'Nbbc'
set udg_RandHero[8] = 'Naka'
set udg_RandHero[9] = 'H000'
set udg_RandHero[10] = 'Orkn'
set udg_RandHero[11] = 'Emoo'
set udg_RandHero[12] = 'Emns'
set udg_RandHero[13] = 'O00P'
set udg_RandHero[14] = 'Usyl'
set udg_RandHero[15] = 'H004'
set udg_RandHero[16] = 'E005'
set udg_RandHero[17] = 'N01O'
set udg_RandHero[18] = 'HC92'
set udg_RandHero[19] = 'Hjai'
set udg_RandHero[20] = 'Hvwd'
set udg_RandHero[21] = 'HC49'
set udg_RandHero[22] = 'H00K'
set udg_RandHero[23] = 'H001'
set udg_RandHero[24] = 'Hmbr'
set udg_RandHero[25] = 'N01A'
set udg_RandHero[26] = 'Hamg'
set udg_RandHero[27] = 'Huth'
set udg_RandHero[28] = 'Ntin'
set udg_RandHero[29] = 'Hmkg'
set udg_RandHero[30] = 'Hblm'
set udg_RandHero[31] = 'Hpb2'
set udg_RandHero[32] = 'Hant'
set udg_RandHero[33] = 'Hdgo'
set udg_RandHero[34] = 'Ucrl'
set udg_RandHero[35] = 'Ogrh'
set udg_RandHero[36] = 'Otch'
set udg_RandHero[37] = 'E004'
set udg_RandHero[38] = 'EC77'
set udg_RandHero[39] = 'E002'
set udg_RandHero[40] = 'EC45'
set udg_RandHero[41] = 'U00A'
set udg_RandHero[42] = 'Ewar'
set udg_RandHero[43] = 'UC01'
set udg_RandHero[44] = 'U007'
set udg_RandHero[45] = 'UC91'
set udg_RandHero[46] = 'UC42'
set udg_RandHero[47] = 'U008'
set udg_RandHero[48] = 'U000'
set udg_RandHero[49] = 'NC00'
set udg_RandHero[50] = 'Ulic'
set udg_RandHero[51] = 'U006'
set udg_RandHero[52] = 'Ekee'
set udg_RandHero[53] = 'Udre'
set udg_RandHero[54] = 'UC76'
set udg_RandHero[55] = 'EC57'
set udg_RandHero[56] = 'UC18'
set udg_RandHero[57] = 'UC11'
set udg_RandHero[58] = 'H00V'
set udg_RandHero[59] = 'Eevi'
set udg_RandHero[60] = 'UC60'
set udg_RandHero[61] = 'H00H'
set udg_RandHero[62] = 'Ofar'
set udg_RandHero[63] = 'Oshd'
set udg_RandHero[64] = 'U00F'
set udg_RandHero[65] = 'U00K'
set udg_RandHero[66] = 'U00E'
set udg_RandHero[67] = 'Uanb'
set udg_RandHero[68] = 'Ubal'
set udg_RandHero[69] = 'Nfir'
set udg_RandHero[70] = 'Opgh'
set udg_RandHero[71] = 'Hvsh'
set udg_RandHero[72] = 'Uktl'
set udg_SpawnMultiplier[2] = 1
call SetUnitInvulnerable( gg_unit_eaom_0052, true )
call SetUnitInvulnerable( gg_unit_eaoe_0053, true )
call SetUnitInvulnerable( gg_unit_eaom_0055, true )
call SetUnitInvulnerable( gg_unit_eaoe_0054, true )
call SetUnitInvulnerable( gg_unit_eaoe_0057, true )
call SetUnitInvulnerable( gg_unit_eaom_0056, true )
call SetUnitInvulnerable( gg_unit_usep_0074, true )
call SetUnitInvulnerable( gg_unit_utod_0079, true )
call SetUnitInvulnerable( gg_unit_usep_0075, true )
call SetUnitInvulnerable( gg_unit_utod_0078, true )
call SetUnitInvulnerable( gg_unit_utod_0077, true )
call SetUnitInvulnerable( gg_unit_usep_0076, true )
call SetUnitInvulnerable( gg_unit_e011_0106, true )
call SetUnitInvulnerable( gg_unit_e011_0107, true )
call SetUnitInvulnerable( gg_unit_e011_0105, true )
call SetUnitInvulnerable( gg_unit_u00D_0101, true )
call SetUnitInvulnerable( gg_unit_u00D_0100, true )
call SetUnitInvulnerable( gg_unit_u00D_0099, true )
call SetUnitInvulnerable( gg_unit_uzg1_0073, true )
call SetUnitInvulnerable( gg_unit_uzg1_0071, true )
call SetUnitInvulnerable( gg_unit_uzg1_0072, true )
call SetUnitInvulnerable( gg_unit_etrp_0042, true )
call SetUnitInvulnerable( gg_unit_etrp_0043, true )
call SetUnitInvulnerable( gg_unit_etrp_0044, true )
call SetUnitInvulnerable( gg_unit_etol_0039, true )
call SetUnitInvulnerable( gg_unit_unpl_0080, true )
call SetUnitInvulnerable( gg_unit_edob_0069, true )
call SetUnitInvulnerable( gg_unit_edos_0070, true )
call SetUnitInvulnerable( gg_unit_eaow_0068, true )
call SetUnitInvulnerable( gg_unit_uslh_0095, true )
call SetUnitInvulnerable( gg_unit_ugrv_0094, true )
call SetUnitInvulnerable( gg_unit_usap_0093, true )
call SetUnitInvulnerable( gg_unit_e011_0040, true )
call SetUnitInvulnerable( gg_unit_e011_0041, true )
call SetUnitInvulnerable( gg_unit_u00D_0081, true )
call SetUnitInvulnerable( gg_unit_u00D_0082, true )
call SetUnitInvulnerable( gg_unit_emow_0065, true )
call SetUnitInvulnerable( gg_unit_emow_0064, true )
call SetUnitInvulnerable( gg_unit_emow_0066, true )
call SetUnitInvulnerable( gg_unit_emow_0062, true )
call SetUnitInvulnerable( gg_unit_emow_0063, true )
call SetUnitInvulnerable( gg_unit_emow_0067, true )
call SetUnitInvulnerable( gg_unit_emow_0059, true )
call SetUnitInvulnerable( gg_unit_emow_0061, true )
call SetUnitInvulnerable( gg_unit_emow_0058, true )
call SetUnitInvulnerable( gg_unit_emow_0060, true )
call SetUnitInvulnerable( gg_unit_uzig_0088, true )
call SetUnitInvulnerable( gg_unit_uzig_0087, true )
call SetUnitInvulnerable( gg_unit_uzig_0083, true )
call SetUnitInvulnerable( gg_unit_uzig_0084, true )
call SetUnitInvulnerable( gg_unit_uzig_0085, true )
call SetUnitInvulnerable( gg_unit_uzig_0092, true )
call SetUnitInvulnerable( gg_unit_uzig_0089, true )
call SetUnitInvulnerable( gg_unit_uzig_0090, true )
call SetUnitInvulnerable( gg_unit_uzig_0091, true )
call SetUnitInvulnerable( gg_unit_uzig_0118, true )
call SetUnitPathing( gg_unit_e008_0007, false )
call SetUnitPathing( gg_unit_e00A_0006, false )
call SetUnitPathing( gg_unit_e00B_0005, false )
call SetUnitPathing( gg_unit_e00D_0004, false )
call SetUnitPathing( gg_unit_e001_0008, false )
call SetUnitInvulnerable( gg_unit_e001_0008, true )
call SetUnitInvulnerable( gg_unit_e00D_0004, true )
call SetUnitInvulnerable( gg_unit_e00B_0005, true )
call SetUnitInvulnerable( gg_unit_e00A_0006, true )
call SetUnitInvulnerable( gg_unit_e008_0007, true )
call UnitAddAbilityBJ( 'Aloc', gg_unit_e00A_0006 )
call UnitAddAbilityBJ( 'ANab', gg_unit_e00B_0005)
call UnitAddAbilityBJ( 'ANab', gg_unit_e00D_0004 )
call UnitAddAbilityBJ( 'ANab', gg_unit_e008_0007 )
call UnitAddAbilityBJ( 'ANab', gg_unit_e001_0008 )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_map_init takes nothing returns nothing
set gg_trg_map_init = CreateTrigger( )
call TriggerAddAction( gg_trg_map_init, function Trig_map_init_Actions )
endfunction
function Trig_OneMinElapsed_Actions takes nothing returns nothing
set udg_OneMin = true
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_OneMinElapsed takes nothing returns nothing
set gg_trg_OneMinElapsed = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_OneMinElapsed, 65.00 )
call TriggerAddAction( gg_trg_OneMinElapsed, function Trig_OneMinElapsed_Actions )
endfunction
function Trig_RoshanDies_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n00L' ) ) then
return false
endif
return true
endfunction
function Trig_RoshanDies_Func001Func004C takes nothing returns boolean
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(0) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(1) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(2) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(3) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(5) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(4) ) ) then
return true
endif
return false
endfunction
function Trig_RoshanDies_Func001C takes nothing returns boolean
if ( not Trig_RoshanDies_Func001Func004C() ) then
return false
endif
return true
endfunction
function Trig_RoshanDies_Func002Func004C takes nothing returns boolean
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(6) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(7) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(8) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(9) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(10) ) ) then
return true
endif
if ( ( GetOwningPlayer(GetKillingUnitBJ()) == Player(11) ) ) then
return true
endif
return false
endfunction
function Trig_RoshanDies_Func002C takes nothing returns boolean
if ( not Trig_RoshanDies_Func002Func004C() ) then
return false
endif
return true
endfunction
function Trig_RoshanDies_Actions takes nothing returns nothing
if ( Trig_RoshanDies_Func001C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8850" )
set bj_forLoopAIndex = 2
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AdjustPlayerStateBJ( 800, ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_GOLD )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
if ( Trig_RoshanDies_Func002C() ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8851" )
set bj_forLoopAIndex = 8
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call AdjustPlayerStateBJ( 800, ConvertedPlayer(GetForLoopIndexA()), PLAYER_STATE_RESOURCE_GOLD )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call DoNothing( )
endif
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_RoshanDies takes nothing returns nothing
set gg_trg_RoshanDies = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_RoshanDies, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_RoshanDies, Condition( function Trig_RoshanDies_Conditions ) )
call TriggerAddAction( gg_trg_RoshanDies, function Trig_RoshanDies_Actions )
endfunction
function Trig_ItemSpawn_Conditions takes nothing returns boolean
if ( not ( udg_Powerups == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func003002 takes nothing returns nothing
set udg_PickedItems = GetEnumItem()
endfunction
function Trig_ItemSpawn_Func004C takes nothing returns boolean
if ( not ( udg_PickedItems == null ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func006002 takes nothing returns nothing
set udg_PickedItems = GetEnumItem()
endfunction
function Trig_ItemSpawn_Func007C takes nothing returns boolean
if ( not ( udg_PickedItems == null ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func008Func003C takes nothing returns boolean
if ( not ( udg_ItemRand == 1 ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func008Func004C takes nothing returns boolean
if ( not ( udg_ItemRand == 2 ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func008Func005C takes nothing returns boolean
if ( not ( udg_ItemRand == 3 ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func008Func006C takes nothing returns boolean
if ( not ( udg_ItemRand == 4 ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func008Func007C takes nothing returns boolean
if ( not ( udg_ItemRand == 5 ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func008Func008C takes nothing returns boolean
if ( not ( udg_ItemRand == 6 ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func008Func009C takes nothing returns boolean
if ( not ( udg_ItemRand == 7 ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func008Func010C takes nothing returns boolean
if ( not ( udg_ItemRand == 8 ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Func008C takes nothing returns boolean
if ( not ( udg_ItemTaken[1] == true ) ) then
return false
endif
if ( not ( udg_ItemTaken[2] == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSpawn_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
set udg_PickedItems = null
call EnumItemsInRectBJ( gg_rct_ItemSpawn1, function Trig_ItemSpawn_Func003002 )
if ( Trig_ItemSpawn_Func004C() ) then
set udg_ItemTaken[1] = true
else
set udg_ItemTaken[1] = false
endif
set udg_PickedItems = null
call EnumItemsInRectBJ( gg_rct_ItemSpawn2, function Trig_ItemSpawn_Func006002 )
if ( Trig_ItemSpawn_Func007C() ) then
set udg_ItemTaken[2] = true
else
set udg_ItemTaken[2] = false
endif
if ( Trig_ItemSpawn_Func008C() ) then
set udg_ItemRand = GetRandomInt(1, 8)
if ( Trig_ItemSpawn_Func008Func003C() ) then
call CreateItemLoc( 'fgrd', GetRectCenter(gg_rct_ItemSpawn1) )
else
call DoNothing( )
endif
if ( Trig_ItemSpawn_Func008Func004C() ) then
call CreateItemLoc( 'pres', GetRectCenter(gg_rct_ItemSpawn1) )
else
call DoNothing( )
endif
if ( Trig_ItemSpawn_Func008Func005C() ) then
call CreateItemLoc( 'pomn', GetRectCenter(gg_rct_ItemSpawn1) )
else
call DoNothing( )
endif
if ( Trig_ItemSpawn_Func008Func006C() ) then
call CreateItemLoc( 'pnvu', GetRectCenter(gg_rct_ItemSpawn1) )
else
call DoNothing( )
endif
if ( Trig_ItemSpawn_Func008Func007C() ) then
call CreateItemLoc( 'fgrd', GetRectCenter(gg_rct_ItemSpawn2) )
else
call DoNothing( )
endif
if ( Trig_ItemSpawn_Func008Func008C() ) then
call CreateItemLoc( 'pres', GetRectCenter(gg_rct_ItemSpawn2) )
else
call DoNothing( )
endif
if ( Trig_ItemSpawn_Func008Func009C() ) then
call CreateItemLoc( 'pomn', GetRectCenter(gg_rct_ItemSpawn2) )
else
call DoNothing( )
endif
if ( Trig_ItemSpawn_Func008Func010C() ) then
call CreateItemLoc( 'pnvu', GetRectCenter(gg_rct_ItemSpawn2) )
else
call DoNothing( )
endif
set udg_ItemTaken[1] = false
set udg_ItemTaken[2] = false
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_ItemSpawn takes nothing returns nothing
set gg_trg_ItemSpawn = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_ItemSpawn, 75.00 )
call TriggerAddCondition( gg_trg_ItemSpawn, Condition( function Trig_ItemSpawn_Conditions ) )
call TriggerAddAction( gg_trg_ItemSpawn, function Trig_ItemSpawn_Actions )
endfunction
function Trig_SentLMove_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(0) ) ) then
return false
endif
return true
endfunction
function Trig_SentLMove_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetTriggerUnit(), "attack", GetUnitLoc(gg_unit_e00D_0004) )
endfunction
//===========================================================================
function InitTrig_SentLMove takes nothing returns nothing
set gg_trg_SentLMove = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_SentLMove, gg_rct_War_N )
call TriggerRegisterEnterRectSimple( gg_trg_SentLMove, gg_rct_Lore_N )
call TriggerAddCondition( gg_trg_SentLMove, Condition( function Trig_SentLMove_Conditions ) )
call TriggerAddAction( gg_trg_SentLMove, function Trig_SentLMove_Actions )
endfunction
function Trig_ScouLMove_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(6) ) ) then
return false
endif
return true
endfunction
function Trig_ScouLMove_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetTriggerUnit(), "attack", GetUnitLoc(gg_unit_e00D_0004) )
endfunction
//===========================================================================
function InitTrig_ScouLMove takes nothing returns nothing
set gg_trg_ScouLMove = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_ScouLMove, gg_rct_Crypt_W )
call TriggerRegisterEnterRectSimple( gg_trg_ScouLMove, gg_rct_Temple_W )
call TriggerAddCondition( gg_trg_ScouLMove, Condition( function Trig_ScouLMove_Conditions ) )
call TriggerAddAction( gg_trg_ScouLMove, function Trig_ScouLMove_Actions )
endfunction
function Trig_SentMMove_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(0) ) ) then
return false
endif
return true
endfunction
function Trig_SentMMove_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetTriggerUnit(), "attack", GetUnitLoc(gg_unit_e00B_0005) )
endfunction
//===========================================================================
function InitTrig_SentMMove takes nothing returns nothing
set gg_trg_SentMMove = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_SentMMove, gg_rct_War_NE )
call TriggerRegisterEnterRectSimple( gg_trg_SentMMove, gg_rct_Lore_NE )
call TriggerAddCondition( gg_trg_SentMMove, Condition( function Trig_SentMMove_Conditions ) )
call TriggerAddAction( gg_trg_SentMMove, function Trig_SentMMove_Actions )
endfunction
function Trig_ScouMMove_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(6) ) ) then
return false
endif
return true
endfunction
function Trig_ScouMMove_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetTriggerUnit(), "attack", GetUnitLoc(gg_unit_e00B_0005) )
endfunction
//===========================================================================
function InitTrig_ScouMMove takes nothing returns nothing
set gg_trg_ScouMMove = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_ScouMMove, gg_rct_Temple_SW )
call TriggerRegisterEnterRectSimple( gg_trg_ScouMMove, gg_rct_Crypt_SW )
call TriggerAddCondition( gg_trg_ScouMMove, Condition( function Trig_ScouMMove_Conditions ) )
call TriggerAddAction( gg_trg_ScouMMove, function Trig_ScouMMove_Actions )
endfunction
function Trig_SentRMove_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(0) ) ) then
return false
endif
return true
endfunction
function Trig_SentRMove_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetTriggerUnit(), "attack", GetUnitLoc(gg_unit_e00A_0006) )
endfunction
//===========================================================================
function InitTrig_SentRMove takes nothing returns nothing
set gg_trg_SentRMove = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_SentRMove, gg_rct_Lore_E )
call TriggerRegisterEnterRectSimple( gg_trg_SentRMove, gg_rct_War_E )
call TriggerAddCondition( gg_trg_SentRMove, Condition( function Trig_SentRMove_Conditions ) )
call TriggerAddAction( gg_trg_SentRMove, function Trig_SentRMove_Actions )
endfunction
function Trig_ScouRMove_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(6) ) ) then
return false
endif
return true
endfunction
function Trig_ScouRMove_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetTriggerUnit(), "attack", GetUnitLoc(gg_unit_e00A_0006) )
endfunction
//===========================================================================
function InitTrig_ScouRMove takes nothing returns nothing
set gg_trg_ScouRMove = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_ScouRMove, gg_rct_Temple_S )
call TriggerRegisterEnterRectSimple( gg_trg_ScouRMove, gg_rct_Crypt_S )
call TriggerAddCondition( gg_trg_ScouRMove, Condition( function Trig_ScouRMove_Conditions ) )
call TriggerAddAction( gg_trg_ScouRMove, function Trig_ScouRMove_Actions )
endfunction
function Trig_elapsed10_Actions takes nothing returns nothing
set udg_SpawnBadAss[1] = true
set udg_SpawnBadAss[2] = true
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_elapsed10 takes nothing returns nothing
set gg_trg_elapsed10 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_elapsed10, 590.00 )
call TriggerAddAction( gg_trg_elapsed10, function Trig_elapsed10_Actions )
endfunction
function Trig_elapsed20_Actions takes nothing returns nothing
set udg_SpawnBadAss[3] = true
set udg_SpawnBadAss[4] = true
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_elapsed20 takes nothing returns nothing
set gg_trg_elapsed20 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_elapsed20, 1190.00 )
call TriggerAddAction( gg_trg_elapsed20, function Trig_elapsed20_Actions )
endfunction
function Trig_elapsed30_Actions takes nothing returns nothing
set udg_SpawnBadAss[5] = true
set udg_SpawnBadAss[6] = true
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_elapsed30 takes nothing returns nothing
set gg_trg_elapsed30 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_elapsed30, 1790.00 )
call TriggerAddAction( gg_trg_elapsed30, function Trig_elapsed30_Actions )
endfunction
function Trig_spawn_multipler_Actions takes nothing returns nothing
set udg_SpawnMultiplier[1] = ( udg_SpawnMultiplier[1] + 1 )
endfunction
//===========================================================================
function InitTrig_spawn_multipler takes nothing returns nothing
set gg_trg_spawn_multipler = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_spawn_multipler, 1199.00 )
call TriggerRegisterTimerEventSingle( gg_trg_spawn_multipler, 2398.00 )
call TriggerRegisterTimerEventSingle( gg_trg_spawn_multipler, 3597.00 )
call TriggerAddAction( gg_trg_spawn_multipler, function Trig_spawn_multipler_Actions )
endfunction
function Trig_spawn_multiplier_range_Actions takes nothing returns nothing
set udg_SpawnMultiplier[2] = ( udg_SpawnMultiplier[2] + 1 )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_spawn_multiplier_range takes nothing returns nothing
set gg_trg_spawn_multiplier_range = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_spawn_multiplier_range, 3599.00 )
call TriggerAddAction( gg_trg_spawn_multiplier_range, function Trig_spawn_multiplier_range_Actions )
endfunction
function Trig_CreepSpawn_Func001Func003C takes nothing returns boolean
if ( not ( udg_RandNumCp == 1 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func001Func004C takes nothing returns boolean
if ( not ( udg_RandNumCp == 2 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func001Func005C takes nothing returns boolean
if ( not ( udg_RandNumCp == 3 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func001C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_CreepRegion1)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func002Func003C takes nothing returns boolean
if ( not ( udg_RandNumCp == 1 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func002Func004C takes nothing returns boolean
if ( not ( udg_RandNumCp == 2 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func002Func005C takes nothing returns boolean
if ( not ( udg_RandNumCp == 3 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func002C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_CreepRegion8)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func003Func003C takes nothing returns boolean
if ( not ( udg_RandNumCp == 1 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func003Func004C takes nothing returns boolean
if ( not ( udg_RandNumCp == 2 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func003Func005C takes nothing returns boolean
if ( not ( udg_RandNumCp == 3 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func003C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_Creep_region_2)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func004Func003C takes nothing returns boolean
if ( not ( udg_RandNumCp == 1 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func004Func004C takes nothing returns boolean
if ( not ( udg_RandNumCp == 2 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func004Func005C takes nothing returns boolean
if ( not ( udg_RandNumCp == 3 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func004C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_CreepRegion7)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func005Func003C takes nothing returns boolean
if ( not ( udg_RandNumCp == 1 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func005Func004C takes nothing returns boolean
if ( not ( udg_RandNumCp == 2 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func005Func005C takes nothing returns boolean
if ( not ( udg_RandNumCp == 3 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func005Func006C takes nothing returns boolean
if ( not ( udg_RandNumCp == 4 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func005Func007C takes nothing returns boolean
if ( not ( udg_RandNumCp == 5 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func005Func008C takes nothing returns boolean
if ( not ( udg_RandNumCp == 6 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func005C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_CreepRegion4)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func006Func003C takes nothing returns boolean
if ( not ( udg_RandNumCp == 1 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func006Func004C takes nothing returns boolean
if ( not ( udg_RandNumCp == 2 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func006Func005C takes nothing returns boolean
if ( not ( udg_RandNumCp == 3 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func006Func006C takes nothing returns boolean
if ( not ( udg_RandNumCp == 4 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func006Func007C takes nothing returns boolean
if ( not ( udg_RandNumCp == 5 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func006Func008C takes nothing returns boolean
if ( not ( udg_RandNumCp == 6 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func006C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_CreepRegion3)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func007Func003C takes nothing returns boolean
if ( not ( udg_RandNumCp == 1 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func007Func004C takes nothing returns boolean
if ( not ( udg_RandNumCp == 2 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func007Func005C takes nothing returns boolean
if ( not ( udg_RandNumCp == 3 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func007Func006C takes nothing returns boolean
if ( not ( udg_RandNumCp == 4 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func007Func007C takes nothing returns boolean
if ( not ( udg_RandNumCp == 5 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func007Func008C takes nothing returns boolean
if ( not ( udg_RandNumCp == 6 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func007C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_CreepRegion5)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func008Func003C takes nothing returns boolean
if ( not ( udg_RandNumCp == 1 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func008Func004C takes nothing returns boolean
if ( not ( udg_RandNumCp == 2 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func008Func005C takes nothing returns boolean
if ( not ( udg_RandNumCp == 3 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func008Func006C takes nothing returns boolean
if ( not ( udg_RandNumCp == 4 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func008Func007C takes nothing returns boolean
if ( not ( udg_RandNumCp == 5 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func008Func008C takes nothing returns boolean
if ( not ( udg_RandNumCp == 6 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func008C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_CreepRegion6)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func009C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_CreepRegion9)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Func010C takes nothing returns boolean
if ( not ( CountUnitsInGroup(GetUnitsInRectAll(gg_rct_CreepRegion10)) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_CreepSpawn_Actions takes nothing returns nothing
if ( Trig_CreepSpawn_Func001C() ) then
set udg_RandNumCp = GetRandomInt(1, 3)
if ( Trig_CreepSpawn_Func001Func003C() ) then
call CreateNUnitsAtLoc( 2, 'nbdo', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion1), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nbds', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion1), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func001Func004C() ) then
call CreateNUnitsAtLoc( 2, 'ngst', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion1), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nggr', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion1), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func001Func005C() ) then
call CreateNUnitsAtLoc( 2, 'nbdk', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion1), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nbwm', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion1), bj_UNIT_FACING )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func002C() ) then
set udg_RandNumCp = GetRandomInt(1, 3)
if ( Trig_CreepSpawn_Func002Func003C() ) then
call CreateNUnitsAtLoc( 2, 'nbdo', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion8), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nbds', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion8), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func002Func004C() ) then
call CreateNUnitsAtLoc( 2, 'ngst', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion8), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nggr', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion8), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func002Func005C() ) then
call CreateNUnitsAtLoc( 2, 'nbdk', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion8), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nbwm', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion8), bj_UNIT_FACING )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func003C() ) then
set udg_RandNumCp = GetRandomInt(1, 3)
if ( Trig_CreepSpawn_Func003Func003C() ) then
call CreateNUnitsAtLoc( 2, 'nogm', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_Creep_region_2), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nomg', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_Creep_region_2), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func003Func004C() ) then
call CreateNUnitsAtLoc( 1, 'nfpc', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_Creep_region_2), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nfpu', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_Creep_region_2), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func003Func005C() ) then
call CreateNUnitsAtLoc( 1, 'nsth', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_Creep_region_2), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nstl', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_Creep_region_2), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nsat', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_Creep_region_2), bj_UNIT_FACING )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func004C() ) then
set udg_RandNumCp = GetRandomInt(1, 3)
if ( Trig_CreepSpawn_Func004Func003C() ) then
call CreateNUnitsAtLoc( 2, 'nogm', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion7), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nomg', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion7), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func004Func004C() ) then
call CreateNUnitsAtLoc( 1, 'nfpc', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion7), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nfpu', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion7), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func004Func005C() ) then
call CreateNUnitsAtLoc( 1, 'nsth', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion7), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nstl', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion7), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nsat', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion7), bj_UNIT_FACING )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func005C() ) then
set udg_RandNumCp = GetRandomInt(1, 6)
if ( Trig_CreepSpawn_Func005Func003C() ) then
call CreateNUnitsAtLoc( 3, 'nwlg', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func005Func004C() ) then
call CreateNUnitsAtLoc( 2, 'nstl', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 2, 'nsat', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func005Func005C() ) then
call CreateNUnitsAtLoc( 2, 'ngst', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func005Func006C() ) then
call CreateNUnitsAtLoc( 1, 'nkol', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 3, 'nkob', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nkot', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func005Func007C() ) then
call CreateNUnitsAtLoc( 2, 'nftb', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nfsh', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func005Func008C() ) then
call CreateNUnitsAtLoc( 1, 'ncnk', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncen', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion4), bj_UNIT_FACING )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func006C() ) then
set udg_RandNumCp = GetRandomInt(1, 6)
if ( Trig_CreepSpawn_Func006Func003C() ) then
call CreateNUnitsAtLoc( 3, 'nwlg', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func006Func004C() ) then
call CreateNUnitsAtLoc( 2, 'nstl', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 2, 'nsat', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func006Func005C() ) then
call CreateNUnitsAtLoc( 2, 'ngst', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func006Func006C() ) then
call CreateNUnitsAtLoc( 1, 'nkol', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 3, 'nkob', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nkot', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func006Func007C() ) then
call CreateNUnitsAtLoc( 2, 'nftb', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nfsh', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func006Func008C() ) then
call CreateNUnitsAtLoc( 1, 'ncnk', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncen', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion3), bj_UNIT_FACING )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func007C() ) then
set udg_RandNumCp = GetRandomInt(1, 6)
if ( Trig_CreepSpawn_Func007Func003C() ) then
call CreateNUnitsAtLoc( 3, 'nwlg', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func007Func004C() ) then
call CreateNUnitsAtLoc( 2, 'nstl', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 2, 'nsat', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func007Func005C() ) then
call CreateNUnitsAtLoc( 2, 'ngst', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func007Func006C() ) then
call CreateNUnitsAtLoc( 1, 'nkol', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 3, 'nkob', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nkot', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func007Func007C() ) then
call CreateNUnitsAtLoc( 2, 'nftb', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nfsh', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func007Func008C() ) then
call CreateNUnitsAtLoc( 1, 'ncnk', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncen', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion5), bj_UNIT_FACING )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func008C() ) then
set udg_RandNumCp = GetRandomInt(1, 6)
if ( Trig_CreepSpawn_Func008Func003C() ) then
call CreateNUnitsAtLoc( 3, 'nwlg', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func008Func004C() ) then
call CreateNUnitsAtLoc( 2, 'nstl', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 2, 'nsat', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func008Func005C() ) then
call CreateNUnitsAtLoc( 2, 'ngst', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func008Func006C() ) then
call CreateNUnitsAtLoc( 1, 'nkol', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 3, 'nkob', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nkot', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func008Func007C() ) then
call CreateNUnitsAtLoc( 2, 'nftb', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'nfsh', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func008Func008C() ) then
call CreateNUnitsAtLoc( 1, 'ncnk', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'ncen', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion6), bj_UNIT_FACING )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func009C() ) then
call CreateNUnitsAtLoc( 3, 'ngns', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion9), bj_UNIT_FACING )
else
call DoNothing( )
endif
if ( Trig_CreepSpawn_Func010C() ) then
call CreateNUnitsAtLoc( 3, 'nftt', Player(PLAYER_NEUTRAL_AGGRESSIVE), GetRectCenter(gg_rct_CreepRegion10), bj_UNIT_FACING )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_CreepSpawn takes nothing returns nothing
set gg_trg_CreepSpawn = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_CreepSpawn, 90.00 )
call TriggerAddAction( gg_trg_CreepSpawn, function Trig_CreepSpawn_Actions )
endfunction
function Trig_Spawn_Conditions takes nothing returns boolean
if ( not ( udg_OneMin == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func002Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[3] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func002C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[3] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func004Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[2] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func004C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[2] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func006Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[1] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func006C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[1] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func008Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[4] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func008C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[4] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func010Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[5] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func010C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[5] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func012Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[6] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func012C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[6] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func014Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[7] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func014C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[7] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func016Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[8] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func016C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[8] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func018Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[9] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func018C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[9] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func020Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[10] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func020C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[10] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func022Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[11] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func022C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[11] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func024Func001C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[12] == true ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Func024C takes nothing returns boolean
if ( not ( udg_SpawnMRLMR[12] == false ) ) then
return false
endif
return true
endfunction
function Trig_Spawn_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
if ( Trig_Spawn_Func002C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'u001', Player(6), GetRectCenter(gg_rct_Crypt_S), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func002Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'ugho', Player(6), GetRectCenter(gg_rct_Crypt_S), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00A_0006) )
if ( Trig_Spawn_Func004C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'u001', Player(6), GetRectCenter(gg_rct_Crypt_SW), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func004Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'ugho', Player(6), GetRectCenter(gg_rct_Crypt_SW), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00B_0005) )
if ( Trig_Spawn_Func006C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'u001', Player(6), GetRectCenter(gg_rct_Crypt_W), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func006Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'ugho', Player(6), GetRectCenter(gg_rct_Crypt_W), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00D_0004) )
if ( Trig_Spawn_Func008C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'u002', Player(6), GetRectCenter(gg_rct_Temple_W), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func008Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'unec', Player(6), GetRectCenter(gg_rct_Temple_W), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00D_0004) )
if ( Trig_Spawn_Func010C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'u002', Player(6), GetRectCenter(gg_rct_Temple_SW), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func010Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'unec', Player(6), GetRectCenter(gg_rct_Temple_SW), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00B_0005) )
if ( Trig_Spawn_Func012C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'u002', Player(6), GetRectCenter(gg_rct_Temple_S), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func012Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'unec', Player(6), GetRectCenter(gg_rct_Temple_S), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00A_0006) )
if ( Trig_Spawn_Func014C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'e00V', Player(0), GetRectCenter(gg_rct_War_N), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func014Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'esen', Player(0), GetRectCenter(gg_rct_War_N), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00D_0004) )
if ( Trig_Spawn_Func016C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'e00V', Player(0), GetRectCenter(gg_rct_War_NE), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func016Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'esen', Player(0), GetRectCenter(gg_rct_War_NE), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00B_0005) )
if ( Trig_Spawn_Func018C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'e00V', Player(0), GetRectCenter(gg_rct_War_E), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func018Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[1], 'esen', Player(0), GetRectCenter(gg_rct_War_E), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00A_0006) )
if ( Trig_Spawn_Func020C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'e00W', Player(0), GetRectCenter(gg_rct_Lore_N), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func020Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'edry', Player(0), GetRectCenter(gg_rct_Lore_N), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00D_0004) )
if ( Trig_Spawn_Func022C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'e00W', Player(0), GetRectCenter(gg_rct_Lore_NE), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func022Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'edry', Player(0), GetRectCenter(gg_rct_Lore_NE), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00B_0005) )
if ( Trig_Spawn_Func024C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'e00W', Player(0), GetRectCenter(gg_rct_Lore_E), bj_UNIT_FACING )
else
if ( Trig_Spawn_Func024Func001C() ) then
call CreateNUnitsAtLoc( udg_SpawnMultiplier[2], 'edry', Player(0), GetRectCenter(gg_rct_Lore_E), bj_UNIT_FACING )
else
call DoNothing( )
endif
endif
call GroupPointOrderLocBJ( GetLastCreatedGroup(), "attack", GetUnitLoc(gg_unit_e00A_0006) )
endfunction
//===========================================================================
function InitTrig_Spawn takes nothing returns nothing
set gg_trg_Spawn = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Spawn, 30.00 )
call TriggerAddCondition( gg_trg_Spawn, Condition( function Trig_Spawn_Conditions ) )
call TriggerAddAction( gg_trg_Spawn, function Trig_Spawn_Actions )
endfunction
function Trig_SpawnGolemFish_Func001C takes nothing returns boolean
if ( ( udg_SpawnBadAss[1] == true ) ) then
return true
endif
if ( ( udg_SpawnBadAss[2] == true ) ) then
return true
endif
if ( ( udg_SpawnBadAss[3] == true ) ) then
return true
endif
if ( ( udg_SpawnBadAss[4] == true ) ) then
return true
endif
return false
endfunction
function Trig_SpawnGolemFish_Conditions takes nothing returns boolean
if ( not Trig_SpawnGolemFish_Func001C() ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func003C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[1] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 2 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func004C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[1] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 3 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func005C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[1] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 4 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func006C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[2] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 5 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func007C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[2] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 6 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func008C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[2] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 7 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func009C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[3] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 8 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func010C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[3] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 9 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func011C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[3] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 10 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func012C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[4] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 11 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func013C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[4] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 12 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Func014C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[4] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 13 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnGolemFish_Actions takes nothing returns nothing
set udg_CreepRand = GetRandomInt(1, 30)
if ( Trig_SpawnGolemFish_Func003C() ) then
set udg_SpawnBadAss[1] = false
call CreateNUnitsAtLoc( 1, 'n00F', Player(0), GetRectCenter(gg_rct_Lore_E), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8852" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func004C() ) then
set udg_SpawnBadAss[1] = false
call CreateNUnitsAtLoc( 1, 'n00F', Player(0), GetRectCenter(gg_rct_Lore_N), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8853" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func005C() ) then
set udg_SpawnBadAss[1] = false
call CreateNUnitsAtLoc( 1, 'n00F', Player(0), GetRectCenter(gg_rct_Lore_NE), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8854" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func006C() ) then
set udg_SpawnBadAss[2] = false
call CreateNUnitsAtLoc( 1, 'n00F', Player(6), GetRectCenter(gg_rct_Temple_S), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8855" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func007C() ) then
set udg_SpawnBadAss[2] = false
call CreateNUnitsAtLoc( 1, 'n00F', Player(6), GetRectCenter(gg_rct_Temple_W), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8856" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func008C() ) then
set udg_SpawnBadAss[2] = false
call CreateNUnitsAtLoc( 1, 'n00F', Player(6), GetRectCenter(gg_rct_Temple_SW), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8857" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func009C() ) then
set udg_SpawnBadAss[3] = false
call CreateNUnitsAtLoc( 1, 'n00E', Player(0), GetRectCenter(gg_rct_Lore_E), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8858" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func010C() ) then
set udg_SpawnBadAss[3] = false
call CreateNUnitsAtLoc( 1, 'n00E', Player(0), GetRectCenter(gg_rct_Lore_N), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8859" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func011C() ) then
set udg_SpawnBadAss[3] = false
call CreateNUnitsAtLoc( 1, 'n00E', Player(0), GetRectCenter(gg_rct_Lore_NE), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8860" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func012C() ) then
set udg_SpawnBadAss[4] = false
call CreateNUnitsAtLoc( 1, 'n00E', Player(6), GetRectCenter(gg_rct_Temple_S), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8861" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func013C() ) then
set udg_SpawnBadAss[4] = false
call CreateNUnitsAtLoc( 1, 'n00E', Player(6), GetRectCenter(gg_rct_Temple_W), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8862" )
else
call DoNothing( )
endif
if ( Trig_SpawnGolemFish_Func014C() ) then
set udg_SpawnBadAss[4] = false
call CreateNUnitsAtLoc( 1, 'n00E', Player(6), GetRectCenter(gg_rct_Temple_SW), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8863" )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_SpawnGolemFish takes nothing returns nothing
set gg_trg_SpawnGolemFish = CreateTrigger( )
call DisableTrigger( gg_trg_SpawnGolemFish )
call TriggerRegisterTimerEventPeriodic( gg_trg_SpawnGolemFish, 30.00 )
call TriggerAddCondition( gg_trg_SpawnGolemFish, Condition( function Trig_SpawnGolemFish_Conditions ) )
call TriggerAddAction( gg_trg_SpawnGolemFish, function Trig_SpawnGolemFish_Actions )
endfunction
function Trig_SpawnHydra_Func001C takes nothing returns boolean
if ( ( udg_SpawnBadAss[5] == true ) ) then
return true
endif
if ( ( udg_SpawnBadAss[6] == true ) ) then
return true
endif
return false
endfunction
function Trig_SpawnHydra_Conditions takes nothing returns boolean
if ( not Trig_SpawnHydra_Func001C() ) then
return false
endif
return true
endfunction
function Trig_SpawnHydra_Func003C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[5] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 2 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnHydra_Func004C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[5] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 3 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnHydra_Func005C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[5] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 4 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnHydra_Func006C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[6] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 5 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnHydra_Func007C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[6] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 6 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnHydra_Func008C takes nothing returns boolean
if ( not ( udg_SpawnBadAss[6] == true ) ) then
return false
endif
if ( not ( udg_CreepRand == 7 ) ) then
return false
endif
return true
endfunction
function Trig_SpawnHydra_Actions takes nothing returns nothing
set udg_CreepRand = GetRandomInt(1, 60)
if ( Trig_SpawnHydra_Func003C() ) then
call CreateNUnitsAtLoc( 1, 'n00D', Player(0), GetRectCenter(gg_rct_Lore_E), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8864" )
else
call DoNothing( )
endif
if ( Trig_SpawnHydra_Func004C() ) then
call CreateNUnitsAtLoc( 1, 'n00D', Player(0), GetRectCenter(gg_rct_Lore_N), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8865" )
else
call DoNothing( )
endif
if ( Trig_SpawnHydra_Func005C() ) then
call CreateNUnitsAtLoc( 1, 'n00D', Player(0), GetRectCenter(gg_rct_Lore_NE), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8866" )
else
call DoNothing( )
endif
if ( Trig_SpawnHydra_Func006C() ) then
call CreateNUnitsAtLoc( 1, 'n00D', Player(6), GetRectCenter(gg_rct_Temple_S), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8867" )
else
call DoNothing( )
endif
if ( Trig_SpawnHydra_Func007C() ) then
call CreateNUnitsAtLoc( 1, 'n00D', Player(6), GetRectCenter(gg_rct_Temple_W), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8868" )
else
call DoNothing( )
endif
if ( Trig_SpawnHydra_Func008C() ) then
call CreateNUnitsAtLoc( 1, 'n00D', Player(6), GetRectCenter(gg_rct_Temple_SW), bj_UNIT_FACING )
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "TRIGSTR_8869" )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_SpawnHydra takes nothing returns nothing
set gg_trg_SpawnHydra = CreateTrigger( )
call DisableTrigger( gg_trg_SpawnHydra )
call TriggerRegisterTimerEventPeriodic( gg_trg_SpawnHydra, 30.00 )
call TriggerAddCondition( gg_trg_SpawnHydra, Condition( function Trig_SpawnHydra_Conditions ) )
call TriggerAddAction( gg_trg_SpawnHydra, function Trig_SpawnHydra_Actions )
endfunction
function Trig_Consumable_charge_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetItemType(GetManipulatedItem()) == ITEM_TYPE_PURCHASABLE ) ) then
return false
endif
return true
endfunction
function Trig_Consumable_charge_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
set udg_Consumable = GetLastRemovedItem()
call UnitRemoveItemSwapped( GetItemOfTypeFromUnitBJ(GetManipulatingUnit(), GetItemTypeId(GetManipulatedItem())), GetManipulatingUnit() )
call SetItemCharges( udg_Consumable, ( GetItemCharges(GetLastRemovedItem()) + GetItemCharges(udg_Consumable) ) )
call UnitAddItemSwapped( udg_Consumable, GetTriggerUnit() )
call RemoveItem( GetLastRemovedItem() )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Consumable_charge takes nothing returns nothing
set gg_trg_Consumable_charge = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Consumable_charge, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Consumable_charge, Condition( function Trig_Consumable_charge_Conditions ) )
call TriggerAddAction( gg_trg_Consumable_charge, function Trig_Consumable_charge_Actions )
endfunction
function Trig_Aghanims_Scepter_Func006C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Hjai' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00V' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Emns' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'UC18' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00H' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Orkn' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H004' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Ekee' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Ulic' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Hmbr' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'UC01' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'EC57' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Hmkg' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Hblm' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'U00E' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'E005' ) ) then
return true
endif
return false
endfunction
function Trig_Aghanims_Scepter_Conditions takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ram2') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'oslo') == true ) ) then
return false
endif
if ( not Trig_Aghanims_Scepter_Func006C() ) then
return false
endif
return true
endfunction
function Trig_Aghanims_Scepter_Func007Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Ulic' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00V' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Ekee' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'UC18' ) ) then
return true
endif
return false
endfunction
function Trig_Aghanims_Scepter_Func007C takes nothing returns boolean
if ( not Trig_Aghanims_Scepter_Func007Func001C() ) then
return false
endif
return true
endfunction
function Trig_Aghanims_Scepter_Func008Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H00H' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Emns' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'H004' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Hmbr' ) ) then
return true
endif
return false
endfunction
function Trig_Aghanims_Scepter_Func008C takes nothing returns boolean
if ( not Trig_Aghanims_Scepter_Func008Func001C() ) then
return false
endif
return true
endfunction
function Trig_Aghanims_Scepter_Func009Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Hjai' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Orkn' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'UC01' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'EC57' ) ) then
return true
endif
return false
endfunction
function Trig_Aghanims_Scepter_Func009C takes nothing returns boolean
if ( not Trig_Aghanims_Scepter_Func009Func001C() ) then
return false
endif
return true
endfunction
function Trig_Aghanims_Scepter_Func010Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Hblm' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'U00E' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'E005' ) ) then
return true
endif
return false
endfunction
function Trig_Aghanims_Scepter_Func010C takes nothing returns boolean
if ( not Trig_Aghanims_Scepter_Func010Func001C() ) then
return false
endif
return true
endfunction
function Trig_Aghanims_Scepter_Func011Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Hmkg' ) ) then
return true
endif
return false
endfunction
function Trig_Aghanims_Scepter_Func011C takes nothing returns boolean
if ( not Trig_Aghanims_Scepter_Func011Func001C() ) then
return false
endif
return true
endfunction
function Trig_Aghanims_Scepter_Actions takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ram2') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'oslo') )
if ( Trig_Aghanims_Scepter_Func007C() ) then
call UnitAddItemByIdSwapped( 'sor3', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_Aghanims_Scepter_Func008C() ) then
call UnitAddItemByIdSwapped( 'sor4', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_Aghanims_Scepter_Func009C() ) then
call UnitAddItemByIdSwapped( 'sor5', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_Aghanims_Scepter_Func010C() ) then
call UnitAddItemByIdSwapped( 'sor6', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_Aghanims_Scepter_Func011C() ) then
call UnitAddItemByIdSwapped( 'sor6', GetTriggerUnit() )
set udg_MCLvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] = ( udg_MCLvl[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))] + 1 )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_Aghanims_Scepter takes nothing returns nothing
set gg_trg_Aghanims_Scepter = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Aghanims_Scepter, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Aghanims_Scepter, Condition( function Trig_Aghanims_Scepter_Conditions ) )
call TriggerAddAction( gg_trg_Aghanims_Scepter, function Trig_Aghanims_Scepter_Actions )
endfunction
function Trig_ItemSimple_Func001C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rots') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'mcri') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rump') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func002C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'stwa') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tbar') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rsps') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func003C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'shdt') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tbar') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'srrc') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func004C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ratf') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sor1') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ram3') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'vddl') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func005C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rump') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'oli2') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rwiz') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func006C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'srbd') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'whwd') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'fgrg') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func007C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tmsc') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sksh') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'spsh') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func008C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tgxp') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tmmt') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sand') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func009C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ram1') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rde0') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'wcyc') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func010C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'whwd') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'srtl') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'penr') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func011C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'srtl') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'lure') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rreb') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func012C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'flag') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'stwa') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rre1') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func013C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'soul') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rej2') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'lhst') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func015C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rst1') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tgxp') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'stre') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func016C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tbar') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sbok') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'lgdh') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func017C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'whwd') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ciri') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'shhn') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func018C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'shrs') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sora') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'srtl') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func019C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'bgst') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tbsm') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'mcou') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func020C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rdis') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tmmt') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ciri') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func021C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'modt') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'shhn') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func022C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tmmt') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sora') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rlif') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func023C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'scul') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'jdrn') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sbch') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func024C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ratf') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'flag') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sora') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func025C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rhe2') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sor2') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tmsc') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func026C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'shcw') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rej6') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func027C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'shcw') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'shtm') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ciri') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func028C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'jdrn') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'prvt') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func029C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'pgin') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'hbth') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'oli2') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func030C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'soul') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ratf') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'clfm') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func031C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sksh') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sor2') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'texp') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func032C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'shrs') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'crys') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func033C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'shtm') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tmsc') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rma2') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func034C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rej5') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rma2') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func035C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'lnrn') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rma2') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func036C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'mlst') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rma2') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func037C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'mnsf') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rma2') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func038C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tgxp') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rspl') == true ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) != 'Obla' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func039C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tbar') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tkno') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'stel') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func040C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tdex') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tbsm') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tmsc') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func041C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'pgma') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'stre') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func042C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'pclr') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sor1') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rej4') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'pgin') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func043C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'infs') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'tfar') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'sor9') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'gsou') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'gvsm') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Func044C takes nothing returns boolean
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'pinv') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ram3') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ciri') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemSimple_Actions takes nothing returns nothing
if ( Trig_ItemSimple_Func001C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rots') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rump') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'mcri') )
call UnitAddItemByIdSwapped( 'bfhr', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func002C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'stwa') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tbar') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rsps') )
call UnitAddItemByIdSwapped( 'tfar', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func003C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shdt') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tbar') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'srrc') )
call UnitAddItemByIdSwapped( 'sor9', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func004C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ratf') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sor1') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ram3') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'vddl') )
call UnitAddItemByIdSwapped( 'olig', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func005C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rump') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'oli2') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rwiz') )
call UnitAddItemByIdSwapped( 'kgal', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func006C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'srbd') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'whwd') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'fgrg') )
call UnitAddItemByIdSwapped( 'rde4', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func007C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tmsc') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sksh') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'spsh') )
call UnitAddItemByIdSwapped( 'ram1', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func008C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tgxp') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tmmt') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sand') )
call UnitAddItemByIdSwapped( 'rde0', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func009C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ram1') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rde0') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'wcyc') )
call UnitAddItemByIdSwapped( 'rnsp', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func010C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'whwd') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'srtl') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'penr') )
call UnitAddItemByIdSwapped( 'rugt', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func011C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'srtl') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'lure') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rreb') )
call UnitAddItemByIdSwapped( 'ofir', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func012C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'flag') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'stwa') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rre1') )
call UnitAddItemByIdSwapped( 'ocor', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func013C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'soul') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rej2') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'lhst') )
call UnitAddItemByIdSwapped( 'spre', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func015C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rst1') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tgxp') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'stre') )
call UnitAddItemByIdSwapped( 'hlst', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func016C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tbar') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'lgdh') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sbok') )
call UnitAddItemByIdSwapped( 'gsou', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func017C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'whwd') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ciri') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shhn') )
call UnitAddItemByIdSwapped( 'soul', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func018C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'srtl') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shrs') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sora') )
call UnitAddItemByIdSwapped( 'pspd', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func019C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'bgst') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tbsm') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'mcou') )
call UnitAddItemByIdSwapped( 'sfog', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func020C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rdis') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tmmt') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ciri') )
call UnitAddItemByIdSwapped( 'wswd', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func021C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'modt') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shhn') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ratc') )
call UnitAddItemByIdSwapped( 'grsl', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func022C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tmmt') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sora') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rlif') )
call UnitAddItemByIdSwapped( 'ccmd', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func023C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'scul') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'jdrn') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sbch') )
call UnitAddItemByIdSwapped( 'rots', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func024C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ratf') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'flag') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sora') )
call UnitAddItemByIdSwapped( 'gldo', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func025C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rhe2') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sor2') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tmsc') )
call UnitAddItemByIdSwapped( 'lure', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func026C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shcw') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rej6') )
call UnitAddItemByIdSwapped( 'ratf', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func027C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shcw') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shtm') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ciri') )
call UnitAddItemByIdSwapped( 'rej2', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func028C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'jdrn') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'prvt') )
call UnitAddItemByIdSwapped( 'horl', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func029C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'pgin') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'hbth') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'oli2') )
call UnitAddItemByIdSwapped( 'oslo', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func030C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'soul') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ratf') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'clfm') )
call UnitAddItemByIdSwapped( 'oven', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func031C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sksh') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sor2') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'texp') )
call UnitAddItemByIdSwapped( 'ofro', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func032C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shrs') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'crys') )
call UnitAddItemByIdSwapped( 'ram4', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func033C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shtm') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tmsc') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rma2') )
call UnitAddItemByIdSwapped( 'rej5', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func034C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rej5') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rma2') )
call UnitAddItemByIdSwapped( 'lnrn', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func035C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'lnrn') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rma2') )
call UnitAddItemByIdSwapped( 'mlst', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func036C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'mlst') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rma2') )
call UnitAddItemByIdSwapped( 'mnsf', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func037C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'mnsf') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rma2') )
call UnitAddItemByIdSwapped( 'rej1', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func038C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tgxp') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rspl') )
call UnitAddItemByIdSwapped( 'tlum', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func039C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tbar') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tkno') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'stel') )
call UnitAddItemByIdSwapped( 'klmm', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func040C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tbsm') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tmsc') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tdex') )
call UnitAddItemByIdSwapped( 'rat6', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func041C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'pgma') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'stre') )
call UnitAddItemByIdSwapped( 'pdiv', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func042C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'pclr') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sor1') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rej4') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'pgin') )
call UnitAddItemByIdSwapped( 'kybl', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func043C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'infs') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tfar') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'gsou') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sor9') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'gvsm') )
call UnitAddItemByIdSwapped( 'mnst', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSimple_Func044C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'pinv') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ram3') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ciri') )
call UnitAddItemByIdSwapped( 'rnec', GetTriggerUnit() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_ItemSimple takes nothing returns nothing
set gg_trg_ItemSimple = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ItemSimple, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_ItemSimple, function Trig_ItemSimple_Actions )
endfunction
function Trig_ItemSwap_Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tsct' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tst2' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func003C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tpow' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func004C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tint' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func005C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tdx2' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func006C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rwat' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func007C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rspd' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func008C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rres' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func009C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rman' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func010C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rhe1' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func011C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rre2' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func012C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rhe3' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func013C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'manh' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func014C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'guvi' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func015C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'gfor' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func016C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'lmbr' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func017C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'evtl' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func018C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'ssil' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func019C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rag1' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func020C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'brac' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func021C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rde3' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func022C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rde1' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func023C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'pmna' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func024C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'odef' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func025C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rin1' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func026C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'kpin' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func027C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'hcun' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func028C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'gcel' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func029C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'dsum' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func030C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'clsd' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func031C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rat9' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func032C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'cnob' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func033C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'ajen' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func034C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'afac' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func035C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'wlsd' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func036C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'woms' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func037C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'totw' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func038C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'fgfh' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func039C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'sres' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func040C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rej3' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func041C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'pghe' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func042C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'shar' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func043C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'hslv' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Func044C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'moon' ) ) then
return false
endif
return true
endfunction
function Trig_ItemSwap_Actions takes nothing returns nothing
if ( Trig_ItemSwap_Func001C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tsct') )
call UnitAddItemByIdSwapped( 'mcri', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func002C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tst2') )
call UnitAddItemByIdSwapped( 'vddl', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func003C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tpow') )
call UnitAddItemByIdSwapped( 'tstr', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func004C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tint') )
call UnitAddItemByIdSwapped( 'tin2', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func005C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'tdx2') )
call UnitAddItemByIdSwapped( 'texp', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func006C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rwat') )
call UnitAddItemByIdSwapped( 'tdex', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func007C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rspd') )
call UnitAddItemByIdSwapped( 'rspl', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func008C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rres') )
call UnitAddItemByIdSwapped( 'rsps', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func009C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rman') )
call UnitAddItemByIdSwapped( 'rreb', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func010C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rhe1') )
call UnitAddItemByIdSwapped( 'rre1', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func011C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rre2') )
call UnitAddItemByIdSwapped( 'rhe2', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func012C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rhe3') )
call UnitAddItemByIdSwapped( 'rma2', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func013C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'manh') )
call UnitAddItemByIdSwapped( 'rdis', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func014C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'guvi') )
call UnitAddItemByIdSwapped( 'gold', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func015C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'gfor') )
call UnitAddItemByIdSwapped( 'gomn', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func016C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'lmbr') )
call UnitAddItemByIdSwapped( 'ward', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func017C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'evtl') )
call UnitAddItemByIdSwapped( 'lhst', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func018C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ssil') )
call UnitAddItemByIdSwapped( 'stel', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func019C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rag1') )
call UnitAddItemByIdSwapped( 'rwiz', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func020C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'brac') )
call UnitAddItemByIdSwapped( 'sbch', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func021C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rde3') )
call UnitAddItemByIdSwapped( 'rlif', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func022C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rde1') )
call UnitAddItemByIdSwapped( 'rde2', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func023C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'pmna') )
call UnitAddItemByIdSwapped( 'prvt', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func024C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'odef') )
call UnitAddItemByIdSwapped( 'penr', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func025C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rin1') )
call UnitAddItemByIdSwapped( 'mcou', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func026C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'kpin') )
call UnitAddItemByIdSwapped( 'lgdh', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func027C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'hcun') )
call UnitAddItemByIdSwapped( 'rhth', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func028C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'gcel') )
call UnitAddItemByIdSwapped( 'hval', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func029C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'dsum') )
call UnitAddItemByIdSwapped( 'rst1', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func030C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'clsd') )
call UnitAddItemByIdSwapped( 'crys', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func031C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rat9') )
call UnitAddItemByIdSwapped( 'clfm', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func032C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'cnob') )
call UnitAddItemByIdSwapped( 'ratc', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func033C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ajen') )
call UnitAddItemByIdSwapped( 'bspd', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func034C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'afac') )
call UnitAddItemByIdSwapped( 'spsh', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func035C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'wlsd') )
call UnitAddItemByIdSwapped( 'wcyc', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func036C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'woms') )
call UnitAddItemByIdSwapped( 'wshs', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func037C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'totw') )
call UnitAddItemByIdSwapped( 'will', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func038C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'fgfh') )
call UnitAddItemByIdSwapped( 'fgrg', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func039C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'sres') )
call UnitAddItemByIdSwapped( 'srrc', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func040C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rej3') )
call UnitAddItemByIdSwapped( 'sand', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func041C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'pghe') )
call UnitAddItemByIdSwapped( 'pgma', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func042C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'shar') )
call UnitAddItemByIdSwapped( 'infs', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func043C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'hslv') )
call UnitAddItemByIdSwapped( 'pclr', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_ItemSwap_Func044C() ) then
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'moon') )
call UnitAddItemByIdSwapped( 'pinv', GetTriggerUnit() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_ItemSwap takes nothing returns nothing
set gg_trg_ItemSwap = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ItemSwap, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_ItemSwap, function Trig_ItemSwap_Actions )
endfunction
function Trig_ItemComplex_Func003Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexA())) == 'flag' ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func004Func004Func001C takes nothing returns boolean
if ( not ( udg_HR < 2 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexB())) == 'flag' ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func004C takes nothing returns boolean
if ( not ( udg_HO > 1 ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'will') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func007Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexA())) == 'gvsm' ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func008Func005Func001C takes nothing returns boolean
if ( not ( udg_ItemR < 2 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexB())) == 'gvsm' ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func008C takes nothing returns boolean
if ( not ( udg_ItemO > 1 ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'hbth') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ward') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func011Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexA())) == 'belv' ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func012Func005Func001C takes nothing returns boolean
if ( not ( udg_ItemR < 2 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexB())) == 'belv' ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func012C takes nothing returns boolean
if ( not ( udg_ItemO > 1 ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rde2') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ram2') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func015Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexA())) == 'shtm' ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func016Func005Func001C takes nothing returns boolean
if ( not ( udg_ItemR < 2 ) ) then
return false
endif
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexB())) == 'shtm' ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Func016C takes nothing returns boolean
if ( not ( udg_ItemO > 1 ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'bspd') == true ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'scul') == true ) ) then
return false
endif
return true
endfunction
function Trig_ItemComplex_Actions takes nothing returns nothing
set udg_HO = 0
set udg_HR = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ItemComplex_Func003Func001C() ) then
set udg_HO = ( udg_HO + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_ItemComplex_Func004C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'will') )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 6
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_ItemComplex_Func004Func004Func001C() ) then
set udg_HR = ( udg_HR + 1 )
call RemoveItem( UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexB()) )
else
call DoNothing( )
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call UnitAddItemByIdSwapped( 'tels', GetTriggerUnit() )
else
call DoNothing( )
endif
set udg_ItemO = 0
set udg_ItemR = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ItemComplex_Func007Func001C() ) then
set udg_ItemO = ( udg_ItemO + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_ItemComplex_Func008C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'hbth') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ward') )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 6
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_ItemComplex_Func008Func005Func001C() ) then
set udg_ItemR = ( udg_ItemR + 1 )
call RemoveItem( UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexB()) )
else
call DoNothing( )
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call UnitAddItemByIdSwapped( 'thdm', GetTriggerUnit() )
else
call DoNothing( )
endif
set udg_ItemO = 0
set udg_ItemR = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ItemComplex_Func011Func001C() ) then
set udg_ItemO = ( udg_ItemO + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_ItemComplex_Func012C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'ram2') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'rde2') )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 6
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_ItemComplex_Func012Func005Func001C() ) then
set udg_ItemR = ( udg_ItemR + 1 )
call RemoveItem( UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexB()) )
else
call DoNothing( )
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call UnitAddItemByIdSwapped( 'schl', GetTriggerUnit() )
else
call DoNothing( )
endif
set udg_ItemO = 0
set udg_ItemR = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_ItemComplex_Func015Func001C() ) then
set udg_ItemO = ( udg_ItemO + 1 )
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_ItemComplex_Func016C() ) then
call AddSpecialEffectTargetUnitBJ( "overhead", GetTriggerUnit(), "Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl" )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'scul') )
call RemoveItem( GetItemOfTypeFromUnitBJ(GetTriggerUnit(), 'bspd') )
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 6
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_ItemComplex_Func016Func005Func001C() ) then
set udg_ItemR = ( udg_ItemR + 1 )
call RemoveItem( UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexB()) )
else
call DoNothing( )
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
call UnitAddItemByIdSwapped( 'ches', GetTriggerUnit() )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_ItemComplex takes nothing returns nothing
set gg_trg_ItemComplex = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ItemComplex, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_ItemComplex, function Trig_ItemComplex_Actions )
endfunction
function Trig_forbidden_items_Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rde0' ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rnsp') == true ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'rnsp' ) ) then
return false
endif
if ( not ( UnitHasItemOfTypeBJ(GetTriggerUnit(), 'rde0') == true ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func003Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'Hvwd' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'U00F' ) ) then
return true
endif
return false
endfunction
function Trig_forbidden_items_Func003C takes nothing returns boolean
if ( not Trig_forbidden_items_Func003Func001C() ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'desc' ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func004C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'O00P' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'oven' ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func005Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'U00K' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetTriggerUnit()) == 'U00I' ) ) then
return true
endif
return false
endfunction
function Trig_forbidden_items_Func005C takes nothing returns boolean
if ( not Trig_forbidden_items_Func005Func001C() ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tels' ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func007Func001Func003C takes nothing returns boolean
if ( not ( udg_HO > 1 ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func007Func001C takes nothing returns boolean
if ( not ( GetItemTypeId(UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexA())) == 'oven' ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func008Func002C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'tbak' ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func008Func003C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'nspi' ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func008Func004C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'thdm' ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func008Func005C takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'ocor' ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Func008C takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_MELEE_ATTACKER) == true ) ) then
return false
endif
return true
endfunction
function Trig_forbidden_items_Actions takes nothing returns nothing
if ( Trig_forbidden_items_Func001C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_forbidden_items_Func002C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_forbidden_items_Func003C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_forbidden_items_Func004C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_forbidden_items_Func005C() ) then
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
else
call DoNothing( )
endif
set udg_HO = 0
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_forbidden_items_Func007Func001C() ) then
set udg_HO = ( udg_HO + 1 )
if ( Trig_forbidden_items_Func007Func001Func003C() ) then
set udg_HO = ( udg_HO - 1 )
call UnitRemoveItemSwapped( UnitItemInSlotBJ(GetTriggerUnit(), GetForLoopIndexA()), GetTriggerUnit() )
else
call DoNothing( )
endif
else
call DoNothing( )
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
if ( Trig_forbidden_items_Func008C() ) then
if ( Trig_forbidden_items_Func008Func004C() ) then
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'tbak', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_forbidden_items_Func008Func005C() ) then
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'nspi', GetTriggerUnit() )
else
call DoNothing( )
endif
else
if ( Trig_forbidden_items_Func008Func002C() ) then
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'thdm', GetTriggerUnit() )
else
call DoNothing( )
endif
if ( Trig_forbidden_items_Func008Func003C() ) then
call RemoveItem( GetManipulatedItem() )
call UnitAddItemByIdSwapped( 'ocor', GetTriggerUnit() )
else
call DoNothing( )
endif
endif
endfunction
//===========================================================================
function InitTrig_forbidden_items takes nothing returns nothing
set gg_trg_forbidden_items = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_forbidden_items, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( gg_trg_forbidden_items, function Trig_forbidden_items_Actions )
endfunction
function Trig_upgrader_Actions takes nothing returns nothing
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
endfunction
//===========================================================================
function InitTrig_upgrader takes nothing returns nothing
set gg_trg_upgrader = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_upgrader, 450.00 )
call TriggerAddAction( gg_trg_upgrader, function Trig_upgrader_Actions )
endfunction
function Trig_Leaderboard_count_Func002001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'etrp' )
endfunction
function Trig_Leaderboard_count_Func002002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'e011' )
endfunction
function Trig_Leaderboard_count_Conditions takes nothing returns boolean
if ( not GetBooleanOr( Trig_Leaderboard_count_Func002001(), Trig_Leaderboard_count_Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_Leaderboard_count_Actions takes nothing returns nothing
set udg_LBTow[1] = ( udg_LBTow[1] + 1 )
endfunction
//===========================================================================
function InitTrig_Leaderboard_count takes nothing returns nothing
set gg_trg_Leaderboard_count = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Leaderboard_count, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Leaderboard_count, Condition( function Trig_Leaderboard_count_Conditions ) )
call TriggerAddAction( gg_trg_Leaderboard_count, function Trig_Leaderboard_count_Actions )
endfunction
function Trig_Leaderboard_count_2_Func002001 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'uzg1' )
endfunction
function Trig_Leaderboard_count_2_Func002002 takes nothing returns boolean
return ( GetUnitTypeId(GetTriggerUnit()) == 'u00D' )
endfunction
function Trig_Leaderboard_count_2_Conditions takes nothing returns boolean
if ( not GetBooleanOr( Trig_Leaderboard_count_2_Func002001(), Trig_Leaderboard_count_2_Func002002() ) ) then
return false
endif
return true
endfunction
function Trig_Leaderboard_count_2_Actions takes nothing returns nothing
set udg_LBTow[2] = ( udg_LBTow[2] + 1 )
endfunction
//===========================================================================
function InitTrig_Leaderboard_count_2 takes nothing returns nothing
set gg_trg_Leaderboard_count_2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Leaderboard_count_2, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Leaderboard_count_2, Condition( function Trig_Leaderboard_count_2_Conditions ) )
call TriggerAddAction( gg_trg_Leaderboard_count_2, function Trig_Leaderboard_count_2_Actions )
endfunction
function Trig_Sent_trees_die_Func013001 takes nothing returns boolean
return ( GetUnitTypeId(GetDyingUnit()) == 'etrp' )
endfunction
function Trig_Sent_trees_die_Func013002 takes nothing returns boolean
return ( GetUnitTypeId(GetDyingUnit()) == 'e011' )
endfunction
function Trig_Sent_trees_die_Conditions takes nothing returns boolean
if ( not GetBooleanOr( Trig_Sent_trees_die_Func013001(), Trig_Sent_trees_die_Func013002() ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func001C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_etrp_0102 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func002C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_etrp_0103 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func003C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_etrp_0104 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func004C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_e011_0105 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func005C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_e011_0106 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func006C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_e011_0107 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func007C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_etrp_0042 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func008C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_etrp_0043 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func009C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_etrp_0044 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func010C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_e011_0041 ) ) then
return false
endif
if ( not ( IsUnitDeadBJ(gg_unit_e011_0040) == true ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func011C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_e011_0040 ) ) then
return false
endif
if ( not ( IsUnitDeadBJ(gg_unit_e011_0041) == true ) ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Func012Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetDyingUnit()) == 'edob' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'edos' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'eaow' ) ) then
return true
endif
return false
endfunction
function Trig_Sent_trees_die_Func012C takes nothing returns boolean
if ( not Trig_Sent_trees_die_Func012Func001C() ) then
return false
endif
return true
endfunction
function Trig_Sent_trees_die_Actions takes nothing returns nothing
if ( Trig_Sent_trees_die_Func001C() ) then
call SetUnitInvulnerable( gg_unit_e011_0107, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func002C() ) then
call SetUnitInvulnerable( gg_unit_e011_0106, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func003C() ) then
call SetUnitInvulnerable( gg_unit_e011_0105, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func004C() ) then
call SetUnitInvulnerable( gg_unit_etrp_0044, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func005C() ) then
call SetUnitInvulnerable( gg_unit_etrp_0043, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func006C() ) then
call SetUnitInvulnerable( gg_unit_etrp_0042, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func007C() ) then
call SetUnitInvulnerable( gg_unit_eaom_0056, false )
call SetUnitInvulnerable( gg_unit_eaoe_0057, false )
call SetUnitInvulnerable( gg_unit_emow_0067, false )
call SetUnitInvulnerable( gg_unit_emow_0059, false )
call SetUnitInvulnerable( gg_unit_emow_0058, false )
call SetUnitInvulnerable( gg_unit_eaow_0068, false )
call SetUnitInvulnerable( gg_unit_etrp_0043, false )
call SetUnitInvulnerable( gg_unit_e011_0040, false )
call SetUnitInvulnerable( gg_unit_e011_0041, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func008C() ) then
call SetUnitInvulnerable( gg_unit_eaoe_0054, false )
call SetUnitInvulnerable( gg_unit_eaom_0055, false )
call SetUnitInvulnerable( gg_unit_emow_0061, false )
call SetUnitInvulnerable( gg_unit_emow_0060, false )
call SetUnitInvulnerable( gg_unit_edob_0069, false )
call SetUnitInvulnerable( gg_unit_emow_0063, false )
call SetUnitInvulnerable( gg_unit_e011_0040, false )
call SetUnitInvulnerable( gg_unit_e011_0041, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func009C() ) then
call SetUnitInvulnerable( gg_unit_eaom_0052, false )
call SetUnitInvulnerable( gg_unit_eaoe_0053, false )
call SetUnitInvulnerable( gg_unit_emow_0066, false )
call SetUnitInvulnerable( gg_unit_emow_0065, false )
call SetUnitInvulnerable( gg_unit_emow_0064, false )
call SetUnitInvulnerable( gg_unit_emow_0063, false )
call SetUnitInvulnerable( gg_unit_emow_0065, false )
call SetUnitInvulnerable( gg_unit_e011_0041, false )
call SetUnitInvulnerable( gg_unit_e011_0040, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func010C() ) then
call SetUnitInvulnerable( gg_unit_etol_0039, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func011C() ) then
call SetUnitInvulnerable( gg_unit_etol_0039, false )
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
if ( Trig_Sent_trees_die_Func012C() ) then
call SetPlayerTechResearchedSwap( 'R009', ( GetPlayerTechCountSimple('R009', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R003', ( GetPlayerTechCountSimple('R003', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00A', ( GetPlayerTechCountSimple('R00A', Player(6)) + 1 ), Player(6) )
call SetPlayerTechResearchedSwap( 'R00B', ( GetPlayerTechCountSimple('R00B', Player(6)) + 1 ), Player(6) )
else
endif
endfunction
//===========================================================================
function InitTrig_Sent_trees_die takes nothing returns nothing
set gg_trg_Sent_trees_die = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Sent_trees_die, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Sent_trees_die, Condition( function Trig_Sent_trees_die_Conditions ) )
call TriggerAddAction( gg_trg_Sent_trees_die, function Trig_Sent_trees_die_Actions )
endfunction
function Trig_UD_stuff_dies_Func013001 takes nothing returns boolean
return ( GetUnitTypeId(GetDyingUnit()) == 'uzg1' )
endfunction
function Trig_UD_stuff_dies_Func013002 takes nothing returns boolean
return ( GetUnitTypeId(GetDyingUnit()) == 'u00D' )
endfunction
function Trig_UD_stuff_dies_Conditions takes nothing returns boolean
if ( not GetBooleanOr( Trig_UD_stuff_dies_Func013001(), Trig_UD_stuff_dies_Func013002() ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func001C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_uzg1_0096 ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func002C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_uzg1_0097 ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func003C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_uzg1_0098 ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func004C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_u00D_0099 ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func005C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_u00D_0100 ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func006C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_u00D_0101 ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func007C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_uzg1_0072 ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func008C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_uzg1_0071 ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func009C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_uzg1_0073 ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func010C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_u00D_0082 ) ) then
return false
endif
if ( not ( IsUnitDeadBJ(gg_unit_u00D_0081) == true ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func011C takes nothing returns boolean
if ( not ( GetDyingUnit() == gg_unit_u00D_0081 ) ) then
return false
endif
if ( not ( IsUnitDeadBJ(gg_unit_u00D_0082) == true ) ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Func012Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetDyingUnit()) == 'uslh' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'ugrv' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'usap' ) ) then
return true
endif
return false
endfunction
function Trig_UD_stuff_dies_Func012C takes nothing returns boolean
if ( not Trig_UD_stuff_dies_Func012Func001C() ) then
return false
endif
return true
endfunction
function Trig_UD_stuff_dies_Actions takes nothing returns nothing
if ( Trig_UD_stuff_dies_Func001C() ) then
call SetUnitInvulnerable( gg_unit_u00D_0101, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func002C() ) then
call SetUnitInvulnerable( gg_unit_u00D_0100, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func003C() ) then
call SetUnitInvulnerable( gg_unit_u00D_0099, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func004C() ) then
call SetUnitInvulnerable( gg_unit_uzg1_0073, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func005C() ) then
call SetUnitInvulnerable( gg_unit_uzg1_0071, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func006C() ) then
call SetUnitInvulnerable( gg_unit_uzg1_0072, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func007C() ) then
call SetUnitInvulnerable( gg_unit_uzig_0092, false )
call SetUnitInvulnerable( gg_unit_utod_0077, false )
call SetUnitInvulnerable( gg_unit_usep_0076, false )
call SetUnitInvulnerable( gg_unit_uzig_0085, false )
call SetUnitInvulnerable( gg_unit_usap_0093, false )
call SetUnitInvulnerable( gg_unit_uzig_0086, false )
call SetUnitInvulnerable( gg_unit_u00D_0082, false )
call SetUnitInvulnerable( gg_unit_uzig_0084, false )
call SetUnitInvulnerable( gg_unit_uzig_0087, false )
call SetUnitInvulnerable( gg_unit_u00D_0081, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func008C() ) then
call SetUnitInvulnerable( gg_unit_uzig_0083, false )
call SetUnitInvulnerable( gg_unit_utod_0078, false )
call SetUnitInvulnerable( gg_unit_usep_0075, false )
call SetUnitInvulnerable( gg_unit_uslh_0095, false )
call SetUnitInvulnerable( gg_unit_uzig_0088, false )
call SetUnitInvulnerable( gg_unit_uzig_0087, false )
call SetUnitInvulnerable( gg_unit_uzig_0086, false )
call SetUnitInvulnerable( gg_unit_u00D_0081, false )
call SetUnitInvulnerable( gg_unit_u00D_0082, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func009C() ) then
call SetUnitInvulnerable( gg_unit_utod_0079, false )
call SetUnitInvulnerable( gg_unit_usep_0074, false )
call SetUnitInvulnerable( gg_unit_ugrv_0094, false )
call SetUnitInvulnerable( gg_unit_uzig_0089, false )
call SetUnitInvulnerable( gg_unit_uzig_0088, false )
call SetUnitInvulnerable( gg_unit_uzig_0090, false )
call SetUnitInvulnerable( gg_unit_uzig_0091, false )
call SetUnitInvulnerable( gg_unit_uzig_0118, false )
call SetUnitInvulnerable( gg_unit_u00D_0081, false )
call SetUnitInvulnerable( gg_unit_u00D_0082, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func010C() ) then
call SetUnitInvulnerable( gg_unit_unpl_0080, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func011C() ) then
call SetUnitInvulnerable( gg_unit_unpl_0080, false )
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
if ( Trig_UD_stuff_dies_Func012C() ) then
call SetPlayerTechResearchedSwap( 'R007', ( GetPlayerTechCountSimple('R007', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00C', ( GetPlayerTechCountSimple('R00C', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R008', ( GetPlayerTechCountSimple('R008', Player(0)) + 1 ), Player(0) )
call SetPlayerTechResearchedSwap( 'R00D', ( GetPlayerTechCountSimple('R00D', Player(0)) + 1 ), Player(0) )
else
endif
endfunction
//===========================================================================
function InitTrig_UD_stuff_dies takes nothing returns nothing
set gg_trg_UD_stuff_dies = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_UD_stuff_dies, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_UD_stuff_dies, Condition( function Trig_UD_stuff_dies_Conditions ) )
call TriggerAddAction( gg_trg_UD_stuff_dies, function Trig_UD_stuff_dies_Actions )
endfunction
function Trig_UL_crypt_Actions takes nothing returns nothing
set udg_SpawnMRLMR[7] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_UL_crypt takes nothing returns nothing
set gg_trg_UL_crypt = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_UL_crypt, gg_unit_usep_0076, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_UL_crypt, function Trig_UL_crypt_Actions )
endfunction
function Trig_M_crypt_Actions takes nothing returns nothing
set udg_SpawnMRLMR[8] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_M_crypt takes nothing returns nothing
set gg_trg_M_crypt = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_M_crypt, gg_unit_usep_0075, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_M_crypt, function Trig_M_crypt_Actions )
endfunction
function Trig_LR_crypt_Actions takes nothing returns nothing
set udg_SpawnMRLMR[9] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_LR_crypt takes nothing returns nothing
set gg_trg_LR_crypt = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_LR_crypt, gg_unit_usep_0074, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_LR_crypt, function Trig_LR_crypt_Actions )
endfunction
function Trig_UL_temple_Actions takes nothing returns nothing
set udg_SpawnMRLMR[10] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_UL_temple takes nothing returns nothing
set gg_trg_UL_temple = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_UL_temple, gg_unit_utod_0077, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_UL_temple, function Trig_UL_temple_Actions )
endfunction
function Trig_M_temple_Actions takes nothing returns nothing
set udg_SpawnMRLMR[11] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_M_temple takes nothing returns nothing
set gg_trg_M_temple = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_M_temple, gg_unit_utod_0078, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_M_temple, function Trig_M_temple_Actions )
endfunction
function Trig_LR_temple_Actions takes nothing returns nothing
set udg_SpawnMRLMR[12] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_LR_temple takes nothing returns nothing
set gg_trg_LR_temple = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_LR_temple, gg_unit_utod_0079, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_LR_temple, function Trig_LR_temple_Actions )
endfunction
function Trig_UL_war_Actions takes nothing returns nothing
set udg_SpawnMRLMR[1] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_UL_war takes nothing returns nothing
set gg_trg_UL_war = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_UL_war, gg_unit_eaom_0056, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_UL_war, function Trig_UL_war_Actions )
endfunction
function Trig_M_war_Actions takes nothing returns nothing
set udg_SpawnMRLMR[2] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_M_war takes nothing returns nothing
set gg_trg_M_war = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_M_war, gg_unit_eaoe_0054, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_M_war, function Trig_M_war_Actions )
endfunction
function Trig_R_war_Actions takes nothing returns nothing
set udg_SpawnMRLMR[3] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_R_war takes nothing returns nothing
set gg_trg_R_war = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_R_war, gg_unit_eaom_0052, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_R_war, function Trig_R_war_Actions )
endfunction
function Trig_UL_lore_Actions takes nothing returns nothing
set udg_SpawnMRLMR[4] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_UL_lore takes nothing returns nothing
set gg_trg_UL_lore = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_UL_lore, gg_unit_eaoe_0057, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_UL_lore, function Trig_UL_lore_Actions )
endfunction
function Trig_M_lore_Actions takes nothing returns nothing
set udg_SpawnMRLMR[5] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_M_lore takes nothing returns nothing
set gg_trg_M_lore = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_M_lore, gg_unit_eaoe_0054, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_M_lore, function Trig_M_lore_Actions )
endfunction
function Trig_R_lore_Actions takes nothing returns nothing
set udg_SpawnMRLMR[6] = false
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_R_lore takes nothing returns nothing
set gg_trg_R_lore = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_R_lore, gg_unit_eaoe_0053, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_R_lore, function Trig_R_lore_Actions )
endfunction
function Trig_Sent_Win_Actions takes nothing returns nothing
call CustomDefeatBJ( Player(7), "TRIGSTR_8882" )
call CustomDefeatBJ( Player(8), "TRIGSTR_8883" )
call CustomDefeatBJ( Player(9), "TRIGSTR_8884" )
call CustomDefeatBJ( Player(10), "TRIGSTR_8885" )
call CustomDefeatBJ( Player(11), "TRIGSTR_8886" )
call CustomVictoryBJ( Player(1), true, true )
call CustomVictoryBJ( Player(2), true, true )
call CustomVictoryBJ( Player(3), true, true )
call CustomVictoryBJ( Player(4), true, true )
call CustomVictoryBJ( Player(5), true, true )
call DisplayTimedTextToForce( GetPlayersAll(), 30, "TRIGSTR_8887" )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_Sent_Win takes nothing returns nothing
set gg_trg_Sent_Win = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Sent_Win, gg_unit_unpl_0080, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_Sent_Win, function Trig_Sent_Win_Actions )
endfunction
function Trig_Scourge_Win_Actions takes nothing returns nothing
call CustomDefeatBJ( Player(1), "TRIGSTR_8888" )
call CustomDefeatBJ( Player(2), "TRIGSTR_8889" )
call CustomDefeatBJ( Player(3), "TRIGSTR_8890" )
call CustomDefeatBJ( Player(4), "TRIGSTR_8891" )
call CustomDefeatBJ( Player(5), "TRIGSTR_8892" )
call CustomVictoryBJ( Player(7), true, true )
call CustomVictoryBJ( Player(8), true, true )
call CustomVictoryBJ( Player(9), true, true )
call CustomVictoryBJ( Player(10), true, true )
call CustomVictoryBJ( Player(11), true, true )
call DisplayTimedTextToForce( GetPlayersAll(), 30, "TRIGSTR_8893" )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_Scourge_Win takes nothing returns nothing
set gg_trg_Scourge_Win = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Scourge_Win, gg_unit_etol_0039, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_Scourge_Win, function Trig_Scourge_Win_Actions )
endfunction
function Trig_display_leaderboard_Actions takes nothing returns nothing
call CreateMultiboardBJ( 4, 16, ( "DotA Allstars" + udg_VersionString ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 1, "TRIGSTR_8894" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, 1, "TRIGSTR_8895" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 1, "TRIGSTR_8896" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, 1, "TRIGSTR_8897" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 2, ( udg_Colors[1] + ( "The Sentinel" + "|r" ) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 8, ( udg_Colors[7] + ( "The Scourge" + "|r" ) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 8, "TRIGSTR_8898" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, 8, "TRIGSTR_8899" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, 2, "TRIGSTR_8900" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 2, "TRIGSTR_8901" )
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 16
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 1, GetForLoopIndexA(), 9.80 )
call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 2, GetForLoopIndexA(), 4.20 )
call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 3, GetForLoopIndexA(), 4.00 )
call MultiboardSetItemWidthBJ( GetLastCreatedMultiboard(), 4, GetForLoopIndexA(), 4.60 )
call MultiboardSetItemColorBJ( GetLastCreatedMultiboard(), 2, GetForLoopIndexA(), 86.20, 86.20, 0.00, 0 )
call MultiboardSetItemColorBJ( GetLastCreatedMultiboard(), 3, GetForLoopIndexA(), 100.00, 0.00, 0.00, 0 )
call MultiboardSetItemColorBJ( GetLastCreatedMultiboard(), 4, GetForLoopIndexA(), 0.00, 5.00, 100.00, 0 )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 2
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, ( GetForLoopIndexA() + 1 ), ( udg_Colors[GetForLoopIndexA()] + ( GetPlayerName(ConvertedPlayer(GetForLoopIndexA())) + "|r" ) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, ( GetForLoopIndexA() + 1 ), "TRIGSTR_8902" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, ( GetForLoopIndexA() + 1 ), "TRIGSTR_8903" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, ( GetForLoopIndexA() + 1 ), "TRIGSTR_8904" )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 8
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, ( GetForLoopIndexA() + 1 ), ( udg_Colors[GetForLoopIndexA()] + ( GetPlayerName(ConvertedPlayer(GetForLoopIndexA())) + "|r" ) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, ( GetForLoopIndexA() + 1 ), "TRIGSTR_8905" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, ( GetForLoopIndexA() + 1 ), "TRIGSTR_8906" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, ( GetForLoopIndexA() + 1 ), "TRIGSTR_8907" )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 4
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 16
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
call MultiboardSetItemStyleBJ( GetLastCreatedMultiboard(), GetForLoopIndexA(), GetForLoopIndexB(), true, false )
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 14, "TRIGSTR_8908" )
call MultiboardSetItemColorBJ( GetLastCreatedMultiboard(), 3, 14, 100.00, 100.00, 100.00, 0 )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 15, ( udg_Colors[1] + ( "Towers Lost" + "|r" ) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 1, 16, ( udg_Colors[7] + ( "Towers Lost" + "|r" ) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 16, ( udg_Colors[7] + ( " 0" + "|r" ) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 16, "TRIGSTR_8909" )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 15, "TRIGSTR_8910" )
call MultiboardDisplayBJ( true, GetLastCreatedMultiboard() )
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_display_leaderboard takes nothing returns nothing
set gg_trg_display_leaderboard = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_display_leaderboard, 1.00 )
call TriggerAddAction( gg_trg_display_leaderboard, function Trig_display_leaderboard_Actions )
endfunction
function Trig_update_leaderboard_always_Func001Func001Func002C takes nothing returns boolean
if ( not ( GetPlayerState(ConvertedPlayer(GetForLoopIndexB()), PLAYER_STATE_RESOURCE_FOOD_USED) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_update_leaderboard_always_Func001Func001C takes nothing returns boolean
if ( not ( GetForLoopIndexB() != 7 ) ) then
return false
endif
return true
endfunction
function Trig_update_leaderboard_always_Func004C takes nothing returns boolean
if ( not ( udg_Seconds < 10 ) ) then
return false
endif
return true
endfunction
function Trig_update_leaderboard_always_Actions takes nothing returns nothing
set bj_forLoopBIndex = 2
set bj_forLoopBIndexEnd = 12
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_update_leaderboard_always_Func001Func001C() ) then
if ( Trig_update_leaderboard_always_Func001Func001Func002C() ) then
set udg_TempCounter = R2I(TimerGetRemaining(udg_PTimer[GetForLoopIndexB()]))
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, ( GetForLoopIndexB() + 1 ), ( " " + I2S(udg_TempCounter) ) )
else
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, ( GetForLoopIndexB() + 1 ), "TRIGSTR_8911" )
endif
else
call DoNothing( )
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
set udg_Minutes = ( ( R2I(TimerGetElapsed(udg_LBTime)) / 60 ) - ( 1 / 2 ) )
set udg_Seconds = ModuloInteger(R2I(TimerGetElapsed(udg_LBTime)), 60)
if ( Trig_update_leaderboard_always_Func004C() ) then
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 14, ( " " + ( I2S(udg_Minutes) + ( ":0" + I2S(udg_Seconds) ) ) ) )
else
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 14, ( " " + ( I2S(udg_Minutes) + ( ":" + I2S(udg_Seconds) ) ) ) )
endif
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 15, ( " " + I2S(udg_LBTow[1]) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 16, ( udg_Colors[7] + ( ( " " + I2S(udg_LBTow[2]) ) + "|r" ) ) )
endfunction
//===========================================================================
function InitTrig_update_leaderboard_always takes nothing returns nothing
set gg_trg_update_leaderboard_always = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_update_leaderboard_always, 1.00 )
call TriggerAddAction( gg_trg_update_leaderboard_always, function Trig_update_leaderboard_always_Actions )
endfunction
function Trig_update_leaderboard_CTF_Func001Func001Func002C takes nothing returns boolean
if ( not ( GetPlayerState(ConvertedPlayer(GetForLoopIndexB()), PLAYER_STATE_RESOURCE_FOOD_USED) == 0 ) ) then
return false
endif
return true
endfunction
function Trig_update_leaderboard_CTF_Func001Func001C takes nothing returns boolean
if ( not ( GetForLoopIndexB() != 7 ) ) then
return false
endif
return true
endfunction
function Trig_update_leaderboard_CTF_Func004C takes nothing returns boolean
if ( not ( udg_Seconds < 10 ) ) then
return false
endif
return true
endfunction
function Trig_update_leaderboard_CTF_Actions takes nothing returns nothing
set bj_forLoopBIndex = 2
set bj_forLoopBIndexEnd = 12
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_update_leaderboard_CTF_Func001Func001C() ) then
if ( Trig_update_leaderboard_CTF_Func001Func001Func002C() ) then
set udg_TempCounter = R2I(TimerGetRemaining(udg_PTimer[GetForLoopIndexB()]))
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, ( GetForLoopIndexB() + 1 ), ( " " + I2S(udg_TempCounter) ) )
else
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 2, ( GetForLoopIndexB() + 1 ), "TRIGSTR_8912" )
endif
else
call DoNothing( )
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
set udg_Minutes = ( ( R2I(TimerGetElapsed(udg_LBTime)) / 60 ) - ( 1 / 2 ) )
set udg_Seconds = ModuloInteger(R2I(TimerGetElapsed(udg_LBTime)), 60)
if ( Trig_update_leaderboard_CTF_Func004C() ) then
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 14, ( " " + ( I2S(udg_Minutes) + ( ":0" + I2S(udg_Seconds) ) ) ) )
else
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 14, ( " " + ( I2S(udg_Minutes) + ( ":" + I2S(udg_Seconds) ) ) ) )
endif
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 15, ( " " + I2S(udg_CTFScore[1]) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, 16, ( udg_Colors[7] + ( ( " " + I2S(udg_CTFScore[2]) ) + "|r" ) ) )
endfunction
//===========================================================================
function InitTrig_update_leaderboard_CTF takes nothing returns nothing
set gg_trg_update_leaderboard_CTF = CreateTrigger( )
call DisableTrigger( gg_trg_update_leaderboard_CTF )
call TriggerRegisterTimerEventPeriodic( gg_trg_update_leaderboard_CTF, 1.00 )
call TriggerAddAction( gg_trg_update_leaderboard_CTF, function Trig_update_leaderboard_CTF_Actions )
endfunction
function Trig_update_leaderboard_kills_Actions takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 3, ( GetForLoopIndexA() + 1 ), ( " " + I2S(udg_LBKills[GetForLoopIndexA()]) ) )
call MultiboardSetItemValueBJ( GetLastCreatedMultiboard(), 4, ( GetForLoopIndexA() + 1 ), ( " " + I2S(udg_LBDeaths[GetForLoopIndexA()]) ) )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
//===========================================================================
function InitTrig_update_leaderboard_kills takes nothing returns nothing
set gg_trg_update_leaderboard_kills = CreateTrigger( )
call TriggerAddAction( gg_trg_update_leaderboard_kills, function Trig_update_leaderboard_kills_Actions )
endfunction
function Trig_Sent_Win_Checksum_Func010C takes nothing returns boolean
if ( not ( udg_LBKills[1] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_Win_Checksum_Func011C takes nothing returns boolean
if ( not ( udg_LBKills[7] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_Win_Checksum_Func012C takes nothing returns boolean
if ( not ( udg_LBDeaths[1] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_Win_Checksum_Func013C takes nothing returns boolean
if ( not ( udg_LBDeaths[7] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_Win_Checksum_Func029C takes nothing returns boolean
if ( not ( udg_semifChecksumMath[5] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Sent_Win_Checksum_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Scourge_Win_Checksum )
call PauseAllUnitsBJ( true )
call DisplayTimedTextToForce( GetPlayersAll(), 30, "TRIGSTR_8913" )
set udg_scResult = 2
set udg_scFinalSeed = ( udg_ECsubstrings1[8] + ( udg_ECsubstrings1[9] + ( udg_ECsubstrings2[8] + udg_ECsubstrings2[9] ) ) )
set udg_LBKillsStr[1] = I2S(udg_LBKills[1])
set udg_LBKillsStr[7] = I2S(udg_LBKills[7])
set udg_LBDeathsSTR[1] = I2S(udg_LBDeaths[1])
set udg_LBDeathsSTR[7] = I2S(udg_LBDeaths[7])
if ( Trig_Sent_Win_Checksum_Func010C() ) then
set udg_LBKillsStr[1] = ( "0" + udg_LBKillsStr[1] )
else
call DoNothing( )
endif
if ( Trig_Sent_Win_Checksum_Func011C() ) then
set udg_LBKillsStr[7] = ( "0" + udg_LBKillsStr[7] )
else
call DoNothing( )
endif
if ( Trig_Sent_Win_Checksum_Func012C() ) then
set udg_LBDeathsSTR[1] = ( "0" + udg_LBDeathsSTR[1] )
else
call DoNothing( )
endif
if ( Trig_Sent_Win_Checksum_Func013C() ) then
set udg_LBDeathsSTR[7] = ( "0" + udg_LBDeathsSTR[7] )
else
call DoNothing( )
endif
set udg_scSemiFinal = ( I2S(udg_scResult) + ( udg_LBKillsStr[1] + ( udg_LBDeathsSTR[1] + ( udg_LBKillsStr[7] + udg_LBDeathsSTR[7] ) ) ) )
set udg_semifTempCheckSumINT[1] = S2I(SubStringBJ(udg_scSemiFinal, 1, 1))
set udg_semifTempCheckSumINT[2] = S2I(SubStringBJ(udg_scSemiFinal, 2, 2))
set udg_semifTempCheckSumINT[3] = S2I(SubStringBJ(udg_scSemiFinal, 3, 3))
set udg_semifTempCheckSumINT[4] = S2I(SubStringBJ(udg_scSemiFinal, 4, 4))
set udg_semifTempCheckSumINT[5] = S2I(SubStringBJ(udg_scSemiFinal, 5, 5))
set udg_semifTempCheckSumINT[6] = S2I(SubStringBJ(udg_scSemiFinal, 6, 6))
set udg_semifTempCheckSumINT[7] = S2I(SubStringBJ(udg_scSemiFinal, 7, 7))
set udg_semifTempCheckSumINT[8] = S2I(SubStringBJ(udg_scSemiFinal, 8, 8))
set udg_semifTempCheckSumINT[9] = S2I(SubStringBJ(udg_scSemiFinal, 9, 9))
set udg_semifChecksumMath[1] = ( udg_semifTempCheckSumINT[1] + ( udg_semifTempCheckSumINT[3] + ( udg_semifTempCheckSumINT[5] + ( udg_semifTempCheckSumINT[7] + udg_semifTempCheckSumINT[9] ) ) ) )
set udg_semifChecksumMath[2] = ( udg_semifChecksumMath[1] * 3 )
set udg_semifChecksumMath[3] = ( udg_semifTempCheckSumINT[2] + ( udg_semifTempCheckSumINT[4] + ( udg_semifTempCheckSumINT[6] + udg_semifTempCheckSumINT[8] ) ) )
set udg_semifChecksumMath[4] = ( udg_semifChecksumMath[2] + udg_semifChecksumMath[3] )
set udg_semifChecksumMath[5] = ModuloInteger(udg_semifChecksumMath[4], 100)
if ( Trig_Sent_Win_Checksum_Func029C() ) then
set udg_semifChecksumMath_STR[1] = ( "0" + I2S(udg_semifChecksumMath[5]) )
else
set udg_semifChecksumMath_STR[1] = I2S(udg_semifChecksumMath[5])
endif
set udg_scSemiFinal = ( udg_scSemiFinal + udg_semifChecksumMath_STR[1] )
call ConditionalTriggerExecute( gg_trg_S )
endfunction
//===========================================================================
function InitTrig_Sent_Win_Checksum takes nothing returns nothing
set gg_trg_Sent_Win_Checksum = CreateTrigger( )
call DisableTrigger( gg_trg_Sent_Win_Checksum )
call TriggerRegisterUnitEvent( gg_trg_Sent_Win_Checksum, gg_unit_unpl_0080, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_Sent_Win_Checksum, function Trig_Sent_Win_Checksum_Actions )
endfunction
function Trig_Scourge_Win_Checksum_Func010C takes nothing returns boolean
if ( not ( udg_LBKills[1] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Scourge_Win_Checksum_Func011C takes nothing returns boolean
if ( not ( udg_LBKills[7] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Scourge_Win_Checksum_Func012C takes nothing returns boolean
if ( not ( udg_LBDeaths[1] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Scourge_Win_Checksum_Func013C takes nothing returns boolean
if ( not ( udg_LBDeaths[7] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Scourge_Win_Checksum_Func029C takes nothing returns boolean
if ( not ( udg_semifChecksumMath[5] < 10 ) ) then
return false
endif
return true
endfunction
function Trig_Scourge_Win_Checksum_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Sent_Win_Checksum )
call PauseAllUnitsBJ( true )
call DisplayTimedTextToForce( GetPlayersAll(), 30, "TRIGSTR_8914" )
set udg_scResult = 3
set udg_scFinalSeed = ( udg_ECsubstrings1[8] + ( udg_ECsubstrings1[9] + ( udg_ECsubstrings2[8] + udg_ECsubstrings2[9] ) ) )
set udg_LBKillsStr[1] = I2S(udg_LBKills[1])
set udg_LBKillsStr[7] = I2S(udg_LBKills[7])
set udg_LBDeathsSTR[1] = I2S(udg_LBDeaths[1])
set udg_LBDeathsSTR[7] = I2S(udg_LBDeaths[7])
if ( Trig_Scourge_Win_Checksum_Func010C() ) then
set udg_LBKillsStr[1] = ( "0" + udg_LBKillsStr[1] )
else
call DoNothing( )
endif
if ( Trig_Scourge_Win_Checksum_Func011C() ) then
set udg_LBKillsStr[7] = ( "0" + udg_LBKillsStr[7] )
else
call DoNothing( )
endif
if ( Trig_Scourge_Win_Checksum_Func012C() ) then
set udg_LBDeathsSTR[1] = ( "0" + udg_LBDeathsSTR[1] )
else
call DoNothing( )
endif
if ( Trig_Scourge_Win_Checksum_Func013C() ) then
set udg_LBDeathsSTR[7] = ( "0" + udg_LBDeathsSTR[7] )
else
call DoNothing( )
endif
set udg_scSemiFinal = ( I2S(udg_scResult) + ( udg_LBKillsStr[1] + ( udg_LBDeathsSTR[1] + ( udg_LBKillsStr[7] + udg_LBDeathsSTR[7] ) ) ) )
set udg_semifTempCheckSumINT[1] = S2I(SubStringBJ(udg_scSemiFinal, 1, 1))
set udg_semifTempCheckSumINT[2] = S2I(SubStringBJ(udg_scSemiFinal, 2, 2))
set udg_semifTempCheckSumINT[3] = S2I(SubStringBJ(udg_scSemiFinal, 3, 3))
set udg_semifTempCheckSumINT[4] = S2I(SubStringBJ(udg_scSemiFinal, 4, 4))
set udg_semifTempCheckSumINT[5] = S2I(SubStringBJ(udg_scSemiFinal, 5, 5))
set udg_semifTempCheckSumINT[6] = S2I(SubStringBJ(udg_scSemiFinal, 6, 6))
set udg_semifTempCheckSumINT[7] = S2I(SubStringBJ(udg_scSemiFinal, 7, 7))
set udg_semifTempCheckSumINT[8] = S2I(SubStringBJ(udg_scSemiFinal, 8, 8))
set udg_semifTempCheckSumINT[9] = S2I(SubStringBJ(udg_scSemiFinal, 9, 9))
set udg_semifChecksumMath[1] = ( udg_semifTempCheckSumINT[1] + ( udg_semifTempCheckSumINT[3] + ( udg_semifTempCheckSumINT[5] + ( udg_semifTempCheckSumINT[7] + udg_semifTempCheckSumINT[9] ) ) ) )
set udg_semifChecksumMath[2] = ( udg_semifChecksumMath[1] * 3 )
set udg_semifChecksumMath[3] = ( udg_semifTempCheckSumINT[2] + ( udg_semifTempCheckSumINT[4] + ( udg_semifTempCheckSumINT[6] + udg_semifTempCheckSumINT[8] ) ) )
set udg_semifChecksumMath[4] = ( udg_semifChecksumMath[2] + udg_semifChecksumMath[3] )
set udg_semifChecksumMath[5] = ModuloInteger(udg_semifChecksumMath[4], 100)
if ( Trig_Scourge_Win_Checksum_Func029C() ) then
set udg_semifChecksumMath_STR[1] = ( "0" + I2S(udg_semifChecksumMath[5]) )
else
set udg_semifChecksumMath_STR[1] = I2S(udg_semifChecksumMath[5])
endif
set udg_scSemiFinal = ( udg_scSemiFinal + udg_semifChecksumMath_STR[1] )
call ConditionalTriggerExecute( gg_trg_S )
endfunction
//===========================================================================
function InitTrig_Scourge_Win_Checksum takes nothing returns nothing
set gg_trg_Scourge_Win_Checksum = CreateTrigger( )
call DisableTrigger( gg_trg_Scourge_Win_Checksum )
call TriggerRegisterUnitEvent( gg_trg_Scourge_Win_Checksum, gg_unit_etol_0039, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_Scourge_Win_Checksum, function Trig_Scourge_Win_Checksum_Actions )
endfunction
function Trig_S_Actions takes nothing returns nothing
set udg_SemiFdigits[1] = SubStringBJ(udg_scSemiFinal, 1, 1)
set udg_SemiFdigits[2] = SubStringBJ(udg_scSemiFinal, 2, 2)
set udg_SemiFdigits[3] = SubStringBJ(udg_scSemiFinal, 3, 3)
set udg_SemiFdigits[4] = SubStringBJ(udg_scSemiFinal, 4, 4)
set udg_SemiFdigits[5] = SubStringBJ(udg_scSemiFinal, 5, 5)
set udg_SemiFdigits[6] = SubStringBJ(udg_scSemiFinal, 6, 6)
set udg_SemiFdigits[7] = SubStringBJ(udg_scSemiFinal, 7, 7)
set udg_SemiFdigits[8] = SubStringBJ(udg_scSemiFinal, 8, 8)
set udg_SemiFdigits[9] = SubStringBJ(udg_scSemiFinal, 9, 9)
set udg_SemiFdigits[10] = SubStringBJ(udg_scSemiFinal, 10, 10)
set udg_SemiFdigits[11] = SubStringBJ(udg_scSemiFinal, 11, 11)
set udg_semiSemiFinal = ( udg_SemiFdigits[3] + ( udg_SemiFdigits[11] + ( udg_SemiFdigits[7] + ( udg_SemiFdigits[9] + ( udg_SemiFdigits[4] + ( udg_SemiFdigits[6] + ( udg_SemiFdigits[1] + ( udg_SemiFdigits[10] + ( udg_SemiFdigits[2] + ( udg_SemiFdigits[5] + udg_SemiFdigits[8] ) ) ) ) ) ) ) ) ) )
set udg_scSemiFinal = udg_semiSemiFinal
set udg_LoopA = 0
loop
exitwhen udg_LoopA > ( StringLength(udg_scSemiFinal) - 1 )
set udg_scFinal = ( udg_scFinal + I2S(ModuloInteger(( S2I(SubStringBJ(udg_scSemiFinal, ( udg_LoopA + 1 ), ( udg_LoopA + 1 ))) + S2I(SubStringBJ(udg_scFinalSeed, ( ModuloInteger(udg_LoopA, ( StringLength(udg_scFinalSeed) - 0 )) + 1 ), ( ModuloInteger(udg_LoopA, ( StringLength(udg_scFinalSeed) - 0 )) + 1 ))) ), 10)) )
set udg_LoopA = udg_LoopA + 1
endloop
call DisplayTimedTextToForce( GetPlayersAll(), 9999.00, "TRIGSTR_8915" )
call DisplayTimedTextToForce( GetPlayersAll(), 9999.00, udg_scFinal )
endfunction
//===========================================================================
function InitTrig_S takes nothing returns nothing
set gg_trg_S = CreateTrigger( )
call TriggerAddAction( gg_trg_S, function Trig_S_Actions )
endfunction
function Trig_MatchID_team1_Conditions takes nothing returns boolean
if ( not ( udg_DEC1 == "No" ) ) then
return false
endif
return true
endfunction
function Trig_MatchID_team1_Func008C takes nothing returns boolean
if ( not ( udg_DEC1 == "Yes" ) ) then
return false
endif
if ( not ( udg_DEC2 == "Yes" ) ) then
return false
endif
return true
endfunction
function Trig_MatchID_team1_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), ( "The " + ( udg_Colors[1] + "Sentinel|r have entered their match ID." ) ) )
set udg_EnteredMatchID1 = SubStringBJ(GetEventPlayerChatString(), 8, 10)
set udg_DEC1 = "Yes"
set udg_ECsubstrings1[8] = SubStringBJ(udg_EnteredMatchID1, 1, 1)
set udg_ECsubstrings1[9] = SubStringBJ(udg_EnteredMatchID1, 2, 2)
set udg_ECsubstrings1[10] = SubStringBJ(udg_EnteredMatchID1, 3, 3)
if ( Trig_MatchID_team1_Func008C() ) then
set udg_CSp1Int[1] = ( S2I(udg_ECsubstrings1[8]) + S2I(udg_ECsubstrings2[8]) )
set udg_CSp1Int[2] = ( udg_CSp1Int[1] * 3 )
set udg_CSp2Int[1] = ( S2I(udg_ECsubstrings1[9]) + S2I(udg_ECsubstrings2[9]) )
set udg_CSp1Int[5] = ( udg_CSp1Int[2] + udg_CSp2Int[1] )
call ConditionalTriggerExecute( gg_trg_Check_Sum )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_MatchID_team1 takes nothing returns nothing
set gg_trg_MatchID_team1 = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team1, Player(1), "-match ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team1, Player(2), "-match ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team1, Player(3), "-match ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team1, Player(4), "-match ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team1, Player(5), "-match ", false )
call TriggerAddCondition( gg_trg_MatchID_team1, Condition( function Trig_MatchID_team1_Conditions ) )
call TriggerAddAction( gg_trg_MatchID_team1, function Trig_MatchID_team1_Actions )
endfunction
function Trig_MatchID_team2_Conditions takes nothing returns boolean
if ( not ( udg_DEC2 == "No" ) ) then
return false
endif
return true
endfunction
function Trig_MatchID_team2_Func008C takes nothing returns boolean
if ( not ( udg_DEC1 == "Yes" ) ) then
return false
endif
if ( not ( udg_DEC2 == "Yes" ) ) then
return false
endif
return true
endfunction
function Trig_MatchID_team2_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), ( "The " + ( udg_Colors[7] + "Scourge|r have entered their match ID." ) ) )
set udg_EnteredMatchID2 = SubStringBJ(GetEventPlayerChatString(), 8, 10)
set udg_DEC2 = "Yes"
set udg_ECsubstrings2[8] = SubStringBJ(udg_EnteredMatchID2, 1, 1)
set udg_ECsubstrings2[9] = SubStringBJ(udg_EnteredMatchID2, 2, 2)
set udg_ECsubstrings2[10] = SubStringBJ(udg_EnteredMatchID2, 3, 3)
if ( Trig_MatchID_team2_Func008C() ) then
set udg_CSp1Int[1] = ( S2I(udg_ECsubstrings1[8]) + S2I(udg_ECsubstrings2[8]) )
set udg_CSp1Int[2] = ( udg_CSp1Int[1] * 3 )
set udg_CSp2Int[1] = ( S2I(udg_ECsubstrings1[9]) + S2I(udg_ECsubstrings2[9]) )
set udg_CSp1Int[5] = ( udg_CSp1Int[2] + udg_CSp2Int[1] )
call ConditionalTriggerExecute( gg_trg_Check_Sum )
else
call DoNothing( )
endif
endfunction
//===========================================================================
function InitTrig_MatchID_team2 takes nothing returns nothing
set gg_trg_MatchID_team2 = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team2, Player(7), "-match ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team2, Player(8), "-match ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team2, Player(9), "-match ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team2, Player(10), "-match ", false )
call TriggerRegisterPlayerChatEvent( gg_trg_MatchID_team2, Player(11), "-match ", false )
call TriggerAddCondition( gg_trg_MatchID_team2, Condition( function Trig_MatchID_team2_Conditions ) )
call TriggerAddAction( gg_trg_MatchID_team2, function Trig_MatchID_team2_Actions )
endfunction
function Trig_Check_Sum_Func003C takes nothing returns boolean
if ( not ( udg_CheckCS[1] == udg_ECsubstrings1[10] ) ) then
return false
endif
if ( not ( udg_CheckCS[2] == udg_ECsubstrings2[10] ) ) then
return false
endif
return true
endfunction
function Trig_Check_Sum_Actions takes nothing returns nothing
set udg_CheckCS[1] = SubStringBJ(I2S(udg_CSp1Int[5]), 1, 1)
set udg_CheckCS[2] = SubStringBJ(I2S(udg_CSp1Int[5]), 2, 2)
if ( Trig_Check_Sum_Func003C() ) then
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_8917" )
call EnableTrigger( gg_trg_Sent_Win_Checksum )
call EnableTrigger( gg_trg_Scourge_Win_Checksum )
call DisableTrigger( gg_trg_Sent_Win )
call DisableTrigger( gg_trg_Scourge_Win )
else
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_8916" )
endif
endfunction
//===========================================================================
function InitTrig_Check_Sum takes nothing returns nothing
set gg_trg_Check_Sum = CreateTrigger( )
call TriggerAddAction( gg_trg_Check_Sum, function Trig_Check_Sum_Actions )
endfunction
function Trig_Untitled_Trigger_001_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_ANCIENT) == false ) ) then
return false
endif
return true
endfunction
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
set gg_trg_Untitled_Trigger_001 = CreateTrigger( )
call TriggerAddCondition( gg_trg_Untitled_Trigger_001, Condition( function Trig_Untitled_Trigger_001_Conditions ) )
call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction
function Trig_First_Blood_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_First_Blood_Actions takes nothing returns nothing
call DestroyTrigger(GetTriggeringTrigger())
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, ( udg_Colors[GetConvertedPlayerId(GetOwningPlayer(GetKillingUnitBJ()))] + ( GetPlayerName(GetOwningPlayer(GetKillingUnitBJ())) + ( "|r just drew " + ( udg_Colors[1] + "first blood!|r (+200 gold)") ) ) ) )
call AdjustPlayerStateBJ( 200, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_GOLD )
call PlaySoundBJ( gg_snd_firstblood )
endfunction
//===========================================================================
function InitTrig_First_Blood takes nothing returns nothing
set gg_trg_First_Blood = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_First_Blood, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_First_Blood, Condition( function Trig_First_Blood_Conditions ) )
call TriggerAddAction( gg_trg_First_Blood, function Trig_First_Blood_Actions )
endfunction
function Trig_Unstuck_Func002001002001 takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function Trig_Unstuck_Func002001002002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == GetTriggerPlayer() )
endfunction
function Trig_Unstuck_Func002001002 takes nothing returns boolean
return GetBooleanAnd( Trig_Unstuck_Func002001002001(), Trig_Unstuck_Func002001002002() )
endfunction
function Trig_Unstuck_Func002A takes nothing returns nothing
call UnitAddAbilityBJ( 'A0AT', GetEnumUnit() )
call IssueImmediateOrderBJ( GetEnumUnit(), "chemicalrage" )
endfunction
function Trig_Unstuck_Actions takes nothing returns nothing
set bj_wantDestroyGroup = true
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_Unstuck_Func002001002)), function Trig_Unstuck_Func002A )
endfunction
//===========================================================================
function InitTrig_Unstuck takes nothing returns nothing
set gg_trg_Unstuck = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(1), "-unstuck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(2), "-unstuck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(3), "-unstuck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(4), "-unstuck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(5), "-unstuck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(7), "-unstuck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(8), "-unstuck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(9), "-unstuck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(10), "-unstuck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Unstuck, Player(11), "-unstuck", true )
call TriggerAddAction( gg_trg_Unstuck, function Trig_Unstuck_Actions )
endfunction
function Trig_Unstick_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A0AT' ) ) then
return false
endif
return true
endfunction
function Trig_Unstick_Func001C takes nothing returns boolean
if ( not ( IsUnitAlly(GetTriggerUnit(), Player(0)) == true ) ) then
return false
endif
return true
endfunction
function Trig_Unstick_Actions takes nothing returns nothing
if ( Trig_Unstick_Func001C() ) then
call SetUnitPositionLoc( GetTriggerUnit(), GetRectCenter(gg_rct_Hero_Creation_NE) )
else
call SetUnitPositionLoc( GetTriggerUnit(), GetRectCenter(gg_rct_Hero_Creation_Evil) )
endif
endfunction
//===========================================================================
function InitTrig_Unstick takes nothing returns nothing
set gg_trg_Unstick = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Unstick, EVENT_PLAYER_UNIT_SPELL_FINISH )
call TriggerAddCondition( gg_trg_Unstick, Condition( function Trig_Unstick_Conditions ) )
call TriggerAddAction( gg_trg_Unstick, function Trig_Unstick_Actions )
endfunction
function Trig_Untitled_Trigger_002_Actions takes nothing returns nothing
call TriggerExecute( gg_trg_DestroyFX )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_002 takes nothing returns nothing
set gg_trg_Untitled_Trigger_002 = CreateTrigger( )
call TriggerAddAction( gg_trg_Untitled_Trigger_002, function Trig_Untitled_Trigger_002_Actions )
endfunction