Skip to content

Commit bde1961

Browse files
committed
完成
1 parent 2d5755a commit bde1961

File tree

12 files changed

+214
-13
lines changed

12 files changed

+214
-13
lines changed

Asset/data/asset/functions/artifact/1306.will_o_wisp/give/2.give.mcfunction

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# 神器の名前 (TextComponentString)
1616
data modify storage asset:artifact Name set value '{"text":"鬼火","color":"aqua"}'
1717
# 神器の説明文 (TextComponentString[])
18-
data modify storage asset:artifact Lore set value ['{"text":"前方の敵1体に鬼火を5秒間付与する","color":"white"}','{"translate":"鬼火のダメージは自身の最大体力の%s分アップする","with":[{"text":"50%","color":"white"}]}']
18+
data modify storage asset:artifact Lore set value ['{"text":"前方の敵1体にダメージを与え、鬼火を5秒間付与する","color":"white"}','{"translate":"鬼火のダメージは自身の最大体力の%s分アップする","with":[{"text":"20%","color":"white"}]}']
1919
# 消費アイテム ({Item: TextComponent, Count: int, Extra?: TextComponent}) (オプション)
2020
# data modify storage asset:artifact ConsumeItem.Item set value '{"translate":"item.minecraft.stick"}'
2121
# data modify storage asset:artifact ConsumeItem.Count set value 1
@@ -29,7 +29,7 @@
2929
# 神器の発動条件 (TextComponentString) (オプション)
3030
# data modify storage asset:artifact Condition set value
3131
# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション)
32-
data modify storage asset:artifact AttackInfo.Damage set value "50x5"
32+
data modify storage asset:artifact AttackInfo.Damage set value "100+50x5"
3333
# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション)
3434
data modify storage asset:artifact AttackInfo.AttackType set value [Magic]
3535
# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション)

Asset/data/asset/functions/artifact/1306.will_o_wisp/trigger/3.main.mcfunction

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,22 @@
1010
# ここから先は神器側の効果の処理を書く
1111

1212
# ターゲット選定
13+
# 何段階かターゲット選択処理をする
14+
1315
# 前方の敵1体をターゲットとする
14-
16+
execute anchored eyes positioned ^ ^ ^ run function asset:artifact/1306.will_o_wisp/trigger/target/line_of_sight
17+
18+
# ターゲットがいなければ、前方の近くの敵をターゲットとする
19+
execute unless entity @e[type=#lib:living_without_player,tag=10A.Target,distance=..10] run function asset:artifact/1306.will_o_wisp/trigger/target/forward/
20+
21+
# ここまでしてターゲットがいなければ前方で演出
22+
execute unless entity @e[type=#lib:living_without_player,tag=10A.Target,distance=..10] anchored eyes positioned ^ ^-0.5 ^4.5 rotated ~ 0 run function asset:artifact/1306.will_o_wisp/trigger/vfx
1523

24+
# ターゲットにダメージやエフェクト等
25+
execute as @e[type=#lib:living_without_player,tag=10A.Target,distance=..10] at @s run function asset:artifact/1306.will_o_wisp/trigger/damage_and_effect
1626

17-
# エフェクト付与
18-
data modify storage api: Argument.ID set value 339
19-
data modify storage api: Argument.Duration set value 100
20-
data modify storage api: Argument.FieldOverride.AdditionalMPHeal set from storage api: PersistentArgument.AdditionalMPHeal
21-
execute as @e[type=#lib:living,tag=Enemy,tag=!Uninterferable,distance=..5,sort=nearest,limit=1] run function api:entity/mob/effect/give
22-
function api:entity/mob/effect/reset
27+
# リセット
28+
data remove storage asset:temp Success
29+
scoreboard players reset $10A.Recursive Temporary
30+
tag @e[type=#lib:living_without_player,tag=10A.Target,distance=..10,limit=1] remove 10A.Target
31+
tag @e[type=#lib:living_without_player,tag=10A.TempTarget,distance=..10] remove 10A.TempTarget

Asset/data/asset/functions/artifact/1306.will_o_wisp/trigger/_index.d.mcfunction

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
#> tag
55
# @within function asset:artifact/1306.will_o_wisp/trigger/**
66
#declare tag 10A.Target
7+
#declare tag 10A.TempTarget
8+
#declare score_holder $10A.Recursive
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#> asset:artifact/1306.will_o_wisp/trigger/damage_and_effect
2+
#
3+
# ターゲットにすること諸々
4+
#
5+
# @within function asset:artifact/1306.will_o_wisp/trigger/3.main
6+
7+
#> Private
8+
# @private
9+
#declare score_holder $10A.Damage
10+
11+
# ターゲットの位置で演出
12+
execute positioned ~ ~0.5 ~ rotated ~ 0 run function asset:artifact/1306.will_o_wisp/trigger/vfx
13+
14+
# ダメージ
15+
data modify storage api: Argument.Damage set value 100f
16+
data modify storage api: Argument.AttackType set value "Physical"
17+
data modify storage api: Argument.ElementType set value "Water"
18+
execute as @p[tag=this] run function api:damage/modifier
19+
function api:damage/
20+
function api:damage/reset
21+
22+
# エフェクトのダメージ計算
23+
execute as @p[tag=this] run function api:modifier/max_health/get
24+
execute store result score $10A.Damage Temporary run data get storage api: Return.MaxHealth 0.2
25+
scoreboard players add $10A.Damage Temporary 50
26+
27+
# エフェクト付与
28+
data modify storage api: Argument.ID set value 339
29+
data modify storage api: Argument.Duration set value 100
30+
execute store result storage api: Argument.FieldOverride.Damage int 1 run scoreboard players get $10A.Damage Temporary
31+
data modify storage api: Argument.FieldOverride.AdditionalMPHeal set from storage api: PersistentArgument.AdditionalMPHeal
32+
function api:entity/mob/effect/give
33+
function api:entity/mob/effect/reset
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#> asset:artifact/1306.will_o_wisp/trigger/target/forward/
2+
#
3+
#
4+
#
5+
# @within function asset:artifact/1306.will_o_wisp/trigger/3.main
6+
7+
# 自身の前方でかつ、最も近くの、壁を通してない敵を探す
8+
9+
# 前方の敵にTempTargetをつける
10+
# まぁある程度適当なので横にも当たる
11+
tag @e[type=#lib:living_without_player,tag=Enemy,tag=!Uninterferable,distance=..5] add 10A.TempTarget
12+
execute positioned ^ ^ ^-10 run tag @e[type=#lib:living_without_player,tag=10A.TempTarget,distance=..10] remove 10A.TempTarget
13+
14+
# 近い順に再帰で壁を貫通していないかチェックする
15+
execute as @e[type=#lib:living_without_player,tag=10A.TempTarget,distance=..10,sort=nearest] facing entity @s eyes run function asset:artifact/1306.will_o_wisp/trigger/target/forward/check_through
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#> asset:artifact/1306.will_o_wisp/trigger/target/forward/check_through
2+
#
3+
#
4+
#
5+
# @within function
6+
# asset:artifact/1306.will_o_wisp/trigger/target/forward/
7+
# asset:artifact/1306.will_o_wisp/trigger/target/forward/check_through
8+
9+
# 成功済みならreturn
10+
execute if data storage asset:temp {Success:true} run return fail
11+
12+
# 自身が近くにいたらreturn
13+
execute positioned ~-0.5 ~-0.5 ~-0.5 if entity @s[dx=0] run return run function asset:artifact/1306.will_o_wisp/trigger/target/forward/success
14+
15+
# 壁を再帰
16+
execute positioned ^ ^ ^0.5 if block ~ ~ ~ #lib:no_collision/ run function asset:artifact/1306.will_o_wisp/trigger/target/forward/check_through
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#> asset:artifact/1306.will_o_wisp/trigger/target/forward/success
2+
#
3+
#
4+
#
5+
# @within function asset:artifact/1306.will_o_wisp/trigger/target/forward/check_through
6+
7+
# 自身にtagを付与
8+
tag @s add 10A.Target
9+
10+
# 成功済み判定用storageを設定
11+
data modify storage asset:temp Success set value true
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#> asset:artifact/1306.will_o_wisp/trigger/target/line_of_sight
2+
#
3+
#
4+
#
5+
# @within function
6+
# asset:artifact/1306.will_o_wisp/trigger/3.main
7+
# asset:artifact/1306.will_o_wisp/trigger/target/line_of_sight
8+
9+
# 視線先に敵がいるかを再帰で検知する
10+
11+
# 敵がいたらtag付けてreturn
12+
execute positioned ~-0.5 ~-0.5 ~-0.5 if entity @e[type=#lib:living_without_player,tag=!Uninterferable,dx=0,limit=1] run return run tag @e[type=#lib:living_without_player,tag=!Uninterferable,dx=0,sort=random,limit=1] add 10A.Target
13+
14+
# 再帰暴走防止スコア
15+
scoreboard players add $10A.Recursive Temporary 1
16+
execute if score $10A.Recursive Temporary matches 10.. run return fail
17+
18+
# 再帰
19+
execute positioned ^ ^ ^0.5 if block ~ ~ ~ #lib:no_collision/ run function asset:artifact/1306.will_o_wisp/trigger/target/line_of_sight
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
#> asset:artifact/1306.will_o_wisp/trigger/vfx
2+
#
3+
#
4+
#
5+
# @within function
6+
# asset:artifact/1306.will_o_wisp/trigger/3.main
7+
# asset:artifact/1306.will_o_wisp/trigger/damage_and_effect
8+
9+
# playsound
10+
playsound entity.blaze.shoot player @a ~ ~ ~ 0.5 0.8
11+
playsound minecraft:block.fire.ambient player @a ~ ~ ~ 1 0.7
12+
13+
particle soul_fire_flame ^4 ^ ^0 ^-40000000 ^ ^0 0.000000005 0
14+
particle soul_fire_flame ^3.9507 ^ ^0.6257 ^-39507000 ^ ^-6257000 0.000000005 0
15+
particle soul_fire_flame ^3.8042 ^ ^1.236 ^-38042000 ^ ^-12360000 0.000000005 0
16+
particle soul_fire_flame ^3.564 ^ ^1.8159 ^-35640000 ^ ^-18159000 0.000000005 0
17+
particle soul_fire_flame ^3.236 ^ ^2.3511 ^-32360000. ^ ^-23511000. 0.000000005 0
18+
particle soul_fire_flame ^2.8284 ^ ^2.8284 ^-28284000. ^ ^-28284000. 0.000000005 0
19+
particle soul_fire_flame ^2.3511 ^ ^3.236 ^-23511000. ^ ^-32360000. 0.000000005 0
20+
particle soul_fire_flame ^1.8159 ^ ^3.564 ^-18159000 ^ ^-35640000 0.000000005 0
21+
particle soul_fire_flame ^1.236 ^ ^3.8042 ^-12360000 ^ ^-38042000 0.000000005 0
22+
particle soul_fire_flame ^0.6257 ^ ^3.9507 ^-6257000 ^ ^-39507000 0.000000005 0
23+
particle soul_fire_flame ^0 ^ ^4 ^0 ^ ^-40000000 0.000000005 0
24+
particle soul_fire_flame ^-0.6257 ^ ^3.9507 ^6257000 ^ ^-39507000 0.000000005 0
25+
particle soul_fire_flame ^-1.236 ^ ^3.8042 ^12360000 ^ ^-38042000 0.000000005 0
26+
particle soul_fire_flame ^-1.8159 ^ ^3.564 ^18159000 ^ ^-35640000 0.000000005 0
27+
particle soul_fire_flame ^-2.3511 ^ ^3.236 ^23511000. ^ ^-32360000. 0.000000005 0
28+
particle soul_fire_flame ^-2.8284 ^ ^2.8284 ^28284000. ^ ^-28284000. 0.000000005 0
29+
particle soul_fire_flame ^-3.236 ^ ^2.3511 ^32360000. ^ ^-23511000. 0.000000005 0
30+
particle soul_fire_flame ^-3.564 ^ ^1.8159 ^35640000 ^ ^-18159000 0.000000005 0
31+
particle soul_fire_flame ^-3.8042 ^ ^1.236 ^38042000 ^ ^-12360000 0.000000005 0
32+
particle soul_fire_flame ^-3.9507 ^ ^0.6257 ^39507000 ^ ^-6257000 0.000000005 0
33+
particle soul_fire_flame ^-4 ^ ^0 ^40000000 ^ ^0 0.000000005 0
34+
particle soul_fire_flame ^-3.9507 ^ ^-0.6257 ^39507000 ^ ^6257000 0.000000005 0
35+
particle soul_fire_flame ^-3.8042 ^ ^-1.236 ^38042000 ^ ^12360000 0.000000005 0
36+
particle soul_fire_flame ^-3.564 ^ ^-1.8159 ^35640000 ^ ^18159000 0.000000005 0
37+
particle soul_fire_flame ^-3.236 ^ ^-2.3511 ^32360000. ^ ^23511000. 0.000000005 0
38+
particle soul_fire_flame ^-2.8284 ^ ^-2.8284 ^28284000. ^ ^28284000. 0.000000005 0
39+
particle soul_fire_flame ^-2.3511 ^ ^-3.236 ^23511000. ^ ^32360000. 0.000000005 0
40+
particle soul_fire_flame ^-1.8159 ^ ^-3.564 ^18159000 ^ ^35640000 0.000000005 0
41+
particle soul_fire_flame ^-1.236 ^ ^-3.8042 ^12360000 ^ ^38042000 0.000000005 0
42+
particle soul_fire_flame ^-0.6257 ^ ^-3.9507 ^6257000 ^ ^39507000 0.000000005 0
43+
particle soul_fire_flame ^0 ^ ^-4 ^0 ^ ^40000000 0.000000005 0
44+
particle soul_fire_flame ^0.6257 ^ ^-3.9507 ^-6257000 ^ ^39507000 0.000000005 0
45+
particle soul_fire_flame ^1.236 ^ ^-3.8042 ^-12360000 ^ ^38042000 0.000000005 0
46+
particle soul_fire_flame ^1.8159 ^ ^-3.564 ^-18159000 ^ ^35640000 0.000000005 0
47+
particle soul_fire_flame ^2.3511 ^ ^-3.236 ^-23511000. ^ ^32360000. 0.000000005 0
48+
particle soul_fire_flame ^2.8284 ^ ^-2.8284 ^-28284000. ^ ^28284000. 0.000000005 0
49+
particle soul_fire_flame ^3.236 ^ ^-2.3511 ^-32360000. ^ ^23511000. 0.000000005 0
50+
particle soul_fire_flame ^3.564 ^ ^-1.8159 ^-35640000 ^ ^18159000 0.000000005 0
51+
particle soul_fire_flame ^3.8042 ^ ^-1.236 ^-38042000 ^ ^12360000 0.000000005 0
52+
particle soul_fire_flame ^3.9507 ^ ^-0.6257 ^-39507000 ^ ^6257000 0.000000005 0
53+
54+
particle soul_fire_flame ^2.5 ^ ^0 ^-25000000 ^ ^0 0.0000000045 0
55+
particle soul_fire_flame ^2.4148 ^ ^0.647 ^-24148000 ^ ^-6470000 0.0000000045 0
56+
particle soul_fire_flame ^2.165 ^ ^1.25 ^-21650000 ^ ^-12500000 0.0000000045 0
57+
particle soul_fire_flame ^1.7677 ^ ^1.7677 ^-17677000 ^ ^-17677000 0.0000000045 0
58+
particle soul_fire_flame ^1.25 ^ ^2.165 ^-12500000 ^ ^-21650000 0.0000000045 0
59+
particle soul_fire_flame ^0.647 ^ ^2.4148 ^-6470000 ^ ^-24148000 0.0000000045 0
60+
particle soul_fire_flame ^0 ^ ^2.5 ^0 ^ ^-25000000 0.0000000045 0
61+
particle soul_fire_flame ^-0.647 ^ ^2.4148 ^6470000 ^ ^-24148000 0.0000000045 0
62+
particle soul_fire_flame ^-1.25 ^ ^2.165 ^12500000 ^ ^-21650000 0.0000000045 0
63+
particle soul_fire_flame ^-1.7677 ^ ^1.7677 ^17677000 ^ ^-17677000 0.0000000045 0
64+
particle soul_fire_flame ^-2.165 ^ ^1.25 ^21650000 ^ ^-12500000 0.0000000045 0
65+
particle soul_fire_flame ^-2.4148 ^ ^0.647 ^24148000 ^ ^-6470000 0.0000000045 0
66+
particle soul_fire_flame ^-2.5 ^ ^0 ^25000000 ^ ^0 0.0000000045 0
67+
particle soul_fire_flame ^-2.4148 ^ ^-0.647 ^24148000 ^ ^6470000 0.0000000045 0
68+
particle soul_fire_flame ^-2.165 ^ ^-1.25 ^21650000 ^ ^12500000 0.0000000045 0
69+
particle soul_fire_flame ^-1.7677 ^ ^-1.7677 ^17677000 ^ ^17677000 0.0000000045 0
70+
particle soul_fire_flame ^-1.25 ^ ^-2.165 ^12500000 ^ ^21650000 0.0000000045 0
71+
particle soul_fire_flame ^-0.647 ^ ^-2.4148 ^6470000 ^ ^24148000 0.0000000045 0
72+
particle soul_fire_flame ^0 ^ ^-2.5 ^0 ^ ^25000000 0.0000000045 0
73+
particle soul_fire_flame ^0.647 ^ ^-2.4148 ^-6470000 ^ ^24148000 0.0000000045 0
74+
particle soul_fire_flame ^1.25 ^ ^-2.165 ^-12500000 ^ ^21650000 0.0000000045 0
75+
particle soul_fire_flame ^1.7677 ^ ^-1.7677 ^-17677000 ^ ^17677000 0.0000000045 0
76+
particle soul_fire_flame ^2.165 ^ ^-1.25 ^-21650000 ^ ^12500000 0.0000000045 0
77+
particle soul_fire_flame ^2.4148 ^ ^-0.647 ^-24148000 ^ ^6470000 0.0000000045 0
78+
79+
particle soul_fire_flame ^1.5 ^ ^0 ^-15000000 ^ ^0 0.000000004 0
80+
particle soul_fire_flame ^1.3858 ^ ^0.574 ^-13858000 ^ ^-5740000 0.000000004 0
81+
particle soul_fire_flame ^1.0606 ^ ^1.0606 ^-10606000 ^ ^-10606000 0.000000004 0
82+
particle soul_fire_flame ^0.574 ^ ^1.3858 ^-5740000 ^ ^-13858000 0.000000004 0
83+
particle soul_fire_flame ^0 ^ ^1.5 ^0 ^ ^-15000000 0.000000004 0
84+
particle soul_fire_flame ^-0.574 ^ ^1.3858 ^5740000 ^ ^-13858000 0.000000004 0
85+
particle soul_fire_flame ^-1.0606 ^ ^1.0606 ^10606000 ^ ^-10606000 0.000000004 0
86+
particle soul_fire_flame ^-1.3858 ^ ^0.574 ^13858000 ^ ^-5740000 0.000000004 0
87+
particle soul_fire_flame ^-1.5 ^ ^0 ^15000000 ^ ^0 0.000000004 0
88+
particle soul_fire_flame ^-1.3858 ^ ^-0.574 ^13858000 ^ ^5740000 0.000000004 0
89+
particle soul_fire_flame ^-1.0606 ^ ^-1.0606 ^10606000 ^ ^10606000 0.000000004 0
90+
particle soul_fire_flame ^-0.574 ^ ^-1.3858 ^5740000 ^ ^13858000 0.000000004 0
91+
particle soul_fire_flame ^0 ^ ^-1.5 ^0 ^ ^15000000 0.000000004 0
92+
particle soul_fire_flame ^0.574 ^ ^-1.3858 ^-5740000 ^ ^13858000 0.000000004 0
93+
particle soul_fire_flame ^1.0606 ^ ^-1.0606 ^-10606000 ^ ^10606000 0.000000004 0
94+
particle soul_fire_flame ^1.3858 ^ ^-0.574 ^-13858000 ^ ^5740000 0.000000004 0

Asset/data/asset/functions/effect/0339.will_o_wisp/register.mcfunction

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
data modify storage asset:effect StackVisible set value false
3737

3838
# フィールド
39+
data modify storage asset:effect Field.Interval._ set value 20
40+
data modify storage asset:effect Field.Interval.Max set value 20
3941
data modify storage asset:effect Field.Damage set value 1
4042
data modify storage asset:effect Field.AdditionalMPHeal set value 1
4143
data modify storage asset:effect Field.AppliedFrom set value -1

0 commit comments

Comments
 (0)