mirror of
https://github.com/Auxilor/EcoSkills.git
synced 2026-01-02 05:46:57 +00:00
Balancing
This commit is contained in:
@@ -12,6 +12,7 @@ import com.willfp.ecoskills.effects.Effect
|
||||
import com.willfp.ecoskills.effects.Effects
|
||||
import com.willfp.ecoskills.getSkillLevel
|
||||
import com.willfp.ecoskills.stats.Stats
|
||||
import org.bukkit.Bukkit
|
||||
import org.bukkit.NamespacedKey
|
||||
import org.bukkit.entity.Player
|
||||
import org.bukkit.event.Listener
|
||||
@@ -70,6 +71,9 @@ abstract class Skill(
|
||||
|
||||
postUpdate()
|
||||
|
||||
guiLoreCache.clear()
|
||||
messagesCache.clear()
|
||||
|
||||
gui = SkillGUI(plugin, this)
|
||||
}
|
||||
|
||||
@@ -103,9 +107,9 @@ abstract class Skill(
|
||||
return levels
|
||||
}
|
||||
|
||||
fun getRewardsMessages(player: Player, level: Int): MutableList<String> {
|
||||
fun getRewardsMessages(player: Player?, level: Int, useCache: Boolean = true): MutableList<String> {
|
||||
val messages = ArrayList<String>()
|
||||
if (messagesCache.containsKey(level)) {
|
||||
if (messagesCache.containsKey(level) && useCache) {
|
||||
messages.addAll(messagesCache[level]!!)
|
||||
} else {
|
||||
var highestLevel = 1
|
||||
@@ -127,14 +131,16 @@ abstract class Skill(
|
||||
}
|
||||
messages.add(msg)
|
||||
}
|
||||
|
||||
guiLoreCache[level] = messages
|
||||
}
|
||||
|
||||
return StringUtils.formatList(messages, player)
|
||||
}
|
||||
|
||||
fun getGUIRewardsMessages(player: Player, level: Int): MutableList<String> {
|
||||
fun getGUIRewardsMessages(player: Player?, level: Int, useCache: Boolean = true): MutableList<String> {
|
||||
val lore = ArrayList<String>()
|
||||
if (guiLoreCache.containsKey(level)) {
|
||||
if (guiLoreCache.containsKey(level) && useCache) {
|
||||
lore.addAll(guiLoreCache[level]!!)
|
||||
} else {
|
||||
var highestLevel = 1
|
||||
@@ -149,7 +155,7 @@ abstract class Skill(
|
||||
}
|
||||
|
||||
for (string in this.config.getStrings("rewards.progression-lore.$highestLevel", false)) {
|
||||
var s = string;
|
||||
var s = string
|
||||
|
||||
for (levelUpReward in this.getLevelUpRewards()) {
|
||||
val skillObject = levelUpReward.obj
|
||||
@@ -162,7 +168,11 @@ abstract class Skill(
|
||||
s = s.replace("%ecoskills_${skillObject.id}_description%", skillObject.getDescription(level))
|
||||
}
|
||||
}
|
||||
|
||||
lore.add(s)
|
||||
}
|
||||
|
||||
guiLoreCache[level] = lore
|
||||
}
|
||||
|
||||
return StringUtils.formatList(lore, player)
|
||||
|
||||
@@ -295,10 +295,10 @@ effects:
|
||||
# for quadruple.
|
||||
chance-per-level: 8
|
||||
versatile_tools:
|
||||
description: "&8Deal &a%percent_more%%&8 damage with pickaxes"
|
||||
description: "&8Deal &a%percent_more%%&8 more damage with pickaxes"
|
||||
|
||||
# The percent (%) more damage to deal with a pickaxe for each level of the effect.
|
||||
percent-more-per-level: 2
|
||||
percent-more-per-level: 8
|
||||
eye_of_the_depths:
|
||||
description: "&a%chance%%&8 to get rare drops from fishing"
|
||||
|
||||
@@ -354,7 +354,7 @@ effects:
|
||||
# The percent faster regen for each level of the effect
|
||||
percent-faster-per-level: 4
|
||||
craftsmanship:
|
||||
description: "&8Axes take &a%percent_less%%&8 durability damage"
|
||||
description: "&8Axes take &a%percent_less%%&8 less durability damage"
|
||||
|
||||
# 100% is unbreakable
|
||||
percent-less-per-level: 2
|
||||
@@ -373,12 +373,12 @@ effects:
|
||||
# The ticks faster brewing time for each level (default is 400)
|
||||
ticks-less-per-level: 6
|
||||
mystic_resilience:
|
||||
description: "&a%chance%%&8 to ignore negative potion effects"
|
||||
description: "&a%chance%%&8 chance to ignore negative potion effects"
|
||||
|
||||
# Chance per level as a percentage
|
||||
chance-per-level: 0.1
|
||||
satiation:
|
||||
description: "&8Lose &a%percent_less%%&8 hunger"
|
||||
description: "&8Lose &a%percent_less%%&8 less hunger"
|
||||
|
||||
# 100% is no hunger
|
||||
percent-less-hunger-per-level: 2
|
||||
@@ -391,7 +391,7 @@ effects:
|
||||
# The amount more drops to give
|
||||
drop-multiplier: 5
|
||||
dodging:
|
||||
description: "&a%chance%%&8 to ignore incoming damage"
|
||||
description: "&a%chance%%&8 chance to ignore incoming damage"
|
||||
|
||||
# The chance to ignore damage, as a percentage
|
||||
chance-per-level: 0.5
|
||||
|
||||
Reference in New Issue
Block a user