|
本帖最后由 RoyalFlare 于 2014-12-6 17:07 编辑
- globals
- gamecache udg_Titans_Cache=null
- endglobals
- function H2I takes handle H returns integer
- return H
- return 0
- endfunction
- function I2U takes integer I returns unit
- return I
- return null
- endfunction
- function H2S takes handle H returns string
- return I2S(H2I(H))
- return null
- endfunction
- function FlushEx takes string MissionKey returns nothing
- call FlushStoredMission(udg_Titans_Cache,MissionKey)
- endfunction
- function SaveInteger takes string MissionKey,string Key,integer Value returns nothing
- call StoreInteger(udg_Titans_Cache,MissionKey,Key,Value)
- endfunction
- function SaveReal takes string MissionKey,string Key,real Value returns nothing
- call StoreReal(udg_Titans_Cache,MissionKey,Key,Value)
- endfunction
- function GetInteger takes string MissionKey,string Key returns integer
- return GetStoredInteger(udg_Titans_Cache,MissionKey,Key)
- endfunction
- function GetReal takes string MissionKey,string Key returns real
- return GetStoredReal(udg_Titans_Cache,MissionKey,Key)
- endfunction
- function BigCreviceRun takes nothing returns nothing
- local real Face
- local real x
- local real y
- local unit Unia
- local unit Unib
- local real NeedExtent=GetReal("BigCrevice"+H2S(GetExpiredTimer()),"NeedExtent")
- local real HoofExtent=GetReal("BigCrevice"+H2S(GetExpiredTimer()),"HoofExtent")
- if HoofExtent<NeedExtent then
- set Face=GetReal("BigCrevice"+H2S(GetExpiredTimer()),"Face")
- set x=GetReal("BigCrevice"+H2S(GetExpiredTimer()),"x")
- set y=GetReal("BigCrevice"+H2S(GetExpiredTimer()),"y")
- set Unia=I2U(GetInteger("BigCrevice"+H2S(GetExpiredTimer()),"Hero"))
- set Unib=CreateUnit(GetOwningPlayer(Unia),'u00B',x,y,0)
- call UnitAddAbility(Unib,'A0A0')
- call SetUnitAbilityLevel(Unib,'A0A0',GetUnitAbilityLevel(Unia,'A07Y'))
- call IssuePointOrderById(Unib,852224,x,y)
- call UnitApplyTimedLife(Unib,'BHwe',2)
- call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\TreantMissile\\TreantMissile.mdx",x,y))
- call DestroyEffect(AddSpecialEffect("Abilities\\Weapons\\AncientProtectorMissile\\AncientProtectorMissile.mdx",x,y))
- set x=x+80*Cos(Face*(3.14159/180))
- set y=y+80*Sin(Face*(3.14159/180))
- call SaveReal("BigCrevice"+H2S(GetExpiredTimer()),"x",x)
- call SaveReal("BigCrevice"+H2S(GetExpiredTimer()),"y",y)
- call SaveReal("BigCrevice"+H2S(GetExpiredTimer()),"HoofExtent",HoofExtent+80)
- set Unia=null
- set Unib=null
- else
- call FlushEx("BigCrevice"+H2S(GetExpiredTimer()))
- call PauseTimer(GetExpiredTimer())
- call DestroyTimer(GetExpiredTimer())
- endif
- endfunction
- function BigCrevice takes unit Unia,real x,real y returns nothing
- local timer Tima=CreateTimer()
- local real Face=(180/3.14159)*Atan2(y-GetUnitY(Unia),x-GetUnitX(Unia))
- call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",GetUnitX(Unia),GetUnitY(Unia)))
- call SaveReal("BigCrevice"+H2S(Tima),"NeedExtent",(GetUnitAbilityLevel(Unia,'A07Y')*100)+800)
- call SaveReal("BigCrevice"+H2S(Tima),"HoofExtent",0)
- call SaveReal("BigCrevice"+H2S(Tima),"Face",Face)
- call SaveReal("BigCrevice"+H2S(Tima),"x",GetUnitX(Unia)+64*Cos(Face*(3.14159/180)))
- call SaveReal("BigCrevice"+H2S(Tima),"y",GetUnitY(Unia)+64*Sin(Face*(3.14159/180)))
- call SaveInteger("BigCrevice"+H2S(Tima),"Hero",H2I(Unia))
- call TimerStart(Tima,0.03,true,function BigCreviceRun)
- set Tima=null
- endfunction
- //===========================================================================
- function InitTrig_Big_Crevice takes nothing returns nothing
- endfunction
复制代码
今天参考了louter的模拟火焰雨技能演示 照着格式摸索着写了1个撼地神牛的沟壑技能 如何捕捉马甲单位释放的技能命令并选取直线范围区域造成属性伤害?
游戏缓存真心伤不起
@希瓦 @chyj4747 @ckpig
|
|