execute if entity @e[type=block_display,tag=magus_ice_arrow] run schedule function kiwi2:upgrades/classes/magus/spells/tier_3/ice_arrows_fx 1t
execute if entity @p[scores={magus_ice_arrows_duration=1..},tag=!ice_arrows_unstable] as @e[type=block_display,tag=magus_ice_arrow,scores={magus_ice_arrows_duration=1..}] at @s run particle snowflake ^ ^ ^ 0 0 0 0 1
execute if entity @p[scores={magus_ice_arrows_duration=1..},tag=!ice_arrows_unstable] as @e[type=block_display,tag=magus_ice_arrow,scores={magus_ice_arrows_duration=1..}] at @s run particle snowflake ^ ^ ^0.5 0 0 0 0 1
execute if entity @p[scores={magus_ice_arrows_duration=1..},tag=ice_arrows_unstable] as @e[type=block_display,tag=magus_ice_arrow,scores={magus_ice_arrows_duration=1..}] at @s run particle dripping_water ^ ^ ^0.5 0 0 0 0 1
execute if entity @p[scores={magus_ice_arrows_duration=1..},tag=!ice_arrows_unstable] as @e[type=block_display,tag=magus_ice_arrow,scores={magus_ice_arrows_duration=1..}] at @s anchored eyes facing entity @e[type=armor_stand,tag=magus_ice_arrows_marker,limit=1,sort=nearest] eyes positioned ^ ^ ^1 rotated as @s positioned ^ ^ ^ facing entity @s eyes facing ^ ^ ^-1 positioned as @s run tp @s ^ ^ ^2.5 ~ ~
execute if entity @p[scores={magus_ice_arrows_duration=1..},tag=ice_arrows_unstable] as @e[type=block_display,tag=magus_ice_arrow,scores={magus_ice_arrows_duration=1..}] at @s anchored eyes facing entity @e[type=armor_stand,tag=magus_ice_arrows_marker,limit=1,sort=nearest] eyes positioned ^ ^ ^5 rotated as @s positioned ^ ^ ^2 facing entity @s eyes facing ^ ^ ^-1 positioned as @s run tp @s ^ ^ ^1 ~ ~
execute positioned as @e[type=block_display,tag=magus_ice_arrow,scores={magus_ice_arrows_duration=1..}] as @e[type=!#items_and_non_mobs,type=!player,nbt=!{"HurtTime":10s},distance=..5] at @s run damage @s 5 freeze
execute as @e[type=block_display,tag=magus_ice_arrow,scores={magus_ice_arrows_duration=1..}] at @s unless block ~ ~ ~ #replaceable run function kiwi2:upgrades/classes/magus/spells/tier_3/ice_arrows_hit_block
execute as @e[type=block_display,tag=magus_ice_arrow,scores={magus_ice_arrows_duration=1..}] at @s run scoreboard players remove @s magus_ice_arrows_duration 1
execute as @e[type=block_display,tag=magus_ice_arrow,scores={magus_ice_arrows_duration=0}] at @s run kill @s