# Counter effect
scoreboard players remove @s fire_effect 1
scoreboard players set @s[scores={fire_effect_2=0}] fire_effect_2 20
scoreboard players remove @s fire_effect_2 1

# Particles
execute unless predicate effects:is_baby run particle flame ~ ~.6 ~ .2 .7 .2 .01 1 force
execute unless predicate effects:is_baby run particle smoke ~ ~.6 ~ .2 .7 .2 .01 1 force
execute if predicate effects:is_baby run particle flame ~ ~.2 ~ .1 .2 .1 .01 1 force
execute if predicate effects:is_baby run particle smoke ~ ~.2 ~ .1 .2 .1 .01 1 force

# Effect
execute unless predicate effects:fire_resistance if score @s fire_effect_2 matches 0 run function effects:fire/damage

# Clear
execute if predicate effects:in_water run function effects:fire/clear
execute unless predicate effects:in_water if score @s fire_effect matches 0 run function effects:fire/clear
