mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 22:26:46 +01:00
Add missing limit break settings
This commit is contained in:
parent
4e2d68908e
commit
9b6e6d7861
@ -24,7 +24,7 @@ public class ConfigAcrobatics {
|
|||||||
return subSkills.getDodge();
|
return subSkills.getDodge();
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getRollDamageTheshold() {
|
public double getRollDamageThreshold() {
|
||||||
return getRoll().getDamageTheshold();
|
return getRoll().getDamageTheshold();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.gmail.nossr50.config.hocon.skills.swords;
|
||||||
|
|
||||||
|
import ninja.leaping.configurate.objectmapping.Setting;
|
||||||
|
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||||
|
|
||||||
|
@ConfigSerializable
|
||||||
|
public class ConfigSwordsLimitBreak {
|
||||||
|
private static final boolean DEFAULT_PVE = false;
|
||||||
|
|
||||||
|
@Setting(value = "PVE", comment = "If true, the bonus damage from Limit Break will apply to PVE in addition to PVP." +
|
||||||
|
"\nDefault value: "+DEFAULT_PVE)
|
||||||
|
private boolean PVE = DEFAULT_PVE;
|
||||||
|
|
||||||
|
public boolean isEnabledForPVE() {
|
||||||
|
return PVE;
|
||||||
|
}
|
||||||
|
}
|
@ -16,6 +16,9 @@ public class ConfigSwordsSubSkills {
|
|||||||
@Setting(value = "Serrated-Strikes")
|
@Setting(value = "Serrated-Strikes")
|
||||||
private ConfigSwordsSerratedStrikes serratedStrikes = new ConfigSwordsSerratedStrikes();
|
private ConfigSwordsSerratedStrikes serratedStrikes = new ConfigSwordsSerratedStrikes();
|
||||||
|
|
||||||
|
@Setting(value = "Limit-Break")
|
||||||
|
private ConfigSwordsLimitBreak swordsLimitBreak = new ConfigSwordsLimitBreak();
|
||||||
|
|
||||||
public ConfigSwordsCounterAttack getCounterAttack() {
|
public ConfigSwordsCounterAttack getCounterAttack() {
|
||||||
return counterAttack;
|
return counterAttack;
|
||||||
}
|
}
|
||||||
@ -63,4 +66,8 @@ public class ConfigSwordsSubSkills {
|
|||||||
public int getRuptureBaseTicks() {
|
public int getRuptureBaseTicks() {
|
||||||
return rupture.getRuptureBaseTicks();
|
return rupture.getRuptureBaseTicks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ConfigSwordsLimitBreak getSwordsLimitBreak() {
|
||||||
|
return swordsLimitBreak;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,14 +10,14 @@ public class ConfigUnarmed {
|
|||||||
private static final boolean ITEMS_COUNT_AS_UNARMED_DEFAULT = true;
|
private static final boolean ITEMS_COUNT_AS_UNARMED_DEFAULT = true;
|
||||||
|
|
||||||
@Setting(value = ConfigConstants.SUB_SKILL_NODE)
|
@Setting(value = ConfigConstants.SUB_SKILL_NODE)
|
||||||
private ConfigUnarmedSubskills subskills = new ConfigUnarmedSubskills();
|
private ConfigUnarmedSubSkills subskills = new ConfigUnarmedSubSkills();
|
||||||
|
|
||||||
@Setting(value = "Items-Count-As-Unarmed", comment = "Unarmed skills will work even if you are holding an item." +
|
@Setting(value = "Items-Count-As-Unarmed", comment = "Unarmed skills will work even if you are holding an item." +
|
||||||
"\nMost tools are not considered an item, for example pickaxes, tridents, swords, etc won't count as unarmed with this setting enabled." +
|
"\nMost tools are not considered an item, for example pickaxes, tridents, swords, etc won't count as unarmed with this setting enabled." +
|
||||||
"\nDefault value: "+ITEMS_COUNT_AS_UNARMED_DEFAULT)
|
"\nDefault value: "+ITEMS_COUNT_AS_UNARMED_DEFAULT)
|
||||||
private boolean doItemsCountAsUnarmed = ITEMS_COUNT_AS_UNARMED_DEFAULT;
|
private boolean doItemsCountAsUnarmed = ITEMS_COUNT_AS_UNARMED_DEFAULT;
|
||||||
|
|
||||||
public ConfigUnarmedSubskills getSubskills() {
|
public ConfigUnarmedSubSkills getSubSkills() {
|
||||||
return subskills;
|
return subskills;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
package com.gmail.nossr50.config.hocon.skills.unarmed;
|
||||||
|
|
||||||
|
import ninja.leaping.configurate.objectmapping.Setting;
|
||||||
|
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||||
|
|
||||||
|
@ConfigSerializable
|
||||||
|
public class ConfigUnarmedLimitBreak {
|
||||||
|
private static final boolean DEFAULT_PVE = false;
|
||||||
|
|
||||||
|
@Setting(value = "PVE", comment = "If true, the bonus damage from Limit Break will apply to PVE in addition to PVP." +
|
||||||
|
"\nDefault value: "+DEFAULT_PVE)
|
||||||
|
private boolean PVE = DEFAULT_PVE;
|
||||||
|
|
||||||
|
public boolean isEnabledForPVE() {
|
||||||
|
return PVE;
|
||||||
|
}
|
||||||
|
}
|
@ -4,11 +4,13 @@ import ninja.leaping.configurate.objectmapping.Setting;
|
|||||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||||
|
|
||||||
@ConfigSerializable
|
@ConfigSerializable
|
||||||
public class ConfigUnarmedSubskills {
|
public class ConfigUnarmedSubSkills {
|
||||||
|
|
||||||
@Setting(value = "Disarm")
|
@Setting(value = "Disarm")
|
||||||
public ConfigUnarmedDisarm disarm = new ConfigUnarmedDisarm();
|
public ConfigUnarmedDisarm disarm = new ConfigUnarmedDisarm();
|
||||||
|
|
||||||
|
public ConfigUnarmedLimitBreak unarmedLimitBreak = new ConfigUnarmedLimitBreak();
|
||||||
|
|
||||||
public ConfigUnarmedDisarm getDisarm() {
|
public ConfigUnarmedDisarm getDisarm() {
|
||||||
return disarm;
|
return disarm;
|
||||||
}
|
}
|
||||||
@ -16,4 +18,8 @@ public class ConfigUnarmedSubskills {
|
|||||||
public boolean isPreventItemTheft() {
|
public boolean isPreventItemTheft() {
|
||||||
return disarm.isPreventItemTheft();
|
return disarm.isPreventItemTheft();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ConfigUnarmedLimitBreak getUnarmedLimitBreak() {
|
||||||
|
return unarmedLimitBreak;
|
||||||
|
}
|
||||||
}
|
}
|
@ -201,7 +201,7 @@ public class Roll extends AcrobaticsSubSkill {
|
|||||||
return gracefulRollCheck(player, mcMMOPlayer, damage, skillLevel);
|
return gracefulRollCheck(player, mcMMOPlayer, damage, skillLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
double modifiedDamage = calculateModifiedRollDamage(damage, pluginRef.getConfigManager().getConfigAcrobatics().getRollDamageTheshold());
|
double modifiedDamage = calculateModifiedRollDamage(damage, pluginRef.getConfigManager().getConfigAcrobatics().getRollDamageThreshold());
|
||||||
|
|
||||||
if (!isFatal(player, modifiedDamage)
|
if (!isFatal(player, modifiedDamage)
|
||||||
&& pluginRef.getRandomChanceTools().isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.ACROBATICS_ROLL, player)) {
|
&& pluginRef.getRandomChanceTools().isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.ACROBATICS_ROLL, player)) {
|
||||||
@ -237,7 +237,7 @@ public class Roll extends AcrobaticsSubSkill {
|
|||||||
* @return the modified event damage if the ability was successful, the original event damage otherwise
|
* @return the modified event damage if the ability was successful, the original event damage otherwise
|
||||||
*/
|
*/
|
||||||
private double gracefulRollCheck(Player player, McMMOPlayer mcMMOPlayer, double damage, int skillLevel) {
|
private double gracefulRollCheck(Player player, McMMOPlayer mcMMOPlayer, double damage, int skillLevel) {
|
||||||
double modifiedDamage = calculateModifiedRollDamage(damage, pluginRef.getConfigManager().getConfigAcrobatics().getRollDamageTheshold() * 2);
|
double modifiedDamage = calculateModifiedRollDamage(damage, pluginRef.getConfigManager().getConfigAcrobatics().getRollDamageThreshold() * 2);
|
||||||
|
|
||||||
RandomChanceSkill rcs = new RandomChanceSkill(player, subSkillType);
|
RandomChanceSkill rcs = new RandomChanceSkill(player, subSkillType);
|
||||||
rcs.setSkillLevel(rcs.getSkillLevel() * 2); //Double the effective odds
|
rcs.setSkillLevel(rcs.getSkillLevel() * 2); //Double the effective odds
|
||||||
@ -395,7 +395,7 @@ public class Roll extends AcrobaticsSubSkill {
|
|||||||
//Chance Stat Calculations
|
//Chance Stat Calculations
|
||||||
rollChanceHalfMax = pluginRef.getRandomChanceTools().getRandomChanceExecutionChance(rollHalfMaxSkill);
|
rollChanceHalfMax = pluginRef.getRandomChanceTools().getRandomChanceExecutionChance(rollHalfMaxSkill);
|
||||||
graceChanceHalfMax = pluginRef.getRandomChanceTools().getRandomChanceExecutionChance(rollGraceHalfMaxSkill);
|
graceChanceHalfMax = pluginRef.getRandomChanceTools().getRandomChanceExecutionChance(rollGraceHalfMaxSkill);
|
||||||
damageThreshold = pluginRef.getConfigManager().getConfigAcrobatics().getRollDamageTheshold();
|
damageThreshold = pluginRef.getConfigManager().getConfigAcrobatics().getRollDamageThreshold();
|
||||||
|
|
||||||
chancePerLevel = pluginRef.getRandomChanceTools().getRandomChanceExecutionChance(rollOneSkillLevel);
|
chancePerLevel = pluginRef.getRandomChanceTools().getRandomChanceExecutionChance(rollOneSkillLevel);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user