From bf4e9ce2959e2e11cd81f37365924dea525763a6 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 9 Mar 2025 09:15:02 +0900 Subject: [PATCH 01/19] =?UTF-8?q?[Object=201045]=20=E9=AD=94=E5=BC=BE?= =?UTF-8?q?=E3=81=AE=E9=AD=94=E6=B3=95=E9=99=A3=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../register.mcfunction | 21 +++++++++++++++++++ .../summon/.mcfunction | 11 ++++++++++ .../summon/debug.mcfunction | 10 +++++++++ .../summon/m.mcfunction | 7 +++++++ .../1045.magic_bullet_square/tick/.mcfunction | 20 ++++++++++++++++++ .../tick/display.mcfunction | 14 +++++++++++++ .../object/alias/1045/register.mcfunction | 8 +++++++ .../object/alias/1045/summon.mcfunction | 8 +++++++ .../object/alias/1045/tick.mcfunction | 8 +++++++ 9 files changed, 107 insertions(+) create mode 100644 Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction create mode 100644 Asset/data/asset/functions/object/1045.magic_bullet_square/summon/.mcfunction create mode 100644 Asset/data/asset/functions/object/1045.magic_bullet_square/summon/debug.mcfunction create mode 100644 Asset/data/asset/functions/object/1045.magic_bullet_square/summon/m.mcfunction create mode 100644 Asset/data/asset/functions/object/1045.magic_bullet_square/tick/.mcfunction create mode 100644 Asset/data/asset/functions/object/1045.magic_bullet_square/tick/display.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1045/register.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1045/summon.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1045/tick.mcfunction diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction new file mode 100644 index 0000000000..88ad00c54a --- /dev/null +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction @@ -0,0 +1,21 @@ +#> asset:object/1045.magic_bullet_square/register +# +# Objectのデータを指定 +# +# @within function asset:object/alias/1045/register + +# 継承(オプション) + # data modify storage asset:object Extends append value + # function asset:object/extends +# 他のObjectに継承されることを許可するか (boolean) (オプション) + # data modify storage asset:object ExtendsSafe set value +# 継承されることを前提とした、抽象的なObjectであるかどうか(boolean) + data modify storage asset:object IsAbstract set value false +# Tickするかどうか(boolean) (オプション) + # data modify storage asset:object IsTicking set value + +# ID (int) + data modify storage asset:object ID set value 1045 +# フィールド(オプション) + data modify storage asset:object Field.Scale set value [1d,1d,0.01d] + data modify storage asset:object Field.DisplayDelay set value 20 diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/summon/.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/summon/.mcfunction new file mode 100644 index 0000000000..7f8e73df5a --- /dev/null +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/summon/.mcfunction @@ -0,0 +1,11 @@ +#> asset:object/1045.magic_bullet_square/summon/ +# +# Object召喚処理の呼び出し時に実行されるfunction +# +# @within asset:object/alias/1045/summon + +# 召喚 + execute as 0-0-0-0-0 in minecraft:overworld positioned as @s run tp @s ~ ~ ~ ~ ~ + data modify storage asset:temp Args.Rotation set from entity 0-0-0-0-0 Rotation + function asset:object/1045.magic_bullet_square/summon/m with storage asset:temp Args + data remove storage asset:temp Args diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/summon/debug.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/summon/debug.mcfunction new file mode 100644 index 0000000000..7a5ac6fc61 --- /dev/null +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/summon/debug.mcfunction @@ -0,0 +1,10 @@ +#> asset:object/1045.magic_bullet_square/summon/debug +# +# 動作チェック用の召喚処理 使い終わったら消してもいいかも +# +# @user +# @private + +# 召喚 + data modify storage api: Argument.ID set value 1045 + function api:object/summon \ No newline at end of file diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/summon/m.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/summon/m.mcfunction new file mode 100644 index 0000000000..775b7b3176 --- /dev/null +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/summon/m.mcfunction @@ -0,0 +1,7 @@ +#> asset:object/1045.magic_bullet_square/summon/m +# +# @input args: +# Rotation : float @ 2 +# @within function asset:object/1045.magic_bullet_square/summon/ + +$summon item_display ~ ~ ~ {Rotation:$(Rotation),Tags:["ObjectInit"],brightness:{sky:15,block:15},interpolation_duration:2,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0f,0f,0f]},item:{id:"minecraft:stick",Count:1b,tag:{CustomModelData:20351}}} diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/.mcfunction new file mode 100644 index 0000000000..9801b0e8be --- /dev/null +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/.mcfunction @@ -0,0 +1,20 @@ +#> asset:object/1045.magic_bullet_square/tick/ +# +# Objectのtick時の処理 +# +# @within asset:object/alias/1045/tick + +# Tick加算 + scoreboard players add @s General.Object.Tick 1 + +# 魔法陣表示までの遅延 + execute unless data storage asset:context this{DisplayDelay:-1} store result storage asset:context this.DisplayDelay int 0.9999999999 run data get storage asset:context this.DisplayDelay + execute if data storage asset:context this{DisplayDelay:0} run function asset:object/1045.magic_bullet_square/tick/display + +# 魔法陣を見えなくする + execute if entity @s[scores={General.Object.Tick=35}] run data modify entity @s start_interpolation set value 0 + execute if entity @s[scores={General.Object.Tick=35}] run data modify entity @s interpolation_duration set value 5 + execute if entity @s[scores={General.Object.Tick=35}] run data modify entity @s transformation.scale set value [0d,0d,0.01d] + +# 消滅処理 + kill @s[scores={General.Object.Tick=40..}] diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/display.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/display.mcfunction new file mode 100644 index 0000000000..101f4cbe67 --- /dev/null +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/display.mcfunction @@ -0,0 +1,14 @@ +#> asset:object/1045.magic_bullet_square/tick/display +# +# 魔法陣を表示する際の処理 +# +# @within function asset:object/1045.magic_bullet_square/tick/ + +# start_interpolation + data modify entity @s start_interpolation set value 0 + +# transformation.scale + data modify entity @s transformation.scale set from storage asset:context this.Scale + +# DisplayDelayを-1にして何度も表示されないようにする + data modify storage asset:context this.DisplayDelay set value -1 diff --git a/Asset/data/asset/functions/object/alias/1045/register.mcfunction b/Asset/data/asset/functions/object/alias/1045/register.mcfunction new file mode 100644 index 0000000000..20fa347342 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1045/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1045/register +# +# Objectのデータ指定処理のエイリアス +# +# @within asset_manager:object/summon/register.m + +# 元の登録処理を呼び出す + function asset:object/1045.magic_bullet_square/register \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1045/summon.mcfunction b/Asset/data/asset/functions/object/alias/1045/summon.mcfunction new file mode 100644 index 0000000000..811ee27747 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1045/summon.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1045/summon +# +# Object召喚処理のエイリアス +# +# @within asset_manager:object/summon/summon.m + +# 元の召喚処理を呼び出す + function asset:object/1045.magic_bullet_square/summon/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1045/tick.mcfunction b/Asset/data/asset/functions/object/alias/1045/tick.mcfunction new file mode 100644 index 0000000000..74d146a765 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1045/tick.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1045/tick +# +# Tick時処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のTick処理を呼び出す + function asset:object/1045.magic_bullet_square/tick/ \ No newline at end of file From 07a2db88a1a48148dc0460685ea55e4658522ef1 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 9 Mar 2025 10:13:58 +0900 Subject: [PATCH 02/19] =?UTF-8?q?[Object=201046]=20=E9=AD=94=E5=BC=BE?= =?UTF-8?q?=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../1046.magic_bullet/_index.d.mcfunction | 6 +++ .../detect_hit_entity/.mcfunction | 8 ++++ .../1046.magic_bullet/hit_entity/.mcfunction | 42 +++++++++++++++++++ .../hit_entity/check_target/.mcfunction | 15 +++++++ .../hit_entity/check_target/m.mcfunction | 13 ++++++ .../hit_entity/self_damage.mcfunction | 14 +++++++ .../1046.magic_bullet/recursive/.mcfunction | 11 +++++ .../1046.magic_bullet/register.mcfunction | 25 +++++++++++ .../1046.magic_bullet/summon/.mcfunction | 11 +++++ .../1046.magic_bullet/summon/debug.mcfunction | 10 +++++ .../1046.magic_bullet/summon/m.mcfunction | 8 ++++ .../object/1046.magic_bullet/tick/.mcfunction | 18 ++++++++ .../1046.magic_bullet/tick/vfx.mcfunction | 25 +++++++++++ .../alias/1046/detect_hit_entity.mcfunction | 8 ++++ .../object/alias/1046/hit_entity.mcfunction | 8 ++++ .../object/alias/1046/recursive.mcfunction | 8 ++++ .../object/alias/1046/register.mcfunction | 8 ++++ .../object/alias/1046/summon.mcfunction | 8 ++++ .../object/alias/1046/tick.mcfunction | 8 ++++ .../asset/tags/functions/object/load.json | 2 +- 20 files changed, 255 insertions(+), 1 deletion(-) create mode 100644 Asset/data/asset/functions/object/1046.magic_bullet/_index.d.mcfunction create mode 100644 Asset/data/asset/functions/object/1046.magic_bullet/detect_hit_entity/.mcfunction create mode 100644 Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/.mcfunction create mode 100644 Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/check_target/.mcfunction create mode 100644 Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/check_target/m.mcfunction create mode 100644 Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/self_damage.mcfunction create mode 100644 Asset/data/asset/functions/object/1046.magic_bullet/recursive/.mcfunction create mode 100644 Asset/data/asset/functions/object/1046.magic_bullet/register.mcfunction create mode 100644 Asset/data/asset/functions/object/1046.magic_bullet/summon/.mcfunction create mode 100644 Asset/data/asset/functions/object/1046.magic_bullet/summon/debug.mcfunction create mode 100644 Asset/data/asset/functions/object/1046.magic_bullet/summon/m.mcfunction create mode 100644 Asset/data/asset/functions/object/1046.magic_bullet/tick/.mcfunction create mode 100644 Asset/data/asset/functions/object/1046.magic_bullet/tick/vfx.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1046/detect_hit_entity.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1046/hit_entity.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1046/recursive.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1046/register.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1046/summon.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1046/tick.mcfunction diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/_index.d.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/_index.d.mcfunction new file mode 100644 index 0000000000..715ad6e252 --- /dev/null +++ b/Asset/data/asset/functions/object/1046.magic_bullet/_index.d.mcfunction @@ -0,0 +1,6 @@ +#> asset:object/1046.magic_bullet/_index.d +# @private + +#> tag +# @within function asset:object/1046.magic_bullet/** + #declare tag 1046.TargetEntity diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/detect_hit_entity/.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/detect_hit_entity/.mcfunction new file mode 100644 index 0000000000..d4d654291e --- /dev/null +++ b/Asset/data/asset/functions/object/1046.magic_bullet/detect_hit_entity/.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/1046.magic_bullet/detect_hit_entity/ +# +# 継承先などから実行される処理 +# +# @within asset:object/alias/1046/detect_hit_entity + +# 判定 + execute if entity @s positioned ~-0.5 ~-0.5 ~-0.5 if entity @e[type=#lib:living,tag=Enemy,tag=!Uninterferable,dx=0] run data modify storage asset:context IsHitEntity set value true diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/.mcfunction new file mode 100644 index 0000000000..182b2adf2b --- /dev/null +++ b/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/.mcfunction @@ -0,0 +1,42 @@ +#> asset:object/1046.magic_bullet/hit_entity/ +# +# 継承先などから実行される処理 +# +# @within asset:object/alias/1046/hit_entity + +#> Private +# @private + #declare tag Owner + #declare score_holder $UserID + +# 使用者特定 + execute store result score $UserID Temporary run data get storage asset:context this.UserID + execute as @a if score @s UserID = $UserID Temporary run tag @s add Owner + +# 多重ヒット防止判定 +# 敵味方関係なくチェックする + execute positioned ~-0.5 ~-0.5 ~-0.5 as @e[type=#lib:living,tag=!Owner,tag=!Uninterferable,dx=0] run function asset:object/1046.magic_bullet/hit_entity/check_target/ + +# プレイヤー以外に対するダメージ + data modify storage api: Argument.Damage set from storage asset:context this.Damage.ToNonPlayer + data modify storage api: Argument.AttackType set value "Magic" + data modify storage api: Argument.ElementType set value "Fire" + execute as @p[tag=Owner] run function api:damage/modifier + execute positioned ~-0.5 ~-0.5 ~-0.5 as @e[type=#lib:living,type=!player,tag=1046.TargetEntity,dx=0] run function api:damage/ + function api:damage/reset + +# プレイヤーに対するダメージ + data modify storage api: Argument.Damage set from storage asset:context this.Damage.ToPlayer + data modify storage api: Argument.AttackType set value "Magic" + data modify storage api: Argument.ElementType set value "Fire" + execute as @p[tag=Owner] run function api:damage/modifier + execute positioned ~-0.5 ~-0.5 ~-0.5 as @e[type=#lib:living,type=player,tag=1046.TargetEntity,dx=0] run function api:damage/ + function api:damage/reset + +# プレイヤーを狙った弾かつOwnerが近くにいればOwnerにダメージ + execute if data storage asset:context this{AimToPlayer:true} positioned ~-0.5 ~-0.5 ~-0.5 as @p[tag=Owner] run function asset:object/1046.magic_bullet/hit_entity/self_damage + +# リセット + tag @p[tag=Owner] remove Owner + tag @e[type=#lib:living,tag=1046.TargetEntity,tag=!Uninterferable,distance=..5] remove 1046.TargetEntity + scoreboard players reset $UserID Temporary diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/check_target/.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/check_target/.mcfunction new file mode 100644 index 0000000000..31a177e395 --- /dev/null +++ b/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/check_target/.mcfunction @@ -0,0 +1,15 @@ +#> asset:object/1046.magic_bullet/hit_entity/check_target/ +# +# +# +# @within function asset:object/1046.magic_bullet/hit_entity/ + +# IDをstorageへ突っ込む + execute if entity @s[type=player] store result storage asset:temp Args.ID int 1 run scoreboard players get @s UserID + execute if entity @s[type=!player] store result storage asset:temp Args.ID int 1 run scoreboard players get @s MobUUID + +# マクロで比較する + function asset:object/1046.magic_bullet/hit_entity/check_target/m with storage asset:temp Args + +# リセット + data remove storage asset:temp Args diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/check_target/m.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/check_target/m.mcfunction new file mode 100644 index 0000000000..2ac2008b7e --- /dev/null +++ b/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/check_target/m.mcfunction @@ -0,0 +1,13 @@ +#> asset:object/1046.magic_bullet/hit_entity/check_target/m +# +# @input args: +# ID : int +# @within function asset:object/1046.magic_bullet/hit_entity/check_target/ + +# 自身のIDがなければ自身にTargetTagを付与 + $execute if entity @s[type=player] unless data storage asset:context this.HitList.Player.$(ID) run tag @s add 1046.TargetEntity + $execute if entity @s[type=!player] unless data storage asset:context this.HitList.NonPlayer.$(ID) run tag @s add 1046.TargetEntity + +# データがなければ追加しておく + $execute if entity @s[type=player] unless data storage asset:context this.HitList.Player.$(ID) run data modify storage asset:context this.HitList.Player.$(ID) set value 0b + $execute if entity @s[type=!player] unless data storage asset:context this.HitList.NonPlayer.$(ID) run data modify storage asset:context this.HitList.NonPlayer.$(ID) set value 0b diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/self_damage.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/self_damage.mcfunction new file mode 100644 index 0000000000..62230c1236 --- /dev/null +++ b/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/self_damage.mcfunction @@ -0,0 +1,14 @@ +#> asset:object/1046.magic_bullet/hit_entity/self_damage +# +# 7発目の弾丸 +# +# @input as Player +# @within function asset:object/1046.magic_bullet/hit_entity/ + +# 自身を貫くダメージ + data modify storage api: Argument.Damage set from storage asset:context this.Damage.Self + data modify storage api: Argument.AttackType set value "Magic" + data modify storage api: Argument.ElementType set value "Fire" + function api:damage/modifier + function api:damage/ + function api:damage/reset diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/recursive/.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/recursive/.mcfunction new file mode 100644 index 0000000000..679d9deaa5 --- /dev/null +++ b/Asset/data/asset/functions/object/1046.magic_bullet/recursive/.mcfunction @@ -0,0 +1,11 @@ +#> asset:object/1046.magic_bullet/recursive/ +# +# 継承先などから実行される処理 +# +# @within asset:object/alias/1046/recursive + +# 演出 + execute at @s run particle dust 0.2 0.2 1 1.3 ^ ^ ^ 0 0 0 0 1 force @a + execute at @s run particle dust 0.2 0.2 1 1.3 ^ ^ ^0.125 0 0 0 0 1 force @a + execute at @s run particle dust 0.2 0.2 1 1.3 ^ ^ ^0.250 0 0 0 0 1 force @a + execute at @s run particle dust 0.2 0.2 1 1.3 ^ ^ ^0.375 0 0 0 0 1 force @a diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/register.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/register.mcfunction new file mode 100644 index 0000000000..253c75d53e --- /dev/null +++ b/Asset/data/asset/functions/object/1046.magic_bullet/register.mcfunction @@ -0,0 +1,25 @@ +#> asset:object/1046.magic_bullet/register +# +# Objectのデータを指定 +# +# @within function asset:object/alias/1046/register + +# 継承(オプション) + data modify storage asset:object Extends append value 1 + function asset:object/extends +# 他のObjectに継承されることを許可するか (boolean) (オプション) + # data modify storage asset:object ExtendsSafe set value +# 継承されることを前提とした、抽象的なObjectであるかどうか(boolean) + data modify storage asset:object IsAbstract set value false +# Tickするかどうか(boolean) (オプション) + # data modify storage asset:object IsTicking set value + +# ID (int) + data modify storage asset:object ID set value 1046 +# フィールド(オプション) + data modify storage asset:object Field.Speed set value 5 + data modify storage asset:object Field.Range set value 150 + data modify storage asset:object Field.MovePerStep set value 0.5 + data modify storage asset:object Field.Damage set value {ToNonPlayer:1,ToPlayer:1,Self:7} + data modify storage asset:object Field.AimToPlayer set value false + data modify storage asset:object Field.UserID set value -1 diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/summon/.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/summon/.mcfunction new file mode 100644 index 0000000000..3908f7734a --- /dev/null +++ b/Asset/data/asset/functions/object/1046.magic_bullet/summon/.mcfunction @@ -0,0 +1,11 @@ +#> asset:object/1046.magic_bullet/summon/ +# +# Object召喚処理の呼び出し時に実行されるfunction +# +# @within asset:object/alias/1046/summon + +# 召喚 + execute as 0-0-0-0-0 in minecraft:overworld positioned as @s run tp @s ~ ~ ~ ~ ~ + data modify storage asset:temp Args.Rotation set from entity 0-0-0-0-0 Rotation + function asset:object/1046.magic_bullet/summon/m with storage asset:temp Args + data remove storage asset:temp Args diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/summon/debug.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/summon/debug.mcfunction new file mode 100644 index 0000000000..b3d5a73959 --- /dev/null +++ b/Asset/data/asset/functions/object/1046.magic_bullet/summon/debug.mcfunction @@ -0,0 +1,10 @@ +#> asset:object/1046.magic_bullet/summon/debug +# +# 動作チェック用の召喚処理 使い終わったら消してもいいかも +# +# @user +# @private + +# 召喚 + data modify storage api: Argument.ID set value 1046 + function api:object/summon \ No newline at end of file diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/summon/m.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/summon/m.mcfunction new file mode 100644 index 0000000000..8ed9e83d4d --- /dev/null +++ b/Asset/data/asset/functions/object/1046.magic_bullet/summon/m.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/1046.magic_bullet/summon/m +# +# @input args: +# Rotation : float @ 2 +# @within function asset:object/1046.magic_bullet/summon/ + +# 召喚 + $summon marker ~ ~ ~ {Tags:["ObjectInit"],Rotation:$(Rotation)} diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/tick/.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/tick/.mcfunction new file mode 100644 index 0000000000..61c0ed9a6b --- /dev/null +++ b/Asset/data/asset/functions/object/1046.magic_bullet/tick/.mcfunction @@ -0,0 +1,18 @@ +#> asset:object/1046.magic_bullet/tick/ +# +# Objectのtick時の処理 +# +# @within asset:object/alias/1046/tick + +# Tick加算 + scoreboard players add @s General.Object.Tick 1 + +# 演出 + execute if score @s General.Object.Tick matches ..20 run particle dust 0 0.8 1 0.8 ~ ~ ~ 0 0 0 0 1 + execute if score @s General.Object.Tick matches ..3 run playsound minecraft:entity.illusioner.prepare_blindness neutral @a ~ ~ ~ 0.5 1.8 + execute if score @s General.Object.Tick matches 4..6 run playsound minecraft:entity.illusioner.prepare_blindness neutral @a ~ ~ ~ 0.5 1.9 + execute if score @s General.Object.Tick matches ..9 run playsound minecraft:entity.illusioner.prepare_blindness neutral @a ~ ~ ~ 0.5 2 + execute if score @s General.Object.Tick matches 20 run function asset:object/1046.magic_bullet/tick/vfx + +# 20tick目からsuper.tick + execute if score @s General.Object.Tick matches 20.. at @s run function asset:object/super.tick diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/tick/vfx.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/tick/vfx.mcfunction new file mode 100644 index 0000000000..a58d5c23a4 --- /dev/null +++ b/Asset/data/asset/functions/object/1046.magic_bullet/tick/vfx.mcfunction @@ -0,0 +1,25 @@ +#> asset:object/1046.magic_bullet/tick/vfx +# +# +# +# @within function asset:object/1046.magic_bullet/tick/ + +#> Private +# @private + #declare score_holder $BulletCount + +# 何発目の弾かをスコアに入れる + execute store result score $BulletCount Temporary run data get storage asset:context this.BulletCount + +# 演出 + particle scrape ~ ~ ~ 0 0 0 15 100 normal @a + execute if score $BulletCount Temporary matches 4.. run particle scrape ~ ~ ~ 0 0 0 30 100 normal @a + execute if score $BulletCount Temporary matches 7 run particle scrape ~ ~ ~ 0 0 0 45 100 normal @a + playsound tsb_sounds:rifle_shot neutral @a ~ ~ ~ 2 0.8 + playsound block.fire.extinguish neutral @a ~ ~ ~ 1 1.2 + playsound block.fire.extinguish neutral @a ~ ~ ~ 1 1.3 + playsound minecraft:entity.warden.sonic_boom neutral @a ~ ~ ~ 0.3 2 + playsound minecraft:entity.warden.sonic_boom neutral @a ~ ~ ~ 0.15 1.9 + +# リセット + scoreboard players reset $BulletCount Temporary diff --git a/Asset/data/asset/functions/object/alias/1046/detect_hit_entity.mcfunction b/Asset/data/asset/functions/object/alias/1046/detect_hit_entity.mcfunction new file mode 100644 index 0000000000..cc82d46ad7 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1046/detect_hit_entity.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1046/detect_hit_entity +# +# メソッド処理のエイリアス +# +# @within asset_manager:object/call_method/run_method.m + +# 元のメソッド処理を呼び出す + function asset:object/1046.magic_bullet/detect_hit_entity/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1046/hit_entity.mcfunction b/Asset/data/asset/functions/object/alias/1046/hit_entity.mcfunction new file mode 100644 index 0000000000..eb51f05861 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1046/hit_entity.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1046/hit_entity +# +# メソッド処理のエイリアス +# +# @within asset_manager:object/call_method/run_method.m + +# 元のメソッド処理を呼び出す + function asset:object/1046.magic_bullet/hit_entity/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1046/recursive.mcfunction b/Asset/data/asset/functions/object/alias/1046/recursive.mcfunction new file mode 100644 index 0000000000..16ca6c9470 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1046/recursive.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1046/recursive +# +# メソッド処理のエイリアス +# +# @within asset_manager:object/call_method/run_method.m + +# 元のメソッド処理を呼び出す + function asset:object/1046.magic_bullet/recursive/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1046/register.mcfunction b/Asset/data/asset/functions/object/alias/1046/register.mcfunction new file mode 100644 index 0000000000..620cfa87d8 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1046/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1046/register +# +# Objectのデータ指定処理のエイリアス +# +# @within asset_manager:object/summon/register.m + +# 元の登録処理を呼び出す + function asset:object/1046.magic_bullet/register \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1046/summon.mcfunction b/Asset/data/asset/functions/object/alias/1046/summon.mcfunction new file mode 100644 index 0000000000..8d3c26bbc7 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1046/summon.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1046/summon +# +# Object召喚処理のエイリアス +# +# @within asset_manager:object/summon/summon.m + +# 元の召喚処理を呼び出す + function asset:object/1046.magic_bullet/summon/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1046/tick.mcfunction b/Asset/data/asset/functions/object/alias/1046/tick.mcfunction new file mode 100644 index 0000000000..7319f91b39 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1046/tick.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1046/tick +# +# Tick時処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のTick処理を呼び出す + function asset:object/1046.magic_bullet/tick/ \ No newline at end of file diff --git a/Asset/data/asset/tags/functions/object/load.json b/Asset/data/asset/tags/functions/object/load.json index 9ed8e40409..08219c28db 100644 --- a/Asset/data/asset/tags/functions/object/load.json +++ b/Asset/data/asset/tags/functions/object/load.json @@ -49,4 +49,4 @@ "asset:object/1059.book_of_hero/load", "asset:object/2031.giant_pumpkin/load" ] -} \ No newline at end of file +} From 528a5288df4916cb96c5cfc5295f455be65c89d1 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 9 Mar 2025 10:57:21 +0900 Subject: [PATCH 03/19] =?UTF-8?q?=E7=A5=9E=E5=99=A8=E5=81=B4=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=207=E7=99=BA=E7=9B=AE=E3=81=8C=E3=83=97?= =?UTF-8?q?=E3=83=AC=E3=82=A4=E3=83=A4=E3=83=BC=E3=82=92=E7=8B=99=E3=81=86?= =?UTF-8?q?=E5=87=A6=E7=90=86=E4=BB=A5=E5=A4=96=E3=81=AF=E7=B5=82=E3=82=8F?= =?UTF-8?q?=E3=82=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trigger/0.load.mcfunction | 12 ---- .../trigger/3.main.mcfunction | 55 ++++++++++------ .../trigger/4.aim_to_player.mcfunction | 31 --------- .../trigger/5.init_bullet.mcfunction | 21 ------- .../trigger/6.summon_square.m.mcfunction | 31 --------- .../trigger/_index.d.mcfunction | 8 --- .../trigger/aim_to_player.mcfunction | 21 +++++++ .../trigger/loop/.mcfunction | 14 ----- .../trigger/loop/bullet/damage/.mcfunction | 63 ------------------- .../loop/bullet/damage/check.m.mcfunction | 14 ----- .../bullet/damage/check_target.mcfunction | 12 ---- .../loop/bullet/damage/hit_myself.mcfunction | 14 ----- .../trigger/loop/bullet/main.mcfunction | 32 ---------- .../trigger/loop/bullet/move.mcfunction | 24 ------- .../trigger/loop/bullet/teleport.mcfunction | 11 ---- .../trigger/loop/bullet/vfx.mcfunction | 20 ------ .../trigger/loop/square/main.mcfunction | 39 ------------ .../trigger/rejoin_process.mcfunction | 8 --- .../trigger/summon_square.m.mcfunction | 16 +++++ .../asset/tags/functions/artifact/load.json | 1 - Asset/data/asset/tags/functions/rejoin.json | 1 - 21 files changed, 74 insertions(+), 374 deletions(-) delete mode 100644 Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/0.load.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/4.aim_to_player.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/5.init_bullet.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/6.summon_square.m.mcfunction create mode 100644 Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/aim_to_player.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/damage/.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/damage/check.m.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/damage/check_target.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/damage/hit_myself.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/main.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/move.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/teleport.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/vfx.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/square/main.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/rejoin_process.mcfunction create mode 100644 Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square.m.mcfunction diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/0.load.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/0.load.mcfunction deleted file mode 100644 index 7adaa7141d..0000000000 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/0.load.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> asset:artifact/1065.magic_bullet/trigger/0.load -# -# 神器に利用するスコアボード等の初期化処理 -# -# @within tag/function asset:artifact/load - -#> 定義類はここに -# @within function asset:artifact/1065.magic_bullet/trigger/** - scoreboard objectives add TL.Tick dummy - scoreboard objectives add TL.UseCount dummy - scoreboard objectives add TL.SquareCount dummy - scoreboard objectives add TL.OwnerID dummy diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction index 336bc65d99..26516dd113 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction @@ -19,29 +19,50 @@ execute if score $UseCount Temporary matches 7 if predicate lib:random_pass_per/50 run tag @s add TL.AimToPlayer #execute if score $UseCount Temporary matches 7 run tag @s add TL.AimToPlayer -# 魔弾を召喚 - execute anchored eyes positioned ^-0.4 ^-0.1 ^0.6 summon marker run function asset:artifact/1065.magic_bullet/trigger/5.init_bullet - -# プレイヤーのRotationをstorageに入れる - data modify storage asset:temp TL.Rotation set from entity @s Rotation - -# マクロを使って魔法陣を召喚 +# 魔法陣を召喚 # 使用回数に応じて魔法陣の召喚数を増やす # プレイヤーを狙う状態の際は魔方陣を1つ追加 - execute anchored eyes positioned ^-0.4 ^-0.1 ^0.9 run function asset:artifact/1065.magic_bullet/trigger/6.summon_square.m with storage asset:temp TL - execute if score $UseCount Temporary matches 3.. anchored eyes positioned ^-0.4 ^-0.1 ^1.05 run function asset:artifact/1065.magic_bullet/trigger/6.summon_square.m with storage asset:temp TL - execute if score $UseCount Temporary matches 7 anchored eyes positioned ^-0.4 ^-0.1 ^1.2 run function asset:artifact/1065.magic_bullet/trigger/6.summon_square.m with storage asset:temp TL - execute if score $UseCount Temporary matches 7 if entity @s[tag=TL.AimToPlayer] anchored eyes positioned ^-0.4 ^-0.1 ^1.35 run function asset:artifact/1065.magic_bullet/trigger/6.summon_square.m with storage asset:temp TL + execute anchored eyes positioned ^-0.4 ^-0.1 ^0.9 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.9d,0.9d,0.01d],Delay:2} + execute if score $UseCount Temporary matches 3.. anchored eyes positioned ^-0.4 ^-0.1 ^1.05 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.8d,1.8d,0.01d],Delay:4} + execute if score $UseCount Temporary matches 7 anchored eyes positioned ^-0.4 ^-0.1 ^1.2 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.2d,1.2d,1.2d],Delay:8} + execute if score $UseCount Temporary matches 7 if entity @s[tag=TL.AimToPlayer] anchored eyes positioned ^-0.4 ^-0.1 ^1.35 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.7d,0.7d,0.7d],Delay:10} -# プレイヤーを狙う状態の時に実行 - execute if entity @s[tag=TL.AimToPlayer] run function asset:artifact/1065.magic_bullet/trigger/4.aim_to_player +# ダメージ + + # 非プレイヤー + # Damage = 350 + 150 * N + # 7発目なら強制的に2000 + scoreboard players set $Damage Temporary 150 + scoreboard players operation $Damage Temporary *= $UseCount Temporary + scoreboard players add $Damage Temporary 350 + # storageへ + execute store result storage api: Argument.FieldOverride.Damage.ToNonPlayer int 1 run scoreboard players get $Damage Temporary + execute if score $UseCount Temporary matches 7 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 2000f -# スケジュールループ - schedule function asset:artifact/1065.magic_bullet/trigger/loop/ 1t replace + # プレイヤー + # Damage = 2.5(N + 9) + # 7発目なら強制的に50 + scoreboard players operation $Damage Temporary = $UseCount Temporary + scoreboard players add $Damage Temporary 9 + # storageへ + execute store result storage api: Argument.FieldOverride.Damage.ToPlayer int 2.5 run scoreboard players get $Damage Temporary + execute if score $UseCount Temporary matches 7 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 50f + + # 制御不能な7発目の際の自身へのダメージ + execute if entity @s[tag=TL.AimToPlayer] run data modify storage api: Argument.FieldOverride.Damage.Self set value 70f + +# 魔弾を召喚 + data modify storage api: Argument.ID set value 1046 + execute if entity @s[tag=TL.AimToPlayer] run data modify storage api: Argument.FieldOverride.AimToPlayer set value true + execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID + execute anchored eyes positioned ^-0.4 ^-0.1 ^0.6 run function api:object/summon + +# プレイヤーを狙う状態の時に実行 + execute if entity @s[tag=TL.AimToPlayer] run function asset:artifact/1065.magic_bullet/trigger/aim_to_player # 使用回数が0になったら再度give execute unless data storage asset:context Items.mainhand.id run playsound block.iron_trapdoor.close player @a ~ ~ ~ 0.7 0.7 - execute unless data storage asset:context Items.mainhand.id run playsound entity.horse.armor player @p ~ ~ ~ 0.6 0.7 + execute unless data storage asset:context Items.mainhand.id run playsound entity.horse.armor player @a ~ ~ ~ 0.6 0.7 execute unless data storage asset:context Items.mainhand.id run data modify storage api: Argument.ID set value 1065 execute unless data storage asset:context Items.mainhand.id run function api:artifact/replace/from_id @@ -50,5 +71,3 @@ scoreboard players reset $7 Temporary scoreboard players reset $UseCount Temporary scoreboard players reset $RemainCount Temporary - scoreboard players reset $SquareCount Temporary - data remove storage asset:temp TL diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/4.aim_to_player.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/4.aim_to_player.mcfunction deleted file mode 100644 index 0fed00e5a5..0000000000 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/4.aim_to_player.mcfunction +++ /dev/null @@ -1,31 +0,0 @@ -#> asset:artifact/1065.magic_bullet/trigger/4.aim_to_player -# -# プレイヤーを狙う際の処理 -# -# @within function asset:artifact/1065.magic_bullet/trigger/3.main - -#> Private -# @private - #declare tag TL.TargetPlayer - #declare tag RotationMarker - -# ランダムなプレイヤーを指定 - tag @r[distance=..100] add TL.TargetPlayer - -# ターゲットの後ろにRotationのデータを用意するためのマーカーを召喚 -# 2個目のコマンドの最初にat @p[]があるのはdistanceの範囲を狭めるため - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^ ^-1 run summon marker ~ ~ ~ {Tags:["RotationMarker"]} - execute at @p[tag=TL.TargetPlayer] as @e[type=marker,tag=RotationMarker,distance=..5,sort=nearest,limit=1] at @s run tp @s ~ ~ ~ facing entity @e[tag=TL.TargetPlayer,limit=1] eyes - -# マーカーのRotationをストレージへ - execute at @p[tag=TL.TargetPlayer] as @e[type=marker,tag=RotationMarker,distance=..5] at @s run data modify storage asset:temp TL.Rotation set from entity @s Rotation - -# ターゲットの真後ろに魔方陣を4つ召喚 - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.45 run function asset:artifact/1065.magic_bullet/trigger/6.summon_square.m with storage asset:temp TL - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.30 run function asset:artifact/1065.magic_bullet/trigger/6.summon_square.m with storage asset:temp TL - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.15 run function asset:artifact/1065.magic_bullet/trigger/6.summon_square.m with storage asset:temp TL - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.00 run function asset:artifact/1065.magic_bullet/trigger/6.summon_square.m with storage asset:temp TL - -# リセット - tag @e[tag=TL.TargetPlayer] remove TL.TargetPlayer - kill @e[type=marker,tag=RotationMarker] diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/5.init_bullet.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/5.init_bullet.mcfunction deleted file mode 100644 index 9fd375d490..0000000000 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/5.init_bullet.mcfunction +++ /dev/null @@ -1,21 +0,0 @@ -#> asset:artifact/1065.magic_bullet/trigger/5.init_bullet -# -# 弾の初期化処理 -# -# @within function asset:artifact/1065.magic_bullet/trigger/3.main - -# Tagを付与 - tag @s add TL.Bullet - tag @s add TL.LoopTarget - -# 視点を使用者に合わせる - data modify entity @s Rotation set from entity @p[tag=this] Rotation - -# 使用回数をスコアへ - scoreboard players operation @s TL.UseCount = $UseCount Temporary - -# OwnerIDを設定 - scoreboard players operation @s TL.OwnerID = @p[tag=this] UserID - -# プレイヤーを狙う処理 - execute if entity @p[tag=this,tag=TL.AimToPlayer] run tag @s add TL.AimToPlayer diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/6.summon_square.m.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/6.summon_square.m.mcfunction deleted file mode 100644 index 57a2255e17..0000000000 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/6.summon_square.m.mcfunction +++ /dev/null @@ -1,31 +0,0 @@ -#> asset:artifact/1065.magic_bullet/trigger/6.summon_square.m -# -# 魔法陣の召喚処理 -# -# @input args: -# Rotation: double @ 2 -# -# @within function -# asset:artifact/1065.magic_bullet/trigger/3.main -# asset:artifact/1065.magic_bullet/trigger/4.aim_to_player - -# 何個目の魔法陣か数える - scoreboard players add $SquareCount Temporary 1 - -# マクロで向きを合わせた状態で召喚 - $summon item_display ~ ~ ~ {Rotation:$(Rotation),Tags:["TL.Square","TL.LoopTarget","TL.Init"],brightness:{sky:15,block:15},interpolation_duration:2,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0f,0f,0f]},item:{id:"minecraft:stick",Count:1b,tag:{CustomModelData:20351}}} - -# 魔法陣へ何個目かのスコアを入れる - scoreboard players operation @e[type=item_display,tag=TL.Init,distance=..0.01,sort=nearest,limit=1] TL.SquareCount = $SquareCount Temporary - -# OwnerIDを設定 - scoreboard players operation @e[type=item_display,tag=TL.Init,distance=..0.01,sort=nearest,limit=1] TL.OwnerID = @s UserID - -# ターゲットにされたプレイヤーがいる状態でかつ、1個目の魔法陣なら弾のワープ先用のTagを付与 - execute if entity @p[tag=TL.TargetPlayer] if score $SquareCount Temporary matches 1 run tag @e[type=item_display,tag=TL.Init,distance=..0.01,sort=nearest,limit=1] add TL.TeleportPosition - -# InitTag削除 - tag @e[type=item_display,tag=TL.Init,distance=..0.01,sort=nearest,limit=1] remove TL.Init - -# 4以上ならリセットしておく - execute if score $SquareCount Temporary matches 4.. run scoreboard players reset $SquareCount Temporary diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/_index.d.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/_index.d.mcfunction index 2f46f0ead6..4c61590808 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/_index.d.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/_index.d.mcfunction @@ -3,17 +3,9 @@ #> tag # @within function asset:artifact/1065.magic_bullet/trigger/** - #declare tag TL.Bullet - #declare tag TL.Square - #declare tag TL.LoopTarget - #declare tag TL.Init #declare tag TL.AimToPlayer #declare tag TL.TargetPlayer - #declare tag TL.TeleportPosition - #declare tag TL.TargetEntity - #declare score_holder $Recursive #declare score_holder $UseCount #declare score_holder $RemainCount - #declare score_holder $SquareCount #declare score_holder $7 #declare score_holder $Damage diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/aim_to_player.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/aim_to_player.mcfunction new file mode 100644 index 0000000000..a359a81dd4 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/aim_to_player.mcfunction @@ -0,0 +1,21 @@ +#> asset:artifact/1065.magic_bullet/trigger/aim_to_player +# +# プレイヤーを狙う際の処理 +# +# @within function asset:artifact/1065.magic_bullet/trigger/3.main + +#> Private +# @private + #declare tag TL.TargetPlayer + +# ランダムなプレイヤーを指定 + tag @r[distance=..100] add TL.TargetPlayer + +# ターゲットの真後ろに魔方陣を4つ召喚 + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.45 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.9d,0.9d,0.01d],Delay:2} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.30 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.8d,1.8d,0.01d],Delay:4} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.15 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.2d,1.2d,1.2d],Delay:8} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.00 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.7d,0.7d,0.7d],Delay:10} + +# リセット + tag @p[tag=TL.TargetPlayer] remove TL.TargetPlayer diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/.mcfunction deleted file mode 100644 index c18082aa39..0000000000 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> asset:artifact/1065.magic_bullet/trigger/loop/ -# -# スケジュールループ -# -# @within function -# asset:artifact/1065.magic_bullet/trigger/3.main -# asset:artifact/1065.magic_bullet/trigger/loop/bullet/main -# asset:artifact/1065.magic_bullet/trigger/loop/square/main -# asset:artifact/1065.magic_bullet/trigger/rejoin_process - - -# ループ処理 - execute as @e[type=marker,tag=TL.Bullet] at @s run function asset:artifact/1065.magic_bullet/trigger/loop/bullet/main - execute as @e[type=item_display,tag=TL.Square] at @s run function asset:artifact/1065.magic_bullet/trigger/loop/square/main diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/damage/.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/damage/.mcfunction deleted file mode 100644 index dc3dfa5356..0000000000 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/damage/.mcfunction +++ /dev/null @@ -1,63 +0,0 @@ -#> asset:artifact/1065.magic_bullet/trigger/loop/bullet/damage/ -# -# ダメージ処理 -# -# @within function asset:artifact/1065.magic_bullet/trigger/loop/bullet/main - -#> Private -# @private - #declare tag Owner - -# マーカーのデータを取り出し、既にヒット済みかをチェック - data modify storage asset:temp TL.HitList set from entity @s data - execute as @e[type=#lib:living,tag=TL.TargetEntity,distance=..4] run function asset:artifact/1065.magic_bullet/trigger/loop/bullet/damage/check_target - data modify entity @s data set from storage asset:temp TL.HitList - data remove storage asset:temp TL - -# 使用者を特定 - execute at @a if score @s TL.OwnerID = @p UserID run tag @p add Owner - -# Nは使用回数とする - -# 非プレイヤーに対するダメージ -# ダメージ = 350 + 150 * N -# 7つ目の弾丸では火力が2000になる - -# ダメージ計算 - scoreboard players operation $Damage Temporary = @s TL.UseCount - scoreboard players operation $Damage Temporary *= $150 Const - execute store result storage api: Argument.Damage int 1 run scoreboard players add $Damage Temporary 350 - execute if entity @s[scores={TL.UseCount=7}] run data modify storage api: Argument.Damage set value 2000 - -# その他ダメージ処理 - data modify storage api: Argument.AttackType set value "Magic" - data modify storage api: Argument.ElementType set value "Fire" - execute as @p[tag=Owner] run function api:damage/modifier - execute as @e[type=#lib:living,type=!player,tag=TL.TargetEntity,distance=..5] run function api:damage/ - function api:damage/reset - -# プレイヤーに対するダメージ -# ダメージ = 2.5(N + 9) -# 7つ目の弾丸では火力が50になる - -# ダメージ計算 - scoreboard players operation $Damage Temporary = @s TL.UseCount - scoreboard players operation $Damage Temporary += $9 Const - execute store result storage api: Argument.Damage double 0.5 run scoreboard players add $Damage Temporary 5 - execute if entity @s[scores={TL.UseCount=7}] run data modify storage api: Argument.Damage set value 50 - -# その他ダメージ処理 - data modify storage api: Argument.AttackType set value "Magic" - data modify storage api: Argument.ElementType set value "Fire" - data modify storage api: Argument.DeathMessage append value '[{"translate": "%1$sは%2$sに撃ち抜かれた","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}]' - execute as @p[tag=Owner] run function api:damage/modifier - execute as @a[tag=TL.TargetEntity,tag=!Owner,distance=..5] run function api:damage/ - function api:damage/reset - -# 7つ目の弾丸かつプレイヤーを狙っててかつ使用者に当たってるなら実行 - execute if entity @s[tag=TL.AimToPlayer,scores={TL.UseCount=7}] as @p[tag=Owner,tag=TL.TargetEntity] run function asset:artifact/1065.magic_bullet/trigger/loop/bullet/damage/hit_myself - -# リセット - scoreboard players reset $Damage Temporary - tag @p[tag=Owner] remove Owner - tag @e[type=#lib:living,tag=TL.TargetEntity,distance=..10] remove TL.TargetEntity diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/damage/check.m.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/damage/check.m.mcfunction deleted file mode 100644 index af17bb942d..0000000000 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/damage/check.m.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> asset:artifact/1065.magic_bullet/trigger/loop/bullet/damage/check.m -# -# 既にヒット済みかをマクロを使って検知する -# -# args: -# ID: int -# -# @within function asset:artifact/1065.magic_bullet/trigger/loop/bullet/damage/check_target - -# 自身のIDが既にあれば自身のターゲット用Tagを削除 - $execute if data storage asset:temp TL.HitList.$(ID) run tag @s remove TL.TargetEntity - -# データがなければ追加しておく - $execute unless data storage asset:temp TL.HitList.$(ID) run data modify storage asset:temp TL.HitList.$(ID) set value 0b diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/damage/check_target.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/damage/check_target.mcfunction deleted file mode 100644 index 10e3e5d5fc..0000000000 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/damage/check_target.mcfunction +++ /dev/null @@ -1,12 +0,0 @@ -#> asset:artifact/1065.magic_bullet/trigger/loop/bullet/damage/check_target -# -# IDからヒット済みかをチェック -# -# @within function asset:artifact/1065.magic_bullet/trigger/loop/bullet/damage/ - -# 自身のIDをstorageに入れる - execute if entity @s[type=player] store result storage asset:temp TL.ID int 1 run scoreboard players get @s UserID - execute if entity @s[type=!player] store result storage asset:temp TL.ID int 1 run scoreboard players get @s MobUUID - -# ターゲットが既にヒット済みかチェックする - function asset:artifact/1065.magic_bullet/trigger/loop/bullet/damage/check.m with storage asset:temp TL diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/damage/hit_myself.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/damage/hit_myself.mcfunction deleted file mode 100644 index 4f9e02e64f..0000000000 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/damage/hit_myself.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> asset:artifact/1065.magic_bullet/trigger/loop/bullet/damage/hit_myself -# -# 自分に弾が当たったときの処理 -# -# @within function asset:artifact/1065.magic_bullet/trigger/loop/bullet/damage/ - -# ダメージ - data modify storage api: Argument.Damage set value 50 - data modify storage api: Argument.AttackType set value "Magic" - data modify storage api: Argument.ElementType set value "Fire" - data modify storage api: Argument.DeathMessage append value '[{"translate": "%1$sは7つ目の弾丸に撃ち抜かれた","with":[{"selector":"@s"},{"nbt":"Return.AttackerName","storage":"lib:","interpret":true}]}]' - function api:damage/modifier - function api:damage/ - function api:damage/reset diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/main.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/main.mcfunction deleted file mode 100644 index 37ab7ce188..0000000000 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/main.mcfunction +++ /dev/null @@ -1,32 +0,0 @@ -#> asset:artifact/1065.magic_bullet/trigger/loop/bullet/main -# -# 弾のメイン処理 -# -# @within function asset:artifact/1065.magic_bullet/trigger/loop/ - -# スコア - scoreboard players add @s TL.Tick 1 - -# 演出 - execute if entity @s[scores={TL.Tick=..20}] run particle dust 0 0.8 1 0.8 ~ ~ ~ 0 0 0 0 1 - execute if entity @s[scores={TL.Tick=..3}] run playsound minecraft:entity.illusioner.prepare_blindness neutral @a ~ ~ ~ 0.5 1.8 - execute if entity @s[scores={TL.Tick=4..6}] run playsound minecraft:entity.illusioner.prepare_blindness neutral @a ~ ~ ~ 0.5 1.9 - execute if entity @s[scores={TL.Tick=7..9}] run playsound minecraft:entity.illusioner.prepare_blindness neutral @a ~ ~ ~ 0.5 2 - execute if entity @s[scores={TL.Tick=20}] run function asset:artifact/1065.magic_bullet/trigger/loop/bullet/vfx - -# 移動処理 - execute if entity @s[scores={TL.Tick=20..}] run function asset:artifact/1065.magic_bullet/trigger/loop/bullet/move - execute if entity @s[scores={TL.Tick=20..}] run scoreboard players reset $Recursive Temporary - -# ダメージ - execute if entity @s[scores={TL.Tick=21..}] if entity @e[type=#lib:living,tag=TL.TargetEntity,distance=..4,limit=1] run function asset:artifact/1065.magic_bullet/trigger/loop/bullet/damage/ - -# プレイヤーを狙う状態ならワープする - execute if entity @s[tag=TL.AimToPlayer,scores={TL.Tick=20}] run function asset:artifact/1065.magic_bullet/trigger/loop/bullet/teleport - -# 消滅 - execute if entity @s[scores={TL.Tick=40..}] run kill @s - execute unless block ^ ^ ^0.25 #lib:no_collision run kill @s - -# ループ処理 - schedule function asset:artifact/1065.magic_bullet/trigger/loop/ 1t replace diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/move.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/move.mcfunction deleted file mode 100644 index d1413fa322..0000000000 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/move.mcfunction +++ /dev/null @@ -1,24 +0,0 @@ -#> asset:artifact/1065.magic_bullet/trigger/loop/bullet/move -# -# 再帰処理で前進する -# -# @within function -# asset:artifact/1065.magic_bullet/trigger/loop/bullet/main -# asset:artifact/1065.magic_bullet/trigger/loop/bullet/move - -# tpする - tp @s ^ ^ ^0.25 - -# 演出 - execute at @s run particle dust 0.2 0.2 1 1.3 ~ ~ ~ 0 0 0 0 1 force @a - execute at @s run particle dust 0.2 0.2 1 1.3 ^ ^ ^0.125 0 0 0 0 1 force @a - -# ヒットしたEntityにターゲットTagを付与 - execute if entity @s[scores={TL.Tick=21..}] positioned ~-0.5 ~-0.5 ~-0.5 run tag @e[type=#lib:living,tag=!PlayerShouldInvulnerable,tag=!Object,tag=!Uninterferable,dx=0] add TL.TargetEntity - -# 再帰移動 -# 自然に魔法陣から魔法陣へワープさせるため、 -# プレイヤーを狙う状態かつ移動し始めてから1tick目(20)かつ、$Recursiveが1の時に強制的に中断 - scoreboard players add $Recursive Temporary 1 - execute if entity @s[tag=TL.AimToPlayer,scores={TL.Tick=20}] if score $Recursive Temporary matches 1.. run return fail - execute if score $Recursive Temporary matches ..9 at @s if block ^ ^ ^0.25 #lib:no_collision run function asset:artifact/1065.magic_bullet/trigger/loop/bullet/move diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/teleport.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/teleport.mcfunction deleted file mode 100644 index 5da6dce7ad..0000000000 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/teleport.mcfunction +++ /dev/null @@ -1,11 +0,0 @@ -#> asset:artifact/1065.magic_bullet/trigger/loop/bullet/teleport -# -# 魔法陣から魔法陣へワープする -# -# @within function asset:artifact/1065.magic_bullet/trigger/loop/bullet/main - -# OwnerIDが同じ魔法陣へワープする - execute at @e[type=item_display,tag=TL.TeleportPosition,distance=..110] if score @s TL.OwnerID = @e[type=item_display,tag=TL.TeleportPosition,limit=1] TL.OwnerID rotated ~ 0 positioned ^ ^ ^-0.2 run tp @s ~ ~ ~ ~ ~ - -# 演出 - execute at @s run function asset:artifact/1065.magic_bullet/trigger/loop/bullet/vfx diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/vfx.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/vfx.mcfunction deleted file mode 100644 index 5ff3929a97..0000000000 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/bullet/vfx.mcfunction +++ /dev/null @@ -1,20 +0,0 @@ -#> asset:artifact/1065.magic_bullet/trigger/loop/bullet/vfx -# -# vfx -# -# @within function -# asset:artifact/1065.magic_bullet/trigger/loop/bullet/main -# asset:artifact/1065.magic_bullet/trigger/loop/bullet/teleport - -# 演出 - particle scrape ~ ~ ~ 0 0 0 15 100 normal @a - execute if entity @s[scores={TL.UseCount=4..}] run particle scrape ~ ~ ~ 0 0 0 30 100 normal @a - execute if entity @s[scores={TL.UseCount=7}] run particle scrape ~ ~ ~ 0 0 0 45 100 normal @a - playsound tsb_sounds:rifle_shot neutral @a ~ ~ ~ 2 0.8 - #playsound tsb_sounds:rifle_shot neutral @a ~ ~ ~ 2 0.8 - #playsound tsb_sounds:rifle_shot neutral @a ~ ~ ~ 1 0.7 - playsound block.fire.extinguish neutral @a ~ ~ ~ 1 1.2 - playsound block.fire.extinguish neutral @a ~ ~ ~ 1 1.3 - playsound minecraft:entity.warden.sonic_boom neutral @a ~ ~ ~ 0.3 2 - playsound minecraft:entity.warden.sonic_boom neutral @a ~ ~ ~ 0.15 1.9 - #playsound minecraft:entity.warden.sonic_boom neutral @a ~ ~ ~ 0.1 1.8 diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/square/main.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/square/main.mcfunction deleted file mode 100644 index 9fb180ef3a..0000000000 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/loop/square/main.mcfunction +++ /dev/null @@ -1,39 +0,0 @@ -#> asset:artifact/1065.magic_bullet/trigger/loop/square/main -# -# 魔法陣のメイン処理 -# -# @within function asset:artifact/1065.magic_bullet/trigger/loop/ - -# スコア - scoreboard players add @s TL.Tick 1 - -# 魔法陣の表示処理 -# 何番目の魔法陣かで表示タイミングが異なる - -# 1つ目 - execute if entity @s[scores={TL.SquareCount=1,TL.Tick=2}] run data modify entity @s start_interpolation set value 0 - execute if entity @s[scores={TL.SquareCount=1,TL.Tick=2}] run data modify entity @s transformation.scale set value [0.9d,0.9d,0.01d] - -# 2つ目 - execute if entity @s[scores={TL.SquareCount=2,TL.Tick=4}] run data modify entity @s start_interpolation set value 0 - execute if entity @s[scores={TL.SquareCount=2,TL.Tick=4}] run data modify entity @s interpolation_duration set value 4 - execute if entity @s[scores={TL.SquareCount=2,TL.Tick=4}] run data modify entity @s transformation.scale set value [1.8d,1.8d,0.01d] - -# 3つ目 - execute if entity @s[scores={TL.SquareCount=3,TL.Tick=8}] run data modify entity @s start_interpolation set value 0 - execute if entity @s[scores={TL.SquareCount=3,TL.Tick=8}] run data modify entity @s transformation.scale set value [1.2d,1.2d,0.01d] - -# 4つ目 - execute if entity @s[scores={TL.SquareCount=4,TL.Tick=10}] run data modify entity @s start_interpolation set value 0 - execute if entity @s[scores={TL.SquareCount=4,TL.Tick=10}] run data modify entity @s transformation.scale set value [0.7d,0.7d,0.01d] - -# 消える - execute if entity @s[scores={TL.Tick=35}] run data modify entity @s start_interpolation set value 0 - execute if entity @s[scores={TL.Tick=35}] run data modify entity @s interpolation_duration set value 5 - execute if entity @s[scores={TL.Tick=35}] run data modify entity @s transformation.scale set value [0d,0d,0.01d] - -# 消滅 - execute if entity @s[scores={TL.Tick=40..}] run kill @s - -# ループ処理 - schedule function asset:artifact/1065.magic_bullet/trigger/loop/ 1t replace diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/rejoin_process.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/rejoin_process.mcfunction deleted file mode 100644 index 053a85d974..0000000000 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/rejoin_process.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -#> asset:artifact/1065.magic_bullet/trigger/rejoin_process -# -# 使い方は必ずwikiを見ること -# -# @within tag/function asset:rejoin - -# ループ再開 - execute if entity @e[type=!#lib:living,tag=TL.LoopTarget,limit=1] run schedule function asset:artifact/1065.magic_bullet/trigger/loop/ 1t replace diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square.m.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square.m.mcfunction new file mode 100644 index 0000000000..3e16894a12 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square.m.mcfunction @@ -0,0 +1,16 @@ +#> asset:artifact/1065.magic_bullet/trigger/summon_square.m +# +# 魔法陣の召喚処理 +# +# @input args: +# +# +# @within function +# asset:artifact/1065.magic_bullet/trigger/3.main +# asset:artifact/1065.magic_bullet/trigger/aim_to_player + +# 魔法陣を召喚 + data modify storage api: Argument.ID set value 1045 + $data modify storage api: Argument.FieldOverride.Scale set value $(Scale) + $data modify storage api: Argument.FieldOverride.DisplayDelay set value $(Delay) + function api:object/summon diff --git a/Asset/data/asset/tags/functions/artifact/load.json b/Asset/data/asset/tags/functions/artifact/load.json index b06de8caf4..7dc5972872 100644 --- a/Asset/data/asset/tags/functions/artifact/load.json +++ b/Asset/data/asset/tags/functions/artifact/load.json @@ -5,7 +5,6 @@ "asset:artifact/1081.wandering_piece_of_dream/trigger/0.load", "asset:artifact/0566.great_sage_helmet/trigger/0.load", "asset:artifact/1017.cutlass_of_endless_silence/trigger/0.load", - "asset:artifact/1065.magic_bullet/trigger/0.load", "asset:artifact/0554.catastrophe/trigger/0.load", "asset:artifact/1110.lantern_of_firefly/trigger/0.load", "asset:artifact/1149.afterglow_of_thunder/trigger/0.load", diff --git a/Asset/data/asset/tags/functions/rejoin.json b/Asset/data/asset/tags/functions/rejoin.json index 0baf90e3ba..2c8daa5bdb 100644 --- a/Asset/data/asset/tags/functions/rejoin.json +++ b/Asset/data/asset/tags/functions/rejoin.json @@ -4,7 +4,6 @@ "asset:mob/0340.twins_rubiel/rejoin_process/", "asset:mob/0410.heiloang/rejoin_process/", "asset:artifact/1017.cutlass_of_endless_silence/trigger/rejoin_process", - "asset:artifact/1065.magic_bullet/trigger/rejoin_process", "asset:artifact/1141.bell_of_courage/trigger/rejoin_process", "asset:artifact/1110.lantern_of_firefly/trigger/rejoin_process", "asset:artifact/0002.blessing/trigger/rejoin_process", From bdeeb2c592569d12addabd4d454a9beb9a3a581d Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 9 Mar 2025 10:59:35 +0900 Subject: [PATCH 04/19] =?UTF-8?q?DisplayDelay=20=E2=87=A2=20Delay?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../1065.magic_bullet/trigger/summon_square.m.mcfunction | 2 +- .../object/1045.magic_bullet_square/register.mcfunction | 2 +- .../object/1045.magic_bullet_square/tick/.mcfunction | 4 ++-- .../object/1045.magic_bullet_square/tick/display.mcfunction | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square.m.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square.m.mcfunction index 3e16894a12..59e62ce0ca 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square.m.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square.m.mcfunction @@ -12,5 +12,5 @@ # 魔法陣を召喚 data modify storage api: Argument.ID set value 1045 $data modify storage api: Argument.FieldOverride.Scale set value $(Scale) - $data modify storage api: Argument.FieldOverride.DisplayDelay set value $(Delay) + $data modify storage api: Argument.FieldOverride.Delay set value $(Delay) function api:object/summon diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction index 88ad00c54a..68e2898d54 100644 --- a/Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction @@ -18,4 +18,4 @@ data modify storage asset:object ID set value 1045 # フィールド(オプション) data modify storage asset:object Field.Scale set value [1d,1d,0.01d] - data modify storage asset:object Field.DisplayDelay set value 20 + data modify storage asset:object Field.Delay set value 20 diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/.mcfunction index 9801b0e8be..95a3a982cd 100644 --- a/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/.mcfunction +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/.mcfunction @@ -8,8 +8,8 @@ scoreboard players add @s General.Object.Tick 1 # 魔法陣表示までの遅延 - execute unless data storage asset:context this{DisplayDelay:-1} store result storage asset:context this.DisplayDelay int 0.9999999999 run data get storage asset:context this.DisplayDelay - execute if data storage asset:context this{DisplayDelay:0} run function asset:object/1045.magic_bullet_square/tick/display + execute unless data storage asset:context this{Delay:-1} store result storage asset:context this.Delay int 0.9999999999 run data get storage asset:context this.Delay + execute if data storage asset:context this{Delay:0} run function asset:object/1045.magic_bullet_square/tick/display # 魔法陣を見えなくする execute if entity @s[scores={General.Object.Tick=35}] run data modify entity @s start_interpolation set value 0 diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/display.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/display.mcfunction index 101f4cbe67..239da6908a 100644 --- a/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/display.mcfunction +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/display.mcfunction @@ -10,5 +10,5 @@ # transformation.scale data modify entity @s transformation.scale set from storage asset:context this.Scale -# DisplayDelayを-1にして何度も表示されないようにする - data modify storage asset:context this.DisplayDelay set value -1 +# Delayを-1にして何度も表示されないようにする + data modify storage asset:context this.Delay set value -1 From 712a54d79b4fca620ac7f56fc694285db0a3c32d Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 9 Mar 2025 11:08:06 +0900 Subject: [PATCH 05/19] =?UTF-8?q?Interpolation=E3=82=92=E3=83=95=E3=82=A3?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E3=83=89=E3=81=A7=E5=AE=9A=E7=BE=A9=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../artifact/1065.magic_bullet/trigger/3.main.mcfunction | 8 ++++---- .../1065.magic_bullet/trigger/aim_to_player.mcfunction | 8 ++++---- .../1065.magic_bullet/trigger/summon_square.m.mcfunction | 1 + .../object/1045.magic_bullet_square/register.mcfunction | 1 + .../object/1045.magic_bullet_square/summon/m.mcfunction | 2 +- .../1045.magic_bullet_square/tick/display.mcfunction | 3 +++ 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction index 26516dd113..642c57ad48 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction @@ -22,10 +22,10 @@ # 魔法陣を召喚 # 使用回数に応じて魔法陣の召喚数を増やす # プレイヤーを狙う状態の際は魔方陣を1つ追加 - execute anchored eyes positioned ^-0.4 ^-0.1 ^0.9 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.9d,0.9d,0.01d],Delay:2} - execute if score $UseCount Temporary matches 3.. anchored eyes positioned ^-0.4 ^-0.1 ^1.05 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.8d,1.8d,0.01d],Delay:4} - execute if score $UseCount Temporary matches 7 anchored eyes positioned ^-0.4 ^-0.1 ^1.2 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.2d,1.2d,1.2d],Delay:8} - execute if score $UseCount Temporary matches 7 if entity @s[tag=TL.AimToPlayer] anchored eyes positioned ^-0.4 ^-0.1 ^1.35 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.7d,0.7d,0.7d],Delay:10} + execute anchored eyes positioned ^-0.4 ^-0.1 ^0.9 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.9d,0.9d,0.01d],Delay:2,Interpolation:2} + execute if score $UseCount Temporary matches 3.. anchored eyes positioned ^-0.4 ^-0.1 ^1.05 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.8d,1.8d,0.01d],Delay:4,Interpolation:4} + execute if score $UseCount Temporary matches 7 anchored eyes positioned ^-0.4 ^-0.1 ^1.2 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.2d,1.2d,1.2d],Delay:8,Interpolation:2} + execute if score $UseCount Temporary matches 7 if entity @s[tag=TL.AimToPlayer] anchored eyes positioned ^-0.4 ^-0.1 ^1.35 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.7d,0.7d,0.7d],Delay:10,Interpolation:2} # ダメージ diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/aim_to_player.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/aim_to_player.mcfunction index a359a81dd4..a696095fd5 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/aim_to_player.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/aim_to_player.mcfunction @@ -12,10 +12,10 @@ tag @r[distance=..100] add TL.TargetPlayer # ターゲットの真後ろに魔方陣を4つ召喚 - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.45 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.9d,0.9d,0.01d],Delay:2} - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.30 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.8d,1.8d,0.01d],Delay:4} - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.15 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.2d,1.2d,1.2d],Delay:8} - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.00 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.7d,0.7d,0.7d],Delay:10} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.45 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.9d,0.9d,0.01d],Delay:2,Interpolation:2} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.30 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.8d,1.8d,0.01d],Delay:4,Interpolation:4} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.15 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.2d,1.2d,1.2d],Delay:8,Interpolation:2} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.00 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.7d,0.7d,0.7d],Delay:10,Interpolation:2} # リセット tag @p[tag=TL.TargetPlayer] remove TL.TargetPlayer diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square.m.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square.m.mcfunction index 59e62ce0ca..32300fff91 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square.m.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square.m.mcfunction @@ -13,4 +13,5 @@ data modify storage api: Argument.ID set value 1045 $data modify storage api: Argument.FieldOverride.Scale set value $(Scale) $data modify storage api: Argument.FieldOverride.Delay set value $(Delay) + $data modify storage api: Argument.FieldOverride.Interpolation set value $(Interpolation) function api:object/summon diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction index 68e2898d54..959a1bcea7 100644 --- a/Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction @@ -19,3 +19,4 @@ # フィールド(オプション) data modify storage asset:object Field.Scale set value [1d,1d,0.01d] data modify storage asset:object Field.Delay set value 20 + data modify storage asset:object Field.Interpolation set value 2 diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/summon/m.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/summon/m.mcfunction index 775b7b3176..81aeff6c08 100644 --- a/Asset/data/asset/functions/object/1045.magic_bullet_square/summon/m.mcfunction +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/summon/m.mcfunction @@ -4,4 +4,4 @@ # Rotation : float @ 2 # @within function asset:object/1045.magic_bullet_square/summon/ -$summon item_display ~ ~ ~ {Rotation:$(Rotation),Tags:["ObjectInit"],brightness:{sky:15,block:15},interpolation_duration:2,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0f,0f,0f]},item:{id:"minecraft:stick",Count:1b,tag:{CustomModelData:20351}}} +$summon item_display ~ ~ ~ {Rotation:$(Rotation),Tags:["ObjectInit"],brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0f,0f,0f]},item:{id:"minecraft:stick",Count:1b,tag:{CustomModelData:20351}}} diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/display.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/display.mcfunction index 239da6908a..940a95a949 100644 --- a/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/display.mcfunction +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/display.mcfunction @@ -10,5 +10,8 @@ # transformation.scale data modify entity @s transformation.scale set from storage asset:context this.Scale +# interpolation_duration + data modify entity @s interpolation_duration set from storage asset:context this.Interpolation + # Delayを-1にして何度も表示されないようにする data modify storage asset:context this.Delay set value -1 From d7fe79f10c511e0d3473b66312f1391949c476cc Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 9 Mar 2025 11:08:59 +0900 Subject: [PATCH 06/19] =?UTF-8?q?=5Findex.d=E3=82=92=E6=9C=80=E5=B0=8F?= =?UTF-8?q?=E9=99=90=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../artifact/1065.magic_bullet/trigger/_index.d.mcfunction | 1 - 1 file changed, 1 deletion(-) diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/_index.d.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/_index.d.mcfunction index 4c61590808..44e7d40ef6 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/_index.d.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/_index.d.mcfunction @@ -4,7 +4,6 @@ #> tag # @within function asset:artifact/1065.magic_bullet/trigger/** #declare tag TL.AimToPlayer - #declare tag TL.TargetPlayer #declare score_holder $UseCount #declare score_holder $RemainCount #declare score_holder $7 From cac0dd7719c91331ca6f120f1207b90d57638d36 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 9 Mar 2025 11:14:52 +0900 Subject: [PATCH 07/19] =?UTF-8?q?=E3=83=9E=E3=82=AF=E3=83=AD=E3=81=AB?= =?UTF-8?q?=E5=BF=85=E8=A6=81=E3=81=AA=E5=BC=95=E6=95=B0=E3=82=92IMP-Doc?= =?UTF-8?q?=E3=81=AB=E8=A8=98=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../1065.magic_bullet/trigger/summon_square.m.mcfunction | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square.m.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square.m.mcfunction index 32300fff91..7d0aaeca9b 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square.m.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square.m.mcfunction @@ -3,8 +3,9 @@ # 魔法陣の召喚処理 # # @input args: -# -# +# Scale : double @ 3 +# Delay : int +# Interpolation : int # @within function # asset:artifact/1065.magic_bullet/trigger/3.main # asset:artifact/1065.magic_bullet/trigger/aim_to_player From ce96c049e95f45b0d92cba442777f7bd7b4bb840 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 9 Mar 2025 11:28:27 +0900 Subject: [PATCH 08/19] =?UTF-8?q?=E5=8F=AC=E5=96=9A=E3=81=99=E3=82=8B?= =?UTF-8?q?=E9=AD=94=E6=B3=95=E9=99=A3=E3=81=AEscale=E3=81=8C=E3=81=8A?= =?UTF-8?q?=E3=81=8B=E3=81=97=E3=81=84=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../artifact/1065.magic_bullet/trigger/3.main.mcfunction | 4 ++-- .../1065.magic_bullet/trigger/aim_to_player.mcfunction | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction index 642c57ad48..4e42ceed81 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction @@ -24,8 +24,8 @@ # プレイヤーを狙う状態の際は魔方陣を1つ追加 execute anchored eyes positioned ^-0.4 ^-0.1 ^0.9 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.9d,0.9d,0.01d],Delay:2,Interpolation:2} execute if score $UseCount Temporary matches 3.. anchored eyes positioned ^-0.4 ^-0.1 ^1.05 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.8d,1.8d,0.01d],Delay:4,Interpolation:4} - execute if score $UseCount Temporary matches 7 anchored eyes positioned ^-0.4 ^-0.1 ^1.2 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.2d,1.2d,1.2d],Delay:8,Interpolation:2} - execute if score $UseCount Temporary matches 7 if entity @s[tag=TL.AimToPlayer] anchored eyes positioned ^-0.4 ^-0.1 ^1.35 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.7d,0.7d,0.7d],Delay:10,Interpolation:2} + execute if score $UseCount Temporary matches 7 anchored eyes positioned ^-0.4 ^-0.1 ^1.2 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.2d,1.2d,0.01d],Delay:8,Interpolation:2} + execute if score $UseCount Temporary matches 7 if entity @s[tag=TL.AimToPlayer] anchored eyes positioned ^-0.4 ^-0.1 ^1.35 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.7d,0.7d,0.01d],Delay:10,Interpolation:2} # ダメージ diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/aim_to_player.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/aim_to_player.mcfunction index a696095fd5..b326ee8fa8 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/aim_to_player.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/aim_to_player.mcfunction @@ -14,8 +14,8 @@ # ターゲットの真後ろに魔方陣を4つ召喚 execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.45 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.9d,0.9d,0.01d],Delay:2,Interpolation:2} execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.30 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.8d,1.8d,0.01d],Delay:4,Interpolation:4} - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.15 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.2d,1.2d,1.2d],Delay:8,Interpolation:2} - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.00 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.7d,0.7d,0.7d],Delay:10,Interpolation:2} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.15 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.2d,1.2d,0.01d],Delay:8,Interpolation:2} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.00 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.7d,0.7d,0.01d],Delay:10,Interpolation:2} # リセット tag @p[tag=TL.TargetPlayer] remove TL.TargetPlayer From 39695c61eb4631664db96747d2440c910c16f4a2 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 9 Mar 2025 11:37:41 +0900 Subject: [PATCH 09/19] =?UTF-8?q?=E3=82=B5=E3=83=96=E3=82=B3=E3=83=9E?= =?UTF-8?q?=E3=83=B3=E3=83=89=E3=82=92=E7=9F=AD=E7=B8=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../1065.magic_bullet/trigger/aim_to_player.mcfunction | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/aim_to_player.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/aim_to_player.mcfunction index b326ee8fa8..55be6ad215 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/aim_to_player.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/aim_to_player.mcfunction @@ -12,10 +12,10 @@ tag @r[distance=..100] add TL.TargetPlayer # ターゲットの真後ろに魔方陣を4つ召喚 - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.45 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.9d,0.9d,0.01d],Delay:2,Interpolation:2} - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.30 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.8d,1.8d,0.01d],Delay:4,Interpolation:4} - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.15 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.2d,1.2d,0.01d],Delay:8,Interpolation:2} - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^ positioned ^ ^ ^-5.00 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.7d,0.7d,0.01d],Delay:10,Interpolation:2} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.45 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.9d,0.9d,0.01d],Delay:2,Interpolation:2} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.30 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.8d,1.8d,0.01d],Delay:4,Interpolation:4} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.15 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.2d,1.2d,0.01d],Delay:8,Interpolation:2} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.00 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.7d,0.7d,0.01d],Delay:10,Interpolation:2} # リセット tag @p[tag=TL.TargetPlayer] remove TL.TargetPlayer From 72fa8bcea243271347a9ae6e364184df6a06118e Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 9 Mar 2025 11:38:08 +0900 Subject: [PATCH 10/19] =?UTF-8?q?NonPlayer=E3=81=A8Player=E3=81=A7?= =?UTF-8?q?=E3=81=AE=E3=83=80=E3=83=A1=E3=83=BC=E3=82=B8=E8=A8=88=E7=AE=97?= =?UTF-8?q?=E3=81=A7=E4=BD=BF=E3=81=86=E3=82=B9=E3=82=B3=E3=82=A2=E3=83=9B?= =?UTF-8?q?=E3=83=AB=E3=83=80=E3=83=BC=E3=82=92=E5=88=A5=E3=81=AE=E3=82=82?= =?UTF-8?q?=E3=81=AE=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../1065.magic_bullet/trigger/3.main.mcfunction | 16 +++++++++------- .../trigger/_index.d.mcfunction | 3 ++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction index 4e42ceed81..caa46e0d92 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction @@ -32,20 +32,20 @@ # 非プレイヤー # Damage = 350 + 150 * N # 7発目なら強制的に2000 - scoreboard players set $Damage Temporary 150 - scoreboard players operation $Damage Temporary *= $UseCount Temporary - scoreboard players add $Damage Temporary 350 + scoreboard players set $DamageToNonPlayer Temporary 150 + scoreboard players operation $DamageToNonPlayer Temporary *= $UseCount Temporary + scoreboard players add $DamageToNonPlayer Temporary 350 # storageへ - execute store result storage api: Argument.FieldOverride.Damage.ToNonPlayer int 1 run scoreboard players get $Damage Temporary + execute store result storage api: Argument.FieldOverride.Damage.ToNonPlayer int 1 run scoreboard players get $DamageToNonPlayer Temporary execute if score $UseCount Temporary matches 7 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 2000f # プレイヤー # Damage = 2.5(N + 9) # 7発目なら強制的に50 - scoreboard players operation $Damage Temporary = $UseCount Temporary - scoreboard players add $Damage Temporary 9 + scoreboard players operation $DamageToPlayer Temporary = $UseCount Temporary + scoreboard players add $DamageToPlayer Temporary 9 # storageへ - execute store result storage api: Argument.FieldOverride.Damage.ToPlayer int 2.5 run scoreboard players get $Damage Temporary + execute store result storage api: Argument.FieldOverride.Damage.ToPlayer int 2.5 run scoreboard players get $DamageToPlayer Temporary execute if score $UseCount Temporary matches 7 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 50f # 制御不能な7発目の際の自身へのダメージ @@ -71,3 +71,5 @@ scoreboard players reset $7 Temporary scoreboard players reset $UseCount Temporary scoreboard players reset $RemainCount Temporary + scoreboard players reset $DamageToNonPlayer Temporary + scoreboard players reset $DamageToPlayer Temporary diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/_index.d.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/_index.d.mcfunction index 44e7d40ef6..ef311f1e23 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/_index.d.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/_index.d.mcfunction @@ -7,4 +7,5 @@ #declare score_holder $UseCount #declare score_holder $RemainCount #declare score_holder $7 - #declare score_holder $Damage + #declare score_holder $DamageToNonPlayer + #declare score_holder $DamageToPlayer From 41ce7ee0716ae581fb914610515e8b5b5b6c7e11 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 9 Mar 2025 12:22:30 +0900 Subject: [PATCH 11/19] =?UTF-8?q?=E3=83=A9=E3=83=B3=E3=83=80=E3=83=A0?= =?UTF-8?q?=E3=81=AA=E3=83=97=E3=83=AC=E3=82=A4=E3=83=A4=E3=83=BC=E3=81=AE?= =?UTF-8?q?=E5=BE=8C=E3=82=8D=E3=81=8B=E3=82=89=E5=BC=BE=E3=81=8C=E5=87=BA?= =?UTF-8?q?=E3=82=8B=E5=87=A6=E7=90=86=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trigger/3.main.mcfunction | 74 ++++++++++--------- .../trigger/_index.d.mcfunction | 4 +- .../aim_to_player.mcfunction | 15 ++-- .../m.mcfunction} | 4 +- .../1045.magic_bullet_square/init/.mcfunction | 8 ++ .../1045.magic_bullet_square/load.mcfunction | 11 +++ .../register.mcfunction | 1 + .../1046.magic_bullet/register.mcfunction | 1 + .../object/1046.magic_bullet/tick/.mcfunction | 3 + .../tick/teleport.mcfunction | 21 ++++++ .../1046.magic_bullet/tick/vfx.mcfunction | 4 +- .../object/alias/1045/init.mcfunction | 8 ++ .../asset/tags/functions/object/load.json | 3 +- 13 files changed, 112 insertions(+), 45 deletions(-) rename Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/{ => summon_square}/aim_to_player.mcfunction (62%) rename Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/{summon_square.m.mcfunction => summon_square/m.mcfunction} (80%) create mode 100644 Asset/data/asset/functions/object/1045.magic_bullet_square/init/.mcfunction create mode 100644 Asset/data/asset/functions/object/1045.magic_bullet_square/load.mcfunction create mode 100644 Asset/data/asset/functions/object/1046.magic_bullet/tick/teleport.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1045/init.mcfunction diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction index caa46e0d92..cffc28f759 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction @@ -17,48 +17,56 @@ # 7回目なら確率でプレイヤーを狙うTagを付与 execute if score $UseCount Temporary matches 7 if predicate lib:random_pass_per/50 run tag @s add TL.AimToPlayer - #execute if score $UseCount Temporary matches 7 run tag @s add TL.AimToPlayer + # execute if score $UseCount Temporary matches 7 run tag @s add TL.AimToPlayer + +# プレイヤーを狙う状態なら、ランダムなIDを用意する + execute if entity @s[tag=TL.AimToPlayer] store result score $Random Temporary run random value -2147483648..2147483647 # 魔法陣を召喚 # 使用回数に応じて魔法陣の召喚数を増やす # プレイヤーを狙う状態の際は魔方陣を1つ追加 - execute anchored eyes positioned ^-0.4 ^-0.1 ^0.9 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.9d,0.9d,0.01d],Delay:2,Interpolation:2} - execute if score $UseCount Temporary matches 3.. anchored eyes positioned ^-0.4 ^-0.1 ^1.05 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.8d,1.8d,0.01d],Delay:4,Interpolation:4} - execute if score $UseCount Temporary matches 7 anchored eyes positioned ^-0.4 ^-0.1 ^1.2 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.2d,1.2d,0.01d],Delay:8,Interpolation:2} - execute if score $UseCount Temporary matches 7 if entity @s[tag=TL.AimToPlayer] anchored eyes positioned ^-0.4 ^-0.1 ^1.35 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.7d,0.7d,0.01d],Delay:10,Interpolation:2} + execute anchored eyes positioned ^-0.4 ^-0.1 ^0.9 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[0.9d,0.9d,0.01d],Delay:2,Interpolation:2} + execute if score $UseCount Temporary matches 3.. anchored eyes positioned ^-0.4 ^-0.1 ^1.05 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[1.8d,1.8d,0.01d],Delay:4,Interpolation:4} + execute if score $UseCount Temporary matches 7 anchored eyes positioned ^-0.4 ^-0.1 ^1.2 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[1.2d,1.2d,0.01d],Delay:8,Interpolation:2} + execute if score $UseCount Temporary matches 7 if entity @s[tag=TL.AimToPlayer] anchored eyes positioned ^-0.4 ^-0.1 ^1.35 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[0.7d,0.7d,0.01d],Delay:10,Interpolation:2} -# ダメージ +# 魔弾を召喚する - # 非プレイヤー - # Damage = 350 + 150 * N - # 7発目なら強制的に2000 - scoreboard players set $DamageToNonPlayer Temporary 150 - scoreboard players operation $DamageToNonPlayer Temporary *= $UseCount Temporary - scoreboard players add $DamageToNonPlayer Temporary 350 - # storageへ - execute store result storage api: Argument.FieldOverride.Damage.ToNonPlayer int 1 run scoreboard players get $DamageToNonPlayer Temporary - execute if score $UseCount Temporary matches 7 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 2000f + # ダメージ計算 + # 非プレイヤー + # Damage = 350 + 150 * N + # 7発目なら強制的に2000 + scoreboard players set $Damage Temporary 150 + scoreboard players operation $Damage Temporary *= $UseCount Temporary + scoreboard players add $Damage Temporary 350 + execute if score $UseCount Temporary matches 7 run scoreboard players set $Damage Temporary 2000 + # storageへ + execute store result storage api: Argument.FieldOverride.Damage.ToNonPlayer int 1 run scoreboard players get $Damage Temporary - # プレイヤー - # Damage = 2.5(N + 9) - # 7発目なら強制的に50 - scoreboard players operation $DamageToPlayer Temporary = $UseCount Temporary - scoreboard players add $DamageToPlayer Temporary 9 - # storageへ - execute store result storage api: Argument.FieldOverride.Damage.ToPlayer int 2.5 run scoreboard players get $DamageToPlayer Temporary - execute if score $UseCount Temporary matches 7 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 50f + # プレイヤー + # Damage = 2.5(N + 9) + # 7発目なら強制的に50 + scoreboard players operation $Damage Temporary = $UseCount Temporary + scoreboard players add $Damage Temporary 9 + scoreboard players operation $Damage Temporary *= $5 Const + scoreboard players operation $Damage Temporary /= $2 Const + execute if score $UseCount Temporary matches 7 run scoreboard players set $Damage Temporary 50 + # storageへ + execute store result storage api: Argument.FieldOverride.Damage.ToPlayer int 1 run scoreboard players get $Damage Temporary - # 制御不能な7発目の際の自身へのダメージ - execute if entity @s[tag=TL.AimToPlayer] run data modify storage api: Argument.FieldOverride.Damage.Self set value 70f + # プレイヤーを狙う状態に弾に渡すデータ + # $RandomをIDとして渡す + execute if entity @s[tag=TL.AimToPlayer] store result storage api: Argument.FieldOverride.ID int 1 run scoreboard players get $Random Temporary + execute if entity @s[tag=TL.AimToPlayer] run data modify storage api: Argument.FieldOverride.AimToPlayer set value true -# 魔弾を召喚 - data modify storage api: Argument.ID set value 1046 - execute if entity @s[tag=TL.AimToPlayer] run data modify storage api: Argument.FieldOverride.AimToPlayer set value true - execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID - execute anchored eyes positioned ^-0.4 ^-0.1 ^0.6 run function api:object/summon + # 魔弾を召喚 + # プレイヤーを狙う状態を弾に引き継ぐ + data modify storage api: Argument.ID set value 1046 + execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID + execute anchored eyes positioned ^-0.4 ^-0.1 ^0.6 run function api:object/summon # プレイヤーを狙う状態の時に実行 - execute if entity @s[tag=TL.AimToPlayer] run function asset:artifact/1065.magic_bullet/trigger/aim_to_player + execute if entity @s[tag=TL.AimToPlayer] run function asset:artifact/1065.magic_bullet/trigger/summon_square/aim_to_player # 使用回数が0になったら再度give execute unless data storage asset:context Items.mainhand.id run playsound block.iron_trapdoor.close player @a ~ ~ ~ 0.7 0.7 @@ -71,5 +79,5 @@ scoreboard players reset $7 Temporary scoreboard players reset $UseCount Temporary scoreboard players reset $RemainCount Temporary - scoreboard players reset $DamageToNonPlayer Temporary - scoreboard players reset $DamageToPlayer Temporary + scoreboard players reset $Damage Temporary + scoreboard players reset $Random Temporary diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/_index.d.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/_index.d.mcfunction index ef311f1e23..059d6b23d4 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/_index.d.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/_index.d.mcfunction @@ -7,5 +7,5 @@ #declare score_holder $UseCount #declare score_holder $RemainCount #declare score_holder $7 - #declare score_holder $DamageToNonPlayer - #declare score_holder $DamageToPlayer + #declare score_holder $Damage + #declare score_holder $Random diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/aim_to_player.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square/aim_to_player.mcfunction similarity index 62% rename from Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/aim_to_player.mcfunction rename to Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square/aim_to_player.mcfunction index 55be6ad215..cecc70e8d1 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/aim_to_player.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square/aim_to_player.mcfunction @@ -1,4 +1,4 @@ -#> asset:artifact/1065.magic_bullet/trigger/aim_to_player +#> asset:artifact/1065.magic_bullet/trigger/summon_square/aim_to_player # # プレイヤーを狙う際の処理 # @@ -11,11 +11,14 @@ # ランダムなプレイヤーを指定 tag @r[distance=..100] add TL.TargetPlayer -# ターゲットの真後ろに魔方陣を4つ召喚 - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.45 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.9d,0.9d,0.01d],Delay:2,Interpolation:2} - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.30 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.8d,1.8d,0.01d],Delay:4,Interpolation:4} - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.15 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[1.2d,1.2d,0.01d],Delay:8,Interpolation:2} - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.00 run function asset:artifact/1065.magic_bullet/trigger/summon_square.m {Scale:[0.7d,0.7d,0.01d],Delay:10,Interpolation:2} +# 1個目の魔法陣にIDを持たせる + execute store result storage api: Argument.FieldOverride.ID int 1 run scoreboard players get $Random Temporary + +# ターゲットの真後ろに魔法陣を4つ召喚 + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.45 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[0.9d,0.9d,0.01d],Delay:2,Interpolation:2} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.30 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[1.8d,1.8d,0.01d],Delay:4,Interpolation:4} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.15 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[1.2d,1.2d,0.01d],Delay:8,Interpolation:2} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.00 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[0.7d,0.7d,0.01d],Delay:10,Interpolation:2} # リセット tag @p[tag=TL.TargetPlayer] remove TL.TargetPlayer diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square.m.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square/m.mcfunction similarity index 80% rename from Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square.m.mcfunction rename to Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square/m.mcfunction index 7d0aaeca9b..b698261864 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square.m.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square/m.mcfunction @@ -1,4 +1,4 @@ -#> asset:artifact/1065.magic_bullet/trigger/summon_square.m +#> asset:artifact/1065.magic_bullet/trigger/summon_square/m # # 魔法陣の召喚処理 # @@ -8,7 +8,7 @@ # Interpolation : int # @within function # asset:artifact/1065.magic_bullet/trigger/3.main -# asset:artifact/1065.magic_bullet/trigger/aim_to_player +# asset:artifact/1065.magic_bullet/trigger/summon_square/aim_to_player # 魔法陣を召喚 data modify storage api: Argument.ID set value 1045 diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/init/.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/init/.mcfunction new file mode 100644 index 0000000000..2e94fef4c4 --- /dev/null +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/init/.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/1045.magic_bullet_square/init/ +# +# Objectのinit時の処理 +# +# @within asset:object/alias/1045/init + +# this.IDをスコアへ代入しておく + execute store result score @s 1045.ID run data get storage asset:context this.ID diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/load.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/load.mcfunction new file mode 100644 index 0000000000..b9feb8ab0b --- /dev/null +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/load.mcfunction @@ -0,0 +1,11 @@ +#> asset:object/1045.magic_bullet_square/load +# +# Objectに利用するスコアボード等の初期化処理 +# +# @within tag/function asset:object/load + +#> 定義類はここに +# @within function +# asset:object/1045.magic_bullet_square/** +# asset:object/1046.magic_bullet/tick/teleport + scoreboard objectives add 1045.ID dummy diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction index 959a1bcea7..cd203d0e87 100644 --- a/Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction @@ -20,3 +20,4 @@ data modify storage asset:object Field.Scale set value [1d,1d,0.01d] data modify storage asset:object Field.Delay set value 20 data modify storage asset:object Field.Interpolation set value 2 + # data modify storage asset:object Field.ID set value -1 diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/register.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/register.mcfunction index 253c75d53e..f6ab01cb02 100644 --- a/Asset/data/asset/functions/object/1046.magic_bullet/register.mcfunction +++ b/Asset/data/asset/functions/object/1046.magic_bullet/register.mcfunction @@ -22,4 +22,5 @@ data modify storage asset:object Field.MovePerStep set value 0.5 data modify storage asset:object Field.Damage set value {ToNonPlayer:1,ToPlayer:1,Self:7} data modify storage asset:object Field.AimToPlayer set value false + # data modify storage asset:object Field.ID set value -1 data modify storage asset:object Field.UserID set value -1 diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/tick/.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/tick/.mcfunction index 61c0ed9a6b..cbeb9bdd6d 100644 --- a/Asset/data/asset/functions/object/1046.magic_bullet/tick/.mcfunction +++ b/Asset/data/asset/functions/object/1046.magic_bullet/tick/.mcfunction @@ -14,5 +14,8 @@ execute if score @s General.Object.Tick matches ..9 run playsound minecraft:entity.illusioner.prepare_blindness neutral @a ~ ~ ~ 0.5 2 execute if score @s General.Object.Tick matches 20 run function asset:object/1046.magic_bullet/tick/vfx +# AimToPlayer:trueなら魔法陣へテレポートする + execute if score @s General.Object.Tick matches 20 if data storage asset:context this{AimToPlayer:true} run function asset:object/1046.magic_bullet/tick/teleport + # 20tick目からsuper.tick execute if score @s General.Object.Tick matches 20.. at @s run function asset:object/super.tick diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/tick/teleport.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/tick/teleport.mcfunction new file mode 100644 index 0000000000..4836351a90 --- /dev/null +++ b/Asset/data/asset/functions/object/1046.magic_bullet/tick/teleport.mcfunction @@ -0,0 +1,21 @@ +#> asset:object/1046.magic_bullet/tick/teleport +# +# IDが同じ魔法陣へテレポートする +# +# @within function asset:object/1046.magic_bullet/tick/ + +#> Private +# @private + #declare score_holder $1046.ID + +# 自身のIDをスコアへ + execute store result score $1046.ID Temporary run data get storage asset:context this.ID + +# 同IDを持つ魔法陣へテレポート + execute as @e[type=item_display,scores={ObjectID=1045},distance=..120] if score @s 1045.ID = $1046.ID Temporary at @s run tp @e[type=marker,tag=this,distance=..120] ^ ^ ^-0.2 ~ 0 + +# vfx + execute at @s run function asset:object/1046.magic_bullet/tick/vfx + +# リセット + scoreboard players reset $1046.ID Temporary diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/tick/vfx.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/tick/vfx.mcfunction index a58d5c23a4..5b44ce1abc 100644 --- a/Asset/data/asset/functions/object/1046.magic_bullet/tick/vfx.mcfunction +++ b/Asset/data/asset/functions/object/1046.magic_bullet/tick/vfx.mcfunction @@ -2,7 +2,9 @@ # # # -# @within function asset:object/1046.magic_bullet/tick/ +# @within function +# asset:object/1046.magic_bullet/tick/ +# asset:object/1046.magic_bullet/tick/teleport #> Private # @private diff --git a/Asset/data/asset/functions/object/alias/1045/init.mcfunction b/Asset/data/asset/functions/object/alias/1045/init.mcfunction new file mode 100644 index 0000000000..0d05ea1d84 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1045/init.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1045/init +# +# Init処理のエイリアス +# +# @within asset_manager:object/init/init.m + +# 元のInit処理を呼び出す + function asset:object/1045.magic_bullet_square/init/ \ No newline at end of file diff --git a/Asset/data/asset/tags/functions/object/load.json b/Asset/data/asset/tags/functions/object/load.json index 08219c28db..c31f51925b 100644 --- a/Asset/data/asset/tags/functions/object/load.json +++ b/Asset/data/asset/tags/functions/object/load.json @@ -1,5 +1,6 @@ { "values": [ + "asset:object/1045.magic_bullet_square/load", "asset:object/1102.turret/load", "asset:object/2026.lastbattle_platform/load", "asset:object/2198.rubiel_scythe/load", @@ -49,4 +50,4 @@ "asset:object/1059.book_of_hero/load", "asset:object/2031.giant_pumpkin/load" ] -} +} \ No newline at end of file From 75e138a176ab653faccc28bf760b54bc3c1b125a Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 9 Mar 2025 13:48:23 +0900 Subject: [PATCH 12/19] =?UTF-8?q?=E3=83=97=E3=83=AC=E3=82=A4=E3=83=A4?= =?UTF-8?q?=E3=83=BC=E3=81=AB=E5=AF=BE=E3=81=97=E3=81=A6=E5=BD=93=E3=81=9F?= =?UTF-8?q?=E3=82=89=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../1046.magic_bullet/detect_hit_entity/.mcfunction | 2 +- .../object/1046.magic_bullet/hit_entity/.mcfunction | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/detect_hit_entity/.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/detect_hit_entity/.mcfunction index d4d654291e..77b61d3a5d 100644 --- a/Asset/data/asset/functions/object/1046.magic_bullet/detect_hit_entity/.mcfunction +++ b/Asset/data/asset/functions/object/1046.magic_bullet/detect_hit_entity/.mcfunction @@ -5,4 +5,4 @@ # @within asset:object/alias/1046/detect_hit_entity # 判定 - execute if entity @s positioned ~-0.5 ~-0.5 ~-0.5 if entity @e[type=#lib:living,tag=Enemy,tag=!Uninterferable,dx=0] run data modify storage asset:context IsHitEntity set value true + execute if entity @s positioned ~-0.5 ~-0.5 ~-0.5 if entity @e[type=#lib:living,tag=!Uninterferable,dx=0] run data modify storage asset:context IsHitEntity set value true diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/.mcfunction index 182b2adf2b..1cc79d4bff 100644 --- a/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/.mcfunction +++ b/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/.mcfunction @@ -15,7 +15,7 @@ # 多重ヒット防止判定 # 敵味方関係なくチェックする - execute positioned ~-0.5 ~-0.5 ~-0.5 as @e[type=#lib:living,tag=!Owner,tag=!Uninterferable,dx=0] run function asset:object/1046.magic_bullet/hit_entity/check_target/ + execute positioned ~-0.5 ~-0.5 ~-0.5 as @e[type=#lib:living,tag=!Uninterferable,dx=0] run function asset:object/1046.magic_bullet/hit_entity/check_target/ # プレイヤー以外に対するダメージ data modify storage api: Argument.Damage set from storage asset:context this.Damage.ToNonPlayer @@ -30,11 +30,11 @@ data modify storage api: Argument.AttackType set value "Magic" data modify storage api: Argument.ElementType set value "Fire" execute as @p[tag=Owner] run function api:damage/modifier - execute positioned ~-0.5 ~-0.5 ~-0.5 as @e[type=#lib:living,type=player,tag=1046.TargetEntity,dx=0] run function api:damage/ + execute positioned ~-0.5 ~-0.5 ~-0.5 as @e[type=#lib:living,type=player,tag=1046.TargetEntity,tag=!Owner,dx=0] run function api:damage/ function api:damage/reset -# プレイヤーを狙った弾かつOwnerが近くにいればOwnerにダメージ - execute if data storage asset:context this{AimToPlayer:true} positioned ~-0.5 ~-0.5 ~-0.5 as @p[tag=Owner] run function asset:object/1046.magic_bullet/hit_entity/self_damage +# プレイヤーを狙った弾かつOwnerがいればOwnerにダメージ + execute if data storage asset:context this{AimToPlayer:true} positioned ~-0.5 ~-0.5 ~-0.5 as @p[tag=Owner,tag=1046.TargetEntity,dx=0] run function asset:object/1046.magic_bullet/hit_entity/self_damage # リセット tag @p[tag=Owner] remove Owner From cb743b5458113b4eac0e4471ce6e27ce508fa247 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 9 Mar 2025 13:51:34 +0900 Subject: [PATCH 13/19] =?UTF-8?q?ID=E3=81=8C=E3=81=82=E3=82=8B=E3=81=A8?= =?UTF-8?q?=E3=81=8D=E3=81=AE=E3=81=BF=E3=82=B9=E3=82=B3=E3=82=A2=E3=81=AB?= =?UTF-8?q?=E4=BB=A3=E5=85=A5=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../object/1045.magic_bullet_square/init/.mcfunction | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/init/.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/init/.mcfunction index 2e94fef4c4..62a2a804ec 100644 --- a/Asset/data/asset/functions/object/1045.magic_bullet_square/init/.mcfunction +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/init/.mcfunction @@ -4,5 +4,5 @@ # # @within asset:object/alias/1045/init -# this.IDをスコアへ代入しておく - execute store result score @s 1045.ID run data get storage asset:context this.ID +# this.IDがあればスコアへ代入しておく + execute if data storage asset:context this.ID store result score @s 1045.ID run data get storage asset:context this.ID From b720290d1f14e40da30ebd976e342e482aadb838 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 9 Mar 2025 13:52:22 +0900 Subject: [PATCH 14/19] =?UTF-8?q?=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88?= =?UTF-8?q?=E7=AD=89=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../artifact/1065.magic_bullet/trigger/3.main.mcfunction | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction index cffc28f759..0901b4467d 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction @@ -17,10 +17,13 @@ # 7回目なら確率でプレイヤーを狙うTagを付与 execute if score $UseCount Temporary matches 7 if predicate lib:random_pass_per/50 run tag @s add TL.AimToPlayer - # execute if score $UseCount Temporary matches 7 run tag @s add TL.AimToPlayer + +# debug + # tag @s add TL.AimToPlayer + # scoreboard players set $UseCount Temporary 7 # プレイヤーを狙う状態なら、ランダムなIDを用意する - execute if entity @s[tag=TL.AimToPlayer] store result score $Random Temporary run random value -2147483648..2147483647 + execute if entity @s[tag=TL.AimToPlayer] store result score $Random Temporary run random value 0..65535 # 魔法陣を召喚 # 使用回数に応じて魔法陣の召喚数を増やす @@ -60,7 +63,6 @@ execute if entity @s[tag=TL.AimToPlayer] run data modify storage api: Argument.FieldOverride.AimToPlayer set value true # 魔弾を召喚 - # プレイヤーを狙う状態を弾に引き継ぐ data modify storage api: Argument.ID set value 1046 execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID execute anchored eyes positioned ^-0.4 ^-0.1 ^0.6 run function api:object/summon From 6881800e84ed9ed8c6b05ee97ee96faf1f084251 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 9 Mar 2025 14:02:49 +0900 Subject: [PATCH 15/19] =?UTF-8?q?=E3=83=80=E3=83=A1=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=82=92=E8=A8=88=E7=AE=97=E5=BC=8F=E3=81=A7=E3=81=AF=E3=81=AA?= =?UTF-8?q?=E3=81=8F1=E7=99=BA=E3=81=94=E3=81=A8=E3=81=AB=E5=AE=9A?= =?UTF-8?q?=E7=BE=A9=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trigger/3.main.mcfunction | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction index 0901b4467d..421ddb5338 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction @@ -35,27 +35,26 @@ # 魔弾を召喚する - # ダメージ計算 + # ダメージ定義 # 非プレイヤー - # Damage = 350 + 150 * N # 7発目なら強制的に2000 - scoreboard players set $Damage Temporary 150 - scoreboard players operation $Damage Temporary *= $UseCount Temporary - scoreboard players add $Damage Temporary 350 - execute if score $UseCount Temporary matches 7 run scoreboard players set $Damage Temporary 2000 - # storageへ - execute store result storage api: Argument.FieldOverride.Damage.ToNonPlayer int 1 run scoreboard players get $Damage Temporary + execute if score $UseCount Temporary matches 1 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 500f + execute if score $UseCount Temporary matches 2 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 650f + execute if score $UseCount Temporary matches 3 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 800f + execute if score $UseCount Temporary matches 4 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 950f + execute if score $UseCount Temporary matches 5 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 1050f + execute if score $UseCount Temporary matches 6 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 1350f + execute if score $UseCount Temporary matches 7 run data modify storage api: Argument.FieldOverride.Damage.ToNonPlayer set value 2000f # プレイヤー - # Damage = 2.5(N + 9) # 7発目なら強制的に50 - scoreboard players operation $Damage Temporary = $UseCount Temporary - scoreboard players add $Damage Temporary 9 - scoreboard players operation $Damage Temporary *= $5 Const - scoreboard players operation $Damage Temporary /= $2 Const - execute if score $UseCount Temporary matches 7 run scoreboard players set $Damage Temporary 50 - # storageへ - execute store result storage api: Argument.FieldOverride.Damage.ToPlayer int 1 run scoreboard players get $Damage Temporary + execute if score $UseCount Temporary matches 1 run data modify storage api: Argument.FieldOverride.Damage.ToPlayer set value 25.0f + execute if score $UseCount Temporary matches 2 run data modify storage api: Argument.FieldOverride.Damage.ToPlayer set value 27.5f + execute if score $UseCount Temporary matches 3 run data modify storage api: Argument.FieldOverride.Damage.ToPlayer set value 30.0f + execute if score $UseCount Temporary matches 4 run data modify storage api: Argument.FieldOverride.Damage.ToPlayer set value 32.5f + execute if score $UseCount Temporary matches 5 run data modify storage api: Argument.FieldOverride.Damage.ToPlayer set value 35.0f + execute if score $UseCount Temporary matches 6 run data modify storage api: Argument.FieldOverride.Damage.ToPlayer set value 37.5f + execute if score $UseCount Temporary matches 7 run data modify storage api: Argument.FieldOverride.Damage.ToPlayer set value 50.0f # プレイヤーを狙う状態に弾に渡すデータ # $RandomをIDとして渡す From df2159d9a03aa74cc742bab80bc1bedf44961f8e Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 9 Mar 2025 16:12:28 +0900 Subject: [PATCH 16/19] =?UTF-8?q?=E9=AD=94=E6=B3=95=E9=99=A3=E3=81=AE?= =?UTF-8?q?=E5=9B=9E=E8=BB=A2=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trigger/3.main.mcfunction | 8 +++--- .../summon_square/aim_to_player.mcfunction | 8 +++--- .../trigger/summon_square/m.mcfunction | 1 + .../register.mcfunction | 3 +++ .../summon/debug.mcfunction | 4 ++- .../1045.magic_bullet_square/tick/.mcfunction | 13 +++++++--- .../tick/spin.mcfunction | 25 +++++++++++++++++++ 7 files changed, 49 insertions(+), 13 deletions(-) create mode 100644 Asset/data/asset/functions/object/1045.magic_bullet_square/tick/spin.mcfunction diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction index 421ddb5338..80f7bc3672 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/3.main.mcfunction @@ -28,10 +28,10 @@ # 魔法陣を召喚 # 使用回数に応じて魔法陣の召喚数を増やす # プレイヤーを狙う状態の際は魔方陣を1つ追加 - execute anchored eyes positioned ^-0.4 ^-0.1 ^0.9 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[0.9d,0.9d,0.01d],Delay:2,Interpolation:2} - execute if score $UseCount Temporary matches 3.. anchored eyes positioned ^-0.4 ^-0.1 ^1.05 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[1.8d,1.8d,0.01d],Delay:4,Interpolation:4} - execute if score $UseCount Temporary matches 7 anchored eyes positioned ^-0.4 ^-0.1 ^1.2 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[1.2d,1.2d,0.01d],Delay:8,Interpolation:2} - execute if score $UseCount Temporary matches 7 if entity @s[tag=TL.AimToPlayer] anchored eyes positioned ^-0.4 ^-0.1 ^1.35 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[0.7d,0.7d,0.01d],Delay:10,Interpolation:2} + execute anchored eyes positioned ^-0.4 ^-0.1 ^0.9 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[0.9d,0.9d,0.01d],Delay:2,Interpolation:2,LeftRotate:false} + execute if score $UseCount Temporary matches 3.. anchored eyes positioned ^-0.4 ^-0.1 ^1.05 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[1.8d,1.8d,0.01d],Delay:4,Interpolation:4,LeftRotate:true} + execute if score $UseCount Temporary matches 7 anchored eyes positioned ^-0.4 ^-0.1 ^1.2 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[1.2d,1.2d,0.01d],Delay:8,Interpolation:2,LeftRotate:false} + execute if score $UseCount Temporary matches 7 if entity @s[tag=TL.AimToPlayer] anchored eyes positioned ^-0.4 ^-0.1 ^1.35 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[0.7d,0.7d,0.01d],Delay:10,Interpolation:2,LeftRotate:true} # 魔弾を召喚する diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square/aim_to_player.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square/aim_to_player.mcfunction index cecc70e8d1..93c2396552 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square/aim_to_player.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square/aim_to_player.mcfunction @@ -15,10 +15,10 @@ execute store result storage api: Argument.FieldOverride.ID int 1 run scoreboard players get $Random Temporary # ターゲットの真後ろに魔法陣を4つ召喚 - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.45 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[0.9d,0.9d,0.01d],Delay:2,Interpolation:2} - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.30 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[1.8d,1.8d,0.01d],Delay:4,Interpolation:4} - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.15 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[1.2d,1.2d,0.01d],Delay:8,Interpolation:2} - execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.00 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[0.7d,0.7d,0.01d],Delay:10,Interpolation:2} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.45 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[0.9d,0.9d,0.01d],Delay:2,Interpolation:2,LeftRotate:false} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.30 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[1.8d,1.8d,0.01d],Delay:4,Interpolation:4,LeftRotate:true} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.15 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[1.2d,1.2d,0.01d],Delay:8,Interpolation:2,LeftRotate:false} + execute at @p[tag=TL.TargetPlayer] rotated ~ 0 anchored eyes positioned ^ ^-0.1 ^-5.00 run function asset:artifact/1065.magic_bullet/trigger/summon_square/m {Scale:[0.7d,0.7d,0.01d],Delay:10,Interpolation:2,LeftRotate:true} # リセット tag @p[tag=TL.TargetPlayer] remove TL.TargetPlayer diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square/m.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square/m.mcfunction index b698261864..1d0d2d979b 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square/m.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square/m.mcfunction @@ -15,4 +15,5 @@ $data modify storage api: Argument.FieldOverride.Scale set value $(Scale) $data modify storage api: Argument.FieldOverride.Delay set value $(Delay) $data modify storage api: Argument.FieldOverride.Interpolation set value $(Interpolation) + $data modify storage api: Argument.FieldOverride.LeftRotate set value $(LeftRotate)b function api:object/summon diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction index cd203d0e87..2f4aa9c679 100644 --- a/Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/register.mcfunction @@ -19,5 +19,8 @@ # フィールド(オプション) data modify storage asset:object Field.Scale set value [1d,1d,0.01d] data modify storage asset:object Field.Delay set value 20 + data modify storage asset:object Field.Spin set value 4 + data modify storage asset:object Field.SpinInterval set value 2 data modify storage asset:object Field.Interpolation set value 2 + data modify storage asset:object Field.LeftRotate set value false # data modify storage asset:object Field.ID set value -1 diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/summon/debug.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/summon/debug.mcfunction index 7a5ac6fc61..14f890c31b 100644 --- a/Asset/data/asset/functions/object/1045.magic_bullet_square/summon/debug.mcfunction +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/summon/debug.mcfunction @@ -5,6 +5,8 @@ # @user # @private + data modify storage api: Argument.FieldOverride.LeftRotate set value false + # 召喚 data modify storage api: Argument.ID set value 1045 - function api:object/summon \ No newline at end of file + function api:object/summon diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/.mcfunction index 95a3a982cd..efb2f38f7c 100644 --- a/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/.mcfunction +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/.mcfunction @@ -11,10 +11,15 @@ execute unless data storage asset:context this{Delay:-1} store result storage asset:context this.Delay int 0.9999999999 run data get storage asset:context this.Delay execute if data storage asset:context this{Delay:0} run function asset:object/1045.magic_bullet_square/tick/display +# 回転させる + execute if data storage asset:context this{Delay:-1} store result storage asset:context this.SpinInterval int 0.9999999999 run data get storage asset:context this.SpinInterval + execute if data storage asset:context this{SpinInterval:0} unless score @s General.Object.Tick matches 65.. run function asset:object/1045.magic_bullet_square/tick/spin + execute if data storage asset:context this{SpinInterval:0} run data modify storage asset:context this.SpinInterval set value 16 + # 魔法陣を見えなくする - execute if entity @s[scores={General.Object.Tick=35}] run data modify entity @s start_interpolation set value 0 - execute if entity @s[scores={General.Object.Tick=35}] run data modify entity @s interpolation_duration set value 5 - execute if entity @s[scores={General.Object.Tick=35}] run data modify entity @s transformation.scale set value [0d,0d,0.01d] + execute if score @s General.Object.Tick matches 60 run data modify entity @s start_interpolation set value 0 + execute if score @s General.Object.Tick matches 60 run data modify entity @s interpolation_duration set value 5 + execute if score @s General.Object.Tick matches 60 run data modify entity @s transformation.scale set value [0d,0d,0.01d] # 消滅処理 - kill @s[scores={General.Object.Tick=40..}] + kill @s[scores={General.Object.Tick=65..}] diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/spin.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/spin.mcfunction new file mode 100644 index 0000000000..a046ad383c --- /dev/null +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/spin.mcfunction @@ -0,0 +1,25 @@ +#> asset:object/1045.magic_bullet_square/tick/spin +# +# 回転させる +# +# @within function +# asset:object/1045.magic_bullet_square/tick/ +# asset:object/1045.magic_bullet_square/tick/display + +# start_interpolation + data modify entity @s start_interpolation set value 0 + +# Delayが0でなければinterpolation_durationを変える + data modify entity @s interpolation_duration set value 16 + +# 回転 + execute store result storage asset:context this.Spin int 0.9999999999 run data get storage asset:context this.Spin + execute if data storage asset:context this{Spin:3} if data storage asset:context this{LeftRotate:true} run data modify entity @s transformation.left_rotation set value [0.0f,0.0f,-0.7071f,0.7071f] + execute if data storage asset:context this{Spin:3} unless data storage asset:context this{LeftRotate:true} run data modify entity @s transformation.left_rotation set value [0.0f,0.0f,0.7071f,0.7071f] + execute if data storage asset:context this{Spin:2} run data modify entity @s transformation.left_rotation set value [0.0f,0.0f,1.0f,0.0f] + execute if data storage asset:context this{Spin:1} if data storage asset:context this{LeftRotate:true} run data modify entity @s transformation.left_rotation set value [0.0f,0.0f,0.7071f,0.7071f] + execute if data storage asset:context this{Spin:1} unless data storage asset:context this{LeftRotate:true} run data modify entity @s transformation.left_rotation set value [0.0f,0.0f,-0.7071f,0.7071f] + execute if data storage asset:context this{Spin:0} run data modify entity @s transformation.left_rotation set value [0.0f,0.0f,0.0f,1.0f] + +# リセット + execute if data storage asset:context this{Spin:0} run data modify storage asset:context this.Spin set value 4 From 2a24751c8e22d291dbeb61795b810b13d04d9587 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Sun, 9 Mar 2025 16:15:05 +0900 Subject: [PATCH 17/19] =?UTF-8?q?PlayerShouldInvernerable=E3=82=92?= =?UTF-8?q?=E3=82=BF=E3=83=BC=E3=82=B2=E3=83=83=E3=83=88=E3=81=AB=E3=81=97?= =?UTF-8?q?=E3=81=AA=E3=81=84/=E3=83=80=E3=83=A1=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=82=92=E4=B8=8E=E3=81=88=E3=81=AA=E3=81=84=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trigger/summon_square/aim_to_player.mcfunction | 2 +- .../functions/object/1046.magic_bullet/hit_entity/.mcfunction | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square/aim_to_player.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square/aim_to_player.mcfunction index 93c2396552..a354078a05 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square/aim_to_player.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/trigger/summon_square/aim_to_player.mcfunction @@ -9,7 +9,7 @@ #declare tag TL.TargetPlayer # ランダムなプレイヤーを指定 - tag @r[distance=..100] add TL.TargetPlayer + tag @r[tag=!PlayerShouldInvulnerable,distance=..100] add TL.TargetPlayer # 1個目の魔法陣にIDを持たせる execute store result storage api: Argument.FieldOverride.ID int 1 run scoreboard players get $Random Temporary diff --git a/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/.mcfunction b/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/.mcfunction index 1cc79d4bff..ba89706f43 100644 --- a/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/.mcfunction +++ b/Asset/data/asset/functions/object/1046.magic_bullet/hit_entity/.mcfunction @@ -30,11 +30,11 @@ data modify storage api: Argument.AttackType set value "Magic" data modify storage api: Argument.ElementType set value "Fire" execute as @p[tag=Owner] run function api:damage/modifier - execute positioned ~-0.5 ~-0.5 ~-0.5 as @e[type=#lib:living,type=player,tag=1046.TargetEntity,tag=!Owner,dx=0] run function api:damage/ + execute positioned ~-0.5 ~-0.5 ~-0.5 as @e[type=#lib:living,type=player,tag=1046.TargetEntity,tag=!PlayerShouldInvulnerable,tag=!Owner,dx=0] run function api:damage/ function api:damage/reset # プレイヤーを狙った弾かつOwnerがいればOwnerにダメージ - execute if data storage asset:context this{AimToPlayer:true} positioned ~-0.5 ~-0.5 ~-0.5 as @p[tag=Owner,tag=1046.TargetEntity,dx=0] run function asset:object/1046.magic_bullet/hit_entity/self_damage + execute if data storage asset:context this{AimToPlayer:true} positioned ~-0.5 ~-0.5 ~-0.5 as @p[tag=Owner,tag=1046.TargetEntity,tag=!PlayerShouldInvulnerable,dx=0] run function asset:object/1046.magic_bullet/hit_entity/self_damage # リセット tag @p[tag=Owner] remove Owner From 1042e070490d7993a6498674584337c642a49c02 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Mon, 10 Mar 2025 06:27:51 +0900 Subject: [PATCH 18/19] =?UTF-8?q?=E9=AD=94=E6=B3=95=E9=99=A3=E3=81=AE?= =?UTF-8?q?=E5=9B=9E=E8=BB=A2=E5=87=A6=E7=90=86=E3=81=AEwithin=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../object/1045.magic_bullet_square/tick/spin.mcfunction | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/spin.mcfunction b/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/spin.mcfunction index a046ad383c..08d1753ce4 100644 --- a/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/spin.mcfunction +++ b/Asset/data/asset/functions/object/1045.magic_bullet_square/tick/spin.mcfunction @@ -2,9 +2,7 @@ # # 回転させる # -# @within function -# asset:object/1045.magic_bullet_square/tick/ -# asset:object/1045.magic_bullet_square/tick/display +# @within function asset:object/1045.magic_bullet_square/tick/ # start_interpolation data modify entity @s start_interpolation set value 0 From 2d483ef0a1d02527a9177d325c1b6f2fec84c402 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Mon, 10 Mar 2025 06:28:41 +0900 Subject: [PATCH 19/19] =?UTF-8?q?=E7=A5=9E=E5=99=A8=E3=81=AE=E8=AA=AC?= =?UTF-8?q?=E6=98=8E=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../functions/artifact/1065.magic_bullet/give/2.give.mcfunction | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Asset/data/asset/functions/artifact/1065.magic_bullet/give/2.give.mcfunction b/Asset/data/asset/functions/artifact/1065.magic_bullet/give/2.give.mcfunction index da0f17b1ee..6adf2dc228 100644 --- a/Asset/data/asset/functions/artifact/1065.magic_bullet/give/2.give.mcfunction +++ b/Asset/data/asset/functions/artifact/1065.magic_bullet/give/2.give.mcfunction @@ -15,7 +15,7 @@ # 神器の名前 (TextComponentString) data modify storage asset:artifact Name set value '{"text":"魔弾","color":"#4F5BFF"}' # 神器の説明文 (TextComponentString[]) - data modify storage asset:artifact Lore set value ['{"text":"敵味方を無差別に貫く弾丸を放つ。","color":"white"}','{"text":"残り弾数が減るほど与えるダメージが上昇する。","color":"white"}','{"text":"7つ目の弾丸は50%の確率でランダムなプレイヤーを狙う。","color":"white"}','{"text":"弾が切れても自動でリロードされる。","color":"white"}','{"text":"「最後の弾丸は愛する人の頭を貫くだろう。」","color":"gray"}'] + data modify storage asset:artifact Lore set value ['{"text":"敵味方を無差別に貫く弾丸を放つ","color":"white"}','{"text":"残り弾数が減るほど与えるダメージが上昇する","color":"white"}','{"text":"7つ目の弾丸は50%の確率でランダムなプレイヤーを狙う","color":"white"}','{"text":"弾が切れても自動でリロードされる","color":"white"}','{"text":"「最後の弾丸は愛する人の頭を貫くだろう。」","color":"gray"}'] # MP以外の消費物 (TextComponentString) (オプション) # data modify storage asset:artifact CostText set value # 使用回数 (int) (オプション)