#shit that happends every second
schedule function inqui:close_inf 1s
#no more bucket bile/fix for tbmg 
execute as @a[nbt={Inventory:[{id:"spore:bucket_of_bile"}]}] run function inqui:sec_calls/bile_bucket
#particles
execute at @e[tag=overcharged_evolved] run particle spore:blood_particle ~ ~0.5 ~ 1 1 1 0 25 normal @a
execute at @e[type=spore:mound,nbt={age:5}] run particle spore:blood_particle ~ ~0.5 ~ 2 2 2 0 50 normal @a
#mounds dont die due to blocks
execute as @e[type=spore:mound,nbt={Health:5.0f}] at @s run fill ~-1 ~ ~-1 ~1 ~1 ~1 minecraft:air
execute as @e[type=spore:mound,nbt={Health:6.0f}] at @s run fill ~-1 ~ ~-1 ~1 ~1 ~1 minecraft:air
#no despawns infecteds
execute as @e[type=#spore:fungus_entities] run data merge entity @s {PersistenceRequired:1b}
#freezing the mounds
#bile shit
#gatgabers and scampers "RANDOMIZER"
execute as @e[type=spore:scamper] run scoreboard objectives add scamper_temp dummy "scamper randomizer"
execute as @e[type=spore:scamper,limit=1, sort=random] if score @s scamper_temp matches 2 run scoreboard players set @s scamper_temp 1
execute as @e[type=spore:scamper,limit=1, sort=random] unless score @s scamper_temp matches 0.. run scoreboard players set @s scamper_temp 2
execute as @e[type=spore:scamper] unless score @s scamper_temp matches 1 run data merge entity @s {age:0} 
#CRRRRRUSTEDDDDD
execute as @e[type= spore:mound,nbt={age:1}] at @s if block ~ ~ ~ minecraft:water if block ~ ~2 ~ minecraft:air run fill ~-10 ~1 ~-10 ~10 ~1 ~10 spore:crusted_bile replace minecraft:water
execute as @e[type= spore:mound,nbt={age:2}] at @s if block ~ ~ ~ minecraft:water if block ~ ~2 ~ minecraft:air run fill ~-15 ~1 ~-15 ~15 ~1 ~15 spore:crusted_bile replace minecraft:water
execute as @e[type= spore:mound,nbt={age:3}] at @s if block ~ ~ ~ minecraft:water if block ~ ~2 ~ minecraft:air run fill ~-20 ~1 ~-20 ~20 ~1 ~20 spore:crusted_bile replace minecraft:water
execute as @e[type= spore:mound,nbt={age:1}] at @s if block ~ ~ ~ spore:bile if block ~ ~2 ~ minecraft:air run fill ~-10 ~1 ~-10 ~10 ~1 ~10 spore:crusted_bile replace spore:bile
execute as @e[type= spore:mound,nbt={age:2}] at @s if block ~ ~ ~ spore:bile if block ~ ~2 ~ minecraft:air run fill ~-15 ~1 ~-15 ~15 ~1 ~15 spore:crusted_bile replace spore:bile
execute as @e[type= spore:mound,nbt={age:3}] at @s if block ~ ~ ~ spore:bile if block ~ ~2 ~ minecraft:air run fill ~-20 ~1 ~-20 ~20 ~1 ~20 spore:crusted_bile replace spore:bile
execute as @e[type= spore:mound] at @s if block ~ ~ ~ minecraft:water run data merge entity @s {Motion:[0.0,1.0,0.0]}
execute as @e[type= spore:mound] at @s if block ~ ~ ~ spore:bile run data merge entity @s {Motion:[0.0,1.0,0.0]}
execute as @e[type= spore:mound] at @s if block ~ ~1 ~ spore:crusted_bile run tp @s ~ ~2 ~
execute as @e[type= spore:mound] at @s if block ~ ~ ~ spore:crusted_bile run tp @s ~ ~2 ~
# overcharged calamity conditions
scoreboard objectives add overcharged_calamity dummy "overcharged calamity thing"
execute as @e[type=#inqui:calamity,nbt={kills:255}] run tag @s add overcharged_calamity
execute as @e[type=#inqui:calamity,nbt={kills:256}] run tag @s add overcharged_calamity
execute as @e[type=#inqui:calamity,nbt={kills:257}] run tag @s add overcharged_calamity
# overcharged evolveds conditions
scoreboard objectives add overcharged_evolved dummy "overcharged evolved thing"
execute as @e[type=#inqui:evolved,nbt={evo_points:8}] run tag @s add overcharged_evolved
execute as @e[type=#inqui:evolved,nbt={evo_points:9}] run tag @s add overcharged_evolved
execute as @e[type=spore:biobloob] run tag @s add overcharged_evolved
#V2
scoreboard objectives add inf_pla_boss dummy "final raid thing"
#mimicry removal
execute as @a if entity @s[nbt={SelectedItem:{tag:{Tags:["mimicry"]}}}] at @s run fill ~-12 ~-6 ~-12 ~12 ~6 ~12 minecraft:air replace #spore:removable_foliage
#v2
execute as @e[tag=inf_pla_boss,nbt={FallFlying:0b}] at @s run function inqui:sec_calls/ground
execute as @e[tag=inf_pla_boss] run attribute @s minecraft:generic.follow_range base set 500
execute as @e[tag=inf_pla_boss,nbt={FallFlying:1b}] at @s run function inqui:sec_calls/air
#Rednight
#licker
execute as @e[type=spore:licker,scores={lickcount=1..}] run scoreboard players remove @s lickcount 1
execute as @e[type=spore:licker,scores={lickcount=0}] at @s run function inqui:sec_calls/licker
#claw
execute as @e[type=spore:claw,scores={clawtimer=1..}] run scoreboard players remove @s clawtimer 1
execute as @e[type=spore:claw,scores={clawtimer=0}] at @s run function inqui:sec_calls/claw
#noflycheating
execute as @a[nbt={FallFlying:1b}] at @s if entity @s[y=300,dy=640] if dimension inqui:finalitas run function inqui:sec_calls/no_fly
#no shity music
execute as @e[type=spore:proto,tag=nunny] at @s if entity @p[distance=..600] at @a run stopsound @a music