function DestroyEff2 takes nothing returns nothing
local timer t = GetExpiredTimer()
local effect e
call LoadEffectHandle( udg_hTheHashtable, GetHandleId(t), 1 )
call DestroyEffect(e)
set e = null
call PauseTimer(t)
call DestroyTimer(t)
set t = null
endfunction
function DestroyEff1 takes effect e, real s returns nothing
local timer t = CreateTimer()
call SaveEffectHandle( udg_hTheHashtable, GetHandleId(t), 1, e )
call TimerStart(t, s, false, function DestroyEff2)
set t = null
endfunction
function EndShield1 takes nothing returns nothing
local timer t = GetExpiredTimer()
local unit u
//local real r
set u = LoadUnitHandle( udg_hTheHashtable, GetHandleId(t), 1 )
//set r = LoadRealBJ(udg_hWordShieldAmount, GetHandleId(u), udg_hTheHashtable)
call SaveRealBJ( 0, udg_hWordShieldAmount, GetHandleIdBJ(u), udg_hTheHashtable )
call PauseTimer(t)
call DestroyTimer(t)
set t = null
set u = null
endfunction
Name | Type | is_array | initial_value |
ArenaBoss01 | unit | No | |
ArenaBoss02 | unit | No | |
ArenaCounter01 | integer | No | |
damageTaken1 | real | No | |
detectedUnits1 | group | No | |
diseaseclouds | group | No | |
dummyMeat1 | unit | Yes | |
GrenadeShot1 | effect | No | |
hCustomV1 | integer | No | |
hCustomV2 | integer | No | |
hCustomV3 | integer | No | |
hCustomV4 | integer | No | |
hDamageTaken | integer | No | |
healSurge1 | effect | No | |
hHealth1 | integer | No | |
hInCombat1 | integer | No | |
hTheHashtable | hashtable | No | |
hWordShieldAmount | integer | No | |
spawningUnit1 | unit | Yes | |
spawningUnitCounter1 | integer | No | |
SpellTargets1 | group | No | |
t | timer | No | |
tempGroup01 | group | No | |
tempGroup02 | group | No | |
tempInt1 | integer | No | |
tempPoint1 | location | No | |
tempPoint2 | location | No | |
tempPoint3 | location | No | |
tempReal1 | real | No | |
tempRegion1 | rect | No | |
tmpReal | real | No |
function Trig_Mortarshot3_Actions takes nothing returns nothing
set udg_tmpReal = ( I2R(GetUnitAbilityLevelSwapped('A004', GetAttacker())) + I2R(GetHeroStatBJ(bj_HEROSTAT_AGI, GetAttacker(), true)) )
set udg_tmpReal = ( I2R(BlzGetUnitBaseDamage(GetAttacker(), 1)) + I2R(GetHeroStatBJ(bj_HEROSTAT_AGI, GetAttacker(), true)) )
call SaveIntegerBJ( 0, udg_hCustomV1, GetHandleIdBJ(GetAttacker()), udg_hTheHashtable )
call AddSpecialEffectLocBJ( udg_tempPoint1, "Abilities\\Weapons\\Rifle\\RifleImpact.mdl" )
call SaveEffectHandleBJ( GetLastCreatedEffectBJ(), 10, GetHandleIdBJ(GetTriggerUnit()), udg_hTheHashtable )
endfunction
//===========================================================================
function InitTrig_Mortarshot3 takes nothing returns nothing
set gg_trg_Mortarshot3 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mortarshot3, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddAction( gg_trg_Mortarshot3, function Trig_Mortarshot3_Actions )
endfunction
function Trig_Mortarshot2_Kopieren_Actions takes nothing returns nothing
local real d
if LoadIntegerBJ(udg_hCustomV1, GetHandleIdBJ(GetAttacker()), udg_hTheHashtable) == 1 then
call SaveIntegerBJ( 0, udg_hCustomV1, GetHandleIdBJ(GetAttacker()), udg_hTheHashtable )
//call AddSpecialEffectLocBJ( p, "Abilities\\Weapons\\Rifle\\RifleImpact.mdl" )
call AddSpecialEffectTargetUnitBJ("head", GetTriggerUnit(), "Abilities\\Weapons\\Rifle\\RifleImpact.mdl")
call DestroyEff1(GetLastCreatedEffectBJ(), 1)
set d = 2*I2R(GetUnitAbilityLevelSwapped('A004', GetAttacker())) + (1 + I2R(GetUnitAbilityLevelSwapped('A004', GetAttacker()))/25) * I2R(GetHeroStatBJ(bj_HEROSTAT_AGI, GetAttacker(), true))
// unit whichUnit, unit target, real amount, attacktype whichAttack, damagetype whichDamage
call UnitDamageTargetBJ(GetAttacker(), GetTriggerUnit(), d, ATTACK_TYPE_MELEE, DAMAGE_TYPE_NORMAL)
endif
endfunction
//===========================================================================
function InitTrig_Mortarshot2_Kopieren takes nothing returns nothing
set gg_trg_Mortarshot2_Kopieren = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Mortarshot2_Kopieren, EVENT_PLAYER_UNIT_ATTACKED )
call TriggerAddAction( gg_trg_Mortarshot2_Kopieren, function Trig_Mortarshot2_Kopieren_Actions )
endfunction
function Trig_PowerShield01_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00W' ) ) then
return false
endif
return true
endfunction
function Trig_PowerShield01_Actions takes nothing returns nothing
local real d
local timer t = CreateTimer()
set d = 10 + 2*I2R(GetUnitAbilityLevelSwapped('A00W', GetTriggerUnit())) + (0.75 + I2R(GetUnitAbilityLevelSwapped('A00W', GetTriggerUnit()))/20) * I2R(GetHeroStatBJ(bj_HEROSTAT_INT, GetTriggerUnit(), true))
call SaveRealBJ( d, udg_hWordShieldAmount, GetHandleIdBJ(GetSpellTargetUnit()), udg_hTheHashtable )
call SaveUnitHandle( udg_hTheHashtable, GetHandleId(t), 1, GetSpellTargetUnit() )
call TimerStart(t, 20, false, function EndShield1)
set t = null
endfunction
//===========================================================================
function InitTrig_PowerShield01 takes nothing returns nothing
set gg_trg_PowerShield01 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_PowerShield01, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_PowerShield01, Condition( function Trig_PowerShield01_Conditions ) )
call TriggerAddAction( gg_trg_PowerShield01, function Trig_PowerShield01_Actions )
endfunction