diff --git a/Asset/data/asset/functions/artifact/1177.spinnrade/give/1.trigger.mcfunction b/Asset/data/asset/functions/artifact/1177.spinnrade/give/1.trigger.mcfunction new file mode 100644 index 0000000000..da805bf885 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1177.spinnrade/give/1.trigger.mcfunction @@ -0,0 +1,7 @@ +#> asset:artifact/1177.spinnrade/give/1.trigger +# +# 神器の取得処理の呼び出し時に実行されるfunction +# +# @within tag/function asset:artifact/give + +execute if data storage asset:context {id:1177} run function asset:artifact/1177.spinnrade/give/2.give \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/1177.spinnrade/give/2.give.mcfunction b/Asset/data/asset/functions/artifact/1177.spinnrade/give/2.give.mcfunction new file mode 100644 index 0000000000..a53afc1e9c --- /dev/null +++ b/Asset/data/asset/functions/artifact/1177.spinnrade/give/2.give.mcfunction @@ -0,0 +1,65 @@ +#> asset:artifact/1177.spinnrade/give/2.give +# +# 神器の作成部 ここでID等を定義する +# +# @user +# @within function asset:artifact/1177.spinnrade/give/1.trigger + +# 神器の説明や消費MPなどをここで設定する。 +# 最後にasset:artifact/common/giveを実行することで入手可能。 + +# 神器のID (int) スプレッドシートの値を入れる + data modify storage asset:artifact ID set value 1177 +# 神器のベースアイテム + data modify storage asset:artifact Item set value "minecraft:bow" +# 神器の名前 (TextComponentString) + data modify storage asset:artifact Name set value '{"text":"救済の弓","color":"#ff69b4"}' +# 神器の説明文 (TextComponentString[]) + data modify storage asset:artifact Lore set value ['{"text":"強力な追尾性能を持つ矢を放つ","color":"white"}','{"text":"クラスの皆には内緒だよ☆","color":"gray"}'] +# MP以外の消費物 (TextComponentString) (オプション) + data modify storage asset:artifact ConsumeItem.Item set value '{"translate":"item.minecraft.arrow"}' + data modify storage asset:artifact ConsumeItem.Count set value 1 +# 使用回数 (int) (オプション) + # data modify storage asset:artifact RemainingCount set value +# 神器を発動できるスロット (string) Wikiを参照 + data modify storage asset:artifact Slot set value "mainhand" +# 神器のトリガー (string) Wikiを参照 + data modify storage asset:artifact Trigger set value "shot" +# 神器の発動条件 (TextComponentString) (オプション) + # data modify storage asset:artifact Condition set value +# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション) + data modify storage asset:artifact AttackInfo.Damage set value [620,780] +# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション) + data modify storage asset:artifact AttackInfo.AttackType set value [Magic] +# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション) + data modify storage asset:artifact AttackInfo.ElementType set value [None] +# 攻撃に関する情報 -防御無視 (boolean) Wikiを参照 (オプション) + # data modify storage asset:artifact AttackInfo.BypassResist set value +# 攻撃に関する情報 -範囲攻撃 (string) Wikiを参照 (オプション) + data modify storage asset:artifact AttackInfo.IsRangeAttack set value "never" +# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション) + # data modify storage asset:artifact AttackInfo.AttackRange set value +# MP消費量 (int) + data modify storage asset:artifact MPCost set value 30 +# MP必要量 (int) (オプション) + # data modify storage asset:artifact MPRequire set value +# 神器のクールダウン (int) (オプション) + # data modify storage asset:artifact LocalCooldown set value 20 +# 種別クールダウン ({Type: string, Duration: int}) (オプション) + data modify storage asset:artifact TypeCooldown.Type set value "longRange" + data modify storage asset:artifact TypeCooldown.Duration set value 20 +# グローバルクールダウン (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 ["Flora", "Wi-ki", "Nyaptov", "Rumor"] +# カスタム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/1177.spinnrade/register.mcfunction b/Asset/data/asset/functions/artifact/1177.spinnrade/register.mcfunction new file mode 100644 index 0000000000..d2de2533dc --- /dev/null +++ b/Asset/data/asset/functions/artifact/1177.spinnrade/register.mcfunction @@ -0,0 +1,7 @@ +#> asset:artifact/1177.spinnrade/register +# +# 神器プールへの登録処理 +# +# @within tag/function asset:artifact/register + +data modify storage asset:artifact RarityRegistry[4] append value [1177] \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/1177.spinnrade/trigger/1.trigger.mcfunction b/Asset/data/asset/functions/artifact/1177.spinnrade/trigger/1.trigger.mcfunction new file mode 100644 index 0000000000..ee7d0c13bb --- /dev/null +++ b/Asset/data/asset/functions/artifact/1177.spinnrade/trigger/1.trigger.mcfunction @@ -0,0 +1,8 @@ +#> asset:artifact/1177.spinnrade/trigger/1.trigger +# +# 指定したイベントタイミングで実行されるfunction +# +# @within tag/function asset:artifact/** + +# storage asset:idのmainhandに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する + execute if data storage asset:context id{mainhand:1177} run function asset:artifact/1177.spinnrade/trigger/2.check_condition diff --git a/Asset/data/asset/functions/artifact/1177.spinnrade/trigger/2.check_condition.mcfunction b/Asset/data/asset/functions/artifact/1177.spinnrade/trigger/2.check_condition.mcfunction new file mode 100644 index 0000000000..7beb25e57a --- /dev/null +++ b/Asset/data/asset/functions/artifact/1177.spinnrade/trigger/2.check_condition.mcfunction @@ -0,0 +1,22 @@ +#> asset:artifact/1177.spinnrade/trigger/2.check_condition +# +# 神器の発動条件をチェックします +# +# @within function asset:artifact/1177.spinnrade/trigger/1.trigger + +# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く + function asset:artifact/common/check_condition/mainhand +# 他にアイテム等確認する場合はここに書く + +# 矢がクリティカルか見る + execute if entity @e[type=#arrows,tag=ShotArrow,nbt={crit:1b},distance=..5,sort=nearest,limit=1] run tag @s add WP.FullCharge +# 矢を消す + kill @e[type=#arrows,tag=ShotArrow,distance=..5] +# 発動しなかったら矢を返す + execute unless entity @s[tag=CanUsed] run summon item ~ ~ ~ {PickupDelay:0s,Item:{id:"minecraft:arrow",Count:1b}} + +# CanUsedタグをチェックして3.main.mcfunctionを実行する + execute if entity @s[tag=CanUsed] run function asset:artifact/1177.spinnrade/trigger/3.main + +# タグ消す + tag @s remove WP.FullCharge diff --git a/Asset/data/asset/functions/artifact/1177.spinnrade/trigger/3.main.mcfunction b/Asset/data/asset/functions/artifact/1177.spinnrade/trigger/3.main.mcfunction new file mode 100644 index 0000000000..03959fd3fc --- /dev/null +++ b/Asset/data/asset/functions/artifact/1177.spinnrade/trigger/3.main.mcfunction @@ -0,0 +1,23 @@ +#> asset:artifact/1177.spinnrade/trigger/3.main +# +# 神器のメイン処理部 +# +# @within function asset:artifact/1177.spinnrade/trigger/2.check_condition + +# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う + function asset:artifact/common/use/mainhand + +# ここから先は神器側の効果の処理を書く + +# 演出 + playsound minecraft:entity.breeze.shoot player @a ~ ~ ~ 1 2 + playsound minecraft:item.trident.riptide_1 player @a ~ ~ ~ 1 2 + playsound minecraft:entity.puffer_fish.death player @a ~ ~ ~ 1 1.4 +# 矢を召喚する + data modify storage api: Argument.ID set value 1087 + execute if entity @s[tag=WP.FullCharge] run data modify storage api: Argument.FieldOverride.Damage set value 780 + execute unless entity @s[tag=WP.FullCharge] run data modify storage api: Argument.FieldOverride.Damage set value 620 + execute if entity @s[tag=WP.FullCharge] run data modify storage api: Argument.FieldOverride.Speed set value 8 + execute unless entity @s[tag=WP.FullCharge] run data modify storage api: Argument.FieldOverride.Speed set value 4 + execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID + execute anchored eyes positioned ^ ^ ^ run function api:object/summon diff --git a/Asset/data/asset/functions/artifact/1177.spinnrade/trigger/_index.d.mcfunction b/Asset/data/asset/functions/artifact/1177.spinnrade/trigger/_index.d.mcfunction new file mode 100644 index 0000000000..d8d6b8c0d4 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1177.spinnrade/trigger/_index.d.mcfunction @@ -0,0 +1,6 @@ +#> asset:artifact/1177.spinnrade/trigger/_index.d +# @private + +#> tag +# @within function asset:artifact/1177.spinnrade/trigger/** + #declare tag WP.FullCharge diff --git a/Asset/data/asset/functions/object/1087.spinnrade/pre_hit/.mcfunction b/Asset/data/asset/functions/object/1087.spinnrade/pre_hit/.mcfunction new file mode 100644 index 0000000000..88e9e967b7 --- /dev/null +++ b/Asset/data/asset/functions/object/1087.spinnrade/pre_hit/.mcfunction @@ -0,0 +1,9 @@ +#> asset:object/1087.spinnrade/pre_hit/ +# +# 継承先などから実行される処理 +# +# @within asset:object/alias/1087/pre_hit + +# 演出 + particle dust 1 0.761 0.831 1 ~ ~ ~ 0 0 0 0 1 + particle cherry_leaves ~ ~ ~ 0.4 0.4 0.4 1 10 diff --git a/Asset/data/asset/functions/object/1087.spinnrade/recursive/.mcfunction b/Asset/data/asset/functions/object/1087.spinnrade/recursive/.mcfunction new file mode 100644 index 0000000000..84685f86a1 --- /dev/null +++ b/Asset/data/asset/functions/object/1087.spinnrade/recursive/.mcfunction @@ -0,0 +1,23 @@ +#> asset:object/1087.spinnrade/recursive/ +# +# 継承先などから実行される処理 +# +# @within asset:object/alias/1087/recursive + +#> Private +# @private +#declare tag 1087.TargetCandidate + +# ホーミング用の遅延 + execute store result storage asset:context this.HomingDelay int 0.9999999999 run data get storage asset:context this.HomingDelay 1 +# 前方にいる一番近い敵をターゲットする + execute if data storage asset:context this{HomingDelay:0} positioned ^ ^ ^15 as @e[type=#lib:living,tag=Enemy,tag=!Uninterferable,distance=..15] run tag @s add 1087.TargetCandidate + execute if data storage asset:context this{HomingDelay:0} facing entity @e[type=#lib:living,tag=1087.TargetCandidate,distance=..15,sort=nearest,limit=1] eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-600 facing entity @s eyes positioned as @s run tp @s ~ ~ ~ ~ ~ + execute if data storage asset:context this{HomingDelay:0} run tag @e[type=#lib:living,tag=1087.TargetCandidate,distance=..50] remove 1087.TargetCandidate + +# 演出 + particle dust 1 0.761 0.831 1 ~ ~ ~ 0 0 0 0 1 + execute if predicate lib:random_pass_per/20 run particle minecraft:cherry_leaves ~ ~ ~ 0 0 0 1 1 + +# super 呼び出し + execute at @s run function asset:object/super.method diff --git a/Asset/data/asset/functions/object/1087.spinnrade/register.mcfunction b/Asset/data/asset/functions/object/1087.spinnrade/register.mcfunction new file mode 100644 index 0000000000..8aca517693 --- /dev/null +++ b/Asset/data/asset/functions/object/1087.spinnrade/register.mcfunction @@ -0,0 +1,26 @@ +#> asset:object/1087.spinnrade/register +# +# Objectのデータを指定 +# +# @within function asset:object/alias/1087/register + +# 継承(オプション) + data modify storage asset:object Extends append value 1009 + function asset:object/extends +# 他のObjectに継承されることを許可するか (boolean) (オプション) + # data modify storage asset:object ExtendsSafe set value +# 継承されることを前提とした、抽象的なObjectであるかどうか(boolean) + data modify storage asset:object IsAbstract set value false +# Tickするかどうか(boolean) (オプション) + # data modify storage asset:object IsTicking set value + +# ID (int) + data modify storage asset:object ID set value 1087 +# フィールド(オプション) + data modify storage asset:object Field.Color set value 16766720 + data modify storage asset:object Field.ShowCritParticle set value false + data modify storage asset:object Field.Range set value 48 + # data modify storage asset:object Field.Speed set value 4 + # data modify storage asset:object Field.Damage set value 1 + # data modify storage asset:object Field.Enhanced set value true + data modify storage asset:object Field.HomingDelay set value 5 diff --git a/Asset/data/asset/functions/object/1087.spinnrade/summon/debug.mcfunction b/Asset/data/asset/functions/object/1087.spinnrade/summon/debug.mcfunction new file mode 100644 index 0000000000..2a5266dc3c --- /dev/null +++ b/Asset/data/asset/functions/object/1087.spinnrade/summon/debug.mcfunction @@ -0,0 +1,10 @@ +#> asset:object/1087.spinnrade/summon/debug +# +# 動作チェック用の召喚処理 使い終わったら消してもいいかも +# +# @user +# @private + +# 召喚 + data modify storage api: Argument.ID set value 1009 + function api:object/summon \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1087/pre_hit.mcfunction b/Asset/data/asset/functions/object/alias/1087/pre_hit.mcfunction new file mode 100644 index 0000000000..1054ec5ec8 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1087/pre_hit.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1087/pre_hit +# +# メソッド処理のエイリアス +# +# @within asset_manager:object/call_method/run_method.m + +# 元のメソッド処理を呼び出す + function asset:object/1087.spinnrade/pre_hit/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1087/recursive.mcfunction b/Asset/data/asset/functions/object/alias/1087/recursive.mcfunction new file mode 100644 index 0000000000..4b2457b545 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1087/recursive.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1087/recursive +# +# メソッド処理のエイリアス +# +# @within asset_manager:object/call_method/run_method.m + +# 元のメソッド処理を呼び出す + function asset:object/1087.spinnrade/recursive/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1087/register.mcfunction b/Asset/data/asset/functions/object/alias/1087/register.mcfunction new file mode 100644 index 0000000000..59e40c1ac5 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1087/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1087/register +# +# Objectのデータ指定処理のエイリアス +# +# @within asset_manager:object/summon/register.m + +# 元の登録処理を呼び出す + function asset:object/1087.spinnrade/register \ No newline at end of file diff --git a/Asset/data/asset/tags/functions/artifact/give.json b/Asset/data/asset/tags/functions/artifact/give.json index ccfb3c69ec..041c5fa871 100644 --- a/Asset/data/asset/tags/functions/artifact/give.json +++ b/Asset/data/asset/tags/functions/artifact/give.json @@ -1,6 +1,7 @@ { "values": [ "asset:artifact/0797.heartbleed/give/1.trigger", + "asset:artifact/1177.spinnrade/give/1.trigger", "asset:artifact/0294.turret/give/1.trigger", "asset:artifact/1193.firebrand/give/1.trigger", "asset:artifact/0464.lightning_exploit/give/1.trigger", diff --git a/Asset/data/asset/tags/functions/artifact/register.json b/Asset/data/asset/tags/functions/artifact/register.json index 6deb754a00..9b0c7defcb 100644 --- a/Asset/data/asset/tags/functions/artifact/register.json +++ b/Asset/data/asset/tags/functions/artifact/register.json @@ -1,6 +1,7 @@ { "values": [ "asset:artifact/0797.heartbleed/register", + "asset:artifact/1177.spinnrade/register", "asset:artifact/0294.turret/register", "asset:artifact/1193.firebrand/register", "asset:artifact/0464.lightning_exploit/register", diff --git a/Asset/data/asset/tags/functions/artifact/shot.json b/Asset/data/asset/tags/functions/artifact/shot.json index 9d1c9e31ad..e725be1354 100644 --- a/Asset/data/asset/tags/functions/artifact/shot.json +++ b/Asset/data/asset/tags/functions/artifact/shot.json @@ -1,5 +1,6 @@ { "values": [ + "asset:artifact/1177.spinnrade/trigger/1.trigger", "asset:artifact/0248.bow_of_vinderre/trigger/1.trigger", "asset:artifact/0249.wakinyan/trigger/1.trigger", "asset:artifact/0250.phoenix/trigger/1.trigger", @@ -7,4 +8,4 @@ "asset:artifact/0329.approaching_hook_shot/trigger/1.trigger", "asset:artifact/1163.rail_shooter/trigger/1.trigger" ] -} +} \ No newline at end of file