Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: [Confirmed] Timbersaw's Whirling Death reduces 2 attribute points too much

  1. #1
    Basic Member
    Join Date
    Jan 2012
    Posts
    1,128

    [Confirmed] Timbersaw's Whirling Death reduces 2 attribute points too much

    Description: Whirling death is reducing stats by more than it should

    Reproduction: Create enemy wisp lvl 1, use whirling death on him

    Result: He loses 3 strength (17*0.15 rounded up)
    Expected: He loses 1 strength (17*0.15 rounded down -1)

  2. #2
    Basic Member
    Join Date
    Dec 2011
    Posts
    635
    Shamanics propably noticed it because of this thread: http://www.playdota.com/forums/showthread.php?t=1203121
    Gives some additional information and confirmation.

    Though I have to say, this feels intended. Sure it is easily altered in dota 1, but I just dont see the reason for this diversion from the tooltip, and the dota 2 way feels "more" right.
    Last edited by Belarion; 12-17-2012 at 05:05 AM.

  3. #3
    Basic Member
    Join Date
    Dec 2011
    Location
    Shanghai/Hong Kong
    Posts
    2,880
    err... i feel it's wierd the way it is calculated in dota 1. makes no sense to me

  4. #4
    Basic Member shalafi's Avatar
    Join Date
    Nov 2011
    Posts
    659
    Rounding down and then removing 1 makes not sense. Rounding up instead of rounding down, however, is a buff. To the worst hero in the game though (since he's bad in pubs and won't be played in competitive). I wonder how low would he get if this was ported as he was in DotA1. (Both this and stuns stopping his movement)
    Last edited by shalafi; 12-17-2012 at 06:23 AM.

  5. #5
    Volunteer Moderator
    Join Date
    Mar 2012
    Location
    Australia
    Posts
    2,671
    That's kind of weird for it to round up like that, seeing as all other dota2 values that I've seen have truncated... Maybe they took the Nevermore approach with it (since they fixed how many souls he lost etc..) But who knows that they think!

  6. #6
    Basic Member ThoAppelsin's Avatar
    Join Date
    Jan 2012
    Posts
    2,893

    Timbersaw's Whirling Death reduces 2 attribute points too much

    It reduces roundup(0.15*basePrimaryAttrib) points
    it should be reducing [int(0.15*basePrimaryAttrib) - 1] points


    Example, Lina has 27 intelligence at level 1:
    >> Dota2:
    - roundup(0.15*27)
    - roundup(4.05)
    - 5 intelligence reduced

    >> DotA:
    - [int(0.15*27) - 1]
    - [int(4.05) - 1]
    - (4 - 1)
    - 3 intelligence reduced


    Unless the base intelligence is a multiple of 20, there always will be 2 points extra being reduced. Else, just 1.
    An easy example for the multiple of 20 is the Shadow Fiend with 20 base agility at level 1, which gets 3 agility reduced, and should be 2.
    Detailed DotA explanation will be in the next post...

  7. #7
    Basic Member ThoAppelsin's Avatar
    Join Date
    Jan 2012
    Posts
    2,893
    Code:
    01  function Func3971 takes nothing returns nothing
    02    local unit loc_unit01=GetTriggerUnit()
    03    local unit loc_unit02=GetEnumUnit()
    04    local integer loc_integer01=GetUnitAbilityLevel(loc_unit01,'A2FK')
    05    local trigger loc_trigger01
    06    local integer loc_integer02
    07    local integer loc_integer03
    08    local integer loc_integer04
    09    local integer loc_integer05
    10    local integer loc_integer06
    11    local real loc_real01
    12    if IsUnitType(loc_unit02,UNIT_TYPE_HERO)==true then
    13      set loc_integer03=Func0045(loc_unit02)
    14      set loc_real01=0.15
    15      if loc_integer03==2 then
    16        set loc_integer04=R2I(loc_real01*GetHeroAgi(loc_unit02,false))-1
    17        set loc_integer05=0
    18        set loc_integer06=0
    19      elseif loc_integer03==3 then
    20        set loc_integer04=0
    21        set loc_integer05=R2I(loc_real01*GetHeroStr(loc_unit02,false))-1
    22        set loc_integer06=0
    23      elseif loc_integer03==1 then
    24        set loc_integer04=0
    25        set loc_integer05=0
    26        set loc_integer06=R2I(loc_real01*GetHeroInt(loc_unit02,false))-1
    27      endif
    28      call SetHeroAgi(loc_unit02,GetHeroAgi(loc_unit02,false)-loc_integer04,true)
    29      call SetHeroStr(loc_unit02,GetHeroStr(loc_unit02,false)-loc_integer05,true)
    30      call SetHeroInt(loc_unit02,GetHeroInt(loc_unit02,false)-loc_integer06,true)
    31      set loc_trigger01=CreateTrigger()
    32      set loc_integer02=GetHandleId(loc_trigger01)
    33      call TriggerRegisterTimerEvent(loc_trigger01,7,false)
    34      call TriggerRegisterDeathEvent(loc_trigger01,loc_unit02)
    35      call TriggerAddCondition(loc_trigger01,Condition(function Func3970))
    36      call SaveInteger(hashtable001,(loc_integer02),(422),(loc_integer04))
    37      call SaveInteger(hashtable001,(loc_integer02),(424),(loc_integer06))
    38      call SaveInteger(hashtable001,(loc_integer02),(423),(loc_integer05))
    39      call SaveUnitHandle(hashtable001,(loc_integer02),(17),(loc_unit02))
    40      set loc_trigger01=null
    41    endif
    42    call DestroyEffect(AddSpecialEffectTarget("Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl",loc_unit02,"chest"))
    43    call Func0109(loc_unit01,loc_unit02,integer511,50+50*loc_integer01)
    44    set loc_unit01=null
    45    set loc_unit02=null
    46  endfunction

    It's pretty straightforward for this one actually...
    A2FK is the ability code of the Whirling Death
    Func0045 is a function that detects the primary attribute of the hero with a big list and global stuff
    1 means int, 2 means agi, 3 means str
    You can see the formulae on lines #16, 21 and 26; it just multiplies the hero attribute with 0.15, gets the int, and then reduces it by 1...
    ... and then uses these to reduce the attributes of the affected unit.


    I think I had seen a post about this before. It was either here or in playdota... I can't really remember, but I could not find anything about this through search.

  8. #8
    Volunteer Moderator
    Join Date
    Mar 2012
    Location
    Australia
    Posts
    2,671
    Quote Originally Posted by ThoAppelsin View Post
    It reduces roundup(0.15*basePrimaryAttrib) points
    it should be reducing [int(0.15*basePrimaryAttrib) - 1] points


    Example, Lina has 27 intelligence at level 1:
    >> Dota2:
    - roundup(0.15*27)
    - roundup(4.05)
    - 5 intelligence reduced


    >> DotA:
    - [int(0.15*27) - 1]
    - [int(4.05) - 1]
    - (4 - 1)
    - 3 intelligence reduced


    Unless the base intelligence is a multiple of 20, there always will be 2 points extra being reduced. Else, just 1.
    An easy example for the multiple of 20 is the Shadow Fiend with 20 base agility at level 1, which gets 3 agility reduced, and should be 2.
    Detailed DotA explanation will be in the next post...
    I think that's not quite correct. I think it would probably be something more like:

    Truncate(27*(1-0.15))

    seeing as dota 2 loves truncation :P

    So that'd be 22.95 --> 22.

    But this doesn't really matter (unless they were to add another hero that gave 15% bonus stats or something, in which case roundup wouldn't work and it'd be a rounddown - but I prefer general rules so..)
    Last edited by Wyn-Ryder; 04-01-2013 at 04:44 PM.

  9. #9
    Basic Member ThoAppelsin's Avatar
    Join Date
    Jan 2012
    Posts
    2,893
    No.

  10. #10
    Basic Member
    Join Date
    Dec 2011
    Location
    Shanghai/Hong Kong
    Posts
    2,880
    was reported and tagged unconfirmed
    http://dev.dota2.com/showthread.php?...Whirling+Death

Posting Permissions

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