#GET
scoreboard players operation %PARTICLE_COUNT0 svm_ep.numbers = @s svm_ep.p.gravity_field_strength
scoreboard players operation %PARTICLE_COUNT1 svm_ep.numbers = @s svm_ep.p.gravity_field_strength
scoreboard players operation %PARTICLE_COUNT2 svm_ep.numbers = @s svm_ep.p.gravity_field_strength
scoreboard players operation %PARTICLE_RANGE0 svm_ep.numbers = @s svm_ep.p.gravity_field_strength
scoreboard players operation %PARTICLE_RANGE1 svm_ep.numbers = @s svm_ep.p.gravity_field_strength
scoreboard players operation %PARTICLE_RANGE2 svm_ep.numbers = @s svm_ep.p.gravity_field_strength
scoreboard players operation %PARTICLE_RANGE3 svm_ep.numbers = @s svm_ep.p.gravity_field_strength
scoreboard players operation %PARTICLE_RANGE4 svm_ep.numbers = @s svm_ep.p.gravity_field_strength
scoreboard players operation %EFFECT_RANGE svm_ep.numbers = @s svm_ep.p.gravity_field_strength

#CHANGE
scoreboard players operation %PARTICLE_COUNT0 svm_ep.numbers /= %5 svm_ep.numbers
scoreboard players operation %PARTICLE_COUNT1 svm_ep.numbers /= %15 svm_ep.numbers
scoreboard players operation %PARTICLE_COUNT2 svm_ep.numbers /= %20 svm_ep.numbers
scoreboard players operation %PARTICLE_RANGE0 svm_ep.numbers /= %20 svm_ep.numbers
scoreboard players operation %PARTICLE_RANGE1 svm_ep.numbers /= %20 svm_ep.numbers
scoreboard players operation %PARTICLE_RANGE2 svm_ep.numbers /= %17 svm_ep.numbers
scoreboard players operation %PARTICLE_RANGE3 svm_ep.numbers /= %12 svm_ep.numbers
scoreboard players operation %PARTICLE_RANGE4 svm_ep.numbers /= %100 svm_ep.numbers
scoreboard players operation %EFFECT_RANGE svm_ep.numbers *= %2 svm_ep.numbers
scoreboard players operation %EFFECT_RANGE svm_ep.numbers /= %7 svm_ep.numbers
scoreboard players operation %EFFECT_RANGE svm_ep.numbers += %1 svm_ep.numbers

#APPLY
execute store result storage svm_ep:numbers input.c0 int 1 run scoreboard players get %PARTICLE_COUNT0 svm_ep.numbers
execute store result storage svm_ep:numbers input.c1 int 1 run scoreboard players get %PARTICLE_COUNT1 svm_ep.numbers
execute store result storage svm_ep:numbers input.c2 int 1 run scoreboard players get %PARTICLE_COUNT2 svm_ep.numbers
execute store result storage svm_ep:numbers input.r0 int 1 run scoreboard players get %PARTICLE_RANGE0 svm_ep.numbers
execute store result storage svm_ep:numbers input.r1 int 1 run scoreboard players get %PARTICLE_RANGE1 svm_ep.numbers
execute store result storage svm_ep:numbers input.r2 int 1 run scoreboard players get %PARTICLE_RANGE2 svm_ep.numbers
execute store result storage svm_ep:numbers input.r3 int 1 run scoreboard players get %PARTICLE_RANGE3 svm_ep.numbers
execute store result storage svm_ep:numbers input.r4 int 1 run scoreboard players get %PARTICLE_RANGE4 svm_ep.numbers
execute store result storage svm_ep:numbers input.r int 1 run scoreboard players get %EFFECT_RANGE svm_ep.numbers

scoreboard players reset @s svm_ep.mana_drain
execute unless entity @s[scores={svm_ep.p.gravity_field_color=1..}] run function svm_ep:power/gravity/field/size/reverted/green with storage svm_ep:numbers input
execute as @s[scores={svm_ep.p.gravity_field_color=1}] run function svm_ep:power/gravity/field/size/reverted/red with storage svm_ep:numbers input
execute as @s[scores={svm_ep.p.gravity_field_color=2}] run function svm_ep:power/gravity/field/size/reverted/blue with storage svm_ep:numbers input
scoreboard players reset @s svm_ep.p.gravity_field_color
