diff --git a/Asset/data/asset/functions/artifact/1328.snowball_canon/give/1.trigger.mcfunction b/Asset/data/asset/functions/artifact/1328.snowball_canon/give/1.trigger.mcfunction new file mode 100644 index 0000000000..26c0806f5f --- /dev/null +++ b/Asset/data/asset/functions/artifact/1328.snowball_canon/give/1.trigger.mcfunction @@ -0,0 +1,7 @@ +#> asset:artifact/1328.snowball_canon/give/1.trigger +# +# 神器の取得処理の呼び出し時に実行されるfunction +# +# @within tag/function asset:artifact/give + +execute if data storage asset:context {id:1328} run function asset:artifact/1328.snowball_canon/give/2.give \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/1328.snowball_canon/give/2.give.mcfunction b/Asset/data/asset/functions/artifact/1328.snowball_canon/give/2.give.mcfunction new file mode 100644 index 0000000000..93dc49b4f0 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1328.snowball_canon/give/2.give.mcfunction @@ -0,0 +1,68 @@ +#> asset:artifact/1328.snowball_canon/give/2.give +# +# 神器の作成部 ここでID等を定義する +# +# @user +# @within function asset:artifact/1328.snowball_canon/give/1.trigger + +# 神器の説明や消費MPなどをここで設定する。 +# 最後にasset:artifact/common/giveを実行することで入手可能。 + +# 神器のID (int) スプレッドシートの値を入れる + data modify storage asset:artifact ID set value 1328 +# 神器のベースアイテム + data modify storage asset:artifact Item set value "minecraft:ender_eye" +# 神器の名前 (TextComponentString) + data modify storage asset:artifact Name set value '{"text":"スノーボールキャノン","color":"#baf5ff"}' +# 神器の説明文 (TextComponentString[]) + data modify storage asset:artifact Lore set value ['{"translate":"長押しすることでチャージし、%1$sを離すことで","color":"white","with":[{"keybind":"key.use"}]}','{"text":"チャージ時間に比例した弾数の雪玉を発射する(最大60発)","color":"white"}','{"text":"フルチャージ時は弾の収束率・弾速・連射速度が強化される","color":"white"}','{"text":"雪玉を大量に装填し発射する破壊兵器...かもしれない","color":"gray"}'] +# 消費アイテム ({Item: TextComponent, Count: int, Extra?: TextComponent}) (オプション) + # data modify storage asset:artifact ConsumeItem.Item set value '{"translate":"item.minecraft.stick"}' + # 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 "onClick" +# 神器の発動条件 (TextComponentString) (オプション) + # data modify storage asset:artifact Condition set value +# 攻撃に関する情報 -Damage量 (literal[]/literal) Wikiを参照 (オプション) + data modify storage asset:artifact AttackInfo.Damage set value "30x?" +# 攻撃に関する情報 -攻撃タイプ (string[]) Wikiを参照 (オプション) + data modify storage asset:artifact AttackInfo.AttackType set value [Physical] +# 攻撃に関する情報 -攻撃属性 (string[]) Wikiを参照 (オプション) + data modify storage asset:artifact AttackInfo.ElementType set value [Water] +# 攻撃に関する情報 -防御無視 (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 80 +# 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 160 +# 種別クールダウン ({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 ["Flora", "Urban", "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/1328.snowball_canon/register.mcfunction b/Asset/data/asset/functions/artifact/1328.snowball_canon/register.mcfunction new file mode 100644 index 0000000000..72175e6a44 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1328.snowball_canon/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:artifact/1328.snowball_canon/register +# +# 神器プールへの登録処理 +# +# @within tag/function asset:artifact/register + +data modify storage asset:artifact RarityRegistry[4] append value [1328] +data modify storage asset:artifact RarityRegistryWithColor.Red[4] append value [1328] diff --git a/Asset/data/asset/functions/artifact/1328.snowball_canon/trigger/1.trigger.mcfunction b/Asset/data/asset/functions/artifact/1328.snowball_canon/trigger/1.trigger.mcfunction new file mode 100644 index 0000000000..9c2dbd7981 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1328.snowball_canon/trigger/1.trigger.mcfunction @@ -0,0 +1,8 @@ +#> asset:artifact/1328.snowball_canon/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:1328} run function asset:artifact/1328.snowball_canon/trigger/2.check_condition \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/1328.snowball_canon/trigger/2.check_condition.mcfunction b/Asset/data/asset/functions/artifact/1328.snowball_canon/trigger/2.check_condition.mcfunction new file mode 100644 index 0000000000..29f8f54bd3 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1328.snowball_canon/trigger/2.check_condition.mcfunction @@ -0,0 +1,21 @@ +#> asset:artifact/1328.snowball_canon/trigger/2.check_condition +# +# 神器の発動条件をチェックします +# +# @within function asset:artifact/1328.snowball_canon/trigger/1.trigger + +# チャージ用Effectがあれば強制的にチャージ続行 +# 該当エフェクトが射撃中の場合は続行しない + data modify storage api: Argument.ID set value 347 + function api:entity/mob/effect/get/from_id + execute if data storage api: Return.Effect unless data storage api: Return.Effect.Field{IsShooting:true} run return run function asset:artifact/1328.snowball_canon/trigger/charge + +# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く + function asset:artifact/common/check_condition/mainhand +# 他にアイテム等確認する場合はここに書く + +# 射撃中は再使用させない + execute if entity @s[tag=CanUsed] if data storage api: Return.Effect.Field{IsShooting:true} run tag @s remove CanUsed + +# CanUsedタグをチェックして3.main.mcfunctionを実行する + execute if entity @s[tag=CanUsed] run function asset:artifact/1328.snowball_canon/trigger/3.main diff --git a/Asset/data/asset/functions/artifact/1328.snowball_canon/trigger/3.main.mcfunction b/Asset/data/asset/functions/artifact/1328.snowball_canon/trigger/3.main.mcfunction new file mode 100644 index 0000000000..a912722441 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1328.snowball_canon/trigger/3.main.mcfunction @@ -0,0 +1,28 @@ +#> asset:artifact/1328.snowball_canon/trigger/3.main +# +# 神器のメイン処理部 +# +# @within function asset:artifact/1328.snowball_canon/trigger/2.check_condition + +# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う + function asset:artifact/common/use/mainhand + +# ここから先は神器側の効果の処理を書く + +# 仕様書: チャージ1tickにつき弾数+1 +# 初期装填数がBullet、チャージ1回での追加装填数がAddBullet、最大装填数がMaxBullet +# フルチャージか否かで弾速と拡散が変わる +# 当然弾速が早い方が強いし、拡散は小さい方が良い + +# 調整用数値 + data modify storage api: Argument.FieldOverride.Damage set value 30 + data modify storage api: Argument.FieldOverride.Bullet set value 1 + data modify storage api: Argument.FieldOverride.AddBullet set value 1 + data modify storage api: Argument.FieldOverride.MaxBullet set value 60 + data modify storage api: Argument.FieldOverride.Spread set value {Neutral:0.15,FullCharge:0.05} + data modify storage api: Argument.FieldOverride.Motion set value {Neutral:0.8,FullCharge:1.35} + +# チャージ用Effect付与 + data modify storage api: Argument.ID set value 347 + function api:entity/mob/effect/give + function api:entity/mob/effect/reset diff --git a/Asset/data/asset/functions/artifact/1328.snowball_canon/trigger/_index.d.mcfunction b/Asset/data/asset/functions/artifact/1328.snowball_canon/trigger/_index.d.mcfunction new file mode 100644 index 0000000000..c9ef40c623 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1328.snowball_canon/trigger/_index.d.mcfunction @@ -0,0 +1,6 @@ +#> asset:artifact/1328.snowball_canon/trigger/_index.d +# @private + +#> tag +# @within function asset:artifact/1328.snowball_canon/trigger/** + #declare \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/1328.snowball_canon/trigger/charge.mcfunction b/Asset/data/asset/functions/artifact/1328.snowball_canon/trigger/charge.mcfunction new file mode 100644 index 0000000000..3e085f5057 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1328.snowball_canon/trigger/charge.mcfunction @@ -0,0 +1,17 @@ +#> asset:artifact/1328.snowball_canon/trigger/charge +# +# +# +# @within function asset:artifact/1328.snowball_canon/trigger/2.check_condition + +# チャージ演出 + execute if data storage api: Return.Effect.Field{IsFullCharge:false} if predicate lib:random_pass_per/20 anchored eyes run particle snowflake ^-0.3 ^-0.4 ^0.5 0 0 0 0.05 1 + execute if data storage api: Return.Effect.Field{IsFullCharge:false} run playsound ogg:mob.breeze.charge1 player @a ~ ~ ~ 0.4 0.7 + + execute if data storage api: Return.Effect.Field{IsFullCharge: true} if predicate lib:random_pass_per/50 anchored eyes run particle snowflake ^-0.3 ^-0.4 ^0.5 0 0 0 0.2 1 + execute if data storage api: Return.Effect.Field{IsFullCharge: true} run playsound ogg:mob.breeze.charge1 player @a ~ ~ ~ 0.4 1.2 + +# チャージ用Effect付与 + data modify storage api: Argument.ID set value 347 + function api:entity/mob/effect/give + function api:entity/mob/effect/reset diff --git a/Asset/data/asset/functions/effect/0347.snowball_canon/_/re-given.mcfunction b/Asset/data/asset/functions/effect/0347.snowball_canon/_/re-given.mcfunction new file mode 100644 index 0000000000..08c3352ba0 --- /dev/null +++ b/Asset/data/asset/functions/effect/0347.snowball_canon/_/re-given.mcfunction @@ -0,0 +1,7 @@ +#> asset:effect/0347.snowball_canon/_/re-given +# +# Effectが上書きされた時に実行されるfunction +# +# @within tag/function asset:effect/re-given + +execute if data storage asset:context {id:347} run function asset:effect/0347.snowball_canon/re-given/ \ No newline at end of file diff --git a/Asset/data/asset/functions/effect/0347.snowball_canon/_/register.mcfunction b/Asset/data/asset/functions/effect/0347.snowball_canon/_/register.mcfunction new file mode 100644 index 0000000000..dab9cd8da5 --- /dev/null +++ b/Asset/data/asset/functions/effect/0347.snowball_canon/_/register.mcfunction @@ -0,0 +1,7 @@ +#> asset:effect/0347.snowball_canon/_/register +# +# +# +# @within tag/function asset:effect/register + +execute if data storage asset:context {id:347} run function asset:effect/0347.snowball_canon/register \ No newline at end of file diff --git a/Asset/data/asset/functions/effect/0347.snowball_canon/_/tick.mcfunction b/Asset/data/asset/functions/effect/0347.snowball_canon/_/tick.mcfunction new file mode 100644 index 0000000000..aa1d8e4d39 --- /dev/null +++ b/Asset/data/asset/functions/effect/0347.snowball_canon/_/tick.mcfunction @@ -0,0 +1,7 @@ +#> asset:effect/0347.snowball_canon/_/tick +# +# Effectが発動している間毎tick実行されるfunction +# +# @within tag/function asset:effect/tick + +execute if data storage asset:context {id:347} run function asset:effect/0347.snowball_canon/tick/ \ No newline at end of file diff --git a/Asset/data/asset/functions/effect/0347.snowball_canon/re-given/.mcfunction b/Asset/data/asset/functions/effect/0347.snowball_canon/re-given/.mcfunction new file mode 100644 index 0000000000..0a32a0b4da --- /dev/null +++ b/Asset/data/asset/functions/effect/0347.snowball_canon/re-given/.mcfunction @@ -0,0 +1,34 @@ +#> asset:effect/0347.snowball_canon/re-given/ +# +# Effectが上書きされた時の処理 +# +# @within function asset:effect/0347.snowball_canon/_/re-given + +#> Private +# @private + #declare score_holder $Bullet + #declare score_holder $AddBullet + #declare score_holder $MaxBullet + +# フィールド引継ぎ + data modify storage asset:context this set from storage asset:context PreviousField + +# そもそも: 現時点でフルチャージ済みならreturn + execute if data storage asset:context this{IsFullCharge:true} run return fail + +# 各数値取得 + execute store result score $Bullet Temporary run data get storage asset:context this.Bullet + execute store result score $AddBullet Temporary run data get storage asset:context this.AddBullet + execute store result score $MaxBullet Temporary run data get storage asset:context this.MaxBullet + +# 最大数は超えないように弾数を増やす + scoreboard players operation $Bullet Temporary += $AddBullet Temporary + execute store result storage asset:context this.Bullet int 1 run scoreboard players operation $Bullet Temporary < $MaxBullet Temporary + +# フルチャージしたならその判定を保存 + execute if score $Bullet Temporary = $MaxBullet Temporary run data modify storage asset:context this.IsFullCharge set value true + +# リセット + scoreboard players reset $Bullet Temporary + scoreboard players reset $AddBullet Temporary + scoreboard players reset $MaxBullet Temporary diff --git a/Asset/data/asset/functions/effect/0347.snowball_canon/register.mcfunction b/Asset/data/asset/functions/effect/0347.snowball_canon/register.mcfunction new file mode 100644 index 0000000000..cfb8c5d9bf --- /dev/null +++ b/Asset/data/asset/functions/effect/0347.snowball_canon/register.mcfunction @@ -0,0 +1,45 @@ +#> asset:effect/0347.snowball_canon/register +# +# Effectのデータを指定 +# +# @within function asset:effect/0347.snowball_canon/_/register + +# ExtendsSafe (boolean) (default = false) + # data modify storage asset:effect ExtendsSafe set value true +# ID (int) + data modify storage asset:effect ID set value 347 +# 名前 (TextComponentString) + data modify storage asset:effect Name set value '{"text":"雪玉発射!!!","color":"#baf5ff"}' +# 説明文 (TextComponentString[]) + data modify storage asset:effect Description set value [] +# 効果時間 (int) (default = API || error) + data modify storage asset:effect Duration set value 2 +# スタック (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 1 +# 悪い効果か否か (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 +# エフェクトを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 false + +# フィールド + data modify storage asset:effect Field.Bullet set value 1 + data modify storage asset:effect Field.MaxBullet set value 60 + data modify storage asset:effect Field.IsFullCharge set value false + data modify storage asset:effect Field.IsShooting set value false + data modify storage asset:effect Field.Spread set value {Neutral:0.3,FullCharge:0.1} + data modify storage asset:effect Field.Motion set value {Neutral:0.7,FullCharge:1.5} + data modify storage asset:effect Field.Damage set value 1 diff --git a/Asset/data/asset/functions/effect/0347.snowball_canon/tick/.mcfunction b/Asset/data/asset/functions/effect/0347.snowball_canon/tick/.mcfunction new file mode 100644 index 0000000000..47b8ce45c7 --- /dev/null +++ b/Asset/data/asset/functions/effect/0347.snowball_canon/tick/.mcfunction @@ -0,0 +1,8 @@ +#> asset:effect/0347.snowball_canon/tick/ +# +# Effectのtick処理 +# +# @within function asset:effect/0347.snowball_canon/_/tick + +# Durationが1なら発射する + execute if data storage asset:context {Duration:1} anchored eyes positioned ^-0.3 ^-0.4 ^0.5 run function asset:effect/0347.snowball_canon/tick/shoot diff --git a/Asset/data/asset/functions/effect/0347.snowball_canon/tick/fire.mcfunction b/Asset/data/asset/functions/effect/0347.snowball_canon/tick/fire.mcfunction new file mode 100644 index 0000000000..b6dc529ca8 --- /dev/null +++ b/Asset/data/asset/functions/effect/0347.snowball_canon/tick/fire.mcfunction @@ -0,0 +1,29 @@ +#> asset:effect/0347.snowball_canon/tick/fire +# +# fireといっても雪玉だけどな! +# +# @within function asset:effect/0347.snowball_canon/tick/shoot + +#> Private +# @private + #declare tag SpreadMarker + +# フルチャージか否かで拡散と弾速が変わる + +# 前方拡散 + summon marker ~ ~ ~ {Tags:["SpreadMarker"]} + data modify storage lib: Argument.Distance set value 0.5 + execute if data storage asset:context this{IsFullCharge:false} run data modify storage lib: Argument.Spread set from storage asset:context this.Spread.Neutral + execute if data storage asset:context this{IsFullCharge: true} run data modify storage lib: Argument.Spread set from storage asset:context this.Spread.FullCharge + execute as @e[type=marker,tag=SpreadMarker,distance=..0.01,limit=1] run function lib:forward_spreader/circle + +# Object召喚 + data modify storage api: Argument.ID set value 1155 + data modify storage api: Argument.FieldOverride.Damage set from storage asset:context this.Damage + execute if data storage asset:context this{IsFullCharge:false} run data modify storage api: Argument.FieldOverride.Motion set from storage asset:context this.Motion.Neutral + execute if data storage asset:context this{IsFullCharge: true} run data modify storage api: Argument.FieldOverride.Motion set from storage asset:context this.Motion.FullCharge + execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID + execute facing entity @e[type=marker,tag=SpreadMarker,distance=..10,limit=1] eyes run function api:object/summon + +# リセット + kill @e[type=marker,tag=SpreadMarker,distance=..10] diff --git a/Asset/data/asset/functions/effect/0347.snowball_canon/tick/save_full_charge.mcfunction b/Asset/data/asset/functions/effect/0347.snowball_canon/tick/save_full_charge.mcfunction new file mode 100644 index 0000000000..dc3e27d0ef --- /dev/null +++ b/Asset/data/asset/functions/effect/0347.snowball_canon/tick/save_full_charge.mcfunction @@ -0,0 +1,5 @@ +#> asset:effect/0347.snowball_canon/tick/save_full_charge +# +# +# +# @within function asset:effect/0347.snowball_canon/tick/shoot \ No newline at end of file diff --git a/Asset/data/asset/functions/effect/0347.snowball_canon/tick/shoot.mcfunction b/Asset/data/asset/functions/effect/0347.snowball_canon/tick/shoot.mcfunction new file mode 100644 index 0000000000..871902204c --- /dev/null +++ b/Asset/data/asset/functions/effect/0347.snowball_canon/tick/shoot.mcfunction @@ -0,0 +1,23 @@ +#> asset:effect/0347.snowball_canon/tick/shoot +# +# +# +# @within function asset:effect/0347.snowball_canon/tick/ + +# 弾数のデクリメント + execute store result storage asset:context this.Bullet int 0.9999999999 run data get storage asset:context this.Bullet + +# 射撃中の判定を設定 + data modify storage asset:context this.IsShooting set value true + +# 弾数が0でなければDurationを少し戻す +# フルチャージか否かで間隔が変わる + execute unless data storage asset:context this{Bullet:0} if data storage asset:context this{IsFullCharge:false} run data modify storage asset:context Duration set value 3 + execute unless data storage asset:context this{Bullet:0} if data storage asset:context this{IsFullCharge: true} run data modify storage asset:context Duration set value 2 + +# 演出 + particle item_snowball ^ ^-0.2 ^ 0 0 0 0.5 1 normal @a + playsound minecraft:entity.snowball.throw player @a ~ ~ ~ 0.6 0.65 + +# 発射 + function asset:effect/0347.snowball_canon/tick/fire diff --git a/Asset/data/asset/functions/object/1155.snowball/hit/.mcfunction b/Asset/data/asset/functions/object/1155.snowball/hit/.mcfunction new file mode 100644 index 0000000000..34191f9e4f --- /dev/null +++ b/Asset/data/asset/functions/object/1155.snowball/hit/.mcfunction @@ -0,0 +1,33 @@ +#> asset:object/1155.snowball/hit/ +# +# 継承先などから実行される処理 +# +# @within asset:object/alias/1155/hit + +#> Private +# @private + #declare tag Hit + #declare score_holder $UserID + +# 判定がかなり広いが、これは雪玉の割れる位置の関係なのか +# スケルトンなどの敵にヒットすると稀に当たらないため、広く取っておく +# あと少し下側からの判定にしておく + +# 判定を広くはとるが、その中で最も近い敵をターゲットにする + execute positioned ~-1.5 ~-1.7 ~-1.5 run tag @e[type=#lib:living_without_player,tag=Enemy,tag=!Uninterferable,dx=2,dy=2,dz=2] add Hit + +# ダメージ + data modify storage api: Argument.Damage set from storage asset:context this.Damage + data modify storage api: Argument.AttackType set value "Physical" + data modify storage api: Argument.ElementType set value "Water" + execute store result score $UserID Temporary run data get storage asset:context this.UserID + execute as @a if score @s UserID = $UserID Temporary run function api:damage/modifier + execute as @e[type=#lib:living_without_player,tag=Hit,distance=..10,sort=nearest,limit=1] run function api:damage/ + function api:damage/reset + +# super + function asset:object/super.method + +# リセット + tag @e[type=#lib:living_without_player,tag=Hit,distance=..10] remove Hit + scoreboard players reset $UserID Temporary diff --git a/Asset/data/asset/functions/object/1155.snowball/register.mcfunction b/Asset/data/asset/functions/object/1155.snowball/register.mcfunction new file mode 100644 index 0000000000..bf26ec3c3f --- /dev/null +++ b/Asset/data/asset/functions/object/1155.snowball/register.mcfunction @@ -0,0 +1,22 @@ +#> asset:object/1155.snowball/register +# +# Objectのデータを指定 +# +# @within function asset:object/alias/1155/register + +# 継承(オプション) + data modify storage asset:object Extends append value 5 + 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 1155 +# フィールド(オプション) + data modify storage asset:object Field.Motion set value 1f + data modify storage asset:object Field.Damage set value 1f + data modify storage asset:object Field.UserID set value -1 diff --git a/Asset/data/asset/functions/object/1155.snowball/summon/.mcfunction b/Asset/data/asset/functions/object/1155.snowball/summon/.mcfunction new file mode 100644 index 0000000000..f90ecaaea4 --- /dev/null +++ b/Asset/data/asset/functions/object/1155.snowball/summon/.mcfunction @@ -0,0 +1,11 @@ +#> asset:object/1155.snowball/summon/ +# +# Object召喚処理の呼び出し時に実行されるfunction +# +# @within asset:object/alias/1155/summon + +# 元となるEntityを召喚する + execute as 0-0-0-0-0 in minecraft:overworld positioned as @s run tp @s ~ ~ ~ ~ ~ + data modify storage asset:temp Args.Rotation set from entity 0-0-0-0-0 Rotation + function asset:object/1155.snowball/summon/m with storage asset:temp Args + data remove storage asset:temp Args diff --git a/Asset/data/asset/functions/object/1155.snowball/summon/m.mcfunction b/Asset/data/asset/functions/object/1155.snowball/summon/m.mcfunction new file mode 100644 index 0000000000..7e63c04a7e --- /dev/null +++ b/Asset/data/asset/functions/object/1155.snowball/summon/m.mcfunction @@ -0,0 +1,7 @@ +#> asset:object/1155.snowball/summon/m +# +# +# +# @within function asset:object/1155.snowball/summon/ + +$summon snowball ~ ~ ~ {Rotation:$(Rotation),Passengers:[{id:"marker",Tags:["ObjectInit"]}]} diff --git a/Asset/data/asset/functions/object/1155.snowball/tick/.mcfunction b/Asset/data/asset/functions/object/1155.snowball/tick/.mcfunction new file mode 100644 index 0000000000..e4cbd23b3d --- /dev/null +++ b/Asset/data/asset/functions/object/1155.snowball/tick/.mcfunction @@ -0,0 +1,15 @@ +#> asset:object/1155.snowball/tick/ +# +# Objectのtick時の処理 +# +# @within asset:object/alias/1155/tick + +# Tick加算 + scoreboard players add @s General.Object.Tick 1 + +# super + function asset:object/super.tick + +# 一定時間経過で消滅兼ヒット判定 +# 既にHitメソッドが実行されている可能性があるので対策はしておく + execute if score @s General.Object.Tick matches 30.. if score @s ObjectID matches -2147483648..2147483647 run function asset:object/call.m {method:"hit"} diff --git a/Asset/data/asset/functions/object/alias/1155/hit.mcfunction b/Asset/data/asset/functions/object/alias/1155/hit.mcfunction new file mode 100644 index 0000000000..cc5250c09d --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1155/hit.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1155/hit +# +# メソッド処理のエイリアス +# +# @within asset_manager:object/call_method/run_method.m + +# 元のメソッド処理を呼び出す + function asset:object/1155.snowball/hit/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1155/register.mcfunction b/Asset/data/asset/functions/object/alias/1155/register.mcfunction new file mode 100644 index 0000000000..25158a59e2 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1155/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1155/register +# +# Objectのデータ指定処理のエイリアス +# +# @within asset_manager:object/summon/register.m + +# 元の登録処理を呼び出す + function asset:object/1155.snowball/register \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1155/summon.mcfunction b/Asset/data/asset/functions/object/alias/1155/summon.mcfunction new file mode 100644 index 0000000000..3e0e23f326 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1155/summon.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1155/summon +# +# Object召喚処理のエイリアス +# +# @within asset_manager:object/summon/summon.m + +# 元の召喚処理を呼び出す + function asset:object/1155.snowball/summon/ \ No newline at end of file diff --git a/Asset/data/asset/functions/object/alias/1155/tick.mcfunction b/Asset/data/asset/functions/object/alias/1155/tick.mcfunction new file mode 100644 index 0000000000..e2616dfb1f --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1155/tick.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1155/tick +# +# Tick時処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のTick処理を呼び出す + function asset:object/1155.snowball/tick/ \ 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 f3eb008857..f038965e75 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/1328.snowball_canon/give/1.trigger", "asset:artifact/1140.over_pulse_booster/give/1.trigger", "asset:artifact/1139.over_pulse_legframe/give/1.trigger", "asset:artifact/1138.over_pulse_bodyarmor/give/1.trigger", @@ -517,4 +518,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 deba166150..52c24730c8 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/1328.snowball_canon/register", "asset:artifact/1137.over_pulse_headgear/register", "asset:artifact/1228.fatalerror/register", "asset:artifact/1273.maidchan_plush/register", @@ -295,4 +296,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.json b/Asset/data/asset/tags/functions/artifact/using_item.json index 499dc901af..cc739d33f3 100644 --- a/Asset/data/asset/tags/functions/artifact/using_item.json +++ b/Asset/data/asset/tags/functions/artifact/using_item.json @@ -1,5 +1,6 @@ { "values": [ + "asset:artifact/1328.snowball_canon/trigger/1.trigger", "asset:artifact/1220.sacred_hardener/trigger/1.trigger", "asset:artifact/1269.apocalypse/using_item/1.trigger", "asset:artifact/1228.fatalerror/trigger/1.trigger", @@ -16,4 +17,4 @@ "asset:artifact/0948.ft_139_rifle/trigger/1.trigger", "asset:artifact/0876.uni/trigger/1.trigger" ] -} +} \ No newline at end of file diff --git a/Asset/data/asset/tags/functions/effect/end.json b/Asset/data/asset/tags/functions/effect/end.json index 81710cbe5a..a4d3f5c40d 100644 --- a/Asset/data/asset/tags/functions/effect/end.json +++ b/Asset/data/asset/tags/functions/effect/end.json @@ -103,4 +103,4 @@ "asset:effect/0007.defense_base_debuff/_/end", "asset:effect/0258.spirit_melody/_/end" ] -} \ No newline at end of file +} diff --git a/Asset/data/asset/tags/functions/effect/given.json b/Asset/data/asset/tags/functions/effect/given.json index c20c6c5587..fe4c23fba7 100644 --- a/Asset/data/asset/tags/functions/effect/given.json +++ b/Asset/data/asset/tags/functions/effect/given.json @@ -97,4 +97,4 @@ "asset:effect/0007.defense_base_debuff/_/given", "asset:effect/0258.spirit_melody/_/given" ] -} \ No newline at end of file +} diff --git a/Asset/data/asset/tags/functions/effect/re-given.json b/Asset/data/asset/tags/functions/effect/re-given.json index baf0379fc2..6f25918c31 100644 --- a/Asset/data/asset/tags/functions/effect/re-given.json +++ b/Asset/data/asset/tags/functions/effect/re-given.json @@ -1,5 +1,6 @@ { "values": [ + "asset:effect/0347.snowball_canon/_/re-given", "asset:effect/0029.poison/_/re-given", "asset:effect/0030.wither/_/re-given", "asset:effect/0621.loyalty_shield/_/re-given", diff --git a/Asset/data/asset/tags/functions/effect/register.json b/Asset/data/asset/tags/functions/effect/register.json index 2df8839cf1..e861e4c0d6 100644 --- a/Asset/data/asset/tags/functions/effect/register.json +++ b/Asset/data/asset/tags/functions/effect/register.json @@ -1,5 +1,6 @@ { "values": [ + "asset:effect/0347.snowball_canon/_/register", "asset:effect/0025.levitation/_/register", "asset:effect/0247.great_demon_armor/_/register", "asset:effect/0246.flame_devil_armor/_/register", @@ -167,4 +168,4 @@ "asset:effect/0007.defense_base_debuff/_/register", "asset:effect/0258.spirit_melody/_/register" ] -} +} \ No newline at end of file diff --git a/Asset/data/asset/tags/functions/effect/remove.json b/Asset/data/asset/tags/functions/effect/remove.json index 3e8ceea4eb..0b2786bdae 100644 --- a/Asset/data/asset/tags/functions/effect/remove.json +++ b/Asset/data/asset/tags/functions/effect/remove.json @@ -111,4 +111,4 @@ "asset:effect/0007.defense_base_debuff/_/remove", "asset:effect/0258.spirit_melody/_/remove" ] -} \ No newline at end of file +} diff --git a/Asset/data/asset/tags/functions/effect/tick.json b/Asset/data/asset/tags/functions/effect/tick.json index 8a5fbd5389..e28278b7f3 100644 --- a/Asset/data/asset/tags/functions/effect/tick.json +++ b/Asset/data/asset/tags/functions/effect/tick.json @@ -1,5 +1,6 @@ { "values": [ + "asset:effect/0347.snowball_canon/_/tick", "asset:effect/0025.levitation/_/tick", "asset:effect/0244.aurora_armor/_/tick", "asset:effect/0243.oblivious_snow/_/tick",