Skip to content

Commit

Permalink
increase weight reducer of "previous_trials" logic for random attacks (
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAfroOfDoom authored Jan 8, 2024
1 parent 9769770 commit 377434d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 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,18 +1,20 @@
## Reduce weight of attack if it was just ran
execute if entity @s[tag=attack.random.previous_attack.dentata-snakes] run scoreboard players remove #attack-dentata-snakes 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

execute if entity @s[tag=attack.random.previous_attack.finger-guns] run scoreboard players remove #attack-finger-guns attack.weight 1
execute if entity @s[tag=attack.random.previous_attack.finger-guns] run scoreboard players operation #attack-finger-guns attack.weight -= @s attack.weight
execute if entity @s[tag=attack.random.previous_attack.finger-guns] run tag @s remove attack.random.previous_attack.finger-guns

execute if entity @s[tag=attack.random.previous_attack.friendliness-pellets] run scoreboard players remove #attack-friendliness-pellets attack.weight 1
execute if entity @s[tag=attack.random.previous_attack.friendliness-pellets] run scoreboard players operation #attack-friendliness-pellets attack.weight -= @s attack.weight
execute if entity @s[tag=attack.random.previous_attack.friendliness-pellets] run tag @s remove attack.random.previous_attack.friendliness-pellets

execute if entity @s[tag=attack.random.previous_attack.homing-vines] run scoreboard players remove #attack-homing-vines attack.weight 1
execute if entity @s[tag=attack.random.previous_attack.homing-vines] run scoreboard players operation #attack-homing-vines attack.weight -= @s attack.weight
execute if entity @s[tag=attack.random.previous_attack.homing-vines] run tag @s remove attack.random.previous_attack.homing-vines

execute if entity @s[tag=attack.random.previous_attack.x-bullets-lower] run scoreboard players remove #attack-x-bullets-lower attack.weight 1
execute if entity @s[tag=attack.random.previous_attack.x-bullets-lower] run scoreboard players operation #attack-x-bullets-lower attack.weight -= @s attack.weight
execute if entity @s[tag=attack.random.previous_attack.x-bullets-lower] run tag @s remove attack.random.previous_attack.x-bullets-lower

execute if entity @s[tag=attack.random.previous_attack.x-bullets-upper] run scoreboard players remove #attack-x-bullets-upper attack.weight 1
execute if entity @s[tag=attack.random.previous_attack.x-bullets-upper] run scoreboard players operation #attack-x-bullets-upper attack.weight -= @s attack.weight
execute if entity @s[tag=attack.random.previous_attack.x-bullets-upper] run tag @s remove attack.random.previous_attack.x-bullets-upper

0 comments on commit 377434d

Please sign in to comment.