Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After Cast Delay Reduction Algorithm #6135

Closed
Everade opened this issue Jul 25, 2021 · 1 comment · Fixed by #6221
Closed

After Cast Delay Reduction Algorithm #6135

Everade opened this issue Jul 25, 2021 · 1 comment · Fixed by #6221
Labels
component:core A fault that lies within the main framework of rAthena mode:prerenewal A fault that exists within the pre-renewal mode mode:renewal A fault that exists within the renewal mode priority:low A fault that affects rAthena in one piece of functionality and is self-contained type:bug Issue that is a bug within rAthena

Comments

@Everade
Copy link
Contributor

Everade commented Jul 25, 2021

  • rAthena Hash:
    3115a1d

  • Client Date:
    2021-01-07aRagexeRE

  • Server Mode:
    Renewal

  • Description of Issue:

    • Result:
      The After Cast Delay Algorithm doesn't match.
      The skill Poem of Bragi (Magic Strings) after cast delay reduction seems to be multiplicative instead of a total sum of all reductions combined.
      Testing with Kiel-D-01 + Poem of Bragi delivers only a x 0.49 reduction instead of x 0.6.
      The issue could possibly be caused by being calculated similiarly to the Variable Cast time:
      a x ( 1 - b ÷ 100 ) x ( 1 - c ÷ 100 ) = 1470ms
      a = Tarot Card of Fate after cast delay (3000ms)
      b = Poem of Bragi reduction (30)
      c = Kiel-D-01 reduction (30)

    • Expected Result:
      Cast Delay ( seconds ) = BaseDelay × ( 1 − Sum_DelReduc ÷ 100 )
      BaseDelay = Base Cast Delay of a skill.
      Sum_DelReduc = Sum of reductions for Cast Delay.

    Which would result in the expected reduction of:
    a x (( 1 - b ÷ 100 ) + ( 1 - c ÷ 100 )) = 1200ms
    a = Tarot Card of Fate after cast delay (3000ms)
    b = Poem of Bragi reduction (30)
    c = Kiel-D-01 reduction (30)
    In short: calculates first skill based reduction, then gear. Instead of a deduction of the entire sum.

    • How to Reproduce:
      Use both Poem of Bragi (skill) and a Kiel-D-01 Card.
      Then check the after-cast timer of Tarot Card of Fate. (original 3000ms)
      The result will be 1470ms instead of the expected 1200ms.

    • Official Information:
      https://irowiki.org/wiki/Skills#Cast_Delay
      Unfortunately i don't have any KRO source.

  • Modifications that may affect results:
    None

  • Additional Information:
    I haven't tested any other skills. It's possibly an isolated case.

@Everade Everade added the type:bug Issue that is a bug within rAthena label Jul 25, 2021
@Everade Everade changed the title After Cast Delay Miscalculation After Cast Delay Reductions - Miscalculation Jul 25, 2021
@Everade Everade changed the title After Cast Delay Reductions - Miscalculation After Cast Delay Reduction Algorithm Aug 5, 2021
@Everade
Copy link
Contributor Author

Everade commented Aug 24, 2021

I use a custom command to see the actual miliseconds. However since that might not be believable, i made an obvious setup that the visual cooldown indicator on the skill icons are easy to see. (just count the seconds)

Test setup as follows:
Tarot Card of Fate with a custom After Cast Delay of 10seconds.
Poem of Bragi is official, gives a -30% reduction on lvl 10.
Kiel Card with a custom value of -70% reduction.
So that would be the sum of -100% after cast delay reduction.

The results however show that there's still a roughly 2seconds after cast delay, as the official skill icon cooldown indicators in the top left show.

I hope this proofs my claims.

after_cast_delay_bug.mp4

@aleos89 aleos89 added component:core A fault that lies within the main framework of rAthena mode:prerenewal A fault that exists within the pre-renewal mode mode:renewal A fault that exists within the renewal mode priority:low A fault that affects rAthena in one piece of functionality and is self-contained status:need more info Issue that needs more information from a creditable source and removed status:need more info Issue that needs more information from a creditable source labels Aug 25, 2021
aleos89 added a commit that referenced this issue Aug 26, 2021
* Fixes #6135.
* Mystical Amplification should not have the IgnoreStatus CastTime flag.
* Foresight will only apply a cast reduction to learned skills, not those that are granted through item bonuses guild skills, pets, etc.
* Item bonus bDelayRate will now stack with other delay reduction bonuses.
* General cleanups to variable defines.
Thanks to @Everade and @mrjnumber1!
aleos89 added a commit that referenced this issue Aug 31, 2021
* Fixes #6135.
* Mystical Amplification should not have the IgnoreStatus CastTime flag.
* Foresight will only apply a cast reduction to learned skills, not those that are granted through item bonuses guild skills, pets, etc.
* Item bonus bDelayRate will now stack with other delay reduction bonuses.
* General cleanups to variable defines.
Thanks to @Everade, @mrjnumber1, and @Lemongrass3110!
Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:core A fault that lies within the main framework of rAthena mode:prerenewal A fault that exists within the pre-renewal mode mode:renewal A fault that exists within the renewal mode priority:low A fault that affects rAthena in one piece of functionality and is self-contained type:bug Issue that is a bug within rAthena
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants