diff --git a/Asset/data/asset/functions/artifact/1122.guardian_ironlump/give/1.trigger.mcfunction b/Asset/data/asset/functions/artifact/1122.guardian_ironlump/give/1.trigger.mcfunction new file mode 100644 index 0000000000..4e48c3c0dc --- /dev/null +++ b/Asset/data/asset/functions/artifact/1122.guardian_ironlump/give/1.trigger.mcfunction @@ -0,0 +1,7 @@ +#> asset:artifact/1122.guardian_ironlump/give/1.trigger +# +# 神器の取得処理の呼び出し時に実行されるfunction +# +# @within tag/function asset:artifact/give + +execute if data storage asset:context {id:1122} run function asset:artifact/1122.guardian_ironlump/give/2.give \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/1122.guardian_ironlump/give/2.give.mcfunction b/Asset/data/asset/functions/artifact/1122.guardian_ironlump/give/2.give.mcfunction new file mode 100644 index 0000000000..d4e06585e0 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1122.guardian_ironlump/give/2.give.mcfunction @@ -0,0 +1,63 @@ +#> asset:artifact/1122.guardian_ironlump/give/2.give +# +# 神器の作成部 ここでID等を定義する +# +# @user +# @within function asset:artifact/1122.guardian_ironlump/give/1.trigger + +# 神器の説明や消費MPなどをここで設定する。 +# 最後にasset:artifact/common/giveを実行することで入手可能。 + +# 神器のID (int) スプレッドシートの値を入れる + data modify storage asset:artifact ID set value 1122 +# 神器のベースアイテム + data modify storage asset:artifact Item set value "minecraft:stick" +# 神器の名前 (TextComponentString) + data modify storage asset:artifact Name set value '{"text":"守護者の鉄塊"}' +# 神器の説明文 (TextComponentString[]) + data modify storage asset:artifact Lore set value ['{"text":"守護者が遺した鎧の一部","color":"gray"}','{"text":"揺るぎ無き守護の意志が感じられる","color":"gray"}','{"text":"防御力+3 ノックバック耐性+99 全属性耐性+5%","color":"green"}'] +# MP以外の消費物 (TextComponentString) (オプション) + # data modify storage asset:artifact CostText set value +# 使用回数 (int) (オプション) + # data modify storage asset:artifact RemainingCount set value +# 神器を発動できるスロット (string) Wikiを参照 + data modify storage asset:artifact Slot set value "hotbar" +# 神器のトリガー (string) Wikiを参照 + data modify storage asset:artifact Trigger set value "equipping" +# 効果が重複可能か否か (boolean) (オプション) + # data modify storage asset:artifact EnableDuplication set value +# 神器の発動条件 (TextComponentString) (オプション) + # data modify storage asset:artifact Condition set value +# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション) + # data modify storage asset:artifact AttackInfo.Damage set value [0,0] +# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション) + # data modify storage asset:artifact AttackInfo.AttackType set value [Physical,Magic] +# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション) + # data modify storage asset:artifact AttackInfo.ElementType set value [Fire,Water,Thunder,None] +# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション) + # data modify storage asset:artifact AttackInfo.BypassResist set value +# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション) + # data modify storage asset:artifact AttackInfo.IsRangeAttack set value +# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション) + # data modify storage asset:artifact AttackInfo.AttackRange set value +# MP消費量 (int) + data modify storage asset:artifact MPCost set value 0 +# MP必要量 (int) (オプション) + # data modify storage asset:artifact MPRequire set value +# 神器のクールダウン (int) (オプション) + # data modify storage asset:artifact LocalCooldown set value +# グローバルクールダウン (int) (オプション) + # data modify storage asset:artifact SpecialCooldown set value +# クールダウンによる使用不可のメッセージを非表示にするか否か (boolean) (オプション) + # data modify storage asset:artifact DisableCooldownMessage set value +# MP不足による使用不可のメッセージを非表示にするか否か (boolean) (オプション) + # data modify storage asset:artifact DisableMPMessage set value +# 破壊時の音を鳴らさないかどうか (boolean) (オプション) + # data modify storage asset:artifact DisableBreakSound set value +# 扱える神 (string[]) Wikiを参照 + data modify storage asset:artifact CanUsedGod set value "ALL" +# カスタムNBT (NBTCompound) 追加で指定したいNBT (オプション) + # data modify storage asset:artifact CustomNBT set value {} + +# 神器の入手用function + function asset:artifact/common/give diff --git a/Asset/data/asset/functions/artifact/1122.guardian_ironlump/trigger/1.trigger.mcfunction b/Asset/data/asset/functions/artifact/1122.guardian_ironlump/trigger/1.trigger.mcfunction new file mode 100644 index 0000000000..8b08c4aa02 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1122.guardian_ironlump/trigger/1.trigger.mcfunction @@ -0,0 +1,8 @@ +#> asset:artifact/1122.guardian_ironlump/trigger/1.trigger +# +# 指定したイベントタイミングで実行されるfunction +# +# @within tag/function asset:artifact/** + +# storage asset:idのautoに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する + execute if data storage asset:context id{hotbar:[1122]} run function asset:artifact/1122.guardian_ironlump/trigger/2.check_condition \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/1122.guardian_ironlump/trigger/2.check_condition.mcfunction b/Asset/data/asset/functions/artifact/1122.guardian_ironlump/trigger/2.check_condition.mcfunction new file mode 100644 index 0000000000..2921d8af55 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1122.guardian_ironlump/trigger/2.check_condition.mcfunction @@ -0,0 +1,14 @@ +#> asset:artifact/1122.guardian_ironlump/trigger/2.check_condition +# +# 神器の発動条件をチェックします +# +# @within function asset:artifact/1122.guardian_ironlump/trigger/1.trigger + +# ID指定する + data modify storage asset:artifact TargetID set value 1122 +# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く + function asset:artifact/common/check_condition/hotbar +# 他にアイテム等確認する場合はここに書く + +# CanUsedタグをチェックして3.main.mcfunctionを実行する + execute if entity @s[tag=CanUsed] run function asset:artifact/1122.guardian_ironlump/trigger/3.main \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/1122.guardian_ironlump/trigger/3.main.mcfunction b/Asset/data/asset/functions/artifact/1122.guardian_ironlump/trigger/3.main.mcfunction new file mode 100644 index 0000000000..69048c2fe1 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1122.guardian_ironlump/trigger/3.main.mcfunction @@ -0,0 +1,29 @@ +#> asset:artifact/1122.guardian_ironlump/trigger/3.main +# +# 神器のメイン処理部 +# +# @within function asset:artifact/1122.guardian_ironlump/trigger/2.check_condition + +# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う + function asset:artifact/common/use/hotbar + +# ここから先は神器側の効果の処理を書く + +# リセット処理 + function asset:artifact/1122.guardian_ironlump/trigger/removal + + attribute @s minecraft:generic.armor modifier add 1-0-1-0-46200000007 "1122" 3 add + attribute @s minecraft:generic.knockback_resistance modifier add 1-0-1-0-46200000007 "1122" 99 add + +# 防御力+5% + data modify storage api: Argument.UUID set value [I;1,1,1122,7] + data modify storage api: Argument.Amount set value 0.05 + data modify storage api: Argument.Operation set value "multiply_base" + function api:modifier/defense/base/add + +# 演出 + particle block iron_block ~ ~1 ~ 0.3 0.3 0.3 0 20 + playsound entity.iron_golem.death player @a ~ ~ ~ 1 2 + playsound minecraft:entity.skeleton.converted_to_stray player @a ~ ~ ~ 1 0 + playsound ogg:block.smithing_table.smithing_table2 player @a ~ ~ ~ 1 1 + playsound minecraft:item.armor.equip_iron player @a ~ ~ ~ 1 1 diff --git a/Asset/data/asset/functions/artifact/1122.guardian_ironlump/trigger/dis_equip/.mcfunction b/Asset/data/asset/functions/artifact/1122.guardian_ironlump/trigger/dis_equip/.mcfunction new file mode 100644 index 0000000000..a0a38966c2 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1122.guardian_ironlump/trigger/dis_equip/.mcfunction @@ -0,0 +1,7 @@ +#> asset:artifact/1122.guardian_ironlump/trigger/dis_equip/ +# +# 装備を外した時に外した部位にのみのidが入った状態でトリガーされる +# +# @within tag/function asset:artifact/dis_equip + +execute if data storage asset:context id{hotbar:[1122]} run function asset:artifact/1122.guardian_ironlump/trigger/dis_equip/main diff --git a/Asset/data/asset/functions/artifact/1122.guardian_ironlump/trigger/dis_equip/main.mcfunction b/Asset/data/asset/functions/artifact/1122.guardian_ironlump/trigger/dis_equip/main.mcfunction new file mode 100644 index 0000000000..4b61aac677 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1122.guardian_ironlump/trigger/dis_equip/main.mcfunction @@ -0,0 +1,20 @@ +#> asset:artifact/1122.guardian_ironlump/trigger/dis_equip/main +# +# 装備を外した時のメイン処理 +# +# @within function asset:artifact/1122.guardian_ironlump/trigger/dis_equip/ + +#> private +# @private + #declare score_holder $ItemCount + +# ここから先は神器側の効果の処理を書く + +# 神器ID930がホットバー内にあるか確認する。 + execute store result score $ItemCount Temporary if data storage asset:context New.Items.hotbar[{tag:{TSB:{ID:1122}}}] + +# ホットバー内に残ってない場合、削除する。 + execute if score $ItemCount Temporary matches ..0 run function asset:artifact/1122.guardian_ironlump/trigger/removal + +# リセット + scoreboard players reset $ItemCount Temporary diff --git a/Asset/data/asset/functions/artifact/1122.guardian_ironlump/trigger/removal.mcfunction b/Asset/data/asset/functions/artifact/1122.guardian_ironlump/trigger/removal.mcfunction new file mode 100644 index 0000000000..5876504e5b --- /dev/null +++ b/Asset/data/asset/functions/artifact/1122.guardian_ironlump/trigger/removal.mcfunction @@ -0,0 +1,15 @@ +#> asset:artifact/1122.guardian_ironlump/trigger/removal +# +# +# +# @within function +# asset:artifact/1122.guardian_ironlump/trigger/3.main +# asset:artifact/1122.guardian_ironlump/trigger/dis_equip/main + +# attribute削除 + attribute @s minecraft:generic.armor modifier remove 1-0-1-0-46200000007 + attribute @s minecraft:generic.attack_knockback modifier remove 1-0-1-0-46200000007 + +# 防御力+5% + data modify storage api: Argument.UUID set value [I;1,1,1122,6] + function api:modifier/defense/base/remove diff --git a/Asset/data/asset/tags/functions/artifact/dis_equip.json b/Asset/data/asset/tags/functions/artifact/dis_equip.json index e2f7a1d9b4..e7c25b8730 100644 --- a/Asset/data/asset/tags/functions/artifact/dis_equip.json +++ b/Asset/data/asset/tags/functions/artifact/dis_equip.json @@ -1,5 +1,6 @@ { "values": [ + "asset:artifact/1122.guardian_ironlump/trigger/dis_equip/", "asset:artifact/1032.life_charm/trigger/dis_equip/", "asset:artifact/0667.soul_fire_armor/trigger/dis_equip/", "asset:artifact/0666.soul_fire_armor/trigger/dis_equip/", diff --git a/Asset/data/asset/tags/functions/artifact/equip.json b/Asset/data/asset/tags/functions/artifact/equip.json index 908275cef7..1554f9233d 100644 --- a/Asset/data/asset/tags/functions/artifact/equip.json +++ b/Asset/data/asset/tags/functions/artifact/equip.json @@ -1,5 +1,6 @@ { "values": [ + "asset:artifact/1122.guardian_ironlump/trigger/1.trigger", "asset:artifact/1032.life_charm/trigger/1.trigger", "asset:artifact/0667.soul_fire_armor/trigger/1.trigger", "asset:artifact/0666.soul_fire_armor/trigger/1.trigger", diff --git a/Asset/data/asset/tags/functions/artifact/give.json b/Asset/data/asset/tags/functions/artifact/give.json index 9da6d1a772..4855b56645 100644 --- a/Asset/data/asset/tags/functions/artifact/give.json +++ b/Asset/data/asset/tags/functions/artifact/give.json @@ -1,5 +1,6 @@ { "values": [ + "asset:artifact/1122.guardian_ironlump/give/1.trigger", "asset:artifact/0002.blessing/give/1.trigger", "asset:artifact/1108.white_lily_of_priestess/give/1.trigger", "asset:artifact/1106.rainbow_candy/give/1.trigger", @@ -381,4 +382,4 @@ "asset:artifact/0735.collision_plate/give/1.trigger", "asset:artifact/0745.blade_of_whirlwind/give/1.trigger" ] -} +} \ No newline at end of file