Skip to content

Commit 8cb6410

Browse files
committed
Merge branch 'master' into dev/lapis_artifact1144
2 parents 67e9f2b + 043a06d commit 8cb6410

25 files changed

Lines changed: 411 additions & 3 deletions
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#> asset:artifact/1317.oblivious_feather/give/1.trigger
2+
#
3+
# 神器の取得処理の呼び出し時に実行されるfunction
4+
#
5+
# @within tag/function asset:artifact/give
6+
7+
execute if data storage asset:context {id:1317} run function asset:artifact/1317.oblivious_feather/give/2.give
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
#> asset:artifact/1317.oblivious_feather/give/2.give
2+
#
3+
# 神器の作成部 ここでID等を定義する
4+
#
5+
# @user
6+
# @within function asset:artifact/1317.oblivious_feather/give/1.trigger
7+
8+
# 神器の説明や消費MPなどをここで設定する。
9+
# 最後にasset:artifact/common/giveを実行することで入手可能。
10+
11+
# 神器のID (int) スプレッドシートの値を入れる
12+
data modify storage asset:artifact ID set value 1317
13+
# 神器のベースアイテム
14+
data modify storage asset:artifact Item set value "minecraft:stick"
15+
# 神器の名前 (TextComponentString)
16+
data modify storage asset:artifact Name set value '{"text":"忘却の羽","color":"#59b05c"}'
17+
# 神器の説明文 (TextComponentString[])
18+
data modify storage asset:artifact Lore set value ['{"text":"「きみがおもいだすまで","color":"gray","italic":true}','{"text":" わたしはここで死につづけるの」","color":"gray","italic":true}']
19+
# 消費アイテム ({Item: TextComponent, Count: int, Extra?: TextComponent}) (オプション)
20+
# data modify storage asset:artifact ConsumeItem.Item set value '{"translate":"item.minecraft.stick"}'
21+
# data modify storage asset:artifact ConsumeItem.Count set value 1
22+
# data modify storage asset:artifact ConsumeItem.Extra set value
23+
# 使用回数 (int) (オプション)
24+
# data modify storage asset:artifact RemainingCount set value
25+
# 神器を発動できるスロット (string) Wikiを参照
26+
data modify storage asset:artifact Slot set value "hotbar"
27+
# 神器のトリガー (string) Wikiを参照
28+
data modify storage asset:artifact Trigger set value "equipping"
29+
# 効果の最大発動回数 (int) (オプション)
30+
data modify storage asset:artifact PartsMax set value 1
31+
# 効果が重複可能か否か (boolean) (オプション)
32+
# data modify storage asset:artifact EnableDuplication set value
33+
# 神器の発動条件 (TextComponentString) (オプション)
34+
# data modify storage asset:artifact Condition set value
35+
# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション)
36+
# data modify storage asset:artifact AttackInfo.Damage set value [0,0]
37+
# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション)
38+
# data modify storage asset:artifact AttackInfo.AttackType set value [Physical,Magic]
39+
# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション)
40+
# data modify storage asset:artifact AttackInfo.ElementType set value [Fire,Water,Thunder,None]
41+
# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション)
42+
# data modify storage asset:artifact AttackInfo.BypassResist set value
43+
# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション)
44+
# data modify storage asset:artifact AttackInfo.IsRangeAttack set value
45+
# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション)
46+
# data modify storage asset:artifact AttackInfo.AttackRange set value
47+
# MP消費量 (int)
48+
data modify storage asset:artifact MPCost set value 150
49+
# MP必要量 (int) (オプション)
50+
data modify storage asset:artifact MPRequire set value 0
51+
# MP回復量 (int)
52+
# data modify storage asset:artifact MPHealWhenHit set value
53+
# 神器のクールダウン (int) (オプション)
54+
# data modify storage asset:artifact LocalCooldown set value
55+
# 種別クールダウン ({Type: string, Duration: int}) (オプション)
56+
# data modify storage asset:artifact TypeCooldown.Type set value
57+
# data modify storage asset:artifact TypeCooldown.Duration set value
58+
# 第二種別クールダウン ({Type: string, Duration: int}) (オプション)
59+
# data modify storage asset:artifact SecondaryTypeCooldown.Type set value
60+
# data modify storage asset:artifact SecondaryTypeCooldown.Duration set value
61+
# グローバルクールダウン (int) (オプション)
62+
# data modify storage asset:artifact SpecialCooldown set value
63+
# クールダウンによる使用不可のメッセージを非表示にするか否か (boolean) (オプション)
64+
# data modify storage asset:artifact DisableCooldownMessage set value
65+
# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション)
66+
data modify storage asset:artifact DisableMPMessage set value true
67+
# 破壊時の音を鳴らさないかどうか (boolean) (オプション)
68+
# data modify storage asset:artifact DisableBreakSound set value
69+
# 装備時ステータス補正 ({Type: string, Amount: double, Operation: string, StackReduction?: double}[]) (オプション)
70+
data modify storage asset:artifact Equipment.Modifiers set value []
71+
data modify storage asset:artifact Equipment.Modifiers append value {Type:"mp_regen",Amount:0.1d,Operation:"multiply_base"}
72+
data modify storage asset:artifact Equipment.Modifiers append value {Type:"fall_resistance",Amount:0.3d,Operation:"multiply_base"}
73+
data modify storage asset:artifact Equipment.Modifiers append value {Type:"receive_heal",Amount:-0.1d,Operation:"multiply_base"}
74+
# 扱える神 (string[]) Wikiを参照
75+
data modify storage asset:artifact CanUsedGod set value ["Nyaptov", "Wi-ki", "Rumor"]
76+
# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション)
77+
# data modify storage asset:artifact CustomNBT set value {}
78+
79+
# 神器の入手用function
80+
function asset:artifact/common/give
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#> asset:artifact/1317.oblivious_feather/register
2+
#
3+
# 神器プールへの登録処理
4+
#
5+
# @within tag/function asset:artifact/register
6+
7+
data modify storage asset:artifact RarityRegistry[3] append value [1317]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#> asset:artifact/1317.oblivious_feather/trigger/1.trigger
2+
#
3+
# 指定したイベントタイミングで実行されるfunction
4+
#
5+
# @within tag/function asset:artifact/**
6+
7+
# storage asset:idのhotbarに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する
8+
execute if data storage asset:context id{hotbar:[1317]} run function asset:artifact/1317.oblivious_feather/trigger/2.check_condition
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#> asset:artifact/1317.oblivious_feather/trigger/2.check_condition
2+
#
3+
# 神器の発動条件をチェックします
4+
#
5+
# @within function asset:artifact/1317.oblivious_feather/trigger/1.trigger
6+
7+
# ID指定する
8+
data modify storage asset:artifact TargetID set value 1317
9+
# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く
10+
function asset:artifact/common/check_condition/hotbar
11+
# 他にアイテム等確認する場合はここに書く
12+
13+
# CanUsedでかつ、既に装備済ならCanUsedを削除
14+
execute if entity @s[tag=CanUsed,tag=10L.Equip] run tag @s remove CanUsed
15+
16+
# CanUsedタグをチェックして3.main.mcfunctionを実行する
17+
execute if entity @s[tag=CanUsed] run function asset:artifact/1317.oblivious_feather/trigger/3.main
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#> asset:artifact/1317.oblivious_feather/trigger/3.main
2+
#
3+
# 神器のメイン処理部
4+
#
5+
# @within function asset:artifact/1317.oblivious_feather/trigger/2.check_condition
6+
7+
# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う
8+
function asset:artifact/common/use/hotbar
9+
10+
# ここから先は神器側の効果の処理を書く
11+
12+
# 演出
13+
particle minecraft:falling_dust green_wool ~ ~1.2 ~ 1 1 1 0 15
14+
particle minecraft:falling_dust green_concrete ~ ~1.2 ~ 1 1 1 0 15
15+
execute anchored eyes positioned ^-0.1 ^ ^0.5 run particle dust 1 0 0 1 ~ ~ ~ 0 0 0 0 1
16+
playsound minecraft:entity.ender_dragon.flap player @a ~ ~ ~ 0.6 0.6
17+
18+
# Tag付け
19+
tag @s add 10L.Equip
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#> asset:artifact/1317.oblivious_feather/trigger/_index.d
2+
# @private
3+
4+
#> tag
5+
# @within function asset:artifact/1317.oblivious_feather/trigger/**
6+
#declare tag 10L.Equip
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#> asset:artifact/1317.oblivious_feather/trigger/dis_equip/
2+
#
3+
# 装備を外した時に外した部位にのみのidが入った状態でトリガーされる
4+
#
5+
# @within tag/function asset:artifact/dis_equip
6+
7+
execute if data storage asset:context id{hotbar:[1317]} run function asset:artifact/1317.oblivious_feather/trigger/dis_equip/main
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#> asset:artifact/1317.oblivious_feather/trigger/dis_equip/main
2+
#
3+
# 装備を外した時のメイン処理
4+
#
5+
# @within function asset:artifact/1317.oblivious_feather/trigger/dis_equip/
6+
7+
#> prv
8+
# @private
9+
#declare score_holder $10L.ItemCount
10+
11+
# まだ持ってるか確認する
12+
execute store result score $10L.ItemCount Temporary if data storage asset:context New.Items.hotbar[{tag:{TSB:{ID:1317}}}]
13+
# なければ削除
14+
execute if score $10L.ItemCount Temporary matches ..0 run function asset:artifact/1317.oblivious_feather/trigger/dis_equip/not_in_hotbar
15+
# リセット
16+
scoreboard players reset $10L.ItemCount Temporary
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#> asset:artifact/1317.oblivious_feather/trigger/dis_equip/not_in_hotbar
2+
#
3+
#
4+
#
5+
# @within function asset:artifact/1317.oblivious_feather/trigger/dis_equip/main
6+
7+
# Tag削除
8+
tag @s remove 10L.Equip
9+
10+
# MP消費
11+
data modify storage api: Argument.Fluctuation set value -150
12+
data modify storage api: Argument.DisableLog set value true
13+
function api:mp/fluctuation

0 commit comments

Comments
 (0)