##Add scoreboards
#Healing queue
scoreboard objectives add cdl.Heal_Queue dummy
#Damaging queue
scoreboard objectives add cdl.Damage_Queue dummy
#Damage timer
scoreboard objectives add cdl.Damage_Timer dummy
#HPMod queue (Shorthand for Healing/Damaging queues)
scoreboard objectives add cdl.HPM_Queue dummy
#Constant/Temporary scores scoreboard
scoreboard objectives add cdl.Temp dummy
#Custom death message ID
scoreboard objectives add cdl.Death_ID dummy
#Death tracker
scoreboard objectives add cdl.Death deathCount
#True damage health score
scoreboard objectives add cdl.P_Health health

##Set constants
#-1
scoreboard players set $constant.-1 cdl.Temp -1
#4
scoreboard players set $constant.4 cdl.Temp 4
#100
scoreboard players set $constant.100 cdl.Temp 100

#Force chunk build
execute unless block 4206848 0 4206880 diamond_block run function cd:sys/build

##Set mobs
#Player damagers
execute unless entity f8d7f043-fc82-4df6-acb2-d1f9cc707516 run summon iron_golem 4206850 2 4206892 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;-120065981,-58569226,-1397566983,-865045226],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkII #1"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}
execute unless entity f8d7f042-fc82-4df6-acb2-d1f9cc707516 run summon iron_golem 4206850 2 4206890 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;-120065982,-58569226,-1397566983,-865045226],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkII #2"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}
execute unless entity f8d7f041-fc82-4df6-acb2-d1f9cc707516 run summon iron_golem 4206850 2 4206888 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;-120065983,-58569226,-1397566983,-865045226],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkII #3"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}
execute unless entity f8d7f040-fc82-4df6-acb2-d1f9cc707516 run summon iron_golem 4206850 2 4206886 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;-120065984,-58569226,-1397566983,-865045226],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkII #4"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}
execute unless entity f8d7f03f-fc82-4df6-acb2-d1f9cc707516 run summon iron_golem 4206850 2 4206884 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;-120065985,-58569226,-1397566983,-865045226],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkII #5"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}
execute unless entity f8d7f03e-fc82-4df6-acb2-d1f9cc707516 run summon iron_golem 4206852 2 4206892 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;-120065986,-58569226,-1397566983,-865045226],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkII #6"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}
execute unless entity f8d7f03d-fc82-4df6-acb2-d1f9cc707516 run summon iron_golem 4206852 2 4206890 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;-120065987,-58569226,-1397566983,-865045226],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkII #7"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}
execute unless entity f8d7f03c-fc82-4df6-acb2-d1f9cc707516 run summon iron_golem 4206852 2 4206888 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;-120065988,-58569226,-1397566983,-865045226],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkII #8"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}
execute unless entity f8d7f03b-fc82-4df6-acb2-d1f9cc707516 run summon iron_golem 4206852 2 4206886 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;-120065989,-58569226,-1397566983,-865045226],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkII #9"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}
execute unless entity f8d7f044-fc82-4df6-acb2-d1f9cc707516 run summon iron_golem 4206852 2 4206884 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;-120065980,-58569226,-1397566983,-865045226],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkII #10"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}

#Mob damagers
execute unless entity 1c8f4ecf-050d-439c-bf7f-266e40903c5c run summon iron_golem 4206855 2 4206892 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;479153871,84755356,-1082186130,1083194460],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkIII #1"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}
execute unless entity 1c8f4ed0-050d-439c-bf7f-266e40903c5c run summon iron_golem 4206855 2 4206890 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;479153872,84755356,-1082186130,1083194460],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkIII #2"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}
execute unless entity 1c8f4ed1-050d-439c-bf7f-266e40903c5c run summon iron_golem 4206855 2 4206888 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;479153873,84755356,-1082186130,1083194460],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkIII #3"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}
execute unless entity 1c8f4ed2-050d-439c-bf7f-266e40903c5c run summon iron_golem 4206855 2 4206886 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;479153874,84755356,-1082186130,1083194460],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkIII #4"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}
execute unless entity 1c8f4ed3-050d-439c-bf7f-266e40903c5c run summon iron_golem 4206855 2 4206884 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;479153875,84755356,-1082186130,1083194460],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkIII #5"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}
execute unless entity 1c8f4ed4-050d-439c-bf7f-266e40903c5c run summon iron_golem 4206857 2 4206892 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;479153876,84755356,-1082186130,1083194460],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkIII #6"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}
execute unless entity 1c8f4ed5-050d-439c-bf7f-266e40903c5c run summon iron_golem 4206857 2 4206890 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;479153877,84755356,-1082186130,1083194460],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkIII #7"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}
execute unless entity 1c8f4ed6-050d-439c-bf7f-266e40903c5c run summon iron_golem 4206857 2 4206888 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;479153878,84755356,-1082186130,1083194460],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkIII #8"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}
execute unless entity 1c8f4ed7-050d-439c-bf7f-266e40903c5c run summon iron_golem 4206857 2 4206886 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;479153879,84755356,-1082186130,1083194460],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkIII #9"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}
execute unless entity 1c8f4ece-050d-439c-bf7f-266e40903c5c run summon iron_golem 4206857 2 4206884 {PersistenceRequired:1b,NoGravity:1b,UUID:[I;479153870,84755356,-1082186130,1083194460],DeathLootTable:"minecraft:empty",NoAI:1b,Health:1000f,Tags:["cdl_golem"],CustomName:'{"text":"Susile Pincushion MkIII #10"}',ArmorItems:[{},{},{},{id:'minecraft:netherite_helmet',Count:1b,tag:{Enchantments:[{id:'minecraft:thorns',lvl:11s},{id:'minecraft:vanishing_curse',lvl:1s}]}}],ArmorDropChances:[0.085F,0.085F,0.085F,0.085F],ActiveEffects:[{Id:6b,Amplifier:99b,Duration:20000000}],Attributes:[{Name:generic.max_health,Base:1000},{Name:generic.movement_speed,Base:0},{Name:generic.attack_damage,Base:0},{Name:generic.armor,Base:0}]}