Skip to content

Commit 6411308

Browse files
committed
仕様変更
1 parent 9e11239 commit 6411308

7 files changed

Lines changed: 34 additions & 34 deletions

File tree

‎Asset/data/asset/functions/artifact/1643.jet_booster/give/2.give.mcfunction‎

Lines changed: 1 addition & 1 deletion
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": "blue"}'
1717
# 神器の説明文 (TextComponentString[])
18-
data modify storage asset:artifact Lore set value ['{"text": "使用してから5秒後、爆発をして向いている方向に吹っ飛ぶ。"}', '{"text": "その間に計測されたMP消費量に応じて攻撃範囲、威力、飛距離が上昇する。"}', '{"text": "マナの燃料にして動くブースター。", "color": "gray"}', '{"text": "燃料の貯蓄こそできないが、爆発的な出力を誇る。", "color": "gray"}']
18+
data modify storage asset:artifact Lore set value ['{"text": "使用してから5秒後、爆発をして向いている方向に吹っ飛ぶ。"}', '{"text": "MPが使用時と比べて低いほど攻撃範囲、威力、推進力が上昇する。"}', '{"text": "マナの準位差を利用して動くブースター。", "color": "gray"}', '{"text": "燃料の貯蓄こそできないが、爆発的な出力を誇る。", "color": "gray"}']
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
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#> asset:effect/0408.fueling/_/given
2+
#
3+
# Effectが付与された時に実行されるfunction
4+
#
5+
# @within tag/function asset:effect/given
6+
7+
execute if data storage asset:context {id:408} run function asset:effect/0408.fueling/given/

‎Asset/data/asset/functions/effect/0408.fueling/end/.mcfunction‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,22 @@
88
# @private
99
#declare score_holder $Magnitude
1010
#declare score_holder $500
11+
#declare score_holder $MP
1112

12-
# tellraw @p {"storage": "asset:context", "nbt": "this.MPUsage"}
13+
# 使用時とのMP差に応じた強さのPlayerMotionを適用
14+
function api:mp/get_current
15+
execute store result score $MP Temporary run data get storage api: Return.CurrentMP
16+
execute store result score $Magnitude Temporary run data get storage asset:context this.InitialMP
17+
scoreboard players operation $Magnitude Temporary -= $MP Temporary
1318

14-
# 消費MPの分量に応じた強さのPlayerMotionを適用
15-
execute store result score $Magnitude Temporary run data get storage asset:context this.MPUsage
16-
execute store result storage lib: Argument.VectorMagnitude double 0.01 run scoreboard players add $Magnitude Temporary 100
19+
#最低100は飛ぶ
20+
execute if score $Magnitude Temporary matches 1.. run scoreboard players add $Magnitude Temporary 100
21+
execute if score $Magnitude Temporary matches ..0 run scoreboard players set $Magnitude Temporary 100
22+
23+
execute store result storage lib: Argument.VectorMagnitude double 0.01 run scoreboard players get $Magnitude Temporary
1724
function lib:motion/looking
1825

19-
# 攻撃情報(最低で200、消費MP1につき+2)
26+
# 攻撃情報(最低で200、MP差1につき+2)
2027
scoreboard players operation $Magnitude Temporary < $500 Const
2128
execute store result storage api: Argument.Damage double 2 run scoreboard players get $Magnitude Temporary
2229
data modify storage api: Argument.AttackType set value "Physical"
@@ -38,3 +45,4 @@
3845

3946
# リセット
4047
scoreboard players reset $Magnitude Temporary
48+
scoreboard players reset $MP Temporary
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#> asset:effect/0408.fueling/given/
2+
#
3+
# Effectが付与された時の処理
4+
#
5+
# @within function asset:effect/0408.fueling/_/given
6+
7+
# 現在MPを記憶
8+
function api:mp/get_current
9+
data modify storage asset:context this.InitialMP set from storage api: Return.CurrentMP

‎Asset/data/asset/functions/effect/0408.fueling/register.mcfunction‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# 名前 (TextComponentString)
1212
data modify storage asset:effect Name set value '{"text": "発射用意", "color": "#fa9514"}'
1313
# 説明文 (TextComponentString[])
14-
data modify storage asset:effect Description set value ['{"text": "効果中に消費したMP量を推進力に変える"}']
14+
data modify storage asset:effect Description set value ['{"text": "効果開始時と終了時のMP差を推進力に変える"}']
1515
# 効果時間 (int) (default = API || error)
1616
data modify storage asset:effect Duration set value 100
1717
# スタック (int) (default = API || 1)
@@ -36,6 +36,5 @@
3636
data modify storage asset:effect StackVisible set value false
3737

3838
# フィールド
39-
data modify storage asset:effect Field.PrevMP set value -1
40-
data modify storage asset:effect Field.MPUsage set value 0
39+
data modify storage asset:effect Field.InitialMP set value -1
4140
data modify storage asset:effect Field.Interval set value 20

‎Asset/data/asset/functions/effect/0408.fueling/tick/.mcfunction‎

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,6 @@
44
#
55
# @within function asset:effect/0408.fueling/_/tick
66

7-
#> Private
8-
# @private
9-
#declare score_holder $MP
10-
#declare score_holder $PrevMP
11-
#declare score_holder $MPUsage
12-
137
# Interval減算
148
execute store result storage asset:context this.Interval int 0.9999999999 run data get storage asset:context this.Interval
159
execute if data storage asset:context this{Interval:0} run function asset:effect/0408.fueling/tick/countdown
16-
17-
# MP現在値を取得して差をもとめる
18-
function api:mp/get_current
19-
execute store result score $MP Temporary run data get storage api: Return.CurrentMP
20-
execute unless data storage asset:context this{PrevMP:-1} store result score $PrevMP Temporary run data get storage asset:context this.PrevMP
21-
execute if data storage asset:context this{PrevMP:-1} run scoreboard players operation $PrevMP Temporary = $MP Temporary
22-
scoreboard players operation $PrevMP Temporary -= $MP Temporary
23-
#前tickと比べてMPが減った($PrevMPが正である)ときのみMPUsageに加算して保存
24-
execute store result score $MPUsage Temporary run data get storage asset:context this.MPUsage
25-
execute if score $PrevMP Temporary matches 1.. store result storage asset:context this.MPUsage int 1 run scoreboard players operation $MPUsage Temporary += $PrevMP Temporary
26-
27-
# 現在値をFieldに保存
28-
execute store result storage asset:context this.PrevMP int 1 run scoreboard players get $MP Temporary
29-
30-
# リセット
31-
scoreboard players reset $MP Temporary
32-
scoreboard players reset $PrevMP Temporary
33-
scoreboard players reset $MPUsage Temporary

‎Asset/data/asset/tags/functions/effect/given.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"values": [
3+
"asset:effect/0408.fueling/_/given",
34
"asset:effect/0359.time_ticker_eclipse/_/given",
45
"asset:effect/0358.time_ticker_night/_/given",
56
"asset:effect/0357.time_ticker_day/_/given",
@@ -112,4 +113,4 @@
112113
"asset:effect/0007.defense_base_debuff/_/given",
113114
"asset:effect/0258.spirit_melody/_/given"
114115
]
115-
}
116+
}

0 commit comments

Comments
 (0)