mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Adding roll stats to Acrobatic's stat display
This commit is contained in:
parent
6d720e6ab1
commit
ebbfe72259
@ -1,7 +1,10 @@
|
||||
package com.gmail.nossr50.commands.skills;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||
import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill;
|
||||
import com.gmail.nossr50.listeners.InteractionManager;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.util.TextComponentFactory;
|
||||
import com.gmail.nossr50.util.skills.SkillUtils;
|
||||
@ -58,16 +61,27 @@ public class AcrobaticsCommand extends SkillCommand {
|
||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||
List<String> messages = new ArrayList<String>();
|
||||
|
||||
/*if (canRoll) {
|
||||
messages.add(getStatMessage(SubSkillType.ACROBATICS_ROLL, dazeChance)
|
||||
+ (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", dazeChanceLucky) : ""));
|
||||
messages.add(LocaleLoader.getString("Acrobatics.Roll.Chance", rollChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", rollChanceLucky) : ""));
|
||||
}
|
||||
|
||||
if (canRoll) {
|
||||
messages.add(LocaleLoader.getString("Acrobatics.Roll.GraceChance", gracefulRollChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", gracefulRollChanceLucky) : ""));
|
||||
}*/
|
||||
|
||||
AbstractSubSkill abstractSubSkill = InteractionManager.getAbstractByName("Roll");
|
||||
|
||||
if(abstractSubSkill != null)
|
||||
{
|
||||
double maxBonusLevel = AdvancedConfig.getInstance().getMaxBonusLevel(abstractSubSkill);
|
||||
double maxChance = AdvancedConfig.getInstance().getMaxChance(abstractSubSkill);
|
||||
double rollChance = SkillUtils.getChanceOfSuccess(skillValue, maxBonusLevel, maxChance);
|
||||
double graceChance = SkillUtils.getChanceOfSuccess(skillValue, maxBonusLevel, maxChance / 2);
|
||||
|
||||
String rollChanceLucky = isLucky ? percent.format(Math.min(rollChance * 1.3333D, 100.0D) / 100.0D) : null;
|
||||
String graceChanceLucky = isLucky ? percent.format(Math.min(rollChance * 1.3333D, 100.0D) / 100.0D) : null;
|
||||
|
||||
|
||||
messages.add(getStatMessage(SubSkillType.ACROBATICS_ROLL, percent.format(rollChance))
|
||||
+ (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", rollChanceLucky) : ""));
|
||||
messages.add(getStatMessage(true, false, SubSkillType.ACROBATICS_ROLL, percent.format(graceChance))
|
||||
+ (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", graceChanceLucky) : ""));
|
||||
}
|
||||
}
|
||||
|
||||
if (canDodge) {
|
||||
messages.add(getStatMessage(SubSkillType.ACROBATICS_DODGE, dodgeChance)
|
||||
|
@ -125,8 +125,8 @@ XPBar.Complex.Template={0} [[DARK_AQUA]] {4}[[WHITE]]% [[DARK_AQUA]]([[WHITE]]{1
|
||||
#ACROBATICS
|
||||
Acrobatics.Ability.Proc=[[GREEN]]**Graceful Landing**
|
||||
Acrobatics.Combat.Proc=[[GREEN]]**Dodged**
|
||||
Acrobatics.DodgeChance=Dodge Chance: [[YELLOW]]{0}
|
||||
Acrobatics.SubSkill.Roll.Stats=[[GOLD]]Roll Chance [[YELLOW]]{0}%[[GOLD]] Graceful Roll Chance[[YELLOW]] {1}%
|
||||
Acrobatics.SubSkill.Roll.Stat=Roll Chance
|
||||
Acrobatics.SubSkill.Roll.Stat.Extra=Graceful Roll Chance
|
||||
Acrobatics.SubSkill.Roll.Name=Roll
|
||||
Acrobatics.SubSkill.Roll.Description=Land strategically to avoid damage.
|
||||
Acrobatics.SubSkill.Roll.Chance=Roll Chance: [[YELLOW]]{0}
|
||||
@ -206,7 +206,6 @@ Excavation.SubSkill.GigaDrillBreaker.Description=3x Drop Rate, 3x EXP, +Speed
|
||||
Excavation.SubSkill.GigaDrillBreaker.Stat=Giga Drill Breaker Duration
|
||||
Excavation.SubSkill.Archaeology.Name=Archaeology
|
||||
Excavation.SubSkill.Archaeology.Description=Unearth the secrets of the land!
|
||||
Excavation.Effect.Length=Giga Drill Breaker Length: [[YELLOW]]{0}s
|
||||
Excavation.Listener=Excavation:
|
||||
Excavation.SkillName=EXCAVATION
|
||||
Excavation.Skills.GigaDrillBreaker.Off=**Giga Drill Breaker has worn off**
|
||||
|
Loading…
Reference in New Issue
Block a user