Add some missing things for new skill commands

This commit is contained in:
nossr50
2020-07-29 10:22:18 -07:00
parent 8112973dbe
commit a82b899eb6
4 changed files with 26 additions and 12 deletions

View File

@ -2,7 +2,9 @@ package com.gmail.nossr50.commands.skills;
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
import com.gmail.nossr50.datatypes.skills.SubSkillType;
import com.gmail.nossr50.skills.crossbows.CrossbowManager;
import com.gmail.nossr50.util.TextComponentFactory;
import com.gmail.nossr50.util.player.UserManager;
import net.md_5.bungee.api.chat.TextComponent;
import org.bukkit.entity.Player;
@ -28,20 +30,14 @@ public class CrossbowsCommand extends SkillCommand {
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {
List<String> messages = new ArrayList<>();
/*
List<String> messages = new ArrayList<>();
CrossbowManager crossbowManager = UserManager.getPlayer(player).getCrossbowManager();
ExcavationManager excavationManager = UserManager.getPlayer(player).getExcavationManager();
if (canGigaDrill) {
messages.add(getStatMessage(SubSkillType.EXCAVATION_GIGA_DRILL_BREAKER, gigaDrillBreakerLength)
+ (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", gigaDrillBreakerLengthEndurance) : ""));
*/
if(canUseSubskill(player, SubSkillType.CROSSBOWS_SUPER_SHOTGUN)) {
String additionalArrowCount = String.valueOf(crossbowManager.getSuperShotgunAdditionalArrowCount());
messages.add(getStatMessage(SubSkillType.CROSSBOWS_CROSSBOWS_LIMIT_BREAK, additionalArrowCount));
}
return null;
return messages;
}
@Override

View File

@ -72,13 +72,13 @@ public class CrossbowManager extends SkillManager {
Vector originUnitVector = originVector.clone().normalize();
for(int i = 0; i < getConeOfDeathProjectileCount(); i++) {
for(int i = 0; i < getSuperShotgunAdditionalArrowCount(); i++) {
Vector newProjectileVector = byRotateVector(originUnitVector, 0);
spawnTrackedProjectile(originProjectile, world, originProjectileMagnitude, newProjectileVector, getRandomizedSpreadValue());
}
}
private int getConeOfDeathProjectileCount() {
public int getSuperShotgunAdditionalArrowCount() {
switch(RankUtils.getRank(mcMMOPlayer.getPlayer(), SubSkillType.CROSSBOWS_SUPER_SHOTGUN)) {
case 1:
return 9;

View File

@ -111,6 +111,13 @@ public final class CommandRegistrationManager {
command.setExecutor(new WoodcuttingCommand());
break;
case CROSSBOWS:
command.setExecutor(new CrossbowsCommand());
break;
case TRIDENTS:
command.setExecutor(new TridentsCommand());
break;
default:
break;
}