Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.pokemon.utils;
- /**
- * A class representing, presenting and containing the Catch Chance.
- * @author Savions Sw.
- *
- */
- public class CatchChance {
- /**
- * The main.
- * @param args The arguements.
- */
- public static void main(String[] args) {
- System.out.println(getDefaultValue(300, 2, 5, 2, 1.5));
- }
- /**
- * Get the default catch value.
- * @param maxHP The max HP.
- * @param hp The current HP.
- * @param rate The rate.
- * @param ball_modif The ball modifer.
- * @param stat_modif The stat modifer.
- * @return The default catch value.
- */
- public static double getDefaultValue(int maxHP, int hp, double rate, double ball_modif, double stat_modif) {
- return ((3 * maxHP - 2 * hp) * (rate * ball_modif) / (3 * maxHP)) * stat_modif;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment