function Fireball_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'ANfb'
endfunction
function Trig_Fireball_Copy_Func001C takes nothing returns boolean
return UnitHasItemOfTypeBJ(GetTriggerUnit(), 'ratf') == true
endfunction
function Trig_Fireball_Copy_Actions takes nothing returns nothing
local real FireballDamage
if ( Trig_Fireball_Copy_Func001C() ) then
set FireballDamage = ( ( 50.00 + ( 30.00 * I2R(GetUnitAbilityLevelSwapped('ANfb', GetTriggerUnit())) ) ) + 15.00 )
else
set FireballDamage = ( ( 50.00 + ( 30.00 * I2R(GetUnitAbilityLevelSwapped('ANfb', GetTriggerUnit())) ) ) + 0.00 )
endif
call UnitDamageTargetBJ( GetTriggerUnit(), GetSpellTargetUnit(), FireballDamage, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
endfunction
//===========================================================================
function Fireball takes nothing returns nothing
set gg_trg_Fireball_Copy = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Fireball_Copy, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Fireball_Copy, Condition( function Fireball_Conditions ) )
call TriggerAddAction( gg_trg_Fireball_Copy, function Fireball_Actions )
endfunction