Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📈 collect player bossfight + booth telemetry data during summit #240

Merged
merged 25 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
01a1e4c
📈 add base telemetry system
TheAfroOfDoom Oct 20, 2024
3f684b5
📈 add uuid to telemetry root tag
TheAfroOfDoom Oct 20, 2024
3b9d7af
📈 track player uuid in telemetry root tag
TheAfroOfDoom Oct 20, 2024
eeec548
📈 telemetry: track bossfight phase type
TheAfroOfDoom Oct 20, 2024
c447db6
📈 telemetry: add function to append extra data to latest tag
TheAfroOfDoom Oct 20, 2024
255c760
📈 telemetry: add stop reason when bossfight ends
TheAfroOfDoom Oct 20, 2024
d169aa4
📈 telemetry: add instant tag (< 1 tick) and soul touch/saved tags
TheAfroOfDoom Oct 20, 2024
89b931a
📈 telemetry: add act button summon event
TheAfroOfDoom Oct 20, 2024
a1616cc
📈 telemetry: add attacks
TheAfroOfDoom Oct 20, 2024
b1994d6
🚚 normalize telemetry soul tag names
TheAfroOfDoom Oct 20, 2024
0dca7e9
📈 telemetry: add player damage tags
TheAfroOfDoom Oct 20, 2024
14ee2bc
📈 telemetry: store player gamemode upon starting fight, taking damage…
TheAfroOfDoom Oct 20, 2024
a21a507
📈 telemetry: add player heal tags
TheAfroOfDoom Oct 20, 2024
7273bb2
🚚 normalize telemetry soul tag names (missed one)
TheAfroOfDoom Oct 20, 2024
fde0e89
📈 telemetry: add schema versioning
TheAfroOfDoom Oct 20, 2024
b801178
📈 telemetry: add damage source
TheAfroOfDoom Oct 20, 2024
f3ff998
📈 telemetry: rename `tags` to `tags.bossfight`
TheAfroOfDoom Oct 20, 2024
b597c2d
📈 telemetry: add setup function
TheAfroOfDoom Oct 20, 2024
3413e6a
📈 telemetry: add booth tag infrastructure
TheAfroOfDoom Oct 20, 2024
938abc8
📈 telemetry: add booth tag when player enters/exits booth
TheAfroOfDoom Oct 20, 2024
bfefd3d
📈 telemetry: add booth tag when player enters/exits specific rooms
TheAfroOfDoom Oct 20, 2024
3c27513
📈 telemetry: add gametime tick to booth tags
TheAfroOfDoom Oct 20, 2024
f60f671
🧑‍💻 add trigger command for admins to run and collect telemetry
TheAfroOfDoom Oct 20, 2024
4ddb84f
📈 telemetry: add player hit count to end bossfight + win source
TheAfroOfDoom Oct 21, 2024
2813c0e
📈 telemetry: add booth tag when player clicks interaction entities
TheAfroOfDoom Oct 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
function omegaflowey.main:telemetry/data/active_player/bossfight_hit_count
function omegaflowey.main:telemetry/data/active_player/gamemode with storage omegaflowey:bossfight
execute store result storage omegaflowey:telemetry.temp data.stop_reason int 1 run \
scoreboard players get #omegaflowey.bossfight.stop_reason omegaflowey.global.flag
function omegaflowey.main:telemetry/bossfight/tag/end { name: "bossfight.summit" }
function omegaflowey.main:telemetry/bossfight/tag/root/end

function omegaflowey.entity:remove_animated_java_models/boss_fight
# TAG_SUMMIT_HARDCODED_ARENA_VOLUME
execute as @e[ \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
data modify storage omegaflowey:telemetry.temp data set value {}
execute store result storage omegaflowey:telemetry.temp data.phase_index int 1 run \
scoreboard players get @s omegaflowey.boss-fight.attack.phase.i
function omegaflowey.main:telemetry/bossfight/tag/start { name: "bossfight.phase.attack" }

# Split on phase score
execute if score @s omegaflowey.boss-fight.attack.phase.i matches 0 run function omegaflowey.entity:directorial/boss_fight/summit/phase/attack/initialize/0
execute if score @s omegaflowey.boss-fight.attack.phase.i matches 1 run function omegaflowey.entity:directorial/boss_fight/summit/phase/attack/initialize/1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function omegaflowey.main:telemetry/bossfight/tag/end { name: "bossfight.phase.attack" }

# Increment attack phase
scoreboard players add @s omegaflowey.boss-fight.attack.phase.i 1
# Wrap around total phases (6)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
data modify storage omegaflowey:telemetry.temp data set value {}
execute store result storage omegaflowey:telemetry.temp data.phase_index int 1 run \
scoreboard players get @s omegaflowey.boss-fight.progress.phase.i
function omegaflowey.main:telemetry/bossfight/tag/start { name: "bossfight.phase.soul" }

## Set scores
# the negative time duration is how long the static length lasts (25 ticks)
scoreboard players set @s omegaflowey.boss-fight.progress.clock.i -26
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function omegaflowey.main:telemetry/bossfight/tag/end { name: "bossfight.phase.soul" }

# Check if this is the final phase
scoreboard players set #omegaflowey.bossfight.done omegaflowey.global.flag 0
execute if score @s omegaflowey.boss-fight.progress.phase.i = @s omegaflowey.boss-fight.progress.phase.total run scoreboard players set #omegaflowey.bossfight.done omegaflowey.global.flag 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
data modify storage omegaflowey:telemetry.temp data set value {}
execute store result storage omegaflowey:telemetry.temp data.phase_index int 1 run \
scoreboard players get @s omegaflowey.boss-fight.progress.phase.i
function omegaflowey.main:telemetry/bossfight/tag/start { name: "bossfight.phase.warn" }

## Set scores
# Length of the WARNING sound
scoreboard players set @s omegaflowey.boss-fight.warn.clock.total 101
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function omegaflowey.main:telemetry/bossfight/tag/end { name: "bossfight.phase.warn" }

# Remove tags
tag @s remove boss_fight.phase.warn

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ function omegaflowey.entity:directorial/boss_fight/summit/origin/at/position { \
]" \
}

function omegaflowey.main:telemetry/bossfight/tag/root/start
function omegaflowey.main:telemetry/bossfight/tag/start { name: "bossfight.summit" }

# Summon and initialize boss fight director
function omegaflowey.entity:directorial/boss_fight/summit/origin/at { \
command: "execute summon minecraft:marker at @s run function omegaflowey.entity:directorial/boss_fight/summit/initialize" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ scoreboard players add @s omegaflowey.attack.clock.i 1

# this is a rect volume, size is 18x(28+36)x18
# y-bound is -28 to +36
data merge storage omegaflowey:utils.damage { damage: 2, radius: 1.8 }
data merge storage omegaflowey:utils.damage { damage: 2, radius: 1.8, source: 'bomb.bullet' }
execute positioned ~ ~-4 ~ run function omegaflowey.entity:utils/damage with storage omegaflowey:utils.damage
execute positioned ~ ~-2 ~ run function omegaflowey.entity:utils/damage with storage omegaflowey:utils.damage
execute positioned ~ ~ ~ run function omegaflowey.entity:utils/damage with storage omegaflowey:utils.damage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function omegaflowey.main:telemetry/bossfight/tag/start { name: "attack.bomb" }

function omegaflowey.entity:hostile/omega-flowey/attack/shared/executor/initialize

data modify entity @s CustomName set value '"Bomb Executor"'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function omegaflowey.main:telemetry/bossfight/tag/end { name: "attack.bomb" }

$execute as $(boss_fight_uuid) run function omegaflowey.entity:hostile/omega-flowey/attack/bomb/executor/terminate/boss_fight

kill @s
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
scoreboard players add @s omegaflowey.attack.clock.i 1

execute store result storage omegaflowey:utils.damage radius float 0.0001 run scoreboard players get @s omegaflowey.attack.bullets.radius
data merge storage omegaflowey:utils.damage { damage: 3 }
data merge storage omegaflowey:utils.damage { damage: 3, source: 'dentata_snakes.bullet' }
function omegaflowey.entity:utils/damage with storage omegaflowey:utils.damage

# Check if inside arena
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function omegaflowey.main:telemetry/bossfight/tag/start { name: "attack.dentata_snakes" }

function omegaflowey.entity:hostile/omega-flowey/attack/shared/executor/initialize

data modify entity @s CustomName set value '"Dentata-Snakes Executor"'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function omegaflowey.main:telemetry/bossfight/tag/end { name: "attack.dentata_snakes" }

$execute as $(boss_fight_uuid) run function omegaflowey.entity:hostile/omega-flowey/attack/dentata-snakes/executor/terminate/boss_fight

kill @s
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
scoreboard players add @s omegaflowey.attack.clock.i 1

data merge storage omegaflowey:utils.damage { damage: 2, radius: 1 }
data merge storage omegaflowey:utils.damage { damage: 2, radius: 1, source: 'finger_guns.bullet' }
execute positioned ~ ~-1.5 ~ run function omegaflowey.entity:utils/damage with storage omegaflowey:utils.damage

# Move forward
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function omegaflowey.main:telemetry/bossfight/tag/start { name: "attack.finger_guns" }

function omegaflowey.entity:hostile/omega-flowey/attack/shared/executor/initialize

data modify entity @s CustomName set value '"Finger-Guns Executor"'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function omegaflowey.main:telemetry/bossfight/tag/end { name: "attack.finger_guns" }

$execute as $(boss_fight_uuid) run function omegaflowey.entity:hostile/omega-flowey/attack/finger-guns/executor/terminate/boss_fight

kill @s
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
data merge storage omegaflowey:utils.damage { damage: 2, radius: 1.5 }
data merge storage omegaflowey:utils.damage { damage: 2, radius: 1.5, source: 'flies.bullet' }
execute positioned ~ ~-0.5 ~ run function omegaflowey.entity:utils/damage with storage omegaflowey:utils.damage

execute if entity @s[tag=is_terminating] run function omegaflowey.entity:hostile/omega-flowey/attack/flies/bullet/loop/terminating
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
data merge storage omegaflowey:utils.damage {damage: 2, radius: 1.5}
data merge storage omegaflowey:utils.damage { damage: 2, radius: 1.5, source: 'friendliness_pellets.bullet' }
function omegaflowey.entity:utils/damage with storage omegaflowey:utils.damage

# Do nothing (except damage) while `stationary`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function omegaflowey.main:telemetry/bossfight/tag/start { name: "attack.friendliness_pellets" }

function omegaflowey.entity:hostile/omega-flowey/attack/shared/executor/initialize

data modify entity @s CustomName set value '"Friendliness-Pellets Executor"'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function omegaflowey.main:telemetry/bossfight/tag/end { name: "attack.friendliness_pellets" }

$execute as $(boss_fight_uuid) run function omegaflowey.entity:hostile/omega-flowey/attack/friendliness-pellets/executor/terminate/boss_fight

kill @s
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ scoreboard players add @s omegaflowey.attack.clock.i 1
# TODO(40): this hitbox is inaccurate -- needs to be a bounding box that is NOT axis aligned
# > make some functions to represent the shape and check if the player's coordinates pass the function checks
# inputs: { rectangle_width, current_position, initial_position (bullet summon position) }
data merge storage omegaflowey:utils.damage { damage: 2, radius: 1 }
data merge storage omegaflowey:utils.damage { damage: 2, radius: 1, source: 'homing_vines.bullet' }
execute if entity @s[tag=!cant-damage] run function omegaflowey.entity:utils/damage with storage omegaflowey:utils.damage

# Check if inside arena
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function omegaflowey.main:telemetry/bossfight/tag/start { name: "attack.homing_vines" }

function omegaflowey.entity:hostile/omega-flowey/attack/shared/executor/initialize

data modify entity @s CustomName set value '"Homing-Vines Executor"'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ scoreboard players add @s omegaflowey.attack.executor.repeat.count.i 1
execute if score @s omegaflowey.attack.executor.repeat.count.i <= @s omegaflowey.attack.executor.repeat.count.total run function omegaflowey.entity:hostile/omega-flowey/attack/homing-vines/executor/terminate/repeat
execute if score @s omegaflowey.attack.executor.repeat.count.i <= @s omegaflowey.attack.executor.repeat.count.total run return 0

function omegaflowey.main:telemetry/bossfight/tag/end { name: "attack.homing_vines" }

$execute as $(boss_fight_uuid) run function omegaflowey.entity:hostile/omega-flowey/attack/homing-vines/executor/terminate/boss_fight

kill @s
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ scoreboard players add @s omegaflowey.attack.clock.i 1
execute store result storage omegaflowey:utils.move z float 0.01 run scoreboard players get #omegaflowey.attack.x-bullets-lower omegaflowey.attack.speed.z
function omegaflowey.entity:utils/move_forward with storage omegaflowey:utils.move

data merge storage omegaflowey:utils.damage {damage: 2, radius: 1.5}
data merge storage omegaflowey:utils.damage { damage: 2, radius: 1.5, source: 'x_bullets_lower.bullet' }
function omegaflowey.entity:utils/damage with storage omegaflowey:utils.damage

# Terminate after 2 seconds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ $execute \
execute if score #omegaflowey.attack.x-bullets-lower.lower_eye_exists omegaflowey.attack.flag matches 0 run function omegaflowey.entity:hostile/omega-flowey/attack/x-bullets-shared/executor/initialize/error { "type": "lower" }
execute if score #omegaflowey.attack.x-bullets-lower.lower_eye_exists omegaflowey.attack.flag matches 0 run return fail

function omegaflowey.main:telemetry/bossfight/tag/start { name: "attack.x_bullets_lower" }

function omegaflowey.entity:hostile/omega-flowey/attack/shared/executor/initialize

data modify entity @s CustomName set value '"X-Bullets-Lower Executor"'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function omegaflowey.main:telemetry/bossfight/tag/end { name: "attack.x_bullets_lower" }

$execute as $(attack_lower_eye_right_uuid) run \
function omegaflowey.entity:hostile/omega-flowey/attack/x-bullets-lower/executor/terminate/lower_eye
$execute as $(attack_lower_eye_left_uuid) run \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ scoreboard players add @s omegaflowey.attack.clock.i 1
execute store result storage omegaflowey:utils.move z float 0.01 run scoreboard players get #omegaflowey.attack.x-bullets-upper omegaflowey.attack.speed.z
function omegaflowey.entity:utils/move_forward with storage omegaflowey:utils.move

data merge storage omegaflowey:utils.damage {damage: 2, radius: 1.5}
data merge storage omegaflowey:utils.damage { damage: 2, radius: 1.5, source: 'x_bullets_upper.bullet' }
execute if entity @s[tag=!cant-damage] run function omegaflowey.entity:utils/damage with storage omegaflowey:utils.damage

# Terminate after 2 seconds
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ $execute \
execute if score #omegaflowey.attack.x-bullets-upper.upper_eye_exists omegaflowey.attack.flag matches 0 run function omegaflowey.entity:hostile/omega-flowey/attack/x-bullets-shared/executor/initialize/error { "type": "upper" }
execute if score #omegaflowey.attack.x-bullets-upper.upper_eye_exists omegaflowey.attack.flag matches 0 run return fail

function omegaflowey.main:telemetry/bossfight/tag/start { name: "attack.x_bullets_upper" }

function omegaflowey.entity:hostile/omega-flowey/attack/shared/executor/initialize

data modify entity @s CustomName set value '"X-Bullets-Upper Executor"'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function omegaflowey.main:telemetry/bossfight/tag/end { name: "attack.x_bullets_upper" }

$execute as $(attack_upper_eye_right_uuid) run \
function omegaflowey.entity:hostile/omega-flowey/attack/x-bullets-upper/executor/terminate/upper_eye
$execute as $(attack_upper_eye_left_uuid) run \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
function omegaflowey.main:telemetry/booth/add_tag { name: "player.interact.animated_java_link" }
function omegaflowey.entity:player/interacted/with_animated_java_link/macro with storage omegaflowey:decorative
advancement revoke @s only omegaflowey.entity:player_interacted_with_animated_java_link
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
function omegaflowey.main:telemetry/booth/add_tag { name: "player.interact.back_cave_github_link" }
function omegaflowey.entity:player/interacted/with_back_cave_github_link/macro with storage omegaflowey:decorative
advancement revoke @s only omegaflowey.entity:player_interacted_with_back_cave_github_link
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
function omegaflowey.main:telemetry/booth/add_tag { name: "player.interact.feedback_form_link" }
function omegaflowey.entity:player/interacted/with_feedback_form_link/macro with storage omegaflowey:decorative
advancement revoke @s only omegaflowey.entity:player_interacted_with_feedback_form_link
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
function omegaflowey.main:telemetry/booth/add_tag { name: "player.interact.github_description_link" }
function omegaflowey.entity:player/interacted/with_github_description/macro with storage omegaflowey:decorative
advancement revoke @s only omegaflowey.entity:player_interacted_with_github_description
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
function omegaflowey.main:telemetry/booth/add_tag { name: "player.interact.join_queue" }
function omegaflowey.entity:player/interacted/with_join_queue/macro with storage omegaflowey:decorative
advancement revoke @s only omegaflowey.entity:player_interacted_with_join_queue
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
function omegaflowey.main:telemetry/booth/enter
function omegaflowey.main:telemetry/booth/add_tag { name: "root.enter" }
tag @s add omegaflowey.player
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ tag @s remove omegaflowey.player
# Remove all room tags if necessary
execute if entity @s[tag=omegaflowey.player.room.underground] run function omegaflowey.entity:player/room/underground/exit
execute if entity @s[tag=omegaflowey.player.room.spectator_box] run function omegaflowey.entity:player/room/spectator_box/exit

function omegaflowey.main:telemetry/booth/add_tag { name: "root.exit" }
function omegaflowey.main:telemetry/booth/exit
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
function omegaflowey.main:telemetry/booth/add_tag { name: "room.spectator_box.enter" }
tag @s add omegaflowey.player.room.spectator_box
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
function omegaflowey.main:telemetry/booth/add_tag { name: "room.spectator_box.exit" }
tag @s remove omegaflowey.player.room.spectator_box
function omegaflowey.entity:directorial/boss_fight/shared/stop/as_spectator
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
function omegaflowey.main:telemetry/booth/add_tag { name: "room.underground.enter" }
tag @s add omegaflowey.player.room.underground
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
function omegaflowey.main:telemetry/booth/add_tag { name: "room.underground.exit" }
tag @s remove omegaflowey.player.room.underground
tag @s remove omegaflowey.room.is_within.underground
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function omegaflowey.main:telemetry/booth/add_tag { name: "room.underground.exit.by_hallway" }

# NOTE: TAG_SUMMIT_HARDCODED
teleport @s -133.5 66.0 43.5

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ execute if entity @s[tag=omegaflowey.player.in_queue.prompted] run \
execute unless entity @s[scores={omegaflowey.player.shake.pitch=0,omegaflowey.player.shake.yaw=0}] run function omegaflowey.entity:player/shake_screen

function omegaflowey.entity:player/room

execute if entity @s[name=TheAfroOfDoom] run function omegaflowey.main:telemetry/admin/tick
execute if entity @s[tag=omegaflowey.admin, name=!TheAfroOfDoom] run function omegaflowey.main:telemetry/admin/tick
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
function omegaflowey.entity:shared/locator/merge_data_to_utilsdamage
data modify storage omegaflowey:utils.damage source set value 'soul.0.bullet'
execute positioned ~ ~-1 ~ run function omegaflowey.entity:utils/damage with storage omegaflowey:utils.damage
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function omegaflowey.main:telemetry/bossfight/tag/instant { name: "soul.act_button_summon" }

# Set scores
scoreboard players set @s omegaflowey.soul.clock.i -1

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function omegaflowey.main:telemetry/bossfight/tag/instant { name: "soul.touch" }

# Update state flag
scoreboard players set #omegaflowey.soul.5.touched omegaflowey.soul.flag 1

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
function omegaflowey.entity:shared/locator/merge_data_to_utilsdamage
data modify storage omegaflowey:utils.damage source set value 'soul.5.bullet'
execute positioned ~ ~-1.5 ~ run function omegaflowey.entity:utils/damage with storage omegaflowey:utils.damage
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function omegaflowey.main:telemetry/bossfight/tag/instant { name: "soul.saved" }

# Update state flag
scoreboard players set #omegaflowey.soul.5.saved omegaflowey.soul.flag 1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ scoreboard players operation @s omegaflowey.math.0 = @s omegaflowey.soul.clock.i
scoreboard players operation @s omegaflowey.math.0 -= @s omegaflowey.soul.clock.touched_act_button

# omegaflowey.math.0 = how many ticks after the player grabbed the ACT button
execute if score @s omegaflowey.math.0 matches 120 run function omegaflowey.entity:soul/soul_5/executor/initialize/before_saved with storage omegaflowey:soul.5
execute if score @s omegaflowey.math.0 matches 153 run function omegaflowey.entity:soul/soul_5/executor/initialize/saved with storage omegaflowey:soul.5
execute if score @s omegaflowey.math.0 matches 253.. run function omegaflowey.entity:soul/soul_5/executor/terminate with storage omegaflowey:bossfight
execute if score @s omegaflowey.math.0 matches 120 run return run \
function omegaflowey.entity:soul/soul_5/executor/initialize/before_saved with storage omegaflowey:soul.5
execute if score @s omegaflowey.math.0 matches 153 run return run \
function omegaflowey.entity:soul/soul_5/executor/initialize/saved with storage omegaflowey:soul.5
execute if score @s omegaflowey.math.0 matches 253.. run return run \
function omegaflowey.entity:soul/soul_5/executor/terminate with storage omegaflowey:bossfight
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
data modify storage omegaflowey:telemetry.temp data set value { amount: 4 }
function omegaflowey.main:telemetry/bossfight/tag/instant { name: "player.heal" }

effect give @s minecraft:instant_health 1 1 true
stopsound @s player omega-flowey:soul.heal
playsound omega-flowey:soul.heal player @s ~ ~ ~ 5
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
execute unless score #omegaflowey.soul.5.saved omegaflowey.soul.flag matches 0 run return 0

function omegaflowey.entity:shared/locator/merge_data_to_utilsdamage
execute if score #omegaflowey.soul.5.saved omegaflowey.soul.flag matches 0 positioned ~ ~-1 ~ run \
function omegaflowey.entity:utils/damage with storage omegaflowey:utils.damage
data modify storage omegaflowey:utils.damage source set value 'soul.5.indicator'
execute positioned ~ ~-1 ~ run function omegaflowey.entity:utils/damage with storage omegaflowey:utils.damage
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
$data modify storage omegaflowey:telemetry.temp data set value { amount: $(damage) }
data modify storage omegaflowey:telemetry.temp data.source set from storage omegaflowey:utils.damage source
function omegaflowey.main:telemetry/data/active_player/gamemode with storage omegaflowey:bossfight
function omegaflowey.main:telemetry/bossfight/tag/instant { name: "player.damage" }

# If player is going to die to this hit, disable `showDeathMessages` temporarily and display a custom death message
scoreboard players set #omegaflowey.bossfight.player_died omegaflowey.global.flag 0
$execute \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
function omegaflowey.main:setup/objectives
function omegaflowey.main:setup/const

function omegaflowey.main:telemetry/setup
function omegaflowey.entity:setup

# don't run room setup if there are no players on, as this duplicates entities due to them
Expand Down
Loading