15 lines
646 B
Mcfunction
15 lines
646 B
Mcfunction
|
# reset cd for owner
|
||
|
execute at @s as @a if score @s me-core_uid = @e[limit=1,sort=nearest,tag=MagicMissile] me-core_uid if score @s me-weap_staffCD > $10 me-weap_staffCD run scoreboard players operation @s me-weap_staffCD = $10 me-weap_staffCD
|
||
|
|
||
|
# magic explosion! (little)
|
||
|
particle minecraft:end_rod ^ ^ ^-0.15 0 0 0 0.1 5
|
||
|
|
||
|
# play dead sound to nearby players
|
||
|
playsound undeadm-m1:entity.magic_missile.die neutral @a ~ ~ ~ 0.5 2
|
||
|
|
||
|
# play dead sound to owner
|
||
|
execute as @a if score @s me-core_uid = @e[limit=1,sort=nearest,tag=MagicMissile] me-core_uid at @s run playsound undeadm-m1:entity.magic_missile.die neutral @a ~ ~ ~ 0.5 2
|
||
|
|
||
|
# die
|
||
|
kill @s
|