Git Product home page Git Product logo

Comments (5)

shrianshChari avatar shrianshChari commented on August 10, 2024

What does it look like when you remove the Klutz ability?

from damage-calc.

UnderscorePoY avatar UnderscorePoY commented on August 10, 2024

The Iron Ball speed drop is properly applied.

2023-07-12 21_44_55-Pokémon Damage Calculator — Mozilla Firefox

from damage-calc.

UnderscorePoY avatar UnderscorePoY commented on August 10, 2024

I suspect the issue comes from the fact that checkItem gets rid of the item entirely if Klutz is the Ability. Since checkItem is common to all generations, one might want to keep track of the old item near the start of calculateDPP and compare with it on this line.

from damage-calc.

shrianshChari avatar shrianshChari commented on August 10, 2024

That line appears to deal with the grounding effect of Iron Ball, which according to Bulbapedia, gets ignored by Klutz. In other words, Klutz allows the speed to be halved still, but doesn't allow the Pokemon to be grounded. However, this line and this line might have something to do with how the damage calc handles the speed of the Pokemon.

from damage-calc.

UnderscorePoY avatar UnderscorePoY commented on August 10, 2024

You're right, i linked you to a completely wrong reference, sorry about this.
Your second link is the checkItem function that is common to all generations. Probably not being modified, due to possible side effects in the other calculators split per generation.
Your first link is indeed where the speed drop is supposed to be applied, but since checkItem was already called previously and discards the item even in the case of an Iron Ball, the item is gone. Thus the drop is not put inside speedMods.

from damage-calc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.