|
楼主 |
发表于 2008-7-28 17:57:29
|
显示全部楼层
LS说话很好听
function Huth_3_0 takes nothing returns boolean
return Huth_3_1() and Huth_3_2()
endfunction
function Huth_3_3 takes nothing returns nothing
local unit u =udg_heroic[udg_h_1]
local unit e =GetEnumUnit()
call UnitDamageTarget( u, e, I2R(GetUnitAbilityLevel(u, 'Ara2')*5), false, true, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_SONIC, WEAPON_TYPE_ROCK_HEAVY_BASH )
call throw(e,bj_RADTODEG * Atan2(GetUnitY(e) - GetUnitY(u), GetUnitX(e) - GetUnitX(u)),36,6)
set u=null
set e=null
endfunction
function Huth_3_A takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit u=udg_heroic[udg_h_1]
local integer n=GetStoredInteger(udg_GC,I2S(H2I(t)),"n")
local integer ck_n=GetStoredInteger(udg_GC,I2S(H2I(t)),"ck_n")
local unit e1=I2U(GetStoredInteger(udg_GC,I2S(H2I(t)),"e1"))
local unit e2=I2U(GetStoredInteger(udg_GC,I2S(H2I(t)),"e2"))
local unit e3=I2U(GetStoredInteger(udg_GC,I2S(H2I(t)),"e3"))
local real x
local real y
call ForGroupBJ( GetUnitsInRangeOfLocMatching(400.00, GetUnitLoc(u), Condition(function Huth_3_0 )), function Huth_3_3 )
if n==20 then
call SetUnitAnimationByIndex( u, 21 )
else
endif
if ck_n==1 then
set ck_n=ck_n+1
call StoreInteger(udg_GC,I2S(H2I(t)), "ck_n",ck_n)
set x=GetUnitX(e1) + (50) * Cos(GetUnitFacing(e1)+180 * bj_DEGTORAD)
set y=GetUnitY(e1) + (50) * Sin(GetUnitFacing(e1)+180 * bj_DEGTORAD)
else
set ck_n=ck_n-1
call StoreInteger(udg_GC,I2S(H2I(t)), "ck_n",ck_n)
set x=GetUnitX(e1) + (50) * Cos(GetUnitFacing(e1) * bj_DEGTORAD)
set y=GetUnitY(e1) + (50) * Sin(GetUnitFacing(e1) * bj_DEGTORAD)
endif
call DisplayTextToPlayer( Player(0), 0, 0, I2S(ck_n) )
if n>1 then
set n=n-1
call StoreInteger(udg_GC,I2S(H2I(t)), "n",n)
call SetUnitX(e1,x)
call SetUnitY(e1,y)
else
call FlushStoredMission(udg_GC,I2S(H2I(t)))
call IssueImmediateOrder( u, "stop" )
call DestroyTimer(t)
call RemoveUnit(e1)
call RemoveUnit(e2)
call RemoveUnit(e3)
call PauseUnit( u, false )
call SetUnitInvulnerable( u, false )
endif
set t=null
set u=null
set e1=null
set e2=null
set e3=null
endfunction
function Huth_3 takes nothing returns nothing
local timer t=GetExpiredTimer()
local unit u=udg_heroic[udg_h_1]
local unit e1=CreateUnit(Player(udg_h_1-1),'n001',GetUnitX(u),GetUnitY(u),0)
local unit e2=CreateUnit(Player(udg_h_1-1),'n002',GetUnitX(u),GetUnitY(u),0)
local unit e3=CreateUnit(Player(udg_h_1-1),'n001',GetUnitX(u),GetUnitY(u),0)
local real x=GetUnitX(e1) + (25) * Cos(GetUnitFacing(e1) * bj_DEGTORAD)
local real y=GetUnitY(e1) + (25) * Sin(GetUnitFacing(e1) * bj_DEGTORAD)
call SetUnitVertexColor(e1, 255, 255, 255, 100)
call SetUnitX(e1,x)
call SetUnitY(e1,y)
call StoreInteger(udg_GC,I2S(H2I(t)), "n", 36)
call StoreInteger(udg_GC,I2S(H2I(t)), "ck_n", 1)
call StoreInteger(udg_GC,I2S(H2I(t)), "e1", H2I(e1))
call StoreInteger(udg_GC,I2S(H2I(t)), "e2", H2I(e2))
call StoreInteger(udg_GC,I2S(H2I(t)), "e3", H2I(e3))
call TimerStart(t,0.05,true,function Huth_3_A)
set t=null
set u=null
set e1=null
set e2=null
set e3=null
endfunction
function Trig_Huth_3_Actions takes nothing returns nothing
local timer t=CreateTimer()
call PauseUnit( udg_heroic[udg_h_1], true )
call SetUnitInvulnerable( udg_heroic[udg_h_1], true )
call SetUnitAnimationByIndex( udg_heroic[udg_h_1], 20 )
call TimerStart(t,0.7,false,function Huth_3)
endfunction
//===========================================================================
function InitTrig_Huth_3 takes nothing returns nothing
set gg_trg_Huth_3 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Huth_3, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Huth_3, Condition( function Trig_Huth_3_Conditions ) )
call TriggerAddAction( gg_trg_Huth_3, function Trig_Huth_3_Actions )
endfunction
这是混沌噩梦的T,写得很蹩脚吧,很混乱,这的确是学JASS几天就能写的程度,我没什么好炫耀的
但是这个在T都倒懂不懂的新手面前更混乱,而且也不是值得学习的榜样,我有必要拿出来误导新手么? |
|