Descrição da Spell:
Lança três ondas de água em uma direção, causando danos á todos os inimigos atingidos no caminho.
Plataforma da Spell:
vJass
Requisitos:
JNGP (Jass New Generation Pack)
Setup (JESP):
- Open Source: pode ser aberto no World Editor.
JNGP (Link Externo)
- Página de download da ferramenta
- Instruções de uso e instalação na página de download (inglês).
Lança três ondas de água em uma direção, causando danos á todos os inimigos atingidos no caminho.
Plataforma da Spell:
vJass
Requisitos:
JNGP (Jass New Generation Pack)
Setup (JESP):
- Código:
module TripleWave_Setup
public static constant method DUMMY_RAWCODE takes nothing returns integer
return 'dumm'
endmethod
public static constant method SPELL_RAWCODE takes nothing returns integer
return 'A000'
endmethod
public static constant method DUMMY_SPELL_RAWCODE takes nothing returns integer
return 'A001'
endmethod
endmodule
- Código:
struct TripleWave extends array
implement TripleWave_Setup
private static method AngleAB takes location whichLocA,location whichLocB returns real
local location a = whichLocA
local location b = whichLocB
local real r = 180. / 3.14159 * Atan2(GetLocationY(b) - GetLocationY(a),GetLocationX(b) - GetLocationX(a))
call RemoveLocation(a)
call RemoveLocation(b)
set a = null
set b = null
return r
endmethod
private static method ProjectionX takes real realX,real whichDist,real whichAngle returns real
local real x = realX + whichDist * Cos(whichAngle * 3.14159 / 180.)
return x
endmethod
private static method ProjectionY takes real realY,real whichDist,real whichAngle returns real
local real y = realY + whichDist * Sin(whichAngle * 3.14159 / 180.)
return y
endmethod
private static method checkSpell takes nothing returns nothing
local unit u = null
local player p = null
local integer i = 0
local integer l = 0
local real x = 0.
local real y = 0.
local unit d = null
local location l1 = null
local location l2 = null
local real array xa
local real array ya
if GetSpellAbilityId()==SPELL_RAWCODE() then
set u = GetTriggerUnit()
set p = GetOwningPlayer(u)
set i = GetUnitAbilityLevel(u,GetSpellAbilityId())
set x = GetUnitX(u)
set y = GetUnitY(u)
set l1 = Location(x,y)
set l2 = GetSpellTargetLoc()
/*set xa[0] = ProjectionX(x,60.,AngleAB(l1,l2)+30)
set xa[1] = ProjectionX(x,60.,AngleAB(l1,l2)-30)
set ya[0] = ProjectionY(y,60.,AngleAB(l1,l2)+30)
set ya[1] = ProjectionY(y,60.,AngleAB(l1,l2)-30)*/
set xa[0] = ProjectionX(x,60.,GetUnitFacing(u)+30)
set xa[1] = ProjectionX(x,60.,GetUnitFacing(u)-30)
set ya[0] = ProjectionY(y,60.,GetUnitFacing(u)+30)
set ya[1] = ProjectionY(y,60.,GetUnitFacing(u)-30)
loop
set d = CreateUnit(p,DUMMY_RAWCODE(),x,y,GetUnitFacing(u))
call UnitApplyTimedLife(d,'BTLF',1.25)
call UnitAddAbility(d,DUMMY_SPELL_RAWCODE())
call SetUnitAbilityLevel(d,GetSpellAbilityId(),i)
call IssuePointOrder(d,"carrionswarm",xa[l],ya[l])
set d = null
set l = l + 1
exitwhen l == 2
endloop
call RemoveLocation(l2)
call RemoveLocation(l1)
set p = null
endif
set u = null
endmethod
private static method onInit takes nothing returns nothing
local trigger t = CreateTrigger()
local integer i = 0
loop
call TriggerRegisterPlayerUnitEvent(t,Player(i),ConvertPlayerUnitEvent(274),null)
set i = i + 1
exitwhen i == 12
endloop
call TriggerAddAction(t,function thistype.checkSpell)
set t = null
endmethod
endstruct
- Open Source: pode ser aberto no World Editor.
JNGP (Link Externo)
- Página de download da ferramenta
- Instruções de uso e instalação na página de download (inglês).