diff --git a/Asset/data/asset/functions/artifact/1422.overhauled_toaster/dis_equip/1.trigger.mcfunction b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/dis_equip/1.trigger.mcfunction new file mode 100644 index 0000000000..b099e81c12 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/dis_equip/1.trigger.mcfunction @@ -0,0 +1,8 @@ +#> asset:artifact/1422.overhauled_toaster/dis_equip/1.trigger +# +# 指定したイベントタイミングで実行されるfunction +# +# @within tag/function asset:artifact/dis_equip + +# storage asset:contextのidに装備している神器のIDが入っているので比較し、~/2.main.mcfunctionを実行する +execute if data storage asset:context id{mainhand:1422} run function asset:artifact/1422.overhauled_toaster/dis_equip/2.main diff --git a/Asset/data/asset/functions/artifact/1422.overhauled_toaster/dis_equip/2.main.mcfunction b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/dis_equip/2.main.mcfunction new file mode 100644 index 0000000000..1718481db7 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/dis_equip/2.main.mcfunction @@ -0,0 +1,10 @@ +#> asset:artifact/1422.overhauled_toaster/dis_equip/2.main +# +# 装備解除時にチャージを解除する +# +# @within function asset:artifact/1422.overhauled_toaster/dis_equip/1.trigger + +# チャージ用Effectを削除する + data modify storage api: Argument.ID set value 415 + function api:entity/mob/effect/remove/from_id + function api:entity/mob/effect/reset diff --git a/Asset/data/asset/functions/artifact/1422.overhauled_toaster/give/1.trigger.mcfunction b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/give/1.trigger.mcfunction new file mode 100644 index 0000000000..1fb46c4790 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/give/1.trigger.mcfunction @@ -0,0 +1,7 @@ +#> asset:artifact/1422.overhauled_toaster/give/1.trigger +# +# 神器の取得処理の呼び出し時に実行されるfunction +# +# @within tag/function asset:artifact/give + +execute if data storage asset:context {id:1422} run function asset:artifact/1422.overhauled_toaster/give/2.give \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/1422.overhauled_toaster/give/2.give.mcfunction b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/give/2.give.mcfunction new file mode 100644 index 0000000000..c3b47b5dcb --- /dev/null +++ b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/give/2.give.mcfunction @@ -0,0 +1,68 @@ +#> asset:artifact/1422.overhauled_toaster/give/2.give +# +# 神器の作成部 ここでID等を定義する +# +# @user +# @within function asset:artifact/1422.overhauled_toaster/give/1.trigger + +# 神器の説明や消費MPなどをここで設定する。 +# 最後にasset:artifact/common/giveを実行することで入手可能。 + +# 神器のID (int) スプレッドシートの値を入れる + data modify storage asset:artifact ID set value 1422 +# 神器のベースアイテム + data modify storage asset:artifact Item set value "minecraft:ender_eye" +# 神器の名前 (TextComponentString) + data modify storage asset:artifact Name set value '{"text":"魔改造トースター","color":"#d7a657"}' +# 神器の説明文 (TextComponentString[]) + data modify storage asset:artifact Lore set value ['{"text":"長押しで最大7段階のチャージを行い"}','{"text":"チャージ段階に応じたダメージと速度のパンを6枚射出する"}','{"text":"朝も昼も夜も、これから毎日永遠にパンですよね!","color":"gray"}'] +# 消費アイテム ({Item: TextComponent, Count: int, Extra?: TextComponent}) (オプション) + data modify storage asset:artifact ConsumeItem.Item set value '{"translate":"item.minecraft.bread"}' + data modify storage asset:artifact ConsumeItem.Count set value 1 + # data modify storage asset:artifact ConsumeItem.Extra set value +# 使用回数 (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 "releaseUsingItem" +# 神器の発動条件 (TextComponentString) (オプション) + # data modify storage asset:artifact Condition set value +# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション) + data modify storage asset:artifact AttackInfo.Damage set value "40-120x6" +# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション) + data modify storage asset:artifact AttackInfo.AttackType set value [Physical] +# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション) + data modify storage asset:artifact AttackInfo.ElementType set value [Fire] +# 攻撃に関する情報 -防御無視 (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 20 +# MP消費量 (int) + data modify storage asset:artifact MPCost set value 20 +# MP必要量 (int) (オプション) + # data modify storage asset:artifact MPRequire set value +# MP回復量 (int) + # data modify storage asset:artifact MPHealWhenHit set value +# 神器のクールダウン (int) (オプション) + # data modify storage asset:artifact LocalCooldown set value +# 種別クールダウン ({Type: string, Duration: int}) (オプション) + data modify storage asset:artifact TypeCooldown.Type set value "longRange" + data modify storage asset:artifact TypeCooldown.Duration set value 70 +# グローバルクールダウン (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 ["Urban", "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/1422.overhauled_toaster/register.mcfunction b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/register.mcfunction new file mode 100644 index 0000000000..d693cfd891 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:artifact/1422.overhauled_toaster/register +# +# 神器プールへの登録処理 +# +# @within tag/function asset:artifact/register + +data modify storage asset:artifact RarityRegistry[4] append value [1422] +data modify storage asset:artifact RarityRegistryWithColor.Red[4] append value [1422] diff --git a/Asset/data/asset/functions/artifact/1422.overhauled_toaster/release_using_item/1.trigger.mcfunction b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/release_using_item/1.trigger.mcfunction new file mode 100644 index 0000000000..0313bca297 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/release_using_item/1.trigger.mcfunction @@ -0,0 +1,8 @@ +#> asset:artifact/1422.overhauled_toaster/release_using_item/1.trigger +# +# 指定したイベントタイミングで実行されるfunction +# +# @within tag/function asset:artifact/using_item/release/ + +# storage asset:contextのidに装備している神器のIDが入っているので比較し、~/2.check_condition.mcfunctionを実行する +execute if data storage asset:context id{mainhand:1422} run function asset:artifact/1422.overhauled_toaster/release_using_item/2.check_condition diff --git a/Asset/data/asset/functions/artifact/1422.overhauled_toaster/release_using_item/2.check_condition.mcfunction b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/release_using_item/2.check_condition.mcfunction new file mode 100644 index 0000000000..986e3c884b --- /dev/null +++ b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/release_using_item/2.check_condition.mcfunction @@ -0,0 +1,13 @@ +#> asset:artifact/1422.overhauled_toaster/release_using_item/2.check_condition +# +# 神器の発動条件をチェックします +# +# @within function asset:artifact/1422.overhauled_toaster/release_using_item/1.trigger + +# チャージ用Effectを取得する + data modify storage api: Argument.ID set value 415 + function api:entity/mob/effect/get/from_id + execute unless data storage api: Return.Effect run return fail + +# 3.main.mcfunctionを実行する + function asset:artifact/1422.overhauled_toaster/release_using_item/3.main diff --git a/Asset/data/asset/functions/artifact/1422.overhauled_toaster/release_using_item/3.main.mcfunction b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/release_using_item/3.main.mcfunction new file mode 100644 index 0000000000..0fc51e77b0 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/release_using_item/3.main.mcfunction @@ -0,0 +1,23 @@ +#> asset:artifact/1422.overhauled_toaster/release_using_item/3.main +# +# チャージ段階に応じたパンを射出する +# +# @within function asset:artifact/1422.overhauled_toaster/release_using_item/2.check_condition + +# 発射用Effectへ弾速・威力・射程を渡す + data modify storage api: Argument.ID set value 434 + execute if data storage api: Return.Effect{Stack:1} run data modify storage api: Argument.FieldOverride set value {Speed:1,Damage:40} + execute if data storage api: Return.Effect{Stack:2} run data modify storage api: Argument.FieldOverride set value {Speed:1,Damage:70} + execute if data storage api: Return.Effect{Stack:3} run data modify storage api: Argument.FieldOverride set value {Speed:1,Damage:120} + execute if data storage api: Return.Effect{Stack:4} run data modify storage api: Argument.FieldOverride set value {Speed:2,Damage:120} + execute if data storage api: Return.Effect{Stack:5} run data modify storage api: Argument.FieldOverride set value {Speed:2,Damage:120} + execute if data storage api: Return.Effect{Stack:6} run data modify storage api: Argument.FieldOverride set value {Speed:2,Damage:120} + execute if data storage api: Return.Effect{Stack:7} run data modify storage api: Argument.FieldOverride set value {Speed:4,Damage:120} + data modify storage api: Argument.FieldOverride.Range set value 40 + function api:entity/mob/effect/give + function api:entity/mob/effect/reset + +# チャージ用Effectを削除する + data modify storage api: Argument.ID set value 415 + function api:entity/mob/effect/remove/from_id + function api:entity/mob/effect/reset diff --git a/Asset/data/asset/functions/artifact/1422.overhauled_toaster/using_item/1.trigger.mcfunction b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/using_item/1.trigger.mcfunction new file mode 100644 index 0000000000..e580de18ac --- /dev/null +++ b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/using_item/1.trigger.mcfunction @@ -0,0 +1,8 @@ +#> asset:artifact/1422.overhauled_toaster/using_item/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:1422} run function asset:artifact/1422.overhauled_toaster/using_item/2.check_condition diff --git a/Asset/data/asset/functions/artifact/1422.overhauled_toaster/using_item/2.check_condition.mcfunction b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/using_item/2.check_condition.mcfunction new file mode 100644 index 0000000000..179898200f --- /dev/null +++ b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/using_item/2.check_condition.mcfunction @@ -0,0 +1,30 @@ +#> asset:artifact/1422.overhauled_toaster/using_item/2.check_condition +# +# 神器の発動条件をチェックします +# +# @within function asset:artifact/1422.overhauled_toaster/using_item/1.trigger + +#> Private +# @private + #declare score_holder $A1422.Count + +# チャージ中は開始時の消費とクールダウン判定を繰り返さない + data modify storage api: Argument.ID set value 415 + function api:entity/mob/effect/get/from_id + execute if data storage api: Return.Effect run return run function asset:artifact/1422.overhauled_toaster/using_item/charge/ + +# 発射が終わるまで次のチャージを開始しない + data modify storage api: Argument.ID set value 434 + function api:entity/mob/effect/get/from_id + execute if data storage api: Return.Effect run return fail + +# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く + function asset:artifact/common/check_condition/mainhand + execute if entity @s[tag=!CanUsed] run return fail + execute store result score $A1422.Count Temporary run clear @s bread 0 + execute unless score $A1422.Count Temporary matches 1.. run tag @s remove CanUsed + scoreboard players reset $A1422.Count + execute if entity @s[tag=!CanUsed] run function lib:message/artifact/dont_have_require_items + +# CanUsedタグをチェックして3.main.mcfunctionを実行する + execute if entity @s[tag=CanUsed] run function asset:artifact/1422.overhauled_toaster/using_item/3.main diff --git a/Asset/data/asset/functions/artifact/1422.overhauled_toaster/using_item/3.main.mcfunction b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/using_item/3.main.mcfunction new file mode 100644 index 0000000000..61ea495b9c --- /dev/null +++ b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/using_item/3.main.mcfunction @@ -0,0 +1,16 @@ +#> asset:artifact/1422.overhauled_toaster/using_item/3.main +# +# 神器のメイン処理部 +# +# @within function asset:artifact/1422.overhauled_toaster/using_item/2.check_condition + +# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う + function asset:artifact/common/use/mainhand + +# ここから先は神器側の効果の処理を書く + +# パンを1個消費 + clear @s bread 1 + +# チャージ用エフェクト + function asset:artifact/1422.overhauled_toaster/using_item/charge/update.m {Stack:1,Pitch:1.7} diff --git a/Asset/data/asset/functions/artifact/1422.overhauled_toaster/using_item/charge/.mcfunction b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/using_item/charge/.mcfunction new file mode 100644 index 0000000000..d12d387b68 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/using_item/charge/.mcfunction @@ -0,0 +1,16 @@ +#> asset:artifact/1422.overhauled_toaster/using_item/charge/ +# +# 使用継続時間からチャージ段階を更新する +# +# @within function asset:artifact/1422.overhauled_toaster/using_item/2.check_condition + +# チャージ段階が変わるときだけEffectを更新する + execute if data storage asset:context UsingItemTime{mainhand:3} run function asset:artifact/1422.overhauled_toaster/using_item/charge/update.m {Stack:2,Pitch:1.75} + execute if data storage asset:context UsingItemTime{mainhand:5} run function asset:artifact/1422.overhauled_toaster/using_item/charge/update.m {Stack:3,Pitch:1.8} + execute if data storage asset:context UsingItemTime{mainhand:7} run function asset:artifact/1422.overhauled_toaster/using_item/charge/update.m {Stack:4,Pitch:1.85} + execute if data storage asset:context UsingItemTime{mainhand:9} run function asset:artifact/1422.overhauled_toaster/using_item/charge/update.m {Stack:5,Pitch:1.9} + execute if data storage asset:context UsingItemTime{mainhand:11} run function asset:artifact/1422.overhauled_toaster/using_item/charge/update.m {Stack:6,Pitch:1.95} + execute if data storage asset:context UsingItemTime{mainhand:13} run function asset:artifact/1422.overhauled_toaster/using_item/charge/update.m {Stack:7,Pitch:2.0} + +# 長押し中の音 + playsound block.furnace.fire_crackle player @a ~ ~ ~ 1 0.8 diff --git a/Asset/data/asset/functions/artifact/1422.overhauled_toaster/using_item/charge/update.m.mcfunction b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/using_item/charge/update.m.mcfunction new file mode 100644 index 0000000000..047365e0b3 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1422.overhauled_toaster/using_item/charge/update.m.mcfunction @@ -0,0 +1,19 @@ +#> asset:artifact/1422.overhauled_toaster/using_item/charge/update.m +# +# チャージ段階を更新して音を再生する +# +# @input args: +# Stack: int +# Pitch: double +# @within function +# asset:artifact/1422.overhauled_toaster/using_item/3.main +# asset:artifact/1422.overhauled_toaster/using_item/charge/ + +# チャージ段階の演出 + $execute anchored eyes positioned ^ ^ ^0.5 run playsound minecraft:block.note_block.chime player @a ~ ~ ~ 1 $(Pitch) + +# 表示用Effectのスタックを更新する + data modify storage api: Argument.ID set value 415 + $data modify storage api: Argument.Stack set value $(Stack) + function api:entity/mob/effect/give + function api:entity/mob/effect/reset diff --git a/Asset/data/asset/functions/effect/0434.overhauled_toaster_shooting/_/register.mcfunction b/Asset/data/asset/functions/effect/0434.overhauled_toaster_shooting/_/register.mcfunction new file mode 100644 index 0000000000..25ed157ee4 --- /dev/null +++ b/Asset/data/asset/functions/effect/0434.overhauled_toaster_shooting/_/register.mcfunction @@ -0,0 +1,7 @@ +#> asset:effect/0434.overhauled_toaster_shooting/_/register +# +# Effectの定義を呼び出す +# +# @within tag/function asset:effect/register + +execute if data storage asset:context {id:434} run function asset:effect/0434.overhauled_toaster_shooting/register diff --git a/Asset/data/asset/functions/effect/0434.overhauled_toaster_shooting/_/tick.mcfunction b/Asset/data/asset/functions/effect/0434.overhauled_toaster_shooting/_/tick.mcfunction new file mode 100644 index 0000000000..90d0b19dc5 --- /dev/null +++ b/Asset/data/asset/functions/effect/0434.overhauled_toaster_shooting/_/tick.mcfunction @@ -0,0 +1,7 @@ +#> asset:effect/0434.overhauled_toaster_shooting/_/tick +# +# Effectのtick処理を呼び出す +# +# @within tag/function asset:effect/tick + +execute if data storage asset:context {id:434} run function asset:effect/0434.overhauled_toaster_shooting/tick/ diff --git a/Asset/data/asset/functions/effect/0434.overhauled_toaster_shooting/register.mcfunction b/Asset/data/asset/functions/effect/0434.overhauled_toaster_shooting/register.mcfunction new file mode 100644 index 0000000000..78cf974956 --- /dev/null +++ b/Asset/data/asset/functions/effect/0434.overhauled_toaster_shooting/register.mcfunction @@ -0,0 +1,41 @@ +#> asset:effect/0434.overhauled_toaster_shooting/register +# +# Effectのデータを指定 +# +# @within function asset:effect/0434.overhauled_toaster_shooting/_/register + +# ExtendsSafe (boolean) (default = false) + # data modify storage asset:effect ExtendsSafe set value true +# ID (int) + data modify storage asset:effect ID set value 434 +# 名前 (TextComponentString) + data modify storage asset:effect Name set value '{"text":"パン発射!!!"}' +# 説明文 (TextComponentString[]) + data modify storage asset:effect Description set value ['{"text":"パンを連続して射出する"}'] +# 効果時間 (int) (default = API || error) + data modify storage asset:effect Duration set value 6 +# スタック (int) (default = API || 1) + # data modify storage asset:effect Stack set value +# 効果時間の操作方法 (default = API || "replace") + # data modify storage asset:effect DurationOperation set value +# スタックの操作方法 (default = API || "replace") + # data modify storage asset:effect StackOperation set value +# 最大効果時間 (int) (default = 2147483647) + # data modify storage asset:effect MaxDuration set value +# 最大スタック (int) (default = 2147483647) + # data modify storage asset:effect MaxStack set value +# 悪い効果か否か (boolean) + data modify storage asset:effect IsBadEffect set value false +# 死亡時のエフェクトの処理 (default = "remove") + # data modify storage asset:effect ProcessOnDied set value +# 消すのに必要なレベル (int) (default = 1) + data modify storage asset:effect RequireClearLv set value 3 +# エフェクトをUIに表示するか (boolean) (default = true) + data modify storage asset:effect Visible set value false +# エフェクトのスタックををUIに表示するか (boolean) (default = true) + # data modify storage asset:effect StackVisible set value + +# フィールド + data modify storage asset:effect Field.Damage set value 40 + data modify storage asset:effect Field.Speed set value 1 + data modify storage asset:effect Field.Range set value 40 diff --git a/Asset/data/asset/functions/effect/0434.overhauled_toaster_shooting/tick/.mcfunction b/Asset/data/asset/functions/effect/0434.overhauled_toaster_shooting/tick/.mcfunction new file mode 100644 index 0000000000..e67916cea4 --- /dev/null +++ b/Asset/data/asset/functions/effect/0434.overhauled_toaster_shooting/tick/.mcfunction @@ -0,0 +1,16 @@ +#> asset:effect/0434.overhauled_toaster_shooting/tick/ +# +# Effectのtick処理 +# +# @within function asset:effect/0434.overhauled_toaster_shooting/_/tick + +# 発射直前・発射中の音 + execute anchored eyes positioned ^-0.35 ^ ^0.5 run function asset:effect/0434.overhauled_toaster_shooting/tick/sound + +# 残りDurationが5から0の間に1枚ずつ発射する + execute if data storage asset:context {Duration:5} anchored eyes positioned ^-0.35 ^-0.05 ^ run function asset:effect/0434.overhauled_toaster_shooting/tick/shoot + execute if data storage asset:context {Duration:4} anchored eyes positioned ^-0.35 ^-0.15 ^ run function asset:effect/0434.overhauled_toaster_shooting/tick/shoot + execute if data storage asset:context {Duration:3} anchored eyes positioned ^-0.35 ^-0.25 ^ run function asset:effect/0434.overhauled_toaster_shooting/tick/shoot + execute if data storage asset:context {Duration:2} anchored eyes positioned ^-0.35 ^-0.35 ^ run function asset:effect/0434.overhauled_toaster_shooting/tick/shoot + execute if data storage asset:context {Duration:1} anchored eyes positioned ^-0.35 ^-0.45 ^ run function asset:effect/0434.overhauled_toaster_shooting/tick/shoot + execute if data storage asset:context {Duration:0} anchored eyes positioned ^-0.35 ^-0.55 ^ run function asset:effect/0434.overhauled_toaster_shooting/tick/shoot diff --git a/Asset/data/asset/functions/effect/0434.overhauled_toaster_shooting/tick/shoot.mcfunction b/Asset/data/asset/functions/effect/0434.overhauled_toaster_shooting/tick/shoot.mcfunction new file mode 100644 index 0000000000..ddd5db50ee --- /dev/null +++ b/Asset/data/asset/functions/effect/0434.overhauled_toaster_shooting/tick/shoot.mcfunction @@ -0,0 +1,15 @@ +#> asset:effect/0434.overhauled_toaster_shooting/tick/shoot +# +# チャージ段階の弾速と威力でパンを射出する +# +# @within function asset:effect/0434.overhauled_toaster_shooting/tick/ + +# チャージ段階の弾速とダメージを取得する + data modify storage api: Argument.FieldOverride.Speed set from storage asset:context this.Speed + data modify storage api: Argument.FieldOverride.Damage set from storage asset:context this.Damage + +# 召喚 + data modify storage api: Argument.ID set value 1159 + data modify storage api: Argument.FieldOverride.Range set from storage asset:context this.Range + execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID + function api:object/summon diff --git a/Asset/data/asset/functions/effect/0434.overhauled_toaster_shooting/tick/sound.mcfunction b/Asset/data/asset/functions/effect/0434.overhauled_toaster_shooting/tick/sound.mcfunction new file mode 100644 index 0000000000..71de9e9d3b --- /dev/null +++ b/Asset/data/asset/functions/effect/0434.overhauled_toaster_shooting/tick/sound.mcfunction @@ -0,0 +1,8 @@ +#> asset:effect/0434.overhauled_toaster_shooting/tick/sound +# +# 音 +# +# @within function asset:effect/0434.overhauled_toaster_shooting/tick/ + + playsound block.piston.contract player @a ~ ~ ~ 1 1.2 + playsound block.fire.ambient player @a ~ ~ ~ 1 1.3 diff --git a/Asset/data/asset/tags/functions/artifact/dis_equip.json b/Asset/data/asset/tags/functions/artifact/dis_equip.json index 5c6326ca50..3c9d55dca0 100644 --- a/Asset/data/asset/tags/functions/artifact/dis_equip.json +++ b/Asset/data/asset/tags/functions/artifact/dis_equip.json @@ -76,6 +76,7 @@ "asset:artifact/1227.aurora_scythe/dis_equip/1.trigger", "asset:artifact/1228.fatalerror/dis_equip/1.trigger", "asset:artifact/1256.deep_azure/dis_equip/1.trigger", - "asset:artifact/1421.toaster/dis_equip/1.trigger" + "asset:artifact/1421.toaster/dis_equip/1.trigger", + "asset:artifact/1422.overhauled_toaster/dis_equip/1.trigger" ] } diff --git a/Asset/data/asset/tags/functions/artifact/give.json b/Asset/data/asset/tags/functions/artifact/give.json index 37d58f9bf1..5c960edb5c 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/1422.overhauled_toaster/give/1.trigger", "asset:artifact/1619.volt_rave/give/1.trigger", "asset:artifact/1361.unicorn_horn/give/1.trigger", "asset:artifact/1675.fire_extinguisher/give/1.trigger", @@ -586,4 +587,4 @@ "asset:artifact/0735.collision_plate/give/1.trigger", "asset:artifact/0745.blade_of_whirlwind/give/1.trigger" ] -} \ No newline at end of file +} diff --git a/Asset/data/asset/tags/functions/artifact/register.json b/Asset/data/asset/tags/functions/artifact/register.json index 78e4c440ba..52fcae5871 100644 --- a/Asset/data/asset/tags/functions/artifact/register.json +++ b/Asset/data/asset/tags/functions/artifact/register.json @@ -1,5 +1,6 @@ { "values": [ + "asset:artifact/1422.overhauled_toaster/register", "asset:artifact/1619.volt_rave/register", "asset:artifact/1361.unicorn_horn/register", "asset:artifact/1675.fire_extinguisher/register", @@ -351,4 +352,4 @@ "asset:artifact/1027.fire_of_rebirth/register", "asset:artifact/1111.rod_o_redeem/register" ] -} \ No newline at end of file +} diff --git a/Asset/data/asset/tags/functions/artifact/using_item/keep/.json b/Asset/data/asset/tags/functions/artifact/using_item/keep/.json index 23610aa14b..4034aa2dee 100644 --- a/Asset/data/asset/tags/functions/artifact/using_item/keep/.json +++ b/Asset/data/asset/tags/functions/artifact/using_item/keep/.json @@ -1,5 +1,6 @@ { "values": [ + "asset:artifact/1422.overhauled_toaster/using_item/1.trigger", "asset:artifact/0108.vacuum_hopper/trigger/1.trigger", "asset:artifact/1619.volt_rave/using_item/1.trigger", "asset:artifact/0224.onegai_muscle/using_item/1.trigger", diff --git a/Asset/data/asset/tags/functions/artifact/using_item/release/.json b/Asset/data/asset/tags/functions/artifact/using_item/release/.json index b626e40d6c..fb0e9f2b9d 100644 --- a/Asset/data/asset/tags/functions/artifact/using_item/release/.json +++ b/Asset/data/asset/tags/functions/artifact/using_item/release/.json @@ -4,6 +4,7 @@ "asset:artifact/1227.aurora_scythe/release_using_item/1.trigger", "asset:artifact/1228.fatalerror/release_using_item/1.trigger", "asset:artifact/1256.deep_azure/release_using_item/1.trigger", - "asset:artifact/1421.toaster/release_using_item/1.trigger" + "asset:artifact/1421.toaster/release_using_item/1.trigger", + "asset:artifact/1422.overhauled_toaster/release_using_item/1.trigger" ] } diff --git a/Asset/data/asset/tags/functions/effect/register.json b/Asset/data/asset/tags/functions/effect/register.json index e7443943ec..7c945d015c 100644 --- a/Asset/data/asset/tags/functions/effect/register.json +++ b/Asset/data/asset/tags/functions/effect/register.json @@ -202,6 +202,7 @@ "asset:effect/0258.spirit_melody/_/register", "asset:effect/0406.ocean_grace/_/register", "asset:effect/0415.baking/_/register", - "asset:effect/0416.toaster_shooting/_/register" + "asset:effect/0416.toaster_shooting/_/register", + "asset:effect/0434.overhauled_toaster_shooting/_/register" ] } diff --git a/Asset/data/asset/tags/functions/effect/tick.json b/Asset/data/asset/tags/functions/effect/tick.json index f09aa762be..823e443d01 100644 --- a/Asset/data/asset/tags/functions/effect/tick.json +++ b/Asset/data/asset/tags/functions/effect/tick.json @@ -117,6 +117,7 @@ "asset:effect/0279.poison_of_vinderre/_/tick", "asset:effect/0258.spirit_melody/_/tick", "asset:effect/0406.ocean_grace/_/tick", - "asset:effect/0416.toaster_shooting/_/tick" + "asset:effect/0416.toaster_shooting/_/tick", + "asset:effect/0434.overhauled_toaster_shooting/_/tick" ] } diff --git a/docs/knowledge/artifact.md b/docs/knowledge/artifact.md index 4fe426c22b..747a30459c 100644 --- a/docs/knowledge/artifact.md +++ b/docs/knowledge/artifact.md @@ -64,6 +64,8 @@ DeathMessageの書式例は [Thunder の命中処理](../../Asset/data/asset/fun トースターはチャージ表示用のEffect 415と、使用解除後の発射用Effect 416を分ける。装備解除では415だけを削除し、発射開始後は416が2枚のパンを1tickずつずらして射出する。416が残る間は次のチャージを開始しない。チャージ表示の寿命と発射処理の寿命を同じEffectで管理しない実例である。 +魔改造トースター1422は、開始時を1段階とし、使用時間が3・5・7・9・11・13tickに達すると2〜7段階へ更新する。開始時の `using_item/3.main` と継続時の `using_item/charge/` は、StackとPitchを引数に共通の `charge/update.m` を呼び、表示用Effect415のStackを更新する。弾速・威力・射程はチャージ表示に不要なため415へ渡さず、`release_using_item/3.main` で `api: Return.Effect.Stack` を判定して発射用Effect434へ直接設定する。SpeedとDamageは段階に応じた単一の数値、Rangeは射程の値を渡す。434は受け取った値でパンを発射し、Stackによる分岐や配列・マクロでの取得を行わない。共有する415の既定Fieldは1421の実装に合わせて残すが、1422では参照しない。 + ### 持ち替えでチャージを引き継がせない チャージを使用中の神器に限定する場合、発射時だけでなく装備解除時にもチャージ用Effectを削除する。[Volt-Raveの装備解除](../../Asset/data/asset/functions/artifact/1619.volt_rave/dis_equip/2.main.mcfunction) はmainhandから外したときにEffect 394の削除を要求し、発射処理は呼ばない。同IDの別個体へ持ち替える場合もチャージを解除する。持ち替え検出とdis_equipのcontextは、依存先TheSkyBlessingの `architecture.md`「装備は前回との差から有効状態を組み直す」を参照する。