Axes gains bonus DMG every 50 levels like Unarmed now.

This commit is contained in:
nossr50 2012-02-29 15:40:16 -08:00
parent 5d9ac614c2
commit 8d00468412
3 changed files with 40 additions and 10 deletions

View File

@ -29,8 +29,14 @@ public class AxesCommand implements CommandExecutor {
percentage = String.valueOf((skillvalue / 1000) * 100); percentage = String.valueOf((skillvalue / 1000) * 100);
else else
percentage = "75"; percentage = "75";
int bonusDmg = Users.getProfile(player).getSkillLevel(SkillType.AXES)/50;
if(bonusDmg > 4)
bonusDmg = 4;
int ticks = 2; int ticks = 2;
short durDmg = 5;
durDmg+=Users.getProfile(player).getSkillLevel(SkillType.AXES)/30;
int x = PP.getSkillLevel(SkillType.AXES); int x = PP.getSkillLevel(SkillType.AXES);
while (x >= 50) { while (x >= 50) {
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.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.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.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.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") }));
player.sendMessage(mcLocale.getString("m.AxesCritChance", new Object[] { percentage })); player.sendMessage(mcLocale.getString("m.AxesCritChance", new Object[] { percentage }));
if (PP.getSkillLevel(SkillType.AXES) < 500) 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.AbilityLockTemplate", new Object[] { mcLocale.getString("m.AbilLockAxes1") })); player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusAxes2_0"), mcLocale.getString("m.AbilBonusAxes2_1", new Object[] {durDmg}) }));
else 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.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.AxesSkullLength", new Object[] { ticks }));
return true; return true;
} }

View File

@ -37,7 +37,18 @@ import com.gmail.nossr50.datatypes.SkillType;
import com.gmail.nossr50.party.Party; import com.gmail.nossr50.party.Party;
public class Axes { 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) public static void axeCriticalCheck(Player attacker, EntityDamageByEntityEvent event, Plugin pluginx)
{ {
Entity x = event.getEntity(); Entity x = event.getEntity();
@ -93,6 +104,11 @@ public class Axes {
{ {
Player targetPlayer = (Player) target; Player targetPlayer = (Player) target;
int emptySlots = 0; 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()) for(ItemStack x : targetPlayer.getInventory().getArmorContents())
{ {
@ -100,7 +116,7 @@ public class Axes {
{ {
emptySlots++; emptySlots++;
} else { } else {
x.setDurability((short) (x.getDurability()+30)); //Damage armor piece x.setDurability((short) (x.getDurability()+durDmg)); //Damage armor piece
} }
} }

View File

@ -101,9 +101,17 @@ m.EffectsAxes2_0=Critical Strikes
m.EffectsAxes2_1=Double Damage m.EffectsAxes2_1=Double Damage
m.EffectsAxes3_0=Axe Mastery m.EffectsAxes3_0=Axe Mastery
m.EffectsAxes3_1=Modifies Damage 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.AbilLockAxes1=LOCKED UNTIL 500+ SKILL (AXE MASTERY)
m.AbilBonusAxes1_0=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.AxesCritChance=[[RED]]Chance to critically strike: [[YELLOW]]{0}%
m.AxesSkullLength=[[RED]]Skull Splitter Length: [[YELLOW]]{0}s m.AxesSkullLength=[[RED]]Skull Splitter Length: [[YELLOW]]{0}s
m.SkillSwords=SWORDS m.SkillSwords=SWORDS