# Layout
summon armor_stand 0 18 50 {CustomName:'[{"text":">> ARMORY <<","color":"gold","bold":"true"}]',Tags:["unspellable","tutorial_obj"]}
summon armor_stand 0 17.75 50 {CustomName:'[{"text":"(x2 each floor)","color":"gray"}]',Tags:["unspellable","tutorial_obj"]}
summon area_effect_cloud 0 12 53 {Tags:["gate","unspellable","tutorial_obj","N"],Duration:36000000}
summon area_effect_cloud 0 12 58 {Tags:["center","armory","unspellable","tutorial_obj"],Duration:36000000}
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 {CustomNameVisible:1b,CustomName:'{"bold":"true","color":"red","text":"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 {CustomNameVisible:1b,CustomName:'{"bold":"true","color":"red","text":"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 {CustomNameVisible:1b,CustomName:'{"bold":"true","color":"red","text":"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 {CustomNameVisible:1b,CustomName:'{"bold":"true","color":"red","text":"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[type=area_effect_cloud,tag=ingame_items]
summon area_effect_cloud 5 47 6 {Tags:["ingame_items","unspellable"],Duration:2147483647}
execute as @a run data modify entity @e[type=area_effect_cloud,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 3 15.5 58 {CustomName:'[{"text":"Items can be obtained in Armories. "}]',Tags:["unspellable","tutorial_obj"]}
summon armor_stand 3 15.25 58 {CustomName:'[{"text":"But you can only choose between "}]',Tags:["unspellable","tutorial_obj"]}
summon armor_stand 3 15 58 {CustomName:'[{"text":"one aggressive and one defensive."}]',Tags:["unspellable","tutorial_obj"]}

summon armor_stand 4 17.5 58 {CustomName:'[{"text":"AGGRESSIVE","color":"gold","bold":"true"}]',Tags:["unspellable","tutorial_obj"]}
summon armor_stand 4 17.25 60 {CustomName:'[{"text":"Wand","color":"gray"}]',Tags:["unspellable","tutorial_obj"]}
summon armor_stand 4 17.25 56 {CustomName:'[{"text":"Weapon","color":"gray"}]',Tags:["unspellable","tutorial_obj"]}
summon armor_stand -4 17.5 58 {CustomName:'[{"text":"OFFENSIVE","color":"gold","bold":"true"}]',Tags:["unspellable","tutorial_obj"]}
summon armor_stand -4 17.25 60 {CustomName:'[{"text":"Passive","color":"gray"}]',Tags:["unspellable","tutorial_obj"]}
summon armor_stand -4 17.25 56 {CustomName:'[{"text":"Armor","color":"gray"}]',Tags:["unspellable","tutorial_obj"]}

summon armor_stand -3 15.25 58 {CustomName:'[{"text":"Used items get registred in your journal "}]',Tags:["unspellable","tutorial_obj"]}
summon armor_stand -3 15 58 {CustomName:'[{"text":"Open it by presing L."}]',Tags:["unspellable","tutorial_obj"]}
