Spell Rupture - Dota

Romek

Super Moderator
Reaction score
963
> You don't need integer2real()?
You mean I2R?

He said you don't, so you don't. There's no point in asking "really?" after every comment someone makes. =|
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
If it's a multiplication between two numbers of which one is a real, the outcome is a real. So adding a dot behind the constant number seems quite a lot easier than converting the level from integer to real.
 

GetTriggerUnit-

DogEntrepreneur
Reaction score
129
I need the dang conversion somewhere. Otherwise it gives me and error.
Or I put the I2R(level) or I put it in the "Percent_Damage(i)"
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
You may need this :
JASS:
    if value > 0.00 then
        if value < 11. then//550(522 is maximum movement speed) * HAPPENNING
        //(Prevent dealing massive damage when unit teleports to other place or being slided!) 
            set dmg = value / d.percent
        else
            set dmg = 0.
        endif
        call UnitDamageTarget(d.caster, d.target, dmg, true, false, AT, DT, WEAPON_TYPE_WHOKNOWS)
        call DestroyEffect(AddSpecialEffect(BLOOD_EFFECT, d.nx, d.ny))
    endif
 

BRUTAL

I'm working
Reaction score
118
how are you having problems with the conversion : s
you did notice you have to put a decimal at the end of your integer numbers right ><
 

WolfieeifloW

WEHZ Helper
Reaction score
372
I'm pretty sure in DotA it does do damage based on Blink/Teleport distance?
So if you Blink/Teleport while Ruptured you take a lot of damage.
If not for teleport, I'm 99% sure it does for Blink.

EDIT: Ahh, that's what happened to me in one game :rolleyes: .
Thanks.
 

Angel_Island

Much long, many time, wow
Reaction score
56
I'm pretty sure in DotA it does do damage based on Blink/Teleport distance?
So if you Blink/Teleport while Ruptured you take a lot of damage.
If not for teleport, I'm 99% sure it does for Blink.

Only if you blink a very short distance. Otherwise it doesn't. Read the Rupture part at the bottom of the page here
 

Gtam

Lerning how to write and read!! Yeah.
Reaction score
164
I used antimage against bloodseeker and the blink when ruptured doesnt hurt for me. Once i ran with leoric then died under the effects of rupture the reincarnated and still had the buff but took no damage and the buff didnt disapear until bloodseeker ruptured me again
 

uberfoop

~=Admiral Stukov=~
Reaction score
177
The 200 per .25 seconds cap creates some extremely silly effects in DotA. To reach 200 in .25 seconds with lvl 1 rupture, a distance of 1000 must be travelled. At lvl 2, 500. And at lvl 3, 333.33. This means that at level 1, you have to teleport ~3 (due to walking) times farther than at level 3 to avoid damage, thus having the cap be structured in an extremely counterintuitive fashon.
 

Kenny

Back for now.
Reaction score
202
This still needs a little work for such a basic ability. I took the liberty to write up something "neater", do with it what you want, but i suggest you at least learn from it.

JASS:
scope Rupture

    globals
        private constant integer    ABIL_ID     = &#039;A000&#039; // Hero ability.
        private constant integer    ABIL2_ID    = &#039;A001&#039; // Dummy ability to place buff.
        private constant integer    DUMMY_ID    = &#039;buff&#039; // Dummy unit.
        private constant integer    BUFF_ID     = &#039;B002&#039; // Buff for dummy ability.
        private constant real       INTERVAL    = 0.02   // Interval for timer.
        private constant real       THRESHOLD   = 200.00 // Threshold for distance.
        private constant attacktype A_TYPE      = ATTACK_TYPE_CHAOS
        private constant damagetype D_TYPE      = DAMAGE_TYPE_UNIVERSAL
        private constant weapontype W_TYPE      = WEAPON_TYPE_WHOKNOWS
        private constant string     BLOOD_SFX   = &quot;Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl&quot;
        private constant string     BLOOD_POINT = &quot;origin&quot;
        private constant string     CAST_ORDER  = &quot;purge&quot;
    endglobals

    //---------------------------------------------------------------------\\
    private function InitialDamage takes integer lvl returns real
        return 50.00 + (100.00 * lvl)
    endfunction

    private function DamagePercent takes integer lvl returns real
        return 0.20 * lvl
    endfunction

    private function Duration takes integer lvl returns real
        return 3.00 + (2.00 * lvl)
    endfunction

    //---------------------------------------------------------------------\\
    //                                                                     \\
    //  DO NOT TOUCH PAST THIS POINT UNLESS YOU KNOW WHAT YOUR ARE DOING!  \\
    //                                                                     \\
    //---------------------------------------------------------------------\\
    
    private struct Data 
    
        unit    cast  = null
        unit    targ  = null
        real    targx = 0.00
        real    targy = 0.00
        real    time  = 0.00
        real    perc  = 0.00
        integer level = 0
        
        static thistype array D
        static integer  Total = 0
        static timer    Timer = null
        
        static method create takes nothing returns thistype
            local thistype d     = thistype.allocate()
            local unit     dummy = null
            
            set d.cast  = GetTriggerUnit()
            set d.targ  = GetSpellTargetUnit()
            set d.targx = GetUnitX(d.targ)
            set d.targy = GetUnitY(d.targ)
            set d.level = GetUnitAbilityLevel(d.cast,ABIL_ID)
            set d.time  = Duration(d.level)
            set d.perc  = DamagePercent(d.level)
            
            call UnitDamageTarget(d.cast,d.targ,InitialDamage(d.level),false,false,A_TYPE,D_TYPE,W_TYPE)
            set dummy = CreateUnit(GetOwningPlayer(d.cast),DUMMY_ID,d.targx,d.targy,0.00)
            call UnitAddAbility(dummy,ABIL2_ID)
            call SetUnitAbilityLevel(dummy,ABIL2_ID,d.level)
            call IssueTargetOrder(dummy,CAST_ORDER,d.targ)
            call UnitApplyTimedLife(dummy,&#039;BTLF&#039;,1.00)
            
            if .Total == 0 then
                call TimerStart(.Timer,INTERVAL,true,function thistype.periodic)
            endif
            set .D[.Total] = d
            set .Total = .Total + 1
            
            set dummy = null
            
            return d
        endmethod
        
        static method periodic takes nothing returns nothing
            local thistype d = 0
            local integer  i = 0
            local real     x = 0.00
            local real     y = 0.00
            local real     v = 0.00
            
            loop
                exitwhen i &gt;= .Total
                
                set d = .D<i>
                
                if d.time &lt;= 0.00 or GetWidgetLife(d.targ) &lt; 0.406 then
                    call d.destroy()
                    set .Total = .Total - 1
                    set .D<i> = .D[.Total]
                    set i = i - 1
                else
                    set x = GetUnitX(d.targ)
                    set y = GetUnitY(d.targ)
                    
                    set v = SquareRoot((x - d.targx) * (x - d.targx) + (y - d.targy) * (y - d.targy))
                    
                    if v &gt; THRESHOLD then
                        set v = 0.00
                    endif
                    
                   if v &gt; 1.00 then
                        call UnitDamageTarget(d.cast,d.targ,d.perc * v,false,false,A_TYPE,D_TYPE,W_TYPE)
                        if GetRandomInt(0,1) == 0 then
                            call DestroyEffect(AddSpecialEffectTarget(BLOOD_SFX,d.targ,BLOOD_POINT))
                        endif
                   endif  
                    
                    set d.targx = x
                    set d.targy = y
                    
                    set d.time = d.time - INTERVAL
                endif
                
                set i = i + 1
            endloop
            
            if .Total == 0 then
                call PauseTimer(.Timer)
            endif
        endmethod
        
        private method onDestroy takes nothing returns nothing
            call UnitRemoveAbility(.targ,BUFF_ID)
            set .cast = null
            set .targ = null
        endmethod
        
        static method conds takes nothing returns boolean
            return GetSpellAbilityId() == ABIL_ID
        endmethod
        
        static method onInit takes nothing returns nothing
            local trigger trig = CreateTrigger()
            
            set .Timer = CreateTimer()
            
            call TriggerRegisterAnyUnitEventBJ(trig,EVENT_PLAYER_UNIT_SPELL_EFFECT)
            call TriggerAddCondition(trig,Condition(function thistype.conds))
            call TriggerAddAction(trig,function thistype.create)
        endmethod
        
    endstruct

endscope
</i></i>


It requires Jasshelper 0.9.G.0 or higher, and nothing else, and it should work well.

Note: You need to specify the buff raw code as well, to ensure it gets removed properly.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top