DotCastle BR™

[Spell] Triple Wave Lion_shield
Olá Visitante!, seja bem-vindo ao fórum oficial DotCastle BR™️.

Nosso fórum é dedicado á criadores e editores de mapas para Warcraft III através do World Editor.

Aqui você encontrará spells, systems, tutoriais e muito mais ao alcance de um clique.

Conecte-se agora mesmo para acessar livremente o nosso conteúdo.

Nossos 35 usuários já postaram um total de 92 mensagens.


Participe do fórum, é rápido e fácil

DotCastle BR™

[Spell] Triple Wave Lion_shield
Olá Visitante!, seja bem-vindo ao fórum oficial DotCastle BR™️.

Nosso fórum é dedicado á criadores e editores de mapas para Warcraft III através do World Editor.

Aqui você encontrará spells, systems, tutoriais e muito mais ao alcance de um clique.

Conecte-se agora mesmo para acessar livremente o nosso conteúdo.

Nossos 35 usuários já postaram um total de 92 mensagens.
DotCastle BR™
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.
DotCastle BR™

Conecte-se e apresente-se para receber 25 pontos!
Nossos 35 usuários já postaram o total de 92 mensagens!
O DotCastle BR™ está ativo a 3954 dias.
Ei Convidado, você postou 0 de 92 mensagens!
Participe postando suas dúvidas. Compartilhe seus projetos. O DotCastle BR™ tem prazer em ajudar!
Não deixe de conferir as regras do fórum.

Você não está conectado. Conecte-se ou registre-se

[Spell] Triple Wave

Ir para baixo  Mensagem [Página 1 de 1]

1[Spell] Triple Wave Empty [Spell] Triple Wave Sex Jul 05, 2013 6:45 pm

Hisoka

Hisoka
Administrador
Administrador

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):

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
Corpo do Script:

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
Download (Demo Map)
 - 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).

https://dotcastlebr.forumeiros.com

Ir para o topo  Mensagem [Página 1 de 1]

Permissões neste sub-fórum
Não podes responder a tópicos