constant function Unit_Crypt takes nothing returns integer
return 'u000'
endfunction
constant function Unit_Mage1 takes nothing returns integer
return 'u001'
endfunction
constant function Unit_Mage2 takes nothing returns integer
return 'u003'
endfunction
constant function Unit_Mage3 takes nothing returns integer
return 'u004'
endfunction
constant function Unit_Mage4 takes nothing returns integer
return 'u005'
endfunction
constant function Unit_Skeleton1 takes nothing returns integer
return 'u002'
endfunction
constant function Unit_Skeleton2 takes nothing returns integer
return 'n000'
endfunction
constant function Unit_Skeleton3 takes nothing returns integer
return 'n001'
endfunction
constant function Unit_Archer takes nothing returns integer
return 'n003'
endfunction
constant function Unit_ArcherB takes nothing returns integer
return 'n004'
endfunction
constant function Unit_ArcherF takes nothing returns integer
return 'n005'
endfunction
constant function Unit_Shade takes nothing returns integer
return 'ushd'
endfunction
constant function Unit_Wraith takes nothing returns integer
return 'u006'
endfunction
constant function Unit_Contraption takes nothing returns integer
return 'n002'
endfunction
constant function Unit_Orc takes nothing returns integer
return 'n009'
endfunction
constant function Unit_Maiden takes nothing returns integer
return 'ndqp'
endfunction
function isMage takes unit u returns boolean
local integer i = GetUnitTypeId(u)
return i == Unit_Mage1() or i == Unit_Mage2() or i == Unit_Mage3() or i == Unit_Mage4()
endfunction
function isArcher takes unit u returns boolean
local integer i = GetUnitTypeId(u)
return i == Unit_Archer() or i == Unit_ArcherB() or i == Unit_ArcherF()
endfunction
constant function Buff_RaiseDead takes nothing returns integer
return 'Brai'
endfunction
constant function Ability_PhoenixFire takes nothing returns integer
return 'Apxf'
endfunction
constant function Ability_ChaosMage2 takes nothing returns integer
return 'S003'
endfunction
constant function Ability_ChaosMage3 takes nothing returns integer
return 'S004'
endfunction
constant function Ability_ChaosMage4 takes nothing returns integer
return 'S005'
endfunction
function InitPlayerColors takes nothing returns nothing
local integer i = 1
local playercolor c
local string s
loop
exitwhen i > 12
set c = GetPlayerColor(Player(i - 1))
if c == PLAYER_COLOR_RED then
set s = "|c00ff0303"
elseif c == PLAYER_COLOR_BLUE then
set s = "|c000042ff"
elseif c == PLAYER_COLOR_CYAN then
set s = "|c001ce6b9"
elseif c == PLAYER_COLOR_PURPLE then
set s = "|c00703370" // 540081"
elseif c == PLAYER_COLOR_YELLOW then
set s = "|c00fffc01"
elseif c == PLAYER_COLOR_ORANGE then
set s = "|c00ff8000"
elseif c == PLAYER_COLOR_GREEN then
set s = "|c0020c000"
elseif c == PLAYER_COLOR_PINK then
set s = "|c00e55bb0"
elseif c == PLAYER_COLOR_LIGHT_GRAY then
set s = "|c00959697"
elseif c == PLAYER_COLOR_LIGHT_BLUE then
set s = "|c007ebff1"
elseif c == PLAYER_COLOR_AQUA then
set s = "|c00106246"
elseif c == PLAYER_COLOR_BROWN then
set s = "|c004e2a04"
else
set s = "|c00000000"
endif
set udg_PlayerNames[i] = s + GetPlayerName(Player(i - 1)) + "|r"
set i = i + 1
endloop
set c = null
set s = null
endfunction
function I2MB takes integer i returns string
local string s = " " + I2S(i)
return SubString(s,StringLength(s) - 4,100)
endfunction
function TimeString takes integer i returns string
if i < 10 then
return "0" + I2S(i)
endif
return I2S(i)
endfunction
function ReturnTrue takes nothing returns boolean
return true
endfunction
// Rubu = Research Undead Burrow (Deeper Mystery)
function DoMystery takes player p returns nothing
local integer n = GetConvertedPlayerId(p)
set udg_Mystery[n] = udg_Mystery[n] + 1
if udg_Mystery[n] >= 500 and GetPlayerTechCount(p, 'Rubu', true) == 0 then
call SetPlayerTechResearched(p, 'Rubu', 1)
call QuestMessageBJ(udg_PlayerGroup[n], bj_QUESTMESSAGE_UNITACQUIRED, "|cff00ccffNew unit available:|r
The |cffffcc00Dark Overlord|r noticed your failed attempts at owning, and grants your Crypts the ability to train |cffffcc00Infernal Contraptions|r.")
endif
endfunction
Name | Type | is_array | initial_value |
AllPlayers | force | No | |
ComputerPlayers | force | No | |
CryptDamage | real | Yes | |
Crypts | group | No | |
Deaths | integer | Yes | |
DialogContinue | dialog | No | |
DialogContinueYes | button | No | |
DialogGameOver | dialog | No | |
EarlyDeath | integer | No | |
EarlyDeathPlayer | player | No | |
GameTime | timer | No | |
HumanPlayers | force | No | |
Locals | group | No | |
LocalsSpawn | location | Yes | |
LocalsSpawnCount | integer | No | |
LostCrypts | integer | Yes | |
MapCenter | location | No | |
MasterComp | player | No | |
MB | multiboard | No | |
Mystery | integer | Yes | |
Player | player | No | |
PlayerGroup | force | Yes | |
PlayerNames | string | Yes | |
PlayerNumber | integer | No | |
PlayerRows | integer | Yes | |
Point | location | No | |
StartLocation | location | Yes | |
StatsCrypts | integer | Yes | |
StatsCryptsMax | integer | Yes | |
StatsFood | integer | Yes | |
StatsFoodMax | integer | Yes | |
StatsMages | integer | Yes | |
StatsUnits | integer | Yes | |
Strings | string | Yes | |
TempInteger | integer | No | |
TempPoint | location | No | |
TempRandom | integer | No | |
TempReal | real | No | |
TotalTime | timer | No | |
Unit | unit | No | |
UnitGroup | group | No | |
Weather | integer | No | |
Weathers | weathereffect | Yes |
function Trig_Game_Time_Conditions takes nothing returns boolean
return CountPlayersInForceBJ(udg_AllPlayers) <= 4
endfunction
function Trig_Game_Time_Actions takes nothing returns nothing
call TimerStart(udg_GameTime, 600.00, false, null)
call EnableTrigger(gg_trg_MB_Time)
call DisableTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_Game_Time takes nothing returns nothing
set gg_trg_Game_Time = CreateTrigger( )
call DisableTrigger( gg_trg_Game_Time )
call TriggerRegisterTimerEventPeriodic( gg_trg_Game_Time, 3.00 )
call TriggerAddCondition( gg_trg_Game_Time, Condition( function Trig_Game_Time_Conditions ) )
call TriggerAddAction( gg_trg_Game_Time, function Trig_Game_Time_Actions )
endfunction
function Trig_Dialogs_Actions takes nothing returns nothing
local boolean t = true
call DialogClear(udg_DialogContinue)
call DialogSetMessage(udg_DialogContinue, "You may stay and watch")
set udg_DialogContinueYes = DialogAddButton(udg_DialogContinue, "(|cff00ccffY|r) - Yes, please", 'Y')
call DialogAddButton(udg_DialogContinue, "(|cff00ccffN|r) - Heck, NO!", 'N')
call DialogClear(udg_DialogGameOver)
call DialogSetMessage(udg_DialogGameOver, "Game Over")
if GetRandomInt(1, 100) <= 30 then
call DialogAddButton(udg_DialogGameOver, "Great", 0)
set t = false
endif
if GetRandomInt(1, 100) <= 30 then
call DialogAddButton(udg_DialogGameOver, "Cool", 0)
set t = false
endif
if GetRandomInt(1, 100) <= 30 then
call DialogAddButton(udg_DialogGameOver, "This owns", 0)
set t = false
endif
if GetRandomInt(1, 100) <= 30 then
call DialogAddButton(udg_DialogGameOver, "Yeah!", 0)
set t = false
endif
if t then
call DialogAddButton(udg_DialogGameOver, "OK", 0)
endif
endfunction
//===========================================================================
function InitTrig_Dialogs takes nothing returns nothing
set gg_trg_Dialogs = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Dialogs, 5 )
call TriggerAddAction( gg_trg_Dialogs, function Trig_Dialogs_Actions )
endfunction
function Trig_Crypts_Ping_Ping takes nothing returns nothing
call PingMinimapEx(GetUnitX(GetEnumUnit()), GetUnitY(GetEnumUnit()), 1.0, 230, 190, 230, false)
endfunction
function Trig_Crypts_Ping_Actions takes nothing returns nothing
call ForGroup(udg_Crypts, function Trig_Crypts_Ping_Ping)
endfunction
//===========================================================================
function InitTrig_Crypts_Ping takes nothing returns nothing
set gg_trg_Crypts_Ping = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Crypts_Ping, 7.0 )
call TriggerRegisterTimerEventSingle( gg_trg_Crypts_Ping, 12.00 )
call TriggerAddAction( gg_trg_Crypts_Ping, function Trig_Crypts_Ping_Actions )
endfunction
function Trig_Crypts_Vulnerable_Vulnerable takes nothing returns nothing
call SetUnitInvulnerable(GetEnumUnit(), false)
endfunction
function Trig_Crypts_Vulnerable_Actions takes nothing returns nothing
call QuestMessageBJ(GetPlayersAll(), bj_QUESTMESSAGE_WARNING, "|cffffcc00Warning|r
Starting Crypts are vulnerable now.")
call ForGroup(udg_Crypts, function Trig_Crypts_Vulnerable_Vulnerable)
endfunction
//===========================================================================
function InitTrig_Crypts_Vulnerable takes nothing returns nothing
set gg_trg_Crypts_Vulnerable = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Crypts_Vulnerable, 80.00 )
call TriggerAddAction( gg_trg_Crypts_Vulnerable, function Trig_Crypts_Vulnerable_Actions )
endfunction
function Trig_Crypt_Protect_Conditions takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit()) == Unit_Crypt() and GetUnitAbilityLevel(GetTriggerUnit(), Ability_PhoenixFire()) == 0
endfunction
function Trig_Crypt_Protect_Actions takes nothing returns nothing
call UnitAddAbility(GetTriggerUnit(), Ability_PhoenixFire())
endfunction
//===========================================================================
function InitTrig_Crypt_Protect takes nothing returns nothing
set gg_trg_Crypt_Protect = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Crypt_Protect, EVENT_PLAYER_UNIT_CHANGE_OWNER )
call TriggerAddCondition( gg_trg_Crypt_Protect, Condition( function Trig_Crypt_Protect_Conditions ) )
call TriggerAddAction( gg_trg_Crypt_Protect, function Trig_Crypt_Protect_Actions )
endfunction
function Trig_Crypt_Takeover_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local integer c = GetUnitUserData(u)
local integer n = GetConvertedPlayerId(GetOwningPlayer(GetEventDamageSource()))
local player p = null
local integer i = 0
local real t = 0.0
set udg_CryptDamage[c + n] = udg_CryptDamage[c + n] + GetEventDamage()
if GetUnitStatePercent(u, UNIT_STATE_LIFE, UNIT_STATE_MAX_LIFE) <= 25.00 then
call SetUnitInvulnerable(u, true)
loop
set i = i + 1
exitwhen i > 12
if udg_CryptDamage[c + i] > t then
set t = udg_CryptDamage[c + i]
set p = ConvertedPlayer(i)
endif
set udg_CryptDamage[c + i] = 0.00
endloop
if IsPlayerInForce(p, udg_AllPlayers) == false then
set p = Player(PLAYER_NEUTRAL_AGGRESSIVE)
endif
call SetUnitOwner(u, p, true)
call SetUnitInvulnerable(u, false)
call SetUnitLifePercentBJ(u, 100)
call SetUnitState(u, UNIT_STATE_LIFE, GetUnitState(u, UNIT_STATE_MAX_LIFE))
endif
set u = null
set p = null
endfunction
//===========================================================================
function InitTrig_Crypt_Takeover takes nothing returns nothing
set gg_trg_Crypt_Takeover = CreateTrigger( )
call TriggerAddAction( gg_trg_Crypt_Takeover, function Trig_Crypt_Takeover_Actions )
endfunction
function Trig_Mages_Conditions takes nothing returns boolean
local integer i = GetUnitTypeId(GetTriggerUnit())
return i == Unit_Mage1() or i == Unit_Mage2() or i == Unit_Mage3()
endfunction
function Trig_Mages_Effect takes unit u returns nothing
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\AIem\\AIemTarget.mdl", GetUnitX(u), GetUnitY(u)))
endfunction
function Trig_Mages_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local integer c = GetUnitUserData(u) + 1
call DoMystery(GetOwningPlayer(u))
call SetUnitUserData(u, c)
if GetUnitUserData(u) >= GetRandomInt(42, 50) and GetUnitTypeId(u) == Unit_Mage3() then
call Trig_Mages_Effect(u)
call UnitAddAbility(u, Ability_ChaosMage4())
if GetPlayerTechCount(GetOwningPlayer(u), 'Rusl', true) == 0 then
call SetPlayerTechResearched(GetOwningPlayer(u), 'Rusl', 1)
call QuestMessageBJ( udg_PlayerGroup[GetConvertedPlayerId(GetOwningPlayer(u))], bj_QUESTMESSAGE_UNITACQUIRED, "|cff00ccffSkeletal Mastery|r
Your mastery of the Dark Arts has permanently added an extra 10% to the duration of your summoned Skeletons.")
endif
endif
if GetUnitUserData(u) >= GetRandomInt(22, 26) and GetUnitTypeId(u) == Unit_Mage2() then
call Trig_Mages_Effect(u)
call UnitAddAbility(u, Ability_ChaosMage3())
endif
if GetUnitUserData(u) >= GetRandomInt(7, 10) and GetUnitTypeId(u) == Unit_Mage1() then
call Trig_Mages_Effect(u)
call UnitAddAbility(u, Ability_ChaosMage2())
endif
set u = null
endfunction
//===========================================================================
function InitTrig_Mages takes nothing returns nothing
set gg_trg_Mages = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mages, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Mages, Condition( function Trig_Mages_Conditions ) )
call TriggerAddAction( gg_trg_Mages, function Trig_Mages_Actions )
endfunction
function Trig_Unit_Training_Actions takes nothing returns nothing
local unit u = GetTrainedUnit()
local integer i = GetUnitTypeId(u)
if i == Unit_Archer() then
call UnitApplyTimedLife(u, Buff_RaiseDead(), 100.0)
call SetPlayerState(GetOwningPlayer(u), PLAYER_STATE_RESOURCE_FOOD_USED, GetPlayerState(GetOwningPlayer(u), PLAYER_STATE_RESOURCE_FOOD_USED) + 1)
elseif i == Unit_Wraith() then
call UnitApplyTimedLife(u, Buff_RaiseDead(), 180.0)
call SetPlayerState(GetOwningPlayer(u), PLAYER_STATE_RESOURCE_FOOD_USED, GetPlayerState(GetOwningPlayer(u), PLAYER_STATE_RESOURCE_FOOD_USED) + 1)
elseif i == Unit_Contraption() then
call UnitApplyTimedLife(u, Buff_RaiseDead(), 150.0)
call SetPlayerState(GetOwningPlayer(u), PLAYER_STATE_RESOURCE_FOOD_USED, GetPlayerState(GetOwningPlayer(u), PLAYER_STATE_RESOURCE_FOOD_USED) + 1)
endif
set u = null
endfunction
//===========================================================================
function InitTrig_Unit_Training takes nothing returns nothing
set gg_trg_Unit_Training = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Unit_Training, EVENT_PLAYER_UNIT_TRAIN_FINISH )
call TriggerAddAction( gg_trg_Unit_Training, function Trig_Unit_Training_Actions )
endfunction
function Trig_Unit_Dies_Conditions takes nothing returns boolean
local integer i = GetUnitTypeId(GetTriggerUnit())
return isArcher(GetTriggerUnit()) or i == Unit_Wraith() or i == Unit_Contraption()
endfunction
function Trig_Unit_Dies_Actions takes nothing returns nothing
call SetPlayerState(GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED, GetPlayerState(GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED) - 1)
endfunction
//===========================================================================
function InitTrig_Unit_Dies takes nothing returns nothing
set gg_trg_Unit_Dies = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Unit_Dies, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Unit_Dies, Condition( function Trig_Unit_Dies_Conditions ) )
call TriggerAddAction( gg_trg_Unit_Dies, function Trig_Unit_Dies_Actions )
endfunction
function Trig_Experience_Conditions takes nothing returns boolean
return GetKillingUnit() != null
endfunction
function ReplaceUnit takes unit oldUnit, integer newUnitId, real timedLife returns nothing
call ShowUnit(oldUnit, false)
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Items\\ResourceItems\\ResourceEffectTarget.mdl", GetUnitX(oldUnit), GetUnitY(oldUnit)))
set bj_lastReplacedUnit = CreateUnit(GetOwningPlayer(oldUnit), newUnitId, GetUnitX(oldUnit), GetUnitY(oldUnit), GetUnitFacing(oldUnit))
call RemoveUnit(oldUnit)
call UnitApplyTimedLife(bj_lastReplacedUnit, Buff_RaiseDead(), timedLife)
endfunction
function Trig_Experience_Filter takes nothing returns boolean
return IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false and IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true
endfunction
function Trig_Experience_Experience takes nothing returns nothing
local unit u = GetEnumUnit()
local integer i = GetUnitTypeId(u)
local integer c
if isMage(u) then
set c = GetUnitUserData(u) + 1
else
set c = GetUnitUserData(u) + GetUnitPointValue(GetTriggerUnit())
call DoMystery(GetOwningPlayer(u))
endif
call SetUnitUserData(u, c)
if i == Unit_Archer() and c >= 160 then
if GetRandomInt(1, 100) <= 50 then
call ReplaceUnit(u, Unit_ArcherB(), 100.0)
else
call ReplaceUnit(u, Unit_ArcherF(), 100.0)
endif
elseif i == Unit_Skeleton1() and c >= 180 then
call ReplaceUnit(u, Unit_Skeleton2(), 100.0)
elseif i == Unit_Skeleton2() and c >= 200 then
call ReplaceUnit(u, Unit_Skeleton3(), 120.0)
endif
endfunction
function Trig_Experience_Actions takes nothing returns nothing
local group g = CreateGroup()
call GroupEnumUnitsInRange(g, GetUnitX(GetTriggerUnit()), GetUnitY(GetTriggerUnit()), 800.00, Condition(function Trig_Experience_Filter))
call ForGroup(g, function Trig_Experience_Experience)
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_Experience takes nothing returns nothing
set gg_trg_Experience = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Experience, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Experience, Condition( function Trig_Experience_Conditions ) )
call TriggerAddAction( gg_trg_Experience, function Trig_Experience_Actions )
endfunction
function Trig_Defeat_FindMages takes nothing returns boolean
return isMage(GetFilterUnit())
endfunction
function Trig_Defeat_Defeat takes nothing returns nothing
local unit u
local group g
local location l
local location t
set g = GetUnitsOfPlayerAndTypeId(GetEnumPlayer(), Unit_Crypt())
if CountUnitsInGroup(g) == 0 then
call DestroyGroup(g)
set g = GetUnitsOfPlayerMatching(GetEnumPlayer(), Condition(function Trig_Defeat_FindMages))
if CountUnitsInGroup(g) == 0 then
call ForceRemovePlayer(udg_AllPlayers, GetEnumPlayer())
call MakeUnitsPassiveForPlayer(GetEnumPlayer())
call QuestMessageBJ(GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, udg_PlayerNames[GetConvertedPlayerId(GetEnumPlayer())] + " has been defeated.")
call MultiboardSetItemColorBJ(udg_MB, 0, udg_PlayerRows[GetConvertedPlayerId(GetEnumPlayer())], 40.00, 40.00, 40.00, 0)
call ConditionalTriggerExecute(gg_trg_Stats_Early_Death)
if CountPlayersInForceBJ(udg_AllPlayers) < 2 then
call TriggerExecute( gg_trg_Victory )
else
call DialogDisplay(GetEnumPlayer(), udg_DialogContinue, true)
endif
else
set u = GroupPickRandomUnit(g)
call DestroyGroup(g)
set g = GetUnitsOfPlayerAndTypeId(GetEnumPlayer(), Unit_Orc())
if CountUnitsInGroup(g) < 3 then
set l = GetUnitLoc(u)
set t = PolarProjectionBJ(l, 256, AngleBetweenPoints(l, udg_MapCenter))
set bj_lastCreatedUnit = CreateUnitAtLoc(GetEnumPlayer(), 'nalb', l, bj_UNIT_FACING)
call IssuePointOrderLoc(bj_lastCreatedUnit, "inferno", t)
call UnitApplyTimedLife(bj_lastCreatedUnit, 'BTLF', 5.0)
call RemoveLocation(t)
call RemoveLocation(l)
set l = null
endif
set u = null
endif
endif
call DestroyGroup(g)
set g = null
endfunction
function Trig_Defeat_Actions takes nothing returns nothing
call ForForce(udg_AllPlayers, function Trig_Defeat_Defeat)
endfunction
//===========================================================================
function InitTrig_Defeat takes nothing returns nothing
set gg_trg_Defeat = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Defeat, 5.00 )
call TriggerAddAction( gg_trg_Defeat, function Trig_Defeat_Actions )
endfunction
function Trig_Victory_Invulnerable takes nothing returns nothing
if isMage(GetEnumUnit()) or GetUnitTypeId(GetEnumUnit()) == Unit_Crypt() then
call SetUnitInvulnerable(GetEnumUnit(), true)
endif
endfunction
function Trig_Victory_Display takes nothing returns nothing
call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 200.00, "|cffffcc00> -|r " + udg_PlayerNames[GetConvertedPlayerId(GetEnumPlayer())] + " |cffffcc00-|r")
endfunction
function Trig_Victory_Actions takes nothing returns nothing
call DisableTrigger(gg_trg_Defeat)
call DisableTrigger(gg_trg_MB_Time)
call MultiboardSetTitleText(udg_MB, "|cff00ccffGame over|r")
call ForGroup(GetUnitsInRectAll(GetPlayableMapRect()), function Trig_Victory_Invulnerable)
call QuestMessageBJ(GetPlayersAll(), bj_QUESTMESSAGE_COMPLETED, "|cff00ccffLords and Ladies, this round has come to an end|r
Congratulations to:")
call ForForce(udg_AllPlayers, function Trig_Victory_Display)
call TriggerExecute(gg_trg_Stats_Show)
call TriggerSleepAction(2)
call EnableTrigger(gg_trg_End_Dialog)
endfunction
//===========================================================================
function InitTrig_Victory takes nothing returns nothing
set gg_trg_Victory = CreateTrigger( )
call TriggerRegisterTimerExpireEventBJ( gg_trg_Victory, udg_GameTime )
call TriggerAddAction( gg_trg_Victory, function Trig_Victory_Actions )
endfunction
function Trig_End_Dialog_Actions takes nothing returns nothing
call DialogDisplay(GetTriggerPlayer(), udg_DialogGameOver, true)
endfunction
//===========================================================================
function InitTrig_End_Dialog takes nothing returns nothing
set gg_trg_End_Dialog = CreateTrigger( )
call DisableTrigger( gg_trg_End_Dialog )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_End_Dialog, Player(0) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_End_Dialog, Player(1) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_End_Dialog, Player(2) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_End_Dialog, Player(3) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_End_Dialog, Player(4) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_End_Dialog, Player(5) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_End_Dialog, Player(6) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_End_Dialog, Player(7) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_End_Dialog, Player(8) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_End_Dialog, Player(9) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_End_Dialog, Player(10) )
call TriggerRegisterPlayerEventEndCinematic( gg_trg_End_Dialog, Player(11) )
call TriggerAddAction( gg_trg_End_Dialog, function Trig_End_Dialog_Actions )
endfunction
//TESH.scrollpos=-1
//TESH.alwaysfold=0
function Trig_Dialog_Continue_Actions takes nothing returns nothing
local force f = GetForceOfPlayer(GetTriggerPlayer())
if GetClickedButton() == udg_DialogContinueYes then
if bj_isSinglePlayer == false then
call SetForceAllianceStateBJ(GetPlayersAll(), f, bj_ALLIANCE_NEUTRAL_VISION)
call SetForceAllianceStateBJ(f, GetPlayersAll(), bj_ALLIANCE_NEUTRAL_VISION)
endif
else
call DialogDisplay(GetTriggerPlayer(), udg_DialogGameOver, true)
endif
call DestroyForce(f)
set f = null
endfunction
//===========================================================================
function InitTrig_Dialog_Continue takes nothing returns nothing
set gg_trg_Dialog_Continue = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_Dialog_Continue, udg_DialogContinue )
call TriggerAddAction( gg_trg_Dialog_Continue, function Trig_Dialog_Continue_Actions )
endfunction
function Trig_Dialog_GameOver_Actions takes nothing returns nothing
call CustomVictoryBJ(GetTriggerPlayer(), false, true)
endfunction
//===========================================================================
function InitTrig_Dialog_GameOver takes nothing returns nothing
set gg_trg_Dialog_GameOver = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_Dialog_GameOver, udg_DialogGameOver )
call TriggerAddAction( gg_trg_Dialog_GameOver, function Trig_Dialog_GameOver_Actions )
endfunction
function Trig_Leavers_Units takes nothing returns nothing
if isMage(GetEnumUnit()) or GetUnitTypeId(GetEnumUnit()) == Unit_Shade() then
call KillUnit(GetEnumUnit())
else
call SetUnitOwner(GetEnumUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE), true)
endif
endfunction
function Trig_Leavers_Actions takes nothing returns nothing
local group g = CreateGroup()
call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, udg_PlayerNames[GetConvertedPlayerId(GetTriggerPlayer())] + " has left the game.")
call GroupEnumUnitsOfPlayer(g, GetTriggerPlayer(), Condition(function ReturnTrue))
call ForGroup(g, function Trig_Leavers_Units)
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_Leavers takes nothing returns nothing
set gg_trg_Leavers = CreateTrigger( )
call TriggerRegisterPlayerEventLeave( gg_trg_Leavers, Player(0) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leavers, Player(1) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leavers, Player(2) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leavers, Player(3) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leavers, Player(4) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leavers, Player(5) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leavers, Player(6) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leavers, Player(7) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leavers, Player(8) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leavers, Player(9) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leavers, Player(10) )
call TriggerRegisterPlayerEventLeave( gg_trg_Leavers, Player(11) )
call TriggerAddAction( gg_trg_Leavers, function Trig_Leavers_Actions )
endfunction
function Trig_Random_Creep_Actions takes nothing returns nothing
local group g = GetUnitsOfPlayerAndTypeId(Player(PLAYER_NEUTRAL_AGGRESSIVE), Unit_Crypt())
local unit u
if CountUnitsInGroup(g) > 0 then
set u = GroupPickRandomUnit(g)
call IssueImmediateOrderById(u, Unit_Maiden())
if ModuloInteger(GetTriggerExecCount(GetTriggeringTrigger()), 3) == 0 then
set u = GroupPickRandomUnit(g)
call IssueImmediateOrderById(u, Unit_Maiden())
endif
set u = null
endif
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_Random_Creep takes nothing returns nothing
set gg_trg_Random_Creep = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Random_Creep, 42.00 )
call TriggerAddAction( gg_trg_Random_Creep, function Trig_Random_Creep_Actions )
endfunction
function Trig_Weather_Actions takes nothing returns nothing
call EnableWeatherEffect(udg_Weathers[1], false)
call EnableWeatherEffect(udg_Weathers[2], false)
call EnableWeatherEffect(udg_Weathers[GetRandomInt(0,2)], true)
endfunction
//===========================================================================
function InitTrig_Weather takes nothing returns nothing
set gg_trg_Weather = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Weather, 27.00 )
call TriggerAddAction( gg_trg_Weather, function Trig_Weather_Actions )
endfunction
function Trig_Trees_Regrow_Filter takes nothing returns boolean
local integer t = GetDestructableTypeId(GetFilterDestructable())
return t == 'CTtr' or t == 'Cttc'
endfunction
function Trig_Trees_Regrow_Regrow takes nothing returns nothing
call TriggerSleepAction(23.0)
call DestructableRestoreLife(GetDyingDestructable(), GetDestructableMaxLife(GetDyingDestructable()), true)
endfunction
function Trig_Trees_Regrow_Register takes nothing returns nothing
call TriggerRegisterDeathEvent(bj_destInRegionDiesTrig, GetEnumDestructable())
endfunction
function Trig_Trees_Regrow_Actions takes nothing returns nothing
set bj_destInRegionDiesTrig = CreateTrigger()
call EnumDestructablesInRect(GetPlayableMapRect(), Condition(function Trig_Trees_Regrow_Filter), function Trig_Trees_Regrow_Register)
call TriggerAddAction(bj_destInRegionDiesTrig, function Trig_Trees_Regrow_Regrow)
call DestroyTrigger(GetTriggeringTrigger())
endfunction
//===========================================================================
function InitTrig_Trees_Regrow takes nothing returns nothing
set gg_trg_Trees_Regrow = CreateTrigger()
call TriggerAddAction(gg_trg_Trees_Regrow, function Trig_Trees_Regrow_Actions)
endfunction
function Trig_MB_Time_Actions takes nothing returns nothing
call MultiboardSetTitleText(udg_MB, "Countdown: " + I2S(R2I(TimerGetRemaining(udg_GameTime))))
endfunction
//===========================================================================
function InitTrig_MB_Time takes nothing returns nothing
set gg_trg_MB_Time = CreateTrigger( )
call DisableTrigger( gg_trg_MB_Time )
call TriggerRegisterTimerEventPeriodic( gg_trg_MB_Time, 1.00 )
call TriggerAddAction( gg_trg_MB_Time, function Trig_MB_Time_Actions )
endfunction
function Trig_MB_Mages_Conditions takes nothing returns boolean
return GetUnitTypeId(GetTrainedUnit()) == Unit_Mage1()
endfunction
function Trig_MB_Mages_Actions takes nothing returns nothing
local integer n = GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))
set udg_StatsMages[n] = udg_StatsMages[n] + 1
call MultiboardSetItemValueBJ(udg_MB, 3, udg_PlayerRows[n], I2MB(udg_StatsMages[n]))
set udg_StatsMages[0] = udg_StatsMages[0] + 1
call MultiboardSetItemValueBJ(udg_MB, 3, udg_PlayerRows[0], I2S(udg_StatsMages[0]))
endfunction
//===========================================================================
function InitTrig_MB_Mages takes nothing returns nothing
set gg_trg_MB_Mages = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MB_Mages, EVENT_PLAYER_UNIT_TRAIN_FINISH )
call TriggerAddCondition( gg_trg_MB_Mages, Condition( function Trig_MB_Mages_Conditions ) )
call TriggerAddAction( gg_trg_MB_Mages, function Trig_MB_Mages_Actions )
endfunction
function Trig_MB_Units_Conditions takes nothing returns boolean
return GetUnitTypeId(GetTrainedUnit()) == Unit_Archer() or GetUnitTypeId(GetTrainedUnit()) == Unit_Wraith()
endfunction
function Trig_MB_Units_Actions takes nothing returns nothing
local integer n = GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))
set udg_StatsUnits[n] = udg_StatsUnits[n] + 1
call MultiboardSetItemValueBJ(udg_MB, 4, udg_PlayerRows[n], I2MB(udg_StatsUnits[n]))
set udg_StatsUnits[0] = udg_StatsUnits[0] + 1
call MultiboardSetItemValueBJ(udg_MB, 4, udg_PlayerRows[0], I2S(udg_StatsUnits[0]))
endfunction
//===========================================================================
function InitTrig_MB_Units takes nothing returns nothing
set gg_trg_MB_Units = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MB_Units, EVENT_PLAYER_UNIT_TRAIN_FINISH )
call TriggerAddCondition( gg_trg_MB_Units, Condition( function Trig_MB_Units_Conditions ) )
call TriggerAddAction( gg_trg_MB_Units, function Trig_MB_Units_Actions )
endfunction
function Trig_MB_Warriors_Conditions takes nothing returns boolean
return GetUnitTypeId(GetSummonedUnit()) == Unit_Skeleton1()
endfunction
function Trig_MB_Warriors_Actions takes nothing returns nothing
local integer n = GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))
set udg_StatsUnits[n] = udg_StatsUnits[n] + 1
call MultiboardSetItemValueBJ(udg_MB, 4, udg_PlayerRows[n], I2MB(udg_StatsUnits[n]))
set udg_StatsUnits[0] = udg_StatsUnits[0] + 1
call MultiboardSetItemValueBJ(udg_MB, 4, udg_PlayerRows[0], I2S(udg_StatsUnits[0]))
endfunction
//===========================================================================
function InitTrig_MB_Warriors takes nothing returns nothing
set gg_trg_MB_Warriors = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MB_Warriors, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_MB_Warriors, Condition( function Trig_MB_Warriors_Conditions ) )
call TriggerAddAction( gg_trg_MB_Warriors, function Trig_MB_Warriors_Actions )
endfunction
function Trig_Stats_More_Actions takes nothing returns nothing
local integer n = GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))
set udg_StatsFood[n] = udg_StatsFood[n] + 1
if udg_StatsFood[n] > udg_StatsFoodMax[n] then
set udg_StatsFoodMax[n] = udg_StatsFood[n]
endif
endfunction
//===========================================================================
function InitTrig_Stats_More takes nothing returns nothing
set gg_trg_Stats_More = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Stats_More, EVENT_PLAYER_UNIT_SUMMON )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Stats_More, EVENT_PLAYER_UNIT_TRAIN_FINISH )
call TriggerAddAction( gg_trg_Stats_More, function Trig_Stats_More_Actions )
endfunction
function Trig_Stats_Less_Actions takes nothing returns nothing
local integer n = GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))
set udg_StatsFood[n] = udg_StatsFood[n] - 1
endfunction
//===========================================================================
function InitTrig_Stats_Less takes nothing returns nothing
set gg_trg_Stats_Less = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Stats_Less, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( gg_trg_Stats_Less, function Trig_Stats_Less_Actions )
endfunction
function Trig_Stats_Early_Death_Conditions takes nothing returns boolean
return IsTriggerEnabled(GetTriggeringTrigger()) == true
endfunction
function Trig_Stats_Early_Death_Actions takes nothing returns nothing
call DisableTrigger(GetTriggeringTrigger())
set udg_EarlyDeath = R2I(TimerGetElapsed(udg_TotalTime))
set udg_EarlyDeathPlayer = GetEnumPlayer()
endfunction
//===========================================================================
function InitTrig_Stats_Early_Death takes nothing returns nothing
set gg_trg_Stats_Early_Death = CreateTrigger( )
call TriggerAddCondition( gg_trg_Stats_Early_Death, Condition( function Trig_Stats_Early_Death_Conditions ) )
call TriggerAddAction( gg_trg_Stats_Early_Death, function Trig_Stats_Early_Death_Actions )
endfunction
function Trig_Stats_Power_Builder_Conditions takes nothing returns boolean
return GetUnitTypeId(GetTriggerUnit()) == Unit_Crypt()
endfunction
function Trig_Stats_Power_Builder_Actions takes nothing returns nothing
local integer n = GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))
set udg_StatsCrypts[n] = udg_StatsCrypts[n] + 1
if udg_StatsCrypts[n] > udg_StatsCryptsMax[n] then
set udg_StatsCryptsMax[n] = udg_StatsCrypts[n]
endif
set n = GetConvertedPlayerId(GetChangingUnitPrevOwner())
set udg_StatsCrypts[n] = udg_StatsCrypts[n] - 1
endfunction
//===========================================================================
function InitTrig_Stats_Power_Builder takes nothing returns nothing
set gg_trg_Stats_Power_Builder = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Stats_Power_Builder, EVENT_PLAYER_UNIT_CHANGE_OWNER )
call TriggerAddCondition( gg_trg_Stats_Power_Builder, Condition( function Trig_Stats_Power_Builder_Conditions ) )
call TriggerAddAction( gg_trg_Stats_Power_Builder, function Trig_Stats_Power_Builder_Actions )
endfunction
function Trig_Stats_Show_Actions takes nothing returns nothing
local integer i = 0
local integer mf = 0
local integer mc = 0
local string f = ""
local string c = ""
loop
set i = i + 1
exitwhen i > 12
if udg_StatsFoodMax[i] > mf then
set mf = udg_StatsFoodMax[i]
endif
if udg_StatsCryptsMax[i] > mc then
set mc = udg_StatsCryptsMax[i]
endif
endloop
set i = 0
loop
set i = i + 1
exitwhen i > 12
if udg_StatsFoodMax[i] == mf then
if f == "" then
set f = udg_PlayerNames[i]
else
set f = f + ", " + udg_PlayerNames[i]
endif
endif
if udg_StatsCryptsMax[i] == mc then
if c == "" then
set c = udg_PlayerNames[i]
else
set c = c + ", " + udg_PlayerNames[i]
endif
endif
endloop
call DisplayTimedTextToPlayer(GetLocalPlayer(),0,0,200, "
The |cffffcc00Largest Army|r award, with |cffffcc00" + I2S(mf) + "|r units controlled at once, goes to:
" + f + "
The |cffffcc00Early Wimp|r award, with a defeat after only |cffffcc00" + I2S(udg_EarlyDeath / 60 ) + ":" + TimeString(ModuloInteger(udg_EarlyDeath, 60)) + "|r, goes to:
" + udg_PlayerNames[GetConvertedPlayerId(udg_EarlyDeathPlayer)] + "
The |cffffcc00Power Constructor|r award, with |cffffcc00" + I2S(mc) + "|r crypts owned at once, goes to:
" + c + "
Press |cffffcc00escape|r to quit.")
endfunction
//===========================================================================
function InitTrig_Stats_Show takes nothing returns nothing
set gg_trg_Stats_Show = CreateTrigger( )
call TriggerAddAction( gg_trg_Stats_Show, function Trig_Stats_Show_Actions )
endfunction
function Trig_Locals_Spawn_Conditions takes nothing returns boolean
return CountUnitsInGroup(udg_Locals) < 10
endfunction
function Trig_Locals_Spawn_Filter takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(), Player(bj_PLAYER_NEUTRAL_EXTRA)) == true and IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false
endfunction
function Trig_Locals_Spawn_Actions takes nothing returns nothing
local integer r = GetRandomInt(1, udg_LocalsSpawnCount)
local real x = GetLocationX(udg_LocalsSpawn[r])
local real y = GetLocationY(udg_LocalsSpawn[r])
local group g = CreateGroup()
call GroupEnumUnitsInRange(g, x, y, 1200.00, Condition(function Trig_Locals_Spawn_Filter))
if CountUnitsInGroup(g) == 0 then
call DestroyEffect(AddSpecialEffect("Objects\\Spawnmodels\\Demon\\DemonLargeDeathExplode\\DemonLargeDeathExplode.mdl", x, y))
call TriggerSleepAction(0.05)
if GetRandomInt(1, 100) <= 80 then
call GroupAddUnit(udg_Locals, CreateUnit(Player(bj_PLAYER_NEUTRAL_EXTRA), 'ndrj', x, y, bj_UNIT_FACING))
else
set bj_lastCreatedUnit = CreateUnit(Player(bj_PLAYER_NEUTRAL_EXTRA), 'ndmu', x, y, bj_UNIT_FACING)
call GroupAddUnit(udg_Locals, bj_lastCreatedUnit)
call SetUnitAnimation(bj_lastCreatedUnit, "birth")
endif
endif
call DestroyGroup(g)
set g = null
endfunction
//===========================================================================
function InitTrig_Locals_Spawn takes nothing returns nothing
set gg_trg_Locals_Spawn = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Locals_Spawn, 7.00 )
call DisableTrigger( gg_trg_Locals_Spawn )
call TriggerAddCondition( gg_trg_Locals_Spawn, Condition( function Trig_Locals_Spawn_Conditions ) )
call TriggerAddAction( gg_trg_Locals_Spawn, function Trig_Locals_Spawn_Actions )
endfunction
function Trig_Locals_Wander_Wander takes nothing returns nothing
call IssuePointOrderLoc(GetEnumUnit(), "attack", udg_LocalsSpawn[GetRandomInt(1, udg_LocalsSpawnCount)])
endfunction
function Trig_Locals_Wander_Actions takes nothing returns nothing
call ForGroup(udg_Locals, function Trig_Locals_Wander_Wander)
endfunction
//===========================================================================
function InitTrig_Locals_Wander takes nothing returns nothing
set gg_trg_Locals_Wander = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Locals_Wander, 8.00 )
call TriggerAddAction( gg_trg_Locals_Wander, function Trig_Locals_Wander_Actions )
endfunction
function Trig_Locals_Clean_Conditions takes nothing returns boolean
return IsUnitInGroup(GetTriggerUnit(), udg_Locals) == true
endfunction
function Trig_Locals_Clean_Actions takes nothing returns nothing
call GroupRemoveUnit(udg_Locals, GetTriggerUnit())
endfunction
//===========================================================================
function InitTrig_Locals_Clean takes nothing returns nothing
set gg_trg_Locals_Clean = CreateTrigger( )
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Locals_Clean, Player(bj_PLAYER_NEUTRAL_EXTRA), EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Locals_Clean, Condition( function Trig_Locals_Clean_Conditions ) )
call TriggerAddAction( gg_trg_Locals_Clean, function Trig_Locals_Clean_Actions )
endfunction
function Trig_From_Units_Conditions takes nothing returns boolean
return IsPlayerInForce(GetOwningPlayer(GetTriggerUnit()), udg_AllPlayers) == true
endfunction
function Trig_From_Units_Actions takes nothing returns nothing
local player p = GetOwningPlayer(GetTriggerUnit())
local integer n = GetConvertedPlayerId(p)
call DoMystery(p)
set udg_Deaths[n] = udg_Deaths[n] + 1
if udg_Deaths[n] >= 100 and GetPlayerTechCount(p, 'Rura', true) == 0 then
call SetPlayerTechResearched(p, 'Rura', 1)
call QuestMessageBJ(udg_PlayerGroup[n], bj_QUESTMESSAGE_UNITACQUIRED, "|cff00ccffDear player:|r
The |cffffcc00Dark Overlord|r takes pity on your pathetic attempts and grants your melee Skeletons a permanent |cffffcc00damage|r upgrade.")
endif
set p = null
endfunction
//===========================================================================
function InitTrig_From_Units takes nothing returns nothing
set gg_trg_From_Units = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_From_Units, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_From_Units, Condition( function Trig_From_Units_Conditions ) )
call TriggerAddAction( gg_trg_From_Units, function Trig_From_Units_Actions )
endfunction
function Trig_From_Crypts_Conditions takes nothing returns boolean
return IsPlayerInForce(GetChangingUnitPrevOwner(), udg_AllPlayers) == true
endfunction
function Trig_From_Crypts_Actions takes nothing returns nothing
local player p = GetChangingUnitPrevOwner()
local integer n = GetConvertedPlayerId(p)
call DoMystery(p)
set udg_LostCrypts[n] = udg_LostCrypts[n] + 1
if udg_LostCrypts[n] >= 3 and GetPlayerTechCount(p, 'Rgfo', true) == 0 and GetPlayerState(p, PLAYER_STATE_RESOURCE_FOOD_CAP) > 0 then
call SetPlayerTechResearched(p, 'Rgfo', 1)
call QuestMessageBJ(udg_PlayerGroup[n], bj_QUESTMESSAGE_UNITACQUIRED, "|cff00ccffDear player:|r
As a token of confidence that you will not disappoint him any further, the |cffffcc00Dark Overlord|r grants your Crypts a permanent |cffffcc00hitpoints|r upgrade.")
endif
set p = null
endfunction
//===========================================================================
function InitTrig_From_Crypts takes nothing returns nothing
set gg_trg_From_Crypts = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_From_Crypts, EVENT_PLAYER_UNIT_CHANGE_OWNER )
call TriggerAddCondition( gg_trg_From_Crypts, Condition( function Trig_From_Crypts_Conditions ) )
call TriggerAddAction( gg_trg_From_Crypts, function Trig_From_Crypts_Actions )
endfunction