diff --git a/Changelog.txt b/Changelog.txt index 4726153ff..e4a34a095 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,5 +1,4 @@ Version 2.2.000 - TODO: Configs are not adding new keys and this needs to be fixed, this affects config.yml, experience.yml, etc TODO: Add Xbows/Tridents to salvage/repair TODO: Add unit test for combat XP values TODO: Add unit test to determine crossbow or bow skill diff --git a/src/main/java/com/gmail/nossr50/commands/skills/TridentsCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/TridentsCommand.java index 7431b2bca..ef07c61f0 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/TridentsCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/TridentsCommand.java @@ -2,7 +2,10 @@ package com.gmail.nossr50.commands.skills; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; +import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.util.Permissions; +import com.gmail.nossr50.util.random.ProbabilityUtil; +import com.gmail.nossr50.util.skills.CombatUtils; import com.gmail.nossr50.util.skills.RankUtils; import com.gmail.nossr50.util.text.TextComponentFactory; import net.kyori.adventure.text.Component; @@ -13,30 +16,29 @@ import java.util.List; public class TridentsCommand extends SkillCommand { - private boolean canTridentsSuper; public TridentsCommand() { super(PrimarySkillType.TRIDENTS); } @Override - protected void dataCalculations(Player player, float skillValue) { - // TODO: Implement data calculations - } + protected void dataCalculations(Player player, float skillValue) {} @Override - protected void permissionsCheck(Player player) { - canTridentsSuper = RankUtils.hasUnlockedSubskill(player, SubSkillType.TRIDENTS_TRIDENTS_SUPER_ABILITY) - && Permissions.superShotgun(player); - } + protected void permissionsCheck(Player player) {} @Override protected List statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) { List messages = new ArrayList<>(); - if (canTridentsSuper) { + if (canUseSubskill(player, SubSkillType.TRIDENTS_TRIDENTS_SUPER_ABILITY)) { messages.add("Tridents Super Ability"); - //TODO: Implement SSG + //TODO: Implement Tridents Super + } + + if(canUseSubskill(player, SubSkillType.TRIDENTS_TRIDENTS_LIMIT_BREAK)) { + messages.add(getStatMessage(SubSkillType.TRIDENTS_TRIDENTS_LIMIT_BREAK, + String.valueOf(CombatUtils.getLimitBreakDamageAgainstQuality(player, SubSkillType.TRIDENTS_TRIDENTS_LIMIT_BREAK, 1000)))); } return messages; diff --git a/src/main/java/com/gmail/nossr50/util/Permissions.java b/src/main/java/com/gmail/nossr50/util/Permissions.java index 22ea4091a..616a6f68e 100644 --- a/src/main/java/com/gmail/nossr50/util/Permissions.java +++ b/src/main/java/com/gmail/nossr50/util/Permissions.java @@ -228,6 +228,7 @@ public final class Permissions { /* CROSSBOWS */ public static boolean superShotgun(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.crossbows.supershotgun"); } public static boolean tridentsSuper(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.tridents.superability"); } + public static boolean tridentsLimitBreak(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.tridents.superability"); } /* * PARTY diff --git a/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java b/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java index 146858c31..23c7d7401 100644 --- a/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java +++ b/src/main/java/com/gmail/nossr50/util/commands/CommandRegistrationManager.java @@ -101,7 +101,7 @@ public final class CommandRegistrationManager { command.setExecutor(new TamingCommand()); break; case TRIDENTS: - // TODO: Implement + command.setExecutor(new TridentsCommand()); break; case UNARMED: