diff --git a/Asset/data/asset/functions/mob/0021.demon_eye/move/.mcfunction b/Asset/data/asset/functions/mob/0021.demon_eye/move/.mcfunction new file mode 100644 index 00000000000..fa65c92b23e --- /dev/null +++ b/Asset/data/asset/functions/mob/0021.demon_eye/move/.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/0021.demon_eye/move/ +# +# 継承先などから実行される処理 +# +# @within asset:mob/alias/21/move + +# 被ダメしてないなら移動 + execute if data entity @s {HurtTime:0s} run function asset:mob/super.method diff --git a/Asset/data/asset/functions/mob/0021.demon_eye/register.mcfunction b/Asset/data/asset/functions/mob/0021.demon_eye/register.mcfunction index 2ba51c76f5c..e5364774ed4 100644 --- a/Asset/data/asset/functions/mob/0021.demon_eye/register.mcfunction +++ b/Asset/data/asset/functions/mob/0021.demon_eye/register.mcfunction @@ -1,6 +1,12 @@ #> asset:mob/0021.demon_eye/register # @within asset:mob/alias/21/register +# 継承(オプション) + data modify storage asset:mob Extends append value 2003 + function asset:mob/extends +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value false + # ID (int) data modify storage asset:mob ID set value 21 # Type (string) Wikiを参照 @@ -38,7 +44,7 @@ # 特殊防御力 (double) (オプション) // 4pointにつきダメージを大きく減らす # data modify storage asset:mob SpecialDefense set value 0 # 移動速度 (double) (オプション) - # data modify storage asset:mob Speed set value + data modify storage asset:mob Speed set value 0.15 # 索敵範囲 (double) (オプション) # data modify storage asset:mob FollowRange set value # ノックバック耐性 (double) (オプション) @@ -54,3 +60,6 @@ # data modify storage asset:mob Resist.Water set value # 雷倍率 (float) (オプション) # data modify storage asset:mob Resist.Thunder set value + +# 回転 + data modify storage asset:mob Field.Rotate set value 1600 diff --git a/Asset/data/asset/functions/mob/0021.demon_eye/summon/.mcfunction b/Asset/data/asset/functions/mob/0021.demon_eye/summon/.mcfunction index 9685598fb78..ee966a56dae 100644 --- a/Asset/data/asset/functions/mob/0021.demon_eye/summon/.mcfunction +++ b/Asset/data/asset/functions/mob/0021.demon_eye/summon/.mcfunction @@ -1,4 +1,4 @@ #> asset:mob/0021.demon_eye/summon/ # @within asset:mob/alias/21/summon -summon zombie ~ ~ ~ {Silent:1b,Tags:["MobInit","Enemy","ProcessCommonTag","AlwaysInvisible","AlwaysSlowFall"],DeathLootTable:"empty",Passengers:[{id:"minecraft:area_effect_cloud",Duration:-1,Age:-2147483648,WaitTime:-2147483648,Tags:["21.Rotater","ProcessCommonTag","AutoKillWhenDieVehicle"]}]} +summon zombie ~ ~ ~ {Silent:1b,NoAI:1b,Tags:["MobInit","Enemy","ProcessCommonTag","AlwaysInvisible","AlwaysSlowFall"],DeathLootTable:"empty"} diff --git a/Asset/data/asset/functions/mob/0021.demon_eye/tick/.mcfunction b/Asset/data/asset/functions/mob/0021.demon_eye/tick/.mcfunction index 35e41285406..c31e5ade76c 100644 --- a/Asset/data/asset/functions/mob/0021.demon_eye/tick/.mcfunction +++ b/Asset/data/asset/functions/mob/0021.demon_eye/tick/.mcfunction @@ -7,21 +7,8 @@ # パーティクル particle dust 0.5 0 0 1 ~ ~1.68 ~ 0.25 0.25 0.25 0 2 force @a[distance=..40] -# 範囲内ならホーミングじみた移動、ただしダメージを受けていないなら - execute at @s anchored eyes as @e[type=area_effect_cloud,tag=21.Rotater,sort=nearest,limit=1] run function asset:mob/0021.demon_eye/tick/rotater_tick - -# 速さ - data modify storage lib: Argument.VectorMagnitude set value 0.15 - -# 飛ぶのに使う - execute if data entity @s {HurtTime:0s} at @s anchored eyes rotated as @e[type=area_effect_cloud,tag=21.Rotater,sort=nearest,limit=1] run function lib:motion/ - data remove storage lib: Argument -# 向き - data modify entity @s Rotation set from storage asset:temp Rotation - data remove storage asset:temp Rotation - -# 接地で上を向く - execute if data entity @s {OnGround:1b} positioned ~ ~1.5 ~ as @e[type=area_effect_cloud,tag=21.Rotater,sort=nearest,limit=1] at @s run tp @s ~ ~ ~ ~ ~-35 +# super.tick + function asset:mob/super.tick # クールタイムを減らす 0以下にはならない scoreboard players remove @s[scores={L.AttackCT=1..}] L.AttackCT 1 @@ -29,9 +16,6 @@ # クールタイム中じゃないなら接触時に攻撃 execute unless score @s L.AttackCT matches 1.. positioned ~-0.5 ~-0.5 ~-0.5 if entity @p[tag=!PlayerShouldInvulnerable,dx=0] at @s run function asset:mob/0021.demon_eye/tick/event/attack -# カベにぶつかった際の処理 - execute unless block ^ ^ ^0.5 #lib:no_collision as @e[type=area_effect_cloud,tag=21.Rotater,sort=nearest,limit=1] run tp @s ~ ~ ~ ~45 ~-45 - # 世界に存在しすぎた場合、消滅する scoreboard players remove @s L.LifeTime 1 execute if score @s L.LifeTime matches ..0 run function asset:mob/0021.demon_eye/tick/event/suicide diff --git a/Asset/data/asset/functions/mob/0021.demon_eye/tick/rotater_tick.mcfunction b/Asset/data/asset/functions/mob/0021.demon_eye/tick/rotater_tick.mcfunction deleted file mode 100644 index 7feb9b91438..00000000000 --- a/Asset/data/asset/functions/mob/0021.demon_eye/tick/rotater_tick.mcfunction +++ /dev/null @@ -1,40 +0,0 @@ -#> asset:mob/0021.demon_eye/tick/rotater_tick -# -# 頭の上に乗っかってるやつが使用 -# -# @within function asset:mob/0021.demon_eye/tick/ - -# いろは丸様のホーミング機構を使用させていただきました。 - -# Rotation取得 - data modify storage asset:temp Rotation set from entity @s Rotation -# ホーミング - execute store result score $L.RotX Temporary run data get storage asset:temp Rotation[0] 1000 - execute store result score $L.RotY Temporary run data get storage asset:temp Rotation[1] 1000 - -# 回転角度取得 - scoreboard players set $L.AngleX Temporary 0 - scoreboard players set $L.AngleY Temporary 0 - -# X軸の振り向き速度 - scoreboard players add $L.AngleX Temporary 1500 - -# Y軸の振り向き速度 - scoreboard players add $L.AngleY Temporary 3000 - -# 回転角度加算 - execute rotated as @s positioned as @a[distance=..100] positioned ^-100 ^ ^ positioned as @s[distance=..100] run scoreboard players operation $L.RotX Temporary -= $L.AngleY Temporary - execute rotated as @s positioned as @a[distance=..100] positioned ^100 ^ ^ positioned as @s[distance=..100] run scoreboard players operation $L.RotX Temporary += $L.AngleY Temporary - execute rotated as @s positioned as @a[distance=..100] positioned ^ ^-100 ^ positioned as @s[distance=..100] run scoreboard players operation $L.RotY Temporary -= $L.AngleX Temporary - execute rotated as @s positioned as @a[distance=..100] positioned ^ ^100 ^ positioned as @s[distance=..100] run scoreboard players operation $L.RotY Temporary += $L.AngleX Temporary - -# セット - execute store result storage asset:temp Rotation[0] float 0.001 run scoreboard players get $L.RotX Temporary - execute store result storage asset:temp Rotation[1] float 0.001 run scoreboard players get $L.RotY Temporary - data modify entity @s Rotation set from storage asset:temp Rotation - -# リセット - scoreboard players reset $L.RotX Temporary - scoreboard players reset $L.RotY Temporary - scoreboard players reset $L.AngleX Temporary - scoreboard players reset $L.AngleY Temporary diff --git a/Asset/data/asset/functions/mob/0038.laser_eye/get_speed/.mcfunction b/Asset/data/asset/functions/mob/0038.laser_eye/get_speed/.mcfunction new file mode 100644 index 00000000000..1ba54e4dc65 --- /dev/null +++ b/Asset/data/asset/functions/mob/0038.laser_eye/get_speed/.mcfunction @@ -0,0 +1,11 @@ +#> asset:mob/0038.laser_eye/get_speed/ +# +# 継承先などから実行される処理 +# +# @within asset:mob/alias/38/get_speed + +# まず普通にsuperする + function asset:mob/super.method + +# プレイヤーが近ければ速度を-1倍する + execute if entity @p[tag=!PlayerShouldInvulnerable,distance=..6] store result storage asset:context this.Speed double -0.01 run data get storage asset:context this.Speed 100 diff --git a/Asset/data/asset/functions/mob/0038.laser_eye/move/.mcfunction b/Asset/data/asset/functions/mob/0038.laser_eye/move/.mcfunction new file mode 100644 index 00000000000..0f6d80db8a8 --- /dev/null +++ b/Asset/data/asset/functions/mob/0038.laser_eye/move/.mcfunction @@ -0,0 +1,9 @@ +#> asset:mob/0038.laser_eye/move/ +# +# 継承先などから実行される処理 +# +# @within asset:mob/alias/38/move + +# 自身の速度だけ前進する +# 壁は貫通するものなのでそのまま進む + function asset:mob/0038.laser_eye/move/m with storage asset:context this diff --git a/Asset/data/asset/functions/mob/0038.laser_eye/move/m.mcfunction b/Asset/data/asset/functions/mob/0038.laser_eye/move/m.mcfunction new file mode 100644 index 00000000000..b21051526f3 --- /dev/null +++ b/Asset/data/asset/functions/mob/0038.laser_eye/move/m.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/0038.laser_eye/move/m +# +# +# +# @within function asset:mob/0038.laser_eye/move/ + +# + $tp @s ^ ^ ^$(Speed) diff --git a/Asset/data/asset/functions/mob/0038.laser_eye/reflect/.mcfunction b/Asset/data/asset/functions/mob/0038.laser_eye/reflect/.mcfunction new file mode 100644 index 00000000000..d93593e1dc0 --- /dev/null +++ b/Asset/data/asset/functions/mob/0038.laser_eye/reflect/.mcfunction @@ -0,0 +1,7 @@ +#> asset:mob/0038.laser_eye/reflect/ +# +# 継承先などから実行される処理 +# +# @within asset:mob/alias/38/reflect + +# 何もしない diff --git a/Asset/data/asset/functions/mob/0038.laser_eye/register.mcfunction b/Asset/data/asset/functions/mob/0038.laser_eye/register.mcfunction index 00764403826..4374c62bfe4 100644 --- a/Asset/data/asset/functions/mob/0038.laser_eye/register.mcfunction +++ b/Asset/data/asset/functions/mob/0038.laser_eye/register.mcfunction @@ -1,6 +1,12 @@ #> asset:mob/0038.laser_eye/register # @within asset:mob/alias/38/register +# 継承(オプション) + data modify storage asset:mob Extends append value 2003 + function asset:mob/extends +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value false + # ID (int) data modify storage asset:mob ID set value 38 # Type (string) Wikiを参照 @@ -38,7 +44,7 @@ # 特殊防御力 (double) (オプション) // 4pointにつきダメージを大きく減らす # data modify storage asset:mob SpecialDefense set value # 移動速度 (double) (オプション) - data modify storage asset:mob Speed set value 0 + data modify storage asset:mob Speed set value 0.21 # 索敵範囲 (double) (オプション) data modify storage asset:mob FollowRange set value 0 # ノックバック耐性 (double) (オプション) @@ -60,3 +66,7 @@ # 存在時間 data modify storage asset:mob Field.LifeTime set value 400 + +# 追尾性能 + # data modify storage asset:mob Field.Rotate set value 500 + data modify storage asset:mob Field.RotatePower set value {Far:500,Near:250} diff --git a/Asset/data/asset/functions/mob/0038.laser_eye/rotate/.mcfunction b/Asset/data/asset/functions/mob/0038.laser_eye/rotate/.mcfunction new file mode 100644 index 00000000000..cebe34cab94 --- /dev/null +++ b/Asset/data/asset/functions/mob/0038.laser_eye/rotate/.mcfunction @@ -0,0 +1,12 @@ +#> asset:mob/0038.laser_eye/rotate/ +# +# 継承先などから実行される処理 +# +# @within asset:mob/alias/38/rotate + +# 最も近いプレイヤーの位置に応じて追尾性能を変える + execute unless entity @p[tag=!PlayerShouldInvulnerable,distance=..6] if entity @p[tag=!PlayerShouldInvulnerable,distance=7..32] run data modify storage asset:context this.Rotate set from storage asset:context this.RotatePower.Far + execute if entity @p[tag=!PlayerShouldInvulnerable,distance=..6] run data modify storage asset:context this.Rotate set from storage asset:context this.RotatePower.Near + +# super.rotate + function asset:mob/super.method diff --git a/Asset/data/asset/functions/mob/0038.laser_eye/tick/.mcfunction b/Asset/data/asset/functions/mob/0038.laser_eye/tick/.mcfunction index 43d8c836b7d..8c3d2803c73 100644 --- a/Asset/data/asset/functions/mob/0038.laser_eye/tick/.mcfunction +++ b/Asset/data/asset/functions/mob/0038.laser_eye/tick/.mcfunction @@ -4,11 +4,8 @@ # # @within function asset:mob/alias/38/tick -# プレイヤーが遠くにいる場合 - execute unless entity @s[tag=C.Charge] if entity @p[tag=!PlayerShouldInvulnerable,distance=7..32] facing entity @p[tag=!PlayerShouldInvulnerable] eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-500 facing entity @s eyes positioned as @s run tp @s ^ ^ ^0.21 ~ ~ - -# プレイヤーが近すぎる場合 - execute unless entity @s[tag=C.Charge] if entity @p[tag=!PlayerShouldInvulnerable,distance=..6] facing entity @p[tag=!PlayerShouldInvulnerable] eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-250 facing entity @s eyes positioned as @s run tp @s ^ ^ ^-0.21 ~ ~ +# チャージ中でなければsuper.tick + execute unless entity @s[tag=C.Charge] run function asset:mob/super.tick # 適正距離の場合 execute unless entity @s[tag=C.Charge] if entity @p[tag=!PlayerShouldInvulnerable,distance=3..9] run function asset:mob/0038.laser_eye/tick/charge diff --git a/Asset/data/asset/functions/mob/0204.infernal_watcher/init/.mcfunction b/Asset/data/asset/functions/mob/0204.infernal_watcher/init/.mcfunction index 3d0d04fa379..8b91ca21e58 100644 --- a/Asset/data/asset/functions/mob/0204.infernal_watcher/init/.mcfunction +++ b/Asset/data/asset/functions/mob/0204.infernal_watcher/init/.mcfunction @@ -2,3 +2,7 @@ # @within asset:mob/alias/204/init execute as @s facing entity @a[distance=..64,sort=nearest,limit=1] eyes run tp @s ~ ~ ~ ~ ~ + +# 速度・追尾力を適用 + data modify entity @s Attributes[{Name:"minecraft:generic.movement_speed"}].Base set from storage asset:context this.Move._.Speed + data modify storage asset:context this.Rotate set from storage asset:context this.Move._.Rotate diff --git a/Asset/data/asset/functions/mob/0204.infernal_watcher/register.mcfunction b/Asset/data/asset/functions/mob/0204.infernal_watcher/register.mcfunction index 11cc545b586..8acd5c6526c 100644 --- a/Asset/data/asset/functions/mob/0204.infernal_watcher/register.mcfunction +++ b/Asset/data/asset/functions/mob/0204.infernal_watcher/register.mcfunction @@ -1,6 +1,12 @@ #> asset:mob/0204.infernal_watcher/register # @within asset:mob/alias/204/register +# 継承(オプション) + data modify storage asset:mob Extends append value 2003 + function asset:mob/extends +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value false + # ID (int) data modify storage asset:mob ID set value 204 # Type (string) Wikiを参照 @@ -38,7 +44,7 @@ # 特殊防御力 (double) (オプション) // 4pointにつきダメージを大きく減らす data modify storage asset:mob SpecialDefense set value 0 # 移動速度 (double) (オプション) - # data modify storage asset:mob Speed set value + data modify storage asset:mob Speed set value 0.2 # 索敵範囲 (double) (オプション) # data modify storage asset:mob FollowRange set value # ノックバック耐性 (double) (オプション) @@ -56,4 +62,4 @@ data modify storage asset:mob Resist.Thunder set value 1.0f # フィールド (オプション) data modify storage asset:mob Field.Damage set value {_:28f,InFrenzy:42f} - data modify storage asset:mob Field.Move set value {_:{Speed:0.2d,Range:800},InFrenzy:{Speed:0.5d,Range:1200}} + data modify storage asset:mob Field.Move set value {_:{Speed:0.2d,Rotate:800},InFrenzy:{Speed:0.5d,Rotate:1200}} diff --git a/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/.mcfunction b/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/.mcfunction index 08b43950e94..a53b3e33c24 100644 --- a/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/.mcfunction +++ b/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/.mcfunction @@ -8,7 +8,9 @@ scoreboard players add @s General.Mob.Tick 1 function asset:mob/0204.infernal_watcher/tick/update_state/ # 移動 - function asset:mob/0204.infernal_watcher/tick/move/ + function asset:mob/super.tick +# その他 + function asset:mob/0204.infernal_watcher/tick/other/ # 攻撃 function asset:mob/0204.infernal_watcher/tick/attack/ # 自壊 diff --git a/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/move/do.m.mcfunction b/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/move/do.m.mcfunction deleted file mode 100644 index 09cbf985cdc..00000000000 --- a/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/move/do.m.mcfunction +++ /dev/null @@ -1,33 +0,0 @@ -#> asset:mob/0204.infernal_watcher/tick/move/do.m -# @input args -# Speed : double -# Range : int -# @within function asset:mob/0204.infernal_watcher/tick/move/ - -# 遮蔽がない場合は最寄りのプレイヤーを追いかける - $execute facing entity @a[distance=..64,sort=nearest,limit=1] feet positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-$(Range) facing entity @s eyes positioned as @s anchored eyes if block ^ ^ ^$(Speed) #lib:no_collision anchored feet run return run tp @s ^ ^ ^$(Speed) ~ ~ - -# 遮蔽がある場合は跳ね返る - -#> temp -# @private - #declare tag 5O.Marker - -# 自己位置の取得 - data modify storage asset:temp 5O.OwnPos set from entity @s Pos - execute store result score $5O.Yaw Temporary run data get entity @s Rotation[0] - execute store result score $5O.Pitch Temporary run data get entity @s Rotation[1] -# 移動先の取得 - $execute anchored eyes run summon marker ^ ^ ^$(Speed) {Tags:["5O.Marker"]} - execute as @e[type=marker,tag=5O.Marker,distance=..3,limit=1] run data modify storage asset:temp 5O.TargetPos set from entity @s Pos -# ヨーとピッチに分けて回転角計算 - function asset:mob/0204.infernal_watcher/tick/move/yaw - function asset:mob/0204.infernal_watcher/tick/move/pitch -# 回転 - execute store result storage asset:temp 5O.Yaw float 1 run scoreboard players get $5O.Yaw Temporary - execute store result storage asset:temp 5O.Pitch float 1 run scoreboard players get $5O.Pitch Temporary - function asset:mob/0204.infernal_watcher/tick/move/rotate.m with storage asset:temp 5O -# リセット - scoreboard players reset $5O.Yaw Temporary - scoreboard players reset $5O.Pitch Temporary - kill @e[type=marker,tag=5O.Marker,distance=..3,limit=1] diff --git a/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/move/pitch.mcfunction b/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/move/pitch.mcfunction deleted file mode 100644 index ae0096158e6..00000000000 --- a/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/move/pitch.mcfunction +++ /dev/null @@ -1,21 +0,0 @@ -#> asset:mob/0204.infernal_watcher/tick/move/pitch -# @within function asset:mob/0204.infernal_watcher/tick/move/do.m - -#> temp -# @private - #declare score_holder $5O.Own - #declare score_holder $5O.Target - -# 自己位置 -# 目の位置に補正 - execute store result score $5O.Own Temporary run data get storage asset:temp 5O.OwnPos[1] 100 - scoreboard players add $5O.Own Temporary 74 - scoreboard players operation $5O.Own Temporary /= $100 Const -# 移動先 - execute store result score $5O.Target Temporary run data get storage asset:temp 5O.TargetPos[1] 1 -# 計算 - scoreboard players operation $5O.Target Temporary -= $5O.Own Temporary - execute unless score $5O.Own Temporary matches 0 at @s run scoreboard players operation $5O.Pitch Temporary *= $-1 Const -# リセット - scoreboard players reset $5O.Own Temporary - scoreboard players reset $5O.Target Temporary diff --git a/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/move/rotate.m.mcfunction b/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/move/rotate.m.mcfunction deleted file mode 100644 index 456fe97c4e6..00000000000 --- a/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/move/rotate.m.mcfunction +++ /dev/null @@ -1,7 +0,0 @@ -#> asset:mob/0204.infernal_watcher/tick/move/rotate.m -# @input args -# Yaw : float -# Pitch : float -# @within function asset:mob/0204.infernal_watcher/tick/move/do.m - -$execute at @s run tp @s ~ ~ ~ $(Yaw) $(Pitch) diff --git a/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/move/yaw.mcfunction b/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/move/yaw.mcfunction deleted file mode 100644 index 5d84f948b93..00000000000 --- a/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/move/yaw.mcfunction +++ /dev/null @@ -1,28 +0,0 @@ -#> asset:mob/0204.infernal_watcher/tick/move/yaw -# @within function asset:mob/0204.infernal_watcher/tick/move/do.m - -#> temp -# @private - #declare score_holder $5O.OwnX - #declare score_holder $5O.TargetX - #declare score_holder $5O.OwnZ - #declare score_holder $5O.TargetZ - -# X軸 - execute store result score $5O.OwnX Temporary run data get storage asset:temp 5O.OwnPos[0] 1 - execute store result score $5O.TargetX Temporary run data get storage asset:temp 5O.TargetPos[0] 1 - scoreboard players operation $5O.TargetX Temporary -= $5O.OwnX Temporary -# Z軸 - execute store result score $5O.OwnZ Temporary run data get storage asset:temp 5O.OwnPos[2] 1 - execute store result score $5O.TargetZ Temporary run data get storage asset:temp 5O.TargetPos[2] 1 - scoreboard players operation $5O.TargetZ Temporary -= $5O.OwnZ Temporary -# 計算 - execute unless score $5O.TargetX Temporary matches 0 unless score $5O.TargetZ Temporary matches 0 run scoreboard players add $5O.Yaw Temporary 180 - execute unless score $5O.TargetX Temporary matches 0 if score $5O.TargetZ Temporary matches 0 run scoreboard players operation $5O.Yaw Temporary *= $-1 Const - execute if score $5O.TargetX Temporary matches 0 unless score $5O.TargetZ Temporary matches 0 run scoreboard players remove $5O.Yaw Temporary 180 - execute if score $5O.TargetX Temporary matches 0 unless score $5O.TargetZ Temporary matches 0 run scoreboard players operation $5O.Yaw Temporary *= $-1 Const -# リセット - scoreboard players reset $5O.OwnX Temporary - scoreboard players reset $5O.TargetX Temporary - scoreboard players reset $5O.OwnZ Temporary - scoreboard players reset $5O.TargetZ Temporary diff --git a/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/move/.mcfunction b/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/other/.mcfunction similarity index 56% rename from Asset/data/asset/functions/mob/0204.infernal_watcher/tick/move/.mcfunction rename to Asset/data/asset/functions/mob/0204.infernal_watcher/tick/other/.mcfunction index 6ac243674d9..2e47c25fba0 100644 --- a/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/move/.mcfunction +++ b/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/other/.mcfunction @@ -1,6 +1,6 @@ -#> asset:mob/0204.infernal_watcher/tick/move/ +#> asset:mob/0204.infernal_watcher/tick/other/ # -# 移動処理 +# 演出とのけぞり # # @within function asset:mob/0204.infernal_watcher/tick/ @@ -13,10 +13,3 @@ particle dust 0.761 0.267 0 1 ~ ~1.74 ~ 0.25 0.25 0.25 0 1 force @a[distance=..40] particle dust 0.792 0 0 1 ~ ~1.74 ~ 0.25 0.25 0.25 0 1 force @a[distance=..40] execute if entity @s[tag= 5O.InFrenzy] run particle flame ~ ~1.74 ~ 0.25 0.25 0.25 0 1 -# 定数設定 - execute if entity @s[tag=!5O.InFrenzy] run data modify storage asset:temp 5O set from storage asset:context this.Move._ - execute if entity @s[tag= 5O.InFrenzy] run data modify storage asset:temp 5O set from storage asset:context this.Move.InFrenzy -# 実処理 - function asset:mob/0204.infernal_watcher/tick/move/do.m with storage asset:temp 5O -# リセット - data remove storage asset:temp 5O diff --git a/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/update_state/end_frenzy.mcfunction b/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/update_state/end_frenzy.mcfunction index db1a4ac33b8..531b0aa4af5 100644 --- a/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/update_state/end_frenzy.mcfunction +++ b/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/update_state/end_frenzy.mcfunction @@ -1,9 +1,17 @@ #> asset:mob/0204.infernal_watcher/tick/update_state/end_frenzy # @within function asset:mob/0204.infernal_watcher/tick/update_state/ -tag @s remove 5O.InFrenzy +# タグ削除 + tag @s remove 5O.InFrenzy -item replace entity @s armor.head with minecraft:stick{CustomModelData:20207} -playsound minecraft:block.soul_sand.break hostile @a[distance=..16] ~ ~ ~ 1.5 0.75 -playsound minecraft:entity.phantom.flap hostile @a[distance=..16] ~ ~ ~ 1.5 1.5 -particle large_smoke ~ ~1.5 ~ 0 0 0 0.05 5 +# 速度・追尾力更新 + data modify entity @s Attributes[{Name:"minecraft:generic.movement_speed"}].Base set from storage asset:context this.Move._.Speed + data modify storage asset:context this.Rotate set from storage asset:context this.Move._.Rotate + +# 見た目更新 + item replace entity @s armor.head with minecraft:stick{CustomModelData:20207} + +# 演出 + playsound minecraft:block.soul_sand.break hostile @a[distance=..16] ~ ~ ~ 1.5 0.75 + playsound minecraft:entity.phantom.flap hostile @a[distance=..16] ~ ~ ~ 1.5 1.5 + particle large_smoke ~ ~1.5 ~ 0 0 0 0.05 5 diff --git a/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/update_state/start_frenzy.mcfunction b/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/update_state/start_frenzy.mcfunction index 38fa6730867..b24a3ced918 100644 --- a/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/update_state/start_frenzy.mcfunction +++ b/Asset/data/asset/functions/mob/0204.infernal_watcher/tick/update_state/start_frenzy.mcfunction @@ -1,9 +1,17 @@ #> asset:mob/0204.infernal_watcher/tick/update_state/start_frenzy # @within function asset:mob/0204.infernal_watcher/tick/update_state/ -tag @s add 5O.InFrenzy +# tag付け + tag @s add 5O.InFrenzy -item replace entity @s armor.head with minecraft:stick{CustomModelData:20208} -playsound minecraft:block.respawn_anchor.set_spawn hostile @a[distance=..16] ~ ~ ~ 1.5 1.5 -playsound ogg:mob.blaze.breathe4 hostile @a[distance=..16] ~ ~ ~ 1.5 1.5 -particle lava ~ ~1.5 ~ 0 0 0 0.2 5 +# 速度・追尾力更新 + data modify entity @s Attributes[{Name:"minecraft:generic.movement_speed"}].Base set from storage asset:context this.Move.InFrenzy.Speed + data modify storage asset:context this.Rotate set from storage asset:context this.Move.InFrenzy.Rotate + +# 見た目更新 + item replace entity @s armor.head with minecraft:stick{CustomModelData:20208} + +# 演出 + playsound minecraft:block.respawn_anchor.set_spawn hostile @a[distance=..16] ~ ~ ~ 1.5 1.5 + playsound ogg:mob.blaze.breathe4 hostile @a[distance=..16] ~ ~ ~ 1.5 1.5 + particle lava ~ ~1.5 ~ 0 0 0 0.2 5 diff --git a/Asset/data/asset/functions/mob/0210.aurora_eye/register.mcfunction b/Asset/data/asset/functions/mob/0210.aurora_eye/register.mcfunction index 3d8d0fd7184..a58a790677a 100644 --- a/Asset/data/asset/functions/mob/0210.aurora_eye/register.mcfunction +++ b/Asset/data/asset/functions/mob/0210.aurora_eye/register.mcfunction @@ -1,6 +1,12 @@ #> asset:mob/0210.aurora_eye/register # @within asset:mob/alias/210/register +# 継承(オプション) + data modify storage asset:mob Extends append value 2003 + function asset:mob/extends +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value false + # ID (int) data modify storage asset:mob ID set value 210 # Type (string) Wikiを参照 @@ -38,7 +44,7 @@ # 特殊防御力 (double) (オプション) // 4pointにつきダメージを大きく減らす # data modify storage asset:mob SpecialDefense set value # 移動速度 (double) (オプション) - # data modify storage asset:mob Speed set value + data modify storage asset:mob Speed set value 0.2 # 索敵範囲 (double) (オプション) # data modify storage asset:mob FollowRange set value # ノックバック耐性 (double) (オプション) @@ -61,3 +67,5 @@ data modify storage asset:mob Field.BulletCT set value {_:80,Max:80} data modify storage asset:mob Field.Metadata.Melee set value {AuroraEye:"Melee"} data modify storage asset:mob Field.Metadata.Bullet set value {AuroraEye:"Bullet"} + + data modify storage asset:mob Field.Rotate set value 800 diff --git a/Asset/data/asset/functions/mob/0210.aurora_eye/tick/.mcfunction b/Asset/data/asset/functions/mob/0210.aurora_eye/tick/.mcfunction index 71499402891..27845affbc3 100644 --- a/Asset/data/asset/functions/mob/0210.aurora_eye/tick/.mcfunction +++ b/Asset/data/asset/functions/mob/0210.aurora_eye/tick/.mcfunction @@ -7,16 +7,9 @@ # 演出 particle dust_color_transition 0.000 1.000 0.886 1 0 0.235 1 ~ ~1.68 ~ 0.25 0.25 0.25 0 1 normal -# 追尾 - execute facing entity @p[gamemode=!spectator] feet positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-800 facing entity @s feet positioned as @s run tp @s ^ ^ ^0.2 ~ ~ +# super.tick + function asset:mob/super.tick -# 接地で上を向く - execute at @s unless block ~ ~0.4 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~-35 - execute at @s unless block ~ ~2.5 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~80 - -# カベにぶつかった際の処理 - execute at @s unless block ^ ^ ^0.3 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 - execute at @s unless block ^ ^ ^0.2 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 # 近接攻撃 execute store result storage asset:context this.AttackCT._ int 0.9999999999 run data get storage asset:context this.AttackCT._ diff --git a/Asset/data/asset/functions/mob/0227.frost_eye/register.mcfunction b/Asset/data/asset/functions/mob/0227.frost_eye/register.mcfunction index c8189907ac9..40f2e04c6d8 100644 --- a/Asset/data/asset/functions/mob/0227.frost_eye/register.mcfunction +++ b/Asset/data/asset/functions/mob/0227.frost_eye/register.mcfunction @@ -4,9 +4,11 @@ # # @within function asset:mob/alias/227/register -# 継承 (int) (オプション) - # data modify storage asset:mob Extends append value - # function asset:mob/extends +# 継承(オプション) + data modify storage asset:mob Extends append value 2003 + function asset:mob/extends +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value false # 他のモブに継承されることを許可するか (boolean) (オプション) data modify storage asset:mob ExtendsSafe set value true @@ -47,7 +49,7 @@ # 特殊防御力 (double) (オプション) // 4pointにつきダメージを大きく減らす # data modify storage asset:mob SpecialDefense set value # 移動速度 (double) (オプション) - # data modify storage asset:mob Speed set value + data modify storage asset:mob Speed set value 0.15 # 索敵範囲 (double) (オプション) # data modify storage asset:mob FollowRange set value # ノックバック耐性 (double) (オプション) @@ -67,3 +69,4 @@ # フィールド # 与えるダメージ data modify storage asset:mob Field.Damage set value 8.0f + data modify storage asset:mob Field.Rotate set value 800 diff --git a/Asset/data/asset/functions/mob/0227.frost_eye/tick/.mcfunction b/Asset/data/asset/functions/mob/0227.frost_eye/tick/.mcfunction index 97d55fd5c2f..5a7dfc6cac5 100644 --- a/Asset/data/asset/functions/mob/0227.frost_eye/tick/.mcfunction +++ b/Asset/data/asset/functions/mob/0227.frost_eye/tick/.mcfunction @@ -10,15 +10,8 @@ # 下の水を凍らせる execute if predicate api:area/is_breakable anchored eyes positioned ^ ^ ^ run fill ~0.5 ~-1 ~0.5 ~-0.5 ~-2 ~-0.5 frosted_ice replace #asset:mob/0227.frost_eye/freezable -# 接地で上を向く - execute at @s unless block ~ ~0.2 ~ #lib:no_collision run tp @s ~ ~ ~ ~ ~-35 - execute at @s unless block ~ ~2.5 ~ #lib:no_collision run tp @s ~ ~ ~ ~ ~80 - -# カベにぶつかった際の処理 - execute at @s unless block ^ ^ ^0.3 #lib:no_collision run tp @s ~ ~ ~ ~45 ~-45 - -# プレイヤーを追跡 - execute at @s facing entity @p[gamemode=!spectator] feet positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-800 facing entity @s feet positioned as @s run tp @s ^ ^ ^0.15 ~ ~ +# super.tick + function asset:mob/super.tick # クールタイムを減らす 0以下にはならない scoreboard players remove @s[scores={6C.AttackCT=1..}] 6C.AttackCT 1 diff --git a/Asset/data/asset/functions/mob/0255.dependence_eye/register.mcfunction b/Asset/data/asset/functions/mob/0255.dependence_eye/register.mcfunction index 7fc32a1a631..08f4303287f 100644 --- a/Asset/data/asset/functions/mob/0255.dependence_eye/register.mcfunction +++ b/Asset/data/asset/functions/mob/0255.dependence_eye/register.mcfunction @@ -1,6 +1,12 @@ #> asset:mob/0255.dependence_eye/register # @within asset:mob/alias/255/register +# 継承(オプション) + data modify storage asset:mob Extends append value 2003 + function asset:mob/extends +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value false + # ID (int) data modify storage asset:mob ID set value 255 # Type (string) Wikiを参照 @@ -38,7 +44,7 @@ # 特殊防御力 (double) (オプション) // 4pointにつきダメージを大きく減らす # data modify storage asset:mob SpecialDefense set value # 移動速度 (double) (オプション) - data modify storage asset:mob Speed set value 0 + data modify storage asset:mob Speed set value 0.25 # 索敵範囲 (double) (オプション) data modify storage asset:mob FollowRange set value 0 # ノックバック耐性 (double) (オプション) @@ -54,3 +60,6 @@ # data modify storage asset:mob Resist.Water set value # 雷倍率 (float) (オプション) # data modify storage asset:mob Resist.Thunder set value + +# フィールド + data modify storage asset:mob Field.Rotate set value 800 diff --git a/Asset/data/asset/functions/mob/0255.dependence_eye/tick/.mcfunction b/Asset/data/asset/functions/mob/0255.dependence_eye/tick/.mcfunction index 246aef38a27..40980775f9b 100644 --- a/Asset/data/asset/functions/mob/0255.dependence_eye/tick/.mcfunction +++ b/Asset/data/asset/functions/mob/0255.dependence_eye/tick/.mcfunction @@ -7,19 +7,11 @@ # パーティクル particle dust 0.5 0 0 1 ~ ~1.68 ~ 0.25 0.25 0.25 0 2 force @a[distance=..40] -# 接地で上を向く - execute unless block ~ ~-0.1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~-35 - execute unless block ~ ~1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~80 - -# 範囲内ならホーミングじみた移動、ただしダメージを受けていないなら - execute facing entity @p eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-800 facing entity @s eyes positioned as @s run tp @s ^ ^ ^0.25 ~ ~ +# super.tick + function asset:mob/super.tick # クールタイム execute store result storage asset:context this.AttackCT int 0.9999999999 run data get storage asset:context this.AttackCT # クールタイム中じゃないなら接触時に攻撃 execute if data storage asset:context this{AttackCT:0} positioned ~-0.5 ~-0.5 ~-0.5 if entity @p[tag=!PlayerShouldInvulnerable,dx=0] run function asset:mob/0255.dependence_eye/tick/attack - -# カベにぶつかった際の処理 - execute unless block ^ ^ ^0.5 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 - execute at @s unless block ^ ^ ^0.2 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 diff --git a/Asset/data/asset/functions/mob/0257.distortion_spellbook/register.mcfunction b/Asset/data/asset/functions/mob/0257.distortion_spellbook/register.mcfunction index fcb3d42f68c..07d0bdb3026 100644 --- a/Asset/data/asset/functions/mob/0257.distortion_spellbook/register.mcfunction +++ b/Asset/data/asset/functions/mob/0257.distortion_spellbook/register.mcfunction @@ -1,6 +1,12 @@ #> asset:mob/0257.distortion_spellbook/register # @within asset:mob/alias/257/register +# 継承(オプション) + data modify storage asset:mob Extends append value 2003 + function asset:mob/extends +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value false + # ID (int) data modify storage asset:mob ID set value 257 # Type (string) Wikiを参照 @@ -38,7 +44,7 @@ # 特殊防御力 (double) (オプション) // 4pointにつきダメージを大きく減らす # data modify storage asset:mob SpecialDefense set value # 移動速度 (double) (オプション) - # data modify storage asset:mob Speed set value + data modify storage asset:mob Speed set value 0.2 # 索敵範囲 (double) (オプション) # data modify storage asset:mob FollowRange set value # ノックバック耐性 (double) (オプション) @@ -54,3 +60,6 @@ data modify storage asset:mob Resist.Water set value 1 # 雷倍率 (float) (オプション) data modify storage asset:mob Resist.Thunder set value 1 + +# フィールド + data modify storage asset:mob Field.Rotate set value 800 diff --git a/Asset/data/asset/functions/mob/0257.distortion_spellbook/tick/.mcfunction b/Asset/data/asset/functions/mob/0257.distortion_spellbook/tick/.mcfunction index 645366cec66..216b58455f9 100644 --- a/Asset/data/asset/functions/mob/0257.distortion_spellbook/tick/.mcfunction +++ b/Asset/data/asset/functions/mob/0257.distortion_spellbook/tick/.mcfunction @@ -4,18 +4,11 @@ # # @within function asset:mob/alias/257/tick - - -# だいたいデーモンアイからコピー。幾何学つかって多少簡略化 # パーティクル particle enchant ~ ~1.68 ~ 0.25 0.25 0.25 0 2 force @a[distance=..40] -# 接地で上を向く - execute unless block ~ ~-0.1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~-35 - execute unless block ~ ~1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~80 - -# 範囲内ならホーミングじみた移動 - execute facing entity @p eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-800 facing entity @s eyes positioned as @s run tp @s ^ ^ ^0.2 ~ ~ +# super.tick + function asset:mob/super.tick # スコア増やす scoreboard players add @s General.Mob.Tick 1 @@ -23,7 +16,3 @@ execute if score @s General.Mob.Tick matches 135.. if entity @p[gamemode=!spectator,distance=..20] run function asset:mob/0257.distortion_spellbook/tick/summon_teleporter # スコアリセット execute if score @s General.Mob.Tick matches 135.. run scoreboard players set @s General.Mob.Tick 0 - -# カベにぶつかった際の処理 - execute unless block ^ ^ ^0.5 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 - execute at @s unless block ^ ^ ^0.2 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 diff --git a/Asset/data/asset/functions/mob/0261.laser_eye_mk2/get_speed/.mcfunction b/Asset/data/asset/functions/mob/0261.laser_eye_mk2/get_speed/.mcfunction new file mode 100644 index 00000000000..5d3f3b16b06 --- /dev/null +++ b/Asset/data/asset/functions/mob/0261.laser_eye_mk2/get_speed/.mcfunction @@ -0,0 +1,17 @@ +#> asset:mob/0261.laser_eye_mk2/get_speed/ +# +# 継承先などから実行される処理 +# +# @within asset:mob/alias/261/get_speed + +# 近い場合 + execute if data storage asset:context this{Distance:"Near"} unless data storage asset:context this{PreDistance:"Near"} run data modify entity @s Attributes[{Name:"minecraft:generic.movement_speed"}].Base set from storage asset:context this.SpeedType.Near + +# 遠い場合 + execute if data storage asset:context this{Distance: "Far"} unless data storage asset:context this{PreDistance:" Far"} run data modify entity @s Attributes[{Name:"minecraft:generic.movement_speed"}].Base set from storage asset:context this.SpeedType.Far + +# super.get_speed + function asset:mob/super.method + +# 近い場合、フィールドをマイナス倍する + execute if data storage asset:context this{Distance:"Near"} store result storage asset:context this.Speed double -0.01 run data get storage asset:context this.Speed 100 diff --git a/Asset/data/asset/functions/mob/0261.laser_eye_mk2/move/.mcfunction b/Asset/data/asset/functions/mob/0261.laser_eye_mk2/move/.mcfunction new file mode 100644 index 00000000000..ec869ed1197 --- /dev/null +++ b/Asset/data/asset/functions/mob/0261.laser_eye_mk2/move/.mcfunction @@ -0,0 +1,11 @@ +#> asset:mob/0261.laser_eye_mk2/move/ +# +# 継承先などから実行される処理 +# +# @within asset:mob/alias/261/move + +# プレイヤーが遠い場合は、壁貫通を気にせずそのまま直進 + execute if data storage asset:context this{Distance:" Far"} run function asset:mob/0261.laser_eye_mk2/move/m with storage asset:context this + +# プレイヤーが近い場合は後ろのブロックを気にしつつ後退 + execute anchored eyes positioned ^ ^ ^ if block ^ ^ ^-1 #lib:no_collision/ if block ~ ~-0.25 ~ #lib:no_collision/ anchored feet at @s run function asset:mob/0261.laser_eye_mk2/move/m with storage asset:context this diff --git a/Asset/data/asset/functions/mob/0261.laser_eye_mk2/move/m.mcfunction b/Asset/data/asset/functions/mob/0261.laser_eye_mk2/move/m.mcfunction new file mode 100644 index 00000000000..baec3996520 --- /dev/null +++ b/Asset/data/asset/functions/mob/0261.laser_eye_mk2/move/m.mcfunction @@ -0,0 +1,7 @@ +#> asset:mob/0261.laser_eye_mk2/move/m +# +# +# +# @within function asset:mob/0261.laser_eye_mk2/move/ + +$tp @s ^ ^ ^$(Speed) diff --git a/Asset/data/asset/functions/mob/0261.laser_eye_mk2/register.mcfunction b/Asset/data/asset/functions/mob/0261.laser_eye_mk2/register.mcfunction index 67e177d590c..12250dd6ad3 100644 --- a/Asset/data/asset/functions/mob/0261.laser_eye_mk2/register.mcfunction +++ b/Asset/data/asset/functions/mob/0261.laser_eye_mk2/register.mcfunction @@ -1,6 +1,12 @@ #> asset:mob/0261.laser_eye_mk2/register # @within asset:mob/alias/261/register +# 継承(オプション) + data modify storage asset:mob Extends append value 2003 + function asset:mob/extends +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value false + # ID (int) data modify storage asset:mob ID set value 261 # Type (string) Wikiを参照 @@ -38,7 +44,7 @@ # 特殊防御力 (double) (オプション) // 4pointにつきダメージを大きく減らす # data modify storage asset:mob SpecialDefense set value # 移動速度 (double) (オプション) - # data modify storage asset:mob Speed set value + data modify storage asset:mob Speed set value 0.1 # 索敵範囲 (double) (オプション) # data modify storage asset:mob FollowRange set value # ノックバック耐性 (double) (オプション) @@ -57,3 +63,13 @@ # フィールド data modify storage asset:mob Field.Damage set value 24f + +# 距離の状態管理用フィールド + # data modify storage asset:context this.Distance + # data modify storage asset:context this.PreDistance + +# プレイヤーとの距離による移動速度の種類 + data modify storage asset:mob Field.SpeedType set value {Near:0.08,Far:0.1} + +# 追尾性能 + data modify storage asset:mob Field.Rotate set value 800 diff --git a/Asset/data/asset/functions/mob/0261.laser_eye_mk2/tick/.mcfunction b/Asset/data/asset/functions/mob/0261.laser_eye_mk2/tick/.mcfunction index 9c26fe7eb10..48445503b08 100644 --- a/Asset/data/asset/functions/mob/0261.laser_eye_mk2/tick/.mcfunction +++ b/Asset/data/asset/functions/mob/0261.laser_eye_mk2/tick/.mcfunction @@ -7,18 +7,21 @@ # プレイヤーが適正距離にいたらReadyタグを付与 execute unless entity @s[tag=79.Ready] if entity @p[gamemode=!spectator,distance=7..10] run tag @s add 79.Ready -# Readyタグがないとき - # @pを追尾 - execute if entity @s[tag=!79.Ready] facing entity @p[gamemode=!spectator,distance=..64] feet positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-800 facing entity @s feet positioned as @s run tp @s ~ ~ ~ ~ ~ +# 適正距離にいない場合、フィールドで遠近の情報を管理する + execute unless entity @s[tag=79.Ready] if entity @p[gamemode=!spectator,distance=..7] run data modify storage asset:context this.Distance set value "Near" + execute unless entity @s[tag=79.Ready] unless entity @p[gamemode=!spectator,distance=..10] run data modify storage asset:context this.Distance set value "Far" - # プレイヤーが近くにいないなら前進 - execute if entity @s[tag=!79.Ready] at @s unless entity @p[gamemode=!spectator,distance=..7] run tp @s ^ ^ ^0.1 ~ ~ +# Readyタグがなければsuper.tick + execute unless entity @s[tag=79.Ready] run function asset:mob/super.tick - # プレイヤーがすごく近いかつ、後ろが床でなく、後ろが壁でもなければゆっくり後退 - execute if entity @s[tag=!79.Ready] at @s if entity @p[gamemode=!spectator,distance=..7] anchored eyes positioned ^ ^ ^ if block ^ ^ ^-1 #lib:no_collision if block ~ ~-0.25 ~ #lib:no_collision anchored feet at @s run tp @s ^ ^ ^-0.08 ~ ~ - - # 壁が後ろにあってこれ以上後退できない場合は発射準備に移る - execute if entity @s[tag=!79.Ready] at @s if entity @p[gamemode=!spectator,distance=..7] anchored eyes positioned ^ ^ ^ unless block ^ ^ ^-1 #lib:no_collision anchored feet at @s run tag @s add 79.Ready +# Readyタグがない && プレイヤーが近い && 後ろにブロックがあって後退できない なら発射準備に移る + execute if entity @s[tag=!79.Ready] at @s if data storage asset:context this{Distance:"Near"} anchored eyes positioned ^ ^ ^ unless block ^ ^ ^-1 #lib:no_collision/ anchored feet at @s run tag @s add 79.Ready # Readyタグがあるときは発射準備 execute if entity @s[tag=79.Ready] run function asset:mob/0261.laser_eye_mk2/tick/ready + +# 毎tickのattribute変更を対策するために前tickの距離の情報を保存しておく + data modify storage asset:context this.PreDistance set from storage asset:context this.Distance + +# リセット + data remove storage asset:context this.Distance diff --git a/Asset/data/asset/functions/mob/0265.dark_familiar/init/.mcfunction b/Asset/data/asset/functions/mob/0265.dark_familiar/init/.mcfunction index 13b5aaf4bb0..8eeacec90ce 100644 --- a/Asset/data/asset/functions/mob/0265.dark_familiar/init/.mcfunction +++ b/Asset/data/asset/functions/mob/0265.dark_familiar/init/.mcfunction @@ -12,3 +12,7 @@ # パーティクル execute at @s anchored eyes positioned ^ ^ ^ run particle poof ~ ~-0.3 ~ 0 0 0 0.1 10 + +# アイ抽象用 移動速度を2/3倍する +# IsBabyにより移動速度が1.5倍になっているのを相殺する + execute store result entity @s Attributes[{Name:"minecraft:generic.movement_speed"}].Base double 0.006667 run attribute @s generic.movement_speed base get 100 diff --git a/Asset/data/asset/functions/mob/0265.dark_familiar/register.mcfunction b/Asset/data/asset/functions/mob/0265.dark_familiar/register.mcfunction index 9401cd3578e..5084acd2630 100644 --- a/Asset/data/asset/functions/mob/0265.dark_familiar/register.mcfunction +++ b/Asset/data/asset/functions/mob/0265.dark_familiar/register.mcfunction @@ -4,9 +4,11 @@ # # @within function asset:mob/alias/265/register -# 継承 (int) (オプション) - # data modify storage asset:mob Extends append value - # function asset:mob/extends +# 継承(オプション) + data modify storage asset:mob Extends append value 2003 + function asset:mob/extends +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value false # 他のモブに継承されることを許可するか (boolean) (オプション) # data modify storage asset:mob ExtendsSafe set value true @@ -49,7 +51,7 @@ # 特殊防御力 (double) (オプション) // 4pointにつきダメージを大きく減らす # data modify storage asset:mob SpecialDefense set value # 移動速度 (double) (オプション) - # data modify storage asset:mob Speed set value + data modify storage asset:mob Speed set value 0.2 # 索敵範囲 (double) (オプション) # data modify storage asset:mob FollowRange set value # ノックバック耐性 (double) (オプション) @@ -68,3 +70,6 @@ # フィールド data modify storage asset:mob Field.Damage set value 25.0f + +# 追尾性能 + data modify storage asset:mob Field.Rotate set value 2000 diff --git a/Asset/data/asset/functions/mob/0265.dark_familiar/rotate/.mcfunction b/Asset/data/asset/functions/mob/0265.dark_familiar/rotate/.mcfunction new file mode 100644 index 00000000000..5bb4b239c90 --- /dev/null +++ b/Asset/data/asset/functions/mob/0265.dark_familiar/rotate/.mcfunction @@ -0,0 +1,11 @@ +#> asset:mob/0265.dark_familiar/rotate/ +# +# 継承先などから実行される処理 +# +# @within asset:mob/alias/265/rotate + +# 近くにサモナーがいればサモナーに対して追尾 + execute facing entity @e[type=zombie,scores={MobID=264},distance=..30] feet positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-2000 facing entity @s eyes positioned as @s run tp @s ^ ^ ^ ~ ~ + +# 近くにサモナーがいないのであれば、プレイヤーに突っ込んでくる + execute unless entity @e[type=zombie,scores={MobID=264},distance=..30] run function asset:mob/super.method diff --git a/Asset/data/asset/functions/mob/0265.dark_familiar/tick/.mcfunction b/Asset/data/asset/functions/mob/0265.dark_familiar/tick/.mcfunction index 6ce68ae6080..82d39bab18f 100644 --- a/Asset/data/asset/functions/mob/0265.dark_familiar/tick/.mcfunction +++ b/Asset/data/asset/functions/mob/0265.dark_familiar/tick/.mcfunction @@ -12,25 +12,15 @@ execute anchored eyes positioned ^ ^ ^-0.3 run particle dust 0.5 0 0.6 0.5 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] execute anchored eyes positioned ^ ^ ^-0.3 run particle dust 0.5 0.3 0.6 0.7 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] -# 範囲内ならホーミングじみた移動 - execute facing entity @e[type=zombie,scores={MobID=264},distance=..30] feet positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-2000 facing entity @s eyes positioned as @s run tp @s ^ ^ ^0.2 ~ ~ - -# 近くにサモナーがいないのであれば、プレイヤーに突っ込んでくる - execute unless entity @e[type=zombie,scores={MobID=264},distance=..30] facing entity @p[distance=..30] feet positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-2000 facing entity @s eyes positioned as @s run tp @s ^ ^ ^0.2 ~ ~ - -# 接地で上を向く - execute positioned ~ ~1.68 ~ unless block ~ ~-1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~-35 - execute positioned ~ ~1.68 ~ unless block ~ ~1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~80 - -# カベにぶつかった際の処理 - execute positioned ~ ~1.68 ~ unless block ^ ^ ^0.5 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 - execute positioned ~ ~1.68 ~ unless block ^ ^ ^0.2 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 +# super.tick + function asset:mob/super.tick # スコア scoreboard players add @s General.Mob.Tick 1 # 消える execute if entity @s[scores={General.Mob.Tick=200..}] run function asset:mob/0265.dark_familiar/tick/kill + #tellraw @a {"storage":"asset:context","nbt":"this.Speed"} # 一定間隔で攻撃 召喚してすぐは攻撃しないようにしている scoreboard players operation $Interval Temporary = @s General.Mob.Tick diff --git a/Asset/data/asset/functions/mob/0321.mini_guardian/move/.mcfunction b/Asset/data/asset/functions/mob/0321.mini_guardian/move/.mcfunction new file mode 100644 index 00000000000..b54ef36830c --- /dev/null +++ b/Asset/data/asset/functions/mob/0321.mini_guardian/move/.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/0321.mini_guardian/move/ +# +# 継承先などから実行される処理 +# +# @within asset:mob/alias/321/move + +# 攻撃中 または のけぞり中 でなければ移動 + execute if entity @s[tag=!8X.Mode.Attack] unless score @s 8X.HurtTime matches 1.. run function asset:mob/super.method diff --git a/Asset/data/asset/functions/mob/0321.mini_guardian/register.mcfunction b/Asset/data/asset/functions/mob/0321.mini_guardian/register.mcfunction index 750e16cbdee..6895a01a268 100644 --- a/Asset/data/asset/functions/mob/0321.mini_guardian/register.mcfunction +++ b/Asset/data/asset/functions/mob/0321.mini_guardian/register.mcfunction @@ -1,6 +1,12 @@ #> asset:mob/0321.mini_guardian/register # @within asset:mob/alias/321/register +# 継承(オプション) + data modify storage asset:mob Extends append value 2003 + function asset:mob/extends +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value false + # 他のモブに継承されることを許可するか (boolean) (オプション) data modify storage asset:mob ExtendsSafe set value true # ID (int) @@ -40,7 +46,7 @@ # 特殊防御力 (double) (オプション) // 4pointにつきダメージを大きく減らす # data modify storage asset:mob SpecialDefense set value # 移動速度 (double) (オプション) - # data modify storage asset:mob Speed set value + data modify storage asset:mob Speed set value 0.1 # 索敵範囲 (double) (オプション) # data modify storage asset:mob FollowRange set value # ノックバック耐性 (double) (オプション) @@ -59,3 +65,4 @@ # フィールド data modify storage asset:mob Field.Damage set value 5.5f + data modify storage asset:mob Field.Rotate set value 6000 diff --git a/Asset/data/asset/functions/mob/0321.mini_guardian/rotate/.mcfunction b/Asset/data/asset/functions/mob/0321.mini_guardian/rotate/.mcfunction new file mode 100644 index 00000000000..591038c682c --- /dev/null +++ b/Asset/data/asset/functions/mob/0321.mini_guardian/rotate/.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/0321.mini_guardian/rotate/ +# +# 継承先などから実行される処理 +# +# @within asset:mob/alias/321/rotate + +# 攻撃中 または のけぞり中 でなければ追尾 + execute if entity @s[tag=!8X.Mode.Attack] unless score @s 8X.HurtTime matches 1.. run function asset:mob/super.method diff --git a/Asset/data/asset/functions/mob/0321.mini_guardian/tick/.mcfunction b/Asset/data/asset/functions/mob/0321.mini_guardian/tick/.mcfunction index 606704a63d3..ccc2212b57e 100644 --- a/Asset/data/asset/functions/mob/0321.mini_guardian/tick/.mcfunction +++ b/Asset/data/asset/functions/mob/0321.mini_guardian/tick/.mcfunction @@ -7,9 +7,6 @@ # スコア関連 scoreboard players remove @s[scores={8X.HurtTime=0..}] 8X.HurtTime 1 -# 攻撃中じゃなければ移動 - execute unless score @s[tag=!8X.Mode.Attack] 8X.HurtTime matches 0..40 unless score @s 8X.Tick matches 40.. facing entity @p feet positioned ^ ^ ^-50 rotated as @s positioned ^ ^ ^-3000 facing entity @s eyes positioned as @s run tp @s ^ ^ ^0.1 ~ ~ - # 付近にプレイヤーがいたら攻撃待機 execute if entity @p[gamemode=!spectator,distance=..8] run tag @s add 8X.Mode.Attack @@ -19,13 +16,8 @@ # 遠くに離れたら攻撃モード終了 execute if entity @s[tag=8X.Mode.Attack] unless entity @p[gamemode=!spectator,distance=..15] run function asset:mob/0321.mini_guardian/tick/event/reset +# super.tick + function asset:mob/super.tick + # のけぞりから復帰 data modify entity @s[scores={8X.HurtTime=..0}] NoAI set value 1b - -# 接地で上を向く - execute positioned ~ ~1.5 ~ unless block ~ ~-1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~-35 - execute positioned ~ ~1.5 ~ unless block ~ ~1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~80 - -# カベにぶつかった際の処理 - execute positioned ~ ~1.5 ~ unless block ^ ^ ^1 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 - execute positioned ~ ~1.5 ~ unless block ^ ^ ^0.4 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 diff --git a/Asset/data/asset/functions/mob/0321.mini_guardian/tick/event/attack_mode.mcfunction b/Asset/data/asset/functions/mob/0321.mini_guardian/tick/event/attack_mode.mcfunction index 595ff2669af..2d7bdc5354d 100644 --- a/Asset/data/asset/functions/mob/0321.mini_guardian/tick/event/attack_mode.mcfunction +++ b/Asset/data/asset/functions/mob/0321.mini_guardian/tick/event/attack_mode.mcfunction @@ -20,7 +20,8 @@ execute if score @s 8X.Tick matches 40..159 run function asset:mob/0321.mini_guardian/tick/event/laser/ # 攻撃終了後、ちょっと泳ぐ - execute at @s if score @s 8X.Tick matches 160..240 facing entity @p feet positioned ^ ^ ^-50 rotated as @s positioned ^ ^ ^-3000 facing entity @s eyes positioned as @s run tp @s ^ ^ ^0.1 ~ ~ + execute at @s if score @s 8X.Tick matches 160..240 run function asset:mob/call.m {method:"rotate"} + execute at @s if score @s 8X.Tick matches 160..240 run function asset:mob/call.m {method:"move"} # 攻撃動作終了 execute if score @s 8X.Tick matches 240 run function asset:mob/0321.mini_guardian/tick/event/reset diff --git a/Asset/data/asset/functions/mob/0363.white_spellbook/init/.mcfunction b/Asset/data/asset/functions/mob/0363.white_spellbook/init/.mcfunction index a60271d4503..89acda46747 100644 --- a/Asset/data/asset/functions/mob/0363.white_spellbook/init/.mcfunction +++ b/Asset/data/asset/functions/mob/0363.white_spellbook/init/.mcfunction @@ -6,3 +6,6 @@ # スコアの初期化 scoreboard players set @s General.Mob.Tick -80 + +# 速度・追尾力初期化 + function asset:mob/0363.white_spellbook/set_speed/0 diff --git a/Asset/data/asset/functions/mob/0363.white_spellbook/register.mcfunction b/Asset/data/asset/functions/mob/0363.white_spellbook/register.mcfunction index 2328c13ea0d..c9a75fe50bf 100644 --- a/Asset/data/asset/functions/mob/0363.white_spellbook/register.mcfunction +++ b/Asset/data/asset/functions/mob/0363.white_spellbook/register.mcfunction @@ -4,9 +4,11 @@ # # @within function asset:mob/alias/363/register -# 継承 (int) (オプション) - # data modify storage asset:mob Extends append value - # function asset:mob/extends +# 継承(オプション) + data modify storage asset:mob Extends append value 2003 + function asset:mob/extends +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value false # 他のモブに継承されることを許可するか (boolean) (オプション) # data modify storage asset:mob ExtendsSafe set value true @@ -47,7 +49,7 @@ # 特殊防御力 (double) (オプション) // 4pointにつきダメージを大きく減らす # data modify storage asset:mob SpecialDefense set value # 移動速度 (double) (オプション) - # data modify storage asset:mob Speed set value + data modify storage asset:mob Speed set value 0.15 # 索敵範囲 (double) (オプション) # data modify storage asset:mob FollowRange set value # ノックバック耐性 (double) (オプション) @@ -66,3 +68,6 @@ # フィールド data modify storage asset:mob Field.Damage set value 35f + data modify storage asset:mob Field.MoveSpeed set value {Slow:0.15,Fast:0.3} + data modify storage asset:mob Field.RotatePower set value {Weak:1200,Strong:600} + # data modify storage asset:mob Field.Rotate set value diff --git a/Asset/data/asset/functions/mob/0363.white_spellbook/set_speed/0.mcfunction b/Asset/data/asset/functions/mob/0363.white_spellbook/set_speed/0.mcfunction new file mode 100644 index 00000000000..8138e8afea3 --- /dev/null +++ b/Asset/data/asset/functions/mob/0363.white_spellbook/set_speed/0.mcfunction @@ -0,0 +1,11 @@ +#> asset:mob/0363.white_spellbook/set_speed/0 +# +# +# +# @within function +# asset:mob/0363.white_spellbook/init/ +# asset:mob/0363.white_spellbook/tick/ + +# 速度・追尾ともに弱く設定 + data modify entity @s Attributes[{Name:"minecraft:generic.movement_speed"}].Base set from storage asset:context this.MoveSpeed.Slow + data modify storage asset:context this.Rotate set from storage asset:context this.RotatePower.Weak diff --git a/Asset/data/asset/functions/mob/0363.white_spellbook/set_speed/1.mcfunction b/Asset/data/asset/functions/mob/0363.white_spellbook/set_speed/1.mcfunction new file mode 100644 index 00000000000..121c00d7e82 --- /dev/null +++ b/Asset/data/asset/functions/mob/0363.white_spellbook/set_speed/1.mcfunction @@ -0,0 +1,9 @@ +#> asset:mob/0363.white_spellbook/set_speed/1 +# +# +# +# @within function asset:mob/0363.white_spellbook/tick/ + +# 速度・追尾ともに強く設定 + data modify entity @s Attributes[{Name:"minecraft:generic.movement_speed"}].Base set from storage asset:context this.MoveSpeed.Fast + data modify storage asset:context this.Rotate set from storage asset:context this.RotatePower.Strong diff --git a/Asset/data/asset/functions/mob/0363.white_spellbook/tick/.mcfunction b/Asset/data/asset/functions/mob/0363.white_spellbook/tick/.mcfunction index 81b621dc207..97a90a05385 100644 --- a/Asset/data/asset/functions/mob/0363.white_spellbook/tick/.mcfunction +++ b/Asset/data/asset/functions/mob/0363.white_spellbook/tick/.mcfunction @@ -7,26 +7,21 @@ # 演出 particle enchant ~ ~1.68 ~ 0.25 0.25 0.25 0 2 normal @a +# super.tick + function asset:mob/super.tick + # Tickスコア scoreboard players add @s General.Mob.Tick 1 # 魔法陣を召喚する execute if entity @s[scores={General.Mob.Tick=0..}] run function asset:mob/0363.white_spellbook/tick/magic -# 接地で上を向く - execute unless block ~ ~-0.1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~-35 - execute unless block ~ ~1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~80 - # 移動スコア scoreboard players add @s A3.MoveTimer 1 -# MoveTimer =< 60なら遅く追尾は弱く、MoveTimer > 60なら速く追尾は強く - execute if entity @s[scores={A3.MoveTimer=..60}] facing entity @p eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-1200 facing entity @s eyes positioned as @s run tp @s ^ ^ ^0.15 ~ ~ - execute if entity @s[scores={A3.MoveTimer=60..}] facing entity @p eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-600 facing entity @s eyes positioned as @s run tp @s ^ ^ ^0.3 ~ ~ +# MoveTimerが60/120になるごとに速度と追尾力を変える + execute if score @s A3.MoveTimer matches 60 run function asset:mob/0363.white_spellbook/set_speed/1 + execute if score @s A3.MoveTimer matches 120 run function asset:mob/0363.white_spellbook/set_speed/0 # 移動スコアリセット execute if entity @s[scores={A3.MoveTimer=120..}] run scoreboard players reset @s A3.MoveTimer - -# カベにぶつかった際の処理 - execute unless block ^ ^ ^0.5 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 - execute at @s unless block ^ ^ ^0.2 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 diff --git a/Asset/data/asset/functions/mob/0369.prominence_spellbook/get_speed/.mcfunction b/Asset/data/asset/functions/mob/0369.prominence_spellbook/get_speed/.mcfunction new file mode 100644 index 00000000000..6a5f37573b3 --- /dev/null +++ b/Asset/data/asset/functions/mob/0369.prominence_spellbook/get_speed/.mcfunction @@ -0,0 +1,12 @@ +#> asset:mob/0369.prominence_spellbook/get_speed/ +# +# 継承先などから実行される処理 +# +# @within asset:mob/alias/369/get_speed + +# super.get_speed + function asset:mob/super.method + +# movement_speedはマイナスにできないため、後退モードの場合、速度を-1倍する + execute if data storage asset:context this{IsMoveBack:true} store result storage asset:context this.Speed double -0.01 run data get storage asset:context this.Speed 100 + diff --git a/Asset/data/asset/functions/mob/0369.prominence_spellbook/load.mcfunction b/Asset/data/asset/functions/mob/0369.prominence_spellbook/load.mcfunction deleted file mode 100644 index 312004d5988..00000000000 --- a/Asset/data/asset/functions/mob/0369.prominence_spellbook/load.mcfunction +++ /dev/null @@ -1,9 +0,0 @@ -#> asset:mob/0369.prominence_spellbook/load -# -# MOBに利用するスコアボード等の初期化処理 -# -# @within tag/function asset:mob/load - -#> 定義類はここに -# @within function asset:mob/0369.prominence_spellbook/** - scoreboard objectives add A9.StepBack dummy diff --git a/Asset/data/asset/functions/mob/0369.prominence_spellbook/reflect/.mcfunction b/Asset/data/asset/functions/mob/0369.prominence_spellbook/reflect/.mcfunction new file mode 100644 index 00000000000..7c6401908ba --- /dev/null +++ b/Asset/data/asset/functions/mob/0369.prominence_spellbook/reflect/.mcfunction @@ -0,0 +1,11 @@ +#> asset:mob/0369.prominence_spellbook/reflect/ +# +# 継承先などから実行される処理 +# +# @within asset:mob/alias/369/reflect + +# 後退モードでなければsuper.reflect + execute if data storage asset:context this{IsMoveBack:false} run function asset:mob/super.method + +# もし後退モードで足元がブロックなら真下を向く + execute if data storage asset:context this{IsMoveBack:true} at @s unless block ~ ~1 ~ #lib:no_collision/ run tp @s ~ ~ ~ ~ 90 diff --git a/Asset/data/asset/functions/mob/0369.prominence_spellbook/register.mcfunction b/Asset/data/asset/functions/mob/0369.prominence_spellbook/register.mcfunction index ea1631a9d8a..3889bcb2da8 100644 --- a/Asset/data/asset/functions/mob/0369.prominence_spellbook/register.mcfunction +++ b/Asset/data/asset/functions/mob/0369.prominence_spellbook/register.mcfunction @@ -4,9 +4,11 @@ # # @within function asset:mob/alias/369/register -# 継承 (int) (オプション) - # data modify storage asset:mob Extends append value - # function asset:mob/extends +# 継承(オプション) + data modify storage asset:mob Extends append value 2003 + function asset:mob/extends +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value false # 他のモブに継承されることを許可するか (boolean) (オプション) # data modify storage asset:mob ExtendsSafe set value true @@ -47,7 +49,7 @@ # 特殊防御力 (double) (オプション) // 4pointにつきダメージを大きく減らす # data modify storage asset:mob SpecialDefense set value # 移動速度 (double) (オプション) - # data modify storage asset:mob Speed set value + data modify storage asset:mob Speed set value 0.3 # 索敵範囲 (double) (オプション) # data modify storage asset:mob FollowRange set value # ノックバック耐性 (double) (オプション) @@ -65,5 +67,19 @@ # data modify storage asset:mob Resist.Thunder set value # フィールド + # ダメージ data modify storage asset:mob Field.Damage set value 24f + +# 後退時間 + data modify storage asset:mob Field.MoveBackTick._ set value 0 + data modify storage asset:mob Field.MoveBackTick.Max set value 60 + +# 後退モードか否か + data modify storage asset:mob Field.IsMoveBack set value false + +# 移動速度 + data modify storage asset:mob Field.MoveSpeed set value {Forward:0.3,Back:0.1} + +# 追尾性能 + data modify storage asset:mob Field.Rotate set value 800 diff --git a/Asset/data/asset/functions/mob/0369.prominence_spellbook/tick/.mcfunction b/Asset/data/asset/functions/mob/0369.prominence_spellbook/tick/.mcfunction index ac6e9164bed..9f718c8a90d 100644 --- a/Asset/data/asset/functions/mob/0369.prominence_spellbook/tick/.mcfunction +++ b/Asset/data/asset/functions/mob/0369.prominence_spellbook/tick/.mcfunction @@ -7,32 +7,18 @@ # パーティクル particle enchant ~ ~1.68 ~ 0.25 0.25 0.25 0 2 force @a[distance=..40] -# 接地で上を向く - execute unless block ~ ~-0.1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~-35 - execute unless block ~ ~1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~80 - -# 移動 - execute unless entity @s[scores={A9.StepBack=0..}] facing entity @p[gamemode=!spectator] eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-800 facing entity @s eyes positioned as @s run tp @s ^ ^ ^0.3 ~ ~ - -# 後退モード時は速度が下がる -# 幾何学の処理をしてかつ、後ろがブロックじゃないかつ、足元がブロックじゃなければ後退 - execute if entity @s[scores={A9.StepBack=0..}] facing entity @p[gamemode=!spectator] eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-800 facing entity @s eyes positioned as @s positioned ~ ~1.8 ~ if block ^ ^ ^-0.1 #lib:no_collision positioned ~ ~-1.8 ~ if block ~ ~0 ~ #lib:no_collision if block ~ ~1.5 ~ #lib:no_collision run tp @s ^ ^ ^-0.1 ~ ~ - -# もし後退モードで足元がブロックなら下を向いて脱出 - execute if entity @s[scores={A9.StepBack=0..}] at @s unless block ~ ~0 ~ #lib:no_collision run tp @s ~ ~0.3 ~ ~ 90 - -# プレイヤーが近くにいるとき、3秒間後退モードになる - execute if entity @p[distance=..5] unless entity @s[scores={A9.StepBack=0..}] run scoreboard players set @s A9.StepBack 60 - -# 後退モード時、プレイヤーが近くにいなければ後退モードをやめる - execute unless entity @p[distance=..10] unless entity @s[scores={A9.StepBack=0..}] run scoreboard players set @s A9.StepBack -1 - -# 後退モード動き用スコアを減らす - execute if entity @s[scores={A9.StepBack=0..}] run scoreboard players remove @s A9.StepBack 1 - -# 後退モードじゃない時、カベにぶつかった際の処理 - execute unless entity @s[scores={A9.StepBack=0..}] unless block ^ ^ ^0.5 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 - execute unless entity @s[scores={A9.StepBack=0..}] at @s unless block ^ ^ ^0.3 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 +# super.tick + function asset:mob/super.tick + +# 後退諸々の処理 + # Tickのデクリメント + execute store result storage asset:context this.MoveBackTick._ int 0.9999999999 run data get storage asset:context this.MoveBackTick._ + # プレイヤーが近くにいれば3秒間後退モードになる + execute if data storage asset:context this{IsMoveBack:false} if entity @p[gamemode=!spectator,distance=..5] run function asset:mob/0369.prominence_spellbook/tick/move_back_mode/start + # 残りtickが0になったとき、後退モードを終了する + execute if data storage asset:context this{MoveBackTick:0,IsMoveBack:true} run function asset:mob/0369.prominence_spellbook/tick/move_back_mode/end + # 後退時、プレイヤーが近くにいなければ後退を終了する + execute if data storage asset:context this{IsMoveBack:true} unless entity @p[gamemode=!spectator,distance=..10] run function asset:mob/0369.prominence_spellbook/tick/move_back_mode/end # スコア scoreboard players add @s General.Mob.Tick 1 diff --git a/Asset/data/asset/functions/mob/0369.prominence_spellbook/tick/move_back_mode/end.mcfunction b/Asset/data/asset/functions/mob/0369.prominence_spellbook/tick/move_back_mode/end.mcfunction new file mode 100644 index 00000000000..927581d90c5 --- /dev/null +++ b/Asset/data/asset/functions/mob/0369.prominence_spellbook/tick/move_back_mode/end.mcfunction @@ -0,0 +1,14 @@ +#> asset:mob/0369.prominence_spellbook/tick/move_back_mode/end +# +# 後退モード終了処理 +# +# @within function asset:mob/0369.prominence_spellbook/tick/ + +# 後退モードをfalseに + data modify storage asset:context this.IsMoveBack set value false + +# 強制終了した場合もあるので0にしておく + data modify storage asset:context this.MoveBackTick._ set value 0 + +# 移動速度を変更 + data modify entity @s Attributes[{Name:"minecraft:generic.movement_speed"}].Base set from storage asset:context this.MoveSpeed.Forward diff --git a/Asset/data/asset/functions/mob/0369.prominence_spellbook/tick/move_back_mode/start.mcfunction b/Asset/data/asset/functions/mob/0369.prominence_spellbook/tick/move_back_mode/start.mcfunction new file mode 100644 index 00000000000..13c4beef16e --- /dev/null +++ b/Asset/data/asset/functions/mob/0369.prominence_spellbook/tick/move_back_mode/start.mcfunction @@ -0,0 +1,15 @@ +#> asset:mob/0369.prominence_spellbook/tick/move_back_mode/start +# +# 後退モード開始処理 +# +# @within function asset:mob/0369.prominence_spellbook/tick/ + +# 後退モードをtrueに + data modify storage asset:context this.IsMoveBack set value true + +# 後退時間を初期化 + data modify storage asset:context this.MoveBackTick._ set from storage asset:context this.MoveBackTick.Max + +# 移動速度を変更 + data modify entity @s Attributes[{Name:"minecraft:generic.movement_speed"}].Base set from storage asset:context this.MoveSpeed.Back + diff --git a/Asset/data/asset/functions/mob/0370.wave_spellbook/register.mcfunction b/Asset/data/asset/functions/mob/0370.wave_spellbook/register.mcfunction index e9cb22bdc5e..d350ec7e0af 100644 --- a/Asset/data/asset/functions/mob/0370.wave_spellbook/register.mcfunction +++ b/Asset/data/asset/functions/mob/0370.wave_spellbook/register.mcfunction @@ -4,9 +4,11 @@ # # @within function asset:mob/alias/370/register -# 継承 (int) (オプション) - # data modify storage asset:mob Extends append value - # function asset:mob/extends +# 継承(オプション) + data modify storage asset:mob Extends append value 2003 + function asset:mob/extends +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value false # 他のモブに継承されることを許可するか (boolean) (オプション) # data modify storage asset:mob ExtendsSafe set value true @@ -47,7 +49,7 @@ # 特殊防御力 (double) (オプション) // 4pointにつきダメージを大きく減らす # data modify storage asset:mob SpecialDefense set value # 移動速度 (double) (オプション) - # data modify storage asset:mob Speed set value + data modify storage asset:mob Speed set value 0.2 # 索敵範囲 (double) (オプション) # data modify storage asset:mob FollowRange set value # ノックバック耐性 (double) (オプション) @@ -67,3 +69,6 @@ # フィールド # ダメージ設定 data modify storage asset:mob Field.Damage set value 28f + +# 追尾性能 + data modify storage asset:mob Field.Rotate set value 800 diff --git a/Asset/data/asset/functions/mob/0370.wave_spellbook/rotate/.mcfunction b/Asset/data/asset/functions/mob/0370.wave_spellbook/rotate/.mcfunction new file mode 100644 index 00000000000..a7af4301d87 --- /dev/null +++ b/Asset/data/asset/functions/mob/0370.wave_spellbook/rotate/.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/0370.wave_spellbook/rotate/ +# +# 継承先などから実行される処理 +# +# @within asset:mob/alias/370/rotate + +# プレイヤーが近くにいなければsuper.rotate + execute unless entity @p[gamemode=!spectator,distance=..6] run function asset:mob/super.method diff --git a/Asset/data/asset/functions/mob/0370.wave_spellbook/tick/.mcfunction b/Asset/data/asset/functions/mob/0370.wave_spellbook/tick/.mcfunction index 0e3e66529e9..e62e99cd2f5 100644 --- a/Asset/data/asset/functions/mob/0370.wave_spellbook/tick/.mcfunction +++ b/Asset/data/asset/functions/mob/0370.wave_spellbook/tick/.mcfunction @@ -7,18 +7,8 @@ # パーティクル particle enchant ~ ~1.68 ~ 0.25 0.25 0.25 0 2 force @a[distance=..40] -# 接地で上を向く - execute unless block ~ ~-0.1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~-35 - execute unless block ~ ~1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~80 - -# 移動 -# プレイヤーが近くにいれば直進、いなければ誘導 - execute if entity @p[gamemode=!spectator,distance=..6] run tp @s ^ ^ ^0.2 - execute unless entity @p[gamemode=!spectator,distance=..6] facing entity @p[gamemode=!spectator] eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-800 facing entity @s eyes positioned as @s run tp @s ^ ^ ^0.2 ~ ~ - -# カベにぶつかった際の処理 - execute unless block ^ ^ ^0.5 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 - execute at @s unless block ^ ^ ^0.2 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 +# super.tick + function asset:mob/super.tick # スコア scoreboard players add @s General.Mob.Tick 1 diff --git a/Asset/data/asset/functions/mob/0371.lightning_spellbook/_index.d.mcfunction b/Asset/data/asset/functions/mob/0371.lightning_spellbook/_index.d.mcfunction index 6dd66d53d92..4ec20567f19 100644 --- a/Asset/data/asset/functions/mob/0371.lightning_spellbook/_index.d.mcfunction +++ b/Asset/data/asset/functions/mob/0371.lightning_spellbook/_index.d.mcfunction @@ -4,3 +4,4 @@ #> tag # @within function asset:mob/0371.lightning_spellbook/** #declare tag 2D.LeftRotate + #declare tag 2D.OnTop diff --git a/Asset/data/asset/functions/mob/0371.lightning_spellbook/register.mcfunction b/Asset/data/asset/functions/mob/0371.lightning_spellbook/register.mcfunction index 7368dd79b4c..d94d8cf5cb0 100644 --- a/Asset/data/asset/functions/mob/0371.lightning_spellbook/register.mcfunction +++ b/Asset/data/asset/functions/mob/0371.lightning_spellbook/register.mcfunction @@ -4,9 +4,11 @@ # # @within function asset:mob/alias/371/register -# 継承 (int) (オプション) - # data modify storage asset:mob Extends append value - # function asset:mob/extends +# 継承(オプション) + data modify storage asset:mob Extends append value 2003 + function asset:mob/extends +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value false # 他のモブに継承されることを許可するか (boolean) (オプション) # data modify storage asset:mob ExtendsSafe set value true @@ -47,7 +49,7 @@ # 特殊防御力 (double) (オプション) // 4pointにつきダメージを大きく減らす # data modify storage asset:mob SpecialDefense set value # 移動速度 (double) (オプション) - # data modify storage asset:mob Speed set value + data modify storage asset:mob Speed set value 0.2 # 索敵範囲 (double) (オプション) # data modify storage asset:mob FollowRange set value # ノックバック耐性 (double) (オプション) @@ -67,3 +69,6 @@ # フィールド # ダメージ設定 data modify storage asset:mob Field.Damage set value 28 + +# 追尾性能 + data modify storage asset:mob Field.Rotate set value 800 diff --git a/Asset/data/asset/functions/mob/0371.lightning_spellbook/rotate/.mcfunction b/Asset/data/asset/functions/mob/0371.lightning_spellbook/rotate/.mcfunction new file mode 100644 index 00000000000..0519bf3e915 --- /dev/null +++ b/Asset/data/asset/functions/mob/0371.lightning_spellbook/rotate/.mcfunction @@ -0,0 +1,12 @@ +#> asset:mob/0371.lightning_spellbook/rotate/ +# +# 継承先などから実行される処理 +# +# @within asset:mob/alias/371/rotate + +# プレイヤーが下にいなければsuper.rotate + execute if entity @s[tag=!2D.OnTop] run function asset:mob/super.method + +# プレイヤーが下にいれば旋回する + execute if entity @s[tag= 2D.OnTop] at @s if entity @s[tag=2D.LeftRotate] run tp @s ^ ^ ^ ~-12 0 + execute if entity @s[tag= 2D.OnTop] at @s if entity @s[tag=!2D.LeftRotate] run tp @s ^ ^ ^ ~12 0 diff --git a/Asset/data/asset/functions/mob/0371.lightning_spellbook/tick/.mcfunction b/Asset/data/asset/functions/mob/0371.lightning_spellbook/tick/.mcfunction index 78f62d2cddc..00ac13c31fb 100644 --- a/Asset/data/asset/functions/mob/0371.lightning_spellbook/tick/.mcfunction +++ b/Asset/data/asset/functions/mob/0371.lightning_spellbook/tick/.mcfunction @@ -4,10 +4,6 @@ # # @within function asset:mob/alias/371/tick -#> Private -# @private - #declare tag OnTop - # パーティクル particle enchant ~ ~1.68 ~ 0.25 0.25 0.25 0 2 force @a[distance=..40] @@ -19,32 +15,17 @@ # ここより下は移動処理 -# 接地で上を向く - execute unless block ~ ~-0.1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~-35 - execute unless block ~ ~1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~80 - # 下にプレイヤーがいるか判定 - execute positioned ~-1.5 ~ ~-1.5 if entity @p[dx=2,dy=-2.5,dz=2] at @s run tag @s add OnTop + execute positioned ~-1.5 ~ ~-1.5 if entity @p[gamemode=!spectator,dx=2,dy=-2.5,dz=2] at @s run tag @s add 2D.OnTop -# プレイヤーが下にいなければ移動 - execute if entity @s[tag=!OnTop] at @s facing entity @p eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-800 facing entity @s eyes positioned as @s run tp @s ^ ^ ^0.2 ~ ~ +# super.tick + function asset:mob/super.tick -# プレイヤーが下にいれば旋回する - execute if entity @s[tag=OnTop] at @s if entity @s[tag=2D.LeftRotate] run tp @s ^ ^ ^0.2 ~-12 0 - execute if entity @s[tag=OnTop] at @s if entity @s[tag=!2D.LeftRotate] run tp @s ^ ^ ^0.2 ~12 0 +# プレイヤーが近くにいる場合、真上を向いてmoveする + execute if entity @p[gamemode=!spectator,distance=..4] rotated ~ -90 run function asset:mob/call.m {method:"move"} # デバッグ用 - #say @s[tag=OnTop] + #say @s[tag=2D.OnTop] # 判定Tagを削除 - tag @s[tag=OnTop] remove OnTop - -# プレイヤーが近くにいたら上に移動 - execute at @s if entity @p[distance=..4] if block ~ ~2.2 ~ #lib:no_collision run tp @s ~ ~0.2 ~ - -# 不定期に急加速 - execute if predicate lib:random_pass_per/1 at @s run tp @s ^ ^ ^0.5 - -# カベにぶつかった際の処理 - execute unless block ^ ^ ^0.5 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 - execute at @s unless block ^ ^ ^0.2 #lib:no_collision at @s run tp @s ~ ~ ~ ~45 ~-45 + tag @s[tag=2D.OnTop] remove 2D.OnTop diff --git a/Asset/data/asset/functions/mob/2003.abstract_eye/move/.mcfunction b/Asset/data/asset/functions/mob/2003.abstract_eye/move/.mcfunction new file mode 100644 index 00000000000..89e09693df6 --- /dev/null +++ b/Asset/data/asset/functions/mob/2003.abstract_eye/move/.mcfunction @@ -0,0 +1,10 @@ +#> asset:mob/2003.abstract_eye/move/ +# +# 継承先などから実行される処理 +# +# @within asset:mob/alias/2003/move + +# 壁貫通のないように移動 + data modify storage lib: Argument.SlideMove.Speed set from storage asset:context this.Speed + data modify storage lib: Argument.SlideMove.Conditions set value "anchored eyes unless block ^ ^ ^ #lib:no_collision/" + function lib:slide_move/ diff --git a/Asset/data/asset/functions/mob/2003.abstract_eye/reflect/.mcfunction b/Asset/data/asset/functions/mob/2003.abstract_eye/reflect/.mcfunction new file mode 100644 index 00000000000..5426683d674 --- /dev/null +++ b/Asset/data/asset/functions/mob/2003.abstract_eye/reflect/.mcfunction @@ -0,0 +1,17 @@ +#> asset:mob/2003.abstract_eye/reflect/ +# +# 継承先などから実行される処理 +# +# @within asset:mob/alias/2003/reflect + +# 正面のブロックにぶつかった際の処理 + execute store result storage asset:temp 2003.Speed float 0.005 run data get storage asset:context this.Speed 100 + execute anchored eyes positioned ^ ^ ^ run function asset:mob/2003.abstract_eye/reflect/forward_block.m with storage asset:temp 2003 + execute if data storage asset:temp 2003{Check:true} run tp @s ~ ~ ~ ~45 ~-45 + data remove storage asset:temp 2003 + +# 下がブロックなら上を向く + execute at @s unless block ~ ~1 ~ #lib:no_collision/ run tp @s ~ ~ ~ ~ ~-35 + +# 上がブロックなら下を向く + execute at @s unless block ~ ~2.5 ~ #lib:no_collision/ run tp @s ~ ~ ~ ~ ~80 diff --git a/Asset/data/asset/functions/mob/2003.abstract_eye/reflect/forward_block.m.mcfunction b/Asset/data/asset/functions/mob/2003.abstract_eye/reflect/forward_block.m.mcfunction new file mode 100644 index 00000000000..75c1328e044 --- /dev/null +++ b/Asset/data/asset/functions/mob/2003.abstract_eye/reflect/forward_block.m.mcfunction @@ -0,0 +1,10 @@ +#> asset:mob/2003.abstract_eye/reflect/forward_block.m +# +# +# +# @within function asset:mob/2003.abstract_eye/reflect/ + +# 視線先でのxyzの各ベクトルにおいてブロックがないかチェックする + $execute at @s positioned 0.0 0.0 0.0 positioned ^ ^ ^-1 positioned ~ 0.0 0.0 positioned ^ ^ ^0.5 facing 0.0 0.0 0.0 positioned as @s positioned ^ ^ ^$(Speed) rotated as @s positioned ^ ^ ^$(Speed) anchored eyes unless block ^ ^ ^ #lib:no_collision/ run return run data modify storage asset:temp 2003.Check set value true + $execute at @s rotated ~180 ~ positioned ^ ^ ^$(Speed) rotated ~-180 ~ positioned ^ ^ ^$(Speed) anchored eyes unless block ^ ^ ^ #lib:no_collision/ run return run data modify storage asset:temp 2003.Check set value true + $execute at @s positioned 0.0 0.0 0.0 positioned ^ ^ ^-1 positioned 0.0 0.0 ~ positioned ^ ^ ^0.5 facing 0.0 0.0 0.0 positioned as @s positioned ^ ^ ^$(Speed) rotated as @s positioned ^ ^ ^$(Speed) anchored eyes unless block ^ ^ ^ #lib:no_collision/ run return run data modify storage asset:temp 2003.Check set value true diff --git a/Asset/data/asset/functions/mob/2003.abstract_eye/register.mcfunction b/Asset/data/asset/functions/mob/2003.abstract_eye/register.mcfunction new file mode 100644 index 00000000000..2383f7183c3 --- /dev/null +++ b/Asset/data/asset/functions/mob/2003.abstract_eye/register.mcfunction @@ -0,0 +1,17 @@ +#> asset:mob/2003.abstract_eye/register +# +# Mobのデータを指定 +# +# @within function asset:mob/alias/2003/register + +# 継承 (int) (オプション) + data modify storage asset:mob Extends append value 2004 + function asset:mob/extends +# 他のモブに継承されることを許可するか (boolean) (オプション) + data modify storage asset:mob ExtendsSafe set value true +# 継承されることを前提とした、抽象的なモブであるかどうか(boolean) + data modify storage asset:mob IsAbstract set value true +# ID (int) + data modify storage asset:mob ID set value 2003 +# フィールド + # data modify storage asset:mob Field.myValue set value diff --git a/Asset/data/asset/functions/mob/2003.abstract_eye/rotate/.mcfunction b/Asset/data/asset/functions/mob/2003.abstract_eye/rotate/.mcfunction new file mode 100644 index 00000000000..11b57368336 --- /dev/null +++ b/Asset/data/asset/functions/mob/2003.abstract_eye/rotate/.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/2003.abstract_eye/rotate/ +# +# 継承先などから実行される処理 +# +# @within asset:mob/alias/2003/rotate + +# 回転 + function asset:mob/2003.abstract_eye/rotate/m with storage asset:context this diff --git a/Asset/data/asset/functions/mob/2003.abstract_eye/rotate/m.mcfunction b/Asset/data/asset/functions/mob/2003.abstract_eye/rotate/m.mcfunction new file mode 100644 index 00000000000..85e961a3d6a --- /dev/null +++ b/Asset/data/asset/functions/mob/2003.abstract_eye/rotate/m.mcfunction @@ -0,0 +1,7 @@ +#> asset:mob/2003.abstract_eye/rotate/m +# +# +# +# @within function asset:mob/2003.abstract_eye/rotate/ + + $execute facing entity @p[gamemode=!spectator,distance=..64] feet positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-$(Rotate) facing entity @s feet positioned as @s run tp @s ~ ~ ~ ~ ~ diff --git a/Asset/data/asset/functions/mob/2003.abstract_eye/tick/.mcfunction b/Asset/data/asset/functions/mob/2003.abstract_eye/tick/.mcfunction new file mode 100644 index 00000000000..07327e0e408 --- /dev/null +++ b/Asset/data/asset/functions/mob/2003.abstract_eye/tick/.mcfunction @@ -0,0 +1,16 @@ +#> asset:mob/2003.abstract_eye/tick/ +# +# Mobのtick時の処理 +# +# @within asset:mob/alias/2003/tick + +# 移動速度を取得 + function asset:mob/call.m {method:"get_speed"} + +# デフォルトではrelfect、rotateとmoveを実行する + execute at @s run function asset:mob/call.m {method:"rotate"} + execute at @s run function asset:mob/call.m {method:"reflect"} + execute at @s run function asset:mob/call.m {method:"move"} + +# 完全に重なるのを対策するために低確率で追加でmoveする + execute if predicate lib:random_pass_per/1 at @s run function asset:mob/call.m {method:"move"} diff --git a/Asset/data/asset/functions/mob/alias/2003/move.mcfunction b/Asset/data/asset/functions/mob/alias/2003/move.mcfunction new file mode 100644 index 00000000000..6af88ef87bd --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/2003/move.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/2003/move +# +# メソッド処理のエイリアス +# +# @within asset_manager:mob/triggers/call_method/run_method.m + +# 本来の処理を呼び出す + function asset:mob/2003.abstract_eye/move/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/2003/reflect.mcfunction b/Asset/data/asset/functions/mob/alias/2003/reflect.mcfunction new file mode 100644 index 00000000000..8d67ff931c1 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/2003/reflect.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/2003/reflect +# +# メソッド処理のエイリアス +# +# @within asset_manager:mob/triggers/call_method/run_method.m + +# 本来の処理を呼び出す + function asset:mob/2003.abstract_eye/reflect/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/2003/register.mcfunction b/Asset/data/asset/functions/mob/alias/2003/register.mcfunction new file mode 100644 index 00000000000..c7a72a0f249 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/2003/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/2003/register +# +# Mobのデータ指定処理のエイリアス +# +# @within asset_manager:mob/triggers/summon/register.m + +# 元の登録処理を呼び出す + function asset:mob/2003.abstract_eye/register \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/2003/rotate.mcfunction b/Asset/data/asset/functions/mob/alias/2003/rotate.mcfunction new file mode 100644 index 00000000000..c09d63f0d26 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/2003/rotate.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/2003/rotate +# +# メソッド処理のエイリアス +# +# @within asset_manager:mob/triggers/call_method/run_method.m + +# 本来の処理を呼び出す + function asset:mob/2003.abstract_eye/rotate/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/2003/tick.mcfunction b/Asset/data/asset/functions/mob/alias/2003/tick.mcfunction new file mode 100644 index 00000000000..8980d6bcd18 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/2003/tick.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/2003/tick +# +# Tick時処理のエイリアス +# +# @within asset_manager:mob/triggers/tick/tick.m + +# 元のTick処理を呼び出す + function asset:mob/2003.abstract_eye/tick/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/21/move.mcfunction b/Asset/data/asset/functions/mob/alias/21/move.mcfunction new file mode 100644 index 00000000000..575a3be62f8 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/21/move.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/21/move +# +# メソッド処理のエイリアス +# +# @within asset_manager:mob/triggers/call_method/run_method.m + +# 本来の処理を呼び出す + function asset:mob/0021.demon_eye/move/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/261/get_speed.mcfunction b/Asset/data/asset/functions/mob/alias/261/get_speed.mcfunction new file mode 100644 index 00000000000..cdce9e2a54f --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/261/get_speed.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/261/get_speed +# +# メソッド処理のエイリアス +# +# @within asset_manager:mob/triggers/call_method/run_method.m + +# 本来の処理を呼び出す + function asset:mob/0261.laser_eye_mk2/get_speed/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/261/move.mcfunction b/Asset/data/asset/functions/mob/alias/261/move.mcfunction new file mode 100644 index 00000000000..9bcb69741c4 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/261/move.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/261/move +# +# メソッド処理のエイリアス +# +# @within asset_manager:mob/triggers/call_method/run_method.m + +# 本来の処理を呼び出す + function asset:mob/0261.laser_eye_mk2/move/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/265/rotate.mcfunction b/Asset/data/asset/functions/mob/alias/265/rotate.mcfunction new file mode 100644 index 00000000000..05282058bb7 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/265/rotate.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/265/rotate +# +# メソッド処理のエイリアス +# +# @within asset_manager:mob/triggers/call_method/run_method.m + +# 本来の処理を呼び出す + function asset:mob/0265.dark_familiar/rotate/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/321/move.mcfunction b/Asset/data/asset/functions/mob/alias/321/move.mcfunction new file mode 100644 index 00000000000..44d630b3eb6 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/321/move.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/321/move +# +# メソッド処理のエイリアス +# +# @within asset_manager:mob/triggers/call_method/run_method.m + +# 本来の処理を呼び出す + function asset:mob/0321.mini_guardian/move/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/321/rotate.mcfunction b/Asset/data/asset/functions/mob/alias/321/rotate.mcfunction new file mode 100644 index 00000000000..7d59942ab72 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/321/rotate.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/321/rotate +# +# メソッド処理のエイリアス +# +# @within asset_manager:mob/triggers/call_method/run_method.m + +# 本来の処理を呼び出す + function asset:mob/0321.mini_guardian/rotate/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/369/get_speed.mcfunction b/Asset/data/asset/functions/mob/alias/369/get_speed.mcfunction new file mode 100644 index 00000000000..a10d05f90da --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/369/get_speed.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/369/get_speed +# +# メソッド処理のエイリアス +# +# @within asset_manager:mob/triggers/call_method/run_method.m + +# 本来の処理を呼び出す + function asset:mob/0369.prominence_spellbook/get_speed/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/369/reflect.mcfunction b/Asset/data/asset/functions/mob/alias/369/reflect.mcfunction new file mode 100644 index 00000000000..8b8b0243de4 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/369/reflect.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/369/reflect +# +# メソッド処理のエイリアス +# +# @within asset_manager:mob/triggers/call_method/run_method.m + +# 本来の処理を呼び出す + function asset:mob/0369.prominence_spellbook/reflect/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/370/rotate.mcfunction b/Asset/data/asset/functions/mob/alias/370/rotate.mcfunction new file mode 100644 index 00000000000..046661f1146 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/370/rotate.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/370/rotate +# +# メソッド処理のエイリアス +# +# @within asset_manager:mob/triggers/call_method/run_method.m + +# 本来の処理を呼び出す + function asset:mob/0370.wave_spellbook/rotate/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/371/rotate.mcfunction b/Asset/data/asset/functions/mob/alias/371/rotate.mcfunction new file mode 100644 index 00000000000..a2a152fac05 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/371/rotate.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/371/rotate +# +# メソッド処理のエイリアス +# +# @within asset_manager:mob/triggers/call_method/run_method.m + +# 本来の処理を呼び出す + function asset:mob/0371.lightning_spellbook/rotate/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/38/get_speed.mcfunction b/Asset/data/asset/functions/mob/alias/38/get_speed.mcfunction new file mode 100644 index 00000000000..0bd15987bef --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/38/get_speed.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/38/get_speed +# +# メソッド処理のエイリアス +# +# @within asset_manager:mob/triggers/call_method/run_method.m + +# 本来の処理を呼び出す + function asset:mob/0038.laser_eye/get_speed/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/38/move.mcfunction b/Asset/data/asset/functions/mob/alias/38/move.mcfunction new file mode 100644 index 00000000000..8c326e8e4e0 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/38/move.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/38/move +# +# メソッド処理のエイリアス +# +# @within asset_manager:mob/triggers/call_method/run_method.m + +# 本来の処理を呼び出す + function asset:mob/0038.laser_eye/move/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/38/reflect.mcfunction b/Asset/data/asset/functions/mob/alias/38/reflect.mcfunction new file mode 100644 index 00000000000..17e6861ab08 --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/38/reflect.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/38/reflect +# +# メソッド処理のエイリアス +# +# @within asset_manager:mob/triggers/call_method/run_method.m + +# 本来の処理を呼び出す + function asset:mob/0038.laser_eye/reflect/ \ No newline at end of file diff --git a/Asset/data/asset/functions/mob/alias/38/rotate.mcfunction b/Asset/data/asset/functions/mob/alias/38/rotate.mcfunction new file mode 100644 index 00000000000..fc2b49b9cce --- /dev/null +++ b/Asset/data/asset/functions/mob/alias/38/rotate.mcfunction @@ -0,0 +1,8 @@ +#> asset:mob/alias/38/rotate +# +# メソッド処理のエイリアス +# +# @within asset_manager:mob/triggers/call_method/run_method.m + +# 本来の処理を呼び出す + function asset:mob/0038.laser_eye/rotate/ \ No newline at end of file diff --git a/Asset/data/asset/tags/functions/mob/load.json b/Asset/data/asset/tags/functions/mob/load.json index 3c05053eb53..1984236d51c 100644 --- a/Asset/data/asset/tags/functions/mob/load.json +++ b/Asset/data/asset/tags/functions/mob/load.json @@ -21,7 +21,6 @@ "asset:mob/0380.haruclaire_v3/load", "asset:mob/0376.convict_v2/load", "asset:mob/0378.red_knight_v3/load", - "asset:mob/0369.prominence_spellbook/load", "asset:mob/0321.mini_guardian/load", "asset:mob/0311.blazing_inferno/load", "asset:mob/0059.jack_o_lantern/load",