Developer's Blog
Register Low Fi Mark Forums Read

Notices

Reply
 
Thread Tools
Old 04-16-2012, 05:38 AM   #1
Yago
Member
 
Join Date: Jul 2009
Location: United States
Posts: 1,100
Yago is offline

Default Life Break/Charge of Darkness


Searched and found nothing.

Ok, if Huskar charges at a Barathrum charging that same Huskar, will he get stunned? How is this determined?

I once had a game where I dodged his stun while doing that, though I might remember wrong (though I don't think I am) and I'm unsure if there is a scenario where Huskar would still be stunned.

Basically: Which happens first? The Charge stun or Life Breaks MI removal?
  Reply With Quote
Old 04-16-2012, 05:59 AM   #2
Heraklinos
Member
 
Join Date: Jul 2009
Location: Chieng Mai, Thailand
Posts: 688
Heraklinos is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Barathrum's charge stun target when it's closer than 100 range, he charges at the speed of 425-650 from lvl 1-4 and Huskar "charges" him at the speed of 1000 which means that they're charging each other at the speed of about 1425-1650, which results in they spend about 0.07-0.06 second in that 100 range. Charge of Darkness checks every 0.02 second if the target is within 100 range, which the duration of the "100 range period" is about 3 times greater than that. Barathrum will attempt to stun the magic-immuned Huskar and fail, there's no way for Huskar to be stunned.
  Reply With Quote
Old 04-16-2012, 09:05 AM   #3
Clogon
Member
 
Join Date: Jun 2009
Posts: 488
Clogon is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Quote:
Originally Posted by Heraklinos View Post
Barathrum's charge stun target when it's closer than 100 range, he charges at the speed of 425-650 from lvl 1-4 and Huskar "charges" him at the speed of 1000 which means that they're charging each other at the speed of about 1425-1650, which results in they spend about 0.07-0.06 second in that 100 range. Charge of Darkness checks every 0.02 second if the target is within 100 range, which the duration of the "100 range period" is about 3 times greater than that. Barathrum will attempt to stun the magic-immuned Huskar and fail, there's no way for Huskar to be stunned.
This would be 100% true if the stun was instantaneous but the stun is from the trigger creating a dummy unit and ordering it to cast stormbolt. This means that it is possible for this to not be the result all every time (there are other factors too).
__________________
I don't like moving...

09-08-12 sig:
"The fun in learning is not knowing all the answers but the journey to find them." by me, Clogon. XD
  Reply With Quote
Old 04-16-2012, 09:20 AM   #4
Heraklinos
Member
 
Join Date: Jul 2009
Location: Chieng Mai, Thailand
Posts: 688
Heraklinos is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Quote:
Originally Posted by Clogon View Post
This would be 100% true if the stun was instantaneous but the stun is from the trigger creating a dummy unit and ordering it to cast stormbolt. This means that it is possible for this to not be the result all every time (there are other factors too).
I forgot about that, thanks Clogon. What's the speed of the stormbolt from dummy and how long does it take for it to cast stormbolt then? (I assume that dummies use 0 cast point right?)
  Reply With Quote
Old 04-16-2012, 10:10 AM   #5
Clogon
Member
 
Join Date: Jun 2009
Posts: 488
Clogon is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Going from this topic:
http://www.playdota.com/forums/showt...ht=frame+dummy

Casting point: 0

WC3 frame rate: 0.005

If you include:

1) the exact intervals at which the 2 hero are moved the by triggers
2) the exact conditions in which huskar's magic immunity is removed
3) if the magic immunity removal/storm bolt happens before each movement interval or after

then we can get a very good approximation on what happens and maybe figure out the chances of you getting stunned or not getting stunned.

Because Charge of darkness updates every 0.02 seconds instead of every 0.005, it is possible for Huskar's magic immunity to be removed between the CoD detection intervals. I mean there are up to 4 frames before the storm bolt is even attempted which allows plenty of time for Huskar's magic immunity to be removed.

Edit:
The speed of the storm bolt doesn't really matter as you can't even attempt to cast it on a magic immune unit.
__________________
I don't like moving...

09-08-12 sig:
"The fun in learning is not knowing all the answers but the journey to find them." by me, Clogon. XD
  Reply With Quote
Old 04-16-2012, 12:37 PM   #6
Heraklinos
Member
 
Join Date: Jul 2009
Location: Chieng Mai, Thailand
Posts: 688
Heraklinos is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

I just assumed that Huskar's magic immunity won't be removed before he reaches his target (as I have no idea about how Huskar's spells are coded, I could be terribly wrong). I can neither find the trigger description for Huskar's spells nor have access to WC3 at the moment so I can't include those 3 conditions you mentioned ( I think the first one could be roughly approximate but the other two I have completely no clue, hope someone with exact informations could clear things up)
  Reply With Quote
Old 04-16-2012, 04:37 PM   #7
EebstertheGreat
Forum Staff
 
EebstertheGreat's Avatar
 
Join Date: Sep 2009
Location: Cleveland, OH
Posts: 8,102
EebstertheGreat is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Huskar's magic immunity is removed when he is within 125 units of the target. Barathrum's stun is cast when he is within 100 units. So the stun should always happen.
  Reply With Quote
Old 04-16-2012, 04:50 PM   #8
MauranKilom
Member
 
MauranKilom's Avatar
 
Join Date: Jan 2010
Location: Germany
Posts: 5,789
MauranKilom is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

^It would always happen if it would be checked for continously.
__________________
I might edit my p0sts frequently and rapidly after posting.
DotA code of the month:
Jass:
if GetRandomInt(0,10)<11 then

Fix OD combo! IMPLEMENTED!
  Reply With Quote
Old 04-16-2012, 05:51 PM   #9
EebstertheGreat
Forum Staff
 
EebstertheGreat's Avatar
 
Join Date: Sep 2009
Location: Cleveland, OH
Posts: 8,102
EebstertheGreat is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Quote:
Originally Posted by MauranKilom View Post
^It would always happen if it would be checked for continously.
Yeah I guess at levels 3-4 it should be possible for the stun to sometimes not work. It depends on precise timing, lag, phase of Venus, etc.
  Reply With Quote
Old 04-16-2012, 08:01 PM   #10
Yago
Member
 
Join Date: Jul 2009
Location: United States
Posts: 1,100
Yago is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Quote:
Originally Posted by EebstertheGreat View Post
Yeah I guess at levels 3-4 it should be possible for the stun to sometimes not work. It depends on precise timing, lag, phase of Venus, etc.
Alright, I think it's QAC. That's what I thought.

I've used it to pro dodge his stun once or twice and pick up a kill when I'm low HP at a tower and he Charge dives, but I'd also had it fail before, and I wondered if there was rhyme or reason to it.
  Reply With Quote
Old 04-16-2012, 09:54 PM   #11
Clogon
Member
 
Join Date: Jun 2009
Posts: 488
Clogon is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Can you guys provide the info I requested? I would really like to calculate the chance at which Huskar can dodge CoD's stun.
__________________
I don't like moving...

09-08-12 sig:
"The fun in learning is not knowing all the answers but the journey to find them." by me, Clogon. XD
  Reply With Quote
Old 04-16-2012, 10:04 PM   #12
Yago
Member
 
Join Date: Jul 2009
Location: United States
Posts: 1,100
Yago is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Quote:
Originally Posted by Clogon View Post
Can you guys provide the info I requested? I would really like to calculate the chance at which Huskar can dodge CoD's stun.
Eebster already explained what it's affected by. The position of Venus etc. It's somewhat random and depends upon too many variables to reliably say for sure, at least, that's the way I interpreted that.
  Reply With Quote
Old 04-16-2012, 10:23 PM   #13
EebstertheGreat
Forum Staff
 
EebstertheGreat's Avatar
 
Join Date: Sep 2009
Location: Cleveland, OH
Posts: 8,102
EebstertheGreat is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

1. Huskar is moved every 0.015 seconds by 15 units. Spiritbreaker is moved every 0.02 seconds by (350 + 75*lvl)*0.02 units.
2. Magic immunity ends if distance < 125, charge ends if distance < 100.
3. Both happen before movement (i.e., if dist < x, effects, otherwise move).
  Reply With Quote
Old 04-16-2012, 10:51 PM   #14
Steric
Member
 
Steric's Avatar
 
Join Date: Jul 2009
Posts: 1,244
Steric is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Assuming Eebster's numbers are right (which I don't doubt) and assuming there is no other movement it seems to me that it'd be impossible for Huskar to not get stunned.

In order for Huskar to not get stunned, he would have to be less than 100 distance away from Spirit Breaker and have Charge run a check, without Lifebreak ending. However, between every 2 checks of Charge, at least one check of Lifebreak will happen (since it's on a shorter interval). So the least distance that a spell immune Huskar could be from Spirit Breaker when Charge checks the distance would be 110 (125-15) , which would be too high for charge to stun, and then Huskar would lose his magic immunity.

However, if Huskar or Spirit Breaker get moved more than 10 units towards each other between the check of Lifebreak and Charge (a timing window of up to 0.01499... seconds), it would be POSSIBLE for the stun to fail. This can be achieved with a Force Staff, although whether or not the stun would actually be avoided would depend on the exact timing. Since Lifebreak has a shorter interval and a longer range, even with multiple Force Staves (since the faster the two approach the more likely it is that the stun will fail), it is still more likely that Huskar will lose his magic immunity before Charge tries to stun him.
  Reply With Quote
Last edited by Steric; 04-16-2012 at 11:01 PM.
Old 04-16-2012, 11:31 PM   #15
Yago
Member
 
Join Date: Jul 2009
Location: United States
Posts: 1,100
Yago is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Quote:
Originally Posted by Steric View Post
Assuming Eebster's numbers are right (which I don't doubt) and assuming there is no other movement it seems to me that it'd be impossible for Huskar to not get stunned.

In order for Huskar to not get stunned, he would have to be less than 100 distance away from Spirit Breaker and have Charge run a check, without Lifebreak ending. However, between every 2 checks of Charge, at least one check of Lifebreak will happen (since it's on a shorter interval). So the least distance that a spell immune Huskar could be from Spirit Breaker when Charge checks the distance would be 110 (125-15) , which would be too high for charge to stun, and then Huskar would lose his magic immunity.

However, if Huskar or Spirit Breaker get moved more than 10 units towards each other between the check of Lifebreak and Charge (a timing window of up to 0.01499... seconds), it would be POSSIBLE for the stun to fail. This can be achieved with a Force Staff, although whether or not the stun would actually be avoided would depend on the exact timing. Since Lifebreak has a shorter interval and a longer range, even with multiple Force Staves (since the faster the two approach the more likely it is that the stun will fail), it is still more likely that Huskar will lose his magic immunity before Charge tries to stun him.
If it helps, when I dodged the stun one time I was almost melee range.
  Reply With Quote
Old 04-16-2012, 11:53 PM   #16
Steric
Member
 
Steric's Avatar
 
Join Date: Jul 2009
Posts: 1,244
Steric is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Quote:
Originally Posted by Yago View Post
If it helps, when I dodged the stun one time I was almost melee range.
Ya, all that was assuming the skill was cast from over 125 distance away.

Another possibility: With charge, there's always the chance that the SB miss-clicked and accidentally canceled the charge.
  Reply With Quote
Old 04-17-2012, 12:20 AM   #17
GASHOLE
Member
 
GASHOLE's Avatar
 
Join Date: Jul 2010
Location: behind you
Posts: 1,471
GASHOLE is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Just get a BKB! /trololol
__________________
If the opposite of pros are cons, then what is the opposite of progress?



Add me at Dota2
http://steamcommunity.com/profiles/76561198051641046/
  Reply With Quote
Old 04-17-2012, 12:23 AM   #18
Yago
Member
 
Join Date: Jul 2009
Location: United States
Posts: 1,100
Yago is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Quote:
Originally Posted by Steric View Post
Ya, all that was assuming the skill was cast from over 125 distance away.

Another possibility: With charge, there's always the chance that the SB miss-clicked and accidentally canceled the charge.
Well, he raged into chat WTF WHY NO STUN. So I'm guessing nah. :P
  Reply With Quote
Old 04-17-2012, 01:20 AM   #19
EebstertheGreat
Forum Staff
 
EebstertheGreat's Avatar
 
Join Date: Sep 2009
Location: Cleveland, OH
Posts: 8,102
EebstertheGreat is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Yeah, for you to block a stun, you have to cast Life Break between 0.005 and 0.020 seconds after the check that moves Spiritbreaker to within 100 units of Huskar.

Assuming again no engine quirkiness.
  Reply With Quote
Old 04-17-2012, 02:52 AM   #20
Heraklinos
Member
 
Join Date: Jul 2009
Location: Chieng Mai, Thailand
Posts: 688
Heraklinos is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Quote:
Originally Posted by EebstertheGreat View Post
1. Huskar is moved every 0.015 seconds by 15 units. Spiritbreaker is moved every 0.02 seconds by (350 + 75*lvl)*0.02 units.
2. Magic immunity ends if distance < 125, charge ends if distance < 100.
3. Both happen before movement (i.e., if dist < x, effects, otherwise move).
Is there any trigger description of Huskar available in PD yet?
  Reply With Quote
Old 04-17-2012, 03:12 AM   #21
EebstertheGreat
Forum Staff
 
EebstertheGreat's Avatar
 
Join Date: Sep 2009
Location: Cleveland, OH
Posts: 8,102
EebstertheGreat is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

No. Here's the code though. As always, read the last function first (it gets called from main when Huskar is picked).
Jass:
function Func1811 takes unit loc_unit01,unit loc_unit02 returns nothing
  local unit loc_unit03=CreateUnit(GetOwningPlayer(loc_unit01),'e00E',GetUnitX(loc_unit02),GetUnitY(loc_unit02),0)
  local integer loc_integer01=GetUnitAbilityLevel(loc_unit01,'A0QR')
  local real loc_real01
  local real loc_real02=0.5
  if loc_integer01==0 then
    set loc_integer01=GetUnitAbilityLevel(loc_unit01,'A1B3')
    set loc_real02=0.65
  endif
  call Func0179(loc_unit03,'A0QU') // Func0179 adds the ability to the unit and makes it permanent
  call SetUnitAbilityLevel(loc_unit03,'A0QU',loc_integer01)
  call IssueTargetOrder(loc_unit03,"slow",loc_unit02)
  if loc_integer01==1 then
    set loc_real01=0.35
  elseif loc_integer01==2 then
    set loc_real01=0.30
  else
    set loc_real01=0.25
  endif
  call Func0107(loc_unit01,loc_unit01,1,GetUnitState(loc_unit01,UNIT_STATE_LIFE)*loc_real01) // Func0107 has the first unit damage the second for the real damage of type determined by the integer (for 1, it's ATTACK_TYPE_HERO,DAMAGE_TYPE_FIRE,WEAPON_TYPE_WHOKNOWS)
  call Func0107(loc_unit01,loc_unit02,1,GetUnitState(loc_unit02,UNIT_STATE_LIFE)*loc_real02)
  call DestroyEffect(AddSpecialEffectTarget("Objects\\Spawnmodels\\Human\\HumanBlood\\BloodElfSpellThiefBlood.mdl",loc_unit01,"chest"))
  call DestroyEffect(AddSpecialEffectTarget("effects\\LifeBreak.mdx",loc_unit02,"chest"))
  set loc_unit01=null
  set loc_unit02=null
  set loc_unit03=null
endfunction

function Func1812 takes nothing returns boolean
  local trigger loc_trigger01=GetTriggeringTrigger()
  local integer loc_integer01=GetHandleId(loc_trigger01)
  local unit loc_unit01=(LoadUnitHandle(hashtable001,(loc_integer01),(2)))
  local unit loc_unit02=(LoadUnitHandle(hashtable001,(loc_integer01),(17)))
  local real loc_real01=(LoadReal(hashtable001,(loc_integer01),(23)))
  local real loc_real02=(LoadReal(hashtable001,(loc_integer01),(24)))
  local real loc_real03
  local real loc_real04
  local real loc_real05=GetUnitX(loc_unit01)
  local real loc_real06=GetUnitY(loc_unit01)
  local real loc_real07=GetUnitX(loc_unit02)
  local real loc_real08=GetUnitY(loc_unit02)
  local real loc_real09=Atan2(loc_real08-loc_real06,loc_real07-loc_real05)
  if GetUnitTypeId(loc_unit01)=='E02X' then // E02X is Rubick
    call SetUnitAnimationByIndex(loc_unit01,1)
  else
    call SetUnitAnimationByIndex(loc_unit01,17)
  endif
  if GetTriggerEventId()==EVENT_WIDGET_DEATH or Func0139(loc_real01,loc_real02,loc_real07,loc_real08)>1400 or Func0250(loc_unit01)then // Func0139 calculates distance, Func0250 checks if the unit is disabled
    call SetUnitPathing(loc_unit01,true)
    call DestroyEffect((LoadEffectHandle(hashtable001,(loc_integer01),(175))))
    call DestroyEffect((LoadEffectHandle(hashtable001,(loc_integer01),(176))))
    call UnitRemoveAbility(loc_unit01,'A0ST')
    call SetUnitTimeScale(loc_unit01,1.0)
    call FlushChildHashtable(hashtable001,(loc_integer01))
    call Func0035(loc_trigger01)
  elseif Func0139(loc_real05,loc_real06,loc_real07,loc_real08)<125 then
    call SetUnitPathing(loc_unit01,true)
    call DestroyEffect((LoadEffectHandle(hashtable001,(loc_integer01),(175))))
    call DestroyEffect((LoadEffectHandle(hashtable001,(loc_integer01),(176))))
    call UnitRemoveAbility(loc_unit01,'A0ST')
    call FlushChildHashtable(hashtable001,(loc_integer01))
    call Func0035(loc_trigger01)
    call SetUnitTimeScale(loc_unit01,1.0)
    if loc_unit02!=null and Func0180(loc_unit02)==false then // Func0180 checks if the unit is dead or null
      call IssueTargetOrder(loc_unit01,"attack",loc_unit02)
      call Func1811(loc_unit01,loc_unit02)
    endif
  else
    call SetUnitPathing(loc_unit01,false)
    set loc_real01=loc_real07
    set loc_real02=loc_real08
    call SaveReal(hashtable001,(loc_integer01),(23),((loc_real01)*1.0))
    call SaveReal(hashtable001,(loc_integer01),(24),((loc_real02)*1.0))
    set loc_real03=loc_real05+15*Cos(loc_real09)
    set loc_real04=loc_real06+15*Sin(loc_real09)
    call SetUnitPosition(loc_unit01,loc_real03,loc_real04)
    call SetUnitFacing(loc_unit01,loc_real09*bj_RADTODEG)
  endif
  set loc_trigger01=null
  set loc_unit01=null
  set loc_unit02=null
  return false
endfunction

function Func1813 takes nothing returns nothing
  local unit loc_unit01=GetTriggerUnit()
  local unit loc_unit02=GetSpellTargetUnit()
  local trigger loc_trigger01=CreateTrigger()
  local integer loc_integer01=GetHandleId(loc_trigger01)
  call TriggerRegisterTimerEvent(loc_trigger01,0.015,true)
  call TriggerRegisterDeathEvent(loc_trigger01,loc_unit01)
  call TriggerAddCondition(loc_trigger01,Condition(function Func1812))
  call SaveUnitHandle(hashtable001,(loc_integer01),(2),(loc_unit01))
  call SaveUnitHandle(hashtable001,(loc_integer01),(17),(loc_unit02))
  call SaveReal(hashtable001,(loc_integer01),(23),((GetUnitX(loc_unit02))*1.0))
  call SaveReal(hashtable001,(loc_integer01),(24),((GetUnitY(loc_unit02))*1.0))
  call SaveEffectHandle(hashtable001,(loc_integer01),(175),(AddSpecialEffectTarget("war3mapImported\\LifeBreakCharge.mdx",loc_unit01,"hand right alternate")))
  call SaveEffectHandle(hashtable001,(loc_integer01),(176),(AddSpecialEffectTarget("war3mapImported\\LifeBreakCharge.mdx",loc_unit01,"hand left alternate")))
  call SetUnitPathing(loc_unit01,false)
  call Func0179(loc_unit01,'A0ST') // A0ST is the magic immunity ability
  call SetPlayerAbilityAvailable(GetOwningPlayer(loc_unit01),'A0ST',false)
  call SetUnitAnimationByIndex(loc_unit01,17)
  call SetUnitTimeScale(loc_unit01,3.0)
  set loc_unit01=null
  set loc_unit02=null
  set loc_trigger01=null
endfunction

function Func1814 takes nothing returns boolean
  if(GetSpellAbilityId()=='A0QR' or GetSpellAbilityId()=='A1B3')and Func0028(GetSpellTargetUnit())==false then // A0QR = Life Break, A1B3 = Life Break (Aghanim's), and Func0028 checks for Linken's or Rosh spell block
    call Func1813()
  endif
  return false
endfunction

function Func1815 takes nothing returns nothing
  local trigger loc_trigger01=CreateTrigger()
  call Func0164(loc_trigger01,EVENT_PLAYER_UNIT_SPELL_EFFECT)
  call TriggerAddCondition(loc_trigger01,Condition(function Func1814))
  set loc_trigger01=null
  call Func0122('A0QU') // preloads the slow ability A0QU
endfunction
  Reply With Quote
Old 04-17-2012, 03:31 AM   #22
Heraklinos
Member
 
Join Date: Jul 2009
Location: Chieng Mai, Thailand
Posts: 688
Heraklinos is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

^thanks a lot
  Reply With Quote
Old 04-17-2012, 04:14 AM   #23
Yago
Member
 
Join Date: Jul 2009
Location: United States
Posts: 1,100
Yago is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Wow. So I must have been really lucky that game it stun dodged. As I've said, I've had it work only once I know of, maybe more, but when I tested it failed. Thanks for clarifying.
  Reply With Quote
Old 04-17-2012, 09:18 AM   #24
Clogon
Member
 
Join Date: Jun 2009
Posts: 488
Clogon is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

@EebstertheGreat and Steric:
Thanks for the numbers and analysis.
__________________
I don't like moving...

09-08-12 sig:
"The fun in learning is not knowing all the answers but the journey to find them." by me, Clogon. XD
  Reply With Quote
Old 04-18-2012, 02:11 AM   #25
Heraklinos
Member
 
Join Date: Jul 2009
Location: Chieng Mai, Thailand
Posts: 688
Heraklinos is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

one more questions:
What would happen first if both Life Break's check for the magic immunity removal and Charge of Darkness's check for the stun is done in the same 0.005 update interval (they both get in range of each other)? The stun or the removal of magic immunity?
  Reply With Quote
Old 04-18-2012, 03:46 AM   #26
Steric
Member
 
Steric's Avatar
 
Join Date: Jul 2009
Posts: 1,244
Steric is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Quote:
Originally Posted by Heraklinos View Post
one more questions:
What would happen first if both Life Break's check for the magic immunity removal and Charge of Darkness's check for the stun is done in the same 0.005 update interval (they both get in range of each other)? The stun or the removal of magic immunity?
Everything happens in an order. Two things cannot simultaneously happen. One check will happen before the other.
  Reply With Quote
Old 04-18-2012, 04:20 AM   #27
Heraklinos
Member
 
Join Date: Jul 2009
Location: Chieng Mai, Thailand
Posts: 688
Heraklinos is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Quote:
Originally Posted by Steric View Post
Everything happens in an order. Two things cannot simultaneously happen. One check will happen before the other.
You clearly didn't get my point...
I didn't say "same time", I said "same update interval". My question is which check would go first.

Note: what you said don't apply well in a quantum computer, if it would be successfully built
  Reply With Quote
Old 04-18-2012, 04:54 AM   #28
EebstertheGreat
Forum Staff
 
EebstertheGreat's Avatar
 
Join Date: Sep 2009
Location: Cleveland, OH
Posts: 8,102
EebstertheGreat is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

The one that happens first will happen first . . . the general assumption is that the engine processes new orders in the order they are received. So if it receives the Life Break order before the Charge of Darkness order, it will be checked first.

That might not really be the case of course; the logic might work quite differently for timers. But I don't know how to check this nor do I really care to. The deep inner workings of the WC3 engine tend to be confusing, hard to probe, and nearly irrelevant.
  Reply With Quote
Old 04-18-2012, 06:07 AM   #29
Heraklinos
Member
 
Join Date: Jul 2009
Location: Chieng Mai, Thailand
Posts: 688
Heraklinos is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

^That's sad to hear
Actually it's quite relevant to my calculation (though not so much, but relevant anyway). At first my assumption was the one casted first will be checked first but I wasn't sure, if anyone actually know the algorithm WC3 engine uses would be nice, sadly that the old-school mechfags aren't around here anymore.
  Reply With Quote
Old 04-18-2012, 08:41 AM   #30
MauranKilom
Member
 
MauranKilom's Avatar
 
Join Date: Jan 2010
Location: Germany
Posts: 5,789
MauranKilom is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Quote:
Originally Posted by Heraklinos View Post
At first my assumption was the one casted first will be checked first but I wasn't sure, if anyone actually know the algorithm WC3 engine uses would be nice, sadly that the old-school mechfags aren't around here anymore.
Do you really think the "old-school mechfags" knew the code of wc3?
They didn't. They gained knowledge from tests in wc3 (without knowing anything about the inner workings) and drew conclusions.

One might call this procedure "science".
__________________
I might edit my p0sts frequently and rapidly after posting.
DotA code of the month:
Jass:
if GetRandomInt(0,10)<11 then

Fix OD combo! IMPLEMENTED!
  Reply With Quote
Old 04-18-2012, 09:11 AM   #31
EebstertheGreat
Forum Staff
 
EebstertheGreat's Avatar
 
Join Date: Sep 2009
Location: Cleveland, OH
Posts: 8,102
EebstertheGreat is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

I think he means they would have been more willing to actually make a map to test it, while I'm much too lazy.
  Reply With Quote
Old 04-18-2012, 01:17 PM   #32
Steric
Member
 
Steric's Avatar
 
Join Date: Jul 2009
Posts: 1,244
Steric is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

Quote:
Originally Posted by Heraklinos View Post
You clearly didn't get my point...
I didn't say "same time", I said "same update interval". My question is which check would go first.

Note: what you said don't apply well in a quantum computer, if it would be successfully built
There is no "same update interval" as far as I know. One timer was started at some time and will run every 0.020 seconds. The other timer started at some other time and runs every 0.015 seconds. Unless 0.005 seconds is the shortest time interval that can exist in the warcraft III system (which for all I know, could be), one timer will expire an instant before the other.

If the triggers were somehow triggered simultaneously (which I don't even think is possible), then I believe that the one that was created last will run first.

Even if there was a successfully built Quantum Computer, the warcraft III program runs things one at a time, so that's irrelevant.
  Reply With Quote
Old 04-19-2012, 02:01 AM   #33
Heraklinos
Member
 
Join Date: Jul 2009
Location: Chieng Mai, Thailand
Posts: 688
Heraklinos is offline
Default Re: Life Break/Charge of Darkness
Did you find this post helpful? Yes | No

^Eebster got my question anyway, it doesn't matter if you don't. Maybe this might help Multi-players RTS.

Quote:
Originally Posted by MauranKilom View Post
Do you really think the "old-school mechfags" knew the code of wc3?
They didn't. They gained knowledge from tests in wc3 (without knowing anything about the inner workings) and drew conclusions.

One might call this procedure "science".
I know that reverse engineering is illegal, but however they seem to know so much that might be able to answer my question, or even bothered to make a test map for the sake of knowledge, like the old "research group" from DA or people from wc3c.net
every thing changes

Quote:
Originally Posted by EebstertheGreat View Post
I think he means they would have been more willing to actually make a map to test it, while I'm much too lazy.
exactly my point
I can't make a test map myself cause I don't have WC3 installed on my computer over a year ago, I lost the damn Frozen Throne CD.
  Reply With Quote
Reply
  Defense of the Ancients Advanced Mechanics


Forum Jump

Thread Tools