scoreboard players add @s KyuDummy2 1

#random movement, and replace blocks. 50% chance to replace plants with blackstone_slabs
execute if predicate suhc:50percent run execute at @s run tp @s ~-1 ~ ~-1
execute if predicate suhc:50percent run execute at @s run tp @s ~1 ~ ~1
execute at @s[scores={KyuDummy=..54}] run execute if predicate suhc:25percent run execute at @s run tp @s ^ ^ ^-1
execute at @s run execute unless block ~ 3 ~ barrier run function zzzzdonotuse:nethercorruption/corruptionredux2

#repeat the above once
execute if predicate suhc:50percent run execute at @s run tp @s ~-1 ~ ~-1
execute if predicate suhc:50percent run execute at @s run tp @s ~1 ~ ~1
execute at @s[scores={KyuDummy=..54}] run execute if predicate suhc:25percent run execute at @s run tp @s ^ ^ ^-1
execute at @s run execute unless block ~ 3 ~ barrier run function zzzzdonotuse:nethercorruption/corruptionredux2



#make the marker face the center of the corruption, move the marker backwards, replace blocks again
execute at @s[scores={KyuDummy=51}] run tp @s ~ ~ ~ 180 ~
execute at @s positioned ^ ^ ^50 run tp @s ^ ^ ^-50 facing entity @e[type=marker,limit=1,sort=nearest,tag=KyuNetherCorruptionMain]
execute at @s run tp @s ^ ^ ^-.75 ~ 0
execute at @s run execute unless block ~ 3 ~ barrier run function zzzzdonotuse:nethercorruption/corruptionredux2

#bunch of random chances to fill in certain blocks around the marker
execute if predicate suhc:25percent run execute at @s positioned ~1 ~ ~ run function zzzzdonotuse:nethercorruption/corruptionredux2
execute if predicate suhc:25percent run execute at @s positioned ~ ~ ~-1 run function zzzzdonotuse:nethercorruption/corruptionredux2
execute if predicate suhc:25percent run execute at @s positioned ~ ~ ~1 run function zzzzdonotuse:nethercorruption/corruptionredux2
execute if predicate suhc:25percent run execute at @s positioned ~-1 ~ ~ run function zzzzdonotuse:nethercorruption/corruptionredux2
execute if predicate suhc:25percent run execute at @s positioned ~1 ~ ~1 run function zzzzdonotuse:nethercorruption/corruptionredux2
execute if predicate suhc:25percent run execute at @s positioned ~-1 ~ ~-1 run function zzzzdonotuse:nethercorruption/corruptionredux2
execute if predicate suhc:25percent run execute at @s positioned ~1 ~ ~-1 run function zzzzdonotuse:nethercorruption/corruptionredux2
execute if predicate suhc:25percent run execute at @s positioned ~-1 ~ ~1 run function zzzzdonotuse:nethercorruption/corruptionredux2


#recurse this function about half a dozen times the first time, run it a few more times the 2nd time it runs, then die
#kill @s[scores={KyuDummy2=13..}]
#execute as @s[scores={KyuDummy2=..3}] run function zzzzdonotuse:nethercorruption/endbits
#execute as @s[scores={KyuDummy2=5..8}] run function zzzzdonotuse:nethercorruption/endbits
#execute as @s[scores={KyuDummy2=10..13}] run function zzzzdonotuse:nethercorruption/endbits





