#misc events that happend every min
schedule function inqui:min_events 50s
#apostle shit
execute as @e[tag=apostle] run data merge entity @s {evolution:0}
execute as @e[tag=apostle] run data merge entity @s {kills:1}
#execute as @a at @s if dimension minecraft:the_nether run tp @s 0 100 0
execute as @e[type=!#spore:fungus_entities] at @s if entity @s[y=50,dy=640] if dimension inqui:finalitas run effect give @s spore:mycelium_ef 60 1 true
#overcharged evolutions
#spitter to bioblob
execute as @e[ type= spore:spitter , tag=overcharged_evolved] at @s run summon spore:biobloob ~ ~ ~ {scale:1.5}
execute as @e[ type= spore:spitter , tag=overcharged_evolved] run tp @s ~ ~-400 ~
#spitter to bioblob
execute as @e[ type= spore:howler , tag=overcharged_evolved] at @s run summon spore:vanguard ~ ~ ~
execute as @e[ type= spore:howler , tag=overcharged_evolved] run tp @s ~ ~-400 ~
#leaper to hypervindicator
execute as @e[ type= spore:slasher , tag=overcharged_evolved] at @s run summon spore:reaper ~ ~ ~
execute as @e[ type= spore:slasher , tag=overcharged_evolved] run tp @s ~ ~-400 ~

#Rednight
execute as @p at @s if entity @e[distance=..40,type=spore:mound,nbt={age:5},scores={rednight=1}] run tellraw @p [{"text":"To live is a process full of pain.","color":"#ff0000"}]
execute as @p at @s if entity @e[distance=..40,type=spore:mound,nbt={age:5},scores={rednight=2}] run tellraw @p [{"text":"We will understand life and the soul with our own hands.","color":"#ff0000"}]
execute as @p at @s if entity @e[distance=..40,type=spore:mound,nbt={age:5},scores={rednight=3}] run tellraw @p [{"text":"We will walk together to see a new dawn, shall you join us?","color":"#ff0000"}]
execute as @p at @s if entity @e[distance=..40,type=spore:mound,nbt={age:5},scores={rednight=4}] run tellraw @p [{"text":"Once our flesh becomes absolute and everlasting, we may finally understand","color":"#ff0000"}]
execute as @p at @s if entity @e[distance=..40,type=spore:mound,nbt={age:5},scores={rednight=5}] run tellraw @p [{"text":"To gain an understanding of what is incomprehensible, we dream, staring.","color":"#ff0000"}]
execute as @p at @s if entity @e[distance=..40,type=spore:mound,nbt={age:5},scores={rednight=6}] run tellraw @p [{"text":"What we will find in the end?","color":"#ff0000"}]
execute as @p at @s if entity @e[distance=..40,type=spore:mound,nbt={age:5}] run playsound spore:gast_ambient hostile @s ~ ~ ~ 1 0.1 1
execute as @e[type=spore:mound,nbt={age:5},scores={rednight=1..}] run scoreboard players remove @s rednight 1
execute as @e[type=spore:mound,nbt={age:5}] at @s if entity @p[distance=..40] run summon spore:arena_tendril ~ ~ ~
#Fixer
execute as @e[type=spore:inf_player, tag=inf_pla_boss] at @s if entity @e[distance=..25, type=!#spore:fungus_entities, type=!minecraft:item,type=!spore:inf_player] run summon spore:flesh_bomb ~15 ~30 ~15 {damage:15, explosion:3, bomb_type:2}
execute as @e[type=spore:inf_player, tag=inf_pla_boss] at @s if entity @e[distance=..25, type=!#spore:fungus_entities, type=!minecraft:item,type=!spore:inf_player] run summon spore:flesh_bomb ~-15 ~30 ~15 {damage:15, explosion:3, bomb_type:2}
execute as @e[type=spore:inf_player, tag=inf_pla_boss] at @s if entity @e[distance=..25, type=!#spore:fungus_entities, type=!minecraft:item,type=!spore:inf_player] run summon spore:flesh_bomb ~-15 ~30 ~-15 {damage:15, explosion:3, bomb_type:2}
execute as @e[type=spore:inf_player, tag=inf_pla_boss] at @s if entity @e[distance=..25, type=!#spore:fungus_entities, type=!minecraft:item,type=!spore:inf_player] run summon spore:flesh_bomb ~15 ~30 ~-15 {damage:15, explosion:3, bomb_type:2}
execute as @e[type=spore:inf_player, tag=inf_pla_boss] at @s run summon spore:flesh_bomb ~1 ~90 ~ {damage:30, explosion:6, bomb_type:2}
execute as @e[type=spore:mound,nbt={age:5}] run data merge entity @s {CustomName:'{"text":"RedNight","color":"red"}',CustomNameVisible:0b}
# bedrock block placing
execute as @e[type=#spore:fungus_entities, nbt=!{age:5}] at @s if block ~ ~-1 ~ minecraft:bedrock run function inqui:5sec_calls/bedrock