mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Update Unarmed
This commit is contained in:
parent
9b0023d2d7
commit
c467f79d32
@ -36,6 +36,13 @@ public class UnarmedCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
protected void dataCalculations(Player player, float skillValue, boolean isLucky) {
|
||||||
|
// UNARMED_ARROW_DEFLECT
|
||||||
|
if (canDeflect) {
|
||||||
|
String[] deflectStrings = calculateAbilityDisplayValues(skillValue, SubSkillType.UNARMED_ARROW_DEFLECT, isLucky);
|
||||||
|
deflectChance = deflectStrings[0];
|
||||||
|
deflectChanceLucky = deflectStrings[1];
|
||||||
|
}
|
||||||
|
|
||||||
// BERSERK
|
// BERSERK
|
||||||
if (canBerserk) {
|
if (canBerserk) {
|
||||||
String[] berserkStrings = calculateLengthDisplayValues(player, skillValue);
|
String[] berserkStrings = calculateLengthDisplayValues(player, skillValue);
|
||||||
@ -50,13 +57,6 @@ public class UnarmedCommand extends SkillCommand {
|
|||||||
disarmChanceLucky = disarmStrings[1];
|
disarmChanceLucky = disarmStrings[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
// UNARMED_ARROW_DEFLECT
|
|
||||||
if (canDeflect) {
|
|
||||||
String[] deflectStrings = calculateAbilityDisplayValues(skillValue, SubSkillType.UNARMED_ARROW_DEFLECT, isLucky);
|
|
||||||
deflectChance = deflectStrings[0];
|
|
||||||
deflectChanceLucky = deflectStrings[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
// IRON ARM
|
// IRON ARM
|
||||||
if (canIronArm) {
|
if (canIronArm) {
|
||||||
ironArmBonus = Math.min(Unarmed.ironArmMinBonusDamage + ((int) skillValue / Unarmed.ironArmIncreaseLevel), Unarmed.ironArmMaxBonusDamage);
|
ironArmBonus = Math.min(Unarmed.ironArmMinBonusDamage + ((int) skillValue / Unarmed.ironArmIncreaseLevel), Unarmed.ironArmMaxBonusDamage);
|
||||||
@ -84,34 +84,34 @@ public class UnarmedCommand extends SkillCommand {
|
|||||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<String>();
|
List<String> messages = new ArrayList<String>();
|
||||||
|
|
||||||
if (canIronArm) {
|
|
||||||
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Unarmed.Ability.Bonus.0"), LocaleLoader.getString("Unarmed.Ability.Bonus.1", ironArmBonus)));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (canDeflect) {
|
if (canDeflect) {
|
||||||
messages.add(getStatMessage(SubSkillType.UNARMED_ARROW_DEFLECT, deflectChance)
|
messages.add(getStatMessage(SubSkillType.UNARMED_ARROW_DEFLECT, deflectChance)
|
||||||
+ (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", deflectChanceLucky) : ""));
|
+ (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", deflectChanceLucky) : ""));
|
||||||
//messages.add(LocaleLoader.getString("Unarmed.Ability.Chance.ArrowDeflect", deflectChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", deflectChanceLucky) : ""));
|
//messages.add(LocaleLoader.getString("Unarmed.Ability.Chance.ArrowDeflect", deflectChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", deflectChanceLucky) : ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (canBerserk) {
|
||||||
|
messages.add(getStatMessage(SubSkillType.UNARMED_BERSERK, berserkLength)
|
||||||
|
+ (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", berserkLengthEndurance) : ""));
|
||||||
|
//messages.add(LocaleLoader.getString("Unarmed.Ability.Berserk.Length", berserkLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", berserkLengthEndurance) : ""));
|
||||||
|
}
|
||||||
|
|
||||||
if (canDisarm) {
|
if (canDisarm) {
|
||||||
messages.add(getStatMessage(SubSkillType.UNARMED_DISARM, disarmChance)
|
messages.add(getStatMessage(SubSkillType.UNARMED_DISARM, disarmChance)
|
||||||
+ (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", disarmChanceLucky) : ""));
|
+ (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", disarmChanceLucky) : ""));
|
||||||
//messages.add(LocaleLoader.getString("Unarmed.Ability.Chance.Disarm", disarmChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", disarmChanceLucky) : ""));
|
//messages.add(LocaleLoader.getString("Unarmed.Ability.Chance.Disarm", disarmChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", disarmChanceLucky) : ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (canIronArm) {
|
||||||
|
messages.add(LocaleLoader.getString("Ability.Generic.Template", LocaleLoader.getString("Unarmed.Ability.Bonus.0"), LocaleLoader.getString("Unarmed.Ability.Bonus.1", ironArmBonus)));
|
||||||
|
}
|
||||||
|
|
||||||
if (canIronGrip) {
|
if (canIronGrip) {
|
||||||
messages.add(getStatMessage(SubSkillType.UNARMED_IRON_GRIP, ironGripChance)
|
messages.add(getStatMessage(SubSkillType.UNARMED_IRON_GRIP, ironGripChance)
|
||||||
+ (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", ironGripChanceLucky) : ""));
|
+ (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", ironGripChanceLucky) : ""));
|
||||||
//messages.add(LocaleLoader.getString("Unarmed.Ability.Chance.IronGrip", ironGripChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", ironGripChanceLucky) : ""));
|
//messages.add(LocaleLoader.getString("Unarmed.Ability.Chance.IronGrip", ironGripChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", ironGripChanceLucky) : ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canBerserk) {
|
|
||||||
messages.add(getStatMessage(SubSkillType.UNARMED_BERSERK, berserkLength)
|
|
||||||
+ (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", berserkLengthEndurance) : ""));
|
|
||||||
//messages.add(LocaleLoader.getString("Unarmed.Ability.Berserk.Length", berserkLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", berserkLengthEndurance) : ""));
|
|
||||||
}
|
|
||||||
|
|
||||||
return messages;
|
return messages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user