Skip to content

Commit 1dd6010

Browse files
authored
♻️ [Artifact 441] 待望の瞬間のマガジンマークの表示を ObjectAsset に移行 (#1055)
1 parent 465c464 commit 1dd6010

File tree

11 files changed

+101
-2
lines changed

11 files changed

+101
-2
lines changed

Asset/data/asset/functions/artifact/0441.awaited_opportunity/trigger/message/.mcfunction

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
# @private
99
#declare score_holder $Random
1010

11-
# マガジンマーク召喚
12-
execute as @e[type=#lib:living,type=!player,tag=Victim,distance=..150] at @s positioned ~ ~1 ~ run summon area_effect_cloud ^0.5 ^ ^ {CustomNameVisible:1b,Radius:0f,Duration:20,CustomName:'{"text":"!?","bold":true}'}
1311
# 効果音
1412
playsound minecraft:item.trident.return player @a ~ ~ ~ 1 0
1513

@@ -44,6 +42,9 @@
4442
# プレイヤーが"不運"と"踊"っちまった時
4543
execute if score $Random Temporary matches 11 run function asset:artifact/0441.awaited_opportunity/trigger/message/hardluck
4644

45+
# "不運"と"踊"ってないときは敵の位置にマガジンマーク召喚
46+
execute unless score $Random Temporary matches 11 at @e[type=#lib:living,type=!player,tag=Victim,distance=..6] anchored eyes positioned ^1.0 ^ ^ run function asset:artifact/0441.awaited_opportunity/trigger/message/magazine_mark
47+
4748
# スピードの向こう側
4849
execute if score $Random Temporary matches 13 run function asset:artifact/0441.awaited_opportunity/trigger/message/beyond_the_speed
4950

Asset/data/asset/functions/artifact/0441.awaited_opportunity/trigger/message/hardluck.mcfunction

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
# プレイヤーが"不運"と"踊"っちまった時
88
tellraw @a[distance=..30] [{"text":"<","color":"white"},{"selector":"@s"},{"text":"> "},{"text":"があああああッ・・!!"}]
99

10+
# マガジンマーク召喚
11+
execute anchored eyes positioned ^1.0 ^ ^ run function asset:artifact/0441.awaited_opportunity/trigger/message/magazine_mark
12+
1013
# “不運”と“踊”る(ID:294)を付与
1114
data modify storage api: Argument.ID set value 294
1215
function api:entity/mob/effect/give
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#> asset:artifact/0441.awaited_opportunity/trigger/message/magazine_mark
2+
#
3+
# !?
4+
#
5+
# @within function
6+
# asset:artifact/0441.awaited_opportunity/trigger/message/
7+
# asset:artifact/0441.awaited_opportunity/trigger/message/hardluck
8+
9+
# !?を召喚
10+
data modify storage api: Argument.ID set value 1105
11+
function api:object/summon
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#> asset:object/1105.magazine_mark/register
2+
#
3+
# Objectのデータを指定
4+
#
5+
# @within function asset:object/alias/1105/register
6+
7+
# 継承(オプション)
8+
# data modify storage asset:object Extends append value
9+
# function asset:object/extends
10+
# 他のObjectに継承されることを許可するか (boolean) (オプション)
11+
# data modify storage asset:object ExtendsSafe set value
12+
# 継承されることを前提とした、抽象的なObjectであるかどうか(boolean)
13+
data modify storage asset:object IsAbstract set value false
14+
# Tickするかどうか(boolean) (オプション)
15+
# data modify storage asset:object IsTicking set value
16+
17+
# ID (int)
18+
data modify storage asset:object ID set value 1105
19+
# フィールド(オプション)
20+
# data modify storage asset:object Field.myValue set value
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#> asset:object/1105.magazine_mark/summon/
2+
#
3+
# Object召喚処理の呼び出し時に実行されるfunction
4+
#
5+
# @within asset:object/alias/1105/summon
6+
7+
# 元となるEntityを召喚する
8+
execute as 0-0-0-0-0 in minecraft:overworld positioned as @s run tp @s ~ ~ ~ ~ ~
9+
data modify storage asset:temp Args.Rotation set from entity 0-0-0-0-0 Rotation
10+
function asset:object/1105.magazine_mark/summon/m with storage asset:temp Args
11+
data remove storage asset:temp Args
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#> asset:object/1105.magazine_mark/summon/debug
2+
#
3+
# 動作チェック用の召喚処理 使い終わったら消してもいいかも
4+
#
5+
# @user
6+
# @private
7+
8+
# 召喚
9+
data modify storage api: Argument.ID set value 1105
10+
function api:object/summon
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#> asset:object/1105.magazine_mark/summon/m
2+
#
3+
# @input args:
4+
# Rotation : float @ 2
5+
# @within function asset:object/1105.magazine_mark/summon/
6+
7+
# 召喚
8+
$summon text_display ~ ~ ~ {Rotation:$(Rotation),Tags:["ObjectInit"],transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],translation:[0f,0f,0f],scale:[2f,2f,2f]},text:'{"text":"!?","bold":true}'}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#> asset:object/1105.magazine_mark/tick/
2+
#
3+
# Objectのtick時の処理
4+
#
5+
# @within asset:object/alias/1105/tick
6+
7+
# Tick加算
8+
scoreboard players add @s General.Object.Tick 1
9+
10+
# 消滅処理
11+
kill @s[scores={General.Object.Tick=20..}]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#> asset:object/alias/1105/register
2+
#
3+
# Objectのデータ指定処理のエイリアス
4+
#
5+
# @within asset_manager:object/summon/register.m
6+
7+
# 元の登録処理を呼び出す
8+
function asset:object/1105.magazine_mark/register
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#> asset:object/alias/1105/summon
2+
#
3+
# Object召喚処理のエイリアス
4+
#
5+
# @within asset_manager:object/summon/summon.m
6+
7+
# 元の召喚処理を呼び出す
8+
function asset:object/1105.magazine_mark/summon/

0 commit comments

Comments
 (0)