Renamed zeus to thor, improved descriptions

This commit is contained in:
Auxilor
2022-09-05 16:00:17 +01:00
parent 875e2d3002
commit bff9316782
2 changed files with 37 additions and 26 deletions

View File

@@ -61,6 +61,12 @@ fun EcoEnchantLike.getFormattedName(level: Int): String {
}
}
private val resetTags = arrayOf(
"<reset>",
"&r",
"§r"
)
fun EcoEnchantLike.getFormattedDescription(level: Int): List<String> {
val plugin = EcoEnchantsPlugin.instance
@@ -68,7 +74,10 @@ fun EcoEnchantLike.getFormattedDescription(level: Int): List<String> {
val descriptionFormat = plugin.configYml.getString("display.descriptions.format")
val wrap = plugin.configYml.getInt("display.descriptions.word-wrap")
val description = this.getUnformattedDescription(level)
var description = this.getUnformattedDescription(level)
for (tag in resetTags) {
description = description.replace(tag, tag + descriptionFormat)
}
WordUtils.wrap(description, wrap, "\n", false)
.lines()

View File

@@ -1,25 +1,27 @@
display-name: "Zeus"
description: "&a%placeholder%%&8 chance to strike lightning on your opponent"
placeholder: "%level% * 1"
type: normal
targets:
- bow
- crossbow
conflicts: []
rarity: epic
max-level: 6
tradeable: true
discoverable: true
enchantable: true
effects:
- id: strike_lightning
args:
amount: 1
chance: "1 * %level%"
triggers:
- bow_attack
conditions: [ ]
display-name: "Thor"
description: "Gives a &a%chance%%&8 chance to strike &a%bolts%&8 lightning bolts on your opponent"
placeholders:
chance: "%level% * 1"
bolts: "ceil(%level% / 2)"
type: normal
targets:
- bow
- crossbow
conflicts: []
rarity: epic
max-level: 6
tradeable: true
discoverable: true
enchantable: true
effects:
- id: strike_lightning
args:
amount: "ceil(%level% / 2)"
chance: "1 * %level%"
triggers:
- bow_attack
conditions: [ ]