Skip to content

Commit

Permalink
replace placeholder indicator model with venus-fly-trap model
Browse files Browse the repository at this point in the history
- change direction indicators are facing -- diagonally across arena instead of west/east
- move bullets position/hitbox up for better visual into the fly trap
  • Loading branch information
TheAfroOfDoom committed Jan 29, 2024
1 parent f4d89be commit ff4a6a3
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ff4a6a3

Please sign in to comment.