mcMMO/src/main/java/com/gmail/nossr50/skills/acrobatics/Acrobatics.java

36 lines
2.0 KiB
Java
Raw Normal View History

package com.gmail.nossr50.skills.acrobatics;
2012-11-21 21:49:54 +01:00
import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.config.Config;
2012-11-21 21:49:54 +01:00
public final class Acrobatics {
public static double dodgeMaxChance = AdvancedConfig.getInstance().getDodgeChanceMax();
public static int dodgeMaxBonusLevel = AdvancedConfig.getInstance().getDodgeMaxBonusLevel();
public static int dodgeXpModifier = AdvancedConfig.getInstance().getDodgeXPModifier();
2013-02-26 00:00:15 +01:00
public static int dodgeDamageModifier = AdvancedConfig.getInstance().getDodgeDamageModifier();
public static double rollMaxChance = AdvancedConfig.getInstance().getRollChanceMax();
public static int rollMaxBonusLevel = AdvancedConfig.getInstance().getRollMaxBonusLevel();
public static int rollThreshold = AdvancedConfig.getInstance().getRollDamageThreshold();
public static double gracefulRollMaxChance = AdvancedConfig.getInstance().getGracefulRollChanceMax();
public static int gracefulRollMaxBonusLevel = AdvancedConfig.getInstance().getGracefulRollMaxBonusLevel();
public static int gracefulRollThreshold = AdvancedConfig.getInstance().getGracefulRollDamageThreshold();
public static int gracefulRollSuccessModifier = AdvancedConfig.getInstance().getGracefulRollSuccessModifer();
2012-06-12 17:07:27 +02:00
public static int rollXpModifier = AdvancedConfig.getInstance().getRollXPModifier();
public static int fallXpModifier = AdvancedConfig.getInstance().getFallXPModifier();
public static boolean afkLevelingDisabled = Config.getInstance().getAcrobaticsAFKDisabled();
public static boolean dodgeLightningDisabled = Config.getInstance().getDodgeLightningDisabled();
private Acrobatics() {};
2013-02-26 00:00:15 +01:00
protected static int calculateModifiedDodgeDamage(int damage, int damageModifier) {
return Math.max(damage / damageModifier, 1);
}
protected static int calculateModifiedRollDamage(int damage, int damageThreshold) {
return Math.max(damage - damageThreshold, 0);
}
}