Skip to content

Commit

Permalink
⚖️ [Mob258] 歪みの魔導書がボスをテレポートしないように (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
EllaCoat authored Aug 25, 2024
1 parent a0a8b32 commit 7e07f5a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

# もし周囲にモブが多すぎた場合挙動が変わる
# 数のカウント
execute store result score $Count Temporary if entity @e[type=#lib:hostile,tag=Enemy,distance=..30]
execute store result score $Count Temporary if entity @e[type=#lib:hostile,tag=Enemy,tag=!Enemy.Boss,distance=..30]
# 30以上モブがいない場合
execute unless score $Count Temporary matches 30.. run function asset:mob/0258.enemy_teleporter/tick/teleport
# 30以上モブがいる場合
execute if score $Count Temporary matches 30.. run function asset:mob/0258.enemy_teleporter/tick/weak_teleport
# リセット
scoreboard players reset $Count Temporary
scoreboard players reset $Count Temporary
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
# @within function asset:mob/0258.enemy_teleporter/tick/branch

# なるべく離れてるモブを引き寄せ
execute if entity @e[type=#lib:hostile,tag=Enemy,tag=!Uninterferable,distance=15..25,limit=1] as @e[type=#lib:hostile,tag=Enemy,tag=!Uninterferable,distance=15..25,sort=random,limit=3] run tp ~ ~ ~
execute if entity @e[type=#lib:hostile,tag=Enemy,tag=!Enemy.Boss,tag=!Uninterferable,distance=15..25,limit=1] as @e[type=#lib:hostile,tag=Enemy,tag=!Enemy.Boss,tag=!Uninterferable,distance=15..25,sort=random,limit=3] run tp ~ ~ ~

# もしも周囲に敵がいないならどこの誰でもいいから引き寄せ
execute unless entity @e[type=#lib:hostile,tag=Enemy,tag=!Uninterferable,distance=15..25,limit=1] as @e[type=#lib:hostile,tag=!Uninterferable,distance=..25,sort=nearest,limit=3] run tp ~ ~ ~
execute unless entity @e[type=#lib:hostile,tag=Enemy,tag=!Enemy.Boss,tag=!Uninterferable,distance=15..25,limit=1] as @e[type=#lib:hostile,tag=Enemy,tag=!Enemy.Boss,tag=!Uninterferable,distance=..25,sort=nearest,limit=3] run tp ~ ~ ~

# 演出
playsound ogg:block.respawn_anchor.set_spawn1 hostile @a ~ ~ ~ 1 1.4
particle dust 0.427 0 0.514 1 ~ ~3 ~ 0.7 3 0.7 0 150

# 自害
kill @s
kill @s
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
# @within function asset:mob/0258.enemy_teleporter/tick/branch

# 近くにいるモブだけをテレポート
execute as @e[type=#lib:hostile,tag=Enemy,tag=!Uninterferable,distance=..15,sort=random,limit=3] run tp ~ ~ ~
execute as @e[type=#lib:hostile,tag=Enemy,tag=!Enemy.Boss,tag=!Uninterferable,distance=..15,sort=random,limit=3] run tp ~ ~ ~

# 演出
playsound ogg:block.respawn_anchor.set_spawn1 hostile @a ~ ~ ~ 1 1.4
particle dust 0.427 0 0.514 1 ~ ~3 ~ 0.7 3 0.7 0 150

# 自害
kill @s
kill @s

0 comments on commit 7e07f5a

Please sign in to comment.