Skip to content

Commit

Permalink
ticketize TODOs specific to friendliness-pellets functions
Browse files Browse the repository at this point in the history
new issues:
- #43
- #44
- #45
  • Loading branch information
TheAfroOfDoom committed Dec 22, 2023
1 parent 7cd04e0 commit 1c7d513
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
# Summon indicator
execute at @r[team=player] run summon minecraft:marker ~ 33.0 ~ {CustomName: '"Friendliness-Pellets Indicator"', Tags:["omega-flowey-remastered","groupable","hostile","omega-flowey","attack","attack-indicator","attack-indicator-new","friendliness-pellets"], Passengers: [{id:"minecraft:item_display",Tags:["omega-flowey-remastered","hostile","omega-flowey","attack","friendliness-pellets"],transformation:[-1f,0f,1.2246467991473532e-16f,0f,0f,1f,0f,-0.125f,-1.2246467991473532e-16f,0f,-1f,0f,0f,0f,0f,1f],interpolation_duration:1,item_display:"head",item:{id:"minecraft:golden_sword",Count:1b,tag:{CustomModelData:4}}}]}

# TODO: this is so unbelievably hacky
# TODO(43): this is so unbelievably hacky
# first indicator is 6 ticks slower before it starts summoning bullets
execute if score @s attack.clock.i matches 0 run scoreboard players add #attack-friendliness-pellets attack.indicator.clock.delay 6

# Initialize indicator
execute as @e[tag=attack-indicator-new] at @s run function entity:hostile/omega-flowey/attack/friendliness-pellets/indicator/initialize

# TODO: this is so unbelievably hacky
# TODO(43): this is so unbelievably hacky
execute if score @s attack.clock.i matches 0 run scoreboard players remove #attack-friendliness-pellets attack.indicator.clock.delay 6
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

scoreboard players add @s attack.clock.i 1

# TODO(45): refactor repeated `attack.clock.i` conditionals into separate functions
# Change ring variant at tick index
execute if score @s attack.clock.i = @s attack.indicator.animation.index run function entity:group/start
execute if score @s attack.clock.i = @s attack.indicator.animation.index as @e[tag=friendliness-pellet-ring,scores={group.id=0}] run function animated_java:friendliness_pellet_ring/apply_variant/finished_blinking
Expand All @@ -13,6 +14,7 @@ execute if score @s attack.clock.i matches ..-1 run playsound omega-flowey:attac
# Ignore bullet summoning logic while `attack.clock.i` is negative
execute if score @s attack.clock.i matches ..-1 run return 0

# TODO(45): refactor repeated `attack.clock.i` conditionals into separate functions
# Delete ring when we start summoning bullets
execute if score @s attack.clock.i matches 0 run function entity:group/start
execute if score @s attack.clock.i matches 0 as @e[tag=friendliness-pellet-ring,scores={group.id=0}] run function animated_java:friendliness_pellet_ring/remove/this
Expand All @@ -25,5 +27,5 @@ execute if score @s attack.bullets.count < @s attack.bullets.total run function
execute if score @s attack.bullets.count = @s attack.bullets.total run scoreboard players add @s attack.bullets.clock.i 1

# After `attack.bullets.clock.delay` ticks, terminate (and activate all bullets)
# TODO: this could be off by one tick (might need to be `attack.bullets.clock.delay - 1`?)
# TODO(44): this could be off by one tick (might need to be `attack.bullets.clock.delay - 1`?)
execute if score @s attack.bullets.clock.i = @s attack.bullets.clock.delay run function entity:hostile/omega-flowey/attack/friendliness-pellets/indicator/terminate
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## Set fake player scores back to defaults (if they were changed by a pre-initialize attack function)
# TODO(44): validate these attack parameters
scoreboard players set #attack-friendliness-pellets attack.bullets.clock.delay 4
scoreboard players set #attack-friendliness-pellets attack.bullets.total 10
# (42 / 14) + 1 = 3 + 1 = 4 indicators
Expand Down

0 comments on commit 1c7d513

Please sign in to comment.