Skip to content

Commit

Permalink
increase weight we decrease previously ran attack by from 1 to 2
Browse files Browse the repository at this point in the history
- compensate base weights by adding 1
- i.e. base weight: 2 -> 3, reducer: 1 -> 2
- see #29 for math details
  • Loading branch information
TheAfroOfDoom committed Jan 7, 2024
1 parent c9cc377 commit cc2881a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## Initializes a random attack for entities (`boss_fight`) with `boss-fight.attack.phase.i` == 0

# Set influences to defaults for attack_phase 0
scoreboard players set #attack-friendliness-pellets attack.weight 2
scoreboard players set #attack-homing-vines attack.weight 2
scoreboard players set #attack-x-bullets-lower attack.weight 2
scoreboard players set #attack-x-bullets-upper attack.weight 2
scoreboard players set #attack-friendliness-pellets attack.weight 3
scoreboard players set #attack-homing-vines attack.weight 3
scoreboard players set #attack-x-bullets-lower attack.weight 3
scoreboard players set #attack-x-bullets-upper attack.weight 3

# Run base `start` function
function entity:hostile/omega-flowey/attack/random/start
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Reduce weight of attack if it was just ran
scoreboard players set @s attack.weight 1
scoreboard players set @s attack.weight 2

execute if entity @s[tag=attack.random.previous_attack.dentata-snakes] run scoreboard players operation #attack-dentata-snakes attack.weight -= @s attack.weight
execute if entity @s[tag=attack.random.previous_attack.dentata-snakes] run tag @s remove attack.random.previous_attack.dentata-snakes
Expand Down

0 comments on commit cc2881a

Please sign in to comment.