No Idea. Spell

Crazy_Dead

New Member
Reaction score
24
In an another thread i was asking for an channeling spell idea, and sir Executor came up with this awsome idea, for my Blood Hunter Worgen.

When an enemy with under (30/33/35)% hp is in (2000/2750/3500) range the blood hunters no-target ultimate can be activated.
He takes (4/3.2/2.2) seconds channeling standing to get in a bloodlust turning his whole body slowly red and he starts to run with incredible speed (500/600/700) towards the target.
While running, colliding enemies will be hit and they start to bleed, reducing their ms and as by 15% for 4 seconds, aswell as 25 dps.
On reaching the target the blood hunter strikes it and lets it bleed, reducing his ms and as by (20/25/30)% and dealing (25/35/50) dps over 4 seconds.

The problem is: I got no idea on how to make this. No idea. Group Enum, Check Hps.

Can someone help me?
Thanks.

Greetz Crazy.
 

the Immortal

I know, I know...
Reaction score
51
Atop of my mind:

1. After a hero learns the spell, either do a periodic check for units in range of him (every 1 second or so should be enough, OR make 2 triggers (1. when unit takes damage, if he is near the hero and life below treshold, activate ulti; 2nd - unit enters in range of hero, if his life is below treshold, activate ulti)

2. How to make it activatable? Make a dummy invisible/locust/invlun unit, name it something like "a wounded enemy" and add it as a prerequisite for the spell. When the ulti can be activated (see first paragraph), create such a unit for the owner of the hero.

3. Once activated, start a low-frequency periodic timer (T32 <3), set caster animation and move him every tick towards the victim, and either enum units every few ticks, or use unit enters range event.

4. On colission apply debuffs and dps and such. Should be fairly easy compared to the rest =D


A nice complex spell. I would love doing it, actually, though I have the habit to never finish anything.
 

Bribe

vJass errors are legion
Reaction score
67
Crazy_Dead, one of your biggest problems right now is that you ask for the whole construction seemingly without trying it yourself and knocking one or two of those parts out or at least publishing your half-completed work.

You'll get more reception if you ask for a mere one thing at a time instead of bring us a list.
 

Crazy_Dead

New Member
Reaction score
24
Ask for one thing. Yup, Bribe, you're right. The problem is that i got no idea HOW to make the spell. I just cant get an idea.

Moving, bleeding, damaging, coloring. Nope, Sine, cant get it to work. :( :thdown:
 

Executor

I see you
Reaction score
57
Basically that's all relativly easy. You only have to code the spell part for part..

Start with a timer which periodically checks all enemy heroes in range.. but only if the spell has be learned.
 

Crazy_Dead

New Member
Reaction score
24
Tadah, as i suggested

But the problem, is that i get this:

JASS:
library RunningBlood initializer Init requires Damage
globals

    private constant integer SpellID = &#039;A010&#039;
    private constant real Aura = 1250.
    private constant real Channel = 1.25
    private constant real RunTime = 5.5

    public unit Caster = GetTriggerUnit( )
    public unit Targets = GetEnumUnit( )
    public group UnitGroup = CreateGroup( )
    real CasterX = GetUnitX(Caster)
    real CasterY = GetUnitY(Caster)
    real TargetX = GetUnitX(Targets)
    real TargetY = GetUnitY(Targets)
    private boolean first
endglobals

private constant function DMG takes integer LeVeL returns real
    return 12.5 * LeVeL * LeVeL - 12.5 * LeVeL + 25.
endfunction

private constant function ChannelTime takes integer level returns real
    return 1.25 * level * level
endfunction

private constant function Auraa takes integer lvl returns real
    return 950. * lvl
endfunction

private constant function UnderHP takes integer leb returns real
    return  - 0.5 * leb * leb + 4.5 * leb + 26
endfunction

function Check takes nothing returns boolean
    local unit u = GetFilterUnit()
    
    if IsUnitEnemy(u, GetOwningPlayer(HERO)) and GetWidgetLife(u)/GetUnitState(u, UNIT_STATE_MAX_LIFE) &lt; 0.3 then
        //DoStuff
    endif
    
    return false
endfunction

function Start takes nothing returns nothing
    call GroupEnumUnitsInRange(GROUP, GetUnitX(HERO), GetUnitY(HERO), 2500, function Check)
endfunction

private function Actions takes nothing returns nothing
    call UnitDamageTargetEx( Caster , Targets , DMG(GetUnitAbilityLevel(Caster, SpellID), true , true, ATTACK_TYPE_CHAOS , DAMAGE_TYPE_DIVINE , WEAPON_TYPE_METAL_LIGHT_SLICE)) 
    call AddEffect( &quot;DarkLigtning.mdx&quot;, TargetX,TargetY,0)
endfunction

private function Activate takes nothing returns nothing
    
endfunction

private function Cons takes nothing returns boolean
    return/*
    */ GetSpellAbilityId() == SpellID and/*
    */ GetWidgetLife(Targets) &lt;= UnderHP and not/*
    */ IsUnitType( Targets , UNIT_TYPE_HERO) and not/*
    */ IsUnitType( Targets , UNIT_TYPE_POLYMORPHED) and not/*
    */ IsUnitType( Targets , UNIT_TYPE_DEAD) and not/*
    */ IsUnitType( Targets , UNIT_TYPE_STRUCTURE)
endfunction


function Init takes nothing returns nothing
    local trigger Trigger = CreateTrigger( )
    call TriggerRegisterAnyUnitEventBJ( Trigger , EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition( Trigger , function Cons)
    call TriggerRegisterTimerEvent( Trigger , 0.00000000000000001 , true )
    call TriggerAddAction( Trigger , function Start)
endfunction


endlibrary


I fuck dont get anything to work anymore..
 

Bribe

vJass errors are legion
Reaction score
67
JASS:
library RunningBlood initializer Init requires Damage
    
native UnitAlive takes unit id returns boolean
    
globals
    private constant integer SpellID = &#039;A010&#039;
    private constant real Aura = 1250.
    private constant real Channel = 1.25
    private constant real RunTime = 5.5

    public unit Caster = null
    public unit Targets = null
    public group UnitGroup = CreateGroup( )
    
    private boolean first
    real CasterX
    real CasterY
    real TargetX
    real TargetY
endglobals
    
private constant function DMG takes integer level returns real
    return 12.5 * level * level - 12.5 * level + 25.
endfunction
private constant function ChannelTime takes integer level returns real
    return 1.25 * level * level
endfunction
private constant function Auraa takes integer lvl returns real
    return 950. * lvl
endfunction
private constant function UnderHP takes integer leb returns real
    return  - 0.5 * leb * leb + 4.5 * leb + 26
endfunction
    
function Check takes nothing returns boolean
    local unit u = GetFilterUnit()
    
    if IsUnitEnemy(u, GetOwningPlayer(Caster)) and UnitAlive(u) then
        //DoStuff
    endif
    
    set u=null
    return false
endfunction
    
function Start takes nothing returns nothing
    call GroupEnumUnitsInRange(GROUP, CasterX,CasterY, 2500., Filter(function Check))
endfunction
    
private function Actions takes nothing returns nothing
    set Caster=GetTriggerUnit()
    set TargetX=GetSpellTargetX()
    set TargetY=GetSpellTargetY()
    set CasterX=GetWidgetX(Caster)
    set CasterY=GetWidgetY(Caster)
    
    call UnitDamageTarget( Caster , Targets , DMG(GetUnitAbilityLevel(Caster, SpellID), true , false, ATTACK_TYPE_CHAOS , DAMAGE_TYPE_DIVINE , WEAPON_TYPE_METAL_LIGHT_SLICE)) 
    call AddSpecialEffect( &quot;DarkLigtning.mdx&quot;, TargetX,TargetY)
endfunction
    
    
private function Cons takes nothing returns boolean
    set Targets=GetSpellAbilityUnit()

    if GetSpellAbilityId() == SpellID and UnitAlive(Targets) and not IsUnitType( Targets , UNIT_TYPE_HERO) and not IsUnitType( Targets , UNIT_TYPE_POLYMORPHED) and not IsUnitType( Targets , UNIT_TYPE_STRUCTURE) then
        call Actions()
    endif
    return false
endfunction
    
function Init takes nothing returns nothing
    local trigger t = CreateTrigger( )
    call TriggerRegisterAnyUnitEventBJ( t , EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition( t , function Cons)
    
    call TimerStart(CreateTimer(),0.035,true,function Start)
endfunction
    
endlibrary
 

Executor

I see you
Reaction score
57
Well it is long ago that I coded my last channeling spell, but isn't [lJASS]EVENT_PLAYER_UNIT_SPELL_CHANNEL[/lJASS] the better event?

Btw. I suggest using GTrigger to you.
 

Bribe

vJass errors are legion
Reaction score
67
Yes, if it is a channeling spell. I thought this was (like most spells) just a cast-once spell :p
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
For channel spell, I suggest you attach the struct to caster and initialize end channeling event trigger. Else, if the spell is cooldownless, there will be bug.
 

Crazy_Dead

New Member
Reaction score
24
For channel spell, I suggest you attach the struct to caster and initialize end channeling even trigger. Else, if the spell is cooldownless, there will be bug.

Yeah, thanks for making this ever more difficultier.

So On Topic

@ Bribe

Your code, what does it mean?
I mean was that a fix or what?
 

Bribe

vJass errors are legion
Reaction score
67
What you'd benefit from is to get Subversion or basically any software that does a "compare to last save" function. Notepad++ does that.

Otherwise, just do an eyeball comparison to find the differences between the two. You'll notice, as someone else already pointed out, that you can' initialize values inside of the globals block, so I moved those. And I added the "UnitAlive" native and switched it in instead of your "GetUnitState" and "UNIT_TYPE_DEAD" stuff. I'd be happy to explain any one thing to you, but honestly you have to be the one to ask me specific questions. I don't like giving generic responses.
 

Bribe

vJass errors are legion
Reaction score
67
You require (more minerals) JASSHelper to save the map with the UnitAlive native in it, so yes, it's more or less vJass.

UnitAlive is found in the common.ai file, and is therefore not normally recognized by your map. I think this is the only useful native from the common.ai file (at least the only useful one I've seen).
 

Executor

I see you
Reaction score
57
Btw: Do not loop through all units in 2500 range.. Loop through all enemy heroes and check for distance and health ;)
My knowledge of arena map tells me, that there are enough creeps or summons which would be enumed too..
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top