Results 1 to 8 of 8

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

  1. #1
    Basic Member ThoAppelsin's Avatar
    Join Date
    Jan 2012

    [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. #2
    Basic Member
    Join Date
    Aug 2012
    No JASS proof, ThoAppelsin? I am disappoint

  3. #3
    Basic Member ThoAppelsin's Avatar
    Join Date
    Jan 2012

    I had been warned not to...
    But I'll do it anyway if you were enjoying it :D
    and I also was enjoying it that way anyway...

    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

    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

  4. #4
    Basic Member
    Join Date
    Aug 2012
    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 at 09:07 PM.

  5. #5
    Basic Member ThoAppelsin's Avatar
    Join Date
    Jan 2012
    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.

  6. #6
    Basic Member Kaneomanie's Avatar
    Join Date
    Oct 2012
    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.

  7. #7
    Basic Member Macropod's Avatar
    Join Date
    Feb 2012
    Nice find, ThoAppelsin!! Ty for your work

  8. #8
    Basic Member
    Join Date
    Dec 2011
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts