mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Added 'Skill Shot' to Archery. Updated Archery command.
This commit is contained in:
@ -25,18 +25,14 @@ public class ArcheryCommand implements CommandExecutor {
|
||||
|
||||
float skillvalue = (float) PP.getSkillLevel(SkillType.ARCHERY);
|
||||
String percentage = String.valueOf((skillvalue / 1000) * 100);
|
||||
|
||||
int ignition = 20;
|
||||
if (PP.getSkillLevel(SkillType.ARCHERY) >= 200)
|
||||
ignition += 20;
|
||||
if (PP.getSkillLevel(SkillType.ARCHERY) >= 400)
|
||||
ignition += 20;
|
||||
if (PP.getSkillLevel(SkillType.ARCHERY) >= 600)
|
||||
ignition += 20;
|
||||
if (PP.getSkillLevel(SkillType.ARCHERY) >= 800)
|
||||
ignition += 20;
|
||||
if (PP.getSkillLevel(SkillType.ARCHERY) >= 1000)
|
||||
ignition += 20;
|
||||
|
||||
double dmgBonusPercent = ((PP.getSkillLevel(SkillType.ARCHERY) / 50) * 0.1D);
|
||||
|
||||
/* Cap maximum bonus at 200% */
|
||||
if(dmgBonusPercent > 2)
|
||||
dmgBonusPercent = 2;
|
||||
|
||||
dmgBonusPercent = dmgBonusPercent * 100; //Convert to percentage
|
||||
|
||||
String percentagedaze;
|
||||
if (PP.getSkillLevel(SkillType.ARCHERY) < 1000)
|
||||
@ -55,9 +51,9 @@ public class ArcheryCommand implements CommandExecutor {
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsArchery2_0"), mcLocale.getString("m.EffectsArchery2_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.EffectsTemplate", new Object[] { mcLocale.getString("m.EffectsArchery4_0"), mcLocale.getString("m.EffectsArchery4_1") }));
|
||||
player.sendMessage(mcLocale.getString("m.SkillHeader", new Object[] { mcLocale.getString("m.YourStats") }));
|
||||
player.sendMessage(mcLocale.getString("m.ArcherySkillShot", new Object[] { dmgBonusPercent }));
|
||||
player.sendMessage(mcLocale.getString("m.ArcheryDazeChance", new Object[] { percentagedaze }));
|
||||
player.sendMessage(mcLocale.getString("m.ArcheryRetrieveChance", new Object[] { percentage }));
|
||||
player.sendMessage(mcLocale.getString("m.ArcheryIgnitionLength", new Object[] { (ignition / 20) }));
|
||||
|
||||
Page.grabGuidePageForSkill(SkillType.ARCHERY, player, args);
|
||||
|
||||
|
Reference in New Issue
Block a user