Skip to content

Commit

Permalink
add soul_N variant apply to boss_fight logic
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
TheAfroOfDoom committed Feb 3, 2024
1 parent 77c584d commit 71de1bd
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$function entity:hostile/omega-flowey/animate/pipe/soul_$(soul_index)
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
function animated_java:pipe_lower_eye/animations/float_and_pulsate/play
function animated_java:pipe_lower_eye/apply_variant/default
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
function animated_java:pipe_upper_eye/animations/float_and_pulsate/play
function animated_java:pipe_upper_eye/apply_variant/default
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 71de1bd

Please sign in to comment.