|
发表于 2008-10-15 17:15:10
|
显示全部楼层
[jass]
function Trig_FlameBlade_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A006' ) ) then
return false
endif
return true
endfunction
function FlameBlade_ShockA takes nothing returns nothing
call CameraSetEQNoiseForPlayer(GetOwningPlayer(GetEnumUnit()) , 30)
endfunction
function FlameBlade_ShockB takes nothing returns nothing
call CameraClearNoiseForPlayer(GetEnumPlayer())
endfunction
// <------------------------------------ 隐藏宝具 ------------------------------------>
function FlameBlade_Extra takes location tp,location tp2 returns nothing
local integer i = - 10
local location tp3 = null
local unit u = null
local real angle = AngleBetweenPoints(tp2 , tp)
call CinematicFadeBJ(bj_CINEFADETYPE_FADEOUTIN,2,"ReplaceableTextures\\\\CameraMasks\\\\White_mask.blp",100,100,0,0)
loop
set i = i + 1
exitwhen i > 10
set tp3 = PolarProjectionBJ(tp2,I2R(20*i),angle+90.)
set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'h004',GetLocationX(tp3),GetLocationY(tp3),angle+90.)
call SetUnitTimeScale(u,.5)
call UnitApplyTimedLife(u,'BTLF',4)
set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'h005',GetLocationX(tp3),GetLocationY(tp3),angle+90.)
call SetUnitTimeScale(u,.75)
call UnitApplyTimedLife(u,'BTLF',4)
call RemoveLocation(tp3)
endloop
set u = CreateUnit(GetOwningPlayer(GetTriggerUnit()),'h001' ,GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()),0.00)
call SetUnitFacingToFaceLocTimed(u,tp,0)
call UnitAddAbility(u,'A007')
call SetUnitAbilityLevel(u,'A007',11)
call IssuePointOrderByIdLoc(u,852218,tp)
call UnitApplyTimedLife(u,'BTLF',1)
call PauseUnit(GetTriggerUnit(),false)
call SetUnitTimeScale(GetTriggerUnit(),1)
call TriggerSleepAction(2.5)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Human\\\\Invisibility\\\\InvisibilityTarget.mdl",GetTriggerUnit(),"right hand"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Human\\\\Invisibility\\\\InvisibilityTarget.mdl",GetTriggerUnit(),"left hand"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Human\\\\Invisibility\\\\InvisibilityTarget.mdl",GetTriggerUnit(),"weapon"))
call TriggerSleepAction(.5)
call ForForce(bj_FORCE_ALL_PLAYERS , function FlameBlade_ShockB)
call RemoveLocation(tp)
call RemoveLocation(tp2)
set tp = null
set tp2 = null
set tp3 = null
set u = null
endfunction
// <---------------------------------------- 隐藏宝具结束 --------------------------------->
function Trig_FlameBlade_Actions takes nothing returns nothing
local integer i = - 5
local location tp = GetSpellTargetLoc()
local location tp2 = GetUnitLoc(GetTriggerUnit())
local real angle = AngleBetweenPoints(tp2 , tp)
local unit u = null
// -------------------------------------------------------------------------
call TriggerSleepAction(.1)
// -------------------------------------------------------------------------
if (GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)<= 0) then
return
endif
// -------------------------------------------------------------------------
call PauseUnit(GetTriggerUnit(),true)
call SetUnitAnimation(GetTriggerUnit(),"Stand Ready")
call SetUnitTimeScale(GetTriggerUnit(),.1)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Other\\\\HealingSpray\\\\HealBottleMissile.mdl",GetTriggerUnit(),"right hand"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Human\\\\Invisibility\\\\InvisibilityTarget.mdl",GetTriggerUnit(),"right hand"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Other\\\\HealingSpray\\\\HealBottleMissile.mdl",GetTriggerUnit(),"left hand"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Human\\\\Invisibility\\\\InvisibilityTarget.mdl",GetTriggerUnit(),"left hand"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Other\\\\HealingSpray\\\\HealBottleMissile.mdl",GetTriggerUnit(),"weapon"))
// -------------------------------------------------------------------------
loop
set i = i + 1
exitwhen i > 5
set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),'h007',GetLocationX(tp2),GetLocationY(tp2),angle-(90+I2R(i*15)))
call SetUnitTimeScale(u,2)
call UnitApplyTimedLife(u,'BTLF',4)
endloop
// -------------------------------------------------------------------------
call TriggerSleepAction(2.4)
// -------------------------------------------------------------------------
if (GetUnitState(GetTriggerUnit(),UNIT_STATE_LIFE)<=0) then
return
endif
// -------------------------------------------------------------------------
set bj_wantDestroyGroup = true
call ForGroupBJ(GetUnitsInRangeOfLocAll(2000,tp2) , function FlameBlade_ShockA)
call SetUnitAnimation(GetTriggerUnit(),"attack slam")
// <------------------------------------ 隐藏宝具 ------------------------------------>
// (2==1)为某种条件,现为不成立。
if ( 2 == 1 ) then
set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h006' , GetUnitX(GetTriggerUnit()) , GetUnitY(GetTriggerUnit()) , 0)
call UnitApplyTimedLife(u , 'BTLF' , 4)
call TriggerSleepAction(.01)
set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h006' , GetUnitX(GetTriggerUnit()) + 10. , GetUnitY(GetTriggerUnit()) + 10. , 0)
call UnitApplyTimedLife(u , 'BTLF' , 1)
call TriggerSleepAction(.01)
set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h006' , GetUnitX(GetTriggerUnit()) - 10. , GetUnitY(GetTriggerUnit()) - 10. , 0)
call UnitApplyTimedLife(u , 'BTLF' , 1)
set i = - 5
loop
set i = i + 1
exitwhen i > 5
set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h007' , GetLocationX(tp2) , GetLocationY(tp2) , angle - ( 90 + I2R(i * 15) ))
call SetUnitTimeScale(u , 2)
call UnitApplyTimedLife(u , 'BTLF' , 4)
endloop
call TriggerSleepAction(.1)
set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h006' , GetUnitX(GetTriggerUnit()) , GetUnitY(GetTriggerUnit()) , 0)
call UnitApplyTimedLife(u , 'BTLF' , 1)
call TriggerSleepAction(.01)
set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h006' , GetUnitX(GetTriggerUnit()) + 10. , GetUnitY(GetTriggerUnit()) + 10. , 0)
call UnitApplyTimedLife(u , 'BTLF' , 1)
call TriggerSleepAction(.01)
set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h006' , GetUnitX(GetTriggerUnit()) - 10. , GetUnitY(GetTriggerUnit()) - 10. , 0)
call UnitApplyTimedLife(u , 'BTLF' , 1)
set i = - 5
loop
set i = i + 1
exitwhen i > 5
set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h007' , GetLocationX(tp2) , GetLocationY(tp2) , angle - ( 90 + I2R(i * 15) ))
call SetUnitTimeScale(u , 2)
call UnitApplyTimedLife(u , 'BTLF' , 4)
endloop
call TriggerSleepAction(.1)
set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h006' , GetUnitX(GetTriggerUnit()) , GetUnitY(GetTriggerUnit()) , 0)
call UnitApplyTimedLife(u , 'BTLF' , 1.4)
call TriggerSleepAction(.01)
set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h006' , GetUnitX(GetTriggerUnit()) + 10. , GetUnitY(GetTriggerUnit()) + 10. , 0)
call UnitApplyTimedLife(u , 'BTLF' , 1.4)
call TriggerSleepAction(.01)
set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h006' , GetUnitX(GetTriggerUnit()) - 10. , GetUnitY(GetTriggerUnit()) - 10. , 0)
call UnitApplyTimedLife(u , 'BTLF' , 1.4)
set i = - 5
loop
set i = i + 1
exitwhen i > 5
set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h007' , GetLocationX(tp2) , GetLocationY(tp2) , angle - ( 90 + I2R(i * 15) ))
call SetUnitTimeScale(u , 2)
call UnitApplyTimedLife(u , 'BTLF' , 4)
endloop
call TriggerSleepAction(1.5)
call FlameBlade_Extra(tp , tp2)
call RemoveLocation(tp)
call RemoveLocation(tp2)
set tp = null
set tp2 = null
set u = null
return
endif
// <---------------------------------------- 隐藏宝具结束 --------------------------------->
set i = 0
loop
set i = i + 1
exitwhen i > 10
set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h004' , GetLocationX(tp2) , GetLocationY(tp2) , angle + 85 + I2R(i))
call SetUnitTimeScale(u , .5)
call UnitApplyTimedLife(u , 'BTLF' , 4)
set u = CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE) , 'h005' , GetLocationX(tp2) , GetLocationY(tp2) , angle + 85 + I2R(i))
call SetUnitTimeScale(u , .75)
call UnitApplyTimedLife(u , 'BTLF' , 4)
endloop
// -------------------------------------------------------------------------
set u = CreateUnit(GetOwningPlayer(GetTriggerUnit()) , 'h001' , GetUnitX(GetTriggerUnit()) , GetUnitY(GetTriggerUnit()) , 0)
call SetUnitFacingToFaceLocTimed(u , tp , 0)
call UnitAddAbility(u , 'A007')
call SetUnitAbilityLevel(u , 'A007' , GetUnitAbilityLevel(GetTriggerUnit() , 'A006'))
call IssuePointOrderByIdLoc(u , 852218 , tp)
call UnitApplyTimedLife(u , 'BTLF' , 1)
// -------------------------------------------------------------------------
call PauseUnit(GetTriggerUnit() , false)
call SetUnitTimeScale(GetTriggerUnit() , 1)
call TriggerSleepAction(1.5)
call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Human\\\\Invisibility\\\\InvisibilityTarget.mdl" , GetTriggerUnit() , "right hand"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Human\\\\Invisibility\\\\InvisibilityTarget.mdl" , GetTriggerUnit() , "left hand"))
call DestroyEffect(AddSpecialEffectTarget("Abilities\\\\Spells\\\\Human\\\\Invisibility\\\\InvisibilityTarget.mdl" , GetTriggerUnit() , "weapon"))
call TriggerSleepAction(1.5)
// -------------------------------------------------------------------------
call ForForce(bj_FORCE_ALL_PLAYERS , function FlameBlade_ShockB)
// -------------------------------------------------------------------------
call RemoveLocation(tp)
call RemoveLocation(tp2)
set tp = null
set tp2 = null
set u = null
endfunction
//===========================================================================
function InitTrig_FlameBlade takes nothing returns nothing
set gg_trg_FlameBlade = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_FlameBlade , EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_FlameBlade , Condition(function Trig_FlameBlade_Conditions))
call TriggerAddAction(gg_trg_FlameBlade , function Trig_FlameBlade_Actions)
endfunction
[/jass]
刚好做了一个(完全就是t转j然后再写代码....),其实就是腐臭蜂群,如果想要做属性伤害就是叠圈圈判断是否在单位组中,在则不做动作,不在则伤害....... |
|