|
范围伤害版:
- function Trig_wdz_Conditions takes nothing returns boolean
- return ((GetSpellAbilityId()=='A0MO'))
- endfunction
- function Trig_wdz_Func012002003 takes nothing returns boolean
- if IsUnitAliveBJ(GetFilterUnit()) and IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(udg_wdz_danwei[1])) and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false then
- call UnitDamageTargetBJ(udg_wdz_danwei[1],GetFilterUnit(),(((udg_LiShi_FuSheng_WD[1]*10.00)+(udg_LiShi_FuSheng_WD[2]*10.00))+(udg_LiShi_FuSheng_WD[3]*10.00)),ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNIVERSAL)
- endif
- return false
- endfunction
- function MoveLocationOfLoc takes location loc1,location loc2 ,boolean bool returns nothing
- call MoveLocation(loc1,GetLocationX(loc2),GetLocationY(loc2))
- if bool then
- call RemoveLocation(loc2)
- endif
- endfunction
- function Trig_wdz_Actions takes nothing returns nothing
- local location loc1=Location(0,0)
- local location loc2=Location(0,0)
- set udg_wdz_danwei[1]=GetTriggerUnit()
- set udg_wdz_danwei[2]=GetSpellTargetUnit()
- set udg_LiShi_FuSheng_WD[1]=I2R(GetHeroStr(GetTriggerUnit(), true))
- set udg_LiShi_FuSheng_WD[2]=I2R(GetHeroAgi(GetTriggerUnit(), true))
- set udg_LiShi_FuSheng_WD[3]=I2R(GetHeroInt(GetTriggerUnit(), true))
- call TriggerSleepAction(0.20)
- call PauseUnitBJ(true,udg_wdz_danwei[1])
- call SetUnitInvulnerable(udg_wdz_danwei[1],true)
- call SetUnitTimeScalePercent(udg_wdz_danwei[1],300.00)
- call AddSpecialEffectTargetUnitBJ("chest",udg_wdz_danwei[1],"Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl")
- set udg_SFX[1]=GetLastCreatedEffectBJ()
- call MoveLocation(loc1,GetUnitX(udg_wdz_danwei[1]),GetUnitY(udg_wdz_danwei[1]))
- call MoveLocation(loc2,GetUnitX(udg_wdz_danwei[2]),GetUnitY(udg_wdz_danwei[2]))
- call MoveLocationOfLoc(loc1,PolarProjectionBJ(loc1,(DistanceBetweenPoints(loc1,loc2)+GetRandomReal(0.00,360.00)),AngleBetweenPoints(loc1,loc2)),TRUE)
- call SetUnitPositionLocFacingLocBJ(udg_wdz_danwei[1],loc1,loc2)
- call UnitDamageTargetBJ(udg_wdz_danwei[1],udg_wdz_danwei[2],(((udg_LiShi_FuSheng_WD[1]*10.00)+(udg_LiShi_FuSheng_WD[2]*10.00))+(udg_LiShi_FuSheng_WD[3]*10.00)),ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNIVERSAL)
- call SetUnitAnimation(udg_wdz_danwei[1],"Attack")
- if udg_wdz_zu==null then
- set udg_wdz_zu=CreateGroup()
- endif
- call GroupEnumUnitsInRange(udg_wdz_zu,GetUnitX(udg_wdz_danwei[2]),GetUnitY(udg_wdz_danwei[2]),300,Condition(function Trig_wdz_Func012002003))
- set bj_forLoopAIndex=1
- set bj_forLoopAIndexEnd=(GetUnitAbilityLevelSwapped('A0MO',udg_wdz_danwei[1])*4)
- loop
- exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
- call TriggerSleepAction(0.20)
- call MoveLocation(loc1,GetUnitX(udg_wdz_danwei[1]),GetUnitY(udg_wdz_danwei[1]))
- call MoveLocation(loc2,GetUnitX(udg_wdz_danwei[2]),GetUnitY(udg_wdz_danwei[2]))
- call MoveLocationOfLoc(loc1,PolarProjectionBJ(loc1,(DistanceBetweenPoints(loc1,loc2)+GetRandomReal(0.00,360.00)),AngleBetweenPoints(loc1,loc2)),TRUE)
- call SetUnitPositionLocFacingLocBJ(udg_wdz_danwei[1],loc1,loc2)
- call GroupEnumUnitsInRange(udg_wdz_zu,GetUnitX(udg_wdz_danwei[2]),GetUnitY(udg_wdz_danwei[2]),300,Condition(function Trig_wdz_Func012002003))
- call SetUnitAnimation(udg_wdz_danwei[1],"Attack")
- call AddSpecialEffectTargetUnitBJ("overhead",udg_wdz_danwei[2],"Abilities\\Spells\\Human\\Thunderclap\\ThunderclapTarget.mdl")
- call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",GetUnitX(udg_wdz_danwei[2]),GetUnitY(udg_wdz_danwei[2])))
- set udg_SFX[2]=GetLastCreatedEffectBJ()
- call PauseUnitBJ(true,udg_wdz_danwei[2])
- call TriggerSleepAction(0.01)
- call DestroyEffectBJ(udg_SFX[2])
- call PauseUnitBJ(false,udg_wdz_danwei[2])
- set bj_forLoopAIndex=bj_forLoopAIndex+1
- endloop
- call SetUnitTimeScalePercent(udg_wdz_danwei[1],100.00)
- call PauseUnitBJ(false,udg_wdz_danwei[1])
- call SetUnitAnimation(udg_wdz_danwei[1],"Stand Ready")
- call SetUnitInvulnerable(udg_wdz_danwei[1],false)
- call DestroyEffectBJ(udg_SFX[1])
- call RemoveLocation(loc1)
- call RemoveLocation(loc2)
- set loc1=null
- set loc2=null
- endfunction
- function InitTrig_wdz takes nothing returns nothing
- set gg_trg_wdz=CreateTrigger()
- call TriggerRegisterAnyUnitEventBJ(gg_trg_wdz,EVENT_PLAYER_UNIT_SPELL_EFFECT)
- call TriggerAddCondition(gg_trg_wdz,Condition(function Trig_wdz_Conditions))
- call TriggerAddAction(gg_trg_wdz,function Trig_wdz_Actions)
- endfunction
复制代码
单体伤害版:
- function Trig_wdz_Conditions takes nothing returns boolean
- return ((GetSpellAbilityId()=='A0MO'))
- endfunction
- function Trig_wdz_Func012002003001 takes nothing returns boolean
- return (IsUnitAliveBJ(GetFilterUnit())==true)
- endfunction
- function Trig_wdz_Func012002003002001 takes nothing returns boolean
- return (IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(udg_wdz_danwei[1]))==true)
- endfunction
- function Trig_wdz_Func012002003002002 takes nothing returns boolean
- return (IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false)
- endfunction
- function Trig_wdz_Func012002003002 takes nothing returns boolean
- return GetBooleanAnd(Trig_wdz_Func012002003002001(),Trig_wdz_Func012002003002002())
- endfunction
- function Trig_wdz_Func012002003 takes nothing returns boolean
- return GetBooleanAnd(Trig_wdz_Func012002003001(),Trig_wdz_Func012002003002())
- endfunction
- function Trig_wdz_Func013Func001C takes nothing returns boolean
- if (not (CountUnitsInGroup(udg_wdz_zu)>=1)) then
- return false
- endif
- return true
- endfunction
- function Trig_wdz_Actions takes nothing returns nothing
- set udg_wdz_danwei[1]=GetTriggerUnit()
- set udg_wdz_danwei[2]=GetSpellTargetUnit()
- set udg_LiShi_FuSheng_WD[1]=I2R(GetHeroStr(GetTriggerUnit(), true))
- set udg_LiShi_FuSheng_WD[2]=I2R(GetHeroAgi(GetTriggerUnit(), true))
- set udg_LiShi_FuSheng_WD[3]=I2R(GetHeroInt(GetTriggerUnit(), true))
- call TriggerSleepAction(0.20)
- call PauseUnitBJ(true,udg_wdz_danwei[1])
- call SetUnitInvulnerable(udg_wdz_danwei[1],true)
- call SetUnitTimeScalePercent(udg_wdz_danwei[1],300.00)
- call AddSpecialEffectTargetUnitBJ("chest",udg_wdz_danwei[1],"Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl")
- set udg_SFX[1]=GetLastCreatedEffectBJ()
- call SetUnitPositionLocFacingLocBJ(udg_wdz_danwei[1],PolarProjectionBJ(GetUnitLoc(udg_wdz_danwei[1]),(DistanceBetweenPoints(GetUnitLoc(udg_wdz_danwei[1]),GetUnitLoc(udg_wdz_danwei[2]))+GetRandomReal(0.00,360.00)),AngleBetweenPoints(GetUnitLoc(udg_wdz_danwei[1]),GetUnitLoc(udg_wdz_danwei[2]))),GetUnitLoc(udg_wdz_danwei[2]))
- call UnitDamageTargetBJ(udg_wdz_danwei[1],udg_wdz_danwei[2],(((udg_LiShi_FuSheng_WD[1]*10.00)+(udg_LiShi_FuSheng_WD[2]*10.00))+(udg_LiShi_FuSheng_WD[3]*10.00)),ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNIVERSAL)
- call SetUnitAnimation(udg_wdz_danwei[1],"Attack")
- set udg_wdz_zu=GetUnitsInRangeOfLocMatching(600.00,GetUnitLoc(udg_wdz_danwei[1]),Condition(function Trig_wdz_Func012002003))
- set bj_forLoopAIndex=1
- set bj_forLoopAIndexEnd=(GetUnitAbilityLevelSwapped('A0MO',udg_wdz_danwei[1])*4)
- loop
- exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
- if (Trig_wdz_Func013Func001C()) then
- call TriggerSleepAction(0.20)
- set udg_wdz_danwei[3]=GroupPickRandomUnit(udg_wdz_zu)
- call SetUnitPositionLocFacingLocBJ(udg_wdz_danwei[1],PolarProjectionBJ(GetUnitLoc(udg_wdz_danwei[1]),(DistanceBetweenPoints(GetUnitLoc(udg_wdz_danwei[1]),GetUnitLoc(udg_wdz_danwei[3]))+GetRandomReal(0.00,360.00)),AngleBetweenPoints(GetUnitLoc(udg_wdz_danwei[1]),GetUnitLoc(udg_wdz_danwei[3]))),GetUnitLoc(udg_wdz_danwei[3]))
- call SetUnitAnimation(udg_wdz_danwei[1],"Attack")
- call UnitDamageTargetBJ(udg_wdz_danwei[1],udg_wdz_danwei[3],( ( ( udg_LiShi_FuSheng_WD[1] * 10.00 ) + ( udg_LiShi_FuSheng_WD[2] * 10.00 ) ) + ( udg_LiShi_FuSheng_WD[3] * 10.00 ) ),ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNIVERSAL)
- call AddSpecialEffectTargetUnitBJ("overhead",udg_wdz_danwei[3],"Abilities\\Spells\\Human\\Thunderclap\\ThunderclapTarget.mdl")
- call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\Thunderclap\\ThunderClapCaster.mdl",GetUnitX(udg_wdz_danwei[3]),GetUnitY(udg_wdz_danwei[3])))
- set udg_SFX[2]=GetLastCreatedEffectBJ()
- call PauseUnitBJ(true,udg_wdz_danwei[3])
- call TriggerSleepAction(0.01)
- call DestroyEffectBJ(udg_SFX[2])
- call PauseUnitBJ(false,udg_wdz_danwei[3])
- else
- call DoNothing()
- endif
- set bj_forLoopAIndex=bj_forLoopAIndex+1
- endloop
- call SetUnitTimeScalePercent(udg_wdz_danwei[1],100.00)
- call PauseUnitBJ(false,udg_wdz_danwei[1])
- call SetUnitAnimation(udg_wdz_danwei[1],"Stand Ready")
- call SetUnitInvulnerable(udg_wdz_danwei[1],false)
- call DestroyEffectBJ(udg_SFX[1])
- endfunction
- function InitTrig_wdz takes nothing returns nothing
- set gg_trg_wdz=CreateTrigger()
- call TriggerRegisterAnyUnitEventBJ(gg_trg_wdz,EVENT_PLAYER_UNIT_SPELL_EFFECT)
- call TriggerAddCondition(gg_trg_wdz,Condition(function Trig_wdz_Conditions))
- call TriggerAddAction(gg_trg_wdz,function Trig_wdz_Actions)
- endfunction
复制代码
从某张技能演示地图中获得的代码 稍微加工了1下 关联了属性伤害 献给需要的人
|
|