mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 06:06:45 +01:00
more work on end game update
This commit is contained in:
parent
9cbe10827f
commit
efabaf1466
@ -1,7 +1,7 @@
|
|||||||
Version 2.2.000
|
Version 2.2.000
|
||||||
|
TODO: Add check to archery arrow retrieval to not work for crossbows
|
||||||
TODO: More SQL unit tests
|
TODO: More SQL unit tests
|
||||||
TODO: Test mysql/mariadb changes
|
TODO: Test mysql/mariadb changes
|
||||||
TODO: Trickshot: locale, multiple bounces, does not hurt yourself or allies, reduced damage per bounce?
|
|
||||||
TODO: Add metadata cleanup unit tests
|
TODO: Add metadata cleanup unit tests
|
||||||
TODO: Cleanup new arrow metadatas
|
TODO: Cleanup new arrow metadatas
|
||||||
TODO: com/gmail/nossr50/database/FlatFileDatabaseManager.java:109 reporting data entries that need correction on each launch
|
TODO: com/gmail/nossr50/database/FlatFileDatabaseManager.java:109 reporting data entries that need correction on each launch
|
||||||
@ -10,57 +10,45 @@ Version 2.2.000
|
|||||||
TODO: Add unit test to determine crossbow or bow skill
|
TODO: Add unit test to determine crossbow or bow skill
|
||||||
TODO: Add unit test for trident xp processing
|
TODO: Add unit test for trident xp processing
|
||||||
TODO: Add missing entries to changelog
|
TODO: Add missing entries to changelog
|
||||||
child.yml is gone now, its better this way
|
|
||||||
Replaced 'Experience_Formula.Modifier' in experience.yml with 'Experience_Formula.Skill_Multiplier' which is easier to understand and less prone to divide by zero bugs
|
Replaced 'Experience_Formula.Modifier' in experience.yml with 'Experience_Formula.Skill_Multiplier' which is easier to understand and less prone to divide by zero bugs
|
||||||
(API) Many skills with RNG elements now send out a SubSkillEvent (which can be used to modify probability or cancel the results), some skills without RNG still send out this event when activated, this event is cancellable so it can be used to make a skill fail
|
|
||||||
Treasure drop rate from Shake, Fishing, Hylian, and Excavation now benefit from the Luck perk
|
Treasure drop rate from Shake, Fishing, Hylian, and Excavation now benefit from the Luck perk
|
||||||
Added 'Send_To_Console' settings to chat.yml to toggle sending party or admin chat messages to console
|
Added 'Send_To_Console' settings to chat.yml to toggle sending party or admin chat messages to console
|
||||||
Added a set of "mastery" subskills meant for end game progression
|
Added a set of "triple drop" sub skills to a few gathering skills, this is meant for "end game" progression
|
||||||
Added the mastery subskill 'Mother Lode' to Mining
|
Added the end game oriented subskill 'Mother Lode' to Mining
|
||||||
Added the mastery subskill 'Clean Cuts' to Woodcutting
|
Added the end game oriented subskill 'Clean Cuts' to Woodcutting
|
||||||
Added the mastery subskill 'Verdant Bounty' to Herbalism
|
Added the end game oriented subskill 'Verdant Bounty' to Herbalism
|
||||||
All new skills have had settings added to advanced.yml
|
Added Crossbows Skill and various sub skills
|
||||||
|
Updated advanced.yml with entries for the new skills
|
||||||
|
(API) Many skills with RNG elements now send out a SubSkillEvent (which can be used to modify probability or cancel the results), some skills without RNG still send out this event when activated, this event is cancellable so it can be used to make a skill fail
|
||||||
Added /mmopower command (aliases /mmopowerlevel /powerlevel)
|
Added /mmopower command (aliases /mmopowerlevel /powerlevel)
|
||||||
Added 'mcmmo.commands.mmopower' permission node
|
Added 'mcmmo.commands.mmopower' permission node
|
||||||
Added 'mcmmo.ability.herbalism.verdantbounty' permission node
|
Added 'mcmmo.ability.herbalism.verdantbounty' permission node
|
||||||
Added 'mcmmo.ability.mining.motherlode' permission node
|
Added 'mcmmo.ability.mining.motherlode' permission node
|
||||||
Added 'mcmmo.ability.woodcutting.cleancuts' permission node
|
Added 'mcmmo.ability.woodcutting.cleancuts' permission node
|
||||||
Added 'Mining.SubSkill.MotherLode.Name' to locale
|
Added 'mcmmo.commands.crossbows' permission node
|
||||||
Added 'Mining.SubSkill.MotherLode.Stat' to locale
|
Added 'mcmmo.ability.crossbows.supershotgun' permission node
|
||||||
Added 'Mining.SubSkill.MotherLode.Description' to locale
|
Added 'mcmmo.ability.crossbows.trickshot' permission node
|
||||||
Added 'Woodcutting.SubSkill.CleanCuts.Name' to locale
|
Added 'mcmmo.ability.crossbows.crossbowslimitbreak' permission node
|
||||||
Added 'Woodcutting.SubSkill.CleanCuts.Stat' to locale
|
Added 'mcmmo.commands.mmopower' permission node
|
||||||
Added 'Woodcutting.SubSkill.CleanCuts.Description' to locale
|
Added locale entries for motherlode, cleancuts, and verdant bounty
|
||||||
Added 'Herbalism.SubSkill.VerdantBounty.Name' to locale
|
Major rewrite for how random chance was handled in the code
|
||||||
Added 'Herbalism.SubSkill.VerdantBounty.Stat' to locale
|
child.yml is gone now, its better this way
|
||||||
Added 'Herbalism.SubSkill.VerdantBounty.Description' to locale
|
|
||||||
(Codebase) Major rewrite for how random chance was handled in the code
|
|
||||||
|
|
||||||
Added 'General.PowerLevel.Skill_Mastery.Enabled' to config.yml which is used to enable or disable the mastery skills wholesale (will also disable the new power level command)
|
|
||||||
|
|
||||||
NOTES:
|
NOTES:
|
||||||
The goal of this update is to provide a small benefit to each skill and a reason to grind past the "maximum", ideally for a long while.
|
Crossbows is a WIP skill, and I will add to it in future updates.
|
||||||
Most skills have a mastery sub-skill, this mastery subskill provides a small benefit that scales to level 10,000 (or 1,000 for standard) and does not have ranks (other than the initial rank to unlock it)
|
Tridents is not ready for this update, so its been disabled for now.
|
||||||
Mastery skills unlock at level 1000 for RetroMode (the default setting), and 100 for Standard, you can edit this via skillranks.yml
|
The goal of this update is to provide a small benefit to some skills and a reason to grind past the "maximum", ideally for a long while.
|
||||||
Mastery skills are meant to provide an "end-game" to skills, a reason to continue leveling a skill past its "max".
|
Most skills have an end game oriented sub-skill, these new subskills provide a small benefit that grows and scales up to level 10,000 (or 1,000 for Standard mode which no one uses) and does not have ranks (other than the initial rank to unlock it)
|
||||||
|
These end game sub skills unlock at level 1000 for RetroMode (the default setting), and 100 for Standard, you can edit this via skillranks.yml
|
||||||
|
These new sub skills are meant to provide an "end-game" to skills, a reason to continue leveling a skill past its "max".
|
||||||
This system is brand new, it is entirely possible I will completely change, remove, or add more mastery skills in the future.
|
This system is brand new, it is entirely possible I will completely change, remove, or add more mastery skills in the future.
|
||||||
|
|
||||||
The section below assumes RetroMode, if you are using Standard mode (1-100) just divide level examples by 10.
|
More info for Mother Lode, Clean Cuts, Verdant Bounty:
|
||||||
|
These skill respects double drop settings from config.yml just like the Double Drop skills do
|
||||||
|
Double Drops and Triple Drops do not stack, mcMMO checks for triple drops first, then double drops
|
||||||
|
New Power Level Command, for now this skill just shows you your current power level. This might be removed later.
|
||||||
|
Currently these skills scale up to a maximum 50% chance if a player has 10,000 skill, you can adjust this in advanced.yml
|
||||||
|
|
||||||
Mastery Skills
|
|
||||||
Mining / Mother Lode: With default settings, when players hit level 1,000 they will unlock this sub-skill, it will add a 1% chance to get triple drops while mining (this can be edited in advanced.yml), this skill maxes out at 10.0% chance at level 10,000.
|
|
||||||
This skill respects double drop settings from the config files.
|
|
||||||
Double drops will only get checked if the Triple Drops fail for players that have Mother Lode unlocked, these two skills do not stack.
|
|
||||||
|
|
||||||
Woodcutting / Clean Cuts: With default settings, when players hit level 1,000 they will unlock this sub-skill, it will add a 1% chance to get triple drops while woodcutting or using Tree Feller (this can be edited in advanced.yml), this skill maxes out at 10.0% chance at level 10,000.
|
|
||||||
This skill respects double drop settings from the config files.
|
|
||||||
Double Drops (Harvest Lumber) will only get checked if the Triple Drops fail for players that have Clean Cuts unlocked, these two skills do not stack.
|
|
||||||
|
|
||||||
Herbalism / Verdant Bounty: With default settings, when players hit level 1,000 they will unlock this sub-skill, it will add a 1% chance to get triple drops when harvesting crops (this can be edited in advanced.yml), this skill maxes out at 10.0% chance at level 10,000.
|
|
||||||
This skill respects double drop settings from the config files.
|
|
||||||
Double Drops only occur if the Triple Drops fail, these two skills do not stack.
|
|
||||||
New Power Level Command
|
|
||||||
This power level command gives you a view of all your current masteries, it also provides a summary of your power level.
|
|
||||||
|
|
||||||
Version 2.1.227
|
Version 2.1.227
|
||||||
Fixed bug where some text would not be displayed to players (Adventure dependency update)
|
Fixed bug where some text would not be displayed to players (Adventure dependency update)
|
||||||
|
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||||
<artifactId>mcMMO</artifactId>
|
<artifactId>mcMMO</artifactId>
|
||||||
<version>2.2.000-BETA-SNAPSHOT</version>
|
<version>2.2.000-BETA-01-SNAPSHOT</version>
|
||||||
<name>mcMMO</name>
|
<name>mcMMO</name>
|
||||||
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
||||||
<scm>
|
<scm>
|
||||||
|
@ -19,7 +19,6 @@ import org.bukkit.entity.Player;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
public final class ExperienceAPI {
|
public final class ExperienceAPI {
|
||||||
|
@ -2,26 +2,24 @@ package com.gmail.nossr50.commands.skills;
|
|||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
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.locale.LocaleLoader;
|
|
||||||
import com.gmail.nossr50.skills.archery.Archery;
|
|
||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
import com.gmail.nossr50.util.random.ProbabilityUtil;
|
|
||||||
import com.gmail.nossr50.util.skills.CombatUtils;
|
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;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.gmail.nossr50.datatypes.skills.SubSkillType.*;
|
||||||
|
|
||||||
public class CrossbowsCommand extends SkillCommand {
|
public class CrossbowsCommand extends SkillCommand {
|
||||||
private boolean canSSG;
|
private boolean canSSG;
|
||||||
private boolean canTrickShot;
|
private boolean canTrickShot;
|
||||||
private boolean canPoweredShot;
|
private boolean canPoweredShot;
|
||||||
private int bounceCount;
|
|
||||||
|
|
||||||
public CrossbowsCommand() {
|
public CrossbowsCommand() {
|
||||||
super(PrimarySkillType.CROSSBOWS);
|
super(PrimarySkillType.CROSSBOWS);
|
||||||
@ -34,13 +32,13 @@ public class CrossbowsCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void permissionsCheck(Player player) {
|
protected void permissionsCheck(Player player) {
|
||||||
canSSG = RankUtils.hasUnlockedSubskill(player, SubSkillType.CROSSBOWS_SUPER_SHOTGUN)
|
// canSSG = RankUtils.hasUnlockedSubskill(player, CROSSBOWS_SUPER_SHOTGUN)
|
||||||
&& Permissions.superShotgun(player);
|
// && Permissions.superShotgun(player);
|
||||||
|
|
||||||
canTrickShot = RankUtils.hasUnlockedSubskill(player, SubSkillType.CROSSBOWS_TRICK_SHOT)
|
canTrickShot = RankUtils.hasUnlockedSubskill(player, CROSSBOWS_TRICK_SHOT)
|
||||||
&& Permissions.trickShot(player);
|
&& Permissions.trickShot(player);
|
||||||
|
|
||||||
canPoweredShot = RankUtils.hasUnlockedSubskill(player, SubSkillType.CROSSBOWS_POWERED_SHOT)
|
canPoweredShot = RankUtils.hasUnlockedSubskill(player, CROSSBOWS_POWERED_SHOT)
|
||||||
&& Permissions.poweredShot(player);
|
&& Permissions.poweredShot(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,23 +51,26 @@ public class CrossbowsCommand extends SkillCommand {
|
|||||||
return messages;
|
return messages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
messages.add(ChatColor.DARK_AQUA + "Reminder: " + ChatColor.GOLD + "This is a BETA version of mcMMO, please report any bugs you find!");
|
||||||
|
messages.add(ChatColor.GOLD + "Crossbows is a " + ChatColor.RED + "WIP" +ChatColor.GOLD + " skill that is still being developed, please leave feedback in our discord!");
|
||||||
|
|
||||||
if (canPoweredShot) {
|
if (canPoweredShot) {
|
||||||
messages.add(getStatMessage(SubSkillType.ARCHERY_SKILL_SHOT, percent.format(mmoPlayer.getCrossbowsManager().getDamageBonusPercent(player))));
|
messages.add(getStatMessage(ARCHERY_SKILL_SHOT, percent.format(mmoPlayer.getCrossbowsManager().getDamageBonusPercent(player))));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canSSG) {
|
// if (canSSG) {
|
||||||
messages.add("Super Shotgun");
|
// messages.add("Super Shotgun");
|
||||||
//TODO: Implement SSG
|
// //TODO: Implement SSG
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (canTrickShot) {
|
if (canTrickShot) {
|
||||||
messages.add(getStatMessage(SubSkillType.CROSSBOWS_TRICK_SHOT,
|
messages.add(getStatMessage(CROSSBOWS_TRICK_SHOT,
|
||||||
String.valueOf(mmoPlayer.getCrossbowsManager().getTrickShotMaxBounceCount())));
|
String.valueOf(mmoPlayer.getCrossbowsManager().getTrickShotMaxBounceCount())));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Permissions.canUseSubSkill(player, SubSkillType.CROSSBOWS_CROSSBOWS_LIMIT_BREAK)) {
|
if(Permissions.canUseSubSkill(player, CROSSBOWS_CROSSBOWS_LIMIT_BREAK)) {
|
||||||
messages.add(getStatMessage(SubSkillType.CROSSBOWS_CROSSBOWS_LIMIT_BREAK,
|
messages.add(getStatMessage(CROSSBOWS_CROSSBOWS_LIMIT_BREAK,
|
||||||
String.valueOf(CombatUtils.getLimitBreakDamageAgainstQuality(player, SubSkillType.CROSSBOWS_CROSSBOWS_LIMIT_BREAK, 1000))));
|
String.valueOf(CombatUtils.getLimitBreakDamageAgainstQuality(player, CROSSBOWS_CROSSBOWS_LIMIT_BREAK, 1000))));
|
||||||
}
|
}
|
||||||
|
|
||||||
return messages;
|
return messages;
|
||||||
|
@ -24,6 +24,8 @@ public class HerbalismCommand extends SkillCommand {
|
|||||||
private int farmersDietRank;
|
private int farmersDietRank;
|
||||||
private String doubleDropChance;
|
private String doubleDropChance;
|
||||||
private String doubleDropChanceLucky;
|
private String doubleDropChanceLucky;
|
||||||
|
private String tripleDropChance;
|
||||||
|
private String tripleDropChanceLucky;
|
||||||
private String hylianLuckChance;
|
private String hylianLuckChance;
|
||||||
private String hylianLuckChanceLucky;
|
private String hylianLuckChanceLucky;
|
||||||
private String shroomThumbChance;
|
private String shroomThumbChance;
|
||||||
@ -54,8 +56,8 @@ public class HerbalismCommand extends SkillCommand {
|
|||||||
|
|
||||||
if (canTripleDrop) {
|
if (canTripleDrop) {
|
||||||
String[] tripleDropStrings = ProbabilityUtil.getRNGDisplayValues(player, SubSkillType.HERBALISM_VERDANT_BOUNTY);
|
String[] tripleDropStrings = ProbabilityUtil.getRNGDisplayValues(player, SubSkillType.HERBALISM_VERDANT_BOUNTY);
|
||||||
doubleDropChance = tripleDropStrings[0];
|
tripleDropChance = tripleDropStrings[0];
|
||||||
doubleDropChanceLucky = tripleDropStrings[1];
|
tripleDropChanceLucky = tripleDropStrings[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
// FARMERS DIET
|
// FARMERS DIET
|
||||||
@ -113,11 +115,16 @@ public class HerbalismCommand extends SkillCommand {
|
|||||||
messages.add(getStatMessage(SubSkillType.HERBALISM_DOUBLE_DROPS, doubleDropChance)
|
messages.add(getStatMessage(SubSkillType.HERBALISM_DOUBLE_DROPS, doubleDropChance)
|
||||||
+ (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", doubleDropChanceLucky) : ""));
|
+ (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", doubleDropChanceLucky) : ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (canTripleDrop) {
|
||||||
|
messages.add(getStatMessage(SubSkillType.HERBALISM_VERDANT_BOUNTY, tripleDropChance)
|
||||||
|
+ (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", tripleDropChanceLucky) : ""));
|
||||||
|
}
|
||||||
|
|
||||||
if (canFarmersDiet) {
|
if (canFarmersDiet) {
|
||||||
messages.add(getStatMessage(false, true, SubSkillType.HERBALISM_FARMERS_DIET, String.valueOf(farmersDietRank)));
|
messages.add(getStatMessage(false, true, SubSkillType.HERBALISM_FARMERS_DIET, String.valueOf(farmersDietRank)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (canGreenTerra) {
|
if (canGreenTerra) {
|
||||||
messages.add(getStatMessage(SubSkillType.HERBALISM_GREEN_TERRA, greenTerraLength)
|
messages.add(getStatMessage(SubSkillType.HERBALISM_GREEN_TERRA, greenTerraLength)
|
||||||
+ (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", greenTerraLengthEndurance) : ""));
|
+ (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", greenTerraLengthEndurance) : ""));
|
||||||
|
@ -10,6 +10,7 @@ import com.gmail.nossr50.commands.CommandManager;
|
|||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
@ -28,14 +29,18 @@ public class PowerLevelCommand extends BaseCommand {
|
|||||||
BukkitCommandIssuer bukkitCommandIssuer = (BukkitCommandIssuer) getCurrentCommandIssuer();
|
BukkitCommandIssuer bukkitCommandIssuer = (BukkitCommandIssuer) getCurrentCommandIssuer();
|
||||||
Player player = bukkitCommandIssuer.getPlayer();
|
Player player = bukkitCommandIssuer.getPlayer();
|
||||||
McMMOPlayer mmoPlayer = UserManager.getPlayer(player); //Should never be null at this point because its caught in an ACF validation
|
McMMOPlayer mmoPlayer = UserManager.getPlayer(player); //Should never be null at this point because its caught in an ACF validation
|
||||||
|
if (mmoPlayer == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int powerLevel = mmoPlayer.getPowerLevel();
|
int powerLevel = mmoPlayer.getPowerLevel();
|
||||||
|
|
||||||
//TODO: impl
|
//TODO: impl
|
||||||
mmoPlayer.getPlayer().sendMessage("Your power level is: "+powerLevel); //This is not gonna stay, just to show that the command executes in debug
|
mmoPlayer.getPlayer().sendMessage(ChatColor.DARK_AQUA + "Your " + ChatColor.GOLD + "[mcMMO]" + ChatColor.DARK_AQUA + " power level is: " + ChatColor.GREEN + powerLevel); //This is not gonna stay, just to show that the command executes in debug
|
||||||
|
|
||||||
//Send the players a few blank lines to make finding the top of the skill command easier
|
//Send the players a few blank lines to make finding the top of the skill command easier
|
||||||
if (mcMMO.p.getAdvancedConfig().doesSkillCommandSendBlankLines()) {
|
if (mcMMO.p.getAdvancedConfig().doesSkillCommandSendBlankLines()) {
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 1; i++) {
|
||||||
player.sendMessage("");
|
player.sendMessage("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,6 +62,12 @@ public abstract class SkillCommand implements TabExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Tridents skill is not ready yet
|
||||||
|
if (skill == PrimarySkillType.TRIDENTS) {
|
||||||
|
sender.sendMessage(ChatColor.RED + "Tridents will come in a future version!");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (args.length == 0) {
|
if (args.length == 0) {
|
||||||
boolean isLucky = Permissions.lucky(player, skill);
|
boolean isLucky = Permissions.lucky(player, skill);
|
||||||
boolean hasEndurance = PerksUtils.handleActivationPerks(player, 0, 0) != 0;
|
boolean hasEndurance = PerksUtils.handleActivationPerks(player, 0, 0) != 0;
|
||||||
|
@ -69,7 +69,6 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
|
|
||||||
import java.util.EnumMap;
|
import java.util.EnumMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
public class McMMOPlayer implements Identified {
|
public class McMMOPlayer implements Identified {
|
||||||
|
@ -14,7 +14,10 @@ import com.google.common.collect.ImmutableMap;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.EnumMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.UUID;
|
||||||
import java.util.concurrent.DelayQueue;
|
import java.util.concurrent.DelayQueue;
|
||||||
|
|
||||||
public class PlayerProfile {
|
public class PlayerProfile {
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
//package com.gmail.nossr50.listeners;
|
|
||||||
//
|
|
||||||
//import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
|
||||||
//import com.gmail.nossr50.datatypes.skills.SuperAbilityType;
|
|
||||||
//import com.gmail.nossr50.mcMMO;
|
|
||||||
//import com.gmail.nossr50.util.player.UserManager;
|
|
||||||
//import com.gmail.nossr50.util.skills.SkillUtils;
|
|
||||||
//import org.bukkit.Bukkit;
|
|
||||||
//import org.bukkit.entity.Player;
|
|
||||||
//import org.bukkit.event.EventHandler;
|
|
||||||
//import org.bukkit.event.EventPriority;
|
|
||||||
//import org.bukkit.event.Listener;
|
|
||||||
//import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
|
||||||
//
|
|
||||||
//public class CommandListener implements Listener {
|
|
||||||
//
|
|
||||||
// private final mcMMO pluginRef;
|
|
||||||
//
|
|
||||||
// public CommandListener(mcMMO plugin) {
|
|
||||||
// this.pluginRef = plugin;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @EventHandler(ignoreCancelled = true, priority = EventPriority.LOWEST)
|
|
||||||
// public void onPlayerCommandPreprocess(PlayerCommandPreprocessEvent event) {
|
|
||||||
// Player player = event.getPlayer();
|
|
||||||
//
|
|
||||||
// SkillUtils.removeAbilityBoostsFromInventory(player);
|
|
||||||
//
|
|
||||||
// McMMOPlayer mmoPlayer = UserManager.getPlayer(player);
|
|
||||||
//
|
|
||||||
// if(mmoPlayer == null)
|
|
||||||
// return;
|
|
||||||
//
|
|
||||||
// Bukkit.getServer().getScheduler().runTaskLater(pluginRef, () -> {
|
|
||||||
// if(mmoPlayer.getAbilityMode(SuperAbilityType.GIGA_DRILL_BREAKER) || mmoPlayer.getAbilityMode(SuperAbilityType.SUPER_BREAKER)) {
|
|
||||||
// SkillUtils.handleAbilitySpeedIncrease(player);
|
|
||||||
// }
|
|
||||||
// }, 5);
|
|
||||||
// }
|
|
||||||
//}
|
|
@ -1,7 +1,6 @@
|
|||||||
package com.gmail.nossr50.skills.crossbows;
|
package com.gmail.nossr50.skills.crossbows;
|
||||||
|
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.util.MetadataConstants;
|
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
import org.bukkit.entity.Arrow;
|
import org.bukkit.entity.Arrow;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
@ -11,7 +11,6 @@ import com.gmail.nossr50.util.MetadataConstants;
|
|||||||
import com.gmail.nossr50.util.Permissions;
|
import com.gmail.nossr50.util.Permissions;
|
||||||
import com.gmail.nossr50.util.random.ProbabilityUtil;
|
import com.gmail.nossr50.util.random.ProbabilityUtil;
|
||||||
import com.gmail.nossr50.util.skills.RankUtils;
|
import com.gmail.nossr50.util.skills.RankUtils;
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.Arrow;
|
import org.bukkit.entity.Arrow;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -21,8 +20,6 @@ import org.bukkit.projectiles.ProjectileSource;
|
|||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
import static com.gmail.nossr50.util.random.ProbabilityUtil.isStaticSkillRNGSuccessful;
|
|
||||||
|
|
||||||
public class CrossbowsManager extends SkillManager {
|
public class CrossbowsManager extends SkillManager {
|
||||||
public CrossbowsManager(McMMOPlayer mmoPlayer) {
|
public CrossbowsManager(McMMOPlayer mmoPlayer) {
|
||||||
super(mmoPlayer, PrimarySkillType.CROSSBOWS);
|
super(mmoPlayer, PrimarySkillType.CROSSBOWS);
|
||||||
|
@ -166,7 +166,14 @@ public final class Permissions {
|
|||||||
* SKILLS
|
* SKILLS
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static boolean skillEnabled(Permissible permissible, PrimarySkillType skill) {return permissible.hasPermission("mcmmo.skills." + skill.toString().toLowerCase(Locale.ENGLISH)); }
|
public static boolean skillEnabled(Permissible permissible, PrimarySkillType skill) {
|
||||||
|
// hack to disable tridents for now
|
||||||
|
if (skill == PrimarySkillType.TRIDENTS)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return permissible.hasPermission("mcmmo.skills." + skill.toString().toLowerCase(Locale.ENGLISH));
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean vanillaXpBoost(Permissible permissible, PrimarySkillType skill) { return permissible.hasPermission("mcmmo.ability." + skill.toString().toLowerCase(Locale.ENGLISH) + ".vanillaxpboost"); }
|
public static boolean vanillaXpBoost(Permissible permissible, PrimarySkillType skill) { return permissible.hasPermission("mcmmo.ability." + skill.toString().toLowerCase(Locale.ENGLISH) + ".vanillaxpboost"); }
|
||||||
public static boolean isSubSkillEnabled(Permissible permissible, SubSkillType subSkillType) {
|
public static boolean isSubSkillEnabled(Permissible permissible, SubSkillType subSkillType) {
|
||||||
// hack to disable supers that aren't coded yet
|
// hack to disable supers that aren't coded yet
|
||||||
@ -286,6 +293,10 @@ public final class Permissions {
|
|||||||
* @return true if the player has permission and has the skill unlocked
|
* @return true if the player has permission and has the skill unlocked
|
||||||
*/
|
*/
|
||||||
public static boolean canUseSubSkill(@NotNull Player player, @NotNull SubSkillType subSkillType) {
|
public static boolean canUseSubSkill(@NotNull Player player, @NotNull SubSkillType subSkillType) {
|
||||||
|
// Hack to disable tridents for now
|
||||||
|
if (subSkillType.getParentSkill() == PrimarySkillType.TRIDENTS)
|
||||||
|
return false;
|
||||||
|
|
||||||
return isSubSkillEnabled(player, subSkillType) && RankUtils.hasUnlockedSubskill(player, subSkillType);
|
return isSubSkillEnabled(player, subSkillType) && RankUtils.hasUnlockedSubskill(player, subSkillType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -84,11 +84,10 @@ public class ProbabilityUtil {
|
|||||||
|
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
McMMOPlayer mmoPlayer = UserManager.getPlayer(player);
|
McMMOPlayer mmoPlayer = UserManager.getPlayer(player);
|
||||||
if(mmoPlayer != null) {
|
if (mmoPlayer == null) {
|
||||||
xPos = mmoPlayer.getSkillLevel(subSkillType.getParentSkill());
|
return Probability.ofPercent(0);
|
||||||
} else {
|
|
||||||
xPos = 0;
|
|
||||||
}
|
}
|
||||||
|
xPos = mmoPlayer.getSkillLevel(subSkillType.getParentSkill());
|
||||||
} else {
|
} else {
|
||||||
xPos = 0;
|
xPos = 0;
|
||||||
}
|
}
|
||||||
|
@ -440,7 +440,7 @@ Crossbows.SubSkill.CrossbowsLimitBreak.Description=Breaking your limits. Increas
|
|||||||
Crossbows.SubSkill.CrossbowsLimitBreak.Stat=Limit Break Max DMG
|
Crossbows.SubSkill.CrossbowsLimitBreak.Stat=Limit Break Max DMG
|
||||||
Crossbows.SubSkill.TrickShot.Name=Trick Shot
|
Crossbows.SubSkill.TrickShot.Name=Trick Shot
|
||||||
Crossbows.SubSkill.TrickShot.Description=Richochet arrows with steep angles
|
Crossbows.SubSkill.TrickShot.Description=Richochet arrows with steep angles
|
||||||
Crossbows.SubSkill.TrickShot.Stat=Trick Shot Chance
|
Crossbows.SubSkill.TrickShot.Stat=Trick Shot Max Bounces
|
||||||
Crossbows.SubSkill.TrickShot.Stat.Extra=Trick Shot Max Bounces: &a{0}
|
Crossbows.SubSkill.TrickShot.Stat.Extra=Trick Shot Max Bounces: &a{0}
|
||||||
Crossbows.SubSkill.TrickShot.Stat.Extra2=Trick Shot Reduced DMG per Bounce: &a{0}
|
Crossbows.SubSkill.TrickShot.Stat.Extra2=Trick Shot Reduced DMG per Bounce: &a{0}
|
||||||
Crossbows.Listener=Crossbows:
|
Crossbows.Listener=Crossbows:
|
||||||
@ -454,7 +454,7 @@ Tridents.Skills.TA.Other.On=&a{0}&2 used Trident &Super!
|
|||||||
Tridents.SubSkill.SuperAbility.Name=Tridents Super Ability
|
Tridents.SubSkill.SuperAbility.Name=Tridents Super Ability
|
||||||
Tridents.SubSkill.SuperAbility.Description=N/A
|
Tridents.SubSkill.SuperAbility.Description=N/A
|
||||||
Tridents.SubSkill.SuperAbility.Stat=N/A
|
Tridents.SubSkill.SuperAbility.Stat=N/A
|
||||||
Trients.SubSkill.Impale.Name=Impale
|
Tridents.SubSkill.Impale.Name=Impale
|
||||||
Tridents.SubSkill.Impale.Description=Increases damage done with tridents
|
Tridents.SubSkill.Impale.Description=Increases damage done with tridents
|
||||||
Tridents.SubSkill.Impale.Stat=Impale Bonus Damage
|
Tridents.SubSkill.Impale.Stat=Impale Bonus Damage
|
||||||
Tridents.SubSkill.TridentsLimitBreak.Name=Tridents Limit Break
|
Tridents.SubSkill.TridentsLimitBreak.Name=Tridents Limit Break
|
||||||
@ -1033,6 +1033,13 @@ Guides.Woodcutting.Section.0=&3About Woodcutting:\n&eWoodcutting is all about ch
|
|||||||
Guides.Woodcutting.Section.1=&3How does Tree Feller work?\n&eTree Feller is an active ability, you can right-click\n&ewhile holding an ax to activate Tree Feller. This will\n&ecause the entire tree to break instantly, dropping all\n&eof its logs at once.
|
Guides.Woodcutting.Section.1=&3How does Tree Feller work?\n&eTree Feller is an active ability, you can right-click\n&ewhile holding an ax to activate Tree Feller. This will\n&ecause the entire tree to break instantly, dropping all\n&eof its logs at once.
|
||||||
Guides.Woodcutting.Section.2=&3How does Leaf Blower work?\n&eLeaf Blower is a passive ability that will cause leaf\n&eblocks to break instantly when hit with an axe. By default,\nðis ability unlocks at level 100.
|
Guides.Woodcutting.Section.2=&3How does Leaf Blower work?\n&eLeaf Blower is a passive ability that will cause leaf\n&eblocks to break instantly when hit with an axe. By default,\nðis ability unlocks at level 100.
|
||||||
Guides.Woodcutting.Section.3=&3How do Double Drops work?\n&eThis passive ability gives you a chance to obtain an extra\n&eblock for every log you chop.
|
Guides.Woodcutting.Section.3=&3How do Double Drops work?\n&eThis passive ability gives you a chance to obtain an extra\n&eblock for every log you chop.
|
||||||
|
# Crossbows
|
||||||
|
Guides.Crossbows.Section.0=&3About Crossbows:\n&eCrossbows is all about shooting with your crossbow.\n\n&3XP GAIN:\n&eXP is gained whenever you shoot mobs with a crossbow.
|
||||||
|
Guides.Crossbows.Section.1=&3How does Trickshot work?\n&eTrickshot is an passive ability, you shoot your bolts at a shallow angle with a crossbow to attempt a Trickshot. This will cause the arrow to ricochet off of blocks and potentially hit a target. The number of potential bounces from a ricochet depend on the rank of Trickshot.
|
||||||
|
# Tridents
|
||||||
|
Guides.Tridents.Section.0=&3About Tridents:\n&eTridents skill involves impaling foes with your trident.\n\n&3XP GAIN:\n&eXP is gained whenever you hit mobs with a trident.
|
||||||
|
|
||||||
|
|
||||||
#INSPECT
|
#INSPECT
|
||||||
Inspect.Offline= &cYou do not have permission to inspect offline players!
|
Inspect.Offline= &cYou do not have permission to inspect offline players!
|
||||||
Inspect.OfflineStats=mcMMO Stats for Offline Player &e{0}
|
Inspect.OfflineStats=mcMMO Stats for Offline Player &e{0}
|
||||||
|
Loading…
Reference in New Issue
Block a user