diff --git a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/bullet/initialize.mcfunction b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/bullet/initialize.mcfunction index da1445591..a45e15225 100644 --- a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/bullet/initialize.mcfunction +++ b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/bullet/initialize.mcfunction @@ -10,5 +10,8 @@ function entity:group/start teleport @s ~ ~ ~ facing entity @e[tag=attack-indicator,tag=flies,scores={group.id=0},limit=1] function entity:group/end +# Flatten pitch +execute at @s run teleport @s ~ ~ ~ ~ 0 + # Remove tags tag @s remove attack-bullet-new diff --git a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/bullet/loop.mcfunction b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/bullet/loop.mcfunction index 54974b059..c24bcf235 100644 --- a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/bullet/loop.mcfunction +++ b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/bullet/loop.mcfunction @@ -1,5 +1,5 @@ data merge storage utils:damage { damage: 2, radius: 1.5 } -execute positioned ~ ~ ~ run function entity:utils/damage with storage utils:damage +execute positioned ~ ~-0.5 ~ run function entity:utils/damage with storage utils:damage # Move forward function entity:hostile/omega-flowey/attack/flies/bullet/loop/move @@ -9,7 +9,7 @@ execute if entity @s[tag=is_terminating] run return 0 # Begin terminating after reaching the venus fly trap's mouth function entity:group/start -execute if entity @e[scores={group.id=0},tag=attack-indicator,tag=flies,distance=..6] run tag @s add is_terminating +execute if entity @e[scores={group.id=0},tag=attack-indicator,tag=flies,distance=..5] run tag @s add is_terminating function entity:group/end # guard against flies who move past the fly trap and outside the arena due to e.g. lag execute unless entity @s[x=-25,dx=50,y=-100,dy=200,z=-7,dz=29] run tag @s add is_terminating diff --git a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/executor/initialize/indicator/presummon/normal.mcfunction b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/executor/initialize/indicator/presummon/normal.mcfunction index 31ab5ae0c..fcbeefed2 100644 --- a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/executor/initialize/indicator/presummon/normal.mcfunction +++ b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/executor/initialize/indicator/presummon/normal.mcfunction @@ -1,8 +1,8 @@ # x: 20.00 scoreboard players set @s attack.position.x 2000 -# face west -scoreboard players set @s attack.indicator.yaw 9000 +# face opposite corner of arena +scoreboard players set @s attack.indicator.yaw 11500 # y-position will summon at y: 33.00 scoreboard players set @s attack.position.y 3300 diff --git a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/executor/initialize/indicator/summon.mcfunction b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/executor/initialize/indicator/summon.mcfunction index 52147ea4b..7b17159b7 100644 --- a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/executor/initialize/indicator/summon.mcfunction +++ b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/executor/initialize/indicator/summon.mcfunction @@ -1,5 +1,5 @@ # Summon indicator -$execute positioned $(x) $(y) $(z) rotated $(yaw) $(pitch) run summon minecraft:item_display ~ ~ ~ { CustomName: '"Flies Indicator"', Tags: ["omega-flowey-remastered","hostile","groupable","omega-flowey","attack","attack-indicator","attack-indicator-new","flies"], interpolation_duration: 1, item_display: "head", item: { id: "minecraft:lime_wool", Count: 1b } } +$execute positioned $(x) $(y) $(z) rotated $(yaw) $(pitch) run function animated_java:venus_fly_trap/summon # Initialize indicator execute as @e[tag=attack-indicator-new] at @s run function entity:hostile/omega-flowey/attack/flies/indicator/initialize diff --git a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/indicator/loop.mcfunction b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/indicator/loop.mcfunction index d6570d3f9..c17d87451 100644 --- a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/indicator/loop.mcfunction +++ b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/indicator/loop.mcfunction @@ -8,8 +8,7 @@ scoreboard players add @s attack.clock.i 1 execute if score @s attack.clock.i matches ..-1 run return 0 # Play buzzing sound when we begin summoning bullets -execute if score @s attack.clock.i matches 0 run stopsound @a hostile omega-flowey:attack.flies.buzzing -execute if score @s attack.clock.i matches 0 run playsound omega-flowey:attack.flies.buzzing hostile @a ~ ~ ~ 5 1 1 +execute if score @s attack.clock.i matches 0 run function entity:hostile/omega-flowey/attack/flies/indicator/loop/start_animating # Summon a bullet every `attack.indicator.rate` ticks scoreboard players operation @s math.0 = @s attack.clock.i diff --git a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/indicator/loop/bullet/presummon.mcfunction b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/indicator/loop/bullet/presummon.mcfunction index 35db78c5a..a2146bff1 100644 --- a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/indicator/loop/bullet/presummon.mcfunction +++ b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/indicator/loop/bullet/presummon.mcfunction @@ -6,8 +6,8 @@ execute if score @s math.0 matches 47..95 run function entity:hostile/omega-flow # otherwise (4% chance) the bullet spawns along the bottom wall execute if score @s math.0 matches 96..99 run function entity:hostile/omega-flowey/attack/flies/indicator/loop/bullet/presummon/along_bottom -# y: 33.00 -scoreboard players set @s attack.position.y 3400 +# y: 34.50 +scoreboard players set @s attack.position.y 3450 execute store result storage attack:flies x double 0.01 run scoreboard players get @s attack.position.x execute store result storage attack:flies y double 0.01 run scoreboard players get @s attack.position.y diff --git a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/indicator/loop/flies_are_done.mcfunction b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/indicator/loop/flies_are_done.mcfunction index 4c01bde4a..70d725cd4 100644 --- a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/indicator/loop/flies_are_done.mcfunction +++ b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/indicator/loop/flies_are_done.mcfunction @@ -1,8 +1,10 @@ # After flies are done, continue incrementing attack.clock.i scoreboard players add @s attack.clock.i 1 -# Begin animation -# execute if score @s attack.clock.i matches 0 run +# Stop chomping animation +execute if score @s attack.clock.i matches 0 run function animated_java:venus_fly_trap/animations/chomp/pause + +# TODO: Begin desummon animation # Stop buzzing sound (if this is the only indicator active) execute if score @s attack.clock.i matches 0 run function entity:hostile/omega-flowey/attack/flies/indicator/loop/maybe_stop_buzzing diff --git a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/indicator/loop/start_animating.mcfunction b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/indicator/loop/start_animating.mcfunction new file mode 100644 index 000000000..43d9ce520 --- /dev/null +++ b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/indicator/loop/start_animating.mcfunction @@ -0,0 +1,6 @@ +# Start animation +function animated_java:venus_fly_trap/animations/chomp/play + +# Play sound (and stop old ones) +stopsound @a hostile omega-flowey:attack.flies.buzzing +playsound omega-flowey:attack.flies.buzzing hostile @a ~ ~ ~ 5 1 1 diff --git a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/indicator/terminate.mcfunction b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/indicator/terminate.mcfunction index 26124cd9d..15d0bae8b 100644 --- a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/indicator/terminate.mcfunction +++ b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/attack/flies/indicator/terminate.mcfunction @@ -1,3 +1,3 @@ execute as @e[tag=boss_fight] run function entity:hostile/omega-flowey/attack/flies/indicator/terminate/boss_fight -kill @s +function animated_java:venus_fly_trap/remove/this