献丑一下
崩山裂地斩.w3x
(25 KB, 下载次数: 112)
[jass]
scope Bsldz initializer Start
//*********************声明*********************
globals
hashtable hx = InitHashtable()
endglobals
//******************* 配置区*********************
//! textmacro Random takes Name,Type
function $Name$ takes rect RECT returns real
return GetRandomReal(GetRectMin$Type$(RECT), GetRectMax$Type$(RECT))
endfunction
//! endtextmacro
//! runtextmacro Random("RDX","X")
//! runtextmacro Random("RDY","Y")
function Distance takes real locAx,real locAy,real locBx,real locBy returns real
local real x = locBx - locAx
local real y= locBy- locAy
return SquareRoot(x * x + y * y)
endfunction
function Arc takes real y1,real y2,real x1,real x2 returns real
return (bj_RADTODEG* Atan2(y1-y2,x1-x2 ))
endfunction
//! textmacro XY takes Name,Function
function $Name$ takes real xx,real xxx,real xxxx returns real
return xx+xxx*$Function$/*cos*/(xxxx*bj_DEGTORAD)
endfunction
//! endtextmacro
//! runtextmacro XY("X","Cos")
//! runtextmacro XY("Y","Sin")
//******************* 技能执行*********************
function Spell_D takes nothing returns nothing
local integer i = GetHandleId(GetExpiredTimer())
local unit Hero = LoadUnitHandle(hx,i,1)
local unit u
local integer Loop = 0
local real S = LoadReal(hx,i,2)
local group g = CreateGroup()
loop
exitwhen Loop >30
set u = CreateUnit(GetOwningPlayer(Hero),/*这里的ewsp是岩浆马甲,需要修改*/'ewsp',/*
*/X(RDX(RectFromCenterSizeBJ/*
*/(Location(GetUnitX(Hero), GetUnitY(Hero)), 400.00, 400.00)),250,S),/*
*/Y(RDY(RectFromCenterSizeBJ/*
*/(Location(GetUnitX(Hero), GetUnitY(Hero)), 400.00, 400.00)),250,S),0)
call UnitApplyTimedLife( u, 'BHwe', 3 )
call SetUnitTimeScale( u, 0.5)
set Loop = Loop + 1
endloop
set g = GetUnitsInRangeOfLocAll(400.00, Location(X(GetUnitX(Hero),150,S), Y(GetUnitY(Hero),150,S)))
loop
set u = FirstOfGroup(g)
exitwhen u ==null
if(IsUnitAliveBJ(u) == true and IsUnitEnemy(u, GetOwningPlayer(Hero)) == true )then
call UnitDamageTarget( Hero, u, /*伤害数值100*/ 100.00, true, false, /*
*/ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS )
endif
call GroupRemoveUnit(g,u)
endloop
call DestroyGroup(g)
call SetUnitTimeScale( Hero, 1 )
call PauseUnit(Hero,false)
call FlushChildHashtable(hx,i)
call DestroyTimer(GetExpiredTimer())
set g = null
set u = null
set Hero = null
endfunction
function Spell_C takes nothing returns nothing
local integer i = GetHandleId(GetExpiredTimer())
local unit Hero = LoadUnitHandle(hx,i,1)
local timer t = CreateTimer()
local integer i2 = GetHandleId(t)
local real S = LoadReal(hx,i,2)
call CameraClearNoiseForPlayer( GetOwningPlayer(Hero) )
call SaveUnitHandle(hx,i2,1,Hero)
call SaveReal(hx,i2,2,S)
call TimerStart(t,1.5,false,function Spell_D)
set t = null
set Hero = null
call FlushChildHashtable(hx,i)
call DestroyTimer(GetExpiredTimer())
endfunction
function Spell_B takes nothing returns nothing
local integer i = GetHandleId(GetExpiredTimer())
local unit Hero = LoadUnitHandle(hx,i,1)
local real SpellPoinx = LoadReal(hx,i,2)
local real SpellPoiny = LoadReal(hx,i,3)
local real D= LoadReal(hx,i,4)
local real S = LoadReal(hx,i,5)
local integer T = LoadInteger(hx,i,6)
local real Height = LoadReal(hx,i,7)
local timer t = CreateTimer()
local integer i2 = GetHandleId(t)
local integer Loop = 0
local unit u
local group g = CreateGroup()
if(T <= 35) then
call PauseUnit(Hero,true)
call SetUnitX(Hero,X(GetUnitX(Hero),D,S))
call SetUnitY(Hero,Y(GetUnitY(Hero),D,S))
set T = T + 1
set Height = Height + 1
call SetUnitFlyHeight( Hero, -1*Pow(Height, 2)+300, 0.00 )
call SaveReal(hx,i,7,Height)
call SaveInteger(hx,i,6,T)
else
call PauseTimer(GetExpiredTimer())
call SetUnitPathing( Hero, true )
call SetUnitFlyHeight( Hero, 0, 0.00 )
call DestroyEffect( /*
*/AddSpecialEffect/*
*/("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl", /*
*/X(GetUnitX(Hero),90,S),Y(GetUnitY(Hero),150,S)) )
call TerrainDeformationRippleBJ( 1.50, true, /*
*/Location(X(GetUnitX(Hero),90,S),Y(GetUnitY(Hero),150,S)),/*
*/128.00, 512.00, 64.00, 0.50, 256.00 )
loop
exitwhen Loop >= 4
call DestroyEffect( /*
*/AddSpecialEffect/*
*/("Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl", /*
*/X(RDX(RectFromCenterSizeBJ/*
*/(Location(GetUnitX(Hero), GetUnitY(Hero)), 400.00, 400.00)),250,S),/*
*/Y(RDY(RectFromCenterSizeBJ/*
*/(Location(GetUnitX(Hero), GetUnitY(Hero)), 400.00, 400.00)),250,S)))
set Loop = Loop + 1
endloop
set g = GetUnitsInRangeOfLocAll(400.00, Location(X(GetUnitX(Hero),150,S), Y(GetUnitY(Hero),150,S)))
loop
set u = FirstOfGroup(g)
exitwhen u ==null
if(IsUnitAliveBJ(u) == true and IsUnitEnemy(u, GetOwningPlayer(Hero)) == true )then
call UnitDamageTarget( Hero, u, /*伤害数值200*/200.00, true, false, /*
*/ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS )
endif
call GroupRemoveUnit(g,u)
endloop
set u = CreateUnit(GetOwningPlayer(Hero),/*这里的e000为眩晕技能马甲*/'e000',X(GetUnitX(Hero),150,S), Y(GetUnitY(Hero),150,S),0)
call UnitApplyTimedLife( u, 'BHwe', 3 )
call IssueImmediateOrder( u, "stomp" )
call CameraSetEQNoiseForPlayer( GetOwningPlayer(Hero), 100.00 )
call SetUnitTimeScale( Hero, 0 )
call SaveUnitHandle(hx,i2,1,Hero)
call SaveReal(hx,i2,2,S)
call TimerStart(t,0.5,false,function Spell_C)
call FlushChildHashtable(hx,i)
call DestroyTimer(GetExpiredTimer())
endif
call DestroyGroup(g)
set g = null
set Hero = null
endfunction
function Spell_A takes nothing returns nothing
local timer t = CreateTimer()
local integer i = GetHandleId(t)
local unit u = GetTriggerUnit()
local real x = GetLocationX(GetSpellTargetLoc())
local real y = GetLocationY(GetSpellTargetLoc())
local real D = Distance(GetUnitX(u),GetUnitY(u),x,y)/42
local real S = Arc(y,GetUnitY(u),x,GetUnitX(u))
local real H = -20
if ( GetSpellAbilityId() == /*A001为主要技能ID*/'A001' ) then
call SetUnitTimeScale( u, 0.67 )
call SetUnitPathing( u, false )
call UnitAddAbility( u, 'Amrf' )
call UnitRemoveAbility( u, 'Amrf' )
call FlushChildHashtable(hx,i)
call SaveUnitHandle(hx,i,1,u)
call SaveReal(hx,i,2,x)
call SaveReal(hx,i,3,y)
call SaveReal(hx,i,4,D)
call SaveReal(hx,i,5,S)
call SaveReal(hx,i,7,H)
call TimerStart(t,0.02,true,function Spell_B)
endif
set t = null
set u = null
endfunction
//******************* 初始化*********************
function Start takes nothing returns nothing
local trigger T = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( T, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( T, function Spell_A)
set T = null
endfunction
endscope
[/jass] |