Skip to content

Commit

Permalink
📈 telemetry: track bossfight phase type
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAfroOfDoom committed Oct 20, 2024
1 parent 0496250 commit 6c0825d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
function omegaflowey.main:telemetry/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/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,5 @@
function omegaflowey.main:telemetry/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/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,5 @@
function omegaflowey.main:telemetry/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/tag/end { name: "bossfight.phase.warn" }

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

Expand Down

0 comments on commit 6c0825d

Please sign in to comment.