2013-03-01 06:52:01 +01:00
|
|
|
package com.gmail.nossr50.skills.acrobatics;
|
|
|
|
|
|
|
|
import com.gmail.nossr50.config.AdvancedConfig;
|
|
|
|
import com.gmail.nossr50.config.Config;
|
2013-10-01 17:17:53 +02:00
|
|
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
2013-03-01 06:52:01 +01:00
|
|
|
|
|
|
|
public final class Acrobatics {
|
2013-11-22 18:32:23 +01:00
|
|
|
public static double rollThreshold = AdvancedConfig.getInstance().getRollDamageThreshold();
|
|
|
|
public static double gracefulRollThreshold = AdvancedConfig.getInstance().getGracefulRollDamageThreshold();
|
|
|
|
public static double dodgeDamageModifier = AdvancedConfig.getInstance().getDodgeDamageModifier();
|
2013-03-01 06:52:01 +01:00
|
|
|
|
2013-10-01 17:17:53 +02:00
|
|
|
public static int dodgeXpModifier = ExperienceConfig.getInstance().getDodgeXPModifier();
|
|
|
|
public static int rollXpModifier = ExperienceConfig.getInstance().getRollXPModifier();
|
|
|
|
public static int fallXpModifier = ExperienceConfig.getInstance().getFallXPModifier();
|
2013-03-01 06:52:01 +01:00
|
|
|
|
2013-10-01 17:17:53 +02:00
|
|
|
public static double featherFallXPModifier = ExperienceConfig.getInstance().getFeatherFallXPModifier();
|
2013-10-07 15:53:32 +02:00
|
|
|
|
2013-03-01 06:52:01 +01:00
|
|
|
public static boolean dodgeLightningDisabled = Config.getInstance().getDodgeLightningDisabled();
|
|
|
|
|
|
|
|
private Acrobatics() {};
|
|
|
|
|
2013-09-12 20:18:13 +02:00
|
|
|
protected static double calculateModifiedDodgeDamage(double damage, double damageModifier) {
|
|
|
|
return Math.max(damage / damageModifier, 1.0);
|
2013-03-01 06:52:01 +01:00
|
|
|
}
|
|
|
|
|
2013-09-12 20:18:13 +02:00
|
|
|
protected static double calculateModifiedRollDamage(double damage, double damageThreshold) {
|
|
|
|
return Math.max(damage - damageThreshold, 0.0);
|
2013-03-01 06:52:01 +01:00
|
|
|
}
|
|
|
|
}
|