mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 14:16:45 +01:00
endgame progression WIP
This commit is contained in:
parent
085c8dbf68
commit
eda227006f
@ -1,4 +1,18 @@
|
|||||||
Version 2.1.175
|
Version 2.1.175
|
||||||
|
Added a new mastery sub-skill to each skill (see notes)
|
||||||
|
Added /mmopower command (aliases /mmopowerlevel /powerlevel)
|
||||||
|
Added 'mcmmo.commands.mmopower' permission node
|
||||||
|
Added 'General.PowerLevel.Skill_Mastery.Enabled' to config.yml which is used to enable or disable the mastery skills (will also disable the new power level command)
|
||||||
|
|
||||||
|
NOTES:
|
||||||
|
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)
|
||||||
|
Mastery skills unlock at level 1000 for RetroMode (the default setting), and 100 for Standard
|
||||||
|
Mastery 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.
|
||||||
|
|
||||||
|
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.174
|
Version 2.1.174
|
||||||
Some legacy color codes in our locale file were swapped to &-code equivalents (thanks ViaSnake)
|
Some legacy color codes in our locale file were swapped to &-code equivalents (thanks ViaSnake)
|
||||||
|
@ -5,7 +5,9 @@ import co.aikar.commands.BukkitCommandManager;
|
|||||||
import co.aikar.commands.ConditionFailedException;
|
import co.aikar.commands.ConditionFailedException;
|
||||||
import com.gmail.nossr50.commands.chat.AdminChatCommand;
|
import com.gmail.nossr50.commands.chat.AdminChatCommand;
|
||||||
import com.gmail.nossr50.commands.chat.PartyChatCommand;
|
import com.gmail.nossr50.commands.chat.PartyChatCommand;
|
||||||
|
import com.gmail.nossr50.commands.skills.PowerLevelCommand;
|
||||||
import com.gmail.nossr50.config.ChatConfig;
|
import com.gmail.nossr50.config.ChatConfig;
|
||||||
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.datatypes.chat.ChatChannel;
|
import com.gmail.nossr50.datatypes.chat.ChatChannel;
|
||||||
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
@ -20,9 +22,14 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
* For now this class will only handle ACF converted commands, all other commands will be handled elsewhere
|
* For now this class will only handle ACF converted commands, all other commands will be handled elsewhere
|
||||||
*/
|
*/
|
||||||
public class CommandManager {
|
public class CommandManager {
|
||||||
|
public static final @NotNull String MMO_DATA_LOADED = "mmoDataLoaded";
|
||||||
|
|
||||||
|
//CHAT
|
||||||
public static final @NotNull String ADMIN_CONDITION = "adminCondition";
|
public static final @NotNull String ADMIN_CONDITION = "adminCondition";
|
||||||
public static final @NotNull String PARTY_CONDITION = "partyCondition";
|
public static final @NotNull String PARTY_CONDITION = "partyCondition";
|
||||||
public static final @NotNull String MMO_DATA_LOADED = "mmoDataLoaded";
|
|
||||||
|
//SKILLS
|
||||||
|
public static final @NotNull String POWER_LEVEL_CONDITION = "powerLevelCondition";
|
||||||
|
|
||||||
private final @NotNull mcMMO pluginRef;
|
private final @NotNull mcMMO pluginRef;
|
||||||
private final @NotNull BukkitCommandManager bukkitCommandManager;
|
private final @NotNull BukkitCommandManager bukkitCommandManager;
|
||||||
@ -36,9 +43,16 @@ public class CommandManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void registerCommands() {
|
private void registerCommands() {
|
||||||
|
registerSkillCommands(); //TODO: Implement other skills not just power level
|
||||||
registerChatCommands();
|
registerChatCommands();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void registerSkillCommands() {
|
||||||
|
if(Config.getInstance().isMasterySystemEnabled()) {
|
||||||
|
bukkitCommandManager.registerCommand(new PowerLevelCommand(pluginRef));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers chat commands if the chat system is enabled
|
* Registers chat commands if the chat system is enabled
|
||||||
*/
|
*/
|
||||||
@ -54,6 +68,23 @@ public class CommandManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void registerConditions() {
|
public void registerConditions() {
|
||||||
|
registerChatCommandConditions(); //Chat Commands
|
||||||
|
registerSkillConditions();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void registerSkillConditions() {
|
||||||
|
bukkitCommandManager.getCommandConditions().addCondition(POWER_LEVEL_CONDITION, (context) -> {
|
||||||
|
BukkitCommandIssuer issuer = context.getIssuer();
|
||||||
|
|
||||||
|
if(issuer.getIssuer() instanceof Player) {
|
||||||
|
validateLoadedData(issuer.getPlayer());
|
||||||
|
} else {
|
||||||
|
throw new ConditionFailedException(LocaleLoader.getString("Commands.NoConsole"));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void registerChatCommandConditions() {
|
||||||
// Method or Class based - Can only be used on methods
|
// Method or Class based - Can only be used on methods
|
||||||
bukkitCommandManager.getCommandConditions().addCondition(ADMIN_CONDITION, (context) -> {
|
bukkitCommandManager.getCommandConditions().addCondition(ADMIN_CONDITION, (context) -> {
|
||||||
BukkitCommandIssuer issuer = context.getIssuer();
|
BukkitCommandIssuer issuer = context.getIssuer();
|
||||||
@ -78,6 +109,7 @@ public class CommandManager {
|
|||||||
if(bukkitCommandIssuer.getIssuer() instanceof Player) {
|
if(bukkitCommandIssuer.getIssuer() instanceof Player) {
|
||||||
validateLoadedData(bukkitCommandIssuer.getPlayer());
|
validateLoadedData(bukkitCommandIssuer.getPlayer());
|
||||||
validatePlayerParty(bukkitCommandIssuer.getPlayer());
|
validatePlayerParty(bukkitCommandIssuer.getPlayer());
|
||||||
|
//TODO: Is there even a point in validating permission? look into this later
|
||||||
validatePermission("mcmmo.chat.partychat", bukkitCommandIssuer.getPlayer());
|
validatePermission("mcmmo.chat.partychat", bukkitCommandIssuer.getPlayer());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
package com.gmail.nossr50.commands.skills;
|
||||||
|
|
||||||
|
import co.aikar.commands.BaseCommand;
|
||||||
|
import co.aikar.commands.BukkitCommandIssuer;
|
||||||
|
import co.aikar.commands.annotation.CommandAlias;
|
||||||
|
import co.aikar.commands.annotation.CommandPermission;
|
||||||
|
import co.aikar.commands.annotation.Conditions;
|
||||||
|
import co.aikar.commands.annotation.Default;
|
||||||
|
import com.gmail.nossr50.commands.CommandManager;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
@CommandPermission("mcmmo.commands.mmopower")
|
||||||
|
@CommandAlias("mmopowerlevel|powerlevel") //Kept for historical reasons
|
||||||
|
public class PowerLevelCommand extends BaseCommand {
|
||||||
|
private final @NotNull mcMMO pluginRef;
|
||||||
|
|
||||||
|
public PowerLevelCommand(@NotNull mcMMO pluginRef) {
|
||||||
|
this.pluginRef = pluginRef;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Default
|
||||||
|
@Conditions(CommandManager.ADMIN_CONDITION)
|
||||||
|
public void processCommand(String[] args) {
|
||||||
|
BukkitCommandIssuer bukkitCommandIssuer = (BukkitCommandIssuer) getCurrentCommandIssuer();
|
||||||
|
Player player = bukkitCommandIssuer.getPlayer();
|
||||||
|
|
||||||
|
//TODO: impl
|
||||||
|
}
|
||||||
|
}
|
@ -597,4 +597,5 @@ public class Config extends AutoUpdateConfigLoader {
|
|||||||
public int getPowerLevelUpBroadcastRadius() { return config.getInt("General.Level_Up_Chat_Broadcasts.Broadcast_Powerlevels.Broadcast_Targets.Distance_Restrictions.Restricted_Radius", 100); }
|
public int getPowerLevelUpBroadcastRadius() { return config.getInt("General.Level_Up_Chat_Broadcasts.Broadcast_Powerlevels.Broadcast_Targets.Distance_Restrictions.Restricted_Radius", 100); }
|
||||||
public int getPowerLevelUpBroadcastInterval() { return config.getInt("General.Level_Up_Chat_Broadcasts.Broadcast_Powerlevels.Milestone_Interval", 100); }
|
public int getPowerLevelUpBroadcastInterval() { return config.getInt("General.Level_Up_Chat_Broadcasts.Broadcast_Powerlevels.Milestone_Interval", 100); }
|
||||||
|
|
||||||
|
public boolean isMasterySystemEnabled() { return config.getBoolean( "General.PowerLevel.Skill_Mastery.Enabled"); }
|
||||||
}
|
}
|
||||||
|
@ -11,16 +11,19 @@ public enum SubSkillType {
|
|||||||
/* ACROBATICS */
|
/* ACROBATICS */
|
||||||
ACROBATICS_DODGE(1),
|
ACROBATICS_DODGE(1),
|
||||||
ACROBATICS_ROLL,
|
ACROBATICS_ROLL,
|
||||||
|
ACROBATICS_MASTERY(1),
|
||||||
|
|
||||||
/* ALCHEMY */
|
/* ALCHEMY */
|
||||||
ALCHEMY_CATALYSIS(1),
|
ALCHEMY_CATALYSIS(1),
|
||||||
ALCHEMY_CONCOCTIONS(8),
|
ALCHEMY_CONCOCTIONS(8),
|
||||||
|
ALCHEMY_MASTERY(1),
|
||||||
|
|
||||||
/* ARCHERY */
|
/* ARCHERY */
|
||||||
ARCHERY_ARROW_RETRIEVAL(1),
|
ARCHERY_ARROW_RETRIEVAL(1),
|
||||||
ARCHERY_DAZE,
|
ARCHERY_DAZE,
|
||||||
ARCHERY_SKILL_SHOT(20),
|
ARCHERY_SKILL_SHOT(20),
|
||||||
ARCHERY_ARCHERY_LIMIT_BREAK(10),
|
ARCHERY_ARCHERY_LIMIT_BREAK(10),
|
||||||
|
ARCHERY_MASTERY(1),
|
||||||
|
|
||||||
/* Axes */
|
/* Axes */
|
||||||
AXES_ARMOR_IMPACT(20),
|
AXES_ARMOR_IMPACT(20),
|
||||||
@ -29,10 +32,12 @@ public enum SubSkillType {
|
|||||||
AXES_CRITICAL_STRIKES(1),
|
AXES_CRITICAL_STRIKES(1),
|
||||||
AXES_GREATER_IMPACT(1),
|
AXES_GREATER_IMPACT(1),
|
||||||
AXES_SKULL_SPLITTER(1),
|
AXES_SKULL_SPLITTER(1),
|
||||||
|
AXES_MASTERY(1),
|
||||||
|
|
||||||
/* Excavation */
|
/* Excavation */
|
||||||
EXCAVATION_ARCHAEOLOGY(8),
|
EXCAVATION_ARCHAEOLOGY(8),
|
||||||
EXCAVATION_GIGA_DRILL_BREAKER(1),
|
EXCAVATION_GIGA_DRILL_BREAKER(1),
|
||||||
|
EXCAVATION_MASTERY(1),
|
||||||
|
|
||||||
/* Fishing */
|
/* Fishing */
|
||||||
FISHING_FISHERMANS_DIET(5),
|
FISHING_FISHERMANS_DIET(5),
|
||||||
@ -41,6 +46,7 @@ public enum SubSkillType {
|
|||||||
FISHING_MASTER_ANGLER(8),
|
FISHING_MASTER_ANGLER(8),
|
||||||
FISHING_TREASURE_HUNTER(8),
|
FISHING_TREASURE_HUNTER(8),
|
||||||
FISHING_SHAKE(1),
|
FISHING_SHAKE(1),
|
||||||
|
FISHING_MASTERY(1),
|
||||||
|
|
||||||
/* Herbalism */
|
/* Herbalism */
|
||||||
HERBALISM_DOUBLE_DROPS(1),
|
HERBALISM_DOUBLE_DROPS(1),
|
||||||
@ -49,6 +55,7 @@ public enum SubSkillType {
|
|||||||
HERBALISM_GREEN_THUMB(4),
|
HERBALISM_GREEN_THUMB(4),
|
||||||
HERBALISM_HYLIAN_LUCK,
|
HERBALISM_HYLIAN_LUCK,
|
||||||
HERBALISM_SHROOM_THUMB,
|
HERBALISM_SHROOM_THUMB,
|
||||||
|
HERBALISM_MASTERY(1),
|
||||||
|
|
||||||
/* Mining */
|
/* Mining */
|
||||||
MINING_BIGGER_BOMBS(1),
|
MINING_BIGGER_BOMBS(1),
|
||||||
@ -56,11 +63,13 @@ public enum SubSkillType {
|
|||||||
MINING_DEMOLITIONS_EXPERTISE(1),
|
MINING_DEMOLITIONS_EXPERTISE(1),
|
||||||
MINING_DOUBLE_DROPS(1),
|
MINING_DOUBLE_DROPS(1),
|
||||||
MINING_SUPER_BREAKER(1),
|
MINING_SUPER_BREAKER(1),
|
||||||
|
MINING_MASTERY(1),
|
||||||
|
|
||||||
/* Repair */
|
/* Repair */
|
||||||
REPAIR_ARCANE_FORGING(8),
|
REPAIR_ARCANE_FORGING(8),
|
||||||
REPAIR_REPAIR_MASTERY(1),
|
REPAIR_REPAIR_MASTERY(1),
|
||||||
REPAIR_SUPER_REPAIR(1),
|
REPAIR_SUPER_REPAIR(1),
|
||||||
|
REPAIR_MASTERY(1),
|
||||||
|
|
||||||
/* Salvage */
|
/* Salvage */
|
||||||
SALVAGE_SCRAP_COLLECTOR(8),
|
SALVAGE_SCRAP_COLLECTOR(8),
|
||||||
@ -77,6 +86,7 @@ public enum SubSkillType {
|
|||||||
SWORDS_SERRATED_STRIKES(1),
|
SWORDS_SERRATED_STRIKES(1),
|
||||||
SWORDS_STAB(2),
|
SWORDS_STAB(2),
|
||||||
SWORDS_SWORDS_LIMIT_BREAK(10),
|
SWORDS_SWORDS_LIMIT_BREAK(10),
|
||||||
|
SWORDS_MASTERY(1),
|
||||||
|
|
||||||
/* Taming */
|
/* Taming */
|
||||||
TAMING_BEAST_LORE(1),
|
TAMING_BEAST_LORE(1),
|
||||||
@ -89,6 +99,7 @@ public enum SubSkillType {
|
|||||||
TAMING_SHARPENED_CLAWS(1),
|
TAMING_SHARPENED_CLAWS(1),
|
||||||
TAMING_SHOCK_PROOF(1),
|
TAMING_SHOCK_PROOF(1),
|
||||||
TAMING_THICK_FUR(1),
|
TAMING_THICK_FUR(1),
|
||||||
|
TAMING_MASTERY(1),
|
||||||
|
|
||||||
/* Unarmed */
|
/* Unarmed */
|
||||||
UNARMED_ARROW_DEFLECT(1),
|
UNARMED_ARROW_DEFLECT(1),
|
||||||
@ -98,6 +109,7 @@ public enum SubSkillType {
|
|||||||
UNARMED_STEEL_ARM_STYLE(20),
|
UNARMED_STEEL_ARM_STYLE(20),
|
||||||
UNARMED_IRON_GRIP(1),
|
UNARMED_IRON_GRIP(1),
|
||||||
UNARMED_UNARMED_LIMIT_BREAK(10),
|
UNARMED_UNARMED_LIMIT_BREAK(10),
|
||||||
|
UNARMED_MASTERY(1),
|
||||||
|
|
||||||
/* Woodcutting */
|
/* Woodcutting */
|
||||||
/* WOODCUTTING_BARK_SURGEON(3),*/
|
/* WOODCUTTING_BARK_SURGEON(3),*/
|
||||||
@ -106,7 +118,10 @@ public enum SubSkillType {
|
|||||||
WOODCUTTING_LEAF_BLOWER(1),
|
WOODCUTTING_LEAF_BLOWER(1),
|
||||||
/* WOODCUTTING_NATURES_BOUNTY(3),
|
/* WOODCUTTING_NATURES_BOUNTY(3),
|
||||||
WOODCUTTING_SPLINTER(3),*/
|
WOODCUTTING_SPLINTER(3),*/
|
||||||
WOODCUTTING_TREE_FELLER(1);
|
WOODCUTTING_TREE_FELLER(1),
|
||||||
|
WOODCUTTING_MASTERY(1),
|
||||||
|
|
||||||
|
POWER_LEVEL_MASTERY(1);
|
||||||
|
|
||||||
private final int numRanks;
|
private final int numRanks;
|
||||||
//TODO: SuperAbilityType should also contain flags for active by default? Not sure if it should work that way.
|
//TODO: SuperAbilityType should also contain flags for active by default? Not sure if it should work that way.
|
||||||
|
@ -49,6 +49,9 @@ General:
|
|||||||
RetroMode:
|
RetroMode:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
Locale: en_US
|
Locale: en_US
|
||||||
|
PowerLevel:
|
||||||
|
Skill_Mastery:
|
||||||
|
Enabled: true
|
||||||
AprilFoolsEvent: true
|
AprilFoolsEvent: true
|
||||||
MOTD_Enabled: true
|
MOTD_Enabled: true
|
||||||
EventBroadcasts: true
|
EventBroadcasts: true
|
||||||
|
@ -149,6 +149,10 @@ commands:
|
|||||||
salvage:
|
salvage:
|
||||||
description: Detailed mcMMO skill info
|
description: Detailed mcMMO skill info
|
||||||
permission: mcmmo.commands.salvage
|
permission: mcmmo.commands.salvage
|
||||||
|
mmopower:
|
||||||
|
description: Shows skill mastery and power level info
|
||||||
|
permission: mcmmo.commands.mmopower
|
||||||
|
aliases: [mmopowerlevel, powerlevel]
|
||||||
adminchat:
|
adminchat:
|
||||||
aliases: [ac, a]
|
aliases: [ac, a]
|
||||||
description: Toggle Admin chat or send admin chat messages
|
description: Toggle Admin chat or send admin chat messages
|
||||||
@ -825,6 +829,7 @@ permissions:
|
|||||||
mcmmo.commands.taming: true
|
mcmmo.commands.taming: true
|
||||||
mcmmo.commands.unarmed: true
|
mcmmo.commands.unarmed: true
|
||||||
mcmmo.commands.woodcutting: true
|
mcmmo.commands.woodcutting: true
|
||||||
|
mcmmo.commands.mmopower: true
|
||||||
mcmmo.commands.defaultsop:
|
mcmmo.commands.defaultsop:
|
||||||
description: Implies all default op mcmmo.commands permissions.
|
description: Implies all default op mcmmo.commands permissions.
|
||||||
children:
|
children:
|
||||||
|
Loading…
Reference in New Issue
Block a user