From c3da4efa96feeded851568b3e48c8fdae7ebbd99 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Tue, 29 Oct 2024 03:37:40 +0900 Subject: [PATCH 01/12] =?UTF-8?q?=E3=81=A8=E3=82=8A=E3=81=82=E3=81=88?= =?UTF-8?q?=E3=81=9A=E9=AD=9A=E3=81=BE=E3=81=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../1055.elemental_fish/_index.d.mcfunction | 8 +++ .../detect_hit_block/.mcfunction | 8 +++ .../1055.elemental_fish/hit_block/.mcfunction | 8 +++ .../1055.elemental_fish/init/.mcfunction | 32 ++++++++++ .../1055.elemental_fish/load.mcfunction | 10 +++ .../1055.elemental_fish/register.mcfunction | 18 ++++++ .../1055.elemental_fish/summon/.mcfunction | 8 +++ .../summon/debug.mcfunction | 10 +++ .../1055.elemental_fish/tick/.mcfunction | 61 +++++++++++++++++++ .../tick/disappear.mcfunction | 13 ++++ .../1055.elemental_fish/tick/shoot.mcfunction | 9 +++ .../alias/1055/detect_hit_block.mcfunction | 8 +++ .../object/alias/1055/hit_block.mcfunction | 8 +++ .../object/alias/1055/init.mcfunction | 8 +++ .../object/alias/1055/register.mcfunction | 8 +++ .../object/alias/1055/summon.mcfunction | 8 +++ .../object/alias/1055/tick.mcfunction | 8 +++ .../asset/tags/functions/object/load.json | 3 +- 18 files changed, 235 insertions(+), 1 deletion(-) create mode 100644 Asset/data/asset/functions/object/1055.elemental_fish/_index.d.mcfunction create mode 100644 Asset/data/asset/functions/object/1055.elemental_fish/detect_hit_block/.mcfunction create mode 100644 Asset/data/asset/functions/object/1055.elemental_fish/hit_block/.mcfunction create mode 100644 Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction create mode 100644 Asset/data/asset/functions/object/1055.elemental_fish/load.mcfunction create mode 100644 Asset/data/asset/functions/object/1055.elemental_fish/register.mcfunction create mode 100644 Asset/data/asset/functions/object/1055.elemental_fish/summon/.mcfunction create mode 100644 Asset/data/asset/functions/object/1055.elemental_fish/summon/debug.mcfunction create mode 100644 Asset/data/asset/functions/object/1055.elemental_fish/tick/.mcfunction create mode 100644 Asset/data/asset/functions/object/1055.elemental_fish/tick/disappear.mcfunction create mode 100644 Asset/data/asset/functions/object/1055.elemental_fish/tick/shoot.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1055/detect_hit_block.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1055/hit_block.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1055/init.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1055/register.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1055/summon.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1055/tick.mcfunction diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/_index.d.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/_index.d.mcfunction new file mode 100644 index 0000000000..8e6df5e742 --- /dev/null +++ b/Asset/data/asset/functions/object/1055.elemental_fish/_index.d.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/1055.elemental_fish/_index.d +# @private + +#> tag +# @within function asset:object/1055.elemental_fish/** + #declare tag 1055.Fire + #declare tag 1055.Water + #declare tag 1055.Thunder diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/detect_hit_block/.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/detect_hit_block/.mcfunction new file mode 100644 index 0000000000..32abc88892 --- /dev/null +++ b/Asset/data/asset/functions/object/1055.elemental_fish/detect_hit_block/.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/1055.elemental_fish/detect_hit_block/ +# +# 継承先などから実行される処理 +# +# @within asset:object/alias/1055/detect_hit_block + +# 接触判定 + execute unless block ^ ^ ^0.5 #lib:no_collision run data modify storage asset:context IsHitBlock set value true diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/hit_block/.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/hit_block/.mcfunction new file mode 100644 index 0000000000..58211afa3b --- /dev/null +++ b/Asset/data/asset/functions/object/1055.elemental_fish/hit_block/.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/1055.elemental_fish/hit_block/ +# +# 継承先などから実行される処理 +# +# @within asset:object/alias/1055/hit_block + +# 向きを変える + tp @s ~ ~ ~ ~20 ~-20 diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction new file mode 100644 index 0000000000..2fb80dadd4 --- /dev/null +++ b/Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction @@ -0,0 +1,32 @@ +#> asset:object/1055.elemental_fish/init/ +# +# Objectのinit時の処理 +# +# @within asset:object/alias/1055/init + +# 演出 + particle poof ~ ~0.5 ~ 0.1 0.1 0.1 0.05 5 + +# スピード設定 + data modify storage asset:context this.Speed set value 1 + data modify storage asset:context this.Range set value 1000 + data modify storage asset:context this.MovePerStep set value 0.2 + +# UserID + execute store result score @s 1055.OwnerID run data get storage asset:context this.UserID + +# 近くの誰かを見る + execute facing entity @p eyes run tp @s ~ ~ ~ ~ ~ + +# 見た目を設定 + execute if data storage asset:context this{Element:Fire} run tag @s add 1055.Fire + execute if data storage asset:context this{Element:Water} run tag @s add 1055.Water + execute if data storage asset:context this{Element:Thunder} run tag @s add 1055.Thunder + +# 見た目を設定 + execute if entity @s[tag=1055.Fire] run data modify entity @s item set value {id:"stick",Count:1b,tag:{CustomModelData:20230}} + execute if entity @s[tag=1055.Water] run data modify entity @s item set value {id:"stick",Count:1b,tag:{CustomModelData:20231}} + execute if entity @s[tag=1055.Thunder] run data modify entity @s item set value {id:"stick",Count:1b,tag:{CustomModelData:20232}} + +# 継承 + function asset:object/super.init diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/load.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/load.mcfunction new file mode 100644 index 0000000000..652a187666 --- /dev/null +++ b/Asset/data/asset/functions/object/1055.elemental_fish/load.mcfunction @@ -0,0 +1,10 @@ +#> asset:object/1055.elemental_fish/load +# +# Objectに利用するスコアボード等の初期化処理 +# +# @within tag/function asset:object/load + +#> 定義類はここに +# @within function asset:object/1055.elemental_fish/** + scoreboard objectives add 1055.OwnerID dummy + scoreboard objectives add 1055.Attack dummy diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/register.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/register.mcfunction new file mode 100644 index 0000000000..4cb434c86f --- /dev/null +++ b/Asset/data/asset/functions/object/1055.elemental_fish/register.mcfunction @@ -0,0 +1,18 @@ +#> asset:object/1055.elemental_fish/register +# +# Objectのデータを指定 +# +# @within function asset:object/alias/1055/register + +# 継承(オプション) + # data modify storage asset:object Extends append value + # function asset:object/extends +# 他のモブに継承されることを許可するか (boolean) (オプション) + # data modify storage asset:object ExtendsSafe set value +# 継承されることを前提とした、抽象的なオブジェクトであるかどうか(boolean) + data modify storage asset:object IsAbstract set value false + +# ID (int) + data modify storage asset:object ID set value 1055 +# フィールド(オプション) + # data modify storage asset:object Field.myValue set value \ No newline at end of file diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/summon/.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/summon/.mcfunction new file mode 100644 index 0000000000..d2e4888129 --- /dev/null +++ b/Asset/data/asset/functions/object/1055.elemental_fish/summon/.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/1055.elemental_fish/summon/ +# +# Object召喚処理の呼び出し時に実行されるfunction +# +# @within asset:object/alias/1055/summon + +# 元となるEntityを召喚する + summon item_display ~ ~ ~ {Tags:["ObjectInit"],item_display:"head"} diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/summon/debug.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/summon/debug.mcfunction new file mode 100644 index 0000000000..0f02d7dee6 --- /dev/null +++ b/Asset/data/asset/functions/object/1055.elemental_fish/summon/debug.mcfunction @@ -0,0 +1,10 @@ +#> asset:object/1055.elemental_fish/summon/debug +# +# 動作チェック用の召喚処理 使い終わったら消してもいいかも +# +# @user +# @private + +# 召喚 + data modify storage api: Argument.ID set value 1055 + function api:object/summon \ No newline at end of file diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/tick/.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/tick/.mcfunction new file mode 100644 index 0000000000..7e66382e69 --- /dev/null +++ b/Asset/data/asset/functions/object/1055.elemental_fish/tick/.mcfunction @@ -0,0 +1,61 @@ +#> asset:object/1055.elemental_fish/tick/ +# +# Objectのtick時の処理 +# +# @within asset:object/alias/1055/tick + +#> Private +# @private + #declare tag 1055.OwnerPlayer + #declare tag 1055.MoveMarker + #declare tag 1055.OwnerPlayer + +# 同IDのプレイヤーを特定 + execute at @a[distance=..30] if score @s 1055.OwnerID = @p UserID run tag @p add 1055.OwnerPlayer + +# OwnerにMarkerを召喚する + execute at @p[tag=1055.OwnerPlayer] rotated ~ 0 run summon marker ^-1 ^1 ^-1 {Tags:["1055.MoveMarker"]} + +# Ownerのマーカーの方を向く + execute facing entity @e[type=marker,tag=1055.MoveMarker,distance=..30,limit=1] eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-2000 facing entity @s eyes positioned as @s run tp @s ~ ~ ~ ~ ~ + +# 頭の向き + execute store result entity @s Pose.Head[0] float 1 run data get entity @s Rotation[1] + +# 接地で上を向く + execute unless block ~ ~-1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~-35 + execute unless block ~ ~1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~80 + +# 継承 + execute at @s run function asset:object/super.tick + +# パーティクル + execute if entity @s[tag=1055.Fire] positioned ^ ^ ^-0.3 run particle dust 1 0 0 0.5 ~ ~0.8 ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] + execute if entity @s[tag=1055.Fire] positioned ^ ^ ^-0.3 run particle dust 1 0.5 0 0.7 ~ ~0.8 ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] + + execute if entity @s[tag=1055.Thunder] positioned ^ ^ ^-0.3 run particle dust 1 1 0 0.5 ~ ~0.8 ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] + execute if entity @s[tag=1055.Thunder] positioned ^ ^ ^-0.3 run particle dust 1 1 0.7 0.7 ~ ~0.8 ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] + + execute if entity @s[tag=1055.Water] positioned ^ ^ ^-0.3 run particle dust 0 0.267 1 0.5 ~ ~0.8 ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] + execute if entity @s[tag=1055.Water] positioned ^ ^ ^-0.3 run particle dust 0 0.667 1 0.7 ~ ~0.8 ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] + +# 付近に敵がいるならスコア増やす + execute if entity @e[type=#lib:living,tag=Enemy,distance=..15] run scoreboard players add @s 1055.Attack 1 + +# 魔法攻撃 + execute if entity @s[scores={1055.Attack=20..}] rotated ~ 0 positioned ^0.1 ^0.4 ^0.5 run function asset:object/1055.elemental_fish/tick/shoot + +# 付近に敵がいないならスコアリセット + execute unless entity @e[type=#lib:living,tag=Enemy,distance=..15] run scoreboard players reset @s 1055.Attack + +# 存在時間 + scoreboard players add @s General.Object.Tick 1 + +# リセット + tag @p[tag=1055.OwnerPlayer] remove 1055.OwnerPlayer + kill @e[type=marker,tag=1055.MoveMarker] + +# 消滅処理 +# 一定Tick経過 または一定以上MoveMarkerから離れると消える + execute if entity @s[scores={General.Object.Tick=400..}] run function asset:object/1055.elemental_fish/tick/disappear + execute unless entity @e[type=marker,tag=1055.MoveMarker,distance=..30,limit=1] run function asset:object/1055.elemental_fish/tick/disappear diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/tick/disappear.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/tick/disappear.mcfunction new file mode 100644 index 0000000000..e129deef93 --- /dev/null +++ b/Asset/data/asset/functions/object/1055.elemental_fish/tick/disappear.mcfunction @@ -0,0 +1,13 @@ +#> asset:object/1055.elemental_fish/tick/disappear +# +# 消えるときの処理 +# +# @within function asset:object/1055.elemental_fish/tick/ + +# 演出 + playsound minecraft:entity.vex.ambient neutral @a ~ ~ ~ 1.5 1.5 + playsound minecraft:block.amethyst_cluster.break neutral @a ~ ~ ~ 1.5 1.5 + particle minecraft:end_rod ~ ~0.5 ~ 0 0 0 0.02 10 + +# キル + kill @s diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/tick/shoot.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/tick/shoot.mcfunction new file mode 100644 index 0000000000..cab1851958 --- /dev/null +++ b/Asset/data/asset/functions/object/1055.elemental_fish/tick/shoot.mcfunction @@ -0,0 +1,9 @@ +#> asset:object/1055.elemental_fish/tick/shoot +# +# 魔法弾を発射する +# +# @within function asset:object/1055.elemental_fish/tick/ + + +# リセット + scoreboard players reset @s 1055.Attack diff --git a/Asset/data/asset/functions/object/alias/1055/detect_hit_block.mcfunction b/Asset/data/asset/functions/object/alias/1055/detect_hit_block.mcfunction new file mode 100644 index 0000000000..1332d327a8 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1055/detect_hit_block.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1055/detect_hit_block +# +# メソッド処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のメソッド処理を呼び出す + function asset:object/1055.elemental_fish/detect_hit_block/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1055/hit_block.mcfunction b/Asset/data/asset/functions/object/alias/1055/hit_block.mcfunction new file mode 100644 index 0000000000..1511995e94 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1055/hit_block.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1055/hit_block +# +# メソッド処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のメソッド処理を呼び出す + function asset:object/1055.elemental_fish/hit_block/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1055/init.mcfunction b/Asset/data/asset/functions/object/alias/1055/init.mcfunction new file mode 100644 index 0000000000..e3e891cc7e --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1055/init.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1055/init +# +# Init処理のエイリアス +# +# @within asset_manager:object/init/init.m + +# 元のInit処理を呼び出す + function asset:object/1055.elemental_fish/init/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1055/register.mcfunction b/Asset/data/asset/functions/object/alias/1055/register.mcfunction new file mode 100644 index 0000000000..3183969218 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1055/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1055/register +# +# Objectのデータ指定処理のエイリアス +# +# @within asset_manager:object/summon/register.m + +# 元の登録処理を呼び出す + function asset:object/1055.elemental_fish/register \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1055/summon.mcfunction b/Asset/data/asset/functions/object/alias/1055/summon.mcfunction new file mode 100644 index 0000000000..783341f921 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1055/summon.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1055/summon +# +# Object召喚処理のエイリアス +# +# @within asset_manager:object/summon/summon.m + +# 元の召喚処理を呼び出す + function asset:object/1055.elemental_fish/summon/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1055/tick.mcfunction b/Asset/data/asset/functions/object/alias/1055/tick.mcfunction new file mode 100644 index 0000000000..8c8d8c4271 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1055/tick.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1055/tick +# +# Tick時処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のTick処理を呼び出す + function asset:object/1055.elemental_fish/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 561718bc11..5c0ac13f18 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/1055.elemental_fish/load", "asset:object/0001.abstract_projectile/load" ] -} +} \ No newline at end of file From 0807aab62fb823401554c7b44dfc3cc3f25efa81 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Tue, 29 Oct 2024 03:59:29 +0900 Subject: [PATCH 02/12] =?UTF-8?q?=E7=A5=9E=E5=99=A8=E3=81=8B=E3=82=89?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E3=81=AB=E5=8F=AC=E5=96=9A=E3=81=A7=E3=81=8D?= =?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 --- .../trigger/3.main.mcfunction | 14 +++------- .../trigger/summon_fairy.mcfunction | 26 +++++++++++++++++++ .../1055.elemental_fish/init/.mcfunction | 4 +-- .../1055.elemental_fish/register.mcfunction | 8 +++--- .../1055.elemental_fish/summon/.mcfunction | 2 +- .../1055.elemental_fish/tick/.mcfunction | 14 +++++----- 6 files changed, 44 insertions(+), 24 deletions(-) create mode 100644 Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/summon_fairy.mcfunction diff --git a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/3.main.mcfunction b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/3.main.mcfunction index 383045b592..0a4c9de1a5 100644 --- a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/3.main.mcfunction +++ b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/3.main.mcfunction @@ -9,13 +9,10 @@ # ここから先は神器側の効果の処理を書く -# 精霊召喚 - execute rotated ~ 0 run summon armor_stand ^2 ^ ^ {Pose:{Head:[0.1f,0.1f,0.1f]},DisabledSlots:4144959,Invisible:1b,NoGravity:1b,Small:1b,Tags:["87.FamiliarInit","Friend"]} - execute rotated ~ 0 run summon armor_stand ^ ^ ^-2 {Pose:{Head:[0.1f,0.1f,0.1f]},DisabledSlots:4144959,Invisible:1b,NoGravity:1b,Small:1b,Tags:["87.FamiliarInit","Friend"]} - execute rotated ~ 0 run summon armor_stand ^-2 ^ ^ {Pose:{Head:[0.1f,0.1f,0.1f]},DisabledSlots:4144959,Invisible:1b,NoGravity:1b,Small:1b,Tags:["87.FamiliarInit","Friend"]} - -# 精霊Init - execute as @e[type=armor_stand,tag=87.FamiliarInit,distance=..5] at @s run function asset:artifact/0295.call_elemental_familiar/trigger/fairy/1.init +# 精霊を3体召喚する + execute rotated ~ 0 positioned ^2 ^ ^ run function asset:artifact/0295.call_elemental_familiar/trigger/summon_fairy + execute rotated ~ 0 positioned ^ ^ ^-2 run function asset:artifact/0295.call_elemental_familiar/trigger/summon_fairy + execute rotated ~ 0 positioned ^-2 ^ ^ run function asset:artifact/0295.call_elemental_familiar/trigger/summon_fairy # 音とパーティクル neutralになってるのは妖精側の音だから playsound minecraft:item.bottle.fill_dragonbreath player @a ~ ~ ~ 2 2 @@ -23,6 +20,3 @@ playsound minecraft:entity.ender_eye.death player @a ~ ~ ~ 2 2 playsound minecraft:entity.vex.ambient neutral @a ~ ~ ~ 1 1.75 playsound minecraft:entity.vex.ambient neutral @a ~ ~ ~ 1 2 - -# 精霊さんを動かす - schedule function asset:artifact/0295.call_elemental_familiar/trigger/fairy/2.tick 1t replace \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/summon_fairy.mcfunction b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/summon_fairy.mcfunction new file mode 100644 index 0000000000..8e47ced2b4 --- /dev/null +++ b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/summon_fairy.mcfunction @@ -0,0 +1,26 @@ +#> asset:artifact/0295.call_elemental_familiar/trigger/summon_fairy +# +# +# +# @within function asset:artifact/0295.call_elemental_familiar/trigger/3.main + +#> Private +# @private + #declare score_holder $Random + +# 乱数 + execute store result score $Random Temporary run function lib:random/ + scoreboard players operation $Random Temporary %= $3 Const + +# 属性を決める + execute if score $Random Temporary matches 0 run data modify storage api: Argument.FieldOverride.Element set value "Fire" + execute if score $Random Temporary matches 1 run data modify storage api: Argument.FieldOverride.Element set value "Thunder" + execute if score $Random Temporary matches 2 run data modify storage api: Argument.FieldOverride.Element set value "Water" + +# 召喚する + data modify storage api: Argument.ID set value 1055 + execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID + function api:object/summon + +# リセット + scoreboard players reset $Random Temporary diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction index 2fb80dadd4..2fbbe58ca5 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction @@ -25,8 +25,8 @@ # 見た目を設定 execute if entity @s[tag=1055.Fire] run data modify entity @s item set value {id:"stick",Count:1b,tag:{CustomModelData:20230}} - execute if entity @s[tag=1055.Water] run data modify entity @s item set value {id:"stick",Count:1b,tag:{CustomModelData:20231}} - execute if entity @s[tag=1055.Thunder] run data modify entity @s item set value {id:"stick",Count:1b,tag:{CustomModelData:20232}} + execute if entity @s[tag=1055.Thunder] run data modify entity @s item set value {id:"stick",Count:1b,tag:{CustomModelData:20231}} + execute if entity @s[tag=1055.Water] run data modify entity @s item set value {id:"stick",Count:1b,tag:{CustomModelData:20232}} # 継承 function asset:object/super.init diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/register.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/register.mcfunction index 4cb434c86f..c55f7b1af7 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/register.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/register.mcfunction @@ -5,14 +5,14 @@ # @within function asset:object/alias/1055/register # 継承(オプション) - # data modify storage asset:object Extends append value - # function asset:object/extends + data modify storage asset:object Extends append value 1 + function asset:object/extends # 他のモブに継承されることを許可するか (boolean) (オプション) - # data modify storage asset:object ExtendsSafe set value + # data modify storage asset:object ExtendsSafe set value # 継承されることを前提とした、抽象的なオブジェクトであるかどうか(boolean) data modify storage asset:object IsAbstract set value false # ID (int) data modify storage asset:object ID set value 1055 # フィールド(オプション) - # data modify storage asset:object Field.myValue set value \ No newline at end of file + # data modify storage asset:object Field.myValue set value diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/summon/.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/summon/.mcfunction index d2e4888129..25348f6189 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/summon/.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/summon/.mcfunction @@ -5,4 +5,4 @@ # @within asset:object/alias/1055/summon # 元となるEntityを召喚する - summon item_display ~ ~ ~ {Tags:["ObjectInit"],item_display:"head"} + summon item_display ~ ~ ~ {Tags:["ObjectInit"],item_display:"head",teleport_duration:1} diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/tick/.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/tick/.mcfunction index 7e66382e69..50edc814c3 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/tick/.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/tick/.mcfunction @@ -30,14 +30,14 @@ execute at @s run function asset:object/super.tick # パーティクル - execute if entity @s[tag=1055.Fire] positioned ^ ^ ^-0.3 run particle dust 1 0 0 0.5 ~ ~0.8 ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] - execute if entity @s[tag=1055.Fire] positioned ^ ^ ^-0.3 run particle dust 1 0.5 0 0.7 ~ ~0.8 ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] + execute if entity @s[tag=1055.Fire] positioned ^ ^ ^-0.3 run particle dust 1 0 0 0.5 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] + execute if entity @s[tag=1055.Fire] positioned ^ ^ ^-0.3 run particle dust 1 0.5 0 0.7 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] - execute if entity @s[tag=1055.Thunder] positioned ^ ^ ^-0.3 run particle dust 1 1 0 0.5 ~ ~0.8 ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] - execute if entity @s[tag=1055.Thunder] positioned ^ ^ ^-0.3 run particle dust 1 1 0.7 0.7 ~ ~0.8 ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] + execute if entity @s[tag=1055.Thunder] positioned ^ ^ ^-0.3 run particle dust 1 1 0 0.5 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] + execute if entity @s[tag=1055.Thunder] positioned ^ ^ ^-0.3 run particle dust 1 1 0.7 0.7 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] - execute if entity @s[tag=1055.Water] positioned ^ ^ ^-0.3 run particle dust 0 0.267 1 0.5 ~ ~0.8 ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] - execute if entity @s[tag=1055.Water] positioned ^ ^ ^-0.3 run particle dust 0 0.667 1 0.7 ~ ~0.8 ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] + execute if entity @s[tag=1055.Water] positioned ^ ^ ^-0.3 run particle dust 0 0.267 1 0.5 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] + execute if entity @s[tag=1055.Water] positioned ^ ^ ^-0.3 run particle dust 0 0.667 1 0.7 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] # 付近に敵がいるならスコア増やす execute if entity @e[type=#lib:living,tag=Enemy,distance=..15] run scoreboard players add @s 1055.Attack 1 @@ -58,4 +58,4 @@ # 消滅処理 # 一定Tick経過 または一定以上MoveMarkerから離れると消える execute if entity @s[scores={General.Object.Tick=400..}] run function asset:object/1055.elemental_fish/tick/disappear - execute unless entity @e[type=marker,tag=1055.MoveMarker,distance=..30,limit=1] run function asset:object/1055.elemental_fish/tick/disappear + #execute unless entity @e[type=marker,tag=1055.MoveMarker,distance=..30,limit=1] run function asset:object/1055.elemental_fish/tick/disappear From 113347b24023f58c710b9f2a4c880f22ac48d23a Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Tue, 29 Oct 2024 04:17:24 +0900 Subject: [PATCH 03/12] =?UTF-8?q?=E9=AD=9A=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../object/1055.elemental_fish/_index.d.mcfunction | 3 +++ .../detect_hit_block/.mcfunction | 11 +++++++++++ .../1055.elemental_fish/hit_block/.mcfunction | 9 ++++++++- .../object/1055.elemental_fish/summon/.mcfunction | 2 +- .../object/1055.elemental_fish/tick/.mcfunction | 14 +++++--------- 5 files changed, 28 insertions(+), 11 deletions(-) diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/_index.d.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/_index.d.mcfunction index 8e6df5e742..fb5adc425f 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/_index.d.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/_index.d.mcfunction @@ -6,3 +6,6 @@ #declare tag 1055.Fire #declare tag 1055.Water #declare tag 1055.Thunder + #declare tag 1055.Foward + #declare tag 1055.Upper + #declare tag 1055.Lower diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/detect_hit_block/.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/detect_hit_block/.mcfunction index 32abc88892..6f42559904 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/detect_hit_block/.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/detect_hit_block/.mcfunction @@ -5,4 +5,15 @@ # @within asset:object/alias/1055/detect_hit_block # 接触判定 + +# 下にブロック + execute unless block ~ ~-1 ~ #lib:no_collision run data modify storage asset:context IsHitBlock set value true + execute unless block ~ ~-1 ~ #lib:no_collision run tag @s add 1055.Upper + +# 上にブロック + execute unless block ~ ~1 ~ #lib:no_collision run data modify storage asset:context IsHitBlock set value true + execute unless block ~ ~1 ~ #lib:no_collision run tag @s add 1055.Lower + +# 前方にブロック execute unless block ^ ^ ^0.5 #lib:no_collision run data modify storage asset:context IsHitBlock set value true + execute unless block ^ ^ ^0.5 #lib:no_collision run tag @s add 1055.Foward diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/hit_block/.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/hit_block/.mcfunction index 58211afa3b..913a55a990 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/hit_block/.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/hit_block/.mcfunction @@ -5,4 +5,11 @@ # @within asset:object/alias/1055/hit_block # 向きを変える - tp @s ~ ~ ~ ~20 ~-20 + execute if entity @s[tag=1055.Upper] at @s run tp @s ~ ~ ~ ~ ~-35 + execute if entity @s[tag=1055.Lower] at @s run tp @s ~ ~ ~ ~ ~80 + execute if entity @s[tag=1055.Foward] at @s run tp @s ~ ~ ~ ~20 ~-20 + +# リセット + tag @s remove 1055.Foward + tag @s remove 1055.Upper + tag @s remove 1055.Lower diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/summon/.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/summon/.mcfunction index 25348f6189..5982bf97c0 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/summon/.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/summon/.mcfunction @@ -5,4 +5,4 @@ # @within asset:object/alias/1055/summon # 元となるEntityを召喚する - summon item_display ~ ~ ~ {Tags:["ObjectInit"],item_display:"head",teleport_duration:1} + summon item_display ~ ~ ~ {Tags:["ObjectInit"],item_display:"head",teleport_duration:1,transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[0.5f,0.5f,0.5f]}} diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/tick/.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/tick/.mcfunction index 50edc814c3..db6a13b677 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/tick/.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/tick/.mcfunction @@ -22,10 +22,6 @@ # 頭の向き execute store result entity @s Pose.Head[0] float 1 run data get entity @s Rotation[1] -# 接地で上を向く - execute unless block ~ ~-1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~-35 - execute unless block ~ ~1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~80 - # 継承 execute at @s run function asset:object/super.tick @@ -51,11 +47,11 @@ # 存在時間 scoreboard players add @s General.Object.Tick 1 -# リセット - tag @p[tag=1055.OwnerPlayer] remove 1055.OwnerPlayer - kill @e[type=marker,tag=1055.MoveMarker] - # 消滅処理 # 一定Tick経過 または一定以上MoveMarkerから離れると消える execute if entity @s[scores={General.Object.Tick=400..}] run function asset:object/1055.elemental_fish/tick/disappear - #execute unless entity @e[type=marker,tag=1055.MoveMarker,distance=..30,limit=1] run function asset:object/1055.elemental_fish/tick/disappear + execute unless entity @e[type=marker,tag=1055.MoveMarker,distance=..30,limit=1] run function asset:object/1055.elemental_fish/tick/disappear + +# リセット + tag @p[tag=1055.OwnerPlayer] remove 1055.OwnerPlayer + kill @e[type=marker,tag=1055.MoveMarker] From 90c659c03192d1763f245353946ea8dc5ef4ceb0 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Tue, 29 Oct 2024 04:30:42 +0900 Subject: [PATCH 04/12] =?UTF-8?q?=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=82=92=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../asset/functions/object/1055.elemental_fish/init/.mcfunction | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction index 2fbbe58ca5..1438967fe2 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction @@ -18,7 +18,7 @@ # 近くの誰かを見る execute facing entity @p eyes run tp @s ~ ~ ~ ~ ~ -# 見た目を設定 +# 属性Tag設定 execute if data storage asset:context this{Element:Fire} run tag @s add 1055.Fire execute if data storage asset:context this{Element:Water} run tag @s add 1055.Water execute if data storage asset:context this{Element:Thunder} run tag @s add 1055.Thunder From 35e6c39c417a57c1f098ca45506d2ad7babe5cb4 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Tue, 29 Oct 2024 05:00:21 +0900 Subject: [PATCH 05/12] =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=BC=BE=E3=82=92?= =?UTF-8?q?=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../1055.elemental_fish/tick/shoot.mcfunction | 14 ++++++++ .../1056.elemental_bullet/_index.d.mcfunction | 8 +++++ .../detect_hit_entity/.mcfunction | 8 +++++ .../hit_entity/.mcfunction | 32 +++++++++++++++++++ .../1056.elemental_bullet/init/.mcfunction | 21 ++++++++++++ .../1056.elemental_bullet/register.mcfunction | 18 +++++++++++ .../1056.elemental_bullet/summon/.mcfunction | 8 +++++ .../summon/debug.mcfunction | 10 ++++++ .../1056.elemental_bullet/tick/.mcfunction | 24 ++++++++++++++ .../alias/1056/detect_hit_entity.mcfunction | 8 +++++ .../object/alias/1056/hit_entity.mcfunction | 8 +++++ .../object/alias/1056/init.mcfunction | 8 +++++ .../object/alias/1056/register.mcfunction | 8 +++++ .../object/alias/1056/summon.mcfunction | 8 +++++ .../object/alias/1056/tick.mcfunction | 8 +++++ 15 files changed, 191 insertions(+) create mode 100644 Asset/data/asset/functions/object/1056.elemental_bullet/_index.d.mcfunction create mode 100644 Asset/data/asset/functions/object/1056.elemental_bullet/detect_hit_entity/.mcfunction create mode 100644 Asset/data/asset/functions/object/1056.elemental_bullet/hit_entity/.mcfunction create mode 100644 Asset/data/asset/functions/object/1056.elemental_bullet/init/.mcfunction create mode 100644 Asset/data/asset/functions/object/1056.elemental_bullet/register.mcfunction create mode 100644 Asset/data/asset/functions/object/1056.elemental_bullet/summon/.mcfunction create mode 100644 Asset/data/asset/functions/object/1056.elemental_bullet/summon/debug.mcfunction create mode 100644 Asset/data/asset/functions/object/1056.elemental_bullet/tick/.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1056/detect_hit_entity.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1056/hit_entity.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1056/init.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1056/register.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1056/summon.mcfunction create mode 100644 Asset/data/asset/functions/object/alias/1056/tick.mcfunction diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/tick/shoot.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/tick/shoot.mcfunction index cab1851958..b838b973a3 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/tick/shoot.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/tick/shoot.mcfunction @@ -4,6 +4,20 @@ # # @within function asset:object/1055.elemental_fish/tick/ +# 演出 + playsound minecraft:entity.shulker_bullet.hurt neutral @a ~ ~ ~ 1.5 2 + playsound minecraft:block.amethyst_cluster.break neutral @a ~ ~ ~ 1.5 1.5 + playsound minecraft:entity.vex.ambient neutral @a ~ ~ ~ 1.5 2 + +# 属性設定 + data modify storage api: Argument.FieldOverride.Element set from storage asset:context this.Element + +# UserID + data modify storage api: Argument.FieldOverride.UserID set from storage asset:context this.UserID + +# 召喚 + data modify storage api: Argument.ID set value 1056 + function api:object/summon # リセット scoreboard players reset @s 1055.Attack diff --git a/Asset/data/asset/functions/object/1056.elemental_bullet/_index.d.mcfunction b/Asset/data/asset/functions/object/1056.elemental_bullet/_index.d.mcfunction new file mode 100644 index 0000000000..3670f6e15b --- /dev/null +++ b/Asset/data/asset/functions/object/1056.elemental_bullet/_index.d.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/1056.elemental_bullet/_index.d +# @private + +#> tag +# @within function asset:object/1056.elemental_bullet/** + #declare tag 1056.Fire + #declare tag 1056.Water + #declare tag 1056.Thunder diff --git a/Asset/data/asset/functions/object/1056.elemental_bullet/detect_hit_entity/.mcfunction b/Asset/data/asset/functions/object/1056.elemental_bullet/detect_hit_entity/.mcfunction new file mode 100644 index 0000000000..e6ee9c9c6e --- /dev/null +++ b/Asset/data/asset/functions/object/1056.elemental_bullet/detect_hit_entity/.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/1056.elemental_bullet/detect_hit_entity/ +# +# 継承先などから実行される処理 +# +# @within asset:object/alias/1056/detect_hit_entity + +# ヒット判定 + execute positioned ~-0.5 ~-0.5 ~-0.5 if entity @e[type=#lib:living,tag=Enemy,dx=0,limit=1] run data modify storage asset:context IsHitEntity set value true diff --git a/Asset/data/asset/functions/object/1056.elemental_bullet/hit_entity/.mcfunction b/Asset/data/asset/functions/object/1056.elemental_bullet/hit_entity/.mcfunction new file mode 100644 index 0000000000..5e5a73f91d --- /dev/null +++ b/Asset/data/asset/functions/object/1056.elemental_bullet/hit_entity/.mcfunction @@ -0,0 +1,32 @@ +#> asset:object/1056.elemental_bullet/hit_entity/ +# +# 継承先などから実行される処理 +# +# @within asset:object/alias/1056/hit_entity + +#> Private +# @private + #declare score_holder $1056.Owner + +# UserIDを代入 + execute store result score $1056.Owner Temporary run data get storage asset:context this.UserID + +# 演出 + particle minecraft:crit ~ ~ ~ 0 0 0 0.5 5 + +# ダメージ + data modify storage api: Argument.Damage set value 40.0f + data modify storage api: Argument.AttackType set value "Magic" + execute if entity @s[tag=1056.Fire] run data modify storage api: Argument.ElementType set value "Fire" + execute if entity @s[tag=1056.Thunder] run data modify storage api: Argument.ElementType set value "Thunder" + execute if entity @s[tag=1056.Water] run data modify storage api: Argument.ElementType set value "Water" + function api:damage/ + execute at @a if score $1056.Owner Temporary = @p UserID as @p run function api:damage/modifier + execute positioned ~-0.5 ~-0.5 ~-0.5 as @e[type=#lib:living,tag=Enemy,dx=0,sort=nearest,limit=1] run function api:damage/ + function api:damage/reset + +# リセット + scoreboard players reset $1056.Owner Temporary + +# ショットを消す + kill @s diff --git a/Asset/data/asset/functions/object/1056.elemental_bullet/init/.mcfunction b/Asset/data/asset/functions/object/1056.elemental_bullet/init/.mcfunction new file mode 100644 index 0000000000..03f6527d20 --- /dev/null +++ b/Asset/data/asset/functions/object/1056.elemental_bullet/init/.mcfunction @@ -0,0 +1,21 @@ +#> asset:object/1056.elemental_bullet/init/ +# +# Objectのinit時の処理 +# +# @within asset:object/alias/1056/init + +# 敵の方を向く + tp @s ~ ~ ~ facing entity @e[type=#lib:living,tag=Enemy,distance=..30,sort=nearest,limit=1] eyes + +# スピード設定 + data modify storage asset:context this.Speed set value 1 + data modify storage asset:context this.Range set value 40 + data modify storage asset:context this.MovePerStep set value 0.8 + +# 属性Tag設定 + execute if data storage asset:context this{Element:Fire} run tag @s add 1056.Fire + execute if data storage asset:context this{Element:Water} run tag @s add 1056.Water + execute if data storage asset:context this{Element:Thunder} run tag @s add 1056.Thunder + +# 継承 + function asset:object/super.init diff --git a/Asset/data/asset/functions/object/1056.elemental_bullet/register.mcfunction b/Asset/data/asset/functions/object/1056.elemental_bullet/register.mcfunction new file mode 100644 index 0000000000..b9c4cacf88 --- /dev/null +++ b/Asset/data/asset/functions/object/1056.elemental_bullet/register.mcfunction @@ -0,0 +1,18 @@ +#> asset:object/1056.elemental_bullet/register +# +# Objectのデータを指定 +# +# @within function asset:object/alias/1056/register + +# 継承(オプション) + data modify storage asset:object Extends append value 1 + function asset:object/extends +# 他のモブに継承されることを許可するか (boolean) (オプション) + # data modify storage asset:object ExtendsSafe set value +# 継承されることを前提とした、抽象的なオブジェクトであるかどうか(boolean) + data modify storage asset:object IsAbstract set value false + +# ID (int) + data modify storage asset:object ID set value 1056 +# フィールド(オプション) + # data modify storage asset:object Field.myValue set value diff --git a/Asset/data/asset/functions/object/1056.elemental_bullet/summon/.mcfunction b/Asset/data/asset/functions/object/1056.elemental_bullet/summon/.mcfunction new file mode 100644 index 0000000000..04b313fd9f --- /dev/null +++ b/Asset/data/asset/functions/object/1056.elemental_bullet/summon/.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/1056.elemental_bullet/summon/ +# +# Object召喚処理の呼び出し時に実行されるfunction +# +# @within asset:object/alias/1056/summon + +# 元となるEntityを召喚する + summon marker ~ ~ ~ {Tags:["ObjectInit"]} diff --git a/Asset/data/asset/functions/object/1056.elemental_bullet/summon/debug.mcfunction b/Asset/data/asset/functions/object/1056.elemental_bullet/summon/debug.mcfunction new file mode 100644 index 0000000000..34e066c20e --- /dev/null +++ b/Asset/data/asset/functions/object/1056.elemental_bullet/summon/debug.mcfunction @@ -0,0 +1,10 @@ +#> asset:object/1056.elemental_bullet/summon/debug +# +# 動作チェック用の召喚処理 使い終わったら消してもいいかも +# +# @user +# @private + +# 召喚 + data modify storage api: Argument.ID set value 1056 + function api:object/summon \ No newline at end of file diff --git a/Asset/data/asset/functions/object/1056.elemental_bullet/tick/.mcfunction b/Asset/data/asset/functions/object/1056.elemental_bullet/tick/.mcfunction new file mode 100644 index 0000000000..ddbd0894bc --- /dev/null +++ b/Asset/data/asset/functions/object/1056.elemental_bullet/tick/.mcfunction @@ -0,0 +1,24 @@ +#> asset:object/1056.elemental_bullet/tick/ +# +# Objectのtick時の処理 +# +# @within asset:object/alias/1056/tick + +# Tick加算 + scoreboard players add @s General.Object.Tick 1 + +# 火属性 + execute if entity @s[tag=1056.Fire] run particle minecraft:dust 1 0.451 0 1 ~ ~0.5 ~ 0 0 0 0 1 normal @a + execute if entity @s[tag=1056.Fire] run particle minecraft:flame ~ ~0.5 ~ 0 0 0 0 1 normal @a +# 水属性 + execute if entity @s[tag=1056.Water] run particle minecraft:dust 0.298 0.471 0.945 1 ~ ~0.5 ~ 0 0 0 0 1 normal @a + execute if entity @s[tag=1056.Water] run particle minecraft:scrape ~ ~0.5 ~ 0 0 0 0 1 normal @a +# 雷属性 + execute if entity @s[tag=1056.Thunder] run particle minecraft:dust 0.878 1 0.333 1 ~ ~0.5 ~ 0 0 0 0 1 normal @a + execute if entity @s[tag=1056.Thunder] run particle minecraft:wax_on ~ ~0.5 ~ 0 0 0 0 1 normal @a + +# 継承 + execute at @s run function asset:object/super.tick + +# 消滅処理 + kill @s[scores={General.Object.Tick=1000..}] diff --git a/Asset/data/asset/functions/object/alias/1056/detect_hit_entity.mcfunction b/Asset/data/asset/functions/object/alias/1056/detect_hit_entity.mcfunction new file mode 100644 index 0000000000..c791a6f4a9 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1056/detect_hit_entity.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1056/detect_hit_entity +# +# メソッド処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のメソッド処理を呼び出す + function asset:object/1056.elemental_bullet/detect_hit_entity/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1056/hit_entity.mcfunction b/Asset/data/asset/functions/object/alias/1056/hit_entity.mcfunction new file mode 100644 index 0000000000..02dfe3ebc5 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1056/hit_entity.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1056/hit_entity +# +# メソッド処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のメソッド処理を呼び出す + function asset:object/1056.elemental_bullet/hit_entity/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1056/init.mcfunction b/Asset/data/asset/functions/object/alias/1056/init.mcfunction new file mode 100644 index 0000000000..081cb3d4b5 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1056/init.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1056/init +# +# Init処理のエイリアス +# +# @within asset_manager:object/init/init.m + +# 元のInit処理を呼び出す + function asset:object/1056.elemental_bullet/init/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1056/register.mcfunction b/Asset/data/asset/functions/object/alias/1056/register.mcfunction new file mode 100644 index 0000000000..4d55041e41 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1056/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1056/register +# +# Objectのデータ指定処理のエイリアス +# +# @within asset_manager:object/summon/register.m + +# 元の登録処理を呼び出す + function asset:object/1056.elemental_bullet/register \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1056/summon.mcfunction b/Asset/data/asset/functions/object/alias/1056/summon.mcfunction new file mode 100644 index 0000000000..6e523a8c19 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1056/summon.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1056/summon +# +# Object召喚処理のエイリアス +# +# @within asset_manager:object/summon/summon.m + +# 元の召喚処理を呼び出す + function asset:object/1056.elemental_bullet/summon/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1056/tick.mcfunction b/Asset/data/asset/functions/object/alias/1056/tick.mcfunction new file mode 100644 index 0000000000..8ba6500e6b --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1056/tick.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1056/tick +# +# Tick時処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のTick処理を呼び出す + function asset:object/1056.elemental_bullet/tick/ \ No newline at end of file From 41c65b717743ad6e0bbdfc6f1b86158344e1c507 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Tue, 29 Oct 2024 05:04:23 +0900 Subject: [PATCH 06/12] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AB=E3=81=AA?= =?UTF-8?q?=E3=81=A3=E3=81=9F=E9=83=A8=E5=88=86=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../trigger/0.load.mcfunction | 11 --- .../trigger/2.check_condition.mcfunction | 7 +- .../trigger/3.cannot_use.mcfunction | 16 ----- .../trigger/_index.d.mcfunction.mcfunction | 17 ----- .../trigger/fairy/1.init.mcfunction | 40 ----------- .../trigger/fairy/2.tick.mcfunction | 14 ---- .../trigger/fairy/3.main.mcfunction | 68 ------------------- .../trigger/fairy/4.shoot.mcfunction | 29 -------- .../trigger/fairy/5.disapper.mcfunction | 13 ---- .../trigger/rejoin_process.mcfunction | 9 --- .../trigger/shot/1.init.mcfunction | 16 ----- .../trigger/shot/2.tick.mcfunction | 14 ---- .../trigger/shot/3.main.mcfunction | 24 ------- .../trigger/shot/4.hit.mcfunction | 28 -------- .../asset/tags/functions/artifact/load.json | 1 - Asset/data/asset/tags/functions/rejoin.json | 1 - 16 files changed, 1 insertion(+), 307 deletions(-) delete mode 100644 Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/0.load.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/3.cannot_use.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/_index.d.mcfunction.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/1.init.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/2.tick.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/3.main.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/4.shoot.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/5.disapper.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/rejoin_process.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/shot/1.init.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/shot/2.tick.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/shot/3.main.mcfunction delete mode 100644 Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/shot/4.hit.mcfunction diff --git a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/0.load.mcfunction b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/0.load.mcfunction deleted file mode 100644 index 54661b8b06..0000000000 --- a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/0.load.mcfunction +++ /dev/null @@ -1,11 +0,0 @@ -#> asset:artifact/0295.call_elemental_familiar/trigger/0.load -# -# 神器に利用するスコアボード等の初期化処理 -# -# @within tag/function asset:artifact/load - -#> Objective -# @within asset:artifact/0295.call_elemental_familiar/trigger/** - scoreboard objectives add 87.Tick dummy - scoreboard objectives add 87.LifeTime dummy - scoreboard objectives add 87.UserID dummy \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/2.check_condition.mcfunction b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/2.check_condition.mcfunction index 010d026205..06cffee7b5 100644 --- a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/2.check_condition.mcfunction +++ b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/2.check_condition.mcfunction @@ -7,10 +7,5 @@ # 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く auto/feet/legs/chest/head/mainhand/offhandを記載してね function asset:artifact/common/check_condition/auto -# 既に召喚済みなら使えない。タグ付与じゃないと残ってるファミリアの数だけコマンドが実行されてしまう。つまりめっちゃうるさい。 - execute at @e[type=armor_stand,tag=87.Familiar] if score @s UserID = @e[type=armor_stand,tag=87.Familiar,distance=..0.01,sort=nearest,limit=1] 87.UserID run tag @s add 87.CannotUse - execute if entity @s[tag=87.CannotUse] run tag @s remove CanUsed - execute if entity @s[tag=87.CannotUse] run function asset:artifact/0295.call_elemental_familiar/trigger/3.cannot_use - # CanUsedタグをチェックして3.main.mcfunctionを実行する - execute if entity @s[tag=CanUsed] run function asset:artifact/0295.call_elemental_familiar/trigger/3.main \ No newline at end of file + execute if entity @s[tag=CanUsed] run function asset:artifact/0295.call_elemental_familiar/trigger/3.main diff --git a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/3.cannot_use.mcfunction b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/3.cannot_use.mcfunction deleted file mode 100644 index 597942b8b0..0000000000 --- a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/3.cannot_use.mcfunction +++ /dev/null @@ -1,16 +0,0 @@ -#> asset:artifact/0295.call_elemental_familiar/trigger/3.cannot_use -# -# -# -# @within function -# asset:artifact/0295.call_elemental_familiar/trigger/2.check_condition - -# 効果音 - playsound minecraft:block.note_block.bass player @s ~ ~ ~ 5 1 - playsound minecraft:block.stone_button.click_on player @s ~ ~ ~ 2 1.5 - -# メッセージ - tellraw @s [{"text":"既に召喚しています。","color":"red"}] - -# 使用不可に - tag @s remove 87.CannotUse \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/_index.d.mcfunction.mcfunction b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/_index.d.mcfunction.mcfunction deleted file mode 100644 index 5a3f4e499e..0000000000 --- a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/_index.d.mcfunction.mcfunction +++ /dev/null @@ -1,17 +0,0 @@ -#> asset:artifact/0295.call_elemental_familiar/trigger/_index.d.mcfunction -# @private - -#> tags -# @within function asset:artifact/0295.call_elemental_familiar/trigger/** - #declare tag 87.Familiar - #declare tag 87.FamiliarInit - #declare tag 87.FamiliarFire - #declare tag 87.FamiliarWater - #declare tag 87.FamiliarThunder - #declare tag 87.Shot - #declare tag 87.ShotInit - #declare tag 87.ShotFire - #declare tag 87.ShotWater - #declare tag 87.ShotThunder - #declare tag 87.IDCopyBase - #declare tag 87.CannotUse \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/1.init.mcfunction b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/1.init.mcfunction deleted file mode 100644 index 83bc6107d7..0000000000 --- a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/1.init.mcfunction +++ /dev/null @@ -1,40 +0,0 @@ -#> asset:artifact/0295.call_elemental_familiar/trigger/fairy/1.init -# -# -# -# @within function asset:artifact/0295.call_elemental_familiar/trigger/3.main - -# パーティクル - particle poof ~ ~0.5 ~ 0.1 0.1 0.1 0.05 5 - -# 体力設定 - scoreboard players set @s 87.LifeTime 400 - -# 疑似乱数取得 - execute store result score $Random Temporary run function lib:random/ - -# ほしい範囲に剰余算 - scoreboard players operation $Random Temporary %= $3 Const - -# 自身の属性を定義する - execute if score $Random Temporary matches 0 run tag @s add 87.FamiliarFire - execute if score $Random Temporary matches 1 run tag @s add 87.FamiliarThunder - execute if score $Random Temporary matches 2 run tag @s add 87.FamiliarWater - -# 頭防具 - item replace entity @s[tag=87.FamiliarFire] armor.head with stick{CustomModelData:20230} - item replace entity @s[tag=87.FamiliarThunder] armor.head with stick{CustomModelData:20231} - item replace entity @s[tag=87.FamiliarWater] armor.head with stick{CustomModelData:20232} - -# 使用者のユーザーIDをコピー - scoreboard players operation @s 87.UserID = @p[tag=this] UserID - -# 近くの誰かを見る - execute facing entity @p eyes run tp @s ~ ~ ~ ~ ~ - -# タグ整備 - tag @s remove 87.FamiliarInit - tag @s add 87.Familiar - -# リセット - scoreboard players reset $Random Temporary \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/2.tick.mcfunction b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/2.tick.mcfunction deleted file mode 100644 index 3359a9df65..0000000000 --- a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/2.tick.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> asset:artifact/0295.call_elemental_familiar/trigger/fairy/2.tick -# -# scheduleでループする、妖精を動かすコマンド。 -# -# @within function -# asset:artifact/0295.call_elemental_familiar/trigger/fairy/2.tick -# asset:artifact/0295.call_elemental_familiar/trigger/3.main -# asset:artifact/0295.call_elemental_familiar/trigger/rejoin_process - -# エンティティに実行させる - execute as @e[type=armor_stand,tag=87.Familiar] at @s run function asset:artifact/0295.call_elemental_familiar/trigger/fairy/3.main - -# エンティティがいればループ - execute if entity @e[type=armor_stand,tag=87.Familiar,limit=1] run schedule function asset:artifact/0295.call_elemental_familiar/trigger/fairy/2.tick 1t \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/3.main.mcfunction b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/3.main.mcfunction deleted file mode 100644 index 71080122de..0000000000 --- a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/3.main.mcfunction +++ /dev/null @@ -1,68 +0,0 @@ -#> asset:artifact/0295.call_elemental_familiar/trigger/fairy/3.main -# -# ファミリアの動作部分 -# -# @within asset:artifact/0295.call_elemental_familiar/trigger/fairy/2.tick - -#> 移動先を決定するマーカーのタグ -# @private - #declare tag 87.MoveMarker - #declare tag 87.MoveMarkerInit - #declare tag 87.OwnerMarker - #declare tag 87.OwnerPlayer - -# 同IDのプレイヤーを特定 - execute at @a[distance=..30] if score @s 87.UserID = @p UserID run tag @p add 87.OwnerPlayer - -# マスターにMarkerを召喚する - execute at @p[tag=87.OwnerPlayer] rotated ~ 0 run summon marker ^-1 ^1 ^-1 {Tags:[87.MoveMarker,87.MoveMarkerInit]} - -# MarkerにID付与 - scoreboard players operation @e[type=marker,tag=87.MoveMarkerInit,sort=nearest,limit=1] 87.UserID = @s 87.UserID - tag @e[type=marker,tag=87.MoveMarkerInit,sort=nearest,limit=1] remove 87.MoveMarkerInit - -# 同IDのマーカーを特定 - execute at @e[type=marker,tag=87.MoveMarker] if score @s 87.UserID = @e[type=marker,tag=87.MoveMarker,sort=nearest,limit=1] 87.UserID run tag @e[type=marker,tag=87.MoveMarker,sort=nearest,limit=1] add 87.OwnerMarker - -# マスターのマーカーに誘導移動 - execute facing entity @e[type=marker,tag=87.OwnerMarker,distance=..30,limit=1] eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-2000 facing entity @s eyes positioned as @s run tp @s ^ ^ ^0.2 ~ ~ - -# 頭の向き - execute store result entity @s Pose.Head[0] float 1 run data get entity @s Rotation[1] - -# 接地で上を向く - execute positioned ~ ~1 ~ unless block ~ ~-1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~-35 - execute positioned ~ ~1 ~ unless block ~ ~1 ~ #lib:no_collision at @s run tp @s ~ ~ ~ ~ ~80 - -# カベにぶつかった際の処理 - execute positioned ~ ~1.5 ~ unless block ^ ^ ^0.5 #lib:no_collision at @s run tp @s ~ ~ ~ ~20 ~-20 - -# パーティクル - execute if entity @s[tag=87.FamiliarFire] positioned ^ ^ ^-0.3 run particle dust 1 0 0 0.5 ~ ~0.8 ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] - execute if entity @s[tag=87.FamiliarFire] positioned ^ ^ ^-0.3 run particle dust 1 0.5 0 0.7 ~ ~0.8 ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] - - execute if entity @s[tag=87.FamiliarThunder] positioned ^ ^ ^-0.3 run particle dust 1 1 0 0.5 ~ ~0.8 ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] - execute if entity @s[tag=87.FamiliarThunder] positioned ^ ^ ^-0.3 run particle dust 1 1 0.7 0.7 ~ ~0.8 ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] - - execute if entity @s[tag=87.FamiliarWater] positioned ^ ^ ^-0.3 run particle dust 0 0.267 1 0.5 ~ ~0.8 ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] - execute if entity @s[tag=87.FamiliarWater] positioned ^ ^ ^-0.3 run particle dust 0 0.667 1 0.7 ~ ~0.8 ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] - -# 付近に敵がいるならスコア増やす - execute if entity @e[tag=Enemy,distance=..15] run scoreboard players add @s 87.Tick 1 - -# 魔法攻撃 - execute if entity @s[scores={87.Tick=20..}] rotated ~ 0 positioned ^0.1 ^0.4 ^0.5 run function asset:artifact/0295.call_elemental_familiar/trigger/fairy/4.shoot - -# 付近に敵がいないならスコアリセット - execute unless entity @e[tag=Enemy,distance=..15] run scoreboard players reset @s 87.Tick - -# 存在時間 - scoreboard players remove @s 87.LifeTime 1 - execute if score @s 87.LifeTime matches 0 run function asset:artifact/0295.call_elemental_familiar/trigger/fairy/5.disapper - -# 離れ過ぎると消える - execute unless entity @e[type=marker,tag=87.OwnerMarker,distance=..30,limit=1] run function asset:artifact/0295.call_elemental_familiar/trigger/fairy/5.disapper - -# リセット - tag @a[tag=87.OwnerPlayer] remove 87.OwnerPlayer - kill @e[type=marker,tag=87.MoveMarker] \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/4.shoot.mcfunction b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/4.shoot.mcfunction deleted file mode 100644 index d4aedfa176..0000000000 --- a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/4.shoot.mcfunction +++ /dev/null @@ -1,29 +0,0 @@ -#> asset:artifact/0295.call_elemental_familiar/trigger/fairy/4.shoot -# -# ショット発射! -# -# @within asset:artifact/0295.call_elemental_familiar/trigger/fairy/3.main - - -# タグ付与 - tag @s add 87.IDCopyBase - -# 属性弾を放つ 無属性弾は現状撃たない - execute if entity @s[tag=87.FamiliarFire] run summon armor_stand ~ ~ ~ {Marker:1b,Invisible:1b,Tags:["87.ShotInit","87.ShotFire"]} - execute if entity @s[tag=87.FamiliarThunder] run summon armor_stand ~ ~ ~ {Marker:1b,Invisible:1b,Tags:["87.ShotInit","87.ShotThunder"]} - execute if entity @s[tag=87.FamiliarWater] run summon armor_stand ~ ~ ~ {Marker:1b,Invisible:1b,Tags:["87.ShotInit","87.ShotWater"]} - -# ショットのInit発動 - execute as @e[type=armor_stand,tag=87.ShotInit,distance=..0.01] at @s run function asset:artifact/0295.call_elemental_familiar/trigger/shot/1.init - -# scheduleループ開始 - schedule function asset:artifact/0295.call_elemental_familiar/trigger/shot/2.tick 1t replace - -# サウンド - playsound minecraft:entity.shulker_bullet.hurt neutral @a ~ ~ ~ 1.5 2 - playsound minecraft:block.amethyst_cluster.break neutral @a ~ ~ ~ 1.5 1.5 - playsound minecraft:entity.vex.ambient neutral @a ~ ~ ~ 1.5 2 - -# リセット - scoreboard players reset @s 87.Tick - tag @s remove 87.IDCopyBase \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/5.disapper.mcfunction b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/5.disapper.mcfunction deleted file mode 100644 index bf6dc7a61a..0000000000 --- a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/fairy/5.disapper.mcfunction +++ /dev/null @@ -1,13 +0,0 @@ -#> asset:artifact/0295.call_elemental_familiar/trigger/fairy/5.disapper -# -# 消滅処理 -# -# @within function asset:artifact/0295.call_elemental_familiar/trigger/fairy/3.main - -# 演出 - playsound minecraft:entity.vex.ambient neutral @a ~ ~ ~ 1.5 1.5 - playsound minecraft:block.amethyst_cluster.break neutral @a ~ ~ ~ 1.5 1.5 - particle minecraft:end_rod ~ ~0.5 ~ 0 0 0 0.02 10 - -# キル - kill @s \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/rejoin_process.mcfunction b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/rejoin_process.mcfunction deleted file mode 100644 index 40c02677b8..0000000000 --- a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/rejoin_process.mcfunction +++ /dev/null @@ -1,9 +0,0 @@ -#> asset:artifact/0295.call_elemental_familiar/trigger/rejoin_process -# -# 使い方は必ずwikiを見ること -# -# @within tag/function asset:rejoin - -# このfunctionをループさせる - execute if entity @e[type=armor_stand,tag=87.Familiar,limit=1] run schedule function asset:artifact/0295.call_elemental_familiar/trigger/fairy/2.tick 1t - execute if entity @e[type=armor_stand,tag=87.Shot,limit=1] run schedule function asset:artifact/0295.call_elemental_familiar/trigger/shot/2.tick 1t \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/shot/1.init.mcfunction b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/shot/1.init.mcfunction deleted file mode 100644 index 3b4aa42e47..0000000000 --- a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/shot/1.init.mcfunction +++ /dev/null @@ -1,16 +0,0 @@ -#> asset:artifact/0295.call_elemental_familiar/trigger/shot/1.init -# -# 付近の敵へと向きを変える -# -# @within function asset:artifact/0295.call_elemental_familiar/trigger/fairy/4.shoot - -# IDコピー - scoreboard players operation @s 87.UserID = @e[type=armor_stand,tag=87.IDCopyBase,sort=nearest,limit=1] 87.UserID - -# 敵の方を向き、タグを変更 - execute facing entity @e[tag=Enemy,tag=!Uninterferable,distance=..20,sort=nearest,limit=1] feet run tp @s ~ ~ ~ ~ ~-2 - tag @s remove 87.ShotInit - tag @s add 87.Shot - -# 付近に敵がいないなら消える - execute unless entity @e[tag=Enemy,tag=!Uninterferable,distance=..20,sort=nearest,limit=1] run kill @s \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/shot/2.tick.mcfunction b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/shot/2.tick.mcfunction deleted file mode 100644 index 1fae22b385..0000000000 --- a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/shot/2.tick.mcfunction +++ /dev/null @@ -1,14 +0,0 @@ -#> asset:artifact/0295.call_elemental_familiar/trigger/shot/2.tick -# -# ショット動かすやつ -# -# @within function -# asset:artifact/0295.call_elemental_familiar/trigger/fairy/4.shoot -# asset:artifact/0295.call_elemental_familiar/trigger/shot/2.tick -# asset:artifact/0295.call_elemental_familiar/trigger/rejoin_process - -# エンティティに実行させる - execute as @e[type=armor_stand,tag=87.Shot] at @s run function asset:artifact/0295.call_elemental_familiar/trigger/shot/3.main - -# エンティティがいればループ - execute if entity @e[type=armor_stand,tag=87.Shot,limit=1] run schedule function asset:artifact/0295.call_elemental_familiar/trigger/shot/2.tick 1t \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/shot/3.main.mcfunction b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/shot/3.main.mcfunction deleted file mode 100644 index 3a8ede8b93..0000000000 --- a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/shot/3.main.mcfunction +++ /dev/null @@ -1,24 +0,0 @@ -#> asset:artifact/0295.call_elemental_familiar/trigger/shot/3.main -# -# ショットが飛んでいく! -# -# @within function asset:artifact/0295.call_elemental_familiar/trigger/shot/2.tick - -# 移動とパーティクル - tp @s ^ ^ ^0.8 - - # 火属性 - execute if entity @s[tag=87.ShotFire] run particle minecraft:dust 1 0.451 0 1 ~ ~0.5 ~ 0 0 0 0 1 force @a[distance=..30] - execute if entity @s[tag=87.ShotFire] run particle minecraft:flame ~ ~0.5 ~ 0 0 0 0 1 force @a[distance=..30] - # 水属性 - execute if entity @s[tag=87.ShotWater] run particle minecraft:dust 0.298 0.471 0.945 1 ~ ~0.5 ~ 0 0 0 0 1 force @a[distance=..30] - execute if entity @s[tag=87.ShotWater] run particle minecraft:scrape ~ ~0.5 ~ 0 0 0 0 1 force @a[distance=..30] - # 雷属性 - execute if entity @s[tag=87.ShotThunder] run particle minecraft:dust 0.878 1 0.333 1 ~ ~0.5 ~ 0 0 0 0 1 force @a[distance=..30] - execute if entity @s[tag=87.ShotThunder] run particle minecraft:wax_on ~ ~0.5 ~ 0 0 0 0 1 force @a[distance=..30] - -# 正面が地形なら消滅 - execute unless block ^ ^ ^0.8 #lib:no_collision run kill @s - -# モブに接触 - execute positioned ~-0.5 ~-0.5 ~-0.5 if entity @e[tag=Enemy,tag=!Uninterferable,dx=0,sort=nearest,limit=1] positioned ~0.5 ~0.5 ~0.5 run function asset:artifact/0295.call_elemental_familiar/trigger/shot/4.hit \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/shot/4.hit.mcfunction b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/shot/4.hit.mcfunction deleted file mode 100644 index d240650e09..0000000000 --- a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/shot/4.hit.mcfunction +++ /dev/null @@ -1,28 +0,0 @@ -#> asset:artifact/0295.call_elemental_familiar/trigger/shot/4.hit -# -# -# -# @within function asset:artifact/0295.call_elemental_familiar/trigger/shot/3.main - -# 魔法、火属性のダメージをぶちかます - data modify storage lib: Argument.Damage set value 40.0f - data modify storage lib: Argument.AttackType set value "Magic" - execute if entity @s[tag=87.ShotFire] run data modify storage lib: Argument.ElementType set value "Fire" - execute if entity @s[tag=87.ShotThunder] run data modify storage lib: Argument.ElementType set value "Thunder" - execute if entity @s[tag=87.ShotWater] run data modify storage lib: Argument.ElementType set value "Water" - function lib:damage/ - -# 演出 - particle minecraft:crit ~ ~ ~ 0 0 0 0.5 5 - -# マスターとして補正functionを実行 - execute at @a if score @s 87.UserID = @p UserID as @p run function lib:damage/modifier - -# ダメージ実行 - execute as @e[tag=Enemy,tag=!Uninterferable,distance=..3,sort=nearest,limit=1] run function lib:damage/ - -# リセット - function lib:damage/reset - -# ショットを消す - kill @s \ No newline at end of file diff --git a/Asset/data/asset/tags/functions/artifact/load.json b/Asset/data/asset/tags/functions/artifact/load.json index 66f0947310..70b67bf594 100644 --- a/Asset/data/asset/tags/functions/artifact/load.json +++ b/Asset/data/asset/tags/functions/artifact/load.json @@ -47,7 +47,6 @@ "asset:artifact/0907.rod_of_rain/trigger/0.load", "asset:artifact/0218.iron_storm/trigger/0.load", "asset:artifact/0152.call_cat/trigger/0.load", - "asset:artifact/0295.call_elemental_familiar/trigger/0.load", "asset:artifact/0278.reveille/trigger/0.load", "asset:artifact/0456.potion_of_stalling_power/trigger/0.load", "asset:artifact/0078.self_destruct_order/trigger/0.load", diff --git a/Asset/data/asset/tags/functions/rejoin.json b/Asset/data/asset/tags/functions/rejoin.json index 634c515fb2..81655e22fb 100644 --- a/Asset/data/asset/tags/functions/rejoin.json +++ b/Asset/data/asset/tags/functions/rejoin.json @@ -29,7 +29,6 @@ "asset:artifact/0976.brave_sword/trigger/rejoin_process", "asset:artifact/0953.meteor_rain/trigger/rejoin_process", "asset:artifact/0981.soulfire_burst/trigger/rejoin_process", - "asset:artifact/0295.call_elemental_familiar/trigger/rejoin_process", "asset:artifact/0973.call_rod_spirit/trigger/rejoin_process", "asset:mob/0120.convict/rejoin_process", "asset:artifact/0172.icicle/trigger/rejoin_process", From ec1958e8f04ea757e54ee6e719197d7d8000c164 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Wed, 27 Nov 2024 01:24:02 +0900 Subject: [PATCH 07/12] =?UTF-8?q?=E5=B1=9E=E6=80=A7=E3=82=BF=E3=82=B0?= =?UTF-8?q?=E3=82=92=E4=BD=BF=E3=82=8F=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 --- .../object/1055.elemental_fish/_index.d.mcfunction | 3 --- .../object/1055.elemental_fish/init/.mcfunction | 11 +++-------- .../object/1055.elemental_fish/tick/.mcfunction | 12 ++++++------ .../object/1056.elemental_bullet/_index.d.mcfunction | 8 -------- .../1056.elemental_bullet/hit_entity/.mcfunction | 4 +--- .../object/1056.elemental_bullet/init/.mcfunction | 6 ++---- .../object/1056.elemental_bullet/tick/.mcfunction | 12 ++++++------ 7 files changed, 18 insertions(+), 38 deletions(-) delete mode 100644 Asset/data/asset/functions/object/1056.elemental_bullet/_index.d.mcfunction diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/_index.d.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/_index.d.mcfunction index fb5adc425f..893174c8ae 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/_index.d.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/_index.d.mcfunction @@ -3,9 +3,6 @@ #> tag # @within function asset:object/1055.elemental_fish/** - #declare tag 1055.Fire - #declare tag 1055.Water - #declare tag 1055.Thunder #declare tag 1055.Foward #declare tag 1055.Upper #declare tag 1055.Lower diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction index 1438967fe2..346b098211 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction @@ -18,15 +18,10 @@ # 近くの誰かを見る execute facing entity @p eyes run tp @s ~ ~ ~ ~ ~ -# 属性Tag設定 - execute if data storage asset:context this{Element:Fire} run tag @s add 1055.Fire - execute if data storage asset:context this{Element:Water} run tag @s add 1055.Water - execute if data storage asset:context this{Element:Thunder} run tag @s add 1055.Thunder - # 見た目を設定 - execute if entity @s[tag=1055.Fire] run data modify entity @s item set value {id:"stick",Count:1b,tag:{CustomModelData:20230}} - execute if entity @s[tag=1055.Thunder] run data modify entity @s item set value {id:"stick",Count:1b,tag:{CustomModelData:20231}} - execute if entity @s[tag=1055.Water] run data modify entity @s item set value {id:"stick",Count:1b,tag:{CustomModelData:20232}} + execute if data storage asset:context this{Element:Fire} run data modify entity @s item set value {id:"stick",Count:1b,tag:{CustomModelData:20230}} + execute if data storage asset:context this{Element:Thunder} run data modify entity @s item set value {id:"stick",Count:1b,tag:{CustomModelData:20231}} + execute if data storage asset:context this{Element:Water} run data modify entity @s item set value {id:"stick",Count:1b,tag:{CustomModelData:20232}} # 継承 function asset:object/super.init diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/tick/.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/tick/.mcfunction index db6a13b677..291929504a 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/tick/.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/tick/.mcfunction @@ -26,14 +26,14 @@ execute at @s run function asset:object/super.tick # パーティクル - execute if entity @s[tag=1055.Fire] positioned ^ ^ ^-0.3 run particle dust 1 0 0 0.5 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] - execute if entity @s[tag=1055.Fire] positioned ^ ^ ^-0.3 run particle dust 1 0.5 0 0.7 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] + execute if data storage asset:context this{Element:Fire} positioned ^ ^ ^-0.3 run particle dust 1 0 0 0.5 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] + execute if data storage asset:context this{Element:Fire} positioned ^ ^ ^-0.3 run particle dust 1 0.5 0 0.7 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] - execute if entity @s[tag=1055.Thunder] positioned ^ ^ ^-0.3 run particle dust 1 1 0 0.5 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] - execute if entity @s[tag=1055.Thunder] positioned ^ ^ ^-0.3 run particle dust 1 1 0.7 0.7 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] + execute if data storage asset:context this{Element:Thunder} positioned ^ ^ ^-0.3 run particle dust 1 1 0 0.5 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] + execute if data storage asset:context this{Element:Thunder} positioned ^ ^ ^-0.3 run particle dust 1 1 0.7 0.7 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] - execute if entity @s[tag=1055.Water] positioned ^ ^ ^-0.3 run particle dust 0 0.267 1 0.5 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] - execute if entity @s[tag=1055.Water] positioned ^ ^ ^-0.3 run particle dust 0 0.667 1 0.7 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] + execute if data storage asset:context this{Element:Water} positioned ^ ^ ^-0.3 run particle dust 0 0.267 1 0.5 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] + execute if data storage asset:context this{Element:Water} positioned ^ ^ ^-0.3 run particle dust 0 0.667 1 0.7 ~ ~ ~ 0.1 0.1 0.1 0 1 force @a[distance=..40] # 付近に敵がいるならスコア増やす execute if entity @e[type=#lib:living,tag=Enemy,distance=..15] run scoreboard players add @s 1055.Attack 1 diff --git a/Asset/data/asset/functions/object/1056.elemental_bullet/_index.d.mcfunction b/Asset/data/asset/functions/object/1056.elemental_bullet/_index.d.mcfunction deleted file mode 100644 index 3670f6e15b..0000000000 --- a/Asset/data/asset/functions/object/1056.elemental_bullet/_index.d.mcfunction +++ /dev/null @@ -1,8 +0,0 @@ -#> asset:object/1056.elemental_bullet/_index.d -# @private - -#> tag -# @within function asset:object/1056.elemental_bullet/** - #declare tag 1056.Fire - #declare tag 1056.Water - #declare tag 1056.Thunder diff --git a/Asset/data/asset/functions/object/1056.elemental_bullet/hit_entity/.mcfunction b/Asset/data/asset/functions/object/1056.elemental_bullet/hit_entity/.mcfunction index 5e5a73f91d..8268f393d5 100644 --- a/Asset/data/asset/functions/object/1056.elemental_bullet/hit_entity/.mcfunction +++ b/Asset/data/asset/functions/object/1056.elemental_bullet/hit_entity/.mcfunction @@ -17,9 +17,7 @@ # ダメージ data modify storage api: Argument.Damage set value 40.0f data modify storage api: Argument.AttackType set value "Magic" - execute if entity @s[tag=1056.Fire] run data modify storage api: Argument.ElementType set value "Fire" - execute if entity @s[tag=1056.Thunder] run data modify storage api: Argument.ElementType set value "Thunder" - execute if entity @s[tag=1056.Water] run data modify storage api: Argument.ElementType set value "Water" + data modify storage api: Argument.ElementType set from storage asset:context this.Element function api:damage/ execute at @a if score $1056.Owner Temporary = @p UserID as @p run function api:damage/modifier execute positioned ~-0.5 ~-0.5 ~-0.5 as @e[type=#lib:living,tag=Enemy,dx=0,sort=nearest,limit=1] run function api:damage/ diff --git a/Asset/data/asset/functions/object/1056.elemental_bullet/init/.mcfunction b/Asset/data/asset/functions/object/1056.elemental_bullet/init/.mcfunction index 03f6527d20..c5e82f48b4 100644 --- a/Asset/data/asset/functions/object/1056.elemental_bullet/init/.mcfunction +++ b/Asset/data/asset/functions/object/1056.elemental_bullet/init/.mcfunction @@ -12,10 +12,8 @@ data modify storage asset:context this.Range set value 40 data modify storage asset:context this.MovePerStep set value 0.8 -# 属性Tag設定 - execute if data storage asset:context this{Element:Fire} run tag @s add 1056.Fire - execute if data storage asset:context this{Element:Water} run tag @s add 1056.Water - execute if data storage asset:context this{Element:Thunder} run tag @s add 1056.Thunder +# debug : 属性が未設定の場合ログを出す + execute unless data storage asset:context this.Element run say "属性が未設定です" # 継承 function asset:object/super.init diff --git a/Asset/data/asset/functions/object/1056.elemental_bullet/tick/.mcfunction b/Asset/data/asset/functions/object/1056.elemental_bullet/tick/.mcfunction index ddbd0894bc..a8b743cdaa 100644 --- a/Asset/data/asset/functions/object/1056.elemental_bullet/tick/.mcfunction +++ b/Asset/data/asset/functions/object/1056.elemental_bullet/tick/.mcfunction @@ -8,14 +8,14 @@ scoreboard players add @s General.Object.Tick 1 # 火属性 - execute if entity @s[tag=1056.Fire] run particle minecraft:dust 1 0.451 0 1 ~ ~0.5 ~ 0 0 0 0 1 normal @a - execute if entity @s[tag=1056.Fire] run particle minecraft:flame ~ ~0.5 ~ 0 0 0 0 1 normal @a + execute if data storage asset:context this{Element:Fire} run particle minecraft:dust 1 0.451 0 1 ~ ~0.5 ~ 0 0 0 0 1 normal @a + execute if data storage asset:context this{Element:Fire} run particle minecraft:flame ~ ~0.5 ~ 0 0 0 0 1 normal @a # 水属性 - execute if entity @s[tag=1056.Water] run particle minecraft:dust 0.298 0.471 0.945 1 ~ ~0.5 ~ 0 0 0 0 1 normal @a - execute if entity @s[tag=1056.Water] run particle minecraft:scrape ~ ~0.5 ~ 0 0 0 0 1 normal @a + execute if data storage asset:context this{Element:Water} run particle minecraft:dust 0.298 0.471 0.945 1 ~ ~0.5 ~ 0 0 0 0 1 normal @a + execute if data storage asset:context this{Element:Water} run particle minecraft:scrape ~ ~0.5 ~ 0 0 0 0 1 normal @a # 雷属性 - execute if entity @s[tag=1056.Thunder] run particle minecraft:dust 0.878 1 0.333 1 ~ ~0.5 ~ 0 0 0 0 1 normal @a - execute if entity @s[tag=1056.Thunder] run particle minecraft:wax_on ~ ~0.5 ~ 0 0 0 0 1 normal @a + execute if data storage asset:context this{Element:Thunder} run particle minecraft:dust 0.878 1 0.333 1 ~ ~0.5 ~ 0 0 0 0 1 normal @a + execute if data storage asset:context this{Element:Thunder} run particle minecraft:wax_on ~ ~0.5 ~ 0 0 0 0 1 normal @a # 継承 execute at @s run function asset:object/super.tick From 581a1a647f57f6659d4b0a5f3268b1ea6539ee54 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Wed, 27 Nov 2024 01:26:13 +0900 Subject: [PATCH 08/12] =?UTF-8?q?=E3=83=80=E3=83=A1=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=82=92=E7=A5=9E=E5=99=A8=E5=81=B4=E3=81=A7?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=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/summon_fairy.mcfunction | 3 +++ .../functions/object/1055.elemental_fish/tick/shoot.mcfunction | 3 +++ .../object/1056.elemental_bullet/hit_entity/.mcfunction | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/summon_fairy.mcfunction b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/summon_fairy.mcfunction index 8e47ced2b4..8b6ce509db 100644 --- a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/summon_fairy.mcfunction +++ b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/summon_fairy.mcfunction @@ -12,6 +12,9 @@ execute store result score $Random Temporary run function lib:random/ scoreboard players operation $Random Temporary %= $3 Const +# ダメージ設定 + data modify storage api: Argument.FieldOverride.Damage set value 40.0f + # 属性を決める execute if score $Random Temporary matches 0 run data modify storage api: Argument.FieldOverride.Element set value "Fire" execute if score $Random Temporary matches 1 run data modify storage api: Argument.FieldOverride.Element set value "Thunder" diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/tick/shoot.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/tick/shoot.mcfunction index b838b973a3..838986fc2f 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/tick/shoot.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/tick/shoot.mcfunction @@ -12,6 +12,9 @@ # 属性設定 data modify storage api: Argument.FieldOverride.Element set from storage asset:context this.Element +# ダメージ量 + data modify storage api: Argument.FieldOverride.Damage set from storage asset:context this.Damage + # UserID data modify storage api: Argument.FieldOverride.UserID set from storage asset:context this.UserID diff --git a/Asset/data/asset/functions/object/1056.elemental_bullet/hit_entity/.mcfunction b/Asset/data/asset/functions/object/1056.elemental_bullet/hit_entity/.mcfunction index 8268f393d5..d487507c6a 100644 --- a/Asset/data/asset/functions/object/1056.elemental_bullet/hit_entity/.mcfunction +++ b/Asset/data/asset/functions/object/1056.elemental_bullet/hit_entity/.mcfunction @@ -15,7 +15,7 @@ particle minecraft:crit ~ ~ ~ 0 0 0 0.5 5 # ダメージ - data modify storage api: Argument.Damage set value 40.0f + data modify storage api: Argument.Damage set from storage asset:context this.Damage data modify storage api: Argument.AttackType set value "Magic" data modify storage api: Argument.ElementType set from storage asset:context this.Element function api:damage/ From c6c8b1f48cd6eef564da4a18e821589f99c07539 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Wed, 27 Nov 2024 01:26:55 +0900 Subject: [PATCH 09/12] =?UTF-8?q?=E7=A5=9E=E5=99=A8=E3=81=AB=E8=A8=AD?= =?UTF-8?q?=E5=AE=9A=E3=81=97=E3=81=A6=E3=81=82=E3=81=A3=E3=81=9F=E5=A6=96?= =?UTF-8?q?=E7=B2=BE=E5=81=B4=E3=81=AE=E9=9F=B3=E3=82=92object=E3=81=B8?= =?UTF-8?q?=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../0295.call_elemental_familiar/trigger/3.main.mcfunction | 2 -- .../asset/functions/object/1055.elemental_fish/init/.mcfunction | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/3.main.mcfunction b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/3.main.mcfunction index 0a4c9de1a5..8f26ca0c55 100644 --- a/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/3.main.mcfunction +++ b/Asset/data/asset/functions/artifact/0295.call_elemental_familiar/trigger/3.main.mcfunction @@ -18,5 +18,3 @@ playsound minecraft:item.bottle.fill_dragonbreath player @a ~ ~ ~ 2 2 playsound minecraft:entity.experience_orb.pickup player @a ~ ~ ~ 2 1.75 playsound minecraft:entity.ender_eye.death player @a ~ ~ ~ 2 2 - playsound minecraft:entity.vex.ambient neutral @a ~ ~ ~ 1 1.75 - playsound minecraft:entity.vex.ambient neutral @a ~ ~ ~ 1 2 diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction index 346b098211..e04fea01a2 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/init/.mcfunction @@ -6,6 +6,8 @@ # 演出 particle poof ~ ~0.5 ~ 0.1 0.1 0.1 0.05 5 + playsound minecraft:entity.vex.ambient neutral @a ~ ~ ~ 1 1.75 + playsound minecraft:entity.vex.ambient neutral @a ~ ~ ~ 1 2 # スピード設定 data modify storage asset:context this.Speed set value 1 From de0b63c39e19b085e7fa6381c6d36dfb1becd106 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Fri, 6 Dec 2024 03:07:12 +0900 Subject: [PATCH 10/12] =?UTF-8?q?Tag=E5=90=8D=E3=83=9F=E3=82=B9=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 --- .../functions/object/1055.elemental_fish/_index.d.mcfunction | 2 +- .../object/1055.elemental_fish/detect_hit_block/.mcfunction | 2 +- .../object/1055.elemental_fish/hit_block/.mcfunction | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/_index.d.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/_index.d.mcfunction index 893174c8ae..7031a8fadd 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/_index.d.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/_index.d.mcfunction @@ -3,6 +3,6 @@ #> tag # @within function asset:object/1055.elemental_fish/** - #declare tag 1055.Foward + #declare tag 1055.Forward #declare tag 1055.Upper #declare tag 1055.Lower diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/detect_hit_block/.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/detect_hit_block/.mcfunction index 6f42559904..c8d1aecb77 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/detect_hit_block/.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/detect_hit_block/.mcfunction @@ -16,4 +16,4 @@ # 前方にブロック execute unless block ^ ^ ^0.5 #lib:no_collision run data modify storage asset:context IsHitBlock set value true - execute unless block ^ ^ ^0.5 #lib:no_collision run tag @s add 1055.Foward + execute unless block ^ ^ ^0.5 #lib:no_collision run tag @s add 1055.Forward diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/hit_block/.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/hit_block/.mcfunction index 913a55a990..7ef09413f6 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/hit_block/.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/hit_block/.mcfunction @@ -7,9 +7,9 @@ # 向きを変える execute if entity @s[tag=1055.Upper] at @s run tp @s ~ ~ ~ ~ ~-35 execute if entity @s[tag=1055.Lower] at @s run tp @s ~ ~ ~ ~ ~80 - execute if entity @s[tag=1055.Foward] at @s run tp @s ~ ~ ~ ~20 ~-20 + execute if entity @s[tag=1055.Forward] at @s run tp @s ~ ~ ~ ~20 ~-20 # リセット - tag @s remove 1055.Foward + tag @s remove 1055.Forward tag @s remove 1055.Upper tag @s remove 1055.Lower From c422fb71646e3c52aea0e9176f734f5cc33935c7 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Fri, 6 Dec 2024 03:29:21 +0900 Subject: [PATCH 11/12] =?UTF-8?q?=E3=83=87=E3=83=90=E3=83=83=E3=82=B0?= =?UTF-8?q?=E7=94=A8=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../functions/object/1056.elemental_bullet/init/.mcfunction | 3 --- 1 file changed, 3 deletions(-) diff --git a/Asset/data/asset/functions/object/1056.elemental_bullet/init/.mcfunction b/Asset/data/asset/functions/object/1056.elemental_bullet/init/.mcfunction index c5e82f48b4..8ab7817629 100644 --- a/Asset/data/asset/functions/object/1056.elemental_bullet/init/.mcfunction +++ b/Asset/data/asset/functions/object/1056.elemental_bullet/init/.mcfunction @@ -12,8 +12,5 @@ data modify storage asset:context this.Range set value 40 data modify storage asset:context this.MovePerStep set value 0.8 -# debug : 属性が未設定の場合ログを出す - execute unless data storage asset:context this.Element run say "属性が未設定です" - # 継承 function asset:object/super.init From dc0d6c007e4e4e59d6d8ad139ad071a9b3e882f5 Mon Sep 17 00:00:00 2001 From: Lapis-LJA <87566955+Lapis-LJA@users.noreply.github.com> Date: Fri, 6 Dec 2024 03:32:15 +0900 Subject: [PATCH 12/12] =?UTF-8?q?=E3=83=95=E3=82=A3=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=83=89=E3=81=AB=E5=88=9D=E6=9C=9F=E5=80=A4=E3=82=92=E5=AE=9A?= =?UTF-8?q?=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../functions/object/1055.elemental_fish/register.mcfunction | 4 +++- .../object/1056.elemental_bullet/register.mcfunction | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Asset/data/asset/functions/object/1055.elemental_fish/register.mcfunction b/Asset/data/asset/functions/object/1055.elemental_fish/register.mcfunction index c55f7b1af7..417f35beac 100644 --- a/Asset/data/asset/functions/object/1055.elemental_fish/register.mcfunction +++ b/Asset/data/asset/functions/object/1055.elemental_fish/register.mcfunction @@ -15,4 +15,6 @@ # ID (int) data modify storage asset:object ID set value 1055 # フィールド(オプション) - # data modify storage asset:object Field.myValue set value + data modify storage asset:object Field.Damage set value 1f + data modify storage asset:object Field.Element set value "Fire" + data modify storage asset:object Field.UserID set value -1 diff --git a/Asset/data/asset/functions/object/1056.elemental_bullet/register.mcfunction b/Asset/data/asset/functions/object/1056.elemental_bullet/register.mcfunction index b9c4cacf88..27362d4a8c 100644 --- a/Asset/data/asset/functions/object/1056.elemental_bullet/register.mcfunction +++ b/Asset/data/asset/functions/object/1056.elemental_bullet/register.mcfunction @@ -15,4 +15,6 @@ # ID (int) data modify storage asset:object ID set value 1056 # フィールド(オプション) - # data modify storage asset:object Field.myValue set value + data modify storage asset:object Field.Damage set value 1f + data modify storage asset:object Field.Element set value "Fire" + data modify storage asset:object Field.UserID set value -1