Skip to content

Commit

Permalink
Improved stats display for child skills
Browse files Browse the repository at this point in the history
  • Loading branch information
gmcferrin committed Mar 8, 2013
1 parent bd45fff commit 3f71dab
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changelog.txt
Expand Up @@ -9,6 +9,7 @@ Key:

Version 1.4.03-dev
+ Added option to advanced.yml to determine the # of enchant levels used when buffing Super Breaker & Giga Drill Breaker
+ Improved stats display for child skills
= Fixed bug with Blast Mining not dropping blocks correctly
= Fixed bug with custom blocks not working
= Fixed bug where triple drops would award twice the amount of experience in Herbalism and Mining
Expand Down
17 changes: 15 additions & 2 deletions src/main/java/com/gmail/nossr50/commands/skills/SkillCommand.java
@@ -1,6 +1,7 @@
package com.gmail.nossr50.commands.skills;

import java.text.DecimalFormat;
import java.util.Set;

import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
Expand All @@ -11,6 +12,7 @@
import com.gmail.nossr50.datatypes.player.PlayerProfile;
import com.gmail.nossr50.datatypes.skills.SkillType;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.skills.child.FamilyTree;
import com.gmail.nossr50.util.Permissions;
import com.gmail.nossr50.util.StringUtils;
import com.gmail.nossr50.util.commands.CommandUtils;
Expand Down Expand Up @@ -57,12 +59,23 @@ public boolean onCommand(CommandSender sender, Command command, String label, St
dataCalculations();
permissionsCheck();

player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString(skillString + ".SkillName")));

if (!skill.isChildSkill()) {
player.sendMessage(LocaleLoader.getString("Skills.Header", SkillUtils.getSkillName(skill)));
player.sendMessage(LocaleLoader.getString("Commands.XPGain", LocaleLoader.getString("Commands.XPGain." + skillString)));
player.sendMessage(LocaleLoader.getString("Effects.Level", profile.getSkillLevel(skill), profile.getSkillXpLevel(skill), profile.getXpToLevel(skill)));
}
else {
player.sendMessage(LocaleLoader.getString("Skills.Header", SkillUtils.getSkillName(skill) + " " + LocaleLoader.getString("Skills.Child")));
player.sendMessage(LocaleLoader.getString("Commands.XPGain", LocaleLoader.getString("Commands.XPGain.Child")));
player.sendMessage(LocaleLoader.getString("Effects.Child", profile.getSkillLevel(skill)));

player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString("Skills.Parents")));
Set<SkillType> parents = FamilyTree.getParents(skill);

for (SkillType parent : parents) {
player.sendMessage(SkillUtils.getSkillName(parent) + " - " + LocaleLoader.getString("Effects.Level", profile.getSkillLevel(parent), profile.getSkillXpLevel(parent), profile.getXpToLevel(parent)));
}
}

if (effectsHeaderPermissions()) {
player.sendMessage(LocaleLoader.getString("Skills.Header", LocaleLoader.getString("Effects.Effects")));
Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/locale/locale_en_US.properties
Expand Up @@ -566,6 +566,7 @@ Party.ItemShare.Disabled=[[RED]]Party item sharing is disabled.
Commands.XPGain.Acrobatics=Falling
Commands.XPGain.Archery=Attacking Monsters
Commands.XPGain.Axes=Attacking Monsters
Commands.XPGain.Child=Gains levels from Parent Skills
Commands.XPGain.Excavation=Digging and finding treasures
Commands.XPGain.Fishing=Fishing (Go figure!)
Commands.XPGain.Herbalism=Harvesting Herbs
Expand All @@ -590,7 +591,9 @@ XPRate.Event= [[GOLD]]mcMMO is currently in an XP rate event! XP rate is {0}x!
#EFFECTS
##generic
Effects.Effects=EFFECTS
Effects.Child=[[DARK_GRAY]]LVL: [[GREEN]]{0}
Effects.Level=[[DARK_GRAY]]LVL: [[GREEN]]{0} [[DARK_AQUA]]XP[[YELLOW]]([[GOLD]]{1}[[YELLOW]]/[[GOLD]]{2}[[YELLOW]])
Effects.Parent = [[GOLD]]{0} -
Effects.Template=[[DARK_AQUA]]{0}: [[GREEN]]{1}

#GUIDES
Expand Down Expand Up @@ -625,9 +628,11 @@ Item.ChimaeraWing.Pass=**CHIMAERA WING**
Item.Injured.Wait=You were injured recently and must wait to use this. [[YELLOW]]({0}s)

#SKILLS
Skills.Child=[[GOLD]](CHILD SKILL)
Skills.Disarmed=[[DARK_RED]]You have been disarmed!
Skills.Header=[[RED]]-----[][[GREEN]]{0}[[RED]][]-----
Skills.NeedMore=[[DARK_RED]]You need more [[GRAY]]{0}
Skills.Parents = PARENTS
Skills.Stats=[[YELLOW]]{0}[[GREEN]]{1}[[DARK_AQUA]] XP([[GRAY]]{2}[[DARK_AQUA]]/[[GRAY]]{3}[[DARK_AQUA]])
Skills.TooTired=[[RED]]You are too tired to use that ability again. [[YELLOW]]({0}s)

Expand Down

0 comments on commit 3f71dab

Please sign in to comment.