//TESH.scrollpos=42
//TESH.alwaysfold=0
//===========================================================================
// Counts key structures owned by a player and his or her allies, including
// structures currently upgrading or under construction.
//
// Key structures: Town Hall, Great Hall, Tree of Life, Necropolis
//
function LivingPlayerHallsFilter takes nothing returns boolean
return (IsUnitAliveBJ(GetFilterUnit()) and IsUnitType(GetFilterUnit(),UNIT_TYPE_TOWNHALL))
endfunction
function CountLivingPlayerTownHalls takes player whichPlayer returns integer
local group g
local integer matchedCount
local boolexpr b=Filter(function LivingPlayerHallsFilter)
set g = CreateGroup()
call GroupEnumUnitsOfPlayer(g, whichPlayer, b)
set matchedCount = CountUnitsInGroup(g)
call DestroyGroup(g)
call DestroyBoolExpr(b)
set b=null
set g=null
return matchedCount
endfunction
function Custom_MeleeGetAllyKeyStructureCount takes player whichPlayer returns integer
local integer playerIndex
local player indexPlayer
local integer keyStructs
// Count the number of buildings controlled by all not-yet-defeated co-allies.
set keyStructs = 0
set playerIndex = 0
loop
set indexPlayer = Player(playerIndex)
if (PlayersAreCoAllied(whichPlayer, indexPlayer)) then
set keyStructs = keyStructs + CountLivingPlayerTownHalls(indexPlayer)
// set keyStructs = keyStructs + GetPlayerTypedUnitCount(indexPlayer, "townhall", true, true)
// set keyStructs = keyStructs + GetPlayerTypedUnitCount(indexPlayer, "greathall", true, true)
// set keyStructs = keyStructs + GetPlayerTypedUnitCount(indexPlayer, "treeoflife", true, true)
// set keyStructs = keyStructs + GetPlayerTypedUnitCount(indexPlayer, "necropolis", true, true)
// set keyStructs = keyStructs + GetPlayerTypedUnitCount(indexPlayer, "custom_h030", true, true)
// set keyStructs = keyStructs + GetPlayerTypedUnitCount(indexPlayer, "custom_h01C", true, true)
// set keyStructs = keyStructs + GetPlayerTypedUnitCount(indexPlayer, "custom_h012", true, true)
// set keyStructs = keyStructs + GetPlayerTypedUnitCount(indexPlayer, "custom_h013", true, true)
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('h013',indexPlayer)//Never use group functions for this, just count living units for player. Much better idea.
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('h014',indexPlayer)
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('h015',indexPlayer)
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('h01C',indexPlayer)
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('h01E',indexPlayer)
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('h01F',indexPlayer)
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('h012',indexPlayer)
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('h02F',indexPlayer)
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('h02J',indexPlayer)
// set keyStructs = keySructs + CountLivingPlayerUnitsOfTypeId('h030',indexPlayer)
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('h000',indexPlayer)//Non-modded human custom ids
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('h00D',indexPlayer)
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('h00E',indexPlayer)
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('o00C',indexPlayer)//Non-modded orc custom ids
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('o00D',indexPlayer)
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('o00E',indexPlayer)
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('e00M',indexPlayer)//Non-modded night elf custom ids
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('e00N',indexPlayer)
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('e00O',indexPlayer)
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('u00C',indexPlayer)//Non-modded undead custom ids
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('u00D',indexPlayer)
// set keyStructs = keyStructs + CountLivingPlayerUnitsOfTypeId('u00E',indexPlayer)
endif
set playerIndex = playerIndex + 1
exitwhen playerIndex == bj_MAX_PLAYERS
endloop
return keyStructs
endfunction
//===========================================================================
function Custom_MeleePlayerIsCrippled takes player whichPlayer returns boolean
local integer allyStructures = MeleeGetAllyStructureCount(whichPlayer)
local integer allyKeyStructures = Custom_MeleeGetAllyKeyStructureCount(whichPlayer)
// Dead teams are not considered to be crippled.
return (allyStructures > 0) and (allyKeyStructures <= 0)
endfunction
//===========================================================================
// Test each player to determine if anyone has become crippled.
//
function Custom_MeleeCheckForCrippledPlayers takes nothing returns nothing
local integer playerIndex
local player indexPlayer
local force crippledPlayers = CreateForce()
local boolean isNowCrippled
local race indexRace
// The "finish soon" exposure of all players overrides any "crippled" exposure
if bj_finishSoonAllExposed then
return
endif
// Check each player to see if he or she has been crippled or uncrippled.
set playerIndex = 0
loop
set indexPlayer = Player(playerIndex)
set isNowCrippled = Custom_MeleePlayerIsCrippled(indexPlayer)
if (not bj_playerIsCrippled[playerIndex] and isNowCrippled) then
// Player became crippled; start their cripple timer.
set bj_playerIsCrippled[playerIndex] = true
call TimerStart(bj_crippledTimer[playerIndex], bj_MELEE_CRIPPLE_TIMEOUT, false, function MeleeCrippledPlayerTimeout)
if (GetLocalPlayer() == indexPlayer) then
// Use only local code (no net traffic) within this block to avoid desyncs.
// Show the timer window.
call TimerDialogDisplay(bj_crippledTimerWindows[playerIndex], true)
// Display a warning message.
call DisplayTimedTextToPlayer(indexPlayer, 0, 0, bj_MELEE_CRIPPLE_MSG_DURATION, "|cffffcc00"+udg_RevealWarning+"|r")
endif
elseif (bj_playerIsCrippled[playerIndex] and not isNowCrippled) then
// Player became uncrippled; stop their cripple timer.
set bj_playerIsCrippled[playerIndex] = false
call PauseTimer(bj_crippledTimer[playerIndex])
if (GetLocalPlayer() == indexPlayer) then
// Use only local code (no net traffic) within this block to avoid desyncs.
// Hide the timer window for this player.
call TimerDialogDisplay(bj_crippledTimerWindows[playerIndex], false)
// Display a confirmation message if the player's team is still alive.
if (MeleeGetAllyStructureCount(indexPlayer) > 0) then
if (bj_playerIsExposed[playerIndex]) then
call DisplayTimedTextToPlayer(indexPlayer, 0, 0, bj_MELEE_CRIPPLE_MSG_DURATION, GetLocalizedString("CRIPPLE_UNREVEALED"))
else
call DisplayTimedTextToPlayer(indexPlayer, 0, 0, bj_MELEE_CRIPPLE_MSG_DURATION, GetLocalizedString("CRIPPLE_UNCRIPPLED"))
endif
endif
endif
// If the player granted shared vision, deny that vision now.
call MeleeExposePlayer(indexPlayer, false)
endif
set playerIndex = playerIndex + 1
exitwhen playerIndex == bj_MAX_PLAYERS
endloop
endfunction
//===========================================================================
// Determine if the lost unit should result in any defeats or victories.
//
function Custom_MeleeCheckLostUnit takes unit lostUnit returns nothing
local player lostUnitOwner = GetOwningPlayer(lostUnit)
// We only need to check for mortality if this was the last building.
if (GetPlayerStructureCount(lostUnitOwner, true) <= 0) then
call MeleeCheckForLosersAndVictors()
endif
// Check if the lost unit has crippled or uncrippled the player.
// (A team with 0 units is dead, and thus considered uncrippled.)
call Custom_MeleeCheckForCrippledPlayers()
endfunction
//===========================================================================
// Determine if the gained unit should result in any defeats, victories,
// or cripple-status changes.
//
function Custom_MeleeCheckAddedUnit takes unit addedUnit returns nothing
local player addedUnitOwner = GetOwningPlayer(addedUnit)
// If the player was crippled, this unit may have uncrippled him/her.
if (bj_playerIsCrippled[GetPlayerId(addedUnitOwner)]) then
call Custom_MeleeCheckForCrippledPlayers()
endif
endfunction
//===========================================================================
function Custom_MeleeTriggerActionConstructCancel takes nothing returns nothing
call Custom_MeleeCheckLostUnit(GetCancelledStructure())
endfunction
//===========================================================================
function Custom_MeleeTriggerActionUnitDeath takes nothing returns nothing
if (IsUnitType(GetDyingUnit(), UNIT_TYPE_STRUCTURE)) then
call Custom_MeleeCheckLostUnit(GetDyingUnit())
endif
endfunction
//===========================================================================
function Custom_MeleeTriggerActionUnitConstructionStart takes nothing returns nothing
call Custom_MeleeCheckAddedUnit(GetConstructingStructure())
endfunction
//===========================================================================
function Custom_MeleeTriggerActionAllianceChange takes nothing returns nothing
call MeleeCheckForLosersAndVictors()
call Custom_MeleeCheckForCrippledPlayers()
endfunction
//===========================================================================
function MeleeInitVictoryDefeatCustomized takes nothing returns nothing
local trigger trig
local integer index
local player indexPlayer
// Create a timer window for the "finish soon" timeout period, it has no timer
// because it is driven by real time (outside of the game state to avoid desyncs)
set bj_finishSoonTimerDialog = CreateTimerDialog(null)
// Set a trigger to fire when we receive a "finish soon" game event
set trig = CreateTrigger()
call TriggerRegisterGameEvent(trig , EVENT_GAME_TOURNAMENT_FINISH_SOON)
call TriggerAddAction(trig , function MeleeTriggerTournamentFinishSoon)
// Set a trigger to fire when we receive a "finish now" game event
set trig = CreateTrigger()
call TriggerRegisterGameEvent(trig , EVENT_GAME_TOURNAMENT_FINISH_NOW)
call TriggerAddAction(trig , function MeleeTriggerTournamentFinishNow)
// Set up each player's mortality code.
set index = 0
loop
set indexPlayer = Player(index)
// Make sure this player slot is playing.
if ( GetPlayerSlotState(indexPlayer) == PLAYER_SLOT_STATE_PLAYING ) then
set bj_meleeDefeated[index]=false
set bj_meleeVictoried[index]=false
// Create a timer and timer window in case the player is crippled.
set bj_playerIsCrippled[index]=false
set bj_playerIsExposed[index]=false
set bj_crippledTimer[index]=CreateTimer()
set bj_crippledTimerWindows[index]=CreateTimerDialog(bj_crippledTimer[index])
call TimerDialogSetTitle(bj_crippledTimerWindows[index] , MeleeGetCrippledTimerMessage(indexPlayer))
// Set a trigger to fire whenever a building is cancelled for this player.
set trig = CreateTrigger()
call TriggerRegisterPlayerUnitEvent(trig , indexPlayer , EVENT_PLAYER_UNIT_CONSTRUCT_CANCEL , null)
call TriggerAddAction(trig , function Custom_MeleeTriggerActionConstructCancel)
// Set a trigger to fire whenever a unit dies for this player.
set trig = CreateTrigger()
call TriggerRegisterPlayerUnitEvent(trig , indexPlayer , EVENT_PLAYER_UNIT_DEATH , null)
call TriggerAddAction(trig , function Custom_MeleeTriggerActionUnitDeath)
// Set a trigger to fire whenever a unit begins construction for this player
set trig = CreateTrigger()
call TriggerRegisterPlayerUnitEvent(trig , indexPlayer , EVENT_PLAYER_UNIT_CONSTRUCT_START , null)
call TriggerAddAction(trig , function Custom_MeleeTriggerActionUnitConstructionStart)
// Set a trigger to fire whenever this player defeats-out
set trig = CreateTrigger()
call TriggerRegisterPlayerEvent(trig , indexPlayer , EVENT_PLAYER_DEFEAT)
call TriggerAddAction(trig , function MeleeTriggerActionPlayerDefeated)
// Set a trigger to fire whenever this player leaves
set trig = CreateTrigger()
call TriggerRegisterPlayerEvent(trig , indexPlayer , EVENT_PLAYER_LEAVE)
call TriggerAddAction(trig , function MeleeTriggerActionPlayerLeft)
// Set a trigger to fire whenever this player changes his/her alliances.
set trig = CreateTrigger()
call TriggerRegisterPlayerAllianceChange(trig , indexPlayer , ALLIANCE_PASSIVE)
call TriggerRegisterPlayerStateEvent(trig , indexPlayer , PLAYER_STATE_ALLIED_VICTORY , EQUAL , 1)
call TriggerAddAction(trig , function Custom_MeleeTriggerActionAllianceChange)
else
set bj_meleeDefeated[index]=true
set bj_meleeVictoried[index]=false
// Handle leave events for observers
if ( IsPlayerObserver(indexPlayer) ) then
// Set a trigger to fire whenever this player leaves
set trig = CreateTrigger()
call TriggerRegisterPlayerEvent(trig , indexPlayer , EVENT_PLAYER_LEAVE)
call TriggerAddAction(trig , function MeleeTriggerActionPlayerLeft)
endif
endif
set index = index + 1
exitwhen index == bj_MAX_PLAYERS
endloop
// Test for victory / defeat at startup, in case the user has already won / lost.
// Allow for a short time to pass first, so that the map can finish loading.
call TimerStart(CreateTimer() , 2.0 , false , function Custom_MeleeTriggerActionAllianceChange)
endfunction
Name | Type | is_array | initial_value |
AI_Chooser | dialog | No | |
AI_Mode | integer | No | |
ai_random_race | integer | No | |
Blessing_int | integer | No | |
block_integer | integer | No | |
camera | camerasetup | Yes | |
chosenplayers | integer | No | |
CoreBuilding | unitcode | Yes | |
DB_AIChooser | button | Yes | |
DB_RaceChoose | button | Yes | |
DB_ShowRaceOV | button | Yes | |
Decay_int | integer | No | |
Decay_player | player | No | |
float_integer | integer | No | |
GoldCurrent | integer | No | |
GoldPrevious | integer | No | 100 |
holdposition | group | No | |
invul_group | group | No | |
invul_real | real | No | |
Invulnerable | hashtable | No | |
minionswarm | integer | No | 3 |
Night | unit | No | |
player | player | Yes | |
Racechoose | dialog | No | |
Racerun | dialog | No | |
ResourceTax | integer | No | |
ResourceTotal | integer | No | |
RevealWarning | string | No | You will be revealed to your opponents unless you build a Town Hall structure. |
time_integer | integer | No | |
Time_LB | leaderboard | No | |
time_minutes | integer | No | |
time_realsecs | integer | No | |
time_seconds | integer | No | |
time_string | string | No | |
time_tensecs | integer | No | |
Townhall | unitcode | Yes | |
Trickster_caster | unit | No | |
Trickster_target | unit | No | |
Tutorial | trigger | Yes | |
Tutorial_boolean | boolean | No | |
Tutorial_integer | integer | No | |
Viewrace | dialog | No | |
viewrace_buttons | button | Yes | |
warrace | race | Yes | |
Worker | unitcode | Yes | |
workers | integer | No | |
workers_AI | integer | No |
//TESH.scrollpos=0
//TESH.alwaysfold=0
new map - snowflake
r2r distance -
map changes
- gold mine value from 10000 to 12500
general changes
- reworked tech trees for defiled and fallen
- core structure HP from 1500 to 2000
- core structure combat and utility spells location swapped
- core structure abilities now have a 20 second cd
- user interface tactical retreat rework, now can target location to move
- user interface army control abilities now ignore channeling units as well
- user interface new 'ability' taunt
- updated tooltips and hotkeys
- updated art for some units and abilities
- standardized cast ranges for spellcasters
- decreased tech costs
Human AI
- blessing is announced 2 minutes before its application
- gold penalty from 7/5/3 reverted to 6/5/4
- supply income formula changed
- now banks up more resources before transitioning
- all heroes now have 2 armour, base HP from 100 to 250
- knight damage from 35(+5) to 29(+4), armour from 5 to 4
- gryphon hp from 1300 to 1100
- priest inner fire armour from 5 to 3
- animal war upgrade hp from 200 to 150
- ai now has magic sentry
curator
- general upgrades moved to core
- forest camp units now cost more 50 minerals but 25 less biomass
- furbolg warrior damage from 19(+2) to 22(+3), aspd from 1.35 to 1.5
- quillbeast damage from 20(+3) to 25(+3)
- jungle stalker cleave changed to pulverize, requires upgrade
- green lizard attack range from 700 to 600, movement speed from 250 to 225
- harpy queen armour aura from 2/3 to 1/2
- hippogryph ancient damage from 28(+4) to 28(+3), normal damage from 25(+3) to 23(+3)
- chimaera attack speed from 1.7 to 2
- spellcasters:
- gnoll enchanter natural cure renamed to faerie blessing
- gnoll enchanter overgrowth renamed to return to nature
- wildkin wild growth renamed to natural energy
- gnoll enchanter new spell rejuvenation, dispel magic removed
- gnoll enchanter now has natural energy, return to nature, and rejuvenation
- gnoll new upgrade - focused rejuvenation: increases the regen rate of rejuv
- faerie new spell natures grasp (ensnare), magical root removed
- faerie faerie blessing from 2/4 armour and 7/10 hp regen to 2/2 armour and 5/10 hp regen
- faerie celestial serenity no longer needs upgrade
- faerie now has faerie blessing, natures grasp, celestial serenity
- wildkin now has boulder toss, slam, oracles safeguard, and spell immunity
defiled
- production rearrange: ground production structures murloc village and spawning grounds
- murgul units renamed to murloc, and are produced in murloc village
- other ranged units are trained in spawning grounds
- murloc tiderunner aspd from 1.6 to 1.4
- murgul infiltrator aspd from 1.8 to 1.7
- murloc flesheater damage from 23 to 24
- snap dragon rescale - now costs 3 supply, cost from 150/25 to 200/75, combat stats increased.
- naga myrmidon removed!
- naga royal guard cost from 300/175 to 300/150
- naga royal guard air attack no longer splashes, damage from 41(+5) to 51(+7), aspd from 1.5 to 1.8
- naga royal guard ground attack damage from 33(+5) to 47(+6), aspd from 1.5 to 1.8
- naga royal guard armour from 5 to 3
- dragon turtle splash aoe from 50/150/250 to 50/100/150
- hydra damage from 59(+7) to 63(+9)
- hydra no longer splits upon death
- azure serpent aspd from 1.7 to 1.8
- corrosive bile renamed to corrosive toxin
- spellcasters:
- naga siren vengeful psyche renamed to haunt, illusion damage from 200% to 100%, manacost from 150 to 100
- naga siren new ability inception (possession), replacing vengeful psyche
- naga siren parasite manacost from 25 to 50
- shadowcaster new(?) ability poison bomb (acid bomb)
- shadowcaster now has shadow curse, haunt, and poison bomb
- revenant rite of the depths removed, new ability magic theft (spell steal, enemies only)
- revenant now has magic theft, deconstruction, and takeover
- revenant upgrade - now uses caster upgrade
exalted
- new unit! battle golem trained from factory, requires lab
- fortified design upgrade moved to battle golem
- emissary rescale - damage from 18(+2) to 32(+4), aspd from 1.4 to 2
- emissary attack range from 600 to 400, projectile speed from 600 to 1400.
- lieutenant damage from 25(+4) to 28(+4)
- elder swordsmen mana from 200 to 150, cost from 150 to 125
- fuschia dynamo cost from 100/50 to 100/100, individual upgrades cost from 100/100 to 50/50
- fuschia dynamo now requires arcane spire instead of violet citadel
- phoenix damage from 47(+6) to 55(+7), attack speed from 1.5 to 1.7
- spellcasters:
- priest now has blinding light, neutralize and new ability holy light
- sorceress purifying fire renamed to enrapture
- sorceress now has firebolt, enrapture and polymorph
- sorceress polymorph duration from 45 to 60
- grand magus now has white noise, no longer slows
- grand magus arcane implosion manacost from 150 to 100
- grand magus light of justice aoe from 300 to 450, manacost from 200 to 250
- essence skywagon renamed to skywagon (patch 1.35 hotfix)
- no longer has resurrection, now has new(?) ability static field (forked lightining)
- mystic core arcane flux aoe from 400 to 600
fallen
- ghost renamed to wraith, wizard renamed to necromancer, scaled up to 3 supply
- fire drake shadow fire renamed to liquid fire
- the forgotten one armour reduction from 7 to 4
- bandit damage from 11 to 14
- felbeast ground damage from 25 to 29
- diabolic new upgrade - nether break: improves corruption
- zombie upgrade moved to haunted cathedral
- wraith phantom streamlining movespeed from 100 to 75
- new upgrade - cursed fossil (requires unholy sanctuary): increase death wyrm by 300
- death wyrm hp from 1650 to 1300/1600
- spellcasters:
- deceiver rescale - now costs 3 supply, stats increased
- deceiver new ability - trickster: swaps location and deals 100 damage
- deceiver death foretold moved to harbinger, replacing necrosis orb
- deceiver upgrade change - devils focus: increases trickster cast range
- necro rescale - now costs 3 supply, stats increased
- unholy charm now decreases enemy armour and damage instead of empowering allied
- necro death coil damage from 400/600 to 500
- harbinger upgrade change - dying wish: increases death foretold attack speed
bug fixes
- aetherize no longer recasts on stray units after initial cast
//TESH.scrollpos=57
//TESH.alwaysfold=0
new map - sandlock
r2r distance 44 seconds
testing new mechanic destructible door
worker changelist
- mine faster, but take longer to train
- game starts with 6 workers
mineral ore value changed from 12500 to 12000
readjusted some unit sizes
mana regeneration upgrades from 1.0 to 0.5
unit training times rescaled overall
town hall training time from 70/60/80 to 75/75/90
interface text changed
Human AI changes
- economy reworked to account for noobcraft worker changes
- difficulty from 8/6/4 to 7/6/5
- all heroes can hit air units now
- now trains gyrocopter
- probably trains gryphon earlier
- bloodmage blessing HP reduction from -0.20 to -0.15, ranged damage decreased
- paladin blessing movespeed reduction from -50 to -25
core ability changes
- economy abilities rebalanced to compensate for worker changes
- decaying flesh now grants minerals as well, and lasts 15 seconds only
- black market now removes more minerals but gains a quarter instead of half
- fon ?
- extraction ?
curator changes
- quillbeast rescaled, overall buffed
- disruptive quills nerfed but easier to research
- removed resistant skin from jungle stalkers
- chimaerae are no longer ancients
- forest heal from 60/80 to 50/75
- queens rally cooldown from 75 to 120
- queens command from 8/12 to 7/10
-
- queens ascension cost from 300/300 to 200/200, duration from 120 to 90
spellcasters:
- natural energy decreased from +50/+50 to +50/+25, manacost decreased from 75 to 50
- rejuvenation from 600/600 over 10/6 seconds to 480/720 over 12/12 seconds.
- elderwood summoning now no longer needs a treant
- faerie blessing duration from 30 to 60
- natures grasp manacost from 100 to 75
- celestial serenity no longer silences, manacost from 250 to 200
- wildkin new ability oracle cyclone
- slam renamed to wildkin slam, stun duration from 5 to 3
defiled changes
- fixed a misplaced icon
- cerulean wyvern can now attack structures also
spellcasters:
- naga siren new ability frost nova
- naga siren new ability charmed sleep
- parasite now spawns only 1 watery minion
- haunt manacost from 100 to 150
- poison bomb renamed to shadow bomb
- shadow bomb damage from 7 to 5, aoe from 350 to 300, manacost from 150 to 200, duration from 30 to 60
- takeover manacost from 250 to 200
exalted changes
- swordsman(and elder) damage from 16 to 15
- phoenix attack speed from 1.7 to 1.9
- magic binding duration from 30 to 15
- barrage engine cost from 300/200 to 250/150
- barrage engine aspd from 0.5 to 0.6
- crossbow moved to 1,0
- crossbow cost from 300/150 to 300/200
- crossbow splash damage from 100/100 to 40/25
- expanding intellect cost from 150/100 to 100/100
- divine revelation now increases aoe instead of reduce manacost, cost from 150/150 to 100/100
- crimson stabilizers range from 200 to 150, cost from 200/200 to 150/150
- searing chains cost from 150/150 to 150/100
spellcasters:
- blinding light to grand magus
- priest new ability concord
- neutralize manacost from 75 to 100, duration from 20 to 10, summoned unit damage from 300 to 450
- blinding light from decreased from 100 to 50, duration increased from 15 to 60
- sorceress new ability arcanite attack
- enrapture duration from 30 to 20, damage from 20 to 30
- light of justice now silences, cripples and slows instead of disarm, manacost from 250 to 300, duration from 30 to 15
fallen changes
- wraith hp decreased from 650 to 600
- inferno damage from 100 to 150
- death wyrm attack speed from 2 to 2.2
- death wyrm armour from 7 to 2
- death wyrm hp from 1300 to 1500
- death wyrm upgrade now increases armour instead of hp
- ghost attack range from 450 to 500,
- succubus attack range from 500 to 100 (melee)
- succubus and necro switched icon position
- nether break removed
- zombie longevity renamed to undead mastery
- undead mastery now decreases raise dead manacost instead of increase zombie hp
spellcasters:
- deceiver reverted to 2 supply lmao, abilities nerfed
//- trickster damage from 100 to 150, range from 900/1300 to 1300 (wtf is this misrecording...)
- death coil from 400/500 to 300/450, manacost from 125 to 100, moved to w
- unholy charm duration from 10 to 15, aoe from 900 to 1300, manacost from 100 to 150, moved to e
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Human_AI_Starting_Actions takes nothing returns nothing
local location p = GetStartLocationLoc(GetPlayerStartLocation(Player(1)))
call MeleeStartingUnitsHuman(Player(1), p, true, true, true)
call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_GOLD, 100 )
call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_LUMBER, 50 )
call StartMeleeAI( Player(1), "war3mapImported\\Human1.35x.ai" )
call EnableTrigger( gg_trg_hero_level_ups )
call EnableTrigger( gg_trg_income_buffs )
call EnableTrigger( gg_trg_supply_income )
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Human_AI_Starting takes nothing returns nothing
set gg_trg_Human_AI_Starting = CreateTrigger( )
call TriggerAddAction( gg_trg_Human_AI_Starting, function Trig_Human_AI_Starting_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_hero_level_ups_Filter takes nothing returns boolean
local boolean a = GetUnitLevel(GetFilterUnit()) < 10
local boolean b = IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO)
return a and b
endfunction
function Trig_hero_level_ups_Func001A takes nothing returns nothing
local integer i = (10 + udg_ResourceTax)
call AddHeroXP( GetEnumUnit(), ( 50 + ( i * udg_time_minutes ) ), false )
endfunction
function Trig_hero_level_ups_Actions takes nothing returns nothing
call ForGroupBJ( GetUnitsInRectMatching(GetPlayableMapRect(), Condition(function Trig_hero_level_ups_Filter)), function Trig_hero_level_ups_Func001A )
endfunction
//===========================================================================
function InitTrig_hero_level_ups takes nothing returns nothing
set gg_trg_hero_level_ups = CreateTrigger( )
call DisableTrigger( gg_trg_hero_level_ups )
call TriggerRegisterTimerEventPeriodic( gg_trg_hero_level_ups, 30.00 )
call TriggerAddAction( gg_trg_hero_level_ups, function Trig_hero_level_ups_Actions )
endfunction
//TESH.scrollpos=3
//TESH.alwaysfold=0
function IsWorker takes nothing returns boolean
local boolean a = IsUnitType(GetFilterUnit(), UNIT_TYPE_PEON)
local boolean b = GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE) > 0
return a and b
endfunction
function Trig_supply_income_Actions takes nothing returns nothing
local group workers = GetUnitsOfPlayerMatching(Player(1), Condition(function IsWorker))
local integer worker = CountUnitsInGroup(workers)
local integer supply = GetPlayerState(Player(1), PLAYER_STATE_RESOURCE_FOOD_USED) + 50
local integer bonus
if supply > 150 then
set supply = 150
endif
set bonus = R2I( worker * supply * 0.006 * (10 + udg_ResourceTax) )
if bonus < 0 then
set bonus = 0
endif
set udg_workers_AI = worker
//call DisplayTextToPlayer(Player(0), 0, 0, I2S(bonus))
call AdjustPlayerStateBJ( bonus, Player(1), PLAYER_STATE_RESOURCE_GOLD )
endfunction
//===========================================================================
function InitTrig_supply_income takes nothing returns nothing
set gg_trg_supply_income = CreateTrigger( )
call DisableTrigger( gg_trg_supply_income )
call TriggerRegisterTimerEventPeriodic( gg_trg_supply_income, 5.00 )
call TriggerAddAction( gg_trg_supply_income, function Trig_supply_income_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_mineral_balance_Actions takes nothing returns nothing
local integer gold = GetPlayerState(Player(1), PLAYER_STATE_RESOURCE_GOLD)
local integer lumber = GetPlayerState(Player(1), PLAYER_STATE_RESOURCE_LUMBER)
local integer total = (gold + lumber)/3
call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_GOLD, ( total * 2 ) )
call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_LUMBER, ( total * 1 ) )
endfunction
//===========================================================================
function InitTrig_mineral_balance takes nothing returns nothing
set gg_trg_mineral_balance = CreateTrigger( )
call DisableTrigger( gg_trg_mineral_balance )
call TriggerRegisterTimerEventPeriodic( gg_trg_mineral_balance, 5.00 )
call TriggerAddAction( gg_trg_mineral_balance, function Trig_mineral_balance_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_op_gg_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetTriggerUnit()) == Player(1) ) ) then
return false
endif
if ( not ( ( GetPlayerState(Player(1), PLAYER_STATE_RESOURCE_FOOD_USED) * 6 ) < GetPlayerState(Player(0), PLAYER_STATE_RESOURCE_FOOD_USED) ) ) then
return false
endif
return true
endfunction
function ggchat takes integer i returns nothing
if (i == 1) then
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: i like how you think youre good LOL" )
elseif (i == 2) then
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: fucking cunt playing op race" )
elseif (i == 3) then
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: youre actually living cancer" )
elseif (i == 4) then
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: piece of shit player" )
elseif (i == 5) then
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: you got lucky kid" )
elseif (i == 6) then
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: i have no idea how i lost to such a shitty player like you" )
endif
endfunction
function Trig_op_gg_Func002C takes nothing returns boolean
if ( not ( GetPlayerRace(Player(0)) == udg_warrace[1] ) ) then
return false
endif
return true
endfunction
function Trig_op_gg_Func003C takes nothing returns boolean
if ( not ( GetPlayerRace(Player(0)) == udg_warrace[2] ) ) then
return false
endif
return true
endfunction
function Trig_op_gg_Func004C takes nothing returns boolean
if ( not ( GetPlayerRace(Player(0)) == udg_warrace[3] ) ) then
return false
endif
return true
endfunction
function Trig_op_gg_Func005C takes nothing returns boolean
if ( not ( GetPlayerRace(Player(0)) == udg_warrace[4] ) ) then
return false
endif
return true
endfunction
function Trig_op_gg_Func009002 takes nothing returns nothing
call KillUnit( GetEnumUnit() )
endfunction
function Trig_op_gg_Actions takes nothing returns nothing
//local integer i = GetRandomInt(1,6)
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction( 1.00 )
//call ggchat(i)
call DisplayTextToForce( GetPlayersAll(), "[All] |c000042FFPlayer 2 (Human AI)|r: ggwp" )
call TriggerSleepAction( 2.00 )
call CreateFogModifierRectBJ( true, Player(0), FOG_OF_WAR_VISIBLE, GetPlayableMapRect() )
call TriggerSleepAction( 2.00 )
call ForGroupBJ( GetUnitsOfPlayerAll(Player(1)), function Trig_op_gg_Func009002 )
endfunction
//===========================================================================
function InitTrig_op_gg takes nothing returns nothing
set gg_trg_op_gg = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_op_gg, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_op_gg, Condition( function Trig_op_gg_Conditions ) )
call TriggerAddAction( gg_trg_op_gg, function Trig_op_gg_Actions )
endfunction
//TESH.scrollpos=18
//TESH.alwaysfold=0
function aichat takes integer i returns nothing
if (i == 1) then
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: please stfu lmao" )
elseif (i == 2) then
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: ?" )
elseif (i == 3) then
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: i already reported your mother" )
elseif (i == 4) then
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: youre actually so bad at this game" )
elseif (i == 5) then
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: HAHAHA uninstall pls" )
elseif (i == 6) then
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: ur so ez lul" )
elseif (i == 7) then
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: are you bronze or unranked LOL" )
elseif (i == 8) then
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: ???????????" )
elseif (i == 9) then
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: cry more scrub" )
elseif (i == 10) then
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: fucking ez game bro" )
elseif (i == 11) then
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: ive never seen anyone so bad" )
elseif (i == 12) then
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: imagine whining to an ai LUL" )
endif
endfunction
function Trig_ez_Actions takes nothing returns nothing
local integer i = GetRandomInt(1,12)
call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction (2)
call aichat(i)
if GetRandomInt(1,10) > 5 then
call TriggerSleepAction (2)
set i = GetRandomInt(1,12)
call aichat(i)
endif
call TriggerSleepAction( 10.00 )
call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_ez takes nothing returns nothing
set gg_trg_ez = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_ez, Player(0), "ez", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ez, Player(0), "?", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ez, Player(0), "noob", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ez, Player(0), "fuck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ez, Player(0), "fuck you", false )
call TriggerRegisterPlayerChatEvent( gg_trg_ez, Player(0), "fucking ez", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ez, Player(0), "fk u", false )
call TriggerRegisterPlayerChatEvent( gg_trg_ez, Player(0), "scrub", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ez, Player(0), "ez game", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ez, Player(0), "fucking noob", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ez, Player(0), "trash", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ez, Player(0), "git gud", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ez, Player(0), "u suck", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ez, Player(0), "ai more", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ez, Player(0), "cunt", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ez, Player(0), "cb dog", true )
call TriggerRegisterPlayerChatEvent( gg_trg_ez, Player(0), "fucking cunt", true )
call TriggerAddAction( gg_trg_ez, function Trig_ez_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Toggle_Tutorial_Actions takes nothing returns nothing
set udg_Tutorial_boolean = not udg_Tutorial_boolean
if ( udg_Tutorial_boolean ) then
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "Tutorials have been turned on!" )
else
call DisplayTimedTextToForce( GetPlayersAll(), 10.00, "Tutorials have been turned off!" )
endif
endfunction
//===========================================================================
function InitTrig_Toggle_Tutorial takes nothing returns nothing
set gg_trg_Toggle_Tutorial = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Toggle_Tutorial, Player(0), "-tutorial", true )
call TriggerAddAction( gg_trg_Toggle_Tutorial, function Trig_Toggle_Tutorial_Actions )
endfunction
//TESH.scrollpos=3
//TESH.alwaysfold=0
function Trig_Decisive_Move_Conditions takes nothing returns boolean
return ( GetSpellAbilityId() == 'A04L' )
endfunction
function Trig_Decisive_Move_Func001001002 takes nothing returns boolean
if( IsUnitType(GetFilterUnit(), UNIT_TYPE_PEON) ) then
return false
endif
if( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) ) then
return false
endif
if ( IsUnitInGroup(GetFilterUnit(), udg_holdposition) ) then
return false
endif
return true
endfunction
function Trig_Decisive_Move_Actions takes nothing returns nothing
local group g = GetUnitsOfPlayerMatching(GetOwningPlayer(GetTriggerUnit()), Condition(function Trig_Decisive_Move_Func001001002))
local unit u
local location p = GetSpellTargetLoc()
loop
set u = FirstOfGroup (g)
exitwhen u == null
call IssuePointOrderLoc( u, "move", p )
call GroupRemoveUnit(g,u)
endloop
call DestroyGroup (g)
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Decisive_Move takes nothing returns nothing
set gg_trg_Decisive_Move = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Decisive_Move, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Decisive_Move, Condition( function Trig_Decisive_Move_Conditions ) )
call TriggerAddAction( gg_trg_Decisive_Move, function Trig_Decisive_Move_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Decisive_Attack_Conditions takes nothing returns boolean
return ( GetSpellAbilityId() == 'A00A' )
endfunction
function Trig_Decisive_Attack_Func001001002 takes nothing returns boolean
if( IsUnitType(GetFilterUnit(), UNIT_TYPE_PEON) == true ) then
return false
endif
if( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == true ) then
return false
endif
if ( IsUnitInGroup(GetFilterUnit(), udg_holdposition) == true ) then
return false
endif
return true
endfunction
function Trig_Decisive_Attack_Actions takes nothing returns nothing
local group g = GetUnitsOfPlayerMatching(GetOwningPlayer(GetTriggerUnit()), Condition(function Trig_Decisive_Attack_Func001001002))
local unit u
local location p = GetSpellTargetLoc()
loop
set u = FirstOfGroup (g)
exitwhen u == null
call IssuePointOrderLoc( u, "attack", p )
call GroupRemoveUnit(g,u)
endloop
call DestroyGroup (g)
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Decisive_Attack takes nothing returns nothing
set gg_trg_Decisive_Attack = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Decisive_Attack, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Decisive_Attack, Condition( function Trig_Decisive_Attack_Conditions ) )
call TriggerAddAction( gg_trg_Decisive_Attack, function Trig_Decisive_Attack_Actions )
endfunction
//TESH.scrollpos=18
//TESH.alwaysfold=0
function Trig_Taunt_Conditions takes nothing returns boolean
return ( GetSpellAbilityId() == 'A03Q' )
endfunction
function chat takes integer i returns string
if (i == 1) then
return "guess you havent realised how outmatched you are"
elseif (i == 2) then
return "?"
elseif (i == 3) then
return "thanks for free mmr bro"
elseif (i == 4) then
return "youre actually so bad at this game"
elseif (i == 5) then
return "if i were you id fucking uninstall"
elseif (i == 6) then
return "im just better than you man"
elseif (i == 7) then
return "are you bronze or unranked LOL"
elseif (i == 8) then
return "you expect your bronze strats to work against me?"
elseif (i == 9) then
return "you think you can win???"
elseif (i == 10) then
return "fucking ez game bro"
elseif (i == 11) then
return "ive never seen anyone so bad"
elseif (i == 12) then
return "ur gameplay is a joke lmao almost forgot to laugh"
endif
return "????????????????????"
endfunction
function Trig_Taunt_Actions takes nothing returns nothing
local integer i = GetRandomInt(1,12)
local integer j = GetRandomInt(1,12)
//call DisableTrigger( GetTriggeringTrigger() )
call TriggerSleepAction (2)
call DisplayTimedTextToForce( GetPlayersAll(), 20,"[All] |c00FF0000Player 1 (" + GetPlayerName(Player(0)) + ")|r: " + chat(i) )
call TriggerSleepAction (2)
if i != j then
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: " + chat(j) )
else
call DisplayTimedTextToForce( GetPlayersAll(), 20, "[All] |c000042FFPlayer 2 (Human AI)|r: no u" )
endif
//call TriggerSleepAction( 10.00 )
//call EnableTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Taunt takes nothing returns nothing
set gg_trg_Taunt = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Taunt, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Taunt, Condition( function Trig_Taunt_Conditions ) )
call TriggerAddAction( gg_trg_Taunt, function Trig_Taunt_Actions )
endfunction
//TESH.scrollpos=15
//TESH.alwaysfold=0
function Trig_Blight_Recovery_Conditions takes nothing returns boolean
local location p = GetUnitLoc(GetTriggerUnit())
if ( not ( IsPointBlightedBJ(p) == true ) ) then
return false
endif
if ( not ( GetPlayerTechCount( GetOwningPlayer(GetKillingUnit()), 'R02M', true) == 1 ) ) then
return false
endif
call RemoveLocation (p)
return true
endfunction
function Trig_Blight_Recovery_Actions takes nothing returns nothing
local location p = GetUnitLoc(GetTriggerUnit())
call CreateUnitAtLoc(GetOwningPlayer(GetKillingUnit()),'uske', p, bj_UNIT_FACING )
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Blight_Recovery takes nothing returns nothing
set gg_trg_Blight_Recovery = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Blight_Recovery, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Blight_Recovery, Condition( function Trig_Blight_Recovery_Conditions ) )
call TriggerAddAction( gg_trg_Blight_Recovery, function Trig_Blight_Recovery_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Call_of_the_Wild_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A047' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n01Q' ) ) then
return false
endif
return true
endfunction
function Trig_Call_of_the_Wild_Actions takes nothing returns nothing
local location p = GetUnitLoc(GetTriggerUnit())
local integer food = GetPlayerState(GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED)
if ( food < 150 ) then
if ( food >= 100 ) then
call CreateUnitAtLoc( GetOwningPlayer(GetTriggerUnit()), 'n00A', p, bj_UNIT_FACING )
call CreateUnitAtLoc( GetOwningPlayer(GetTriggerUnit()), 'n00E', p, bj_UNIT_FACING )
else
if (GetRandomInt(1,2) > 1) then
call CreateUnitAtLoc( GetOwningPlayer(GetTriggerUnit()), 'n00A', p, bj_UNIT_FACING )
else
call CreateUnitAtLoc( GetOwningPlayer(GetTriggerUnit()), 'n00E', p, bj_UNIT_FACING )
endif
endif
else
call DisplayTextToPlayer(GetOwningPlayer(GetTriggerUnit()),0,0, "Unable to create due to maximum supply.")
call SetUnitManaBJ(GetTriggerUnit(), GetUnitState(GetTriggerUnit(), UNIT_STATE_MANA) + 30)
endif
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Call_of_the_Wild takes nothing returns nothing
set gg_trg_Call_of_the_Wild = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Call_of_the_Wild, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Call_of_the_Wild, Condition( function Trig_Call_of_the_Wild_Conditions ) )
call TriggerAddAction( gg_trg_Call_of_the_Wild, function Trig_Call_of_the_Wild_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Force_of_Nature_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A040' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n01Q' ) ) then
return false
endif
return true
endfunction
function Trig_Force_of_Nature_Actions takes nothing returns nothing
local location p = GetUnitLoc(GetTriggerUnit())
if ( GetPlayerState(GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED) < 150 ) then
call CreateUnitAtLoc( GetOwningPlayer(GetTriggerUnit()), 'e000', p, bj_UNIT_FACING )
call CreateUnitAtLoc( GetOwningPlayer(GetTriggerUnit()), 'e000', p, bj_UNIT_FACING )
else
call DisplayTextToPlayer(GetOwningPlayer(GetTriggerUnit()),0,0, "Unable to create due to maximum supply.")
call SetUnitManaBJ(GetTriggerUnit(), GetUnitState(GetTriggerUnit(), UNIT_STATE_MANA) + 50)
endif
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Force_of_Nature takes nothing returns nothing
set gg_trg_Force_of_Nature = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Force_of_Nature, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Force_of_Nature, Condition( function Trig_Force_of_Nature_Conditions ) )
call TriggerAddAction( gg_trg_Force_of_Nature, function Trig_Force_of_Nature_Actions )
endfunction
//TESH.scrollpos=12
//TESH.alwaysfold=0
function Trig_Decay_1_Conditions takes nothing returns boolean
local location p = GetUnitLoc(GetSpellTargetUnit())
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n01J' ) ) then
return false
endif
if ( not ( IsPointBlightedBJ(p) ) ) then
return false
endif
if ( not ( GetSpellAbilityId() == 'A043' ) ) then
return false
endif
call RemoveLocation (p)
return true
endfunction
function Trig_Decay_1_Actions takes nothing returns nothing
local unit u = GetSpellTargetUnit()
local location p
local effect sp
call SetUnitExploded( u, true )
call KillUnit( u )
set p = GetUnitLoc(u)
set sp = AddSpecialEffectLoc( "Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl", p )
set udg_Decay_player = GetOwningPlayer(GetTriggerUnit())
set udg_Decay_int = GetUnitFoodUsed(u)
call DisableTrigger( gg_trg_Decay_1 )
call EnableTrigger( gg_trg_Decay_2 )
call TriggerSleepAction(15)
call DisableTrigger( gg_trg_Decay_2 )
call EnableTrigger( gg_trg_Decay_1 )
call DestroyEffectBJ(sp)
call RemoveLocation (p)
set udg_Decay_int = 0
endfunction
//===========================================================================
function InitTrig_Decay_1 takes nothing returns nothing
set gg_trg_Decay_1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Decay_1, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Decay_1, Condition( function Trig_Decay_1_Conditions ) )
call TriggerAddAction( gg_trg_Decay_1, function Trig_Decay_1_Actions )
endfunction
//TESH.scrollpos=9
//TESH.alwaysfold=0
function Trig_Blight_Placement_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n01J' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() == 'A01I' ) ) then
return false
endif
return true
endfunction
function Trig_Blight_Placement_Func002C takes nothing returns boolean
local location p = GetSpellTargetLoc()
if ( not ( IsPointBlightedBJ(p) == true ) ) then
return false
endif
if ( not ( GetUnitAbilityLevel(GetTriggerUnit(), GetSpellAbilityId()) < 5 ) ) then
return false
endif
call RemoveLocation (p)
return true
endfunction
function Trig_Blight_Placement_Actions takes nothing returns nothing
local location p = GetSpellTargetLoc()
call SetBlightRadiusLocBJ( true, GetOwningPlayer(GetTriggerUnit()), p, 1000.00 )
if ( Trig_Blight_Placement_Func002C() ) then
call IncUnitAbilityLevel( GetTriggerUnit(), GetSpellAbilityId() )
else
endif
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Blight_Placement takes nothing returns nothing
set gg_trg_Blight_Placement = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Blight_Placement, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Blight_Placement, Condition( function Trig_Blight_Placement_Conditions ) )
call TriggerAddAction( gg_trg_Blight_Placement, function Trig_Blight_Placement_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Extraction_Golem_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03O' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n01F' ) ) then
return false
endif
if ( not ( GetPlayerState(GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED) <= 149 ) ) then
return false
endif
return true
endfunction
function Trig_Extraction_Golem_Actions takes nothing returns nothing
local location p = GetUnitLoc(GetTriggerUnit())
call CreateUnitAtLoc( GetOwningPlayer(GetTriggerUnit()), 'n015', p, bj_UNIT_FACING )
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Extraction_Golem takes nothing returns nothing
set gg_trg_Extraction_Golem = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Extraction_Golem, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Extraction_Golem, Condition( function Trig_Extraction_Golem_Conditions ) )
call TriggerAddAction( gg_trg_Extraction_Golem, function Trig_Extraction_Golem_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Water_Elemental_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A044' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n01F' ) ) then
return false
endif
return true
endfunction
function Trig_Water_Elemental_Actions takes nothing returns nothing
local integer i = GetPlayerState(GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED)
local location p = GetSpellTargetLoc()
local unit d
set d = CreateUnitAtLoc( GetOwningPlayer(GetTriggerUnit()), 'n01M', p, bj_UNIT_FACING )
call SetUnitState(d, UNIT_STATE_MANA, 300 + 4 * i )
call UnitApplyTimedLifeBJ(120, 'Btlf', d)
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Water_Elemental takes nothing returns nothing
set gg_trg_Water_Elemental = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Water_Elemental, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Water_Elemental, Condition( function Trig_Water_Elemental_Conditions ) )
call TriggerAddAction( gg_trg_Water_Elemental, function Trig_Water_Elemental_Actions )
endfunction
//TESH.scrollpos=10
//TESH.alwaysfold=0
function Trig_Aetherize_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A046' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n01F' ) ) then
return false
endif
return true
endfunction
function Trig_Aetherize_Filter takes nothing returns boolean
local boolean a = IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit()))
local boolean b = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0 )
local boolean c = not (IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE))
local boolean d = not (IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO))
return ( a and b and c and d)
endfunction
function Trig_Aetherize_Actions takes nothing returns nothing
local location p = GetSpellTargetLoc()
local group gp = GetUnitsInRangeOfLocMatching(500.00, p, Condition(function Trig_Aetherize_Filter))
local group g = GetRandomSubGroup(5,gp)
local unit u
local unit d
loop
set u = FirstOfGroup(g)
exitwhen u == null
set d = CreateUnitAtLoc(GetOwningPlayer(u),'h00C',p,0)
call UnitAddAbility(d, 'A045')
call IssueTargetOrderById(d, 852568,u)
call GroupRemoveUnit(g,u)
endloop
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Aetherize takes nothing returns nothing
set gg_trg_Aetherize = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Aetherize, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Aetherize, Condition( function Trig_Aetherize_Conditions ) )
call TriggerAddAction( gg_trg_Aetherize, function Trig_Aetherize_Actions )
endfunction
//TESH.scrollpos=15
//TESH.alwaysfold=0
function Trig_Cloak_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03O' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n01F' ) ) then
return false
endif
return true
endfunction
function Trig_Cloak_Filter takes nothing returns boolean
local boolean a = IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit()))
local boolean b = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0 )
local boolean c = not (IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE))
local boolean d = not (IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO))
local boolean e = not (IsUnitType(GetFilterUnit(), UNIT_TYPE_PEON))
return ( a and b and c and d and e )
endfunction
function Trig_Cloak_Actions takes nothing returns nothing
//local integer i = GetUnitAbilityLevel(GetTriggerUnit(), 'A03O')
local location p = GetUnitLoc(GetTriggerUnit())
local group g = GetUnitsInRangeOfLocMatching(99999.00, p, Condition(function Trig_Cloak_Filter))
//local group g = GetRandomSubGroup(5 + i, gp)
local unit u
local unit d
local location pu
loop
set u = FirstOfGroup(g)
exitwhen u == null
set pu = GetUnitLoc(u)
set d = CreateUnitAtLoc(GetOwningPlayer(u),'h00C',pu,0)
call UnitAddAbility(d, 'A01T')
call IssueTargetOrderById(d, 852075,u)
if (GetUnitState(u, UNIT_STATE_MANA) > 0 ) then
call SetUnitState(u, UNIT_STATE_MANA, GetUnitState(u, UNIT_STATE_MANA) * 0.8)
endif
set d = null
call DisplayTextToPlayer(Player(0),0,0, GetUnitName(u))
call GroupRemoveUnit(g,u)
call RemoveLocation (pu)
endloop
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Cloak takes nothing returns nothing
set gg_trg_Cloak = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Cloak, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Cloak, Condition( function Trig_Cloak_Conditions ) )
call TriggerAddAction( gg_trg_Cloak, function Trig_Cloak_Actions )
endfunction
//TESH.scrollpos=10
//TESH.alwaysfold=0
function Trig_Faustian_Greed_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'u003' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) == 'h000' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() == 'A03L' ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetTriggerUnit()) == GetOwningPlayer(GetSpellTargetUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Faustian_Greed_Actions takes nothing returns nothing
local unit u = GetSpellTargetUnit()
local location p
local effect sp
call SetUnitExploded( u, true )
call TriggerSleepAction( 1.00 )
call KillUnit( u )
set p = GetUnitLoc(u)
set sp = AddSpecialEffectLoc( "Abilities\\Spells\\Items\\ResourceItems\\ResourceEffectTarget.mdl", p )
call DestroyEffectBJ(sp)
call AdjustPlayerStateBJ( 250, GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Faustian_Greed takes nothing returns nothing
set gg_trg_Faustian_Greed = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Faustian_Greed, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Faustian_Greed, Condition( function Trig_Faustian_Greed_Conditions ) )
call TriggerAddAction( gg_trg_Faustian_Greed, function Trig_Faustian_Greed_Actions )
endfunction
//TESH.scrollpos=3
//TESH.alwaysfold=0
function Trig_IsTownHall takes nothing returns boolean
local boolean a = IsUnitAlly(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit()))
local boolean b = IsUnitType(GetFilterUnit(), UNIT_TYPE_TOWNHALL) == true
return ( a and b )
endfunction
function Trig_Black_Market_Conditions takes nothing returns boolean
local location p = GetUnitLoc(GetSpellTargetUnit())
local group g = GetUnitsInRangeOfLocMatching(1000.00, p, Condition(function Trig_IsTownHall))
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'u003' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellTargetUnit()) == 'ngol' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() == 'A03Z' ) ) then
return false
endif
if ( not ( CountUnitsInGroup(g) > 0 ) ) then
return false
endif
call RemoveLocation (p)
return true
endfunction
function Trig_Black_Market_Actions takes nothing returns nothing
local unit u = GetSpellTargetUnit()
local location p = GetUnitLoc(u)
local integer i = GetUnitAbilityLevel(GetTriggerUnit(),'A03Z')
local effect sp
call AddResourceAmount(u, -(500 + 100*i))
set sp = AddSpecialEffectLoc( "Objects\\Spawnmodels\\Undead\\UndeadDissipate\\UndeadDissipate.mdl", p )
call DestroyEffectBJ(sp)
call AdjustPlayerStateBJ( (125 + 25*i), GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_GOLD )
if i < 5 then
call IncUnitAbilityLevel(GetTriggerUnit(),'A03Z')
endif
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Black_Market takes nothing returns nothing
set gg_trg_Black_Market = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Black_Market, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Black_Market, Condition( function Trig_Black_Market_Conditions ) )
call TriggerAddAction( gg_trg_Black_Market, function Trig_Black_Market_Actions )
endfunction
//TESH.scrollpos=23
//TESH.alwaysfold=0
function Trig_Hand_of_Destruction_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01L' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'u003' ) ) then
return false
endif
return true
endfunction
function Trig_Hand_of_Destruction_Filter takes nothing returns boolean
local boolean a = IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit()))
local boolean b = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0 )
local boolean c = not (IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO))
local boolean d = not (IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE))
return ( a and b and c and d)
endfunction
function Trig_IsFirePit takes nothing returns boolean
local boolean a = not (IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())))
local boolean b = (GetUnitTypeId(GetFilterUnit()) == 'h006')
return ( a and b )
endfunction
function Trig_Hand_of_Destruction_Actions takes nothing returns nothing
local location p = GetSpellTargetLoc()
local integer i = GetUnitAbilityLevel(GetTriggerUnit(), 'A01L')
local group gp = GetUnitsInRangeOfLocMatching(400.00, p, Condition(function Trig_Hand_of_Destruction_Filter))
local group gf = GetUnitsInRangeOfLocMatching(99999.00, p, Condition(function Trig_IsFirePit))
local group g = GetRandomSubGroup(4,gp)
local effect sp
local unit u
local unit d
local location pu
local unit x = FirstOfGroup(gf)
if (x != null) then
loop
set u = FirstOfGroup(g)
exitwhen u == null
set pu = GetUnitLoc(u)
set sp = AddSpecialEffectLoc( "Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl", pu )
call UnitDamageTargetBJ( GetTriggerUnit(), u, 350 + 50*i, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
call RemoveLocation (pu)
call GroupRemoveUnit(g,u)
endloop
endif
call KillUnit (x)
if (i < 5) then
call IncUnitAbilityLevel(GetTriggerUnit(), 'A01L')
endif
call DestroyEffect(sp)
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Hand_of_Destruction takes nothing returns nothing
set gg_trg_Hand_of_Destruction = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hand_of_Destruction, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Hand_of_Destruction, Condition( function Trig_Hand_of_Destruction_Conditions ) )
call TriggerAddAction( gg_trg_Hand_of_Destruction, function Trig_Hand_of_Destruction_Actions )
endfunction
//TESH.scrollpos=9
//TESH.alwaysfold=0
function Trig_Minion_Swarm_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03N' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n01J' ) ) then
return false
endif
return true
endfunction
function Trig_Minion_Swarm_Actions takes nothing returns nothing
local location p = GetUnitLoc(GetTriggerUnit())
local integer i = 1
loop
exitwhen i > udg_minionswarm
call CreateUnitAtLoc( GetOwningPlayer(GetTriggerUnit()), 'n006', p, bj_UNIT_FACING )
set i = i + 1
endloop
call RemoveLocation (p)
if udg_minionswarm < 10 then
set udg_minionswarm = udg_minionswarm + 1
endif
endfunction
//===========================================================================
function InitTrig_Minion_Swarm takes nothing returns nothing
set gg_trg_Minion_Swarm = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Minion_Swarm, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Minion_Swarm, Condition( function Trig_Minion_Swarm_Conditions ) )
call TriggerAddAction( gg_trg_Minion_Swarm, function Trig_Minion_Swarm_Actions )
endfunction
//TESH.scrollpos=3
//TESH.alwaysfold=0
function Trig_Oracle_Cyclone_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A04S' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n00B' ) ) then
return false
endif
return true
endfunction
function Trig_Oracle_Cyclone_Filter takes nothing returns boolean
local boolean a = IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit()))
local boolean b = (GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0 )
local boolean c = not (IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE))
local boolean d = not (IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO))
local boolean e = not (IsUnitType(GetTriggerUnit(), UNIT_TYPE_SUMMONED))
return ( a and b and c and d and e)
endfunction
function Trig_Oracle_Cyclone_Actions takes nothing returns nothing
local location p = GetSpellTargetLoc()
local group gp = GetUnitsInRangeOfLocMatching(400.00, p, Condition(function Trig_Oracle_Cyclone_Filter))
local group g = GetRandomSubGroup(4,gp)
local unit u
local unit d
loop
set u = FirstOfGroup(g)
exitwhen u == null
set d = CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()),'h00C',p,0)
call UnitAddAbility(d, 'A00K')
call IssueTargetOrder(d, "cyclone", u)
call GroupRemoveUnit(g,u)
endloop
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Oracle_Cyclone takes nothing returns nothing
set gg_trg_Oracle_Cyclone = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Oracle_Cyclone, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Oracle_Cyclone, Condition( function Trig_Oracle_Cyclone_Conditions ) )
call TriggerAddAction( gg_trg_Oracle_Cyclone, function Trig_Oracle_Cyclone_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Sentinel_Conditions takes nothing returns boolean
return ( GetUnitTypeId(GetConstructedStructure()) == 'n00K' )
endfunction
function Trig_Sentinel_Actions takes nothing returns nothing
local location p = GetUnitLoc(GetTriggerUnit())
call CreateUnitAtLoc( GetOwningPlayer(GetTriggerUnit()), 'n01V', p, bj_UNIT_FACING )
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Sentinel takes nothing returns nothing
set gg_trg_Sentinel = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Sentinel, EVENT_PLAYER_UNIT_CONSTRUCT_FINISH )
call TriggerAddCondition( gg_trg_Sentinel, Condition( function Trig_Sentinel_Conditions ) )
call TriggerAddAction( gg_trg_Sentinel, function Trig_Sentinel_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Rite_of_the_Depths_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n01X' ) ) then
return false
endif
return true
endfunction
function Trig_Rite_of_the_Depths_Actions takes nothing returns nothing
local unit d
local location p = GetUnitLoc(GetTriggerUnit())
set d = CreateUnitAtLoc( GetOwningPlayer(GetTriggerUnit()), 'h00C', p, bj_UNIT_FACING )
call UnitAddAbility(d, 'A02N')
//call TriggerSleepAction(0)
//call IssueImmediateOrder(d, "holdposition")
call IssueImmediateOrder(d, "animatedead")
call RemoveLocation(p)
endfunction
//===========================================================================
function InitTrig_Rite_of_the_Depths takes nothing returns nothing
set gg_trg_Rite_of_the_Depths = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Rite_of_the_Depths, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Rite_of_the_Depths, Condition( function Trig_Rite_of_the_Depths_Conditions ) )
call TriggerAddAction( gg_trg_Rite_of_the_Depths, function Trig_Rite_of_the_Depths_Actions )
endfunction
//TESH.scrollpos=6
//TESH.alwaysfold=0
function Trig_Infernal_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'ninf' ) ) then
return false
endif
return true
endfunction
function Trig_Infernal_Actions takes nothing returns nothing
local location p = GetUnitLoc(GetTriggerUnit())
local unit d
call RemoveUnit( GetTriggerUnit() )
set d = CreateUnitAtLoc( GetOwningPlayer(GetTriggerUnit()), 'h00C', p, bj_UNIT_FACING )
call UnitAddAbility (d, 'A04Q')
call IssueImmediateOrder(d, "stomp")
call CreateUnitAtLoc( GetOwningPlayer(GetTriggerUnit()), 'n014', p, bj_UNIT_FACING )
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Infernal takes nothing returns nothing
set gg_trg_Infernal = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Infernal, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Infernal, Condition( function Trig_Infernal_Conditions ) )
call TriggerAddAction( gg_trg_Infernal, function Trig_Infernal_Actions )
endfunction
//TESH.scrollpos=13
//TESH.alwaysfold=0
function Trig_Overgrowth_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n01O' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() == 'A04P' ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetTriggerUnit()) == GetOwningPlayer(GetSpellTargetUnit()) ) ) then
return false
endif
return true
endfunction
function Trig_Overgrowth_Actions takes nothing returns nothing
local unit u = GetSpellTargetUnit()
local real r = GetUnitFacing(u)
local location p = GetUnitLoc(u)
if ( GetPlayerState(GetOwningPlayer(GetTriggerUnit()), PLAYER_STATE_RESOURCE_FOOD_USED) <= 150 ) then
if ( GetUnitTypeId(GetSpellTargetUnit()) == 'e000' ) then
call RemoveUnit(u)
call CreateUnitAtLoc(GetOwningPlayer(GetTriggerUnit()), 'e00I' , p, r)
else
call DisplayTextToPlayer(GetOwningPlayer(GetTriggerUnit()),0,0, "Must be cast on a Treant!
")
call SetUnitManaBJ(GetTriggerUnit(), GetUnitState(GetTriggerUnit(), UNIT_STATE_MANA) + 50)
endif
else
call DisplayTextToPlayer(GetOwningPlayer(GetTriggerUnit()),0,0, "Unable to create due to maximum supply.")
call SetUnitManaBJ(GetTriggerUnit(), GetUnitState(GetTriggerUnit(), UNIT_STATE_MANA) + 50)
endif
call RemoveLocation (p)
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
//TESH.scrollpos=3
//TESH.alwaysfold=0
function Trig_Death_Foretold_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n00O' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() == 'A02K' ) ) then
return false
endif
return true
endfunction
function Trig_Death_Foretold_Actions takes nothing returns nothing
local unit u = GetSpellTargetUnit()
call SetUnitInvulnerable( u, true )
call TriggerSleepAction( 13.00 )
call SetUnitInvulnerable( u, false )
call KillUnit( u )
set u = null
endfunction
//===========================================================================
function InitTrig_Death_Foretold takes nothing returns nothing
set gg_trg_Death_Foretold = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Death_Foretold, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Death_Foretold, Condition( function Trig_Death_Foretold_Conditions ) )
call TriggerAddAction( gg_trg_Death_Foretold, function Trig_Death_Foretold_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Trickster_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n00O' ) ) then
return false
endif
if ( not ( GetSpellAbilityId() == 'A049' ) ) then
return false
endif
return true
endfunction
function Trickster_Swap takes nothing returns nothing
local location pc = GetUnitLoc(udg_Trickster_caster)
local location pu = GetUnitLoc(udg_Trickster_target)
call SetUnitPathing(udg_Trickster_caster, false)
call SetUnitPathing(udg_Trickster_target, false)
call SetUnitPositionLoc(udg_Trickster_caster, pu)
call SetUnitPositionLoc(udg_Trickster_target, pc)
call SetUnitPathing(udg_Trickster_caster, true)
call SetUnitPathing(udg_Trickster_target, true)
//call DisplayTextToForce(GetPlayersAll(), "yeet")
endfunction
function Trig_Trickster_Actions takes nothing returns nothing
local timer t = CreateTimer()
set udg_Trickster_caster = GetTriggerUnit()
set udg_Trickster_target = GetSpellTargetUnit()
call TimerStart(t, 0.01, false, function Trickster_Swap)
set t = null
endfunction
//===========================================================================
function InitTrig_Trickster takes nothing returns nothing
set gg_trg_Trickster = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Trickster, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Trickster, Condition( function Trig_Trickster_Conditions ) )
call TriggerAddAction( gg_trg_Trickster, function Trig_Trickster_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Zombie_Attack_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'n012' ) ) then
return false
endif
return true
endfunction
function Trig_Zombie_Attack_Actions takes nothing returns nothing
local location p = GetUnitLoc(GetTriggerUnit())
call DisableTrigger( GetTriggeringTrigger() )
call CreateUnitAtLoc( GetOwningPlayer(GetAttacker()), 'n01G', p, bj_UNIT_FACING )
call EnableTrigger( GetTriggeringTrigger() )
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Zombie_Attack takes nothing returns nothing
set gg_trg_Zombie_Attack = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Zombie_Attack, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Zombie_Attack, Condition( function Trig_Zombie_Attack_Conditions ) )
call TriggerAddAction( gg_trg_Zombie_Attack, function Trig_Zombie_Attack_Actions )
endfunction
//TESH.scrollpos=17
//TESH.alwaysfold=0
function Trig_Chaotic_Hellfire_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A004' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n012' ) ) then
return false
endif
return true
endfunction
function Trig_Chaotic_Hellfire_Actions takes nothing returns nothing
local unit d
local integer i = 1
local location p = GetUnitLoc(GetTriggerUnit())
local location p2
loop
exitwhen i > 7
set p2 = PolarProjectionBJ(p, GetRandomReal(200.00, 800.00), GetRandomReal(0, 360))
set d = CreateUnitAtLoc( GetOwningPlayer(GetTriggerUnit()), 'h00C', p2, bj_UNIT_FACING )
call UnitAddAbility( d, 'A002')
call IssuePointOrderLoc( d, "flamestrike", p2 )
call RemoveLocation (p2)
set d = null
set i = i + 1
endloop
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Chaotic_Hellfire takes nothing returns nothing
set gg_trg_Chaotic_Hellfire = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Chaotic_Hellfire, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Chaotic_Hellfire, Condition( function Trig_Chaotic_Hellfire_Conditions ) )
call TriggerAddAction( gg_trg_Chaotic_Hellfire, function Trig_Chaotic_Hellfire_Actions )
endfunction
//TESH.scrollpos=3
//TESH.alwaysfold=0
function Trig_Raise_Deaddd_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A004' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'n012' ) ) then
return false
endif
return true
endfunction
function Trig_Raise_Deaddd_Actions takes nothing returns nothing
local unit d
local integer i = 1
local location p = GetUnitLoc(GetTriggerUnit())
local location p2
loop
exitwhen i > 7
set p2 = PolarProjectionBJ(p, GetRandomReal(200.00, 800.00), GetRandomReal(0, 360))
set d = CreateUnitAtLoc( GetOwningPlayer(GetTriggerUnit()), 'n01G', p2, bj_UNIT_FACING )
call TriggerSleepAction (1)
call RemoveLocation (p2)
set d = null
set i = i + 1
endloop
call RemoveLocation (p)
endfunction
//===========================================================================
function InitTrig_Raise_Deaddd takes nothing returns nothing
set gg_trg_Raise_Deaddd = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Raise_Deaddd, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Raise_Deaddd, Condition( function Trig_Raise_Deaddd_Conditions ) )
call TriggerAddAction( gg_trg_Raise_Deaddd, function Trig_Raise_Deaddd_Actions )
endfunction