fixed /mmoinfo roll (#4088)

* acrobatics roll mmoinfo fixes

LocaleLoader#getString() accepts Object arrays no need to call getStats twice

Max skill level is now configurable and so halfMaxSkillValue is now a variable which should be used on locale too instead of "50"

* Updated locale_it

Acrobatics.SubSkill.Roll.Mechanics supports half level variable instead of static level 50

* Updated locale_en_US

Acrobatics.SubSkill.Roll.Mechanics supports half level variable instead of static level 50

* Updated Locale it

fixed value
This commit is contained in:
emanondev
2020-08-07 03:46:12 +02:00
committed by GitHub
parent 375292c0b3
commit 38017cabe7
3 changed files with 9 additions and 6 deletions

View File

@ -337,7 +337,7 @@ public class Roll extends AcrobaticsSubSkill {
//player.sendMessage(getDescription());
//Player stats
player.sendMessage(LocaleLoader.getString("Commands.MmoInfo.Stats",
LocaleLoader.getString("Acrobatics.SubSkill.Roll.Stats", getStats(player)[0], getStats(player)[1])));
LocaleLoader.getString("Acrobatics.SubSkill.Roll.Stats", getStats(player))));
//Mechanics
player.sendMessage(LocaleLoader.getString("Commands.MmoInfo.Mechanics"));
@ -357,6 +357,9 @@ public class Roll extends AcrobaticsSubSkill {
//1 = chance to roll with grace at half max level
//2 = level where maximum bonus is reached
//3 = additive chance to succeed per level
//4 = damage threshold when rolling
//5 = damage threshold when rolling with grace
//6 = half of level where maximum bonus is reached
/*
Roll:
# ChanceMax: Maximum chance of rolling when on <MaxBonusLevel> or higher
@ -370,7 +373,7 @@ public class Roll extends AcrobaticsSubSkill {
//Chance to roll at half max skill
RandomChanceSkill rollHalfMaxSkill = new RandomChanceSkill(null, subSkillType);
int halfMaxSkillValue = mcMMO.isRetroModeEnabled() ? 500 : 50;
int halfMaxSkillValue = AdvancedConfig.getInstance().getMaxBonusLevel(SubSkillType.ACROBATICS_ROLL)/2;
rollHalfMaxSkill.setSkillLevel(halfMaxSkillValue);
//Chance to graceful roll at full skill
@ -390,7 +393,7 @@ public class Roll extends AcrobaticsSubSkill {
double maxLevel = AdvancedConfig.getInstance().getMaxBonusLevel(SubSkillType.ACROBATICS_ROLL);
return LocaleLoader.getString("Acrobatics.SubSkill.Roll.Mechanics", rollChanceHalfMax, graceChanceHalfMax, maxLevel, chancePerLevel, damageThreshold, damageThreshold * 2);
return LocaleLoader.getString("Acrobatics.SubSkill.Roll.Mechanics", rollChanceHalfMax, graceChanceHalfMax, maxLevel, chancePerLevel, damageThreshold, damageThreshold * 2,halfMaxSkillValue);
}
/**
@ -425,4 +428,4 @@ public class Roll extends AcrobaticsSubSkill {
{
return player.getLocation().getBlock().getLocation();
}
}
}