Name | Type | is_array | initial_value |
Fireball | unitcode | No | n003 |
Flameball | unit | No | |
Kills | leaderboard | No | |
Point | integer | Yes | |
Score | integer | Yes | |
TempPoint | location | No |
function Trig_Cloud_Spell_Activation_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A003'
endfunction
function Trig_Cloud_Spell_Activation_Actions takes nothing returns nothing
local integer i = 0
local real x = GetUnitX(GetTriggerUnit())
local real y = GetUnitY(GetTriggerUnit())
local player p = Player(15)
loop
exitwhen i == 10
call UnitApplyTimedLife(CreateUnit(p,'n001',x,y,0),'BTLF',10)
set i = i+1
endloop
set p = null
endfunction
function InitTrig_Cloud_Spell_Activation takes nothing returns nothing
set gg_trg_Cloud_Spell_Activation = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Cloud_Spell_Activation,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddCondition(gg_trg_Cloud_Spell_Activation, Condition(function Trig_Cloud_Spell_Activation_Conditions))
call TriggerAddAction(gg_trg_Cloud_Spell_Activation, function Trig_Cloud_Spell_Activation_Actions)
endfunction
function Trig_RematchingFireVictory_Func008002 takes nothing returns nothing
if GetUnitAbilityLevel(GetEnumUnit(),'Avul') == 0 then
call RemoveUnit(GetEnumUnit())
endif
endfunction
function Trig_RematchingFireVictory_Func009002 takes nothing returns nothing
local location l = GetPlayerStartLocationLoc(GetEnumPlayer())
call CreateNUnitsAtLoc( 1, 'h000', GetEnumPlayer(),l, bj_UNIT_FACING )
call RemoveLocation(l)
set l = null
endfunction
function Trig_RematchingWaterVictory_Func008002 takes nothing returns nothing
local location l = GetPlayerStartLocationLoc(GetEnumPlayer())
call CreateNUnitsAtLoc( 1, 'h001', GetEnumPlayer(), GetPlayerStartLocationLoc(GetEnumPlayer()), bj_UNIT_FACING )
call RemoveLocation(l)
set l = null
endfunction
function Trig_RematchingFireVictory_Actions takes nothing returns nothing
local group g = CreateGroup()
local group g2 = CreateGroup()
local group g3
local force f
set g3 = CreateGroup()
set bj_groupAddGroupDest = g
call GroupEnumUnitsOfPlayer(g3,Player(4),null)
call ForGroup(g3,function GroupAddGroupEnum)
call GroupEnumUnitsOfPlayer(g3,Player(5),null)
call ForGroup(g3,function GroupAddGroupEnum)
call GroupEnumUnitsOfPlayer(g3,Player(6),null)
call ForGroup(g3,function GroupAddGroupEnum)
call GroupEnumUnitsOfPlayer(g3,Player(7),null)
call ForGroup(g3,function GroupAddGroupEnum)
set bj_groupAddGroupDest = g2
call GroupEnumUnitsOfPlayer(g3,Player(0),null)
call ForGroup(g3,function GroupAddGroupEnum)
call GroupEnumUnitsOfPlayer(g3,Player(1),null)
call ForGroup(g3,function GroupAddGroupEnum)
call GroupEnumUnitsOfPlayer(g3,Player(2),null)
call ForGroup(g3,function GroupAddGroupEnum)
call GroupEnumUnitsOfPlayer(g3,Player(3),null)
call ForGroup(g3,function GroupAddGroupEnum)
call DestroyGroup(g3)
if CountUnitsInGroup(g) == 0 or CountUnitsInGroup(g2) == 0 then
if CountUnitsInGroup(g) == 0 then
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_027" )
else
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_028" )
endif
call PolledWait( 5.00 )
call DestroyGroup(g)
set g = GetUnitsInRectAll(GetEntireMapRect())
call ForGroupBJ(g,function Trig_RematchingFireVictory_Func008002)
set f = GetPlayersAllies(Player(8))
call ForForce(f,function Trig_RematchingFireVictory_Func009002 )
call DestroyForce(f)
set f = GetPlayersAllies(Player(9))
call ForForce(f,function Trig_RematchingWaterVictory_Func008002 )
call DestroyForce(f)
endif
call DestroyGroup(g)
set g = null
set g2 = null
set g3 = null
set f = null
endfunction
function InitTrig_RematchingFireVictory takes nothing returns nothing
set gg_trg_RematchingFireVictory = CreateTrigger()
call TriggerRegisterTimerEvent(gg_trg_RematchingFireVictory,7.5,true)
call TriggerAddAction( gg_trg_RematchingFireVictory, function Trig_RematchingFireVictory_Actions )
endfunction