mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 14:16:45 +01:00
Add in trident command
This commit is contained in:
parent
c8dedfc980
commit
25952154e3
@ -1,5 +1,4 @@
|
|||||||
Version 2.2.000
|
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 Xbows/Tridents to salvage/repair
|
||||||
TODO: Add unit test for combat XP values
|
TODO: Add unit test for combat XP values
|
||||||
TODO: Add unit test to determine crossbow or bow skill
|
TODO: Add unit test to determine crossbow or bow skill
|
||||||
|
@ -2,7 +2,10 @@ package com.gmail.nossr50.commands.skills;
|
|||||||
|
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
import com.gmail.nossr50.datatypes.skills.SubSkillType;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
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.skills.RankUtils;
|
||||||
import com.gmail.nossr50.util.text.TextComponentFactory;
|
import com.gmail.nossr50.util.text.TextComponentFactory;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
@ -13,30 +16,29 @@ import java.util.List;
|
|||||||
|
|
||||||
public class TridentsCommand extends SkillCommand {
|
public class TridentsCommand extends SkillCommand {
|
||||||
|
|
||||||
private boolean canTridentsSuper;
|
|
||||||
|
|
||||||
public TridentsCommand() {
|
public TridentsCommand() {
|
||||||
super(PrimarySkillType.TRIDENTS);
|
super(PrimarySkillType.TRIDENTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations(Player player, float skillValue) {
|
protected void dataCalculations(Player player, float skillValue) {}
|
||||||
// TODO: Implement data calculations
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(Player player) {
|
protected void permissionsCheck(Player player) {}
|
||||||
canTridentsSuper = RankUtils.hasUnlockedSubskill(player, SubSkillType.TRIDENTS_TRIDENTS_SUPER_ABILITY)
|
|
||||||
&& Permissions.superShotgun(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
|
||||||
List<String> messages = new ArrayList<>();
|
List<String> messages = new ArrayList<>();
|
||||||
|
|
||||||
if (canTridentsSuper) {
|
if (canUseSubskill(player, SubSkillType.TRIDENTS_TRIDENTS_SUPER_ABILITY)) {
|
||||||
messages.add("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;
|
return messages;
|
||||||
|
@ -228,6 +228,7 @@ public final class Permissions {
|
|||||||
/* CROSSBOWS */
|
/* CROSSBOWS */
|
||||||
public static boolean superShotgun(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.crossbows.supershotgun"); }
|
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 tridentsSuper(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.tridents.superability"); }
|
||||||
|
public static boolean tridentsLimitBreak(Permissible permissible) { return permissible.hasPermission("mcmmo.ability.tridents.superability"); }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PARTY
|
* PARTY
|
||||||
|
@ -101,7 +101,7 @@ public final class CommandRegistrationManager {
|
|||||||
command.setExecutor(new TamingCommand());
|
command.setExecutor(new TamingCommand());
|
||||||
break;
|
break;
|
||||||
case TRIDENTS:
|
case TRIDENTS:
|
||||||
// TODO: Implement
|
command.setExecutor(new TridentsCommand());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UNARMED:
|
case UNARMED:
|
||||||
|
Loading…
Reference in New Issue
Block a user