# block:custom/wizarding_table/damage_from_block
# called by: block:custom/wizarding_table/engage

execute if data block ~ ~ ~-1 Items[{Slot:0b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~ ~-1 Items[{Slot:0b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~ ~ ~-1 Items[{Slot:1b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~ ~-1 Items[{Slot:1b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~ ~ ~-1 Items[{Slot:2b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~ ~-1 Items[{Slot:2b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~ ~ ~-1 Items[{Slot:3b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~ ~-1 Items[{Slot:3b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~ ~ ~-1 Items[{Slot:4b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~ ~-1 Items[{Slot:4b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~ ~-1 ~ Items[{Slot:0b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~-1 ~ Items[{Slot:0b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~ ~-1 ~ Items[{Slot:1b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~-1 ~ Items[{Slot:1b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~ ~-1 ~ Items[{Slot:2b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~-1 ~ Items[{Slot:2b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~ ~-1 ~ Items[{Slot:3b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~-1 ~ Items[{Slot:3b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~ ~-1 ~ Items[{Slot:4b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~-1 ~ Items[{Slot:4b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~-1 ~ ~ Items[{Slot:0b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~-1 ~ ~ Items[{Slot:0b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~-1 ~ ~ Items[{Slot:1b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~-1 ~ ~ Items[{Slot:1b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~-1 ~ ~ Items[{Slot:2b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~-1 ~ ~ Items[{Slot:2b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~-1 ~ ~ Items[{Slot:3b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~-1 ~ ~ Items[{Slot:3b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~-1 ~ ~ Items[{Slot:4b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~-1 ~ ~ Items[{Slot:4b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~ ~ ~1 Items[{Slot:0b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~ ~1 Items[{Slot:0b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~ ~ ~1 Items[{Slot:1b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~ ~1 Items[{Slot:1b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~ ~ ~1 Items[{Slot:2b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~ ~1 Items[{Slot:2b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~ ~ ~1 Items[{Slot:3b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~ ~1 Items[{Slot:3b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~ ~ ~1 Items[{Slot:4b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~ ~1 Items[{Slot:4b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~ ~1 ~ Items[{Slot:0b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~1 ~ Items[{Slot:0b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~ ~1 ~ Items[{Slot:1b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~1 ~ Items[{Slot:1b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~ ~1 ~ Items[{Slot:2b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~1 ~ Items[{Slot:2b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~ ~1 ~ Items[{Slot:3b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~1 ~ Items[{Slot:3b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~ ~1 ~ Items[{Slot:4b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~ ~1 ~ Items[{Slot:4b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~1 ~ ~ Items[{Slot:0b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~1 ~ ~ Items[{Slot:0b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~1 ~ ~ Items[{Slot:1b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~1 ~ ~ Items[{Slot:1b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~1 ~ ~ Items[{Slot:2b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~1 ~ ~ Items[{Slot:2b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~1 ~ ~ Items[{Slot:3b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~1 ~ ~ Items[{Slot:3b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"
execute if data block ~1 ~ ~ Items[{Slot:4b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}] store result block ~ ~ ~ components."minecraft:custom_data".magical_addons.damage int 1 store result score @s maddons.damage run return run data get block ~1 ~ ~ Items[{Slot:4b,components:{"minecraft:custom_data":{magical_addons:{id:"sparkstone_orb"}}}}].components."minecraft:damage"