Announcement

Collapse

Forum Rules

  • No flaming or derogatory remarks, directly or through insinuation.
  • No discussion, sharing or referencing illegal software such as hacks, keygen, cracks and pirated software.
  • No offensive contents, including but not limited to, racism, gore or pornography.
  • No excessive spam/meme, i.e. copious one liners in a short period of time, typing with all caps or posting meme responses (text/image).
  • No trolling, including but not limited to, flame incitation, user provocation or false information distribution.
  • No link spamming or signature advertisements for content not specific to Dota 2.
  • No Dota 2 key requests, sell, trade etc.
  • You may not create multiple accounts for any purpose, including ban evasion, unless expressly permitted by a moderator.

  • Please search before posting. One thread per issue. Do not create another thread if there is an existing one already.
  • Before posting anything, make sure you check out all sticky threads (e.g., this). Do not create new threads about closed ones.
  • It is extremely important that you post in correct forum section.

  • Balance discussion only in Misc.
  • All art related (such as hero model) feedbacks go to Art Feedback Forum.
  • All matchmaking feedback should go here: Matchmaking Feedback
  • All report/low priority issues should go here: Commend/Report/Ban Feedback
  • No specific workshop item feedback. These should go to workshop page of that item.
  • When posting in non-bugs section (such as this), use [Bugs], [Discussion] or [Suggestion] prefix in your thread name.



In case you object some action by a moderator, please contact him directly through PM and explain your concerns politely. If you are still unable to resolve the issue, contact an administrator. Do not drag these issues in public.



All rules are meant to augment common sense, please use them when not conflicted with aforementioned policies.
See more
See less

[Confirmed] Powershot lacks the slight damage reduction multiplier for trees

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Confirmed] Powershot lacks the slight damage reduction multiplier for trees

    Damage of the ability does not get diminished after hitting trees
    it should be getting diminished by 1% for each tree that has been hit before reaching the targeted unit.


    Easy repro:
    - Hit a melee creep from behind 5~10 trees
    > he'll receive 360 damage


    1% is not much, but still...

  • #2
    No JASS proof, ThoAppelsin? I am disappoint

    Comment


    • #3


      I had been warned not to... http://dev.dota2.com/showthread.php?...l=1#post523635
      But I'll do it anyway if you were enjoying it
      and I also was enjoying it that way anyway...


      Code:
      01  function Func2466 takes nothing returns boolean
      02    local trigger loc_trigger01=GetTriggeringTrigger()
      03    local integer loc_integer01=GetHandleId(loc_trigger01)
      04    local unit loc_unit01=(LoadUnitHandle(hashtable001,(loc_integer01),(45)))
      05    local real loc_real01=(LoadReal(hashtable001,(loc_integer01),(47)))
      06    local real loc_real02=(LoadReal(hashtable001,(loc_integer01),(48)))
      07    local real loc_real03=(LoadReal(hashtable001,(loc_integer01),(13)))
      08    local real loc_real04=(LoadReal(hashtable001,(loc_integer01),(20)))
      09    local integer loc_integer02=(LoadInteger(hashtable001,(loc_integer01),(354)))
      10    local integer loc_integer03=(LoadInteger(hashtable001,(loc_integer01),(355)))
      11    local group loc_group01=(LoadGroupHandle(hashtable001,(loc_integer01),(187)))
      12    local real loc_real05=Func0120(GetUnitX(loc_unit01)+(60*Pow(0.9,loc_integer03)*Pow(0.99,loc_integer02))*Cos(loc_real03))
      13    local real loc_real06=Func0122(GetUnitY(loc_unit01)+(60*Pow(0.9,loc_integer03)*Pow(0.99,loc_integer02))*Sin(loc_real03))
      14    local group loc_group02=Func0030()
      15    local real loc_real07
      16    if GetTriggerEvalCount(loc_trigger01)>2 then
      17      set loc_real07=150
      18    else
      19      set loc_real07=75
      20    endif
      21    call DestroyEffect(AddSpecialEffect("effects\\Tornado.mdx",loc_real05,loc_real06))
      22    set loc_integer02=loc_integer02+Func0170(loc_real05,loc_real06,75)
      23    call SaveInteger(hashtable001,(loc_integer01),(354),(loc_integer02))
      24    set group016=loc_group01
      25    set unit306=loc_unit01
      26    set real304=loc_real04
      27    set integer460=loc_integer02
      28    set integer461=loc_integer03
      29    set unit124=loc_unit01
      30    call GroupEnumUnitsInRange(loc_group02,loc_real05,loc_real06,loc_real07,Condition(function Func0281))
      31    call ForGroup(loc_group02,function Func2465)
      32    call Func0029(loc_group02)
      33    call SaveInteger(hashtable001,(loc_integer01),(355),(integer461))
      34    call SetUnitX(loc_unit01,loc_real05)
      35    call SetUnitY(loc_unit01,loc_real06)
      36    if GetTriggerEvalCount(loc_trigger01)>29 then
      37      call KillUnit(loc_unit01)
      38      call Func0029(loc_group01)
      39      call FlushChildHashtable(hashtable001,(loc_integer01))
      40      call Func0035(loc_trigger01)
      41    endif
      42    set loc_trigger01=null
      43    set loc_unit01=null
      44    set loc_group01=null
      45    set loc_group02=null
      46    return false
      47  endfunction

      This function here handles the Powershot arrow movement, grouping of eligible units and eligible trees.
      Focus on the line #22 on this one: Func0170 groups the tree-destructibles that fall into the rectangle that is centered upon (loc_real05, loc_real06) and has the width 150. In the end, it also returns the amount of trees it destroyed.
      So, basically, loc_integer02 counts the amount of the trees that has been destroyed.
      Then at line 27, integer460 is set to be loc_integer02


      Code:
      01  function Func2465 takes nothing returns nothing
      02    if IsUnitInGroup(GetEnumUnit(),group016)==false and GetUnitAbilityLevel(GetEnumUnit(),'Bcyc')==0 then
      03      call Func0109((unit306),(GetEnumUnit()),1,(((real304)*1.0))*Pow(0.9,(integer461))*Pow(0.99,(integer460)))
      04      call GroupAddUnit(group016,GetEnumUnit())
      05      set integer461=integer461+1
      06    endif
      07  endfunction
      ... followed up by this function, where the damage is being dealt in line 03.
      Func0109 is the damage dealing function, to GetEnumUnit() (Enumerated unit, unit that is being issued), type 1 damage (magic damage).
      real304 is set to [(40 + 80*lvl) * min(channeledDuration, 1)] at one of the previous functions
      our integer460 is there, which is the power of 0.99

      meaning that damage gets multiplied by 0.99 for every tree that has been destroyed

      Comment


      • #4
        I love reading obfuscated JASS, takes me back to the days of reversing the level-codes for the various TDs

        Perhaps as a way to alleviate DLRevan's concerns with JASS confusing the issue you could enclose the JASS proof in a spoiler of some variety if the forum supports it. Failing that, double-post up and post it there. It is always useful to have empirical proof of the issue.
        Last edited by Jarofdoom; 03-30-2013, 09:07 PM.

        Comment


        • #5
          I wish we had that...
          We have no [spoiler] tags here, though it really should be easy to get one. I think administrators here just don't want to have them here.

          And if it comes to requesting features, I would also like to have the [jass] tags that playdota has, which does auto-color-coding for the elements of the jass code and makes it easier to read, but that is even less likely to happen.

          Comment


          • #6
            You could write all the important info in the first post and add a second post with the JASS code as confirmation, so the thread would be easy to read and easier to confirm at the same time.

            Comment


            • #7
              Nice find, ThoAppelsin!! Ty for your work

              Comment


              • #8
                added to sticky.
                Make sure to read the Forum Rules as well as the stickied Threads of the Forum Section you are posting in.

                Contributions i'd like to highlight:
                My Suggestion: Coaching System
                My Sticky: Intended Changes List
                My Challenge: Completely Fixed Hero Challenge: Skywrath Mage

                Comment

                Working...
                X