Skip to content

Instantly share code, notes, and snippets.

@JasperLorelai
Created February 22, 2024 15:20
Show Gist options
  • Save JasperLorelai/5a96fd6483f070bf30522a6cd5f5826e to your computer and use it in GitHub Desktop.
Save JasperLorelai/5a96fd6483f070bf30522a6cd5f5826e to your computer and use it in GitHub Desktop.
variables:
protego_diabolica_target_x:
type: playerstring
protego_diabolica_target_z:
type: playerstring
protego_diabolica_radius:
type: player
protego_diabolica_rotate_loop:
spell-class: ".targeted.LoopSpell"
always-granted: true
cast-item: stick
interval: 1
iterations: 45
targeted: false
# Make the caster look at the ground.
modifiers: [pitch <10 variable meta_location_pitch;=10]
spell-on-end: protego_diabolica_place
spells: [protego_diabolica_rotate, protego_diabolica_initial]
protego_diabolica_rotate:
spell-class: ".targeted.RotateSpell"
helper-spell: true
target-self: true
rotation-yaw: 8
protego_diabolica_initial:
spell-class: ".instant.BeamSpell"
helper-spell: true
y-offset: 1.2
hit-radius: 0.01
vertical-hit-radius: 0.01
stop-on-hit-ground: true
effects:
ground:
position: disabled
height-offset: 0.5
effect: effectlib
effectlib:
class: Sphere
particle: redstone
color: 02e9fa
radius: 0.4
particles: 5
radiusIncrease: 0
type: repeating
period: 1
iterations: 45 # Loop's iterations
protego_diabolica_place:
spell-class: ".MultiSpell"
helper-spell: true
spells:
- protego_diabolica_radius_save(args=[x])
- protego_diabolica_radius_save(args=[z])
- protego_diabolica_nova
- protego_diabolica_damage_loop
protego_diabolica_radius_save:
spell-class: ".targeted.DataSpell"
helper-spell: true
target-self: true
variable-name: protego_diabolica_target_%arg:1:x%
data-element: targetedblock.%arg:1:x%
protego_diabolica_nova:
spell-class: ".targeted.NovaSpell"
helper-spell: true
type: soul_fire
variable-mods-cast:
- protego_diabolica_radius =sqrt((%var:meta_location_x%-%var:protego_diabolica_target_x%)^2+(%var:meta_location_z%-%var:protego_diabolica_target_z%)^2)
# Cap the circle radius to a desired max value.
- protego_diabolica_radius =min(%var:protego_diabolica_radius%, 10)
radius: "%var:protego_diabolica_radius%"
start-radius: "%var:protego_diabolica_radius%"
expand-interval: 200 # Duration
circle-shape: true
protego_diabolica_damage_loop:
spell-class: ".targeted.LoopSpell"
helper-spell: true
duration: 200 # Same as nova
interval: 10
targeted: true
point-blank: true
spells: [protego_diabolica_push_aoe]
protego_diabolica_push_aoe:
spell-class: ".targeted.ForcebombSpell"
helper-spell: true
pushback-force: 10
additional-vertical-force: 5
radius: "%var:protego_diabolica_radius%"
# We don't need an aoe spell since this is an aoe.
target-modifiers: [always cast protego_diabolica_damage]
protego_diabolica_damage:
spell-class: ".targeted.PainSpell"
helper-spell: true
damage: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment