|
发表于 2010-4-16 01:13:35
|
显示全部楼层
[jass]
function Trig_Skill_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A011'
endfunction
function Trig_SkillZG_Func takes nothing returns nothing
call UnitDamageTarget( GetTriggerUnit(), GetEnumUnit(), ( 80.00 + ( 65.00 * I2R(GetUnitAbilityLevel(GetTriggerUnit(), 'A011')) ) ), false, false, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_LIGHTNING, WEAPON_TYPE_WHOKNOWS )
if(UnitHasItemOfTypeBJ(GetTriggerUnit(), 'I007') == true) then
call UnitDamageTarget( GetTriggerUnit(), GetEnumUnit(), 100.00, false, false, ATTACK_TYPE_HERO, DAMAGE_TYPE_DIVINE, WEAPON_TYPE_WHOKNOWS )
call DestroyEffect( AddSpecialEffect ( "Abilities\\\\Weapons\\\\PhoenixMissile\\\\Phoenix_Missile.mdl", GetUnitX(GetEnumUnit()),GetUnitY(GetEnumUnit()))) //区分持有物品发动技能时添加的特效不想要就删了吧.........
endif
endfunction
function Trig_condition_zg takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(),GetTriggerPlayer()) and GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE)>0.00
endfunction
function Trig_SkillZG_Actions takes nothing returns nothing
local unit u = GetSpellTargetUnit()
local group g=CreateGroup()
call IssueTargetOrder( CreateUnit(GetTriggerPlayer(), 'h00O', GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()), 0), "thunderbolt", u )
call GroupEnumUnitsInRange(g,GetUnitX(u),GetUnitY(u),500,Condition(function Trig_condition_zg))
call ForGroup(g, function Trig_SkillZG_Func )
call DestroyGroup(g)
set u=null
set g=null
endfunction
//===========================================================================
function InitTrig_Skill takes nothing returns nothing
set gg_trg_Skill = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Skill, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Skill, Condition( function Trig_Skill_Conditions ) )
call TriggerAddAction( gg_trg_Skill, function Trig_SkillZG_Actions )
endfunction
[/jass] |
|