Spell Rupture - Dota

Romek

Super Moderator
Reaction score
964
> 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.
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/
  • The Helper The Helper:
    I think we need to add something to the bottom of the front page that shows the Headline News forum that has a link to go to the News Forum Index so people can see there is more news. Do you guys see what I am saying, lets say you read all the articles on the front page and you get to the end and it just ends, no kind of link for MOAR!
  • The Helper The Helper:
    Happy Wednesday!
    +1

      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