Name | Type | is_array | initial_value |
Arcane_arrow_target | unit | No | |
be_AAhero | unit | Yes | |
be_AAheroface | integer | No | |
be_AAnum | integer | No | |
be_ADchain | integer | No | |
be_ADdummy | unit | Yes | |
be_ADhero | unit | Yes | |
be_ADpos | location | No | |
be_AEdummy | unit | No | |
be_AEdummy2 | unit | No | |
be_AEgroup | group | No | |
be_AEpos | location | No | |
be_AEtarget | location | No | |
be_ArVlocationcastingunit | location | No | |
be_ArVunitennemy500 | group | No | |
be_ATgroup | group | No | |
be_ATmana | real | No | |
be_ATplayer | force | No | |
be_ATwell | group | No | |
be_AVbasemana | real | No | |
be_CAnum | real | No | |
be_CDgroup | group | No | |
be_CDpoint | location | No | |
be_CoFgroup | group | No | |
be_EMcasterloc | location | No | |
be_EMdummy | unit | No | |
be_EMtargetloc | location | No | |
be_HNgroup | group | No | |
be_HNloc | location | No | |
be_MTgroup | group | No | |
be_SoEtargetpoint | location | No | |
be_SPpositioncaster | location | No | |
be_SPrangergroup | group | No | |
BloodElves | button | No | |
Continue | button | No | |
Ennemy | force | Yes | |
Ennemy2 | force | No | |
EnnemyLoop | integer | No | |
Forked_heal_area | group | No | |
Forked_heal_Point | location | No | |
Forked_Heal_target | unit | No | |
GroupEnnemy | force | No | |
Human | button | No | |
HumanReady | integer | No | |
Leave_Game | button | No | |
NbofHuman | integer | No | |
Nightelf | button | No | |
NumberEnnemyGroup | integer | No | |
NumberPlayerLose | integer | No | |
NumPlayer | integer | Yes | |
Orc | button | No | |
PickLoop | integer | No | |
PickRace | string | Yes | |
Player | player | Yes | |
PlayerLoop | integer | No | |
PlayerLoseLoop | integer | No | |
PlayerReady | boolean | Yes | |
Plose | boolean | Yes | |
Race | dialog | No | |
RaceLoop | integer | No | |
RaceType | string | Yes | |
StartLoc | location | Yes | |
Undead | button | No | |
UnitInvis | group | No | |
Win | dialog | No |
function Trig_MagicMissile_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A00W'
endfunction
function Trig_MagicMissile_Actions takes nothing returns nothing
local location casterloc = GetUnitLoc(GetSpellAbilityUnit())
local location targetloc = GetSpellTargetLoc()
local unit dummy
call UnitDamageTargetBJ( GetSpellAbilityUnit(), GetSpellAbilityUnit(), 200.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
call AddSpecialEffectTargetUnitBJ( "origin", GetSpellAbilityUnit(), "Abilities\\Spells\\Other\\Charm\\CharmTarget.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
// Dummy Caster
call CreateNUnitsAtLoc( 1, 'h01X', GetOwningPlayer(GetSpellAbilityUnit()), targetloc, bj_UNIT_FACING )
call UnitAddAbilityBJ( 'A00T', GetLastCreatedUnit() )
call UnitApplyTimedLifeBJ( 3.00, 'BTLF', GetLastCreatedUnit() )
set dummy = GetLastCreatedUnit()
// Waiting
call TriggerSleepAction( ( DistanceBetweenPoints(casterloc, targetloc) / 1000.00 ) )
// Take damage/effect
call AddSpecialEffectLocBJ( targetloc, "Objects\\Spawnmodels\\NightElf\\NEDeathMedium\\NEDeath.mdl" )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call IssueImmediateOrderBJ( dummy, "thunderclap" )
set dummy = null
call RemoveLocation( casterloc )
call RemoveLocation( targetloc )
endfunction
//===========================================================================
function InitTrig_MagicMissile takes nothing returns nothing
set gg_trg_MagicMissile = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MagicMissile, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_MagicMissile, Condition( function Trig_MagicMissile_Conditions ) )
call TriggerAddAction( gg_trg_MagicMissile, function Trig_MagicMissile_Actions )
endfunction