Name | Type | is_array | initial_value |
ABGSounds | sound | Yes | |
ABGvariableREC | integer | No | |
ABGvariableType | integer | No | |
AlphaTEST | dialog | No | |
AlphaTESTB | button | No | |
AmbianceREC | rect | Yes | |
AmmoNumberINT | integer | No | |
AmmoPorteur | unit | No | |
Armor_ingenieur | unit | No | |
Armory_Recup_INT | integer | No | |
ArmoryOfficerText | texttag | Yes | |
BackupDropship | unit | No | |
BackupLoc | location | No | |
balleperforanteniveau | integer | No | |
Base_turrets | group | Yes | |
BluecapsuleGroup | group | No | |
BluecapsulePoint | location | No | |
BluecapsuleTarget | unit | No | |
Bombflashdummy | unit | No | |
BouclierdefeuBOOL | boolean | No | |
BouclierFeuLevel | integer | No | |
BouclierFeuPoint | location | No | |
BouclierFeuUnit | unit | No | |
CaporalMana | real | No | |
CapsuleHallu | unit | No | |
capsuletarget | location | No | |
capsulevar | unit | No | |
capsulevictime | unit | No | |
CorporaDummyCaster | unit | No | |
Corporal_chargeGroup | group | Yes | |
CorporalGanjaBoucleInt | integer | No | |
CorporalGanjaStyle_FX | effect | Yes | |
CorporalGanjaStyle_Group | group | No | |
CorporalGanjaStyle_INT | integer | No | |
CorporalGanjaStyle_Niveaudevie | real | Yes | |
CorporalGanjaStyle_Player | player | Yes | |
CorporalGanjaStyle_UNIT | unit | Yes | |
CorporalGanjaStyle_Vitesse | real | Yes | |
CorporalSalveExplose3max | integer | No | |
CorporalTranceFacing | location | No | |
CorporalTranceGroup | group | No | |
DrugshotFog | effect | No | |
DrugshotFX | effect | Yes | |
Drugshotgroup | group | No | |
DrugshotIINT | integer | No | |
DrugshotPoint | location | No | |
Drugshottarget | unit | No | |
DummyAcheteurgroupe | group | No | |
Eradicator_BombLevel | integer | No | |
Eradicator_bomblfashFX | effect | No | |
Eradicator_Creature | unit | No | |
Eradicator_CreatureFX | effect | Yes | |
Eradicator_CreatureType | unitcode | Yes | |
EradicatorProvocGroup | group | No | |
EradicatorProvocINT | integer | No | |
EssencePoint | location | No | |
Essenceunit | unit | Yes | |
Evac_Civil | group | No | |
Evac_DES | destructable | No | |
Fullrecharge | effect | No | |
FullrechargeUnit | unit | No | |
Gold | texttag | Yes | |
GoldBonusMortier | unit | Yes | |
GoldSystemExtractor | unit | Yes | |
GoliathEjectionBOOL | boolean | Yes | |
GoliathSystemFX | effect | Yes | |
GoliathSystemINT | integer | No | |
GoliathSystemUnit | unit | Yes | |
GroupeUniteJoueurs | group | No | |
HeroArray | unit | Yes | |
HeroChiefOfficer | unit | No | |
HeroChiefTimer | timer | No | |
HeroCorporal | unit | No | |
HeroCorporalTimer | timer | No | |
HeroenjeuINT | integer | No | |
HeroEradicator | unit | No | |
HeroEradicatorTimer | timer | No | |
HeroGroup | group | No | |
herolearning | unit | No | |
HeroLife | real | Yes | |
HeroMedicalofficer | unit | No | |
HeromedicTimer | timer | No | |
HeroReviveBool | boolean | No | |
Herorevivewindows | timerdialog | Yes | |
HeroSergeant | unit | No | |
HeroSergeantTimer | timer | No | |
HerseBoolean | boolean | No | |
HerseGroupALL | group | No | |
HerseUnitCree | unit | No | |
Infirmerie_Medic | unit | No | |
Ingenieur_SWGroup | group | Yes | |
Init_MarineAssaillit | group | No | |
ItemArray | item | Yes | |
Itemparachute | group | No | |
ItemQuest | item | Yes | |
ItemTypeArray | itemcode | Yes | |
JumpCastingPoint | location | No | |
JumpPointtarget | location | No | |
KnockerGroup | group | No | |
KnockerGroupDEs | destructable | No | |
KnockFX | effect | Yes | |
KnockFXint | integer | No | |
MedicAutocanon | unit | No | |
NanoBool | boolean | No | true |
NanoconstructorLvl | integer | No | |
Pheromonebombdummy | unit | No | |
PheromoneBombingFX | effect | No | |
PheromoneBombingPoint | location | No | |
PiegeFloatText | texttag | Yes | |
Player | player | Yes | |
PlayerChief | player | No | |
Playercolor | string | Yes | |
PlayerCorporal | player | No | |
PlayerCorporalColor | playercolor | No | |
PlayerEradicator | player | No | |
PlayerFactor | integer | No | |
PlayerGoldGain | integer | Yes | |
PlayerGroup | force | No | |
PlayerMedic | player | No | |
PlayerSergeant | player | No | |
Playerstotal | integer | No | |
PlayertotalDifficulte | integer | No | |
PressureInt | integer | No | |
PressureUnit | unit | Yes | |
PressureUnitGroup | group | No | |
Q01GroupRescue | group | Yes | |
Q02unit | unit | Yes | |
Q03DefensesOnlineBool | boolean | No | |
Q03ValvefermeeINT | integer | No | |
Q04Backup | timer | No | |
Q04BackupWindows | timerdialog | No | |
Q06Board | leaderboard | No | |
Q06CivilINT | integer | No | |
Q1Baneling | group | No | |
Q1canalDES | destructable | Yes | |
Q1MutasDen | unit | Yes | |
Q1TDGroup | group | No | |
Q1Tourelle | group | No | |
Q1zerglingroup | group | No | |
Q2GolderLoc | location | No | |
Q3canalDES | destructable | Yes | |
Q4CavesVague | integer | No | |
Q4civilREC | rect | Yes | |
Q4Compteur | integer | No | |
Q4dropturret | effect | No | |
Q4DropturretLoc | location | No | |
Q4EvacuationCounter | integer | No | |
Q4EvacuationINT | integer | No | |
Q4house | unit | Yes | |
Q4Moranegroup | group | No | |
Q4Multiboard | multiboard | No | |
Q4OverlordGroup | group | No | |
Q4Turret1 | item | No | |
Q4TurretCompteur | integer | No | |
Q4TurretsGroup | group | No | |
Q4UnitGroup | group | No | |
Q5GardienINT | integer | No | |
Q5Golder | location | Yes | |
Q5grouparene | group | No | |
Q5HydrasREC | rect | Yes | |
Q5RessurectTime | integer | No | |
Q5Timer | timer | Yes | |
Q5Timerwindows | timerdialog | Yes | |
Q5Visibility | fogmodifier | No | |
Q6Checker | unit | Yes | |
Q6Tankalliedgroup | group | No | |
Q8Canaux | rect | Yes | |
Q8canauxDES | destructable | Yes | |
Q8Timer | timer | No | |
Q8Timerwindows | timerdialog | No | |
Q9EliteMuta | unit | Yes | |
Q9GroupSauvable | group | No | |
Qinteger | integer | Yes | |
QS4LassanaSquad | unit | No | |
Qsecret0unit | unit | Yes | |
QsecretTOTAL | integer | No | |
Quest1bossloc | location | No | |
Quest1invoc | rect | Yes | |
Quest1rect | rect | Yes | |
Quest1summoned | group | No | |
Quest3bossattackedINT | integer | No | |
Quest3herseDestruc | destructable | Yes | |
Quest3hersepoint | location | No | |
Quest3lenteurGROUP | group | No | |
Quest3movementINT | integer | No | |
QuestBoss | unit | Yes | |
QuesterFX | effect | No | |
Questgroup | group | Yes | |
QuestINT | integer | Yes | |
Quests | quest | Yes | |
QuestSpecialFX | effect | Yes | |
Quete00DES | destructable | Yes | |
Quete00units | unit | Yes | |
Quete01corpse | unit | Yes | |
Quete01corpseREC | rect | Yes | |
Quete05group | group | No | |
Quete06group | group | No | |
Quete06groupcivil | group | No | |
Quete2ouefdeadINT | integer | No | |
Quete2SummonedUnit | unit | Yes | |
Quete2unitpopup | unit | No | |
Quete3bosslife | integer | No | |
Quete3HerseREC | rect | Yes | |
Quete4Basdefenseur | group | No | |
Quete5floattext | texttag | Yes | |
Quete5Lieutenant | unit | Yes | |
Quete7itemINT | integer | No | |
Quete7overlord | unit | Yes | |
Quete7vague | group | No | |
Quetesouefsgroup | group | Yes | |
represailleX | boolean | No | |
Salvegroup | group | No | |
SentrygunGroupALL | group | No | |
SentryGunNumber | integer | No | |
SFXantileak | effect | Yes | |
slashergroup | group | No | |
slasherINT | integer | No | |
slasherRUN | boolean | No | |
slashersouffleINT | integer | No | |
slashervictime | unit | Yes | |
SupportDropFX | effect | No | |
SupportDropInt | integer | No | |
SupportDroppoint | location | No | |
TempPoint | location | No | |
TimerDeathInt | integer | Yes | |
tirgroupes | location | No | |
Transport_drop | unit | Yes | |
Transport_hero | unit | No | |
u | unit | No | |
ulrockChoceffet | unit | Yes | |
Unitinit | group | No | |
VagueDropGroup | group | No | |
VagueDropOverlord | unit | Yes | |
VagueDropzone | rect | Yes | |
VagueRect | rect | No | |
VisibilityModifier | fogmodifier | Yes | |
WeatherFX | weathereffect | Yes |
//TESH.scrollpos=0
//TESH.alwaysfold=0
library Table initializer init
//***************************************************************
//* Table object
//* ------------
//*
//* set t=Table.create() - instanceates a new table object
//* call t.destroy() - destroys it
//* t[1234567] - Get value for key 1234567
//* (zero if not assigned previously)
//* set t[12341]=32 - Assigning it.
//* call t.flush(12341) - Flushes the stored value, so it
//* doesn't use any more memory
//* t.exists(32) - Was key 32 assigned? Notice
//* that flush() unassigns values.
//* call t.reset() - Flushes the whole contents of the
//* Table.
//*
//* call t.destroy() - Does reset() and also recycles the id.
//*
//* If you use HandleTable instead of Table, it is the same
//* but it uses handles as keys, the same with StringTable.
//*
//***************************************************************
//=============================================================
globals
private constant integer MAX_INSTANCES=8100 //400000
//=========================================================
private gamecache gc
endglobals
private struct GTable[MAX_INSTANCES]
method reset takes nothing returns nothing
call FlushStoredMission(gc,I2S(this))
endmethod
private method onDestroy takes nothing returns nothing
call FlushStoredMission(gc,I2S(this))
endmethod
endstruct
//Hey: Don't instanciate other people's textmacros that you are not supposed to, thanks.
//! textmacro Table__make takes name, type, key
struct $name$ extends GTable
method operator [] takes $type$ key returns integer
return GetStoredInteger(gc,I2S(this),$key$)
endmethod
method operator []= takes $type$ key, integer value returns nothing
call StoreInteger(gc,I2S(this),$key$, value)
endmethod
method flush takes $type$ key returns nothing
call FlushStoredInteger(gc,I2S(this),$key$)
endmethod
method exists takes $type$ key returns boolean
return HaveStoredInteger(gc,I2S(this),$key$)
endmethod
endstruct
//! endtextmacro
private function H2I takes handle h returns integer
return h
return 0
endfunction
//! runtextmacro Table__make("Table","integer","I2S(key)" )
//! runtextmacro Table__make("StringTable","string","key" )
//! runtextmacro Table__make("HandleTable","handle","I2S(H2I(key))" )
//=============================================================
// initialize it all.
//
private function init takes nothing returns nothing
call FlushGameCache(InitGameCache("libtable.gc"))
set gc=InitGameCache("libtable.gc")
endfunction
endlibrary
function Trig_Caserne_detruite_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'hbar' ) ) then
return false
endif
return true
endfunction
function Trig_Caserne_detruite_Actions takes nothing returns nothing
local unit barrack = GetDyingUnit()
local effect FX
call AddSpecialEffectLocBJ( GetUnitLoc(barrack), "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl" )
set FX = GetLastCreatedEffectBJ()
call TriggerSleepAction( 0.50 )
call RemoveUnit( barrack )
call TriggerSleepAction( 5.00 )
call DestroyEffectBJ( FX )
endfunction
//===========================================================================
function InitTrig_Caserne_detruite takes nothing returns nothing
set gg_trg_Caserne_detruite = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Caserne_detruite, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Caserne_detruite, Condition( function Trig_Caserne_detruite_Conditions ) )
call TriggerAddAction( gg_trg_Caserne_detruite, function Trig_Caserne_detruite_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function h2I takes handle h returns integer
return h
return 0
endfunction
function h2S takes handle h returns string
return I2S(h2I(h))
return ""
endfunction
//***************************************************************************************************
//* Timer interface :
//* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
//* This system links a timer to a struct, and automatically run the .end() method when
//* the timer expires.
//*
//* Each struct that uses a timer must extend the s_timer interface.
//* These structs must include 3 specific methods:
//* - end method : defines actions executed when the timer ends
//* - onDestroy method : releases the timer when the struct is destroyed.
//* - create method : init the struct variables, and set up a timer if needed.
//*
//* Example :
//* ¯¯¯¯¯¯¯¯¯
//* struct my_struct extends s_timer
//* //my variables
//*
//* method end takes nothing returns nothing
//* //my ending actions : remove a buff, kill a unit, etc...
//* endmethod
//*
//* method onDestroy takes nothing returns nothing
//* //my onDestroy actions (if you include structs in this struct by example)
//* if( .ti!=null )then
//* call ReleaseTimer(.ti)
//* endif
//* endmethod
//*
//* static method create takes unit un, string name, boolean timed returns my_struct
//* local my_struct s = my_struct.allocate()
//* if( timed )then
//* set s.ti = NewTimer()
//* call SetTimerValue( s.ti, s )
//* endif
//* //init. of my variables
//* return s
//* endmethod
//*
//* endstruct
//*
//*
//* You may need to use only 2 functions, that are SetTimerValue and LaunchTimer, other functions
//* are internal to the system.
//*
//***************************************************************************************************
scope timer
globals
private timer array T
private timer array U
private integer Tn = 0
private integer Un = 0
private s_timer array Uval
endglobals
interface s_timer
timer ti = null
method end takes nothing returns nothing
endinterface
private function FindListedTimer takes timer ti returns integer
local integer i = 1 //search the timer in the list
loop //returns 0 if timer is not
exitwhen(U[i]==null) //found.
if( U[i]==ti )then
return i
endif
set i=i+1
endloop
return 0
endfunction
private function FlushActiveTimer takes timer ti returns nothing
local integer i = FindListedTimer(ti)
if( i!=0 )then //if the time is found,
if( i!=Un )then //and if it isn't at the end of list
set U[i] = U[Un] //then change the index of the last
set Uval[i] = Uval[Un] //timer of the list, to the deleted
endif //one.
set U[Un] = null //Delete the last stored timer
set Uval[Un] = 0 //and clear it's value.
set Un = Un-1
endif
endfunction
private function EndTimer takes nothing returns nothing //Run when a timer expires
local integer i = FindListedTimer( GetExpiredTimer() )
if( i!=0 )then //if the timer is found in the list,
call Uval[i].end() //then call it's associated
endif //.end() method.
endfunction
//**
function SetTimerValue takes timer ti, s_timer value returns nothing
local integer i = FindListedTimer(ti)
if( i==0 )then //if the time is not found,
set Un = Un+1 //increase list's items count
set i = Un
endif
set U[i] = ti //store the timer in the list
set Uval[i] = value //and it's associated struct
endfunction
function LaunchTimer takes timer ti, real dur, boolean periodic returns nothing
call PauseTimer(ti) //Pause the timer to prevent bugs
call TimerStart( ti, dur, periodic, function EndTimer) //start the timer
endfunction
//***************************************************************************************************
//* Timers recycling functions :
//* ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
//* Originally made by Vexorian, but a lot improved by myself.
//*
//* This system recycles timers :
//*
//* When you need a timer just use the NewTimer() function, it will look in the stack for a free
//* timer and return one if it is available, else it will create and return a new one.
//*
//* When you don't need your timer anymore, instead of use the DestroyTimer function, call the
//* ReleaseTimer function, that will pause and store the timer in the stack, to be used again
//* when needed.
//* Then you'll no longer have to care about setting timers to null nor about timer related issues
//* with the handle index stack.
//*
//***************************************************************************************************
function ReleaseTimer takes timer ti returns nothing
if( ti!=null )then
call PauseTimer(ti)
call FlushActiveTimer(ti)
if (Tn==8191) then
debug call BJDebugMsg("Warning: Timer stack is full, destroying timer!!")
//stack is full, the map already has much more troubles than the chance of bug
call DestroyTimer(ti)
set ti = null
else
set T[Tn] = ti
set Tn = Tn+1
endif
endif
endfunction
function NewTimer takes nothing returns timer
if( Tn==0 )then
return CreateTimer()
endif
set Tn=Tn-1
return T[Tn]
endfunction
function NewTimerI takes nothing returns integer
if( Tn==0 )then
return h2I(CreateTimer())
endif
set Tn=Tn-1
return h2I(T[Tn])
endfunction
endscope
//TESH.scrollpos=0
//TESH.alwaysfold=0
struct s_hero
private unit u
readonly s_jump jump = 0
method end takes nothing returns nothing
call .jump.destroy()
call .destroy()
endmethod
static method create takes unit un returns s_hero
local s_hero H = s_hero.allocate()
set H.u = un
set H.jump = s_jump.create(un)
return H
endmethod
endstruct
function hdata takes unit un returns s_hero
return GetUnitUserData(un)
endfunction
function InitHero takes unit un returns nothing
call SetUnitUserData( un, s_hero.create(un) )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
globals
constant real JUMP_INTERVAL = 0.01
endglobals
//=======================================================================================
function GetPointZ takes real x, real y returns real
local location loc = Location(x,y)
local real z = GetLocationZ(loc)
call RemoveLocation(loc)
return z
endfunction
//=======================================================================================
function RemoveEffectTimed takes effect e, real delay returns nothing
call TriggerSleepAction(delay)
call DestroyEffect(e)
endfunction
//=======================================================================================
struct s_jump extends s_timer
private unit u
private real x
private real start_z
private real max_z
private real angle
private real dist
private real speed
private real dmg_min
private real dmg_max
method end takes nothing returns nothing
local real ux = GetUnitX(.u)
local real uy = GetUnitY(.u)
local real nX = ux + .speed * Cos(.angle)
local real nY = uy + .speed * Sin(.angle)
local real terZ = (GetPointZ(nX,nY)-.start_z)
local real flyZ = 0.
local real z
//on passe à l'étape suivante
set .x = .x + .speed
//on calcule la hauteur de la trajectoire parabolique du saut
set z = .max_z * ( -4/(.dist*.dist)*.x*.x + 4/.dist*.x )
//on calcule la hauteur de vol effective de l'unité en fonction du terrain
set flyZ = z-terZ
//on change la hauteur de vol de l'unité
call SetUnitFlyHeight(.u,RMaxBJ(0,flyZ),0)
//si l'unité touche le sol on arrète le saut,
//sinon on avance l'unité et le cycle recommence
if( flyZ<=0. )then
//on joue l'anim et on ajoute le tag "alternate"
call SetUnitAnimation( .u, "morph" )
call AddUnitAnimationProperties( .u, "alternate", false )
//on dépause l'unité et on arrête le timer
call PauseTimer(.ti)
call SetUnitPathing( .u, true )
call PauseUnit( .u, false )
//on met un effet du tonnerre qui tue la mort qui tue
call RemoveEffectTimed.execute( AddSpecialEffect( "Abilities\\Spells\\Undead\\ReplenishMana\\ReplenishManaCaster.mdl", GetUnitX(.u), GetUnitY(.u) ), 2.00 )
call PlaySoundAtPointBJ( gg_snd_FlareTarget3, 100, GetUnitLoc(.u), 0 )
//on inflige les dégats à l'unité
if( .dmg_min>0 and .dmg_max>0 )then
call UnitDamageTargetBJ( .u, .u, GetRandomReal(.dmg_min,.dmg_max), ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL )
endif
else
call SetUnitPosition(.u,nX,nY)
endif
endmethod
method begin takes location loc, real speed, real maxheight, real dmgmin, real dmgmax returns nothing
local real tX
local real tY
local real tZ
local real uX
local real uY
local real dX
local real dY
local real i = 0.
local real mz = 0.
local real tz = 0.
if( speed>0 and maxheight>0 )then
set tX = GetLocationX(loc)
set tY = GetLocationY(loc)
set tZ = GetPointZ(tX,tY)
set uX = GetUnitX(.u)
set uY = GetUnitY(.u)
//on initie le saut en mettant l'unité en pause et en désactivant son pathing
call PauseUnit( .u, true )
call SetUnitPathing( .u, false )
//on réinitialise l'avancement du saut et on enregistre l'intervalle de dégats
set .x = 0
set .dmg_min = dmgmin
set .dmg_max = dmgmax
//on calcule le déplacement horizontal en pixel à chaque boucle du saut
set .speed = speed*JUMP_INTERVAL
//on enregistre la hauteur de référence du saut (hauteur initiale de l'unité)
set .start_z = GetPointZ(uX,uY)
set tZ = GetPointZ(tX,tY) - .start_z
//on calcule l'angle du saut (entre le point de départ et d'arrivée)
set .angle = Atan2( tY-uY, tX-uX )
//on calcule la distance du saut
set dX = tX-uX
set dY = tY-uY
set .dist = SquareRoot(dX*dX + dY*dY)
//on calcule la hauteur max du saut, en fonction de la distance mais aussi
//des éventuels obstacles sur le chemin
set mz = .dist / 3.
loop
set uX = uX + .speed * Cos(.angle)
set uY = uY + .speed * Sin(.angle)
set tZ = GetPointZ(uX,uY)
if( tZ>mz )then
set mz = tZ
endif
set i = i + .speed
exitwhen( i>.dist )
endloop
set .max_z = RMinBJ(maxheight,mz+100.)
//on effectue l'ajustement de cette distance, pour ne pas attérir trop près
//si on saut sur un relief ou trop loin si on saute en contrebas
//(approximation grâce au théorème de Thalès)
set .dist = .dist + tZ*.dist/(2*.max_z-tZ)
//on joue l'anim et on ajoute le tag "alternate"
call PlaySoundAtPointBJ( gg_snd_DefendCaster, 100, GetUnitLoc(.u), 0 )
call SetUnitAnimation( .u, "morph" )
call AddUnitAnimationProperties( .u, "alternate", true )
//on lance le saut (ajout et retrait de la compétence "corbeau" pour
//permettre de modifier la hauteur de vol d'une unité terrestre)
call UnitAddAbility(.u,'Arav')
call UnitRemoveAbility(.u,'Arav')
call LaunchTimer( .ti, JUMP_INTERVAL, true )
endif
endmethod
method onDestroy takes nothing returns nothing
if( .ti!=null )then
call ReleaseTimer(.ti)
endif
endmethod
static method create takes unit un returns s_jump
local s_jump JUMP = s_jump.allocate()
set JUMP.u = un
set JUMP.ti = NewTimer()
call SetTimerValue( JUMP.ti, JUMP )
return JUMP
endmethod
endstruct
function Trig_ABG_vol_de_scourges_Actions takes nothing returns nothing
local integer i = 1
local integer y = GetRandomInt(4, 8)
local unit array Un
loop
exitwhen i > y
call CreateNUnitsAtLoc( 1, 'u00F', Player(6), GetRandomLocInRect(udg_AmbianceREC[udg_ABGvariableREC]), bj_UNIT_FACING )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", GetRandomLocInRect(udg_AmbianceREC[( udg_ABGvariableREC + 20 )]) )
set Un[i] = GetLastCreatedUnit()
set i = i + 1
endloop
set i = 0
call TriggerSleepAction( 20.00 )
loop
exitwhen i > y
call RemoveUnit (Un[i])
set i = i + 1
endloop
endfunction
//===========================================================================
function InitTrig_ABG_vol_de_scourges takes nothing returns nothing
set gg_trg_ABG_vol_de_scourges = CreateTrigger( )
call TriggerAddAction( gg_trg_ABG_vol_de_scourges, function Trig_ABG_vol_de_scourges_Actions )
endfunction
function Trig_Untitled_Trigger_002_Actions takes nothing returns nothing
call UnitApplyTimedLifeBJ( 60, 'BTLF', GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_002 takes nothing returns nothing
set gg_trg_Untitled_Trigger_002 = CreateTrigger( )
call TriggerAddAction( gg_trg_Untitled_Trigger_002, function Trig_Untitled_Trigger_002_Actions )
endfunction
function Trig_ABG_vol_de_mutalisk_Actions takes nothing returns nothing
local integer i = 1
local integer y = GetRandomInt(3, 5)
local unit array Un
loop
exitwhen i > y
call CreateNUnitsAtLoc( 1, 'u00E', Player(6), GetRandomLocInRect(udg_AmbianceREC[udg_ABGvariableREC]), bj_UNIT_FACING )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", GetRandomLocInRect(udg_AmbianceREC[( udg_ABGvariableREC + 20 )]) )
set Un[i] = GetLastCreatedUnit()
set i = i + 1
endloop
call TriggerSleepAction( 20.00 )
set i = 0
loop
exitwhen i > y
call RemoveUnit (Un[i])
set i = i + 1
endloop
endfunction
//===========================================================================
function InitTrig_ABG_vol_de_mutalisk takes nothing returns nothing
set gg_trg_ABG_vol_de_mutalisk = CreateTrigger( )
call TriggerAddAction( gg_trg_ABG_vol_de_mutalisk, function Trig_ABG_vol_de_mutalisk_Actions )
endfunction
function Trig_ABG_attaque_de_mutalisk_Actions takes nothing returns nothing
local integer i = 1
local integer y = GetRandomInt(1, 2)
local unit array Un
loop
exitwhen i > y
call CreateNUnitsAtLoc( 1, 'u00E', Player(6), GetRandomLocInRect(udg_AmbianceREC[udg_ABGvariableREC]), bj_UNIT_FACING )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "attack", GetRandomLocInRect(udg_AmbianceREC[( udg_ABGvariableREC + 20 )]) )
set Un[i] = GetLastCreatedUnit()
set i = i + 1
endloop
call TriggerSleepAction( 20.00 )
set i = 0
loop
exitwhen i > y
call KillUnit (Un[i])
set i = i + 1
endloop
endfunction
//===========================================================================
function InitTrig_ABG_attaque_de_mutalisk takes nothing returns nothing
set gg_trg_ABG_attaque_de_mutalisk = CreateTrigger( )
call TriggerAddAction( gg_trg_ABG_attaque_de_mutalisk, function Trig_ABG_attaque_de_mutalisk_Actions )
endfunction
function Trig_ABG_attaque_de_wraith_Actions takes nothing returns nothing
local integer i = 1
local integer y = GetRandomInt(1, 2)
local unit array Wraith
local effect FX
loop
exitwhen i > y
call CreateNUnitsAtLoc( 1, 'h014', Player(3), GetRandomLocInRect(udg_AmbianceREC[udg_ABGvariableREC]), bj_UNIT_FACING )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "attack", GetRandomLocInRect(udg_AmbianceREC[( udg_ABGvariableREC + 20 )]) )
set Wraith[i]= GetLastCreatedUnit()
set i = i + 1
endloop
call TriggerSleepAction( 20.00 )
set i = 0
loop
exitwhen i > y
call AddSpecialEffectLocBJ( GetUnitLoc(Wraith[i]), "Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl" )
set FX = GetLastCreatedEffectBJ()
call RemoveUnit (Wraith[i])
set i = i + 1
endloop
call DestroyEffectBJ( FX )
call TriggerSleepAction( 3.00 )
endfunction
//===========================================================================
function InitTrig_ABG_attaque_de_wraith takes nothing returns nothing
set gg_trg_ABG_attaque_de_wraith = CreateTrigger( )
call TriggerAddAction( gg_trg_ABG_attaque_de_wraith, function Trig_ABG_attaque_de_wraith_Actions )
endfunction
function Trig_ABG_vol_de_overlord_Actions takes nothing returns nothing
local integer i = 1
local integer y = GetRandomInt(1, 3)
local unit array Overlord
loop
exitwhen i > y
call CreateNUnitsAtLoc( 1, 'u00G', Player(6), GetRandomLocInRect(udg_AmbianceREC[udg_ABGvariableREC]), bj_UNIT_FACING )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", GetRandomLocInRect(udg_AmbianceREC[( udg_ABGvariableREC + 20 )]) )
set Overlord[i] = GetLastCreatedUnit()
set i = i + 1
endloop
call TriggerSleepAction( 20.00 )
set i = 0
loop
exitwhen i > y
call RemoveUnit (Overlord[i])
set i = i + 1
endloop
endfunction
//===========================================================================
function InitTrig_ABG_vol_de_overlord takes nothing returns nothing
set gg_trg_ABG_vol_de_overlord = CreateTrigger( )
call TriggerAddAction( gg_trg_ABG_vol_de_overlord, function Trig_ABG_vol_de_overlord_Actions )
endfunction
function Trig_ABG_vol_de_dropship_Actions takes nothing returns nothing
local unit Un
call CreateNUnitsAtLoc( 1, 'h013', Player(3), GetRandomLocInRect(udg_AmbianceREC[udg_ABGvariableREC]), bj_UNIT_FACING )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", GetRandomLocInRect(udg_AmbianceREC[( udg_ABGvariableREC + 20 )]) )
set Un= GetLastCreatedUnit()
call TriggerSleepAction( 20.00 )
call RemoveUnit (Un)
endfunction
//===========================================================================
function InitTrig_ABG_vol_de_dropship takes nothing returns nothing
set gg_trg_ABG_vol_de_dropship = CreateTrigger( )
call TriggerAddAction( gg_trg_ABG_vol_de_dropship, function Trig_ABG_vol_de_dropship_Actions )
endfunction
function Trig_ABG_dropship_psv_scourge_Actions takes nothing returns nothing
local unit Un
local unit Un1
local unit Un2
local unit Un3
call CreateNUnitsAtLoc( 1, 'h013', Player(3), GetRandomLocInRect(udg_AmbianceREC[udg_ABGvariableREC]), bj_UNIT_FACING )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", GetRandomLocInRect(udg_AmbianceREC[( udg_ABGvariableREC + 20 )]) )
set Un = GetLastCreatedUnit()
call TriggerSleepAction( 1.00 )
call CreateNUnitsAtLoc( 1, 'u00F', Player(6), GetRandomLocInRect(udg_AmbianceREC[udg_ABGvariableREC]), bj_UNIT_FACING )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", GetRandomLocInRect(udg_AmbianceREC[( udg_ABGvariableREC + 20 )]) )
set Un1 = GetLastCreatedUnit()
call TriggerSleepAction( 1.00 )
call CreateNUnitsAtLoc( 1, 'u00F', Player(6), GetRandomLocInRect(udg_AmbianceREC[udg_ABGvariableREC]), bj_UNIT_FACING )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", GetRandomLocInRect(udg_AmbianceREC[( udg_ABGvariableREC + 20 )]) )
set Un2 = GetLastCreatedUnit()
call TriggerSleepAction( 1.00 )
call CreateNUnitsAtLoc( 1, 'u00F', Player(6), GetRandomLocInRect(udg_AmbianceREC[udg_ABGvariableREC]), bj_UNIT_FACING )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", GetRandomLocInRect(udg_AmbianceREC[( udg_ABGvariableREC + 20 )]) )
set Un3 = GetLastCreatedUnit()
call TriggerSleepAction( 1.00 )
call TriggerSleepAction( 20.00 )
call RemoveUnit (Un)
call RemoveUnit (Un1)
call RemoveUnit (Un2)
call RemoveUnit (Un3)
endfunction
//===========================================================================
function InitTrig_ABG_dropship_psv_scourge takes nothing returns nothing
set gg_trg_ABG_dropship_psv_scourge = CreateTrigger( )
call TriggerAddAction( gg_trg_ABG_dropship_psv_scourge, function Trig_ABG_dropship_psv_scourge_Actions )
endfunction
function Trig_Timer_Autocanon_Actions takes nothing returns nothing
call SetUnitX(udg_MedicAutocanon, GetUnitX(udg_HeroMedicalofficer))
call SetUnitY(udg_MedicAutocanon, GetUnitY(udg_HeroMedicalofficer))
endfunction
//===========================================================================
function InitTrig_Timer_Autocanon takes nothing returns nothing
set gg_trg_Timer_Autocanon = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Timer_Autocanon, 0.05 )
call TriggerAddAction( gg_trg_Timer_Autocanon, function Trig_Timer_Autocanon_Actions )
endfunction
function Trig_Q02_Entrepot_Conditions takes nothing returns boolean
if ( not ( GetPlayerController(GetOwningPlayer(GetEnteringUnit())) == MAP_CONTROL_USER ) ) then
return false
endif
return true
endfunction
function Trig_Q02_Entrepot_Actions takes nothing returns nothing
local unit zergU
local effect array zergFX
call DisableTrigger( GetTriggeringTrigger() )
call CreateNUnitsAtLoc( 1, 'z00P', Player(6), GetRectCenter(gg_rct_Rect_020), bj_UNIT_FACING )
set udg_Q02unit[1] = GetLastCreatedUnit()
set zergU = GetLastCreatedUnit()
call AddSpecialEffectTargetUnitBJ( "origin", zergU, "Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl" )
set zergFX[1] = GetLastCreatedEffectBJ()
call CreateNUnitsAtLoc( 1, 'z00L', Player(6), GetRectCenter(gg_rct_Rect_020), bj_UNIT_FACING )
set zergU = GetLastCreatedUnit()
call AddSpecialEffectTargetUnitBJ( "origin", zergU, "Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl" )
set zergFX[2] = GetLastCreatedEffectBJ()
call TriggerSleepAction( 2.00 )
call DestroyEffectBJ( zergFX[1] )
call DestroyEffectBJ( zergFX[2] )
endfunction
//===========================================================================
function InitTrig_Q02_Entrepot takes nothing returns nothing
set gg_trg_Q02_Entrepot = CreateTrigger( )
call DisableTrigger( gg_trg_Q02_Entrepot )
call TriggerRegisterEnterRectSimple( gg_trg_Q02_Entrepot, gg_rct_Q02_entrepot )
call TriggerAddCondition( gg_trg_Q02_Entrepot, Condition( function Trig_Q02_Entrepot_Conditions ) )
call TriggerAddAction( gg_trg_Q02_Entrepot, function Trig_Q02_Entrepot_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Q06_Civil_meurt_Conditions takes nothing returns boolean
if ( not ( IsUnitInGroup(GetDyingUnit(), udg_Quete06groupcivil) == true ) ) then
return false
endif
return true
endfunction
function Trig_Q06_Civil_meurt_Func002A takes nothing returns nothing
call SetPlayerStateBJ( GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD) - ( 10 / udg_Playerstotal ) ) )
endfunction
function Trig_Q06_Civil_meurt_Actions takes nothing returns nothing
local texttag malus
call GroupRemoveUnitSimple( GetDyingUnit(), udg_Quete06groupcivil )
call ForForce( udg_PlayerGroup, function Trig_Q06_Civil_meurt_Func002A )
call CreateTextTagUnitBJ( ( "-" + I2S(( 10 / udg_Playerstotal )) ), GetDyingUnit(), 0, 10, 100.00, 90.00, 0.00, 0 )
set malus = GetLastCreatedTextTag()
call SetTextTagFadepointBJ( malus, 1.00 )
call TriggerSleepAction( 1.00 )
call DestroyTextTagBJ( malus )
call TriggerExecute( gg_trg_Q06_Civil_Complete )
endfunction
//===========================================================================
function InitTrig_Q06_Civil_meurt takes nothing returns nothing
set gg_trg_Q06_Civil_meurt = CreateTrigger( )
call DisableTrigger( gg_trg_Q06_Civil_meurt )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Q06_Civil_meurt, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Q06_Civil_meurt, Condition( function Trig_Q06_Civil_meurt_Conditions ) )
call TriggerAddAction( gg_trg_Q06_Civil_meurt, function Trig_Q06_Civil_meurt_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Q06_Civil_Arrivee_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'nvl2' ) ) then
return false
endif
return true
endfunction
function Trig_Q06_Civil_Arrivee_Func003A takes nothing returns nothing
call SetPlayerStateBJ( GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD) + ( 10 / udg_Playerstotal ) ) )
endfunction
function Trig_Q06_Civil_Arrivee_Actions takes nothing returns nothing
local texttag gold
call LeaderboardSetLabelBJ( udg_Q06Board, ( "Civilians evacuated: " + ( I2S(GetTriggerExecCount(GetTriggeringTrigger())) + "/20" ) ) )
call GroupRemoveUnitSimple( GetEnteringUnit(), udg_Quete06groupcivil )
call TriggerExecute( gg_trg_Q06_Civil_Complete )
call PlaySoundBJ( gg_snd_Loading )
call RemoveUnit( GetEnteringUnit() )
call ForForce( udg_PlayerGroup, function Trig_Q06_Civil_Arrivee_Func003A )
call CreateTextTagUnitBJ( ( "+" + I2S(( 10 / udg_Playerstotal )) ), GetEnteringUnit(), 0, 10, 100.00, 90.00, 0.00, 0 )
set gold = GetLastCreatedTextTag()
call SetTextTagPermanentBJ( gold, false )
call SetTextTagFadepointBJ( gold, 1.00 )
call SetTextTagVelocityBJ( gold, 64, 90 )
call TriggerSleepAction( 0.50 )
call DestroyTextTagBJ( gold )
endfunction
//===========================================================================
function InitTrig_Q06_Civil_Arrivee takes nothing returns nothing
set gg_trg_Q06_Civil_Arrivee = CreateTrigger( )
call DisableTrigger( gg_trg_Q06_Civil_Arrivee )
call TriggerRegisterEnterRectSimple( gg_trg_Q06_Civil_Arrivee, gg_rct_Quete06CiivilArrivee1 )
call TriggerRegisterEnterRectSimple( gg_trg_Q06_Civil_Arrivee, gg_rct_Quete06CiivilArrivee2 )
call TriggerAddCondition( gg_trg_Q06_Civil_Arrivee, Condition( function Trig_Q06_Civil_Arrivee_Conditions ) )
call TriggerAddAction( gg_trg_Q06_Civil_Arrivee, function Trig_Q06_Civil_Arrivee_Actions )
endfunction
function Trig_Defensive_Matrix_Massive_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'O001' ) ) then
return false
endif
return true
endfunction
function Trig_Defensive_Matrix_Massive_Actions takes nothing returns nothing
local unit DMbouton = GetTriggerUnit()
local player DMplayer = GetTriggerPlayer()
local unit DMunit
local integer i = 1
if ( ( GetUnitStateSwap(UNIT_STATE_MANA, udg_HeroArray[GetConvertedPlayerId(DMplayer)]) >= 150.00 ) ) then
call SetUnitManaBJ( udg_HeroArray[GetConvertedPlayerId(DMplayer)], ( GetUnitStateSwap(UNIT_STATE_MANA, udg_HeroArray[GetConvertedPlayerId(DMplayer)]) - 150.00 ) )
call SelectUnitForPlayerSingle( udg_HeroArray[GetConvertedPlayerId(DMplayer)], DMplayer )
call KillUnit( DMbouton )
call CreateNUnitsAtLoc( 1, 'z00W', GetTriggerPlayer(), GetUnitLoc(udg_HeroArray[GetConvertedPlayerId(DMplayer)]), bj_UNIT_FACING )
set DMunit = GetLastCreatedUnit()
call IssueImmediateOrder( DMunit, "voodoo" )
call UnitApplyTimedLifeBJ( 18.00, 'BTLF', DMunit )
call PlaySoundBJ( gg_snd_IronGolemAttack1 )
loop
exitwhen i > 12
call TriggerSleepAction( 1.00 )
call SetUnitX(DMunit, GetUnitX(udg_HeroArray[GetConvertedPlayerId(DMplayer)]))
call SetUnitY(DMunit, GetUnitY(udg_HeroArray[GetConvertedPlayerId(DMplayer)]))
set i = i + 1
endloop
call TriggerSleepAction( 160.00 )
call ReviveHeroLoc( DMbouton, GetRectCenter(gg_rct_V_orbital_relay), false )
else
call DisplayTextToPlayer( DMplayer, 0, 0, "|cffffcc00Not enough energy to call the Massive Defensive Matrix, it needs |r|c000042FF150 Energy cell.|r" )
call PlaySoundBJ( gg_snd_Error )
endif
endfunction
//===========================================================================
function InitTrig_Defensive_Matrix_Massive takes nothing returns nothing
set gg_trg_Defensive_Matrix_Massive = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Defensive_Matrix_Massive, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Defensive_Matrix_Massive, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Defensive_Matrix_Massive, Player(2), true )
call TriggerAddCondition( gg_trg_Defensive_Matrix_Massive, Condition( function Trig_Defensive_Matrix_Massive_Conditions ) )
call TriggerAddAction( gg_trg_Defensive_Matrix_Massive, function Trig_Defensive_Matrix_Massive_Actions )
endfunction
function Trig_Backup_Infantry_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'O002' ) ) then
return false
endif
return true
endfunction
function Argent takes nothing returns boolean
local player BKplayer
if ( not ( GetPlayerState(Player(0), PLAYER_STATE_RESOURCE_GOLD) >= 320 ) ) then
return false
endif
return true
endfunction
function Trig_Backup_Infantry_Actions takes nothing returns nothing
local unit BKbouton = GetTriggerUnit()
local player BKplayer = GetTriggerPlayer()
local unit BKdrop
local location BKloc = GetUnitLoc(udg_HeroArray[GetConvertedPlayerId(BKplayer)])
local integer i = 1
call SelectUnitForPlayerSingle( udg_HeroArray[GetConvertedPlayerId(BKplayer)], BKplayer )
if ( Argent() ) then
call SetPlayerStateBJ( BKplayer, PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(BKplayer, PLAYER_STATE_RESOURCE_GOLD) - 350 ) )
call KillUnit( BKbouton )
call CreateNUnitsAtLoc( 1, 'h00C', Player(10), PolarProjectionBJ(BKloc, 1000.00, 120.00), bj_UNIT_FACING )
set BKdrop = GetLastCreatedUnit()
call IssuePointOrderLocBJ( BKdrop, "move", PolarProjectionBJ(BKloc, 100.00, 100.00) )
call TriggerSleepAction( 3.00 )
call IssueImmediateOrder( BKdrop, "ravenform" )
call TriggerSleepAction( 4.00 )
call CreateNUnitsAtLoc( 1, 'z00B', BKplayer, PolarProjectionBJ(BKloc, 100.00, 100.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 2, 'z000', BKplayer, PolarProjectionBJ(BKloc, 100.00, 100.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h00J', BKplayer, PolarProjectionBJ(BKloc, 100.00, 100.00), bj_UNIT_FACING )
call PlaySoundBJ( gg_snd_Loading )
call TriggerSleepAction( 1.00 )
call CreateNUnitsAtLoc( 2, 'z008', BKplayer, BKloc, bj_UNIT_FACING )
call PlaySoundBJ( gg_snd_Loading )
call TriggerSleepAction( 1.00 )
call IssueImmediateOrder( BKdrop, "unravenform" )
call TriggerSleepAction( 4.00 )
call IssuePointOrderLocBJ( BKdrop, "move", PolarProjectionBJ(BKloc, 1000.00, 120.00) )
call TriggerSleepAction( 2.00 )
call RemoveUnit( BKdrop)
call TriggerSleepAction( 25.00 )
call ReviveHeroLoc( BKbouton, GetRectCenter(gg_rct_V_orbital_relay), false )
else
call DisplayTextToPlayer( BKplayer, 0, 0, "|cffffcc00You don't have enough money to call a Backup !|r" )
call PlaySoundBJ( gg_snd_Error )
endif
endfunction
//===========================================================================
function InitTrig_Backup_Infantry takes nothing returns nothing
set gg_trg_Backup_Infantry = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Backup_Infantry, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Backup_Infantry, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Backup_Infantry, Player(2), true )
call TriggerAddCondition( gg_trg_Backup_Infantry, Condition( function Trig_Backup_Infantry_Conditions ) )
call TriggerAddAction( gg_trg_Backup_Infantry, function Trig_Backup_Infantry_Actions )
endfunction
function Trig_City_Backup_Actions takes nothing returns nothing
local player BKplayer = Player(3)
local unit BKdrop
local location BKloc = GetUnitLoc(udg_Quete00units[800])
local effect BKfx
call SelectUnitForPlayerSingle( udg_HeroArray[GetConvertedPlayerId(BKplayer)], BKplayer )
call SetPlayerStateBJ( BKplayer, PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(BKplayer, PLAYER_STATE_RESOURCE_GOLD) - 350 ) )
call CreateNUnitsAtLoc( 1, 'h00C', Player(10), PolarProjectionBJ(BKloc, 1000.00, 120.00), bj_UNIT_FACING )
set BKdrop = GetLastCreatedUnit()
call IssuePointOrderLocBJ( BKdrop, "move", PolarProjectionBJ(BKloc, 100.00, 100.00) )
call TriggerSleepAction( 3.00 )
call IssueImmediateOrder( BKdrop, "ravenform" )
call TriggerSleepAction( 4.00 )
call CreateNUnitsAtLoc( 2, 'z008', BKplayer, PolarProjectionBJ(BKloc, 100.00, 100.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h00J', BKplayer, PolarProjectionBJ(BKloc, 100.00, 100.00), bj_UNIT_FACING )
call PlaySoundBJ( gg_snd_Loading )
call TriggerSleepAction( 1.00 )
if ( CountUnitsInGroup(udg_Q6Tankalliedgroup) < 3 ) then
call CreateNUnitsAtLoc( 1, 'h006', BKplayer, BKloc, bj_UNIT_FACING )
call TriggerSleepAction( 1.00 )
endif
call CreateNUnitsAtLoc( 1, 'h01K', BKplayer, BKloc, bj_UNIT_FACING )
call PlaySoundBJ( gg_snd_Loading )
call TriggerSleepAction( 1.00 )
call IssueImmediateOrder( BKdrop, "unravenform" )
call TriggerSleepAction( 4.00 )
call CreateNUnitsAtLoc( 1, 'h014', BKplayer, BKloc, bj_UNIT_FACING )
call AddSpecialEffectTargetUnitBJ( "origin", GetLastCreatedUnit(), "Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl" )
set BKfx = GetLastCreatedEffectBJ()
call IssuePointOrderLocBJ( BKdrop, "move", PolarProjectionBJ(BKloc, 1000.00, 120.00) )
call TriggerSleepAction( 2.00 )
call DestroyEffect(BKfx)
call RemoveUnit( BKdrop)
endfunction
//===========================================================================
function InitTrig_City_Backup takes nothing returns nothing
set gg_trg_City_Backup = CreateTrigger( )
call TriggerAddAction( gg_trg_City_Backup, function Trig_City_Backup_Actions )
endfunction
function Trig_Moranes_guard_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'O007' ) ) then
return false
endif
return true
endfunction
function ArgentMorane takes nothing returns boolean
local player BKplayer
if ( not ( GetPlayerState(Player(0), PLAYER_STATE_RESOURCE_GOLD) >= 410 ) ) then
return false
endif
return true
endfunction
function Trig_Moranes_guard_Actions takes nothing returns nothing
local unit BKbouton = GetTriggerUnit()
local player BKplayer = GetTriggerPlayer()
local unit BKdrop
local location BKloc = GetUnitLoc(udg_HeroArray[GetConvertedPlayerId(BKplayer)])
local integer i = 1
call SelectUnitForPlayerSingle( udg_HeroArray[GetConvertedPlayerId(BKplayer)], BKplayer )
if ( ArgentMorane() ) then
call SetPlayerStateBJ( BKplayer, PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(BKplayer, PLAYER_STATE_RESOURCE_GOLD) - 350 ) )
call KillUnit( BKbouton )
call CreateNUnitsAtLoc( 1, 'h00C', Player(10), PolarProjectionBJ(BKloc, 1000.00, 120.00), bj_UNIT_FACING )
set BKdrop = GetLastCreatedUnit()
call IssuePointOrderLocBJ( BKdrop, "move", PolarProjectionBJ(BKloc, -100.00, -100.00) )
call TriggerSleepAction( 3.00 )
call IssueImmediateOrder( BKdrop, "ravenform" )
call TriggerSleepAction( 4.00 )
call CreateNUnitsAtLoc( 2, 'z001', BKplayer, PolarProjectionBJ(BKloc, -100.00, -100.00), bj_UNIT_FACING )
call CreateNUnitsAtLoc( 1, 'h00J', BKplayer, PolarProjectionBJ(BKloc, -100.00, -100.00), bj_UNIT_FACING )
call PlaySoundBJ( gg_snd_Loading )
call TriggerSleepAction( 1.00 )
call CreateNUnitsAtLoc( 2, 'z001', BKplayer, BKloc, bj_UNIT_FACING )
call PlaySoundBJ( gg_snd_Loading )
call TriggerSleepAction( 1.00 )
call IssueImmediateOrder( BKdrop, "unravenform" )
call TriggerSleepAction( 4.00 )
call IssuePointOrderLocBJ( BKdrop, "move", PolarProjectionBJ(BKloc, 1000.00, 120.00) )
call TriggerSleepAction( 2.00 )
call RemoveUnit( BKdrop)
call TriggerSleepAction( 25.00 )
call ReviveHeroLoc( BKbouton, GetRectCenter(gg_rct_V_orbital_relay), false )
else
call DisplayTextToPlayer( BKplayer, 0, 0, "|cffffcc00You don't have enough money to call a Backup !|r" )
call PlaySoundBJ( gg_snd_Error )
endif
endfunction
//===========================================================================
function InitTrig_Moranes_guard takes nothing returns nothing
set gg_trg_Moranes_guard = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Moranes_guard, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Moranes_guard, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Moranes_guard, Player(2), true )
call TriggerAddCondition( gg_trg_Moranes_guard, Condition( function Trig_Moranes_guard_Conditions ) )
call TriggerAddAction( gg_trg_Moranes_guard, function Trig_Moranes_guard_Actions )
endfunction
//TESH.scrollpos=8
//TESH.alwaysfold=0
function Trig_Heavy_Backup_Infantry_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'O006' ) ) then
return false
endif
return true
endfunction
function ArgentHeavy takes nothing returns boolean
local player BKplayer
if ( not ( GetPlayerState(Player(0), PLAYER_STATE_RESOURCE_GOLD) >= 480 ) ) then
return false
endif
return true
endfunction
function Trig_Heavy_Backup_Infantry_Actions takes nothing returns nothing
local unit BKbouton = GetTriggerUnit()
local player BKplayer = GetTriggerPlayer()
local unit BKdrop
local location BKloc = GetUnitLoc(udg_HeroArray[GetConvertedPlayerId(BKplayer)])
local integer i = 1
call SelectUnitForPlayerSingle( udg_HeroArray[GetConvertedPlayerId(BKplayer)], BKplayer )
if ( ArgentHeavy() ) then
call SetPlayerStateBJ( BKplayer, PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(BKplayer, PLAYER_STATE_RESOURCE_GOLD) - 350 ) )
call KillUnit( BKbouton )
call CreateNUnitsAtLoc( 1, 'h00C', Player(10), PolarProjectionBJ(BKloc, 1000.00, 120.00), bj_UNIT_FACING )
set BKdrop = GetLastCreatedUnit()
call IssuePointOrderLocBJ( BKdrop, "move", PolarProjectionBJ(BKloc, 200.00, 200.00) )
call TriggerSleepAction( 3.00 )
call IssueImmediateOrder( BKdrop, "ravenform" )
call TriggerSleepAction( 4.00 )
call CreateNUnitsAtLoc( 1, 'h01K', BKplayer, PolarProjectionBJ(BKloc, 200.00, 200.00), bj_UNIT_FACING )
call PlaySoundBJ( gg_snd_Loading )
call TriggerSleepAction( 1.00 )
call CreateNUnitsAtLoc( 1, 'h01K', BKplayer, PolarProjectionBJ(BKloc, 200.00, 200.00), bj_UNIT_FACING )
call PlaySoundBJ( gg_snd_Loading )
call TriggerSleepAction( 1.00 )
call CreateNUnitsAtLoc( 1, 'h01K', BKplayer, PolarProjectionBJ(BKloc, 200.00, 200.00), bj_UNIT_FACING )
call PlaySoundBJ( gg_snd_Loading )
call TriggerSleepAction( 1.00 )
call IssueImmediateOrder( BKdrop, "unravenform" )
call TriggerSleepAction( 4.00 )
call IssuePointOrderLocBJ( BKdrop, "move", PolarProjectionBJ(BKloc, 1000.00, 120.00) )
call TriggerSleepAction( 2.00 )
call RemoveUnit( BKdrop)
call TriggerSleepAction( 25.00 )
call ReviveHeroLoc( BKbouton, GetRectCenter(gg_rct_V_orbital_relay), false )
else
call DisplayTextToPlayer( BKplayer, 0, 0, "|cffffcc00You don't have enough money to call a Backup !|r" )
call PlaySoundBJ( gg_snd_Error )
endif
endfunction
//===========================================================================
function InitTrig_Heavy_Backup takes nothing returns nothing
set gg_trg_Heavy_Backup = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Heavy_Backup, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Heavy_Backup, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Heavy_Backup, Player(2), true )
call TriggerAddCondition( gg_trg_Heavy_Backup, Condition( function Trig_Heavy_Backup_Infantry_Conditions ) )
call TriggerAddAction( gg_trg_Heavy_Backup, function Trig_Heavy_Backup_Infantry_Actions )
endfunction
function Trig_Mixed_Infantry_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'O005' ) ) then
return false
endif
return true
endfunction
function ArgentMixed takes nothing returns boolean
local player BKplayer
if ( not ( GetPlayerState(Player(0), PLAYER_STATE_RESOURCE_GOLD) >= 580 ) ) then
return false
endif
return true
endfunction
function Trig_Mixed_Infantry_Actions takes nothing returns nothing
local unit BKbouton = GetTriggerUnit()
local player BKplayer = GetTriggerPlayer()
local unit BKdrop
local location BKloc = GetUnitLoc(udg_HeroArray[GetConvertedPlayerId(BKplayer)])
local integer i = 1
call SelectUnitForPlayerSingle( udg_HeroArray[GetConvertedPlayerId(BKplayer)], BKplayer )
if ( ArgentMixed() ) then
call SetPlayerStateBJ( BKplayer, PLAYER_STATE_RESOURCE_GOLD, ( GetPlayerState(BKplayer, PLAYER_STATE_RESOURCE_GOLD) - 350 ) )
call KillUnit( BKbouton )
call CreateNUnitsAtLoc( 1, 'h00C', Player(10), PolarProjectionBJ(BKloc, 1000.00, 120.00), bj_UNIT_FACING )
set BKdrop = GetLastCreatedUnit()
call IssuePointOrderLocBJ( BKdrop, "move", PolarProjectionBJ(BKloc, -200.00, -200.00) )
call TriggerSleepAction( 3.00 )
call IssueImmediateOrder( BKdrop, "ravenform" )
call TriggerSleepAction( 4.00 )
call CreateNUnitsAtLoc( 1, 'h006', BKplayer, PolarProjectionBJ(BKloc, -200.00, -200.00), GetUnitFacing(BKdrop))
call PlaySoundBJ( gg_snd_Loading )
call TriggerSleepAction( 1.00 )
call CreateNUnitsAtLoc( 1, 'h006', BKplayer, PolarProjectionBJ(BKloc, -200.00, -200.00), GetUnitFacing(BKdrop))
call PlaySoundBJ( gg_snd_Loading )
call TriggerSleepAction( 1.00 )
call IssueImmediateOrder( BKdrop, "unravenform" )
call TriggerSleepAction( 4.00 )
call IssuePointOrderLocBJ( BKdrop, "move", PolarProjectionBJ(BKloc, 1000.00, 120.00) )
call TriggerSleepAction( 2.00 )
call RemoveUnit( BKdrop)
call TriggerSleepAction( 25.00 )
call ReviveHeroLoc( BKbouton, GetRectCenter(gg_rct_V_orbital_relay), false )
else
call DisplayTextToPlayer( BKplayer, 0, 0, "|cffffcc00You don't have enough money to call a Backup !|r" )
call PlaySoundBJ( gg_snd_Error )
endif
endfunction
//===========================================================================
function InitTrig_Artillery_Infantry takes nothing returns nothing
set gg_trg_Artillery_Infantry = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Artillery_Infantry, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Artillery_Infantry, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Artillery_Infantry, Player(2), true )
call TriggerAddCondition( gg_trg_Artillery_Infantry, Condition( function Trig_Mixed_Infantry_Conditions ) )
call TriggerAddAction( gg_trg_Artillery_Infantry, function Trig_Mixed_Infantry_Actions )
endfunction
function Trig_Cargo_Ship_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'O004' ) ) then
return false
endif
return true
endfunction
function Trig_Cargo_Ship_Actions takes nothing returns nothing
local unit FBbouton = GetTriggerUnit()
local player FBplayer = GetTriggerPlayer()
local unit FBdrop
local unit collecteur
local location FBloc = GetUnitLoc(udg_HeroArray[GetConvertedPlayerId(FBplayer)])
call SelectUnitForPlayerSingle( udg_HeroArray[GetConvertedPlayerId(FBplayer)], FBplayer )
call CreateNUnitsAtLoc( 1, 'h00C', Player(10), PolarProjectionBJ(FBloc, 1000.00, 120.00), bj_UNIT_FACING )
set FBdrop = GetLastCreatedUnit()
call KillUnit( FBbouton )
call IssuePointOrderLocBJ( FBdrop, "move", FBloc )
call TriggerSleepAction( 3.00 )
call UnitAddAbilityBJ( 'Aloc', FBdrop )
call IssueImmediateOrder( FBdrop, "ravenform" )
call TriggerSleepAction( 4.00 )
call CreateNUnitsAtLoc( 1, 'hsor', Player(10), FBloc, bj_UNIT_FACING )
set collecteur = GetLastCreatedUnit()
call TriggerSleepAction( 1.00 )
call PlaySoundBJ( gg_snd_Loading )
call TriggerSleepAction( 1.00 )
call PlaySoundBJ( gg_snd_Loading )
call TriggerSleepAction( 1.00 )
call RemoveUnit( collecteur )
call IssueImmediateOrder( FBdrop, "unravenform" )
call TriggerSleepAction( 4.00 )
call IssuePointOrderLocBJ( FBdrop, "move", PolarProjectionBJ(FBloc, 1000.00, 120.00) )
call TriggerSleepAction( 2.00 )
call RemoveUnit( FBdrop)
call TriggerSleepAction( 25.00 )
call ReviveHeroLoc( FBbouton, GetRectCenter(gg_rct_V_orbital_relay), false )
endfunction
//===========================================================================
function InitTrig_Cargo_Ship takes nothing returns nothing
set gg_trg_Cargo_Ship = CreateTrigger( )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Cargo_Ship, Player(0), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Cargo_Ship, Player(1), true )
call TriggerRegisterPlayerSelectionEventBJ( gg_trg_Cargo_Ship, Player(2), true )
call TriggerAddCondition( gg_trg_Cargo_Ship, Condition( function Trig_Cargo_Ship_Conditions ) )
call TriggerAddAction( gg_trg_Cargo_Ship, function Trig_Cargo_Ship_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
// ================================================================= \\
// Custom Immolation modifier spell, so it targets destructables too \\
// Request by Abriko, by moyack. 2008. \\
// ================================================================= \\
// Requires Table to work... \\
// ================================================================= \\
scope Immolation2 initializer init
// Configuration Part...
globals
private constant integer SpellID = 'AEi2' //Spell based on Immolation
private constant integer BuffID = 'BEim' //Immolation buff, please base it on the immolation buff.
private constant real dt = 1.
endglobals
private constant function DamageRate takes integer level returns real
return 10. + 5. * (level - 1)
endfunction
private constant function AOE takes integer level returns real
return 160.
endfunction
// End configuration Part...
private struct data
static HandleTable T
static group G
static rect R
static unit U
unit c
boolean flag = false
static method Start takes unit c returns nothing
local data D = data.allocate()
set D.c = c
call GroupAddUnit(data.G, c)
set data.T[c] = integer(D)
endmethod
method onDestroy takes nothing returns nothing
call GroupRemoveUnit(data.G, .c)
call data.T.flush(.c)
endmethod
endstruct
private function GetLivingDestructables takes nothing returns boolean
return GetDestructableLife(GetFilterDestructable()) > 0.405
endfunction
private function BurnDestructables takes nothing returns nothing
local destructable d = GetEnumDestructable()
call DestroyEffect(AddSpecialEffect(GetAbilityEffectById(BuffID, EFFECT_TYPE_SPECIAL, 0), GetWidgetX(d), GetWidgetY(d)))
call UnitDamageTarget(data.U, d, DamageRate(GetUnitAbilityLevel(data.U, SpellID)) * dt, false, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS)
set d = null
endfunction
private function CheckStatus takes nothing returns nothing
local unit u = GetEnumUnit()
local data D = data( data.T[u] )
if not D.flag and GetUnitAbilityLevel(u, BuffID) > 0 then
set D.flag = true
endif
if D.flag and GetUnitAbilityLevel(u, BuffID) > 0 then
call SetRect(data.R, GetUnitX(u) - AOE(GetUnitAbilityLevel(u, SpellID)), GetUnitY(u) - AOE(GetUnitAbilityLevel(u, SpellID)), GetUnitX(u) + AOE(GetUnitAbilityLevel(u, SpellID)), GetUnitY(u) + AOE(GetUnitAbilityLevel(u, SpellID)))
set data.U = u
call EnumDestructablesInRect(data.R, Condition(function GetLivingDestructables), function BurnDestructables)
endif
if D.flag and GetUnitAbilityLevel(u, BuffID) < 1 then
call D.destroy()
endif
set u = null
endfunction
private function Loop takes nothing returns nothing
call ForGroup(data.G, function CheckStatus)
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SpellID
endfunction
private function Actions takes nothing returns nothing
if not IsUnitInGroup(GetTriggerUnit(), data.G) then
call data.Start(GetTriggerUnit())
endif
endfunction
//===========================================================================
private function init takes nothing returns nothing
local trigger t = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition( function Conditions ) )
call TriggerAddAction( t, function Actions )
set t = null
set data.T = HandleTable.create()
set data.G = CreateGroup()
set data.R = Rect(0,0,1,1)
call TimerStart(CreateTimer(), dt, true, function Loop)
endfunction
endscope
function Trig_Gold_support_Actions takes nothing returns nothing
local effect supfx
local location suppoint = GetRandomLocInRect(gg_rct_Q4GoldTurret)
call PlaySoundAtPointBJ( gg_snd_ArcaneSanctumWhat1, 100, suppoint, 0 )
call TriggerSleepAction( 2.00 )
call AddSpecialEffectLocBJ( suppoint, "war3mapImported\\caissonlargage.MDX" )
set supfx = GetLastCreatedEffectBJ()
call TriggerSleepAction( 12.00 )
call CreateItemLoc( 'I009', suppoint )
call TriggerSleepAction( 2.00 )
call DestroyEffectBJ( supfx )
endfunction
//===========================================================================
function InitTrig_Gold_support takes nothing returns nothing
set gg_trg_Gold_support = CreateTrigger( )
call TriggerAddAction( gg_trg_Gold_support, function Trig_Gold_support_Actions )
endfunction
function Trig_Kemings_Crate_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A049' ) ) then
return false
endif
return true
endfunction
function Trig_Kemings_Crate_Actions takes nothing returns nothing
local unit KScrate
local effect KSfx
local location KSloc = GetSpellTargetLoc()
call AddSpecialEffectLocBJ( KSloc, "Abilities\\Spells\\Human\\Polymorph\\PolyMorphDoneGround.mdl" )
set KSfx = GetLastCreatedEffectBJ()
call TriggerSleepAction( 0.50 )
call CreateNUnitsAtLoc( 1, 'h01M', GetOwningPlayer(GetSpellAbilityUnit()), KSloc , bj_UNIT_FACING )
set KScrate = GetLastCreatedUnit()
call IssueImmediateOrder( KScrate, "locustswarm" )
call TriggerSleepAction( 2.00 )
call DestroyEffectBJ( KSfx )
call TriggerSleepAction( 45.00 )
call SetUnitOwner( KScrate, Player(PLAYER_NEUTRAL_PASSIVE), true )
endfunction
//===========================================================================
function InitTrig_Kemings_Crate takes nothing returns nothing
set gg_trg_Kemings_Crate = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Kemings_Crate, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Kemings_Crate, Condition( function Trig_Kemings_Crate_Conditions ) )
call TriggerAddAction( gg_trg_Kemings_Crate, function Trig_Kemings_Crate_Actions )
endfunction
function Trig_Kemings_Assault_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A04B' ) ) then
return false
endif
return true
endfunction
function Trig_Kemings_Assault_Actions takes nothing returns nothing
local unit array KCun
call CreateNUnitsAtLoc( 1, 'z00C', GetOwningPlayer(GetSpellAbilityUnit()), GetUnitLoc(GetSpellAbilityUnit()), GetUnitFacing(GetSpellAbilityUnit()) )
set KCun[1]= GetLastCreatedUnit()
call IssuePointOrderLoc( KCun[1], "stampede", GetUnitLoc(GetSpellAbilityUnit()) )
call CreateNUnitsAtLoc( 1, 'z00C', GetOwningPlayer(GetSpellAbilityUnit()), OffsetLocation(GetUnitLoc(GetSpellAbilityUnit()), -50.00, 50.00), GetUnitFacing(GetSpellAbilityUnit()) )
set KCun[2]= GetLastCreatedUnit()
call IssuePointOrderLoc( KCun[2], "stampede", GetUnitLoc(GetSpellAbilityUnit()) )
call CreateNUnitsAtLoc( 1, 'z00C', GetOwningPlayer(GetSpellAbilityUnit()), OffsetLocation(GetUnitLoc(GetSpellAbilityUnit()), 50.00, -50.00), GetUnitFacing(GetSpellAbilityUnit()) )
set KCun[3]= GetLastCreatedUnit()
call IssuePointOrderLoc( KCun[3], "stampede", GetUnitLoc(GetSpellAbilityUnit()) )
call UnitApplyTimedLifeBJ( 30.00, 'BTLF', KCun[1] )
call UnitApplyTimedLifeBJ( 30.00, 'BTLF', KCun[2] )
call UnitApplyTimedLifeBJ( 30.00, 'BTLF', KCun[3] )
endfunction
//===========================================================================
function InitTrig_Kemings_Assault takes nothing returns nothing
set gg_trg_Kemings_Assault = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Kemings_Assault, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Kemings_Assault, Condition( function Trig_Kemings_Assault_Conditions ) )
call TriggerAddAction( gg_trg_Kemings_Assault, function Trig_Kemings_Assault_Actions )
endfunction
function Trig_Assaillir_Conditions takes nothing returns boolean
if( GetSpellAbilityId() != 'A61P' )then
return false
endif
if( GetRandomInt(1, 100) > 80)then
return false
endif
return true
endfunction
function Trig_Assaillir_Actions takes nothing returns nothing
local location apos = GetUnitLoc(GetSpellAbilityUnit())
local unit acas = GetSpellAbilityUnit()
local unit atg = GetSpellTargetUnit()
local integer i = 0
if( GetBooleanOr (GetUnitTypeId(GetSpellTargetUnit()) == 'z002',GetUnitTypeId(GetSpellTargetUnit()) == 'z00B'))then
if( GetUnitStateSwap(UNIT_STATE_LIFE, atg) < GetRandomReal(160, 250) )then
call SetUnitAnimation( acas, "stand swim" )
call SetUnitFacingToFaceUnitTimed( atg, acas, 0.30 )
call SetUnitInvulnerable( atg, true )
loop
exitwhen( i==2 )
call PolledWait( 0.01 )
call SetUnitPositionLoc( acas, PolarProjectionBJ(apos, 60.00, AngleBetweenPoints(GetUnitLoc(acas), GetUnitLoc(atg))) )
set apos = GetUnitLoc(acas)
set i=i+1
endloop
call SetUnitInvulnerable( atg, false )
call PauseUnitBJ( true, atg )
call SetUnitLifeBJ( atg, ( GetUnitStateSwap(UNIT_STATE_LIFE, acas) + GetUnitStateSwap(UNIT_STATE_LIFE, atg) ) )
call RemoveUnit( acas )
call SetUnitAnimation( atg, "stand swim" )
call UnitAddAbilityBJ( 'A61M', atg )
call UnitAddAbilityBJ( 'A61N', atg )
call UnitAddAbilityBJ( 'A61O', atg )
call SetUnitOwner( atg, Player(11), false )
set i = 0
loop
exitwhen( i==10 )
if( GetUnitStateSwap(UNIT_STATE_LIFE, atg) > 50 )then
call TriggerSleepAction( 0.30 )
endif
set i=i+1
endloop
set apos = GetUnitLoc(atg)
set acas = CreateUnitAtLoc( Player(5), 'z006', apos, bj_UNIT_FACING )
call SetUnitLifeBJ( acas, GetUnitStateSwap(UNIT_STATE_LIFE, atg) )
call KillUnit( atg )
call TriggerSleepAction( 1.00 )
call RemoveLocation(apos)
endif
endif
endfunction
//===========================================================================
function InitTrig_Assaillir takes nothing returns nothing
set gg_trg_Assaillir = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Assaillir, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Assaillir, Condition( function Trig_Assaillir_Conditions ) )
call TriggerAddAction( gg_trg_Assaillir, function Trig_Assaillir_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Baneling_death_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'z009' ) ) then
return false
endif
return true
endfunction
function Trig_Baneling_death_Actions takes nothing returns nothing
local effect BDFX
local location BDloc = GetUnitLoc(GetDyingUnit())
call CreateNUnitsAtLoc( 1, 'z00N', Player(6), BDloc, bj_UNIT_FACING )
call AddSpecialEffectLocBJ( BDloc, "Abilities\\Weapons\\ChimaeraAcidMissile\\ChimaeraAcidMissile.mdl" )
call IssueImmediateOrder( GetLastCreatedUnit(), "selfdestruct" )
set BDFX = GetLastCreatedEffectBJ()
call CreateNUnitsAtLoc( 1, 'u00B', Player(6), BDloc, bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 15.00, 'BTLF', GetLastCreatedUnit() )
call IssuePointOrderLoc( GetLastCreatedUnit(), "cloudoffog", BDloc )
call DestroyEffect(BDFX)
call TriggerSleepAction(2.00)
endfunction
//===========================================================================
function InitTrig_Baneling_death takes nothing returns nothing
set gg_trg_Baneling_death = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Baneling_death, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Baneling_death, Condition( function Trig_Baneling_death_Conditions ) )
call TriggerAddAction( gg_trg_Baneling_death, function Trig_Baneling_death_Actions )
endfunction
//TESH.scrollpos=20
//TESH.alwaysfold=0
function Trig_StimPack_unit_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A61A' ) ) then
return false
endif
return true
endfunction
function Quiestleplayer takes nothing returns boolean
local unit marinestim = GetSpellAbilityUnit()
local player playstim = GetOwningPlayer(marinestim)
return ( GetFilterPlayer() == playstim )
endfunction
function mortoupas takes nothing returns boolean
local unit marinestim = GetSpellAbilityUnit()
if ( not ( IsUnitAliveBJ(marinestim) == true ) ) then
return false
endif
return true
endfunction
function Trig_StimPack_unit_Actions takes nothing returns nothing
local integer i = 1
local integer loopvie = 0
local unit marinestim = GetSpellAbilityUnit()
local effect efstim
local player playstim = GetOwningPlayer(marinestim)
if((GetUnitStateSwap(UNIT_STATE_LIFE, marinestim)) > 249) then
call PlaySoundBJ( gg_snd_SpellStealMissile )
call UnitAddAbilityBJ( 'A61W', marinestim )
call UnitAddAbilityBJ( 'A60L', marinestim )
call AddSpecialEffectTargetUnitBJ( "overhead", marinestim, "war3mapImported\\stimpack.MDX" )
set efstim = GetLastCreatedEffectBJ()
call SetUnitLifeBJ( marinestim, ( GetUnitStateSwap(UNIT_STATE_LIFE, marinestim) - 200.00 ) )
else
call DisplayTextToForce( GetPlayersMatching(Condition(function Quiestleplayer)), "|cffffcc00STIM PACK CANCELLED:|r Unit is too low hit points.")
endif
loop
exitwhen loopvie > 20
if ( (GetUnitStateSwap(UNIT_STATE_LIFE, marinestim)) > 1 ) then
call TriggerSleepAction( 1.00 )
else
call DestroyEffectBJ( efstim )
endif
set loopvie = loopvie + 1
endloop
call UnitRemoveAbilityBJ( 'A61W', marinestim )
call UnitRemoveAbilityBJ( 'A60L', marinestim )
call DestroyEffectBJ( efstim )
endfunction
//===========================================================================
function InitTrig_StimPack_unit takes nothing returns nothing
set gg_trg_StimPack_unit = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_StimPack_unit, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_StimPack_unit, Condition( function Trig_StimPack_unit_Conditions ) )
call TriggerAddAction( gg_trg_StimPack_unit, function Trig_StimPack_unit_Actions )
endfunction
//TESH.scrollpos=15
//TESH.alwaysfold=0
globals
constant integer RAWCODE_SP_JUMP = 'A02X'
endglobals
function Trig_Jump_Actions takes nothing returns nothing
local s_jump JUMP
local location loc
if( GetSpellAbilityId()==RAWCODE_SP_JUMP )then
set JUMP = hdata(GetSpellAbilityUnit()).jump
if( JUMP!=0 )then
//****************************************************
//lancement du sort avec l'anti-leak
set loc = GetSpellTargetLoc()
//paramètres: point d'arrivée / vitesse / hauteur max / dommage min. / dommage max
call JUMP.begin(loc,750.,550.,50,100)
call RemoveLocation(loc)
set loc = null
//fin du lancement du sort et de l'anti-leak
//****************************************************
endif
endif
endfunction
//===========================================================================
function InitTrig_Jump takes nothing returns nothing
set gg_trg_Jump = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( gg_trg_Jump, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddAction( gg_trg_Jump, function Trig_Jump_Actions )
endfunction
//TESH.scrollpos=20
//TESH.alwaysfold=0
function Trig_EssenceAttacked_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttackedUnitBJ()) == 'n001' ) ) then
return false
endif
return true
endfunction
function Trig_EssenceAttacked_Actions takes nothing returns nothing
local unit gaspud = GetAttackedUnitBJ()
call CreateNUnitsAtLoc( 1, 'n004', udg_PlayerEradicator, GetUnitLoc(gaspud), GetRandomReal(0, 360.00) )
set gaspud = GetLastCreatedUnit()
call TriggerSleepAction( 0.01 )
call SetUnitAnimation( gaspud, "stand alternate" )
call SetUnitPathing( gaspud, false )
call PlaySoundBJ( gg_snd_BlizzardTarget1 )
if ( GetUnitAbilityLevelSwapped('A00Z', udg_HeroEradicator) == 1 ) then
call UnitApplyTimedLifeBJ( 20.00, 'BTLF', gaspud )
call SetUnitAbilityLevelSwapped( 'A010', gaspud, 1 )
call SetUnitAbilityLevelSwapped( 'A01V', gaspud, 1 )
else
endif
if ( GetUnitAbilityLevelSwapped('A00Z', udg_HeroEradicator) == 2 ) then
call UnitApplyTimedLifeBJ( 28.00, 'BTLF', gaspud )
call SetUnitAbilityLevelSwapped( 'A010', gaspud, 2 )
call SetUnitAbilityLevelSwapped( 'A01V', gaspud, 2 )
else
endif
if ( GetUnitAbilityLevelSwapped('A00Z', udg_HeroEradicator) == 3 ) then
call UnitApplyTimedLifeBJ( 36.00, 'BTLF', gaspud )
call SetUnitAbilityLevelSwapped( 'A010', gaspud, 3 )
call SetUnitAbilityLevelSwapped( 'A01V', gaspud, 3 )
else
endif
endfunction
//===========================================================================
function InitTrig_EssenceAttacked takes nothing returns nothing
set gg_trg_EssenceAttacked = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_EssenceAttacked, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_EssenceAttacked, Condition( function Trig_EssenceAttacked_Conditions ) )
call TriggerAddAction( gg_trg_EssenceAttacked, function Trig_EssenceAttacked_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_EssenceMeurt_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetDyingUnit()) == 'n001' ) ) then
return false
endif
return true
endfunction
function Trig_EssenceMeurt_Actions takes nothing returns nothing
local unit gaspud = GetDyingUnit()
call CreateNUnitsAtLoc( 1, 'n004', udg_PlayerEradicator, GetUnitLoc(gaspud), GetRandomReal(0, 360.00) )
set gaspud = GetLastCreatedUnit()
call TriggerSleepAction( 0.01 )
call SetUnitAnimation( gaspud, "stand alternate" )
call SetUnitPathing( gaspud, false )
call PlaySoundBJ( gg_snd_BlizzardTarget1 )
if ( GetUnitAbilityLevelSwapped('A00Z', udg_HeroEradicator) == 1 ) then
call UnitApplyTimedLifeBJ( 20.00, 'BTLF', gaspud )
call SetUnitAbilityLevelSwapped( 'A010', gaspud, 1 )
call SetUnitAbilityLevelSwapped( 'A01V', gaspud, 1 )
else
endif
if ( GetUnitAbilityLevelSwapped('A00Z', udg_HeroEradicator) == 2 ) then
call UnitApplyTimedLifeBJ( 28.00, 'BTLF', gaspud )
call SetUnitAbilityLevelSwapped( 'A010', gaspud, 2 )
call SetUnitAbilityLevelSwapped( 'A01V', gaspud, 2 )
else
endif
if ( GetUnitAbilityLevelSwapped('A00Z', udg_HeroEradicator) == 3 ) then
call UnitApplyTimedLifeBJ( 36.00, 'BTLF', gaspud )
call SetUnitAbilityLevelSwapped( 'A010', gaspud, 3 )
call SetUnitAbilityLevelSwapped( 'A01V', gaspud, 3 )
else
endif
endfunction
//===========================================================================
function InitTrig_EssenceMeurt takes nothing returns nothing
set gg_trg_EssenceMeurt = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_EssenceMeurt, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_EssenceMeurt, Condition( function Trig_EssenceMeurt_Conditions ) )
call TriggerAddAction( gg_trg_EssenceMeurt, function Trig_EssenceMeurt_Actions )
endfunction
//TESH.scrollpos=5
//TESH.alwaysfold=0
function Trig_Mitrailleuse_repliage_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A612' ) ) then
return false
endif
return true
endfunction
function Trig_Mitrailleuse_repliage_Func001C takes nothing returns boolean
if ( not ( R2I(GetUnitStateSwap(UNIT_STATE_LIFE, GetSpellAbilityUnit())) >= 450 ) ) then
return false
endif
return true
endfunction
function Trig_Mitrailleuse_repliage_Actions takes nothing returns nothing
local unit mitRE = GetSpellAbilityUnit()
call RemoveUnit( mitRE )
call CreateNUnitsAtLoc( 1, 'z00D', Player(0), GetUnitLoc(mitRE), bj_UNIT_FACING )
set mitRE = GetLastCreatedUnit()
call SetUnitAnimation( mitRE, "morph" )
call TriggerSleepAction( 2.50 )
call RemoveUnit( mitRE )
call SetUnitManaBJ( udg_HeroChiefOfficer, ( GetUnitStateSwap(UNIT_STATE_MANA, udg_HeroChiefOfficer) + 40.00 ) )
endfunction
//===========================================================================
function InitTrig_Mitrailleuse_repliage takes nothing returns nothing
set gg_trg_Mitrailleuse_repliage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mitrailleuse_repliage, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Mitrailleuse_repliage, Condition( function Trig_Mitrailleuse_repliage_Conditions ) )
call TriggerAddAction( gg_trg_Mitrailleuse_repliage, function Trig_Mitrailleuse_repliage_Actions )
endfunction
function Trig_Shockwaves_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03H' ) ) then
return false
endif
return true
endfunction
function Trig_Shockwaves_Func010002003 takes nothing returns boolean
return ( GetUnitRace(GetFilterUnit()) == RACE_UNDEAD )
endfunction
function Trig_Shockwaves_Func011002003 takes nothing returns boolean
return ( GetUnitRace(GetFilterUnit()) == RACE_UNDEAD )
endfunction
function Trig_Shockwaves_Func014A takes nothing returns nothing
local effect array FX
local integer FXINT
call AddSpecialEffectTargetUnitBJ( "chest", GetEnumUnit(), "Abilities\\Weapons\\Blood\\BloodImpact.mdl" )
set FX[FXINT]= GetLastCreatedEffectBJ()
set FXINT = FXINT + 1
endfunction
function Trig_Shockwaves_Actions takes nothing returns nothing
local unit ING = GetSpellAbilityUnit()
local unit DCASTER
local unit DPOSER1
local unit DPOSER2
local group TARG1
local group TARG2
local integer i = 0
local effect array FX
local integer FXINT = 0
call TriggerSleepAction( 0.70 )
call PlaySoundBJ( gg_snd_SoulBurn1 )
call CreateNUnitsAtLoc( 1, 'z00U', GetOwningPlayer(ING), PolarProjectionBJ(GetUnitLoc(ING), 50.00, GetUnitFacing(ING)), bj_UNIT_FACING )
set DCASTER = GetLastCreatedUnit()
call CreateNUnitsAtLoc( 1, 'z00U', GetOwningPlayer(ING), PolarProjectionBJ(GetUnitLoc(ING), 180.00, GetUnitFacing(ING)), bj_UNIT_FACING )
set DPOSER1 = GetLastCreatedUnit()
call CreateNUnitsAtLoc( 1, 'z00U', GetOwningPlayer(ING), PolarProjectionBJ(GetUnitLoc(ING), 360.00, GetUnitFacing(ING)), bj_UNIT_FACING )
set DPOSER2 = GetLastCreatedUnit()
call SetUnitAbilityLevelSwapped( 'A03K', DCASTER, GetUnitAbilityLevelSwapped('A03H', udg_HeroChiefOfficer) )
call IssuePointOrderLoc( DCASTER, "shockwave", PolarProjectionBJ(GetUnitLoc(ING), 256, GetUnitFacing(ING)) )
set udg_Ingenieur_SWGroup[1] = GetUnitsInRangeOfLocMatching(200.00, GetUnitLoc(DPOSER1), Condition(function Trig_Shockwaves_Func010002003))
set udg_Ingenieur_SWGroup[2] = GetUnitsInRangeOfLocMatching(200.00, GetUnitLoc(DPOSER2), Condition(function Trig_Shockwaves_Func011002003))
call GroupAddGroup( udg_Ingenieur_SWGroup[1], udg_Ingenieur_SWGroup[2] )
call EnableTrigger( gg_trg_ShockWaves_knock )
call ForGroupBJ( udg_Ingenieur_SWGroup[2], function Trig_Shockwaves_Func014A )
call TriggerSleepAction( 0.8 )
call DisableTrigger( gg_trg_ShockWaves_knock )
call RemoveUnit( DPOSER1 )
call RemoveUnit( DPOSER2 )
call RemoveUnit( DCASTER )
loop
exitwhen i > 35
call DestroyEffect(FX[i])
set i =i + 1
endloop
call DestroyGroup( udg_Ingenieur_SWGroup[1] )
call DestroyGroup( udg_Ingenieur_SWGroup[2] )
endfunction
//===========================================================================
function InitTrig_Shockwaves takes nothing returns nothing
set gg_trg_Shockwaves = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shockwaves, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Shockwaves, Condition( function Trig_Shockwaves_Conditions ) )
call TriggerAddAction( gg_trg_Shockwaves, function Trig_Shockwaves_Actions )
endfunction
function Trig_Antalisk_Conditions takes nothing returns boolean
if ( ( GetSpellAbilityId() == 'A00P' ) ) then
return true
endif
if ( ( GetSpellAbilityId() == 'A012' ) ) then
return true
endif
return false
endfunction
function Trig_Antalisk_Actions takes nothing returns nothing
local location Antapoint = GetSpellTargetLoc()
local location array Antalargpoint
local unit Antaunit = GetSpellAbilityUnit()
local effect array Antafx
local integer i = 0
call PlaySoundAtPointBJ( gg_snd_ReviveOrc, 100, Antapoint, 0 )
call TriggerSleepAction( 1.50 )
loop
exitwhen i==12
set Antalargpoint[i] = OffsetLocation(Antapoint, GetRandomReal(-400.00, 400.00), GetRandomReal(-400.00, 400.00))
call AddSpecialEffectLocBJ( Antalargpoint[i], "war3mapImported\\caissonlargage.MDX" )
set Antafx[i] = GetLastCreatedEffectBJ()
call TriggerSleepAction( 0.50 )
set i = i + 1
endloop
call TriggerSleepAction( 5.00 )
set i = 0
loop
exitwhen i==12
call CreateNUnitsAtLoc( 1, 'z00M', GetOwningPlayer(Antaunit), Antalargpoint[i], GetRandomReal(0, 360.00) )
call UnitApplyTimedLifeBJ( 75, 'BTLF', GetLastCreatedUnit() )
call SetUnitAnimation( GetLastCreatedUnit(), "birth" )
call TriggerSleepAction( 0.50 )
set i = i + 1
endloop
set i = 0
loop
exitwhen i==12
call DestroyEffectBJ( Antafx[i] )
set i= i + 1
endloop
endfunction
//===========================================================================
function InitTrig_Antalisk takes nothing returns nothing
set gg_trg_Antalisk = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Antalisk, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Antalisk, Condition( function Trig_Antalisk_Conditions ) )
call TriggerAddAction( gg_trg_Antalisk, function Trig_Antalisk_Actions )
endfunction
function Trig_Antalisk_Autoboom_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttackedUnitBJ()) == 'z00M' ) ) then
return false
endif
if ( not ( R2I(GetUnitStateSwap(UNIT_STATE_LIFE, GetAttackedUnitBJ())) < 200 ) ) then
return false
endif
return true
endfunction
function Trig_Antalisk_Autoboom_Actions takes nothing returns nothing
local unit antaboom = GetAttackedUnitBJ()
call UnitAddAbilityBJ( 'A00Y', antaboom )
call TriggerSleepAction( 0.1 )
call IssuePointOrderLoc( antaboom, "selfdestruct", GetUnitLoc(antaboom) )
call TriggerSleepAction( 0.1 )
call AddSpecialEffectLocBJ( GetUnitLoc(antaboom), "Abilities\\Weapons\\SteamTank\\SteamTankImpact.mdl" )
call TriggerSleepAction( 0.2 )
call RemoveUnit( antaboom )
endfunction
//===========================================================================
function InitTrig_Antalisk_Autoboom takes nothing returns nothing
set gg_trg_Antalisk_Autoboom = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Antalisk_Autoboom, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Antalisk_Autoboom, Condition( function Trig_Antalisk_Autoboom_Conditions ) )
call TriggerAddAction( gg_trg_Antalisk_Autoboom, function Trig_Antalisk_Autoboom_Actions )
endfunction
function Trig_Ravage_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A61I' ) ) then
return false
endif
return true
endfunction
function Trig_Ravage_Actions takes nothing returns nothing
local integer i
local integer j
local unit RAVcaster = GetSpellAbilityUnit()
local location RAVpoint = GetSpellTargetLoc()
local unit RAVbalise
local unit array RAVtank
// CREATION BALISE
call TriggerSleepAction( 1.20 )
call CreateNUnitsAtLoc( 1, 'h00L', udg_PlayerSergeant, RAVpoint, bj_UNIT_FACING )
set RAVbalise = GetLastCreatedUnit()
call UnitApplyTimedLifeBJ( 8.00, 'BTLF', RAVbalise )
call SetUnitAnimation( RAVbalise, "birth" )
call TriggerSleepAction( 0.40 )
call SetUnitAnimation( RAVbalise, "stand" )
call TriggerSleepAction( 0.20 )
// CREATION DUMMY RAVAGE
set i = 1
loop
exitwhen i > 5
call CreateNUnitsAtLoc( 1, 'h00H', udg_PlayerSergeant, RAVpoint, bj_UNIT_FACING )
set RAVtank[i] = GetLastCreatedUnit()
set i = i + 1
endloop
set i = 1
loop
exitwhen i > (GetUnitAbilityLevelSwapped('A61I', udg_HeroSergeant))
set j = 1
loop
exitwhen j > 5
call IssuePointOrderLoc( RAVtank[j], "attackground", PolarProjectionBJ(RAVpoint, I2R(( GetUnitAbilityLevelSwapped('A61I', udg_HeroSergeant) * GetRandomInt(-100, 100) )), GetRandomReal(-360.00, 360.00)) )
call TriggerSleepAction( 0.2 )
call IssueImmediateOrder( RAVtank[j], "stop" )
if( j == 1) then
call PlaySoundAtPointBJ( gg_snd_FlareTarget2, 100, RAVpoint, 0 )
endif
if( j == 4) then
call PlaySoundAtPointBJ( gg_snd_FlareTarget2, 100, RAVpoint, 0 )
endif
if( j == 3) then
call PlaySoundAtPointBJ( gg_snd_FlareTarget4, 100, RAVpoint, 0 )
endif
set j = j + 1
endloop
set i = i + 1
endloop
set i = 1
loop
exitwhen i > 5
call RemoveUnit( RAVtank[i])
set i = i + 1
endloop
endfunction
//===========================================================================
function InitTrig_Ravage takes nothing returns nothing
set gg_trg_Ravage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ravage, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Ravage, Condition( function Trig_Ravage_Conditions ) )
call TriggerAddAction( gg_trg_Ravage, function Trig_Ravage_Actions )
endfunction
//TESH.scrollpos=16
//TESH.alwaysfold=0
function Trig_Pheromone_bombing_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A015' ) ) then
return false
endif
if ( not ( GetSpellAbilityUnit() == udg_HeroSergeant ) ) then
return false
endif
return true
endfunction
function Trig_Pheromone_bombing_Actions takes nothing returns nothing
local location PheroPoint = GetSpellTargetLoc()
local unit PheroUnit
local effect PheroFX
call TriggerSleepAction( 2 )
call AddSpecialEffectLocBJ( PheroPoint, "war3mapImported\\feromonebomb.MDX" )
set PheroFX = GetLastCreatedEffectBJ()
call TriggerSleepAction( 0.20 )
call CreateNUnitsAtLoc( 1, 'z00C', udg_PlayerSergeant, PheroPoint, bj_UNIT_FACING )
set PheroUnit = GetLastCreatedUnit()
call SetUnitAbilityLevelSwapped( 'A01L', PheroUnit, GetUnitAbilityLevelSwapped('A01J', udg_HeroSergeant) )
call TriggerSleepAction( 0.20 )
call IssuePointOrderLoc( PheroUnit, "cloudoffog", PheroPoint )
call PlaySoundBJ( gg_snd_AlchemistAcidBurnMissileDeath1 )
call TriggerSleepAction( 0.10 )
call PlaySoundBJ( gg_snd_TrollBatriderMissile2 )
call TriggerSleepAction( 0.10 )
call PlaySoundBJ( gg_snd_BloodMageRangedAttack )
call TriggerSleepAction( 30.00 )
call RemoveUnit( PheroUnit)
call DestroyEffectBJ( PheroFX )
endfunction
//===========================================================================
function InitTrig_Pheromone_bombing takes nothing returns nothing
set gg_trg_Pheromone_bombing = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Pheromone_bombing, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Pheromone_bombing, Condition( function Trig_Pheromone_bombing_Conditions ) )
call TriggerAddAction( gg_trg_Pheromone_bombing, function Trig_Pheromone_bombing_Actions )
endfunction
function Trig_Support_Drop_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01O' ) ) then
return false
endif
return true
endfunction
function Trig_Support_Drop_Actions takes nothing returns nothing
local integer supint
local effect supfx
local location suppoint = GetSpellTargetLoc()
call PlaySoundAtPointBJ( gg_snd_ArcaneSanctumWhat1, 100, suppoint, 0 )
call TriggerSleepAction( 2.00 )
call AddSpecialEffectLocBJ( suppoint, "war3mapImported\\caissonlargage.MDX" )
set supfx = GetLastCreatedEffectBJ()
call TriggerSleepAction( 12.00 )
set supint = GetRandomInt(1, 3)
if ( supint == 1 ) then
call CreateItemLoc( 'I000', suppoint )
endif
if ( supint == 2) then
call CreateItemLoc( 'I001', suppoint )
endif
if ( supint == 3 ) then
call CreateItemLoc( 'I002', suppoint )
endif
call TriggerSleepAction( 2.00 )
call DestroyEffectBJ( supfx )
endfunction
//===========================================================================
function InitTrig_Support_Drop takes nothing returns nothing
set gg_trg_Support_Drop = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Support_Drop, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Support_Drop, Condition( function Trig_Support_Drop_Conditions ) )
call TriggerAddAction( gg_trg_Support_Drop, function Trig_Support_Drop_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Wraith_Raid_Conditions takes nothing returns boolean
if ( ( GetItemTypeId(GetManipulatedItem()) != 'will' ) ) then
return false
endif
return true
endfunction
function Trig_Wraith_Raid_Actions takes nothing returns nothing
local player WRplayer = GetOwningPlayer(GetManipulatingUnit())
local unit array WRwraith
local location WRloc = GetUnitLoc(udg_HeroArray[GetConvertedPlayerId(WRplayer)])
local unit WRcaster = udg_HeroArray[GetConvertedPlayerId(WRplayer)]
local integer i = 0
local effect array WRfx
call PlaySoundAtPointBJ( gg_snd_HeroFirelordYes2, 100, GetRectCenter(gg_rct_ADG2_Copy), 0 )
loop
exitwhen i>10
call CreateNUnitsAtLoc( 1, 'h014', Player(3), PolarProjectionBJ(WRloc, GetRandomReal(-500.00, 500.00),GetRandomReal(- 360.00 , 360)),GetRandomReal(-360.00, 360.00) )
set WRwraith[i] = GetLastCreatedUnit()
call AddSpecialEffectTargetUnitBJ( "origin", WRwraith[i], "Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl" )
set WRfx[i] = GetLastCreatedEffectBJ()
call IssuePointOrderLoc( WRwraith[i], "patrol", PolarProjectionBJ(WRloc, 900.00, GetRandomReal(-360.00, 360.00)) )
call TriggerSleepAction( 0.50 )
call DestroyEffect(WRfx[i-1])
set i = i + 1
endloop
set i = 0
call TriggerSleepAction( 15 )
loop
exitwhen i>11
call AddSpecialEffectTargetUnitBJ( "origin", WRwraith[i], "Abilities\\Spells\\NightElf\\Blink\\BlinkTarget.mdl" )
set WRfx[i] = GetLastCreatedEffectBJ()
call TriggerSleepAction( 0.20 )
call RemoveUnit(WRwraith[i])
call TriggerSleepAction( 0.50 )
call DestroyEffect(WRfx[i-1])
set i = i + 1
endloop
call TriggerSleepAction( 60 )
endfunction
//===========================================================================
function InitTrig_Wraith_Raid takes nothing returns nothing
set gg_trg_Wraith_Raid = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Wraith_Raid, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Wraith_Raid, Condition( function Trig_Wraith_Raid_Conditions ) )
call TriggerAddAction( gg_trg_Wraith_Raid, function Trig_Wraith_Raid_Actions )
endfunction
//TESH.scrollpos=22
//TESH.alwaysfold=0
function Trig_Acquiert_Chamber_upgrade_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'sand' ) ) then
return false
endif
return true
endfunction
function Trig_Acquiert_Chamber_upgrade_Func002Func001C takes nothing returns boolean
local player PR = GetOwningPlayer(GetManipulatingUnit())
if ( not ( UnitHasItemOfTypeBJ(udg_HeroArray[GetConvertedPlayerId(PR)], 'sand') == true ) ) then
return false
endif
return true
endfunction
function Trig_Acquiert_Chamber_upgrade_Func002Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H01F' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H01D' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H01G' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H01E' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetManipulatingUnit()) == 'H01C' ) ) then
return true
endif
return false
endfunction
function Trig_Acquiert_Chamber_upgrade_Func002C takes nothing returns boolean
if ( not Trig_Acquiert_Chamber_upgrade_Func002Func002C() ) then
return false
endif
return true
endfunction
function Trig_Acquiert_Chamber_upgrade_Actions takes nothing returns nothing
local player PR = GetOwningPlayer(GetManipulatingUnit())
if ( Trig_Acquiert_Chamber_upgrade_Func002C() ) then
if ( Trig_Acquiert_Chamber_upgrade_Func002Func001C() ) then
call UnitRemoveItemSwapped( GetItemOfTypeFromUnitBJ(udg_HeroArray[GetConvertedPlayerId(PR)], 'sand'), udg_HeroArray[GetConvertedPlayerId(PR)] )
call RemoveItem( GetLastRemovedItem() )
call UnitAddItemByIdSwapped( 'I008', udg_HeroArray[GetConvertedPlayerId(PR)] )
else
endif
else
endif
endfunction
//===========================================================================
function InitTrig_Explosive_Ammo takes nothing returns nothing
set gg_trg_Explosive_Ammo = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Explosive_Ammo, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddCondition( gg_trg_Explosive_Ammo, Condition( function Trig_Acquiert_Chamber_upgrade_Conditions ) )
call TriggerAddAction( gg_trg_Explosive_Ammo, function Trig_Acquiert_Chamber_upgrade_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Support_Drop_Item_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A03B' ) ) then
return false
endif
return true
endfunction
function Trig_Support_Drop_Item_Actions takes nothing returns nothing
local integer supint
local effect supfx
local location suppoint = GetSpellTargetLoc()
call PlaySoundAtPointBJ( gg_snd_ArcaneSanctumWhat1, 100, suppoint, 0 )
call TriggerSleepAction( 2.00 )
call AddSpecialEffectLocBJ( suppoint, "war3mapImported\\caissonlargage.MDX" )
set supfx = GetLastCreatedEffectBJ()
call TriggerSleepAction( 12.00 )
set supint = GetRandomInt(1, 3)
if ( supint == 1 ) then
call CreateItemLoc( 'I000', suppoint )
endif
if ( supint == 2) then
call CreateItemLoc( 'I001', suppoint )
endif
if ( supint == 3 ) then
call CreateItemLoc( 'I002', suppoint )
endif
call TriggerSleepAction( 2.00 )
call DestroyEffectBJ( supfx )
endfunction
//===========================================================================
function InitTrig_Support_Drop_Item takes nothing returns nothing
set gg_trg_Support_Drop_Item = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Support_Drop_Item, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Support_Drop_Item, Condition( function Trig_Support_Drop_Item_Conditions ) )
call TriggerAddAction( gg_trg_Support_Drop_Item, function Trig_Support_Drop_Item_Actions )
endfunction
//TESH.scrollpos=10
//TESH.alwaysfold=0
function Trig_Explosive_charge_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A01J' ) ) then
return false
endif
return true
endfunction
function Trig_Explosive_charge_Actions takes nothing returns nothing
local unit Cexplo
local integer bombc = 5
local integer i = 1
local texttag Compteurtxt
call CreateNUnitsAtLoc( 1, 'h00K', GetOwningPlayer(GetSpellAbilityUnit()), GetSpellTargetLoc(), bj_UNIT_FACING )
set Cexplo = GetLastCreatedUnit()
call PlaySoundAtPointBJ( gg_snd_WandOfNeutralization, 100, GetUnitLoc(Cexplo), 0 )
call CreateTextTagUnitBJ( I2S(bombc), Cexplo, 10.00, 10, 100, 10.00, 10.00, 0 )
set Compteurtxt = GetLastCreatedTextTag()
loop
exitwhen i > 5
call TriggerSleepAction( 1.00 )
set bombc = ( bombc - 1 )
call SetTextTagTextBJ( Compteurtxt, I2S(bombc), 10 )
set i = i + 1
endloop
call UnitAddAbilityBJ( 'A00S', Cexplo )
call DestroyTextTagBJ( Compteurtxt )
call IssuePointOrderLoc( Cexplo, "selfdestruct", GetUnitLoc(Cexplo) )
endfunction
//===========================================================================
function InitTrig_Explosive_charge takes nothing returns nothing
set gg_trg_Explosive_charge = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Explosive_charge, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Explosive_charge, Condition( function Trig_Explosive_charge_Conditions ) )
call TriggerAddAction( gg_trg_Explosive_charge, function Trig_Explosive_charge_Actions )
endfunction
function Trig_Frag_Grenades_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A030' ) ) then
return false
endif
return true
endfunction
function Trig_Frag_Grenades_Actions takes nothing returns nothing
local location fragloc = GetSpellTargetLoc()
local unit fragcaster
local location fragcast = GetUnitLoc(GetSpellAbilityUnit())
call CreateNUnitsAtLoc( 1, 'z00C', GetOwningPlayer(GetSpellAbilityUnit()), fragcast, bj_UNIT_FACING )
set fragcaster = GetLastCreatedUnit()
call IssuePointOrderLoc( fragcaster, "clusterrockets", fragloc )
call TriggerSleepAction( 1.2 )
call IssuePointOrderLoc( fragcaster, "flamestrike", fragloc )
call TriggerSleepAction( 1.50 )
call RemoveUnit( fragcaster )
endfunction
//===========================================================================
function InitTrig_Frag_Grenades takes nothing returns nothing
set gg_trg_Frag_Grenades = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Frag_Grenades, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Frag_Grenades, Condition( function Trig_Frag_Grenades_Conditions ) )
call TriggerAddAction( gg_trg_Frag_Grenades, function Trig_Frag_Grenades_Actions )
endfunction
function Trig_Ravage_item_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A02Y' ) ) then
return false
endif
return true
endfunction
function Trig_Ravage_item_Actions takes nothing returns nothing
local unit array RVunit
local unit RVbalise
local integer RVint
local location RVloc = GetSpellTargetLoc()
local player RVplayer = GetOwningPlayer(GetSpellAbilityUnit())
local integer i
local integer j
call TriggerSleepAction( 1.00 )
call CreateNUnitsAtLoc( 1, 'h00L', RVplayer, RVloc, bj_UNIT_FACING )
set RVbalise = GetLastCreatedUnit()
call UnitApplyTimedLifeBJ( 8.00, 'BTLF', GetLastCreatedUnit() )
call SetUnitAnimation( GetLastCreatedUnit(), "birth" )
call TriggerSleepAction( 0.40 )
call SetUnitAnimation( GetLastCreatedUnit(), "stand" )
call TriggerSleepAction( 0.20 )
set i = 1
loop
exitwhen i > 3
call CreateNUnitsAtLoc( 1, 'h00H', RVplayer, RVloc, bj_UNIT_FACING )
set RVunit[i] = GetLastCreatedUnit()
set i = i + 1
endloop
set i = 1
loop
exitwhen i > 5
set j = 1
loop
exitwhen j > 3
call IssuePointOrderLocBJ( RVunit[j], "attackground", OffsetLocation(RVloc, GetRandomReal(-200.00, 200.00), GetRandomReal(-200.00, 200.00)) )
call TriggerSleepAction( 0.40 )
if( j == 1) then
call PlaySoundAtPointBJ( gg_snd_FlareTarget2, 100, RVloc, 0 )
endif
if( j == 4) then
call PlaySoundAtPointBJ( gg_snd_FlareTarget2, 100, RVloc, 0 )
endif
if( j == 3) then
call PlaySoundAtPointBJ( gg_snd_FlareTarget4, 100, RVloc, 0 )
endif
set j = j + 1
endloop
set i= i + 1
endloop
set i= 1
loop
exitwhen i > 3
call RemoveUnit( RVunit[i] )
set i = i + 1
endloop
endfunction
//===========================================================================
function InitTrig_Ravage_item takes nothing returns nothing
set gg_trg_Ravage_item = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ravage_item, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Ravage_item, Condition( function Trig_Ravage_item_Conditions ) )
call TriggerAddAction( gg_trg_Ravage_item, function Trig_Ravage_item_Actions )
endfunction
function Trig_Transport_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A002' ) ) then
return false
endif
return true
endfunction
function Trig_Transport_Actions takes nothing returns nothing
local unit Tdrop
local unit Thero = GetSpellAbilityUnit()
local boolean Tbool = false
local integer i = 1
call CreateNUnitsAtLoc( 1, 'h00C', GetOwningPlayer(GetSpellAbilityUnit()), PolarProjectionBJ(GetUnitLoc(GetSpellAbilityUnit()), 1000.00, 240.00), bj_UNIT_FACING )
set Tdrop = GetLastCreatedUnit()
call IssuePointOrderLocBJ( Tdrop, "move", GetUnitLoc(GetSpellAbilityUnit()) )
call TriggerSleepAction( 3.00 )
call IssueImmediateOrder( Tdrop, "ravenform" )
call TriggerSleepAction( 3.00 )
loop
exitwhen i > 10
if ( Tbool == false ) then
call TriggerSleepAction( 1.00 )
// call DisplayTextToForce( GetPlayersAll(), ( I2S(i) + "CHECK" ) )
else
endif
if ( DistanceBetweenPoints(GetUnitLoc(Tdrop), GetUnitLoc(Thero)) <= 200.00 ) then
if ( Tbool == false ) then
set Tbool = true
call ShowUnitHide( Thero )
call SetUnitInvulnerable( Thero, true )
call PlaySoundBJ( gg_snd_Loading )
call IssueImmediateOrder( Tdrop, "unravenform" )
call TriggerSleepAction( 3.00 )
call IssuePointOrderLocBJ( Tdrop, "move", GetRectCenter(gg_rct_Transport) )
endif
else
if ( Tbool == false ) then
if ( i==10 ) then
// call DisplayTextToForce( GetPlayersAll(), ( I2S(i) + "DECOLLAGE PARCE QUE TROP LOIN" ) )
call IssueImmediateOrder( Tdrop, "unravenform" )
call TriggerSleepAction( 3.00 )
call IssuePointOrderLocBJ( Tdrop, "move", PolarProjectionBJ(GetUnitLoc(Tdrop), 3000.00, 240.00) )
call TriggerSleepAction( 4.00 )
call RemoveUnit( Tdrop )
endif
endif
endif
set i = i + 1
endloop
set i = 1
if ( Tbool == true ) then
loop
exitwhen i > 30
if ( DistanceBetweenPoints(GetUnitLoc(Tdrop), GetRectCenter(gg_rct_Transport)) <= 100.00 ) then
// call DisplayTextToForce( GetPlayersAll(), "ARRIVEE" )
call IssueImmediateOrder( Tdrop, "ravenform" )
call TriggerSleepAction( 3.00 )
call SetUnitPositionLoc( Thero, GetUnitLoc(Tdrop) )
call SetUnitInvulnerable( Thero, false )
call PlaySoundBJ( gg_snd_Loading )
call ShowUnitShow( Thero )
call IssueImmediateOrder( Tdrop, "unravenform" )
call TriggerSleepAction( 3.00 )
call IssuePointOrderLocBJ( Tdrop, "move", PolarProjectionBJ(GetUnitLoc(Tdrop), 3000.00, 240.00) )
set Tbool = false
call TriggerSleepAction( 4.00 )
call RemoveUnit( Tdrop )
else
if ( Tbool == true ) then
// call DisplayTextToForce( GetPlayersAll(), "PAS ARRIVEE" )
if ( IsUnitAliveBJ(Tdrop) == false ) then
call SetUnitPositionLoc( Thero, GetUnitLoc(Tdrop) )
call SetUnitInvulnerable( Thero, false )
call PlaySoundBJ( gg_snd_Loading )
call ShowUnitShow( Thero )
call SetUnitLifePercentBJ( Thero, 50.00 )
call CreateNUnitsAtLoc( 1, 'z00C', GetOwningPlayer(Thero), GetUnitLoc(Thero), bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 3.00, 'BTLF', GetLastCreatedUnit() )
call IssueTargetOrder( GetLastCreatedUnit(), "cripple", Thero )
else
endif
else
endif
endif
call TriggerSleepAction( 1.00 )
set i = i + 1
endloop
else
endif
endfunction
//===========================================================================
function InitTrig_Transport takes nothing returns nothing
set gg_trg_Transport = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Transport, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Transport, Condition( function Trig_Transport_Conditions ) )
call TriggerAddAction( gg_trg_Transport, function Trig_Transport_Actions )
endfunction
function Trig_Init_Piege_Conditions takes nothing returns boolean
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_HeroGroup) == true ) ) then
return false
endif
return true
endfunction
function Trig_Init_Piege_Actions takes nothing returns nothing
local unit zergU
call DisableTrigger( GetTriggeringTrigger() )
call CreateNUnitsAtLoc( 1, 'z006', Player(6), GetRandomLocInRect(gg_rct_PiegeZerg1), bj_UNIT_FACING )
set zergU = GetLastCreatedUnit()
call PauseUnitBJ( true,zergU )
call SetUnitAnimation( zergU, "morph alternate" )
call TriggerSleepAction( 0.60 )
call PauseUnitBJ( false, zergU )
call CreateNUnitsAtLoc( 1, 'z006', Player(6), GetRandomLocInRect(gg_rct_PiegeZerg1), bj_UNIT_FACING )
set zergU = GetLastCreatedUnit()
call PauseUnitBJ( true,zergU )
call SetUnitAnimation( zergU, "morph alternate" )
call TriggerSleepAction( 0.60 )
call PauseUnitBJ( false, zergU )
endfunction
//===========================================================================
function InitTrig_Init_Piege takes nothing returns nothing
set gg_trg_Init_Piege = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Init_Piege, gg_rct_PiegeZerg1 )
call TriggerAddCondition( gg_trg_Init_Piege, Condition( function Trig_Init_Piege_Conditions ) )
call TriggerAddAction( gg_trg_Init_Piege, function Trig_Init_Piege_Actions )
endfunction
function Trig_Init_Piege_2_Conditions takes nothing returns boolean
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_HeroGroup) == true ) ) then
return false
endif
return true
endfunction
function Trig_Init_Piege_2_Actions takes nothing returns nothing
local unit zergU
call DisableTrigger( GetTriggeringTrigger() )
call CreateNUnitsAtLoc( 1, 'z006', Player(6), GetRandomLocInRect(gg_rct_PiegeZerg2), bj_UNIT_FACING )
set zergU = GetLastCreatedUnit()
call PauseUnitBJ( true,zergU )
call SetUnitAnimation( zergU, "morph alternate" )
call TriggerSleepAction( 0.60 )
call PauseUnitBJ( false, zergU )
call CreateNUnitsAtLoc( 1, 'z006', Player(6), GetRandomLocInRect(gg_rct_PiegeZerg2), bj_UNIT_FACING )
set zergU = GetLastCreatedUnit()
call PauseUnitBJ( true,zergU )
call SetUnitAnimation( zergU, "morph alternate" )
call TriggerSleepAction( 0.60 )
call PauseUnitBJ( false, zergU )
endfunction
//===========================================================================
function InitTrig_Init_Piege_2 takes nothing returns nothing
set gg_trg_Init_Piege_2 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Init_Piege_2, gg_rct_PiegeZerg2 )
call TriggerAddCondition( gg_trg_Init_Piege_2, Condition( function Trig_Init_Piege_2_Conditions ) )
call TriggerAddAction( gg_trg_Init_Piege_2, function Trig_Init_Piege_2_Actions )
endfunction
function Trig_Init_Piege_3_Conditions takes nothing returns boolean
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_HeroGroup) == true ) ) then
return false
endif
return true
endfunction
function Trig_Init_Piege_3_Actions takes nothing returns nothing
local unit zergU
call DisableTrigger( GetTriggeringTrigger() )
call CreateNUnitsAtLoc( 1, 'z006', Player(6), GetRandomLocInRect(gg_rct_PiegeZerg3), bj_UNIT_FACING )
set zergU = GetLastCreatedUnit()
call PauseUnitBJ( true,zergU )
call SetUnitAnimation( zergU, "morph alternate" )
call TriggerSleepAction( 0.60 )
call PauseUnitBJ( false, zergU )
call CreateNUnitsAtLoc( 1, 'z006', Player(6), GetRandomLocInRect(gg_rct_PiegeZerg3), bj_UNIT_FACING )
set zergU = GetLastCreatedUnit()
call PauseUnitBJ( true,zergU )
call SetUnitAnimation( zergU, "morph alternate" )
call TriggerSleepAction( 0.60 )
call PauseUnitBJ( false, zergU )
endfunction
//===========================================================================
function InitTrig_Init_Piege_3 takes nothing returns nothing
set gg_trg_Init_Piege_3 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Init_Piege_3, gg_rct_PiegeZerg3 )
call TriggerAddCondition( gg_trg_Init_Piege_3, Condition( function Trig_Init_Piege_3_Conditions ) )
call TriggerAddAction( gg_trg_Init_Piege_3, function Trig_Init_Piege_3_Actions )
endfunction
function Trig_Init_Piege_4_Conditions takes nothing returns boolean
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_HeroGroup) == true ) ) then
return false
endif
return true
endfunction
function Trig_Init_Piege_4_Actions takes nothing returns nothing
local unit zergU
call DisableTrigger( GetTriggeringTrigger() )
call CreateNUnitsAtLoc( 1, 'z006', Player(6), GetRandomLocInRect(gg_rct_PiegeZerg4), bj_UNIT_FACING )
set zergU = GetLastCreatedUnit()
call PauseUnitBJ( true,zergU )
call SetUnitAnimation( zergU, "morph alternate" )
call TriggerSleepAction( 0.60 )
call PauseUnitBJ( false, zergU )
call CreateNUnitsAtLoc( 1, 'z006', Player(6), GetRandomLocInRect(gg_rct_PiegeZerg4), bj_UNIT_FACING )
set zergU = GetLastCreatedUnit()
call PauseUnitBJ( true,zergU )
call SetUnitAnimation( zergU, "morph alternate" )
call TriggerSleepAction( 0.60 )
call PauseUnitBJ( false, zergU )
endfunction
//===========================================================================
function InitTrig_Init_Piege_4 takes nothing returns nothing
set gg_trg_Init_Piege_4 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Init_Piege_4, gg_rct_PiegeZerg4 )
call TriggerAddCondition( gg_trg_Init_Piege_4, Condition( function Trig_Init_Piege_4_Conditions ) )
call TriggerAddAction( gg_trg_Init_Piege_4, function Trig_Init_Piege_4_Actions )
endfunction
function Trig_Init_Piege_5_Conditions takes nothing returns boolean
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_HeroGroup) == true ) ) then
return false
endif
return true
endfunction
function Trig_Init_Piege_5_Actions takes nothing returns nothing
local unit zergU
call DisableTrigger( GetTriggeringTrigger() )
call CreateNUnitsAtLoc( 1, 'z006', Player(6), GetRandomLocInRect(gg_rct_PiegeZerg5), bj_UNIT_FACING )
set zergU = GetLastCreatedUnit()
call PauseUnitBJ( true,zergU )
call SetUnitAnimation( zergU, "morph alternate" )
call TriggerSleepAction( 0.60 )
call PauseUnitBJ( false, zergU )
call CreateNUnitsAtLoc( 1, 'z006', Player(6), GetRandomLocInRect(gg_rct_PiegeZerg5), bj_UNIT_FACING )
set zergU = GetLastCreatedUnit()
call PauseUnitBJ( true,zergU )
call SetUnitAnimation( zergU, "morph alternate" )
call TriggerSleepAction( 0.60 )
call PauseUnitBJ( false, zergU )
endfunction
//===========================================================================
function InitTrig_Init_Piege_5 takes nothing returns nothing
set gg_trg_Init_Piege_5 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Init_Piege_5, gg_rct_PiegeZerg5 )
call TriggerAddCondition( gg_trg_Init_Piege_5, Condition( function Trig_Init_Piege_5_Conditions ) )
call TriggerAddAction( gg_trg_Init_Piege_5, function Trig_Init_Piege_5_Actions )
endfunction
function Trig_Init_Piege_6_Conditions takes nothing returns boolean
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_HeroGroup) == true ) ) then
return false
endif
return true
endfunction
function Trig_Init_Piege_6_Actions takes nothing returns nothing
local unit zergU
local effect zergFX
call DisableTrigger( GetTriggeringTrigger() )
call CreateNUnitsAtLoc( 1, 'z006', Player(6), GetRandomLocInRect(gg_rct_PiegeZerg6), bj_UNIT_FACING )
set zergU = GetLastCreatedUnit()
call PauseUnitBJ( true,zergU )
call SetUnitAnimation( zergU, "morph alternate" )
call TriggerSleepAction( 0.60 )
call PauseUnitBJ( false, zergU )
call CreateNUnitsAtLoc( 1, 'z006', Player(6), GetRandomLocInRect(gg_rct_PiegeZerg6), bj_UNIT_FACING )
set zergU = GetLastCreatedUnit()
call PauseUnitBJ( true,zergU )
call SetUnitAnimation( zergU, "morph alternate" )
call TriggerSleepAction( 0.60 )
call PauseUnitBJ( false, zergU )
call CreateNUnitsAtLoc( 1, 'z00L', Player(6), GetRandomLocInRect(gg_rct_PiegeZerg6), bj_UNIT_FACING )
set zergU = GetLastCreatedUnit()
call AddSpecialEffectTargetUnitBJ( "origin", zergU, "Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl" )
set zergFX = GetLastCreatedEffectBJ()
call TriggerSleepAction( 2.00 )
call DestroyEffectBJ( zergFX )
call PauseUnitBJ( true,zergU )
call TriggerSleepAction( 0.20 )
call PauseUnitBJ( false, zergU )
endfunction
//===========================================================================
function InitTrig_Init_Piege_6 takes nothing returns nothing
set gg_trg_Init_Piege_6 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Init_Piege_6, gg_rct_PiegeZerg5 )
call TriggerAddCondition( gg_trg_Init_Piege_6, Condition( function Trig_Init_Piege_6_Conditions ) )
call TriggerAddAction( gg_trg_Init_Piege_6, function Trig_Init_Piege_6_Actions )
endfunction
function Trig_Init_Piege_7_Conditions takes nothing returns boolean
if ( not ( IsUnitInGroup(GetEnteringUnit(), udg_HeroGroup) == true ) ) then
return false
endif
return true
endfunction
function Trig_Init_Piege_7_Actions takes nothing returns nothing
local unit zergU
local effect zergFX
call DisableTrigger( GetTriggeringTrigger() )
call CreateNUnitsAtLoc( 1, 'z006', Player(6), GetRandomLocInRect(gg_rct_PiegeZerg7), bj_UNIT_FACING )
set zergU = GetLastCreatedUnit()
call PauseUnitBJ( true,zergU )
call SetUnitAnimation( zergU, "morph alternate" )
call TriggerSleepAction( 0.60 )
call PauseUnitBJ( false, zergU )
call CreateNUnitsAtLoc( 1, 'z006', Player(6), GetRandomLocInRect(gg_rct_PiegeZerg7), bj_UNIT_FACING )
set zergU = GetLastCreatedUnit()
call PauseUnitBJ( true,zergU )
call SetUnitAnimation( zergU, "morph alternate" )
call TriggerSleepAction( 0.60 )
call PauseUnitBJ( false, zergU )
call CreateNUnitsAtLoc( 1, 'z00L', Player(6), GetRandomLocInRect(gg_rct_PiegeZerg7), bj_UNIT_FACING )
set zergU = GetLastCreatedUnit()
call AddSpecialEffectTargetUnitBJ( "origin", zergU, "Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl" )
set zergFX = GetLastCreatedEffectBJ()
call TriggerSleepAction( 2.00 )
call DestroyEffectBJ( zergFX )
call PauseUnitBJ( true,zergU )
call TriggerSleepAction( 0.20 )
call PauseUnitBJ( false, zergU )
endfunction
//===========================================================================
function InitTrig_Init_Piege_7 takes nothing returns nothing
set gg_trg_Init_Piege_7 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Init_Piege_7, gg_rct_V_orbital_relay )
call TriggerAddCondition( gg_trg_Init_Piege_7, Condition( function Trig_Init_Piege_7_Conditions ) )
call TriggerAddAction( gg_trg_Init_Piege_7, function Trig_Init_Piege_7_Actions )
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Soldat_recuperes_Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetDyingUnit()) == 'z000' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'z00B' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'z008' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'h00J' ) ) then
return true
endif
return false
endfunction
function Trig_Soldat_recuperes_Conditions takes nothing returns boolean
if ( not ( IsUnitAliveBJ(udg_Infirmerie_Medic) == true ) ) then
return false
endif
if ( not ( GetTriggerExecCount(gg_trg_Q02_Medic_Activation) > 0 ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetDyingUnit()) != Player(6) ) ) then
return false
endif
if ( not Trig_Soldat_recuperes_Func003C() ) then
return false
endif
return true
endfunction
function Trig_Soldat_recuperes_Func006C takes nothing returns boolean
if ( not ( GetRandomInt(1, 100) > 80 ) ) then
return false
endif
return true
endfunction
function Trig_Soldat_recuperes_Actions takes nothing returns nothing
local unit recuUNIT = GetDyingUnit()
local unit newUNIT
local effect FX
if ( Trig_Soldat_recuperes_Func006C() ) then
call TriggerSleepAction( 1 )
call AddSpecialEffectLocBJ( GetUnitLoc(recuUNIT), "Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl" )
set FX = GetLastCreatedEffectBJ()
call TriggerSleepAction( 2 )
call CreateNUnitsAtLoc( 1, GetUnitTypeId(recuUNIT), GetOwningPlayer(recuUNIT), GetRectCenter(gg_rct_Q02MedicDepart), bj_UNIT_FACING )
set newUNIT = GetLastCreatedUnit()
call ShowUnitHide(newUNIT)
call TriggerSleepAction( 1 )
call RemoveUnit(recuUNIT)
call DestroyEffectBJ( FX )
call TriggerSleepAction( 8.00 )
call PingMinimapLocForForceEx( GetPlayersAll(), GetUnitLoc(newUNIT), 3.00, bj_MINIMAPPINGSTYLE_ATTACK, 0.00, 0.00, 100 )
call ShowUnitShow(newUNIT)
call IssuePointOrderLocBJ( newUNIT, "move", GetRandomLocInRect(gg_rct_PiegeZerg5) )
call SetUnitLifePercentBJ( newUNIT, 20.00 )
else
endif
endfunction
//===========================================================================
function InitTrig_Soldat_recuperes takes nothing returns nothing
set gg_trg_Soldat_recuperes = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Soldat_recuperes, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Soldat_recuperes, Condition( function Trig_Soldat_recuperes_Conditions ) )
call TriggerAddAction( gg_trg_Soldat_recuperes, function Trig_Soldat_recuperes_Actions )
endfunction
//TESH.scrollpos=16
//TESH.alwaysfold=0
function Trig_Tank_recuperation_Func001C takes nothing returns boolean
if ( ( GetUnitTypeId(GetDyingUnit()) == 'h006' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetDyingUnit()) == 'h00E' ) ) then
return true
endif
return false
endfunction
function Trig_Tank_recuperation_Conditions takes nothing returns boolean
if ( not Trig_Tank_recuperation_Func001C() ) then
return false
endif
return true
endfunction
function Trig_Tank_recuperation_Actions takes nothing returns nothing
local effect FX
local effect FX2
local unit TANK = GetDyingUnit()
call TriggerSleepAction( 2 )
set udg_Armory_Recup_INT = ( udg_Armory_Recup_INT + 1 )
//call DisplayTextToPlayer( Player(0), 0, 0, ( "tank mort " + I2S(udg_Armory_Recup_INT) ) )
if ( IsUnitAliveBJ(udg_Armor_ingenieur) == true ) then
if ( udg_Armory_Recup_INT == 5 ) then
set udg_Armory_Recup_INT = 0
set FX = AddSpecialEffectLoc( "Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl",GetUnitLoc(TANK))
set FX2 = AddSpecialEffectLoc( "Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl",GetRandomLocInRect(gg_rct_Quete02zoneoeuf))
call TriggerSleepAction( 2.00 )
call DestroyEffect( FX )
call DestroyEffect( FX2 )
set FX = AddSpecialEffectLoc( "Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl",GetUnitLoc(TANK))
set FX2 = AddSpecialEffectLoc( "Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl",GetRandomLocInRect(gg_rct_Quete02zoneoeuf))
call TriggerSleepAction( 2.00 )
call DestroyEffect( FX )
call DestroyEffect( FX2 )
set FX = AddSpecialEffectLoc( "Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl",GetUnitLoc(TANK))
set FX2 = AddSpecialEffectLoc( "Abilities\\Spells\\Undead\\DarkRitual\\DarkRitualTarget.mdl",GetRandomLocInRect(gg_rct_Quete02zoneoeuf))
call TriggerSleepAction( 2.00 )
call DestroyEffect( FX )
call DestroyEffect( FX2 )
call CreateUnitAtLoc(GetOwningPlayer(TANK),'h006', GetRandomLocInRect(gg_rct_Quete02zoneoeuf), 270 )
call RemoveUnit( TANK )
call TriggerSleepAction( 1.00 )
endif
endif
endfunction
//===========================================================================
function InitTrig_Tank_recuperation takes nothing returns nothing
set gg_trg_Tank_recuperation = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Tank_recuperation, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Tank_recuperation, Condition( function Trig_Tank_recuperation_Conditions ) )
call TriggerAddAction( gg_trg_Tank_recuperation, function Trig_Tank_recuperation_Actions )
endfunction
function Trig_Q8_gardien_attack_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'n003' ) ) then
return false
endif
return true
endfunction
function Trig_Q8_gardien_attack_Actions takes nothing returns nothing
local effect tentaFX
local location tentaLOC = GetUnitLoc(GetAttackedUnitBJ())
call AddSpecialEffectLocBJ((tentaLOC), "war3mapImported\\Sunken_PA.mdx" )
set tentaFX = GetLastCreatedEffectBJ()
call TriggerSleepAction( 1.00 )
call DestroyEffectBJ( tentaFX )
set tentaLOC = null
endfunction
//===========================================================================
function InitTrig_Sunken_attack takes nothing returns nothing
set gg_trg_Sunken_attack = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Sunken_attack, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Sunken_attack, Condition( function Trig_Q8_gardien_attack_Conditions ) )
call TriggerAddAction( gg_trg_Sunken_attack, function Trig_Q8_gardien_attack_Actions )
endfunction
function Trig_Q8_Hatchery_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'nfgo' ) ) then
return false
endif
return true
endfunction
function Trig_Q8_Hatchery_Actions takes nothing returns nothing
local effect tentaFX
local location tentaLOC = GetUnitLoc(GetAttackedUnitBJ())
call AddSpecialEffectLocBJ((tentaLOC), "war3mapImported\\Sunken_PA.mdx" )
set tentaFX = GetLastCreatedEffectBJ()
call TriggerSleepAction( 1.00 )
call DestroyEffectBJ( tentaFX )
set tentaLOC = null
endfunction
//===========================================================================
function InitTrig_Hatchery takes nothing returns nothing
set gg_trg_Hatchery = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hatchery, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Hatchery, Condition( function Trig_Q8_Hatchery_Conditions ) )
call TriggerAddAction( gg_trg_Hatchery, function Trig_Q8_Hatchery_Actions )
endfunction
function Trig_Marine_assaillit_attacked_Conditions takes nothing returns boolean
if ( not ( IsUnitInGroup(GetAttackedUnitBJ(), udg_Init_MarineAssaillit) == true ) ) then
return false
endif
return true
endfunction
function Trig_Marine_assaillit_attacked_Actions takes nothing returns nothing
local unit MAss = GetAttackedUnitBJ()
call UnitAddAbilityBJ( 'Aloc', MAss )
call TriggerSleepAction( 1.00 )
call PauseUnitBJ( false, MAss )
call KillUnit( MAss)
call CreateNUnitsAtLoc( 1, 'z006', Player(6), GetUnitLoc(MAss), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Marine_assaillit_attacked takes nothing returns nothing
set gg_trg_Marine_assaillit_attacked = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Marine_assaillit_attacked, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddCondition( gg_trg_Marine_assaillit_attacked, Condition( function Trig_Marine_assaillit_attacked_Conditions ) )
call TriggerAddAction( gg_trg_Marine_assaillit_attacked, function Trig_Marine_assaillit_attacked_Actions )
endfunction