mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Axes gains bonus DMG every 50 levels like Unarmed now.
This commit is contained in:
parent
5d9ac614c2
commit
8d00468412
@ -30,7 +30,13 @@ public class AxesCommand implements CommandExecutor {
|
||||
else
|
||||
percentage = "75";
|
||||
|
||||
int bonusDmg = Users.getProfile(player).getSkillLevel(SkillType.AXES)/50;
|
||||
if(bonusDmg > 4)
|
||||
bonusDmg = 4;
|
||||
|
||||
int ticks = 2;
|
||||
short durDmg = 5;
|
||||
durDmg+=Users.getProfile(player).getSkillLevel(SkillType.AXES)/30;
|
||||
int x = PP.getSkillLevel(SkillType.AXES);
|
||||
while (x >= 50) {
|
||||
x -= 50;
|
||||
@ -47,15 +53,15 @@ public class AxesCommand implements CommandExecutor {
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAxes1_0"), mcLocale.getString("m.EffectsAxes1_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAxes2_0"), mcLocale.getString("m.EffectsAxes2_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAxes3_0"), mcLocale.getString("m.EffectsAxes3_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAxes4_0"), mcLocale.getString("m.EffectsAxes4_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsAxes5_0"), mcLocale.getString("m.EffectsAxes5_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") }));
|
||||
player.sendMessage(mcLocale.getString("m.AxesCritChance", new Object[] { percentage }));
|
||||
|
||||
if (PP.getSkillLevel(SkillType.AXES) < 500)
|
||||
player.sendMessage(mcLocale.getString("m.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockAxes1") }));
|
||||
else
|
||||
player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusAxes1_0"), mcLocale.getString("m.AbilBonusAxes1_1") }));
|
||||
|
||||
player.sendMessage(mcLocale.getString("m.AxesSkullLength", new Object[] { ticks }));
|
||||
player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusAxes1_0"), mcLocale.getString("m.AbilBonusAxes1_1", new Object[] {bonusDmg}) }));
|
||||
player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusAxes2_0"), mcLocale.getString("m.AbilBonusAxes2_1", new Object[] {durDmg}) }));
|
||||
player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusAxes3_0"), mcLocale.getString("m.AbilBonusAxes3_1", new Object[] {1}) }));
|
||||
player.sendMessage(mcLocale.getString("m.AxesSkullLength", new Object[] { ticks }));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -37,7 +37,18 @@ import com.gmail.nossr50.datatypes.SkillType;
|
||||
import com.gmail.nossr50.party.Party;
|
||||
|
||||
public class Axes {
|
||||
public static void axesBonus(Player attacker, EntityDamageByEntityEvent event)
|
||||
{
|
||||
int bonus = 0;
|
||||
|
||||
//Add 1 DMG for every 50 skill levels
|
||||
bonus += Users.getProfile(attacker).getSkillLevel(SkillType.AXES)/50;
|
||||
|
||||
if(bonus > 4)
|
||||
bonus = 4;
|
||||
|
||||
event.setDamage(event.getDamage() + bonus);
|
||||
}
|
||||
public static void axeCriticalCheck(Player attacker, EntityDamageByEntityEvent event, Plugin pluginx)
|
||||
{
|
||||
Entity x = event.getEntity();
|
||||
@ -93,6 +104,11 @@ public class Axes {
|
||||
{
|
||||
Player targetPlayer = (Player) target;
|
||||
int emptySlots = 0;
|
||||
short durDmg = 5; //Start with 5 durability dmg
|
||||
|
||||
durDmg+=Users.getProfile(attacker).getSkillLevel(SkillType.AXES)/30; //Every 30 Skill Levels you gain 1 durability dmg
|
||||
|
||||
System.out.println(durDmg);
|
||||
|
||||
for(ItemStack x : targetPlayer.getInventory().getArmorContents())
|
||||
{
|
||||
@ -100,7 +116,7 @@ public class Axes {
|
||||
{
|
||||
emptySlots++;
|
||||
} else {
|
||||
x.setDurability((short) (x.getDurability()+30)); //Damage armor piece
|
||||
x.setDurability((short) (x.getDurability()+durDmg)); //Damage armor piece
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -101,9 +101,17 @@ m.EffectsAxes2_0=Critical Strikes
|
||||
m.EffectsAxes2_1=Double Damage
|
||||
m.EffectsAxes3_0=Axe Mastery
|
||||
m.EffectsAxes3_1=Modifies Damage
|
||||
m.EffectsAxes4_0=Impact
|
||||
m.EffectsAxes4_1=Strike with enough force to shatter armor
|
||||
m.EffectsAxes5_0=Greater Impact
|
||||
m.EffectsAxes5_1=Deal bonus damage to unarmored foes
|
||||
m.AbilLockAxes1=LOCKED UNTIL 500+ SKILL (AXE MASTERY)
|
||||
m.AbilBonusAxes1_0=Axe Mastery
|
||||
m.AbilBonusAxes1_1=Bonus 4 damage
|
||||
m.AbilBonusAxes1_1=Bonus {0} damage
|
||||
m.AbilBonusAxes2_0=Impact
|
||||
m.AbilBonusAxes2_1=Deal {0} DMG to armor
|
||||
m.AbilBonusAxes3_0=Greater Impact
|
||||
m.AbilBonusAxes3_1=Deal {0} Bonus DMG to the unarmored
|
||||
m.AxesCritChance=[[RED]]Chance to critically strike: [[YELLOW]]{0}%
|
||||
m.AxesSkullLength=[[RED]]Skull Splitter Length: [[YELLOW]]{0}s
|
||||
m.SkillSwords=SWORDS
|
||||
|
Loading…
Reference in New Issue
Block a user