# Layout
summon marker 0 12 58 {Tags:["center","armory","unspellable","tutorial_obj"]}
summon marker 0 16 53 {Tags:["gate","unspellable","tutorial_obj","north"]}
execute positioned 0 12 58 run scoreboard players set @e[distance=..0.5,tag=center,limit=1] room_state 6

# Holders
summon armor_stand 4 16 60 {DisabledSlots:4144703,CustomNameVisible:1b,CustomName:'{"bold":true,"color":"red","translate":"Coming soon"}',Rotation:[90.0f,0.0f],ArmorItems:[{id:"leather_boots",Count:1b},{id:"leather_leggings",Count:1b},{id:"leather_chestplate",Count:1b},{id:"player_head",tag:{SkullOwner:"Jarofdirt"},Count:1b}],Tags:["holder","tutorial_obj","unspellable","wand","D"],Pose:{RightArm:[-20f,0f,5f]},ShowArms:1b,HandItems:[{id:"barrier",Count:1b,tag:{Armory:1b}},{}]}
summon armor_stand 4 16 56 {DisabledSlots:4144703,CustomNameVisible:1b,CustomName:'{"bold":true,"color":"red","translate":"Coming soon"}',Rotation:[90.0f,0.0f],ArmorItems:[{id:"leather_boots",Count:1b},{id:"leather_leggings",Count:1b},{id:"leather_chestplate",Count:1b},{id:"player_head",tag:{SkullOwner:"Jarofdirt"},Count:1b}],Tags:["holder","tutorial_obj","unspellable","weapon","D"],Pose:{RightArm:[-20f,0f,5f]},ShowArms:1b,HandItems:[{id:"barrier",Count:1b,tag:{Armory:1b}},{}]}
summon armor_stand -4 16 60 {DisabledSlots:4144703,CustomNameVisible:1b,CustomName:'{"bold":true,"color":"red","translate":"Coming soon"}',Rotation:[-90.0f,0.0f],ArmorItems:[{id:"leather_boots",Count:1b},{id:"leather_leggings",Count:1b},{id:"leather_chestplate",Count:1b},{id:"player_head",tag:{SkullOwner:"Jarofdirt"},Count:1b}],Tags:["holder","tutorial_obj","unspellable","D","passive"],Pose:{RightArm:[-20f,0f,5f]},ShowArms:1b,HandItems:[{id:"barrier",Count:1b,tag:{Armory:1b}},{}]}
summon armor_stand -4 16 56 {DisabledSlots:4144703,CustomNameVisible:1b,CustomName:'{"bold":true,"color":"red","translate":"Coming soon"}',Rotation:[-90.0f,0.0f],ArmorItems:[{id:"leather_boots",Count:1b},{id:"leather_leggings",Count:1b},{id:"leather_chestplate",Count:1b},{id:"player_head",tag:{SkullOwner:"Jarofdirt"},Count:1b}],Tags:["holder","tutorial_obj","unspellable","D","armor"],Pose:{RightArm:[-20f,0f,5f]},ShowArms:1b,HandItems:[{id:"barrier",Count:1b,tag:{Armory:1b}},{}]}

# Ingame Items
kill @e[tag=ingame_items]
summon marker 5 47 6 {Tags:["ingame_items","unspellable"]}
execute as @a run data modify entity @e[tag=ingame_items,limit=1] Tags append from entity @s Tags[]

# Fill holders
execute positioned 0 12 58 as @e[tag=holder,tag=wand,limit=1,sort=nearest] at @s run function items_py:holder/wand/rank
execute positioned 0 12 58 as @e[tag=holder,tag=armor,limit=1,sort=nearest] at @s run function items_py:holder/armor/rank
execute positioned 0 12 58 as @e[tag=holder,tag=passive,limit=1,sort=nearest] at @s run function items_py:holder/passive/rank
execute positioned 0 12 58 as @e[tag=holder,tag=weapon,limit=1,sort=nearest] at @s run function items_py:holder/weapon/rank

# Text
summon armor_stand 0 19 50 {CustomName:'[{"translate":"tutorial.armory","color":"gold","bold":true}]',Tags:["unspellable","tutorial_obj"]}
summon armor_stand 0 18.75 50 {CustomName:'[{"translate":"tutorial.armory1.l0","color":"gray"}]',Tags:["unspellable","tutorial_obj"]}

summon armor_stand 3 16.5 58 {CustomName:'[{"translate":"tutorial.armory2.l0"}]',Tags:["unspellable","tutorial_obj"]}
summon armor_stand 3 16.25 58 {CustomName:'[{"translate":"tutorial.armory2.l1"}]',Tags:["unspellable","tutorial_obj"]}
summon armor_stand 3 16 58 {CustomName:'[{"translate":"tutorial.armory2.l2"}]',Tags:["unspellable","tutorial_obj"]}

summon armor_stand 4 18.5 58 {CustomName:'[{"translate":"offensive","color":"gold","bold":true}]',Tags:["unspellable","tutorial_obj"]}
summon armor_stand 4 18.25 60 {CustomName:'[{"translate":"wand","color":"gray"}]',Tags:["unspellable","tutorial_obj"]}
summon armor_stand 4 18.25 56 {CustomName:'[{"translate":"weapon","color":"gray"}]',Tags:["unspellable","tutorial_obj"]}
summon armor_stand -4 18.5 58 {CustomName:'[{"translate":"defensive","color":"gold","bold":true}]',Tags:["unspellable","tutorial_obj"]}
summon armor_stand -4 18.25 60 {CustomName:'[{"translate":"passive","color":"gray"}]',Tags:["unspellable","tutorial_obj"]}
summon armor_stand -4 18.25 56 {CustomName:'[{"translate":"armor","color":"gray"}]',Tags:["unspellable","tutorial_obj"]}

summon armor_stand -3 16.5 58 {CustomName:'[{"translate":"tutorial.armory3.l0"}]',Tags:["unspellable","tutorial_obj"]}
summon armor_stand -3 16.25 58 {CustomName:'[{"translate":"tutorial.armory3.l1"}]',Tags:["unspellable","tutorial_obj"]}
summon armor_stand -3 16 58 {CustomName:'[{"translate":"tutorial.armory3.l2"}]',Tags:["unspellable","tutorial_obj"]}
