#execute if blah blah day progression condition passes do function zzzzdonotuse:daytimer/daytext

scoreboard players add #DayQ DayQDummy2 1
tag @s add IsDayKyu

#hard mode doesn't have any special criteria, always do day progression in it
#normal and easy have unique criteria, as set in their functions
execute as @s[tag=HardMode] run function zzzzdonotuse:daytimer/daytext
execute as @s[tag=NormalMode] run function zzzzdonotuse:difficulty/normalmodeprogression
execute as @s[tag=EasyMode] run function zzzzdonotuse:difficulty/easymodeprogression

execute as @s[tag=HardMode] run execute at @s run function zzzzdonotuse:daytimer/hardmoderandombuff
execute as @s[tag=HardMode] run execute at @s run function zzzzdonotuse:daytimer/hardmoderandombufftext




#resets entity tags, scoreboards, etc
function zzzzdonotuse:daytimer/daytimerresets

#misc day stuff
function zzzzdonotuse:daytimer/daytimermisc

#hard mode skeleton fireballs, must come AFTER DAILY RESETS
execute as @s[tag=BuffSkeletonFireball] run execute in overworld run data merge block 999982 128 999971 {auto:1b}


execute as @a[nbt={Inventory:[{Slot:102b,tag:{kyuabsorbmodule:1b}}]}] run function zzzzdonotuse:modifyarmor/modules/absorptioneffect
#effect give @a[nbt={Inventory:[{Slot:102b,tag:{kyuabsorbmodule:1b}}]}] absorption 1200 0
#tellraw @a[nbt={Inventory:[{Slot:102b,tag:{kyuabsorbmodule:1b}}]}] ["",{"text":"Your 'Absorption' module has activated!","color":"yellow","italic":"true"}]
tag @a[nbt={Inventory:[{Slot:103b,tag:{kyuglasswardmodule:1b}}]}] add GlassWard
tellraw @a[nbt={Inventory:[{Slot:103b,tag:{kyuglasswardmodule:1b}}]}] ["",{"text":"Your 'Glass Ward' module has refreshed!","color":"yellow","italic":"true"}]

tag @a[nbt={Inventory:[{Slot:101b,tag:{kyulavashieldmodule:1b}}]}] add KyuLavaShield
tellraw @a[nbt={Inventory:[{Slot:101b,tag:{kyulavashieldmodule:1b}}]}] ["",{"text":"Your 'Lava Shield' module has refreshed!","color":"yellow","italic":"true"}]



execute if predicate suhc:50percent run execute as @s[tag=LavDungMade] run tellraw @a[tag=K] ["",{"text":"[","color":"dark_blue"},{"text":"Cadeyrn the Wretched","color":"gold"},{"text":"] ","color":"dark_blue"},{"text":"The gods are always willing to ease your burdens...for a suitable sacrifice. I can facilitate this; come to ","color":"dark_red","italic":"true"},{"score":{"name":"@e[name=DayQ,limit=1]","objective":"CadeyrnShopX"},"color":"red","italic":"true"},{"text":"x, ","color":"red","italic":"true"},{"score":{"name":"@e[name=DayQ,limit=1]","objective":"CadeyrnShopY"},"color":"red","italic":"true"},{"text":"y, ","color":"red","italic":"true"},{"score":{"name":"@e[name=DayQ,limit=1]","objective":"CadeyrnShopZ"},"color":"red","italic":"true"},{"text":"z,","color":"red","italic":"true"},{"text":" in the Nether.","color":"dark_red","italic":"true"}]


