/ === SPECIAL EFFECTS ===

/ knockback
type=entity,ID=lucky:lucky_projectile,pos=#bowPos,NBTTag=(
    Motion=#bowMotion,
    item=(id=feather),
    impact=["group(
        type=effect,ID=special_knockback,power=2.5,range=4,delay=0.1;
        type=particle,ID=poof,size=(1.5,1.0,1.5),particleAmount=500
    )"]
)@luck=2@chance=5

/ arrow stream
type=entity,ID=arrow,pos=#bowPos,NBTTag=(Motion=#bowMotion,Color=-1),amount=30,delay=#rand(0.0,3.0)@luck=1

/ snowball stream
type=entity,ID=snowball,pos=#bowPos,NBTTag=(Motion=#bowMotion,Color=-1),amount=30,delay=#rand(0.0,3.0)@luck=0

/ ender pearl stream
type=entity,ID=ender_pearl,pos=#bowPos,NBTTag=(Motion=#bowMotion,Color=-1),amount=30,delay=#rand(0.0,3.0)@luck=2

/ near radius throwup
type=entity,ID=lucky:lucky_projectile,pos=#bowPos,NBTTag=(
    Motion=#bowMotion,
    item=(id=heart_of_the_sea),
    damage=1.0,
    impact=["type=command,ID="/tp @e[r=3] ~ ~10 ~" "]
)@luck=2

/ air placer lucky
type=entity,ID=lucky:lucky_projectile,pos=#bowPos,NBTTag=(
    Motion=#bowMotion,
    item=(id=lucky:elewind_lucky_potion),
    damage=1.0,
    impact=["type=command,ID="/fill ~2 ~2 ~2 ~-2 ~-2 ~-2 air destroy" "]
)@luck=2

/ air placer default
type=entity,ID=lucky:lucky_projectile,pos=#bowPos,NBTTag=(
    Motion=#bowMotion,
    item=(id=lucky:elewind_lucky_potion),
    damage=1.0,
    impact=["type=command,ID="/fill ~1 ~1 ~1 ~-1 ~-1 ~-1 air destroy" "]
)@luck=1

/ air hole
type=entity,ID=lucky:lucky_projectile,pos=#bowPos,NBTTag=(
    Motion=#bowMotion,
    item=(id=iron_shovel),
    damage=1.0,
    impact=["group(type=command,ID="/fill ~1 ~0 ~1 ~-1 ~-10 ~-1 air destroy";type=command,ID="/fill ~1 ~-11 ~1 ~-1 ~-11 ~-1 slime_block") "]
)@luck=2

/ explosion with blocks
type=entity,ID=lucky:lucky_projectile,pos=#bowPos,NBTTag=(
    Motion=#bowMotion,
    item=(id=tnt),
    trail=(frequency=0.2,drops=["type=particle,ID=smoke"]),
    impact=["group(type=difficulty,ID=hard;type=explosion,damage=4;type=entity,ID=falling_block,amount=#rand(7,18),posOffset=#circleOffset(#rand(1,4)),NBTTag=(BlockState=(Name=gravel),Fuse=50b,Motion=#randLaunchMotion))"]
)@luck=2

/ explosion with blocks repeat
type=entity,ID=lucky:lucky_projectile,pos=#bowPos,NBTTag=(
    Motion=#bowMotion,
    item=(id=tnt),
    trail=(frequency=0.2,drops=["type=particle,ID=smoke"]),
    impact=["group(
	type=difficulty,ID=hard;type=explosion,damage=2;type=entity,ID=falling_block,amount=#rand(5,15),posOffset=#circleOffset(#rand(1,4)),NBTTag=(BlockState=(Name=gravel),Fuse=50b,Motion=#randLaunchMotion);
	type=difficulty,ID=hard;type=explosion,damage=3,delay=1;type=entity,ID=falling_block,amount=#rand(7,20),posOffset=#circleOffset(#rand(1,5)),NBTTag=(BlockState=(Name=gravel),Fuse=50b,Motion=#randLaunchMotion);	
	type=difficulty,ID=hard;type=explosion,damage=4,delay=2;type=entity,ID=falling_block,amount=#rand(9,25),posOffset=#circleOffset(#rand(1,6)),NBTTag=(BlockState=(Name=gravel),Fuse=50b,Motion=#randLaunchMotion);	
	type=difficulty,ID=hard;type=explosion,damage=5,delay=3;type=entity,ID=falling_block,amount=#rand(12,30),posOffset=#circleOffset(#rand(1,7)),NBTTag=(BlockState=(Name=gravel),Fuse=50b,Motion=#randLaunchMotion);	
    type=difficulty,ID=hard;type=explosion,damage=7,delay=5;type=entity,ID=falling_block,amount=#rand(15,40),posOffset=#circleOffset(#rand(1,9)),NBTTag=(BlockState=(Name=gravel),Fuse=50b,Motion=#randLaunchMotion)	
	)"]
)@luck=2@chance=0.4

/ explosion chemical
type=entity,ID=lucky:lucky_projectile,pos=#bowPos,NBTTag=(
    Motion=#bowMotion,
    item=(id=tnt),
    trail=(frequency=0.2,drops=["type=particle,ID=smoke"]),
    impact=["group(
	(type=message,ID="$8Chemical Explosion incoming!";type=block,ID=air,amount=#rand(32,128),posY=#bPosY+#rand(-40,-40),posOffset=#circleOffset(#rand(2,40));
	type=block,ID=air,amount=#rand(15,40),posY=#bPosY+#rand(-10,10),posOffset=#circleOffset(#rand(1,7)),delay=2;
	type=block,ID=air,amount=#rand(15,50),posY=#bPosY+#rand(-10,10),posOffset=#circleOffset(#rand(1,7)),delay=3;
	type=block,ID=air,amount=#rand(15,60),posY=#bPosY+#rand(-11,11),posOffset=#circleOffset(#rand(1,7)),delay=4;
	type=block,ID=air,amount=#rand(15,70),posY=#bPosY+#rand(-12,12),posOffset=#circleOffset(#rand(1,7)),delay=5;
	type=block,ID=air,amount=#rand(15,80),posY=#bPosY+#rand(-13,13),posOffset=#circleOffset(#rand(1,7)),delay=6;
	type=block,ID=air,amount=#rand(25,100),posY=#bPosY+#rand(-15,15),posOffset=#circleOffset(#rand(1,9)),delay=7)"]
)@luck=2

/ flying monsters
type=entity,ID=lucky:lucky_projectile,pos=#bowPos,NBTTag=(
    Motion=#bowMotion(1.0,2.0),
    item=(id=#randList(stray_spawn_egg,phantomk_spawn_egg,enderman_spawn_egg)),
    impact=["group(
        type=difficulty,ID=hard;
        type=entity,ID=#randList(stray,bat,phantom,blaze,stray,bat,phantom,ghast),posOffset=#circleOffset(0,2)
    )"]
),amount=#rand(7,13)@luck=2@chance=0.75


/ arrow cluster
type=entity,ID=arrow,pos=#bowPos,NBTTag=(Motion=#bowMotion(1.0,5.0),Color=-1),amount=20@luck=2

/ arrow stream
type=entity,ID=arrow,pos=#bowPos,NBTTag=(Motion=#bowMotion,Color=-1),amount=30,delay=#rand(0.0,3.0)@luck=2


/ pickaxe hole
type=entity,ID=lucky:lucky_projectile,pos=#bowPos,NBTTag=(
    Motion=#bowMotion,
    item=(id=iron_pickaxe),
    trail=(frequency=0.5,drops=["type=particle,ID=block.dirt"]),
    impact=["group(
        type=structure,ID=drill_hole,posY=#bPosY-1;
        type=particle,ID=block.dirt,posY=#bExactPosY-7,size=(2.0,3.0,2.0),particleAmount=2000;
		type=entity,ID=falling_block,amount=#rand(10,40),posOffset=#circleOffset(#rand(1,4)),NBTTag=(BlockState=(Name=#randList(dirt,gravel,cobblestone,gravel)),Fuse=50b,Motion=#randLaunchMotion);
        type=sound,ID=block.gravel.break,volume=2.0
    )"]
)@luck=2

type=entity,ID=arrow,pos=#bowPos,NBTTag=(Motion=#bowMotion,Color=-1)@chance=10