Display Endurance Perk stats in skill commands

This commit is contained in:
TfT_02 2013-01-10 21:33:39 +01:00
parent e01b6f175c
commit bdfd7d9839
27 changed files with 201 additions and 15 deletions

View File

@ -20,6 +20,7 @@ public class AxesCommand extends SkillCommand {
private String impactDamage; private String impactDamage;
private String greaterImpactDamage; private String greaterImpactDamage;
private String skullSplitterLength; private String skullSplitterLength;
private String skullSplitterLengthEndurance;
private int bonusDamageAxesBonusMax = advancedConfig.getBonusDamageAxesBonusMax(); private int bonusDamageAxesBonusMax = advancedConfig.getBonusDamageAxesBonusMax();
private int bonusDamageAxesMaxBonusLevel = advancedConfig.getBonusDamageAxesMaxBonusLevel(); private int bonusDamageAxesMaxBonusLevel = advancedConfig.getBonusDamageAxesMaxBonusLevel();
@ -35,6 +36,7 @@ public class AxesCommand extends SkillCommand {
private boolean canImpact; private boolean canImpact;
private boolean canGreaterImpact; private boolean canGreaterImpact;
private boolean lucky; private boolean lucky;
private boolean endurance;
public AxesCommand() { public AxesCommand() {
super(SkillType.AXES); super(SkillType.AXES);
@ -49,7 +51,24 @@ public class AxesCommand extends SkillCommand {
//Armor Impact //Armor Impact
impactDamage = String.valueOf(1 + ((double) skillValue / (double) greaterImpactIncreaseLevel)); impactDamage = String.valueOf(1 + ((double) skillValue / (double) greaterImpactIncreaseLevel));
//Skull Splitter //Skull Splitter
skullSplitterLength = String.valueOf(2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel)); int length = 2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel);
skullSplitterLength = String.valueOf(length);
if (Permissions.activationTwelve(player)) {
length = length + 12;
}
else if (Permissions.activationEight(player)) {
length = length + 8;
}
else if (Permissions.activationFour(player)) {
length = length + 4;
}
int maxLength = SkillType.AXES.getAbility().getMaxTicks();
if (maxLength != 0 && length > maxLength) {
length = maxLength;
}
skullSplitterLengthEndurance = String.valueOf(length);
//Greater Impact //Greater Impact
greaterImpactDamage = String.valueOf(greaterImpactBonusDamage); greaterImpactDamage = String.valueOf(greaterImpactBonusDamage);
//Critical Strikes //Critical Strikes
@ -71,6 +90,7 @@ public class AxesCommand extends SkillCommand {
canImpact = Permissions.impact(player); canImpact = Permissions.impact(player);
canGreaterImpact = Permissions.greaterImpact(player); canGreaterImpact = Permissions.greaterImpact(player);
lucky = Permissions.luckyAxes(player); lucky = Permissions.luckyAxes(player);
endurance = Permissions.activationTwelve(player) || Permissions.activationEight(player) || Permissions.activationFour(player);
} }
@Override @Override
@ -133,6 +153,9 @@ public class AxesCommand extends SkillCommand {
} }
if (canSkullSplitter) { if (canSkullSplitter) {
if (endurance)
player.sendMessage(LocaleLoader.getString("Axes.Combat.SS.Length", new Object[] { skullSplitterLength }) + LocaleLoader.getString("Perks.activationtime.bonus", new Object[] { skullSplitterLengthEndurance }));
else
player.sendMessage(LocaleLoader.getString("Axes.Combat.SS.Length", new Object[] { skullSplitterLength })); player.sendMessage(LocaleLoader.getString("Axes.Combat.SS.Length", new Object[] { skullSplitterLength }));
} }
} }

View File

@ -11,12 +11,14 @@ import com.gmail.nossr50.util.Permissions;
public class ExcavationCommand extends SkillCommand { public class ExcavationCommand extends SkillCommand {
AdvancedConfig advancedConfig = AdvancedConfig.getInstance(); AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
private String gigaDrillBreakerLength; private String gigaDrillBreakerLength;
private String gigaDrillBreakerLengthEndurance;
private int abilityLengthIncreaseLevel = advancedConfig.getAbilityLength(); private int abilityLengthIncreaseLevel = advancedConfig.getAbilityLength();
private boolean canGigaDrill; private boolean canGigaDrill;
private boolean canTreasureHunt; private boolean canTreasureHunt;
private boolean lucky; private boolean lucky;
private boolean endurance;
public ExcavationCommand() { public ExcavationCommand() {
super(SkillType.EXCAVATION); super(SkillType.EXCAVATION);
@ -24,7 +26,23 @@ public class ExcavationCommand extends SkillCommand {
@Override @Override
protected void dataCalculations() { protected void dataCalculations() {
gigaDrillBreakerLength = String.valueOf(2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel)); int length = 2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel);
gigaDrillBreakerLength = String.valueOf(length);
if (Permissions.activationTwelve(player)) {
length = length + 12;
}
else if (Permissions.activationEight(player)) {
length = length + 8;
}
else if (Permissions.activationFour(player)) {
length = length + 4;
}
int maxLength = SkillType.EXCAVATION.getAbility().getMaxTicks();
if (maxLength != 0 && length > maxLength) {
length = maxLength;
}
gigaDrillBreakerLengthEndurance = String.valueOf(length);
} }
@Override @Override
@ -32,6 +50,7 @@ public class ExcavationCommand extends SkillCommand {
canGigaDrill = Permissions.gigaDrillBreaker(player); canGigaDrill = Permissions.gigaDrillBreaker(player);
canTreasureHunt = Permissions.excavationTreasures(player); canTreasureHunt = Permissions.excavationTreasures(player);
lucky = Permissions.luckyExcavation(player); lucky = Permissions.luckyExcavation(player);
endurance = Permissions.activationTwelve(player) || Permissions.activationEight(player) || Permissions.activationFour(player);
} }
@Override @Override
@ -63,6 +82,9 @@ public class ExcavationCommand extends SkillCommand {
@Override @Override
protected void statsDisplay() { protected void statsDisplay() {
if (canGigaDrill) { if (canGigaDrill) {
if (endurance)
player.sendMessage(LocaleLoader.getString("Excavation.Effect.Length", new Object[] { gigaDrillBreakerLength }) + LocaleLoader.getString("Perks.activationtime.bonus", new Object[] { gigaDrillBreakerLengthEndurance }));
else
player.sendMessage(LocaleLoader.getString("Excavation.Effect.Length", new Object[] { gigaDrillBreakerLength })); player.sendMessage(LocaleLoader.getString("Excavation.Effect.Length", new Object[] { gigaDrillBreakerLength }));
} }
} }

View File

@ -15,6 +15,7 @@ public class HerbalismCommand extends SkillCommand {
AdvancedConfig advancedConfig = AdvancedConfig.getInstance(); AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
private String greenTerraLength; private String greenTerraLength;
private String greenTerraLengthEndurance;
private String greenThumbChance; private String greenThumbChance;
private String greenThumbChanceLucky; private String greenThumbChanceLucky;
private String greenThumbStage; private String greenThumbStage;
@ -39,6 +40,7 @@ public class HerbalismCommand extends SkillCommand {
private boolean canDoubleDrop; private boolean canDoubleDrop;
private boolean doubleDropsDisabled; private boolean doubleDropsDisabled;
private boolean lucky; private boolean lucky;
private boolean endurance;
public HerbalismCommand() { public HerbalismCommand() {
super(SkillType.HERBALISM); super(SkillType.HERBALISM);
@ -49,7 +51,24 @@ public class HerbalismCommand extends SkillCommand {
DecimalFormat df = new DecimalFormat("0.0"); DecimalFormat df = new DecimalFormat("0.0");
float greenThumbChanceF; float greenThumbChanceF;
float doubleDropChanceF; float doubleDropChanceF;
greenTerraLength = String.valueOf(2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel));
int length = 2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel);
greenTerraLength = String.valueOf(length);
if (Permissions.activationTwelve(player)) {
length = length + 12;
}
else if (Permissions.activationEight(player)) {
length = length + 8;
}
else if (Permissions.activationFour(player)) {
length = length + 4;
}
int maxLength = SkillType.HERBALISM.getAbility().getMaxTicks();
if (maxLength != 0 && length > maxLength) {
length = maxLength;
}
greenTerraLengthEndurance = String.valueOf(length);
//FARMERS DIET //FARMERS DIET
if (skillValue >= farmersDietMaxLevel) farmersDietRank = "5"; if (skillValue >= farmersDietMaxLevel) farmersDietRank = "5";
else farmersDietRank = String.valueOf((int) ((double) skillValue / (double) farmersDietRankChange)); else farmersDietRank = String.valueOf((int) ((double) skillValue / (double) farmersDietRankChange));
@ -81,6 +100,7 @@ public class HerbalismCommand extends SkillCommand {
canDoubleDrop = Permissions.herbalismDoubleDrops(player); canDoubleDrop = Permissions.herbalismDoubleDrops(player);
doubleDropsDisabled = configInstance.herbalismDoubleDropsDisabled(); doubleDropsDisabled = configInstance.herbalismDoubleDropsDisabled();
lucky = Permissions.luckyHerbalism(player); lucky = Permissions.luckyHerbalism(player);
endurance = Permissions.activationTwelve(player) || Permissions.activationEight(player) || Permissions.activationFour(player);
} }
@Override @Override
@ -124,6 +144,9 @@ public class HerbalismCommand extends SkillCommand {
@Override @Override
protected void statsDisplay() { protected void statsDisplay() {
if (canGreenTerra) { if (canGreenTerra) {
if (endurance)
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTe.Length", new Object[] { greenTerraLength }) + LocaleLoader.getString("Perks.activationtime.bonus", new Object[] { greenTerraLengthEndurance }));
else
player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTe.Length", new Object[] { greenTerraLength })); player.sendMessage(LocaleLoader.getString("Herbalism.Ability.GTe.Length", new Object[] { greenTerraLength }));
} }

View File

@ -17,6 +17,7 @@ public class MiningCommand extends SkillCommand {
private String doubleDropChance; private String doubleDropChance;
private String doubleDropChanceLucky; private String doubleDropChanceLucky;
private String superBreakerLength; private String superBreakerLength;
private String superBreakerLengthEndurance;
private String blastMiningRank; private String blastMiningRank;
private String blastRadiusIncrease; private String blastRadiusIncrease;
private String blastDamageDecrease; private String blastDamageDecrease;
@ -41,6 +42,7 @@ public class MiningCommand extends SkillCommand {
private boolean canDemoExpert; private boolean canDemoExpert;
private boolean doubleDropsDisabled; private boolean doubleDropsDisabled;
private boolean lucky; private boolean lucky;
private boolean endurance;
public MiningCommand() { public MiningCommand() {
super(SkillType.MINING); super(SkillType.MINING);
@ -51,7 +53,23 @@ public class MiningCommand extends SkillCommand {
DecimalFormat df = new DecimalFormat("0.0"); DecimalFormat df = new DecimalFormat("0.0");
float doubleDropChanceF; float doubleDropChanceF;
//Super Breaker //Super Breaker
superBreakerLength = String.valueOf(2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel)); int length = 2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel);
superBreakerLength = String.valueOf(length);
if (Permissions.activationTwelve(player)) {
length = length + 12;
}
else if (Permissions.activationEight(player)) {
length = length + 8;
}
else if (Permissions.activationFour(player)) {
length = length + 4;
}
int maxLength = SkillType.MINING.getAbility().getMaxTicks();
if (maxLength != 0 && length > maxLength) {
length = maxLength;
}
superBreakerLengthEndurance = String.valueOf(length);
//Double Drops //Double Drops
if (skillValue >= doubleDropsMaxLevel) doubleDropChanceF = (float) (doubleDropsMaxBonus); if (skillValue >= doubleDropsMaxLevel) doubleDropChanceF = (float) (doubleDropsMaxBonus);
else doubleDropChanceF = (float) ((doubleDropsMaxBonus / doubleDropsMaxLevel) * skillValue); else doubleDropChanceF = (float) ((doubleDropsMaxBonus / doubleDropsMaxLevel) * skillValue);
@ -118,6 +136,7 @@ public class MiningCommand extends SkillCommand {
canSuperBreaker = Permissions.superBreaker(player); canSuperBreaker = Permissions.superBreaker(player);
doubleDropsDisabled = configInstance.miningDoubleDropsDisabled(); doubleDropsDisabled = configInstance.miningDoubleDropsDisabled();
lucky = Permissions.luckyMining(player); lucky = Permissions.luckyMining(player);
endurance = Permissions.activationTwelve(player) || Permissions.activationEight(player) || Permissions.activationFour(player);
} }
@Override @Override
@ -168,6 +187,9 @@ public class MiningCommand extends SkillCommand {
} }
if (canSuperBreaker) { if (canSuperBreaker) {
if (endurance)
player.sendMessage(LocaleLoader.getString("Mining.Ability.Length", new Object[] { superBreakerLength }) + LocaleLoader.getString("Perks.activationtime.bonus", new Object[] { superBreakerLengthEndurance }));
else
player.sendMessage(LocaleLoader.getString("Mining.Ability.Length", new Object[] { superBreakerLength })); player.sendMessage(LocaleLoader.getString("Mining.Ability.Length", new Object[] { superBreakerLength }));
} }

View File

@ -19,6 +19,7 @@ public class SwordsCommand extends SkillCommand {
private String bleedChance; private String bleedChance;
private String bleedChanceLucky; private String bleedChanceLucky;
private String serratedStrikesLength; private String serratedStrikesLength;
private String serratedStrikesLengthEndurance;
private int abilityLengthIncreaseLevel = advancedConfig.getAbilityLength(); private int abilityLengthIncreaseLevel = advancedConfig.getAbilityLength();
private float bleedChanceMax = advancedConfig.getBleedChanceMax(); private float bleedChanceMax = advancedConfig.getBleedChanceMax();
@ -32,6 +33,7 @@ public class SwordsCommand extends SkillCommand {
private boolean canSerratedStrike; private boolean canSerratedStrike;
private boolean canBleed; private boolean canBleed;
private boolean lucky; private boolean lucky;
private boolean endurance;
public SwordsCommand() { public SwordsCommand() {
super(SkillType.SWORDS); super(SkillType.SWORDS);
@ -42,8 +44,26 @@ public class SwordsCommand extends SkillCommand {
DecimalFormat df = new DecimalFormat("0.0"); DecimalFormat df = new DecimalFormat("0.0");
float bleedChanceF; float bleedChanceF;
float counterAttackChanceF; float counterAttackChanceF;
serratedStrikesLength = String.valueOf(2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel)); //Serrated Strikes
int length = 2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel);
serratedStrikesLength = String.valueOf(length);
if (Permissions.activationTwelve(player)) {
length = length + 12;
}
else if (Permissions.activationEight(player)) {
length = length + 8;
}
else if (Permissions.activationFour(player)) {
length = length + 4;
}
int maxLength = SkillType.SWORDS.getAbility().getMaxTicks();
if (maxLength != 0 && length > maxLength) {
length = maxLength;
}
serratedStrikesLengthEndurance = String.valueOf(length);
//Bleed
if (skillValue >= bleedMaxLevel) bleedLength = String.valueOf(bleedMaxTicks); if (skillValue >= bleedMaxLevel) bleedLength = String.valueOf(bleedMaxTicks);
else bleedLength = String.valueOf(bleedBaseTicks); else bleedLength = String.valueOf(bleedBaseTicks);
@ -53,6 +73,7 @@ public class SwordsCommand extends SkillCommand {
if (bleedChanceF + bleedChanceF * 0.3333D >= 100D) bleedChanceLucky = df.format(100D); if (bleedChanceF + bleedChanceF * 0.3333D >= 100D) bleedChanceLucky = df.format(100D);
else bleedChanceLucky = df.format(bleedChanceF + bleedChanceF * 0.3333D); else bleedChanceLucky = df.format(bleedChanceF + bleedChanceF * 0.3333D);
//Counter Attack
if (skillValue >= counterMaxLevel) counterAttackChanceF = counterChanceMax; if (skillValue >= counterMaxLevel) counterAttackChanceF = counterChanceMax;
else counterAttackChanceF = (float) (((double) counterChanceMax / (double) counterMaxLevel) * skillValue); else counterAttackChanceF = (float) (((double) counterChanceMax / (double) counterMaxLevel) * skillValue);
counterAttackChance = df.format(counterAttackChanceF); counterAttackChance = df.format(counterAttackChanceF);
@ -66,6 +87,7 @@ public class SwordsCommand extends SkillCommand {
canCounter = Permissions.counterAttack(player); canCounter = Permissions.counterAttack(player);
canSerratedStrike = Permissions.serratedStrikes(player); canSerratedStrike = Permissions.serratedStrikes(player);
lucky = Permissions.luckySwords(player); lucky = Permissions.luckySwords(player);
endurance = Permissions.activationTwelve(player) || Permissions.activationEight(player) || Permissions.activationFour(player);
} }
@Override @Override
@ -118,6 +140,9 @@ public class SwordsCommand extends SkillCommand {
} }
if (canSerratedStrike) { if (canSerratedStrike) {
if (endurance)
player.sendMessage(LocaleLoader.getString("Swords.SS.Length", new Object[] { serratedStrikesLength }) + LocaleLoader.getString("Perks.activationtime.bonus", new Object[] { serratedStrikesLengthEndurance }));
else
player.sendMessage(LocaleLoader.getString("Swords.SS.Length", new Object[] { serratedStrikesLength })); player.sendMessage(LocaleLoader.getString("Swords.SS.Length", new Object[] { serratedStrikesLength }));
} }
} }

View File

@ -13,6 +13,7 @@ import com.gmail.nossr50.util.Permissions;
public class UnarmedCommand extends SkillCommand { public class UnarmedCommand extends SkillCommand {
AdvancedConfig advancedConfig = AdvancedConfig.getInstance(); AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
private String berserkLength; private String berserkLength;
private String berserkLengthEndurance;
private String deflectChance; private String deflectChance;
private String deflectChanceLucky; private String deflectChanceLucky;
private String disarmChance; private String disarmChance;
@ -32,6 +33,7 @@ public class UnarmedCommand extends SkillCommand {
private boolean canBonusDamage; private boolean canBonusDamage;
private boolean canDeflect; private boolean canDeflect;
private boolean lucky; private boolean lucky;
private boolean endurance;
public UnarmedCommand() { public UnarmedCommand() {
super(SkillType.UNARMED); super(SkillType.UNARMED);
@ -42,20 +44,40 @@ public class UnarmedCommand extends SkillCommand {
DecimalFormat df = new DecimalFormat("0.0"); DecimalFormat df = new DecimalFormat("0.0");
float disarmChanceF; float disarmChanceF;
float deflectChanceF; float deflectChanceF;
berserkLength = String.valueOf(2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel)); //Berserk
int length = 2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel);
berserkLength = String.valueOf(length);
if (Permissions.activationTwelve(player)) {
length = length + 12;
}
else if (Permissions.activationEight(player)) {
length = length + 8;
}
else if (Permissions.activationFour(player)) {
length = length + 4;
}
int maxLength = SkillType.UNARMED.getAbility().getMaxTicks();
if (maxLength != 0 && length > maxLength) {
length = maxLength;
}
berserkLengthEndurance = String.valueOf(length);
//Disarm
if (skillValue >= disarmMaxLevel) disarmChanceF = disarmChanceMax; if (skillValue >= disarmMaxLevel) disarmChanceF = disarmChanceMax;
else disarmChanceF = (float) (((double) disarmChanceMax / (double) disarmMaxLevel) * skillValue); else disarmChanceF = (float) (((double) disarmChanceMax / (double) disarmMaxLevel) * skillValue);
disarmChance = df.format(disarmChanceF); disarmChance = df.format(disarmChanceF);
if (disarmChanceF + disarmChanceF * 0.3333D >= 100D) disarmChanceLucky = df.format(100D); if (disarmChanceF + disarmChanceF * 0.3333D >= 100D) disarmChanceLucky = df.format(100D);
else disarmChanceLucky = df.format(disarmChanceF + disarmChanceF * 0.3333D); else disarmChanceLucky = df.format(disarmChanceF + disarmChanceF * 0.3333D);
//Deflect
if (skillValue >= deflectMaxLevel) deflectChanceF = deflectChanceMax; if (skillValue >= deflectMaxLevel) deflectChanceF = deflectChanceMax;
else deflectChanceF = (float) (((double) deflectChanceMax / (double) deflectMaxLevel) * skillValue); else deflectChanceF = (float) (((double) deflectChanceMax / (double) deflectMaxLevel) * skillValue);
deflectChance = df.format(deflectChanceF); deflectChance = df.format(deflectChanceF);
if (deflectChanceF + deflectChanceF * 0.3333D >= 100D) deflectChanceLucky = df.format(100D); if (deflectChanceF + deflectChanceF * 0.3333D >= 100D) deflectChanceLucky = df.format(100D);
else deflectChanceLucky = df.format(deflectChanceF + deflectChanceF * 0.3333D); else deflectChanceLucky = df.format(deflectChanceF + deflectChanceF * 0.3333D);
//Iron Arm
if (skillValue >= 250) ironArmBonus = String.valueOf(ironArmMaxBonus); if (skillValue >= 250) ironArmBonus = String.valueOf(ironArmMaxBonus);
else ironArmBonus = String.valueOf(3 + ((double) skillValue / (double) ironArmIncreaseLevel)); else ironArmBonus = String.valueOf(3 + ((double) skillValue / (double) ironArmIncreaseLevel));
} }
@ -67,6 +89,7 @@ public class UnarmedCommand extends SkillCommand {
canDeflect = Permissions.deflect(player); canDeflect = Permissions.deflect(player);
canDisarm = Permissions.disarm(player); canDisarm = Permissions.disarm(player);
lucky = Permissions.luckyUnarmed(player); lucky = Permissions.luckyUnarmed(player);
endurance = Permissions.activationTwelve(player) || Permissions.activationEight(player) || Permissions.activationFour(player);
} }
@Override @Override
@ -124,6 +147,9 @@ public class UnarmedCommand extends SkillCommand {
} }
if (canBerserk) { if (canBerserk) {
if (endurance)
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Berserk.Length", new Object[] { berserkLength }) + LocaleLoader.getString("Perks.activationtime.bonus", new Object[] { berserkLengthEndurance }));
else
player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Berserk.Length", new Object[] { berserkLength })); player.sendMessage(LocaleLoader.getString("Unarmed.Ability.Berserk.Length", new Object[] { berserkLength }));
} }
} }

View File

@ -14,6 +14,7 @@ import com.gmail.nossr50.util.Permissions;
public class WoodcuttingCommand extends SkillCommand { public class WoodcuttingCommand extends SkillCommand {
AdvancedConfig advancedConfig = AdvancedConfig.getInstance(); AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
private String treeFellerLength; private String treeFellerLength;
private String treeFellerLengthEndurance;
private String doubleDropChance; private String doubleDropChance;
private String doubleDropChanceLucky; private String doubleDropChanceLucky;
@ -27,6 +28,7 @@ public class WoodcuttingCommand extends SkillCommand {
private boolean canDoubleDrop; private boolean canDoubleDrop;
private boolean doubleDropsDisabled; private boolean doubleDropsDisabled;
private boolean lucky; private boolean lucky;
private boolean endurance;
public WoodcuttingCommand() { public WoodcuttingCommand() {
super(SkillType.WOODCUTTING); super(SkillType.WOODCUTTING);
@ -37,7 +39,26 @@ public class WoodcuttingCommand extends SkillCommand {
DecimalFormat df = new DecimalFormat("0.0"); DecimalFormat df = new DecimalFormat("0.0");
float doubleDropChanceF; float doubleDropChanceF;
treeFellerLength = String.valueOf(2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel)); //Tree Feller
int length = 2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel);
treeFellerLength = String.valueOf(length);
if (Permissions.activationTwelve(player)) {
length = length + 12;
}
else if (Permissions.activationEight(player)) {
length = length + 8;
}
else if (Permissions.activationFour(player)) {
length = length + 4;
}
int maxLength = SkillType.WOODCUTTING.getAbility().getMaxTicks();
if (maxLength != 0 && length > maxLength) {
length = maxLength;
}
treeFellerLengthEndurance = String.valueOf(length);
//Double Drops
if (skillValue >= doubleDropsMaxLevel) doubleDropChanceF = (float) (doubleDropsMaxBonus); if (skillValue >= doubleDropsMaxLevel) doubleDropChanceF = (float) (doubleDropsMaxBonus);
else doubleDropChanceF = (float) ((doubleDropsMaxBonus / doubleDropsMaxLevel) * skillValue); else doubleDropChanceF = (float) ((doubleDropsMaxBonus / doubleDropsMaxLevel) * skillValue);
doubleDropChance = df.format(doubleDropChanceF); doubleDropChance = df.format(doubleDropChanceF);
@ -54,6 +75,7 @@ public class WoodcuttingCommand extends SkillCommand {
canLeafBlow = Permissions.leafBlower(player); canLeafBlow = Permissions.leafBlower(player);
doubleDropsDisabled = configInstance.woodcuttingDoubleDropsDisabled(); doubleDropsDisabled = configInstance.woodcuttingDoubleDropsDisabled();
lucky = Permissions.luckyWoodcutting(player); lucky = Permissions.luckyWoodcutting(player);
endurance = Permissions.activationTwelve(player) || Permissions.activationEight(player) || Permissions.activationFour(player);
} }
@Override @Override
@ -106,6 +128,9 @@ public class WoodcuttingCommand extends SkillCommand {
} }
if (canTreeFell) { if (canTreeFell) {
if (endurance)
player.sendMessage(LocaleLoader.getString("Woodcutting.Ability.Length", new Object[] { treeFellerLength }) + LocaleLoader.getString("Perks.activationtime.bonus", new Object[] { treeFellerLengthEndurance }));
else
player.sendMessage(LocaleLoader.getString("Woodcutting.Ability.Length", new Object[] { treeFellerLength })); player.sendMessage(LocaleLoader.getString("Woodcutting.Ability.Length", new Object[] { treeFellerLength }));
} }
} }

View File

@ -469,3 +469,4 @@ Perks.cooldowns.name=Fast Recovery
Perks.cooldowns.desc=Cuts cooldown duration by {0}. Perks.cooldowns.desc=Cuts cooldown duration by {0}.
Perks.activationtime.name=Endurance Perks.activationtime.name=Endurance
Perks.activationtime.desc=Increases ability activation time by {0} seconds. Perks.activationtime.desc=Increases ability activation time by {0} seconds.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)

View File

@ -466,3 +466,4 @@ Perks.cooldowns.name=Fast Recovery
Perks.cooldowns.desc=Cuts cooldown duration by {0}. Perks.cooldowns.desc=Cuts cooldown duration by {0}.
Perks.activationtime.name=Endurance Perks.activationtime.name=Endurance
Perks.activationtime.desc=Increases ability activation time by {0} seconds. Perks.activationtime.desc=Increases ability activation time by {0} seconds.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)

View File

@ -469,3 +469,4 @@ Perks.cooldowns.name=Fast Recovery
Perks.cooldowns.desc=Cuts cooldown duration by {0}. Perks.cooldowns.desc=Cuts cooldown duration by {0}.
Perks.activationtime.name=Endurance Perks.activationtime.name=Endurance
Perks.activationtime.desc=Increases ability activation time by {0} seconds. Perks.activationtime.desc=Increases ability activation time by {0} seconds.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)

View File

@ -531,3 +531,4 @@ Perks.cooldowns.name=Schnelle Wiederherstellung
Perks.cooldowns.desc=Verk\u00FCrzt die Cooldownzeit um {0}. Perks.cooldowns.desc=Verk\u00FCrzt die Cooldownzeit um {0}.
Perks.activationtime.name=Ausdauer Perks.activationtime.name=Ausdauer
Perks.activationtime.desc=Erh\u00F6ht die Aktivierungszeit von F\u00E4higkeiten um {0} Sekunden. Perks.activationtime.desc=Erh\u00F6ht die Aktivierungszeit von F\u00E4higkeiten um {0} Sekunden.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)

View File

@ -540,3 +540,4 @@ Perks.cooldowns.name=Fast Recovery
Perks.cooldowns.desc=Cuts cooldown duration by {0}. Perks.cooldowns.desc=Cuts cooldown duration by {0}.
Perks.activationtime.name=Endurance Perks.activationtime.name=Endurance
Perks.activationtime.desc=Increases ability activation time by {0} seconds. Perks.activationtime.desc=Increases ability activation time by {0} seconds.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)

View File

@ -469,3 +469,4 @@ Perks.cooldowns.name=Fast Recovery
Perks.cooldowns.desc=Cuts cooldown duration by {0}. Perks.cooldowns.desc=Cuts cooldown duration by {0}.
Perks.activationtime.name=Endurance Perks.activationtime.name=Endurance
Perks.activationtime.desc=Increases ability activation time by {0} seconds. Perks.activationtime.desc=Increases ability activation time by {0} seconds.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)

View File

@ -469,3 +469,4 @@ Perks.cooldowns.name=Fast Recovery
Perks.cooldowns.desc=Cuts cooldown duration by {0}. Perks.cooldowns.desc=Cuts cooldown duration by {0}.
Perks.activationtime.name=Endurance Perks.activationtime.name=Endurance
Perks.activationtime.desc=Increases ability activation time by {0} seconds. Perks.activationtime.desc=Increases ability activation time by {0} seconds.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)

View File

@ -469,3 +469,4 @@ Perks.cooldowns.name=Fast Recovery
Perks.cooldowns.desc=Cuts cooldown duration by {0}. Perks.cooldowns.desc=Cuts cooldown duration by {0}.
Perks.activationtime.name=Endurance Perks.activationtime.name=Endurance
Perks.activationtime.desc=Increases ability activation time by {0} seconds. Perks.activationtime.desc=Increases ability activation time by {0} seconds.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)

View File

@ -469,3 +469,4 @@ Perks.cooldowns.name=Recupero Rapido
Perks.cooldowns.desc=Riduce la durata del raffreddamento di {0}. Perks.cooldowns.desc=Riduce la durata del raffreddamento di {0}.
Perks.activationtime.name=Resistenza Perks.activationtime.name=Resistenza
Perks.activationtime.desc=Incrementa il tempo di attivazione dell\'abilit\u00e0 di {0} secondi. Perks.activationtime.desc=Incrementa il tempo di attivazione dell\'abilit\u00e0 di {0} secondi.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)

View File

@ -469,3 +469,4 @@ Perks.cooldowns.name=Fast Recovery
Perks.cooldowns.desc=Cuts cooldown duration by {0}. Perks.cooldowns.desc=Cuts cooldown duration by {0}.
Perks.activationtime.name=Endurance Perks.activationtime.name=Endurance
Perks.activationtime.desc=Increases ability activation time by {0} seconds. Perks.activationtime.desc=Increases ability activation time by {0} seconds.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)

View File

@ -469,3 +469,4 @@ Perks.cooldowns.name=Fast Recovery
Perks.cooldowns.desc=Cuts cooldown duration by {0}. Perks.cooldowns.desc=Cuts cooldown duration by {0}.
Perks.activationtime.name=Endurance Perks.activationtime.name=Endurance
Perks.activationtime.desc=Increases ability activation time by {0} seconds. Perks.activationtime.desc=Increases ability activation time by {0} seconds.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)

View File

@ -469,3 +469,4 @@ Perks.cooldowns.name=Fast Recovery
Perks.cooldowns.desc=Cuts cooldown duration by {0}. Perks.cooldowns.desc=Cuts cooldown duration by {0}.
Perks.activationtime.name=Endurance Perks.activationtime.name=Endurance
Perks.activationtime.desc=Increases ability activation time by {0} seconds. Perks.activationtime.desc=Increases ability activation time by {0} seconds.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)

View File

@ -469,3 +469,4 @@ Perks.cooldowns.name=Fast Recovery
Perks.cooldowns.desc=Cuts cooldown duration by {0}. Perks.cooldowns.desc=Cuts cooldown duration by {0}.
Perks.activationtime.name=Endurance Perks.activationtime.name=Endurance
Perks.activationtime.desc=Increases ability activation time by {0} seconds. Perks.activationtime.desc=Increases ability activation time by {0} seconds.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)

View File

@ -469,3 +469,4 @@ Perks.cooldowns.name=Fast Recovery
Perks.cooldowns.desc=Cuts cooldown duration by {0}. Perks.cooldowns.desc=Cuts cooldown duration by {0}.
Perks.activationtime.name=Endurance Perks.activationtime.name=Endurance
Perks.activationtime.desc=Increases ability activation time by {0} seconds. Perks.activationtime.desc=Increases ability activation time by {0} seconds.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)

View File

@ -469,3 +469,4 @@ Perks.cooldowns.name=Fast Recovery
Perks.cooldowns.desc=Cuts cooldown duration by {0}. Perks.cooldowns.desc=Cuts cooldown duration by {0}.
Perks.activationtime.name=Endurance Perks.activationtime.name=Endurance
Perks.activationtime.desc=Increases ability activation time by {0} seconds. Perks.activationtime.desc=Increases ability activation time by {0} seconds.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)

View File

@ -469,3 +469,4 @@ Perks.cooldowns.name=Fast Recovery
Perks.cooldowns.desc=Cuts cooldown duration by {0}. Perks.cooldowns.desc=Cuts cooldown duration by {0}.
Perks.activationtime.name=Endurance Perks.activationtime.name=Endurance
Perks.activationtime.desc=Increases ability activation time by {0} seconds. Perks.activationtime.desc=Increases ability activation time by {0} seconds.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)

View File

@ -469,3 +469,4 @@ Perks.cooldowns.name=Fast Recovery
Perks.cooldowns.desc=Cuts cooldown duration by {0}. Perks.cooldowns.desc=Cuts cooldown duration by {0}.
Perks.activationtime.name=Endurance Perks.activationtime.name=Endurance
Perks.activationtime.desc=Increases ability activation time by {0} seconds. Perks.activationtime.desc=Increases ability activation time by {0} seconds.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)

View File

@ -469,3 +469,4 @@ Perks.cooldowns.name=Fast Recovery
Perks.cooldowns.desc=Cuts cooldown duration by {0}. Perks.cooldowns.desc=Cuts cooldown duration by {0}.
Perks.activationtime.name=Endurance Perks.activationtime.name=Endurance
Perks.activationtime.desc=Increases ability activation time by {0} seconds. Perks.activationtime.desc=Increases ability activation time by {0} seconds.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)

View File

@ -469,3 +469,4 @@ Perks.cooldowns.name=Fast Recovery
Perks.cooldowns.desc=Cuts cooldown duration by {0}. Perks.cooldowns.desc=Cuts cooldown duration by {0}.
Perks.activationtime.name=Endurance Perks.activationtime.name=Endurance
Perks.activationtime.desc=Increases ability activation time by {0} seconds. Perks.activationtime.desc=Increases ability activation time by {0} seconds.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)

View File

@ -469,3 +469,4 @@ Perks.cooldowns.name=Fast Recovery
Perks.cooldowns.desc=Cuts cooldown duration by {0}. Perks.cooldowns.desc=Cuts cooldown duration by {0}.
Perks.activationtime.name=Endurance Perks.activationtime.name=Endurance
Perks.activationtime.desc=Increases ability activation time by {0} seconds. Perks.activationtime.desc=Increases ability activation time by {0} seconds.
Perks.activationtime.bonus=[[GOLD]] ({0}s with Endurance Perk)