Cookbook
On this page(21)
Each recipe below is a working pattern. Copy the actions: into an enchant file, set its root keys
(display-name, max-level, chance, trigger, cooldown-ticks, cost) and add its
menu tiles. The numbers are starting points: balance them on your server.
1. A critical hit with a floating text
The simplest strong enchant: a second hit, harder with the level.
chance: { min: 1, max: 15 }
cooldown-ticks: 0
actions:
- type: damage
amount: '{damage} * (1 + {level} / 100)'
- { type: particle, particle: CRIT, at: '{target_center}', count: 15, spread: '0.3, 0.4, 0.3', speed: 0.2 }
- { type: sound, sound: ENTITY_PLAYER_ATTACK_CRIT, volume: 0.8, pitch: '{random:0.9:1.2}' }
- type: entity
display: { text: '&c&lCRIT!', billboard: center }
at: '{target_top}'
offset: '0, 0.2, 0'
lifetime: 20
movement: { type: rise, speed: 0.04 }2. Money on kill
trigger: kill rolls only on a swing that killed its target.
trigger: kill
chance: { min: 5, max: 50 }
actions:
- preset: currency-reward
with: { currency: money, amount: '25 * {level}' }
- { type: sound, sound: ENTITY_EXPERIENCE_ORB_PICKUP, pitch: 1.2 }3. An explosion around the target
The area-burst preset draws a sphere, hits every mob in the radius and plays a sound.
cooldown-ticks: 20
actions:
- { type: particle, particle: FLAME, shape: helix, at: '{target_pos}', radius: 1.5, height: 3, turns: 3, count: 60 }
- preset: area-burst
with: { radius: 6, amount: '{damage} * 8', particle: FLAME, sound: ITEM_FIRECHARGE_USE }4. The executioner
A heavy hit that also kills any mob it leaves under a share of its health.
cooldown-ticks: 40
actions:
- type: entity
display: { item: sword, billboard: fixed }
at: '{target_pos}'
offset: '0, 6, 0'
scale: 4
lifetime: 16
movement: { type: fall, speed: 0.35 }
animation:
rotation: [ { value: '0 0 0', ticks: 0 }, { value: '0 0 -720', ticks: 14 } ]
- { type: delay, ticks: 14 } # the blade lands
- { type: damage, amount: '{damage} * 12', execute-below: 40 }
- { type: sound, sound: ENTITY_PLAYER_ATTACK_STRONG, at: '{target_pos}', pitch: 0.6 }5. Chain lightning that grows
Each jump doubles the damage of the one before.
cooldown-ticks: 40
actions:
- type: chain
start: target
jumps: 7
radius: 8
delay-ticks: 3
actions:
- { type: particle, particle: ELECTRIC_SPARK, shape: line, at: '{from_center}', to: '{to_center}', count: 20 }
- { type: damage, at: '{to_pos}', amount: '{damage} * 5 * pow(2, {jump} - 1)' }
- { type: sound, sound: ENTITY_LIGHTNING_BOLT_IMPACT, at: '{to_pos}', volume: 0.5, pitch: 1.6 }6. A rain of blades
Each round drops a blade and starts a parallel branch that hits when that blade lands, while the
next blades keep falling.
cooldown-ticks: 60
actions:
- type: loop
times: 12
every: 2
actions:
- preset: falling-blade # lands in 10 ticks
with: { item: sword, height: 8, scale: 1.5 }
- type: parallel
actions:
- { type: delay, ticks: 10 }
- { type: damage, amount: '{damage} * 15' }
- { type: sound, sound: ENTITY_PLAYER_ATTACK_STRONG, at: '{target_pos}', volume: 0.6, pitch: '{random:0.9:1.3}' }Swap item: sword for item: TRIDENT or any item for another look.
7. A ring of lightning
Six bolts around the target, one every 3 ticks, each hitting the mobs near it.
cooldown-ticks: 60
actions:
- type: for-each-point
points: { path: circle, count: 6, radius: 4, from: '{target_pos}', order: clockwise }
every: 3
actions:
- { type: lightning, at: '{point_pos}' }
- type: damage
amount: '{damage} * 3'
area: { center: '{point_pos}', radius: 2, max-mobs: 3 }8. Strike every mob in the zone
A rare, big proc that hits each of your mobs.
chance: { min: 0.1, max: 0.7 }
cooldown-ticks: 100
actions:
- { type: title, title: '', subtitle: '&6&lSUNDIAL', fade-in: 2, stay: 20, fade-out: 6 }
- type: for-each-mob
mobs: { max: 1000 }
actions:
- { type: damage, at: '{mob_pos}', amount: '{damage} * 9' }
- { type: particle, particle: END_ROD, at: '{mob_center}', count: 5, spread: '0.2, 0.4, 0.2', speed: 0.02 }9. Finish the wounded
Hits the 3 most wounded mobs near the target, harder the less health they have.
actions:
- type: for-each-mob
mobs: { from: '{target_pos}', radius: 10, max: 3, order: lowest-health-percent }
every: 3
actions:
- type: damage
at: '{mob_pos}'
amount: '{damage} * (2 + (100 - {mob_health_percent}) / 25)'
- { type: particle, particle: DAMAGE_INDICATOR, at: '{mob_center}', count: 6, spread: '0.3, 0.3, 0.3' }10. A stacking mark
Each proc adds a charge (+20% damage taken), up to 5. A text shows the stacks.
chance: { min: 2, max: 20 }
actions:
- { type: debuff, id: mark, percent: 20, max-stacks: 5, duration: 160, refresh: all }
- type: entity
display: { text: '&5&lMARK &dx{debuff_stacks}', billboard: center }
at: '{target_top}'
lifetime: 20
movement: { type: rise, speed: 0.04 }
requirement: '{debuff_stacks} > 0'
- { type: sound, sound: ENTITY_PLAYER_ATTACK_STRONG, at: '{target_pos}', pitch: '0.8 + {debuff_stacks} * 0.15' }11. A frenzy buff that stacks
Each proc adds +10% damage for 10 seconds, stacking up to +100%. In memory only.
chance: 3
actions:
- type: add-booster
id: 'frenzy-{enchant_id}'
name: '&cFrenzy'
target: damage
multiplier: '0.1'
stacking: additive
time: 10s
persistent: false
if-exists: stack
max-multiplier: 1
- { type: actionbar, message: '&c&lFRENZY &7stacked' }12. Summon allies
Three clones of the player, with their skin and gear, fight for 8 seconds.
cooldown-ticks: 200
actions:
- type: npc
count: 3
at: random-mobs
skin: player
equipment: copy-player
lifetime: 160
attack: { per-second: 2, damage: '{damage} * 2', target: nearest, move: walk }
- { type: sound, sound: ENTITY_EVOKER_PREPARE_SUMMON, volume: 0.8 }13. Bless the mobs (better rewards)
Raises the rarity of up to 5 mobs near the target. A better rarity pays more on death.
chance: { min: 0.2, max: 3 }
cooldown-ticks: 60
actions:
- type: set-rarity
up: 1
mobs: { from: '{target_pos}', radius: 6, max: 5 }
- { type: particle, particle: TOTEM_OF_UNDYING, at: '{target_center}', count: 30, spread: '1, 1, 1', speed: 0.3 }14. A jackpot with weighted outcomes
Most procs give a little, some give a lot.
actions:
- type: random
entries:
- weight: 8
actions:
- { type: give-currency, currency: money, amount: '100 * {level}' }
- weight: 2
actions:
- { type: give-currency, currency: money, amount: '1000 * {level}' }
- { type: title, title: '&6&lJACKPOT', subtitle: '&7x10 money', fade-in: 0, stay: 30, fade-out: 10 }15. Level milestones
One enchant that unlocks new parts as the player levels it.
max-level: 1000
actions:
- { type: damage, amount: '{damage} * 3' }
- type: damage # from level 250: an area hit
amount: '{damage} * 2'
area: { center: '{target_pos}', radius: 4, max-mobs: 6 }
requirement: '{level} >= 250'
- type: loop # from level 750: three lightnings
times: 3
every: 4
requirement: '{level} >= 750'
actions:
- { type: lightning, at: '{random_in_area}' }16. An orbiting blade
An axe circles the player while a for-each-mob hits the mobs around them over time.
cooldown-ticks: 30
actions:
- type: entity
display: { item: IRON_AXE, billboard: fixed }
at: '{player_pos}'
offset: '0, 1, 0'
lifetime: 30
movement: { type: orbit, speed: 0.5, radius: 3 }
animation:
loop: true
rotation: [ { value: '0 0 0', ticks: 0 }, { value: '0 0 -360', ticks: 10 } ]
- type: for-each-mob
mobs: { from: '{player_pos}', radius: 7, max: 4 }
every: 6
actions:
- { type: damage, at: '{mob_pos}', amount: '{damage} * 0.5' }
- { type: particle, particle: SWEEP_ATTACK, at: '{mob_center}', count: 1 }17. A second swing
One more swing of the player that may proc two chosen enchants, at half damage.
chance: 2
actions:
- type: proc-enchants
mode: whitelist
enchants: [critical, lightning]
damage: '{damage} * 0.5'18. Speed while fighting
Speed in the zone only, stronger at high levels.
chance: { min: 3, max: 25 }
cooldown-ticks: 40
actions:
- type: potion
effect: speed
amplifier: 'floor({level} / 500)'
duration: 100
particles: false19. A lance from the sky
A beam falls, a lightning strikes, then everything within 10 blocks takes the hit.
cooldown-ticks: 20
actions:
- { type: particle, particle: END_ROD, shape: line, at: '{target_pos}', offset: '0, 20, 0', to: '{target_pos}', count: 40 }
- { type: delay, ticks: 10 }
- { type: lightning, at: '{target_pos}' }
- preset: area-burst
with: { radius: 10, amount: '{damage} * 7.5', particle: EXPLOSION }20. A siege along the area border
Wardens rise one by one along your mob area's border; each fires at the mob nearest to it.
chance: { min: 0.1, max: 1.5 }
cooldown-ticks: 200
actions:
- type: for-each-point
points: { path: area-border, count: 8, order: clockwise, start: north-west }
every: 5
actions:
- { type: entity, entity: WARDEN, at: '{point_pos}', glow: dark_aqua, lifetime: 30 }
- type: parallel
actions:
- { type: delay, ticks: 12 }
- type: for-each-mob
mobs: { from: '{point_pos}', order: nearest, max: 1 }
actions:
- { type: particle, particle: SONIC_BOOM, shape: line, at: '{point_pos}', offset: '0, 1.8, 0', to: '{mob_center}', count: 16 }
- { type: damage, at: '{mob_pos}', amount: '{damage} * 8' }The shipped files are recipes too
Every shipped enchant in modules/sword/enchants/ is a complete, balanced example. Read
warden-siege.yml for nested flows, dice.yml for weighted presets, sword-storm.yml for the
landing pattern and example.yml for every key. To restore one you deleted, copy it from the jar
(it is a zip) to the same folder and run /dungeons reload.