function SoundForPlayer takes player giocatore, sound suono returns nothing
if (GetLocalPlayer() == giocatore) then
call PlaySoundBJ(suono)
endif
endfunction
Name | Type | is_array | initial_value |
AbilitiesLearned | integer | Yes | |
ActivePlayers | force | No | |
Alchemy1 | dialog | No | |
Alchemy2 | dialog | No | |
Alchemy3 | dialog | No | |
AlchemyGroup | group | No | |
AlchemyLevel | integer | No | |
Ang | real | No | |
AntiMagicPotion | button | No | |
AttackDummy | unit | No | |
AttackedUnit | unit | No | |
CancelButton | button | No | |
Caster | unit | No | |
Damage | real | No | |
Delay_Time | real | No | |
Delay_Times | real | No | |
Emanation | group | No | |
EmanationAngle | real | No | |
EmanationCounter | integer | No | |
Explosin_Ang | real | No | |
FlameInteger1 | integer | No | |
FlameInteger2 | integer | No | |
GetLearnedAbility | integer | No | |
GreaterHealingPotion | button | No | |
GreaterManaPotion | button | No | |
GreaterReplinishmentPotion | button | No | |
How_Many_Times | integer | No | |
LastUnitLeftBarracks | unit | No | |
LesserRestorationPotion | button | No | |
ManaPotion | button | No | |
NrOfHeroes | integer | No | 4 |
NrOfPlayers | integer | No | 12 |
Number_Zeal | integer | No | |
NumofAbilities | integer | No | 1 |
Point | location | Yes | |
PointA | location | No | |
PointB | location | No | |
PotionofHealing | button | No | |
PotionofInvisibility | button | No | |
PotionofInvunerability | button | No | |
RealFlameValue | real | No | |
ReplinishmentPotion | button | No | |
Rolling_Ang | real | Yes | |
Rolling_Group | group | No | |
Rolling_Number | integer | No | |
Selection_Ability1 | string | Yes | |
Selection_Ability2 | string | Yes | |
Selection_Ability3 | string | Yes | |
Selection_Ability4 | string | Yes | |
Selection_Ability5 | string | Yes | |
Selection_CurrentHero | integer | No | |
Selection_FirstHeroSelection | boolean | No | true |
Selection_Hero | unit | Yes | |
Selection_HeroPicked | boolean | No | |
Selection_HeroRegion | rect | Yes | |
Selection_HeroType | unitcode | No | |
Selection_PrimaryAttribute | string | Yes | |
Selection_SFX | effect | No | |
Selection_Visibility | fogmodifier | No | |
Sigma_Caster | unit | No | |
SliceSound | sound | Yes | |
Storm_Ang | real | No | |
Strike_Counter | integer | No | |
Swift_Timer | timer | No | |
SymbolOfFireCaster | unit | No | |
TempInteger | integer | No | |
TempPlayer | player | No | |
TempPoint | location | No | |
Titan_Group | group | No | |
VampirePotion | button | No | |
ZTempGroup | group | No | |
ZTempPoint | location | Yes |
function GetVolcanoGameCache takes nothing returns gamecache
return gg_trg_Volcano
return null
endfunction
function VolcanoHandle2Integer takes handle h returns integer
return h
return 0
endfunction
function Initialize_Volcano_Variables takes nothing returns nothing
local gamecache g = GetVolcanoGameCache()
local group u = CreateGroup( )
local integer VolcanoAbility = 'A000' // <-- You can adjust the Value
local integer VolcanoUnit1 = 'e001' // <-- You can adjust the Value
local integer VolcanoUnit2 = 'e002' // <-- You can adjust the Value
local integer VolcanoUnit3 = 'e003' // <-- You can adjust the Value
call StoreIntegerBJ( VolcanoHandle2Integer(u), "Unitgroup", "Unitgroup", g )
call StoreIntegerBJ( VolcanoAbility, "Ability", "Ability", g )
call StoreIntegerBJ( VolcanoUnit1, "Unit1", "Unit", g )
call StoreIntegerBJ( VolcanoUnit2, "Unit2", "Unit", g )
call StoreIntegerBJ( VolcanoUnit3, "Unit3", "Unit", g )
endfunction
function VolcanoGameCache2Trigger takes gamecache g returns trigger
return g
return null
endfunction
function VolcanoTimer takes nothing returns timer
return GetStoredInteger(GetVolcanoGameCache(), "Timer", "Timer")
return null
endfunction
function VolcanoGroup takes nothing returns group
return GetStoredInteger(GetVolcanoGameCache(), "Unitgroup", "Unitgroup")
return null
endfunction
function VolcanoAbility takes nothing returns integer
return GetStoredInteger(GetVolcanoGameCache(), "Ability", "Ability")
endfunction
function Trig_Volcano_Conditions takes nothing returns boolean
return ( GetSpellAbilityId() == VolcanoAbility() )
endfunction
function Trig_Volcano_Damage_Doodads takes nothing returns nothing
if (not IsDestructableInvulnerableBJ(GetEnumDestructable())) then
call SetDestructableLife( GetEnumDestructable(), ( GetDestructableLife(GetEnumDestructable()) - 500 ) )
endif
endfunction
function Trig_Volcano_Actions takes nothing returns nothing
local gamecache g = GetVolcanoGameCache()
local location s = GetSpellTargetLoc()
local effect array effects
local location l
local integer i = 1
local integer j = 1
local unit array volcano
local player p = GetOwningPlayer(GetSpellAbilityUnit())
local timer t = VolcanoTimer()
local group volcanos = VolcanoGroup()
call EnumDestructablesInCircleBJ( 400, s, function Trig_Volcano_Damage_Doodads )
call TerrainDeformationCraterBJ( 0.50, true, s, 400.00, -450.00 )
call TerrainDeformationCraterBJ( 0.50, true, s, 200.00, 400.00 )
loop
exitwhen i > 6
set l = PolarProjectionBJ(s, 100.00, I2R(i) * 60.00 )
call DestroyEffect( AddSpecialEffectLoc("Objects\\Spawnmodels\\Human\\FragmentationShards\\FragBoomSpawn.mdl", l) )
call DestroyEffect( AddSpecialEffectLoc("Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl", l) )
call DestroyEffect( AddSpecialEffectLoc("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl", l) )
call RemoveLocation(l)
set i = i + 1
endloop
call PolledWait( 0.5 )
set i = 1
loop
exitwhen i > 6
set l = PolarProjectionBJ(s, 100.00, I2R(i) * 60.00 )
set effects[i * 2] = AddSpecialEffectLoc("Doodads\\Cinematic\\FireRockSmall\\FireRockSmall.mdl", l)
set effects[(i * 2) + 1] = AddSpecialEffectLoc("Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl", l)
call RemoveLocation(l)
set i = i + 1
endloop
set effects[1] = AddSpecialEffectLoc("Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdl", s)
set effects[14] = AddSpecialEffectLoc("Abilities\\Spells\\Orc\\EarthQuake\\EarthQuakeTarget.mdl", s)
set i = 1
set j = 1
loop
exitwhen j > 3
set volcano[((j-1)*3)+1] = CreateUnitAtLoc(p, GetStoredInteger(g, "Unit", "Unit1"), s, bj_UNIT_FACING)
call SetUnitPathing( volcano[((j-1)*3)+1], false )
call UnitAddAbilityBJ( 'Aloc', volcano[((j-1)*3)+1] )
call SetUnitPositionLoc( volcano[((j-1)*3)+1], s )
call SetUnitInvulnerable( GetLastCreatedUnit(), true )
set volcano[((j-1)*3)+2] = CreateUnitAtLoc(p, GetStoredInteger(g, "Unit", "Unit2"), s, bj_UNIT_FACING)
call SetUnitPathing( volcano[((j-1)*3)+2], false )
call UnitAddAbilityBJ( 'Aloc', volcano[((j-1)*3)+2] )
call SetUnitPositionLoc( volcano[((j-1)*3)+2], s )
call SetUnitInvulnerable( volcano[((j-1)*3)+2], true )
set volcano[((j-1)*3)+3] = CreateUnitAtLoc(p, GetStoredInteger(g, "Unit", "Unit3"), s, bj_UNIT_FACING)
call SetUnitPathing( volcano[((j-1)*3)+3], false )
call UnitAddAbilityBJ( 'Aloc', volcano[((j-1)*3)+3] )
call SetUnitPositionLoc( volcano[((j-1)*3)+3], s )
call SetUnitInvulnerable( volcano[((j-1)*3)+3], true )
set j = j + 1
endloop
loop
exitwhen i > 22
set j = 1
loop
exitwhen j > 9
set l = PolarProjectionBJ(s, GetRandomReal(300.00, 700.00), GetRandomDirectionDeg())
call IssuePointOrderLocBJ( volcano[j], "attackground", l )
call RemoveLocation(l)
set j = j + 1
endloop
call PolledWait( 0.8 )
set i = i + 1
endloop
call FlushStoredReal( g,"X", I2S(VolcanoHandle2Integer(volcano[1])))
call FlushStoredReal( g,"Y", I2S(VolcanoHandle2Integer(volcano[1])))
call GroupRemoveUnit( volcanos,volcano[1] )
set j = 1
loop
exitwhen j > 9
call UnitRemoveAbilityBJ( 'Aloc', volcano[j] )
call RemoveUnit( volcano[j] )
set j = j + 1
endloop
call TerrainDeformationCraterBJ( 0.50, true, s, 400.00, 450.00 )
call TerrainDeformationCraterBJ( 0.50, true, s, 200.00, -400.00 )
set i = 1
loop
exitwhen i > 6
call DestroyEffect( effects[i * 2] )
call DestroyEffect( effects[(i * 2) + 1] )
set i = i + 1
endloop
call DestroyEffect( effects[1] )
call DestroyEffect( effects[14] )
endfunction
//===========================================================================
function InitTrig_Volcano takes nothing returns nothing
local integer i = 0
local trigger t = CreateTrigger( )
set gg_trg_Volcano = VolcanoGameCache2Trigger(InitGameCache( "Volcano.w3v" ))
call Initialize_Volcano_Variables()
loop
exitwhen i > 11
if ( GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING ) then
call TriggerRegisterPlayerUnitEventSimple( t, Player(i), EVENT_PLAYER_UNIT_SPELL_EFFECT )
endif
set i = i + 1
endloop
call TriggerAddCondition( t, Condition( function Trig_Volcano_Conditions ) )
call TriggerAddAction( t, function Trig_Volcano_Actions )
endfunction
function GetStonePrisonGameCache takes nothing returns gamecache
return gg_trg_Stone_Prison
return null
endfunction
function Initialize_StonePrison_Variables takes nothing returns nothing
local gamecache g = GetStonePrisonGameCache()
local integer i = 1
local real array StonePrisonRange
local real array StonePrisonTime
local integer Levels = 3 // <-- You can adjust the Value
local integer StonePrisonAbility = 'A000' // <-- You can adjust the Value
local integer StonePrisonDestructable = 'DTrc' // <-- You can adjust the Value
//Radius for each level
set StonePrisonRange[1] = 300.00 // <-- You can adjust the Value
set StonePrisonRange[2] = 350.00 // <-- You can adjust the Value
set StonePrisonRange[3] = 400.00 // <-- You can adjust the Value
//Time the prison lasts for each Level
set StonePrisonTime[1] = 10.00 // <-- You can adjust the Value
set StonePrisonTime[2] = 20.00 // <-- You can adjust the Value
set StonePrisonTime[3] = 30.00 // <-- You can adjust the Value
call StoreIntegerBJ( StonePrisonAbility, "Ability", "Ability", g )
call StoreIntegerBJ( StonePrisonDestructable, "destructable", "destructable", g )
loop
exitwhen i > Levels
call StoreRealBJ( StonePrisonRange[i], "Range", "Range" + I2S(i), g )
call StoreRealBJ( StonePrisonTime[i], "Time", "Time" + I2S(i), g )
set i = i + 1
endloop
endfunction
function StonePrisonGameCache2Trigger takes gamecache g returns trigger
return g
return null
endfunction
function StonePrisonHandle2Integer takes handle h returns integer
return h
return 0
endfunction
function StonePrisonInteger2Destructable takes integer i returns destructable
return i
return null
endfunction
function StonePrisonInteger2Effect takes integer i returns effect
return i
return null
endfunction
function StonePrisonDestructable takes nothing returns integer
return GetStoredInteger(GetStonePrisonGameCache(), "destructable", "destructable")
endfunction
function StonePrisonAbility takes nothing returns integer
return GetStoredInteger(GetStonePrisonGameCache(), "Ability", "Ability")
endfunction
function StonePrisonRange takes integer level returns real
return GetStoredReal(GetStonePrisonGameCache(), "Range" + I2S(level), "Range")
endfunction
function StonePrisonTime takes integer level returns real
return GetStoredReal(GetStonePrisonGameCache(), "Time" + I2S(level), "Time")
endfunction
function Trig_Stone_Prison_Conditions takes nothing returns boolean
return ( GetSpellAbilityId() == StonePrisonAbility() )
endfunction
function Trig_Stone_Prison_Timer_Actions takes nothing returns nothing
local gamecache g = GetStonePrisonGameCache()
local timer tr = GetExpiredTimer()
local string str = I2S(StonePrisonHandle2Integer(tr))
local boolean beginCircle = GetStoredInteger (g, str, "BeginCircle") == 1
local integer num = GetStoredInteger (g, str, "num")
local integer dpn = GetStoredInteger (g, str, "dpn")
local integer timeleft = GetStoredInteger (g, str, "Timer")
local integer dn = GetStoredInteger (g, str, "dn")
local integer dd = GetStoredInteger (g, str, "dd")
local integer level = GetStoredInteger (g, str, "level")
local real angle = GetStoredReal (g, str, "angle")
local real startangle = GetStoredReal (g, str, "startangle")
local real calca = GetStoredReal (g, str, "calca")
local real dist = GetStoredReal (g, str, "distance")
local integer numdood = R2I(360 / calca)
local real range = StonePrisonRange(level)
local integer i = 1
local location sp
local location dp
local destructable d
local effect e
if (HaveStoredInteger(g,str,"effect")) then
set e = StonePrisonInteger2Effect( GetStoredInteger (g, str, "effect") )
call DestroyEffect(e)
endif
if (dn > 2) then
if (dd < dn+1) then
set d = StonePrisonInteger2Destructable(GetStoredInteger(g, str, "d" + I2S(dd)))
call SetDestructableInvulnerable(d, true)
call KillDestructable( d)
call FlushStoredInteger(g, str, "d" + I2S(dd))
set dd = dd + 1
call StoreIntegerBJ( dd, "dd", str, g )
else
call FlushStoredInteger(g, str, "dn")
call FlushStoredInteger(g, str, "dd")
endif
endif
if (beginCircle) then
set timeleft = timeleft -1
set sp = Location(GetStoredReal(g, str, "mX"),GetStoredReal(g, str, "mY"))
set dp = PolarProjectionBJ(sp,range,startangle + (num * calca) )
set e = AddSpecialEffectLoc("Abilities\\Spells\\Demon\\DemonBoltImpact\\DemonBoltImpact.mdl", dp)
set dpn = dpn + 1
if (dpn <= numdood) then
set d = CreateDestructable(StonePrisonDestructable(), GetLocationX(dp), GetLocationY(dp), GetRandomDirectionDeg(), 1, 0)
call SetDestructableInvulnerable(d, true)
call StoreIntegerBJ( StonePrisonHandle2Integer(d), "pd" + I2S(dpn), str, g )
call StoreIntegerBJ( dpn, "dpn", str, g )
endif
call StoreIntegerBJ( timeleft, "Timer", str, g )
call StoreIntegerBJ( num+1 , "num" , str, g )
call StoreIntegerBJ( StonePrisonHandle2Integer(e), "effect", str, g )
else
set sp = Location(GetStoredReal(g, str, "X"),GetStoredReal(g, str, "Y"))
set dp = PolarProjectionBJ(sp,dist,angle)
set d = CreateDestructable(StonePrisonDestructable(), GetLocationX(dp), GetLocationY(dp), GetRandomDirectionDeg(), 1, 0)
set dn = dn + 1
if (dist > 100) then
set dist = dist - 100
call StoreRealBJ( dist, "distance", str, g )
else
set dist = 0
call StoreIntegerBJ( 1, "BeginCircle", str, g )
call StoreIntegerBJ( 1, "dd", str, g )
endif
set e = AddSpecialEffectLoc("Abilities\\Spells\\Demon\\DemonBoltImpact\\DemonBoltImpact.mdl", dp)
call StoreIntegerBJ( StonePrisonHandle2Integer(e), "effect", str, g )
call StoreIntegerBJ (StonePrisonHandle2Integer(d), "d" + I2S(dn), str, g )
call StoreIntegerBJ (dn, "dn", str, g )
endif
call RemoveLocation (sp)
call RemoveLocation (dp)
if (timeleft == 0) then
call DestroyEffect ( e )
call PauseTimerBJ ( true, GetExpiredTimer() )
call DestroyTimer ( tr )
loop
exitwhen i > numdood
set d = StonePrisonInteger2Destructable(GetStoredInteger(g, str, "pd" + I2S(i)))
call KillDestructable( d)
set i = i + 1
endloop
call FlushStoredInteger (g, str, "BeginCircle")
call FlushStoredInteger (g, str, "num")
call FlushStoredInteger (g, str, "dpn")
call FlushStoredInteger (g, str, "Timer")
call FlushStoredInteger (g, str, "dn")
call FlushStoredInteger (g, str, "dd")
call FlushStoredReal (g, str, "angle")
call FlushStoredReal (g, str, "startangle")
call FlushStoredReal (g, str, "calca")
call FlushStoredReal (g, str, "distance")
call FlushStoredReal (g, str, "X")
call FlushStoredReal (g, str, "Y")
call FlushStoredReal (g, str, "mX")
call FlushStoredReal (g, str, "mY")
call DestroyTrigger ( GetTriggeringTrigger() )
endif
endfunction
function Trig_Stone_Prison_Actions takes nothing returns nothing
local gamecache g = GetStonePrisonGameCache()
local unit u = GetSpellAbilityUnit()
local location s = GetSpellTargetLoc()
local location l = GetUnitLoc(u)
local real angle = AngleBetweenPoints(l, s)
local integer level = GetUnitAbilityLevelSwapped(StonePrisonAbility(), u)
local real range = StonePrisonRange(level)
local integer time = R2I(StonePrisonTime(level) / 0.05)
local location sp = PolarProjectionBJ(s,range,angle-90)
local timer tr = CreateTimer ( )
local trigger t = CreateTrigger( )
local real calca = (360 / ((bj_PI * 2 * range) / 75)) + 2
local real dist = DistanceBetweenPoints(sp,l)
local real a = AngleBetweenPoints(sp, l)
local real X = GetLocationX(sp)
local real Y = GetLocationY(sp)
local real mX = GetLocationX(s)
local real mY = GetLocationY(s)
local string str
call RemoveLocation(s)
call RemoveLocation(l)
call RemoveLocation(sp)
call TriggerRegisterTimerExpireEventBJ( t, tr )
call TriggerAddAction( t, function Trig_Stone_Prison_Timer_Actions )
call TimerStart(tr, 0.05, true, null)
set str = I2S(StonePrisonHandle2Integer(tr))
call StoreIntegerBJ( time, "Timer" , str, g )
call StoreIntegerBJ( 0, "BeginCircle", str, g )
call StoreIntegerBJ( level, "level" , str, g )
call StoreRealBJ ( X, "X" , str, g )
call StoreRealBJ ( Y, "Y" , str, g )
call StoreRealBJ ( mX, "mX" , str, g )
call StoreRealBJ ( mY, "mY" , str, g )
call StoreRealBJ ( a, "angle" , str, g )
call StoreRealBJ ( angle-90, "startangle" , str, g )
call StoreRealBJ ( dist, "distance" , str, g )
call StoreRealBJ ( calca, "calca" , str, g )
endfunction
//===========================================================================
function InitTrig_Stone_Prison takes nothing returns nothing
local integer i = 0
local trigger t = CreateTrigger( )
set gg_trg_Stone_Prison = StonePrisonGameCache2Trigger(InitGameCache( "StonePrison.w3v" ))
call Initialize_StonePrison_Variables()
loop
exitwhen i > 11
if ( GetPlayerSlotState(Player(i)) == PLAYER_SLOT_STATE_PLAYING ) then
call TriggerRegisterPlayerUnitEventSimple( t, Player(i), EVENT_PLAYER_UNIT_SPELL_EFFECT )
endif
set i = i + 1
endloop
call TriggerAddCondition( t, Condition( function Trig_Stone_Prison_Conditions ) )
call TriggerAddAction( t, function Trig_Stone_Prison_Actions )
endfunction
//************************************************************************************************
//*
//* Fire Ball
//*
//* Requires:
//* -The FireBalll Ability (must always summon the fireball missile unit)
//* -The Fireballl Missile Unit (make sure it has fireball flamestrike)
//* -This Trigger (make sure the Configuration Section is pointing to
//* the right abilities/units)
//*
//************************************************************************************************
//================================================================================================
// Spell Configuration:
//
constant function FireBallAbilityId takes nothing returns integer
return 'A000' //* Fireball's Ability RawCode (It changes betwen maps)
endfunction
constant function FireBallUnitId takes nothing returns integer
return 'n000' //* Fireball's Missile Unit RawCode (It changes betwen maps)
endfunction
constant function FireBallFlameStrikeAbility takes integer level returns integer
if level == 1 then
return 'A002' //* Fireball's level 1 FlamesTrike Based ability RawCode (It changes betwen maps)
elseif level == 2 then
return 'A003' //* Fireball's level 2 FlamesTrike Based ability RawCode (It changes betwen maps)
elseif level == 3 then
return 'A001' //* Fireball's level 3 FlamesTrike Based ability RawCode (It changes betwen maps)
endif
return 0
endfunction
//================================================================================================
function Trig_Kill_fire_Ball_Actions takes nothing returns nothing
call KillUnit( GetTriggerUnit() )
endfunction
function Trig_Fire_Ball_Actions takes nothing returns nothing
local unit grenade=GetSummonedUnit()
local location target= GetUnitLoc( grenade)
local location loc
local integer t=0
local trigger trg_Kill_fire_Ball=CreateTrigger()
call ShowUnit( grenade, true)
call UnitAddAbility( grenade, FireBallFlameStrikeAbility( GetUnitAbilityLevel(GetSummoningUnit(), FireBallAbilityId()) ))
call UnitAddAbility( grenade,'Aloc' )
call SetUnitPosition( grenade, GetUnitX(GetSummoningUnit()) + 100 * Cos(GetUnitFacing(GetSummoningUnit()) * bj_DEGTORAD), GetUnitY(GetSummoningUnit()) + 100 * Sin(GetUnitFacing(GetSummoningUnit()) * bj_DEGTORAD))
call TriggerRegisterUnitEvent( trg_Kill_fire_Ball, grenade, EVENT_UNIT_SPELL_FINISH )
call TriggerAddAction( trg_Kill_fire_Ball, function Trig_Kill_fire_Ball_Actions )
call SetUnitPathing( grenade, false)
loop
exitwhen t>50 or GetTriggerEvalCount(trg_Kill_fire_Ball) > 0
set loc=GetUnitLoc( grenade)
if DistanceBetweenPoints( loc, target) <= 20 then
call DestroyEffect( AddSpecialEffect( "Objects\\Spawnmodels\\Human\\HCancelDeath\\HCancelDeath.mdl", GetUnitX(GetTriggerUnit()), GetUnitY(grenade)))
endif
call RemoveLocation( loc)
set t=t+1
if t< 10 then
call IssuePointOrderLoc( grenade, "flamestrike", target )
endif
call TriggerSleepAction(0)
endloop
call RemoveLocation( loc)
call RemoveLocation( target)
set loc=null
set target=null
call DestroyTrigger(trg_Kill_fire_Ball)
set trg_Kill_fire_Ball=null
endfunction
//================================================================================================
function Trig_Fire_Ball_Conditions takes nothing returns boolean
return ( GetUnitTypeId(GetSummonedUnit()) == FireBallUnitId() )
endfunction
function InitTrig_Fire_Ball takes nothing returns nothing
set gg_trg_Fire_Ball = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Fire_Ball, EVENT_PLAYER_UNIT_SUMMON )
call TriggerAddCondition( gg_trg_Fire_Ball, Condition( function Trig_Fire_Ball_Conditions ) )
call TriggerAddAction( gg_trg_Fire_Ball, function Trig_Fire_Ball_Actions )
endfunction
function Trig_Fire_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A00B'
endfunction
function Trig_Fire_Actions takes nothing returns nothing
local unit caster = GetSpellAbilityUnit()
local integer count = 0
local integer size = 0
local integer slot = 0
local string starmodel = "Doodads\\Cinematic\\FirePillarMedium\\FirePillarMedium.mdl"
local real radius = 310 + (GetUnitAbilityLevelSwapped('A00B', caster) * 250)
local real start_angle = GetUnitFacing(caster)
local location target = GetUnitLoc(caster)
local player forpl = GetOwningPlayer (caster)
local location point1 = PolarProjectionBJ(target, radius, start_angle)
local location point2 = PolarProjectionBJ(target, radius, start_angle + 216)
local location point3 = PolarProjectionBJ(target, radius, start_angle + 72)
local location point4 = PolarProjectionBJ(target, radius, start_angle + 288)
local location point5 = PolarProjectionBJ(target, radius, start_angle + 144)
local texttag msg
local effect array firepts
call SetUnitAnimation( caster, "spell channel" )
call CameraSetEQNoiseForPlayer( forpl, 5 )
loop
set count = count + 80
call AddSpecialEffectLocBJ(PolarProjectionBJ(point1, count, AngleBetweenPoints(point1, PolarProjectionBJ(target, radius, start_angle + 216))), starmodel)
set firepts[size] = GetLastCreatedEffectBJ()
set size = size + 1
call AddSpecialEffectLocBJ(PolarProjectionBJ(point2, count, AngleBetweenPoints(point2, PolarProjectionBJ(target, radius, start_angle + 72))), starmodel)
set firepts[size] = GetLastCreatedEffectBJ()
set size = size + 1
call AddSpecialEffectLocBJ(PolarProjectionBJ(point3, count, AngleBetweenPoints(point3, PolarProjectionBJ(target, radius, start_angle + 288))), starmodel)
set firepts[size] = GetLastCreatedEffectBJ()
set size = size + 1
call AddSpecialEffectLocBJ(PolarProjectionBJ(point4, count, AngleBetweenPoints(point4, PolarProjectionBJ(target, radius, start_angle + 144))), starmodel)
set firepts[size] = GetLastCreatedEffectBJ()
set size = size + 1
call AddSpecialEffectLocBJ(PolarProjectionBJ(point5, count, AngleBetweenPoints(point5, PolarProjectionBJ(target, radius, start_angle))), starmodel)
set firepts[size] = GetLastCreatedEffectBJ()
set size = size + 1
call TriggerSleepAction(.10)
exitwhen (count >= radius*2)
endloop
call CreateTextTagUnitBJ( "Ahhhh!", caster, -30, 10, 100, 0.00, 0.00, 20.00 )
set msg = GetLastCreatedTextTag()
call TriggerSleepAction(1.00)
loop
call DestroyEffectBJ(firepts[slot])
set slot = slot + 1
exitwhen (slot == size)
endloop
call CameraClearNoiseForPlayer( forpl )
call DestroyTextTagBJ( msg )
endfunction
//===========================================================================
function InitTrig_Ifrith_Rage takes nothing returns nothing
set gg_trg_Ifrith_Rage = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ifrith_Rage, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Ifrith_Rage, Condition( function Trig_Fire_Conditions ) )
call TriggerAddAction( gg_trg_Ifrith_Rage, function Trig_Fire_Actions )
endfunction
function Trig_Ifrith_Pause_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00B' ) ) then
return false
endif
return true
endfunction
function Trig_Ifrith_Pause_Actions takes nothing returns nothing
call TriggerSleepAction( 1.00 )
call PauseUnitBJ( true, GetTriggerUnit() )
call TriggerSleepAction( 5.00 )
call PauseUnitBJ( false, GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_Ifrith_Pause takes nothing returns nothing
set gg_trg_Ifrith_Pause = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Ifrith_Pause, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Ifrith_Pause, Condition( function Trig_Ifrith_Pause_Conditions ) )
call TriggerAddAction( gg_trg_Ifrith_Pause, function Trig_Ifrith_Pause_Actions )
endfunction