From 71de1bdcf05ecfe4df8352d3d5493826faef3260 Mon Sep 17 00:00:00 2001 From: TheAfroOfDoom Date: Sat, 3 Feb 2024 01:30:16 -0500 Subject: [PATCH] add `soul_N` variant apply to boss_fight logic - when boss fight plays warning phase, also change the applicable pipe model to use the soul texture variant (blinking soul color) - add `right`/`left` tags to distinguish between pipe models --- .../directorial/boss_fight/vanilla/initialize.mcfunction | 2 +- .../boss_fight/vanilla/phase/warn/initialize.mcfunction | 4 ++++ .../entity/functions/hostile/omega-flowey/animate.mcfunction | 4 ++-- .../functions/hostile/omega-flowey/animate/pipe.mcfunction | 1 + .../hostile/omega-flowey/animate/pipe/soul_0.mcfunction | 1 + .../hostile/omega-flowey/animate/pipe/soul_1.mcfunction | 1 + .../omega-flowey/animate/pipe_lower_eye/default.mcfunction | 2 ++ .../omega-flowey/animate/pipe_upper_eye/default.mcfunction | 2 ++ .../entity/functions/hostile/omega-flowey/summon.mcfunction | 4 ++++ .../data/omega-flowey/functions/setup/objectives.mcfunction | 4 ++++ 10 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe.mcfunction create mode 100644 datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe/soul_0.mcfunction create mode 100644 datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe/soul_1.mcfunction create mode 100644 datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe_lower_eye/default.mcfunction create mode 100644 datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe_upper_eye/default.mcfunction diff --git a/datapacks/omega-flowey/data/entity/functions/directorial/boss_fight/vanilla/initialize.mcfunction b/datapacks/omega-flowey/data/entity/functions/directorial/boss_fight/vanilla/initialize.mcfunction index a475b56a3..6032c5c71 100644 --- a/datapacks/omega-flowey/data/entity/functions/directorial/boss_fight/vanilla/initialize.mcfunction +++ b/datapacks/omega-flowey/data/entity/functions/directorial/boss_fight/vanilla/initialize.mcfunction @@ -14,7 +14,7 @@ scoreboard players set @s boss-fight.attack.delay -1 scoreboard players set @s boss-fight.attack.phase.i 0 scoreboard players set @s boss-fight.attack.phase.total 6 scoreboard players set @s boss-fight.progress.phase.i 0 -scoreboard players set @s boss-fight.progress.phase.total 8 +scoreboard players set @s boss-fight.progress.phase.total 6 # Add tags tag @s add boss_fight.phase.attack diff --git a/datapacks/omega-flowey/data/entity/functions/directorial/boss_fight/vanilla/phase/warn/initialize.mcfunction b/datapacks/omega-flowey/data/entity/functions/directorial/boss_fight/vanilla/phase/warn/initialize.mcfunction index e4e3fd93d..7c1ba2ea5 100644 --- a/datapacks/omega-flowey/data/entity/functions/directorial/boss_fight/vanilla/phase/warn/initialize.mcfunction +++ b/datapacks/omega-flowey/data/entity/functions/directorial/boss_fight/vanilla/phase/warn/initialize.mcfunction @@ -8,6 +8,10 @@ execute at @e[tag=aj.tv_screen.root] run playsound omega-flowey:boss-fight.alarm # Set Omega Flowey to WARNING variant function entity:hostile/omega-flowey/animate/tv-screen/warning +# Set applicable petal-pipe to soul-color variant +execute store result storage animate:pipe soul_index int 1 run scoreboard players get @s boss-fight.progress.phase.i +function entity:hostile/omega-flowey/animate/pipe with storage animate:pipe + # Set scores scoreboard players set @s boss-fight.warn.clock.i -1 diff --git a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate.mcfunction b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate.mcfunction index bbc3850ec..84cb68318 100644 --- a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate.mcfunction +++ b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate.mcfunction @@ -1,6 +1,6 @@ execute as @e[tag=aj.nose.root] run function animated_java:nose/animations/move/play execute as @e[tag=aj.lower_eye.root] run function animated_java:lower_eye/animations/look_around/play -execute as @e[tag=aj.pipe_lower_eye.root] run function animated_java:pipe_lower_eye/animations/float_and_pulsate/play -execute as @e[tag=aj.pipe_upper_eye.root] run function animated_java:pipe_upper_eye/animations/float_and_pulsate/play +execute as @e[tag=aj.pipe_lower_eye.root] run function entity:hostile/omega-flowey/animate/pipe_lower_eye/default +execute as @e[tag=aj.pipe_upper_eye.root] run function entity:hostile/omega-flowey/animate/pipe_upper_eye/default execute as @e[tag=aj.tv_screen.root] run function entity:hostile/omega-flowey/animate/tv-screen/default execute as @e[tag=aj.upper_eye.root] run function animated_java:upper_eye/animations/look_around/play diff --git a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe.mcfunction b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe.mcfunction new file mode 100644 index 000000000..88b6613eb --- /dev/null +++ b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe.mcfunction @@ -0,0 +1 @@ +$function entity:hostile/omega-flowey/animate/pipe/soul_$(soul_index) diff --git a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe/soul_0.mcfunction b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe/soul_0.mcfunction new file mode 100644 index 000000000..5e1828404 --- /dev/null +++ b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe/soul_0.mcfunction @@ -0,0 +1 @@ +execute as @e[tag=aj.pipe_lower_eye.root,tag=pipe_lower_eye.right] run function animated_java:pipe_lower_eye/apply_variant/soul_0 diff --git a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe/soul_1.mcfunction b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe/soul_1.mcfunction new file mode 100644 index 000000000..ceb87735f --- /dev/null +++ b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe/soul_1.mcfunction @@ -0,0 +1 @@ +execute as @e[tag=aj.pipe_lower_eye.root,tag=pipe_lower_eye.left] run function animated_java:pipe_lower_eye/apply_variant/soul_1 diff --git a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe_lower_eye/default.mcfunction b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe_lower_eye/default.mcfunction new file mode 100644 index 000000000..e40f49a0b --- /dev/null +++ b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe_lower_eye/default.mcfunction @@ -0,0 +1,2 @@ +function animated_java:pipe_lower_eye/animations/float_and_pulsate/play +function animated_java:pipe_lower_eye/apply_variant/default diff --git a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe_upper_eye/default.mcfunction b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe_upper_eye/default.mcfunction new file mode 100644 index 000000000..6a51b7d5b --- /dev/null +++ b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/animate/pipe_upper_eye/default.mcfunction @@ -0,0 +1,2 @@ +function animated_java:pipe_upper_eye/animations/float_and_pulsate/play +function animated_java:pipe_upper_eye/apply_variant/default diff --git a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/summon.mcfunction b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/summon.mcfunction index 17dda9005..b8b0119bb 100644 --- a/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/summon.mcfunction +++ b/datapacks/omega-flowey/data/entity/functions/hostile/omega-flowey/summon.mcfunction @@ -12,8 +12,10 @@ execute positioned 5 44 -7 rotated 10 20 run function animated_java:lower_eye/su ## Lower-eye pipes # Right-lower-eye pipe execute positioned -9 45 -11 rotated -10 20 run function animated_java:pipe_lower_eye/summon +tag @e[tag=aj.pipe_lower_eye.root] add pipe_lower_eye.right # Left-lower-eye pipe execute positioned 9 45 -11 rotated -170 -20 run function animated_java:pipe_lower_eye/summon +tag @e[tag=aj.pipe_lower_eye.root,tag=!pipe_lower_eye.right] add pipe_lower_eye.left ## TV-screen execute positioned 0 51 -6 rotated 0 45 run function animated_java:tv_screen/summon @@ -27,7 +29,9 @@ execute positioned 16.5 50 -4 rotated 20 40 run function animated_java:upper_eye ## Upper-eye pipes # Right-upper-eye pipe execute positioned -14 50 -6.5 rotated -20 40 run function animated_java:pipe_upper_eye/summon +tag @e[tag=aj.pipe_upper_eye.root] add pipe_upper_eye.right # Left-upper-eye pipe execute positioned 14 50 -6.5 rotated -160 -40 run function animated_java:pipe_upper_eye/summon +tag @e[tag=aj.pipe_upper_eye.root,tag=!pipe_upper_eye.right] add pipe_upper_eye.left execute as @e[type=minecraft:item_display] run data modify entity @s teleport_duration set value 1 diff --git a/datapacks/omega-flowey/data/omega-flowey/functions/setup/objectives.mcfunction b/datapacks/omega-flowey/data/omega-flowey/functions/setup/objectives.mcfunction index 801f10c0d..89e2f6035 100644 --- a/datapacks/omega-flowey/data/omega-flowey/functions/setup/objectives.mcfunction +++ b/datapacks/omega-flowey/data/omega-flowey/functions/setup/objectives.mcfunction @@ -67,6 +67,10 @@ scoreboard objectives add boss-fight.attack.delay dummy scoreboard objectives add boss-fight.attack.phase.i dummy # total number of attack phases before we wrap the index scoreboard objectives add boss-fight.attack.phase.total dummy +# index of the progress phase +scoreboard objectives add boss-fight.progress.phase.i dummy +# total number of progress phases in the boss fight +scoreboard objectives add boss-fight.progress.phase.total dummy scoreboard objectives add boss-fight.warn.clock.i dummy scoreboard objectives add boss-fight.warn.clock.total dummy