diff --git a/Asset/data/asset/functions/object/1019.voltage_bullet/kill/.mcfunction b/Asset/data/asset/functions/object/1019.voltage_bullet/kill/.mcfunction index 908d855162..00c073a0b7 100644 --- a/Asset/data/asset/functions/object/1019.voltage_bullet/kill/.mcfunction +++ b/Asset/data/asset/functions/object/1019.voltage_bullet/kill/.mcfunction @@ -8,9 +8,13 @@ # @private #declare score_holder $UserID +# 演出用Object + data modify storage api: Argument.ID set value 1183 + function api:object/summon + # 演出 particle firework ~ ~ ~ 0 0 0 0.2 30 normal @a - particle dust 5 20000000 3 1.5 ~ ~ ~ 0.5 0.5 0.5 0 60 normal @a + # particle dust 5 20000000 3 1.5 ~ ~ ~ 0.5 0.5 0.5 0 60 normal @a playsound entity.firework_rocket.twinkle neutral @a ~ ~ ~ 0.3 2 0 playsound entity.firework_rocket.twinkle neutral @a ~ ~ ~ 0.3 1.5 0 playsound item.trident.return neutral @a ~ ~ ~ 0.5 2 0 diff --git a/Asset/data/asset/functions/object/1183.voltage_effect/init/.mcfunction b/Asset/data/asset/functions/object/1183.voltage_effect/init/.mcfunction new file mode 100644 index 0000000000..7af659cb32 --- /dev/null +++ b/Asset/data/asset/functions/object/1183.voltage_effect/init/.mcfunction @@ -0,0 +1,14 @@ +#> asset:object/1183.voltage_effect/init/ +# +# Objectのinit時の処理 +# +# @within asset:object/alias/1183/init + +# ランダムにIndex設定 + execute store result storage asset:context this.Index int 1 run random value 0..2 + +# 4回append + function asset:object/1183.voltage_effect/init/append/ + function asset:object/1183.voltage_effect/init/append/ + function asset:object/1183.voltage_effect/init/append/ + function asset:object/1183.voltage_effect/init/append/ diff --git a/Asset/data/asset/functions/object/1183.voltage_effect/init/append/.mcfunction b/Asset/data/asset/functions/object/1183.voltage_effect/init/append/.mcfunction new file mode 100644 index 0000000000..e04470166f --- /dev/null +++ b/Asset/data/asset/functions/object/1183.voltage_effect/init/append/.mcfunction @@ -0,0 +1,22 @@ +#> asset:object/1183.voltage_effect/init/append/ +# +# +# +# @within function asset:object/1183.voltage_effect/init/ + +#> Private +# @private + #declare score_holder $Index + +# ランダム + execute store result storage asset:context this.Random int 1 run random value 0..2 + +# Index + execute store result score $Index Temporary run data get storage asset:context this.Index + scoreboard players add $Index Temporary 1 + execute if score $Index Temporary matches 3.. run scoreboard players set $Index Temporary 0 + execute store result storage asset:context this.Index int 1 run scoreboard players get $Index Temporary + scoreboard players reset $Index Temporary + +# do + function asset:object/1183.voltage_effect/init/append/do.m with storage asset:context this diff --git a/Asset/data/asset/functions/object/1183.voltage_effect/init/append/do.m.mcfunction b/Asset/data/asset/functions/object/1183.voltage_effect/init/append/do.m.mcfunction new file mode 100644 index 0000000000..8b286dc885 --- /dev/null +++ b/Asset/data/asset/functions/object/1183.voltage_effect/init/append/do.m.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/1183.voltage_effect/init/append/do.m +# +# +# +# @within function asset:object/1183.voltage_effect/init/append/ + +# + $data modify storage asset:context this.List append from storage asset:context this.ColorList.$(Random)[$(Index)] diff --git a/Asset/data/asset/functions/object/1183.voltage_effect/register.mcfunction b/Asset/data/asset/functions/object/1183.voltage_effect/register.mcfunction new file mode 100644 index 0000000000..11b7573e25 --- /dev/null +++ b/Asset/data/asset/functions/object/1183.voltage_effect/register.mcfunction @@ -0,0 +1,23 @@ +#> asset:object/1183.voltage_effect/register +# +# Objectのデータを指定 +# +# @within function asset:object/alias/1183/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 1183 +# フィールド(オプション) + data modify storage asset:object Field.List set value [] + data modify storage asset:object Field.ColorList.0 set value ["0","1","2"] + data modify storage asset:object Field.ColorList.1 set value ["3","4","5"] + data modify storage asset:object Field.ColorList.2 set value ["6","7","8"] diff --git a/Asset/data/asset/functions/object/1183.voltage_effect/summon/.mcfunction b/Asset/data/asset/functions/object/1183.voltage_effect/summon/.mcfunction new file mode 100644 index 0000000000..8e61ae744a --- /dev/null +++ b/Asset/data/asset/functions/object/1183.voltage_effect/summon/.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/1183.voltage_effect/summon/ +# +# Object召喚処理の呼び出し時に実行されるfunction +# +# @within asset:object/alias/1183/summon + +# 元となるEntityを召喚する + summon text_display ~ ~ ~ {Tags:["ObjectInit"],billboard:"center",alignment:"center",brightness:{sky:15,block:15},transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[2f,2f,0f]},background:16711680} diff --git a/Asset/data/asset/functions/object/1183.voltage_effect/tick/.mcfunction b/Asset/data/asset/functions/object/1183.voltage_effect/tick/.mcfunction new file mode 100644 index 0000000000..ee08b27301 --- /dev/null +++ b/Asset/data/asset/functions/object/1183.voltage_effect/tick/.mcfunction @@ -0,0 +1,16 @@ +#> asset:object/1183.voltage_effect/tick/ +# +# Objectのtick時の処理 +# +# @within asset:object/alias/1183/tick + +# 消滅処理 + execute unless data storage asset:context this.List[0] run kill @s + +# 適用 + data modify storage asset:temp _.Char set from storage asset:context this.List[-1] + function asset:object/1183.voltage_effect/tick/apply_char.m with storage asset:temp _ + data remove storage asset:context this.List[-1] + +# リセット + data remove storage asset:temp _ diff --git a/Asset/data/asset/functions/object/1183.voltage_effect/tick/apply_char.m.mcfunction b/Asset/data/asset/functions/object/1183.voltage_effect/tick/apply_char.m.mcfunction new file mode 100644 index 0000000000..c7d6a130b4 --- /dev/null +++ b/Asset/data/asset/functions/object/1183.voltage_effect/tick/apply_char.m.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/1183.voltage_effect/tick/apply_char.m +# +# +# +# @within function asset:object/1183.voltage_effect/tick/ + +# + $data modify entity @s text set value '{"text":"$(Char)","font":"object/1183"}' diff --git a/Asset/data/asset/functions/object/alias/1183/init.mcfunction b/Asset/data/asset/functions/object/alias/1183/init.mcfunction new file mode 100644 index 0000000000..0875cae67b --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1183/init.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1183/init +# +# Init処理のエイリアス +# +# @within asset_manager:object/init/init.m + +# 元のInit処理を呼び出す + function asset:object/1183.voltage_effect/init/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1183/register.mcfunction b/Asset/data/asset/functions/object/alias/1183/register.mcfunction new file mode 100644 index 0000000000..747d6dc5e8 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1183/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1183/register +# +# Objectのデータ指定処理のエイリアス +# +# @within asset_manager:object/summon/register.m + +# 元の登録処理を呼び出す + function asset:object/1183.voltage_effect/register \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1183/summon.mcfunction b/Asset/data/asset/functions/object/alias/1183/summon.mcfunction new file mode 100644 index 0000000000..e69db533c0 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1183/summon.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1183/summon +# +# Object召喚処理のエイリアス +# +# @within asset_manager:object/summon/summon.m + +# 元の召喚処理を呼び出す + function asset:object/1183.voltage_effect/summon/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1183/tick.mcfunction b/Asset/data/asset/functions/object/alias/1183/tick.mcfunction new file mode 100644 index 0000000000..c7687a4a81 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1183/tick.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1183/tick +# +# Tick時処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のTick処理を呼び出す + function asset:object/1183.voltage_effect/tick/ \ No newline at end of file