More work on end game skills

This commit is contained in:
nossr50 2023-02-18 23:44:01 -08:00
parent 12fb4a3679
commit e4470fd061
10 changed files with 57 additions and 37 deletions

View File

@ -1,29 +1,16 @@
Version 2.2.000 Version 2.2.000
Updated Adventure (our text dependency) fixes some errors when using color codes in party/admin chat (thanks TheBusyBiscuit)
Added some support for negative Y values in anticipation of 1.17 world height changes (thanks t00thpick1)
(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 (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 a setting 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 "mastery" subskills meant for end game progression
Added the mastery subskill 'Mother Lode' to Mining Added the mastery subskill 'Mother Lode' to Mining
Added the mastery subskill 'Clean Cuts' to Woodcutting Added the mastery subskill 'Clean Cuts' to Woodcutting
Added the mastery subskill 'Verdant Bounty' to Herbalism
All new skills have had settings added to advanced.yml
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.acrobatics.mastery' permission node Added 'mcmmo.ability.herbalism.verdantbounty' permission node
Added 'mcmmo.ability.alchemy.mastery' permission node
Added 'mcmmo.ability.archery.mastery' permission node
Added 'mcmmo.ability.axes.mastery' permission node
Added 'mcmmo.ability.excavation.mastery' permission node
Added 'mcmmo.ability.fishing.mastery' permission node
Added 'mcmmo.ability.herbalism.mastery' permission node
Added 'mcmmo.ability.mining.motherlode' permission node Added 'mcmmo.ability.mining.motherlode' permission node
Added 'mcmmo.ability.repair.mastery' permission node
Added 'mcmmo.ability.salvage.mastery' permission node
Added 'mcmmo.ability.smelting.mastery' permission node
Added 'mcmmo.ability.salvage.mastery' permission node
Added 'mcmmo.ability.swords.mastery' permission node
Added 'mcmmo.ability.taming.mastery' permission node
Added 'mcmmo.ability.unarmed.mastery' permission node
Added 'mcmmo.ability.woodcutting.cleancuts' permission node Added 'mcmmo.ability.woodcutting.cleancuts' permission node
Added 'Mining.SubSkill.MotherLode.Name' to locale Added 'Mining.SubSkill.MotherLode.Name' to locale
Added 'Mining.SubSkill.MotherLode.Stat' to locale Added 'Mining.SubSkill.MotherLode.Stat' to locale
@ -31,9 +18,12 @@ Version 2.2.000
Added 'Woodcutting.SubSkill.CleanCuts.Name' to locale Added 'Woodcutting.SubSkill.CleanCuts.Name' to locale
Added 'Woodcutting.SubSkill.CleanCuts.Stat' to locale Added 'Woodcutting.SubSkill.CleanCuts.Stat' to locale
Added 'Woodcutting.SubSkill.CleanCuts.Description' to locale Added 'Woodcutting.SubSkill.CleanCuts.Description' to locale
(Codebase) Major refactoring for how random chance was handled in the code Added 'Herbalism.SubSkill.VerdantBounty.Name' to locale
Added 'Herbalism.SubSkill.VerdantBounty.Stat' to locale
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 (will also disable the new power level command) 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. 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.
@ -47,12 +37,15 @@ Version 2.2.000
Mastery Skills 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. 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. 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. 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. 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. 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. 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 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. This power level command gives you a view of all your current masteries, it also provides a summary of your power level.

View File

@ -35,6 +35,7 @@ public class HerbalismCommand extends SkillCommand {
private boolean canGreenThumbBlocks; private boolean canGreenThumbBlocks;
private boolean canFarmersDiet; private boolean canFarmersDiet;
private boolean canDoubleDrop; private boolean canDoubleDrop;
private boolean canTripleDrop;
private boolean canShroomThumb; private boolean canShroomThumb;
public HerbalismCommand() { public HerbalismCommand() {
@ -51,6 +52,12 @@ public class HerbalismCommand extends SkillCommand {
doubleDropChanceLucky = doubleDropStrings[1]; doubleDropChanceLucky = doubleDropStrings[1];
} }
if (canTripleDrop) {
String[] tripleDropStrings = ProbabilityUtil.getRNGDisplayValues(player, SubSkillType.HERBALISM_VERDANT_BOUNTY);
doubleDropChance = tripleDropStrings[0];
doubleDropChanceLucky = tripleDropStrings[1];
}
// FARMERS DIET // FARMERS DIET
if (canFarmersDiet) { if (canFarmersDiet) {
farmersDietRank = RankUtils.getRank(player, SubSkillType.HERBALISM_FARMERS_DIET); farmersDietRank = RankUtils.getRank(player, SubSkillType.HERBALISM_FARMERS_DIET);

View File

@ -32,7 +32,7 @@ public class MiningCommand extends SkillCommand {
private boolean canSuperBreaker; private boolean canSuperBreaker;
private boolean canDoubleDrop; private boolean canDoubleDrop;
private boolean canMotherLode; private boolean canTripleDrop;
private boolean canBlast; private boolean canBlast;
private boolean canBiggerBombs; private boolean canBiggerBombs;
private boolean canDemoExpert; private boolean canDemoExpert;
@ -56,7 +56,7 @@ public class MiningCommand extends SkillCommand {
} }
// Mastery TRIPLE DROPS // Mastery TRIPLE DROPS
if (canMotherLode) { if (canTripleDrop) {
String[] masteryTripleDropStrings = ProbabilityUtil.getRNGDisplayValues(player, SubSkillType.MINING_MOTHER_LODE); String[] masteryTripleDropStrings = ProbabilityUtil.getRNGDisplayValues(player, SubSkillType.MINING_MOTHER_LODE);
tripleDropChance = masteryTripleDropStrings[0]; tripleDropChance = masteryTripleDropStrings[0];
tripleDropChanceLucky = masteryTripleDropStrings[1]; tripleDropChanceLucky = masteryTripleDropStrings[1];
@ -83,7 +83,7 @@ public class MiningCommand extends SkillCommand {
canBlast = RankUtils.hasUnlockedSubskill(player, SubSkillType.MINING_BLAST_MINING) && Permissions.remoteDetonation(player); canBlast = RankUtils.hasUnlockedSubskill(player, SubSkillType.MINING_BLAST_MINING) && Permissions.remoteDetonation(player);
canDemoExpert = RankUtils.hasUnlockedSubskill(player, SubSkillType.MINING_DEMOLITIONS_EXPERTISE) && Permissions.demolitionsExpertise(player); canDemoExpert = RankUtils.hasUnlockedSubskill(player, SubSkillType.MINING_DEMOLITIONS_EXPERTISE) && Permissions.demolitionsExpertise(player);
canDoubleDrop = Permissions.canUseSubSkill(player, SubSkillType.MINING_DOUBLE_DROPS); canDoubleDrop = Permissions.canUseSubSkill(player, SubSkillType.MINING_DOUBLE_DROPS);
canMotherLode = Permissions.canUseSubSkill(player, SubSkillType.MINING_MOTHER_LODE); canTripleDrop = Permissions.canUseSubSkill(player, SubSkillType.MINING_MOTHER_LODE);
canSuperBreaker = RankUtils.hasUnlockedSubskill(player, SubSkillType.MINING_SUPER_BREAKER) && Permissions.superBreaker(player); canSuperBreaker = RankUtils.hasUnlockedSubskill(player, SubSkillType.MINING_SUPER_BREAKER) && Permissions.superBreaker(player);
} }
@ -112,12 +112,11 @@ public class MiningCommand extends SkillCommand {
//messages.add(LocaleLoader.getString("Mining.Effect.DropChance", doubleDropChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", doubleDropChanceLucky) : "")); //messages.add(LocaleLoader.getString("Mining.Effect.DropChance", doubleDropChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", doubleDropChanceLucky) : ""));
} }
if(canMotherLode) { if(canTripleDrop) {
messages.add(getStatMessage(SubSkillType.MINING_MOTHER_LODE, tripleDropChance) messages.add(getStatMessage(SubSkillType.MINING_MOTHER_LODE, tripleDropChance)
+ (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", tripleDropChanceLucky) : "")); + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", tripleDropChanceLucky) : ""));
} }
if (canSuperBreaker) { if (canSuperBreaker) {
messages.add(getStatMessage(SubSkillType.MINING_SUPER_BREAKER, superBreakerLength) messages.add(getStatMessage(SubSkillType.MINING_SUPER_BREAKER, superBreakerLength)
+ (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", superBreakerLengthEndurance) : "")); + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", superBreakerLengthEndurance) : ""));

View File

@ -38,7 +38,6 @@ public enum SubSkillType {
/* 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),
@ -51,6 +50,7 @@ public enum SubSkillType {
/* Herbalism */ /* Herbalism */
HERBALISM_DOUBLE_DROPS(1), HERBALISM_DOUBLE_DROPS(1),
HERBALISM_VERDANT_BOUNTY(1),
HERBALISM_FARMERS_DIET(5), HERBALISM_FARMERS_DIET(5),
HERBALISM_GREEN_TERRA(1), HERBALISM_GREEN_TERRA(1),
HERBALISM_GREEN_THUMB(4), HERBALISM_GREEN_THUMB(4),
@ -147,7 +147,7 @@ public enum SubSkillType {
/** /**
* !!! This relies on the immutable lists in PrimarySkillType being populated !!! * !!! This relies on the immutable lists in PrimarySkillType being populated !!!
* If we add skills, those immutable lists need to be updated * If we add skills, those immutable lists need to be updated
* @return * @return the parent skill of this subskill
*/ */
public PrimarySkillType getParentSkill() { return mcMMO.p.getSkillTools().getPrimarySkillBySubSkill(this); } public PrimarySkillType getParentSkill() { return mcMMO.p.getSkillTools().getPrimarySkillBySubSkill(this); }

View File

@ -35,7 +35,7 @@ public class MiningManager extends SkillManager {
public static final String BUDDING_AMETHYST = "budding_amethyst"; public static final String BUDDING_AMETHYST = "budding_amethyst";
public MiningManager(McMMOPlayer mcMMOPlayer) { public MiningManager(@NotNull McMMOPlayer mcMMOPlayer) {
super(mcMMOPlayer, PrimarySkillType.MINING); super(mcMMOPlayer, PrimarySkillType.MINING);
} }

View File

@ -24,7 +24,7 @@ public class RankUtils {
* *
* @param plugin plugin instance ref * @param plugin plugin instance ref
* @param mcMMOPlayer target player * @param mcMMOPlayer target player
* @param primarySkillType * @param primarySkillType the skill to check
* @param newLevel the new level of this skill * @param newLevel the new level of this skill
*/ */
public static void executeSkillUnlockNotifications(Plugin plugin, McMMOPlayer mcMMOPlayer, PrimarySkillType primarySkillType, int newLevel) public static void executeSkillUnlockNotifications(Plugin plugin, McMMOPlayer mcMMOPlayer, PrimarySkillType primarySkillType, int newLevel)
@ -55,6 +55,9 @@ public class RankUtils {
} }
} }
/**
* Reset the interval between skill unlock notifications
*/
public static void resetUnlockDelayTimer() public static void resetUnlockDelayTimer()
{ {
count = 0; count = 0;

View File

@ -257,6 +257,11 @@ Skills:
MaxBonusLevel: MaxBonusLevel:
Standard: 100 Standard: 100
RetroMode: 1000 RetroMode: 1000
VerdantBounty:
ChanceMax: 15.0
MaxBonusLevel:
Standard: 1000
RetroMode: 10000
HylianLuck: HylianLuck:
# ChanceMax: Maximum chance of Hylian Luck when on <MaxBonusLevel> or higher # ChanceMax: Maximum chance of Hylian Luck when on <MaxBonusLevel> or higher
@ -281,7 +286,7 @@ Skills:
MaxBonusLevel: MaxBonusLevel:
Standard: 1000 Standard: 1000
RetroMode: 10000 RetroMode: 10000
ChanceMax: 10.0 ChanceMax: 15.0
SuperBreaker: SuperBreaker:
AllowTripleDrops: true AllowTripleDrops: true
DoubleDrops: DoubleDrops:
@ -606,9 +611,9 @@ Skills:
# Triple Drops # Triple Drops
CleanCuts: CleanCuts:
# ChanceMax: Maximum chance of receiving double drops (100 = 100%) # ChanceMax: Maximum chance of receiving triple drops (100 = 100%)
# MaxBonusLevel: Level when the maximum chance of receiving double drops is reached # MaxBonusLevel: Level when the maximum chance of receiving double drops is reached
ChanceMax: 10.0 ChanceMax: 15.0
MaxBonusLevel: MaxBonusLevel:
Standard: 1000 Standard: 1000
RetroMode: 10000 RetroMode: 10000

View File

@ -285,8 +285,11 @@ Herbalism.SubSkill.FarmersDiet.Name=Farmer's Diet
Herbalism.SubSkill.FarmersDiet.Description=Improves hunger restored from farmed foods Herbalism.SubSkill.FarmersDiet.Description=Improves hunger restored from farmed foods
Herbalism.SubSkill.FarmersDiet.Stat=Farmer's Diet: &aRank {0} Herbalism.SubSkill.FarmersDiet.Stat=Farmer's Diet: &aRank {0}
Herbalism.SubSkill.DoubleDrops.Name=Double Drops Herbalism.SubSkill.DoubleDrops.Name=Double Drops
Herbalism.SubSkill.DoubleDrops.Description=Double the normal loot Herbalism.SubSkill.DoubleDrops.Description=Skillfully harvest double the loot
Herbalism.SubSkill.DoubleDrops.Stat=Double Drop Chance Herbalism.SubSkill.DoubleDrops.Stat=Double Drop Chance
Herbalism.SubSkill.VerdantBounty.Name=Verdant Bounty
Herbalism.SubSkill.VerdantBounty.Description=Masterfully harvest triple the loot
Herbalism.SubSkill.VerdantBounty.Stat=Triple Drop Chance
Herbalism.SubSkill.HylianLuck.Name=Hylian Luck Herbalism.SubSkill.HylianLuck.Name=Hylian Luck
Herbalism.SubSkill.HylianLuck.Description=Gives a small chance of finding rare items Herbalism.SubSkill.HylianLuck.Description=Gives a small chance of finding rare items
Herbalism.SubSkill.HylianLuck.Stat=Hylian Luck Chance Herbalism.SubSkill.HylianLuck.Stat=Hylian Luck Chance
@ -311,10 +314,10 @@ Mining.SubSkill.SuperBreaker.Name=Super Breaker
Mining.SubSkill.SuperBreaker.Description=Speed+, Triple Drop Chance Mining.SubSkill.SuperBreaker.Description=Speed+, Triple Drop Chance
Mining.SubSkill.SuperBreaker.Stat=Super Breaker Length Mining.SubSkill.SuperBreaker.Stat=Super Breaker Length
Mining.SubSkill.DoubleDrops.Name=Double Drops Mining.SubSkill.DoubleDrops.Name=Double Drops
Mining.SubSkill.DoubleDrops.Description=Double the normal loot Mining.SubSkill.DoubleDrops.Description=Skillfully mine double the loot
Mining.SubSkill.DoubleDrops.Stat=Double Drop Chance Mining.SubSkill.DoubleDrops.Stat=Double Drop Chance
Mining.SubSkill.MotherLode.Name=Mother Lode Mining.SubSkill.MotherLode.Name=Mother Lode
Mining.SubSkill.MotherLode.Description=Triple the normal loot Mining.SubSkill.MotherLode.Description=Masterfully mine triple the loot
Mining.SubSkill.MotherLode.Stat=Triple Drop Chance Mining.SubSkill.MotherLode.Stat=Triple Drop Chance
Mining.SubSkill.BlastMining.Name=Blast Mining Mining.SubSkill.BlastMining.Name=Blast Mining
Mining.SubSkill.BlastMining.Description=Bonuses to mining with TNT Mining.SubSkill.BlastMining.Description=Bonuses to mining with TNT

View File

@ -397,8 +397,8 @@ permissions:
mcmmo.ability.herbalism.greenthumb.all: true mcmmo.ability.herbalism.greenthumb.all: true
mcmmo.ability.herbalism.hylianluck: true mcmmo.ability.herbalism.hylianluck: true
mcmmo.ability.herbalism.shroomthumb: true mcmmo.ability.herbalism.shroomthumb: true
mcmmo.ability.herbalism.mastery: true mcmmo.ability.herbalism.verdantbounty: true
mcmmo.ability.herbalism.mastery: mcmmo.ability.herbalism.verdantbounty:
description: Allows access to end game progression for Herbalism description: Allows access to end game progression for Herbalism
mcmmo.ability.herbalism.doubledrops: mcmmo.ability.herbalism.doubledrops:
description: Allows double drop chance from Herbalism description: Allows double drop chance from Herbalism

View File

@ -413,6 +413,11 @@ Herbalism:
Rank_1: 1 Rank_1: 1
RetroMode: RetroMode:
Rank_1: 1 Rank_1: 1
VerdantBounty:
Standard:
Rank_1: 100
RetroMode:
Rank_1: 1000
GreenTerra: GreenTerra:
Standard: Standard:
Rank_1: 5 Rank_1: 5
@ -688,6 +693,11 @@ Woodcutting:
Rank_1: 1 Rank_1: 1
RetroMode: RetroMode:
Rank_1: 1 Rank_1: 1
CleanCuts:
Standard:
Rank_1: 100
RetroMode:
Rank_1: 1000
KnockOnWood: KnockOnWood:
Standard: Standard:
Rank_1: 30 Rank_1: 30