diff --git a/Asset/data/asset/functions/artifact/1320.flare_bloom/give/1.trigger.mcfunction b/Asset/data/asset/functions/artifact/1320.flare_bloom/give/1.trigger.mcfunction new file mode 100644 index 0000000000..5cf33df938 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1320.flare_bloom/give/1.trigger.mcfunction @@ -0,0 +1,7 @@ +#> asset:artifact/1320.flare_bloom/give/1.trigger +# +# 神器の取得処理の呼び出し時に実行されるfunction +# +# @within tag/function asset:artifact/give + +execute if data storage asset:context {id:1320} run function asset:artifact/1320.flare_bloom/give/2.give \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/1320.flare_bloom/give/2.give.mcfunction b/Asset/data/asset/functions/artifact/1320.flare_bloom/give/2.give.mcfunction new file mode 100644 index 0000000000..173b4824c8 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1320.flare_bloom/give/2.give.mcfunction @@ -0,0 +1,68 @@ +#> asset:artifact/1320.flare_bloom/give/2.give +# +# 神器の作成部 ここでID等を定義する +# +# @user +# @within function asset:artifact/1320.flare_bloom/give/1.trigger + +# 神器の説明や消費MPなどをここで設定する。 +# 最後にasset:artifact/common/giveを実行することで入手可能。 + +# 神器のID (int) スプレッドシートの値を入れる + data modify storage asset:artifact ID set value 1320 +# 神器のベースアイテム + data modify storage asset:artifact Item set value "minecraft:carrot_on_a_stick" +# 神器の名前 (TextComponentString) + data modify storage asset:artifact Name set value '[{"text":"フ","color":"#EA4C15"},{"text":"レ","color":"#EC5317"},{"text":"ア","color":"#EF5A19"},{"text":"ブ","color":"#F1611B"},{"text":"ル","color":"#F4681D"},{"text":"ー","color":"#F66E1E"},{"text":"ム","color":"#F8751F"}]' +# 神器の説明文 (TextComponentString[]) + data modify storage asset:artifact Lore set value ['{"text":"周囲の敵を攻撃する炎の蝶を召喚する","color":"white"}','{"text":"自身の体力が50%未満の時、ダメージが1.5倍になる","color":"white"}','{"text":"自らを焦がし続ける残り火の花","color":"gray"}','{"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 [400,500] +# 攻撃に関する情報 -攻撃タイプ (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 "every" +# 攻撃に関する情報 -攻撃範囲 (literal) Wikiを参照 (オプション) + data modify storage asset:artifact AttackInfo.AttackRange set value "2.5" +# MP消費量 (int) + data modify storage asset:artifact MPCost set value 100 +# 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 + # data modify storage asset:artifact TypeCooldown.Duration 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 ["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/1320.flare_bloom/register.mcfunction b/Asset/data/asset/functions/artifact/1320.flare_bloom/register.mcfunction new file mode 100644 index 0000000000..0062c9bf9b --- /dev/null +++ b/Asset/data/asset/functions/artifact/1320.flare_bloom/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:artifact/1320.flare_bloom/register +# +# 神器プールへの登録処理 +# +# @within tag/function asset:artifact/register + +data modify storage asset:artifact RarityRegistry[4] append value [1320] +data modify storage asset:artifact RarityRegistryWithColor.Red[4] append value [1320] diff --git a/Asset/data/asset/functions/artifact/1320.flare_bloom/trigger/1.trigger.mcfunction b/Asset/data/asset/functions/artifact/1320.flare_bloom/trigger/1.trigger.mcfunction new file mode 100644 index 0000000000..bdf7ff14a8 --- /dev/null +++ b/Asset/data/asset/functions/artifact/1320.flare_bloom/trigger/1.trigger.mcfunction @@ -0,0 +1,8 @@ +#> asset:artifact/1320.flare_bloom/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:1320} run function asset:artifact/1320.flare_bloom/trigger/2.check_condition \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/1320.flare_bloom/trigger/2.check_condition.mcfunction b/Asset/data/asset/functions/artifact/1320.flare_bloom/trigger/2.check_condition.mcfunction new file mode 100644 index 0000000000..c5fc88a1db --- /dev/null +++ b/Asset/data/asset/functions/artifact/1320.flare_bloom/trigger/2.check_condition.mcfunction @@ -0,0 +1,12 @@ +#> asset:artifact/1320.flare_bloom/trigger/2.check_condition +# +# 神器の発動条件をチェックします +# +# @within function asset:artifact/1320.flare_bloom/trigger/1.trigger + +# 神器の基本的な条件の確認を行うfunction、成功している場合CanUsedタグが付く + function asset:artifact/common/check_condition/mainhand +# 他にアイテム等確認する場合はここに書く + +# CanUsedタグをチェックして3.main.mcfunctionを実行する + execute if entity @s[tag=CanUsed] run function asset:artifact/1320.flare_bloom/trigger/3.main \ No newline at end of file diff --git a/Asset/data/asset/functions/artifact/1320.flare_bloom/trigger/3.main.mcfunction b/Asset/data/asset/functions/artifact/1320.flare_bloom/trigger/3.main.mcfunction new file mode 100644 index 0000000000..bfb4e3300f --- /dev/null +++ b/Asset/data/asset/functions/artifact/1320.flare_bloom/trigger/3.main.mcfunction @@ -0,0 +1,46 @@ +#> asset:artifact/1320.flare_bloom/trigger/3.main +# +# 神器のメイン処理部 +# +# @within function asset:artifact/1320.flare_bloom/trigger/2.check_condition + +# 基本的な使用時の処理(MP消費や使用回数の処理など)を行う + function asset:artifact/common/use/mainhand + +# ここから先は神器側の効果の処理を書く + +# 演出 + execute anchored eyes positioned ^ ^ ^ positioned ~ ~-0.3 ~ rotated ~90 25 run function asset:artifact/1320.flare_bloom/trigger/vfx + execute anchored eyes positioned ^ ^ ^ positioned ~ ~-0.3 ~ rotated ~90 -25 run function asset:artifact/1320.flare_bloom/trigger/vfx + playsound entity.blaze.shoot player @a ~ ~ ~ 1.5 0.8 + playsound entity.blaze.shoot player @a ~ ~ ~ 1.5 1.3 + playsound entity.witch.throw player @a ~ ~ ~ 1.5 0.5 + +# ダメージ設定 + data modify storage api: Argument.FieldOverride.Damage.Default set value {Min:400,Max:500} + execute store result storage api: Argument.FieldOverride.Damage.LowHealthPer.Min float 1.5 run data get storage api: Argument.FieldOverride.Damage.Default.Min + execute store result storage api: Argument.FieldOverride.Damage.LowHealthPer.Max float 1.5 run data get storage api: Argument.FieldOverride.Damage.Default.Max + +# ダメージ以外の諸々の設定 + # 1tick毎の敵を追跡する速度 + data modify storage api: Argument.FieldOverride.ChaseSpeed set value 0.6 + + # 召喚演出が何tickか? + data modify storage api: Argument.FieldOverride.SummonMoveTick set value 45 + + # 存在時間(召喚が永続化したら要らなくなりそうだが) + data modify storage api: Argument.FieldOverride.Tick set value 445 + + # 最大追跡時間 + data modify storage api: Argument.FieldOverride.ChaseTick.Max set value 60 + + # 攻撃発生までのディレイ + data modify storage api: Argument.FieldOverride.AttackDelay.Max set value 8 + + # 攻撃のクールダウン + data modify storage api: Argument.FieldOverride.AttackCD.Max set value 30 + +# Object召喚 + data modify storage api: Argument.ID set value 1153 + execute store result storage api: Argument.FieldOverride.UserID int 1 run scoreboard players get @s UserID + execute rotated ~ 0 anchored eyes positioned ^-1.8 ^8 ^-5 run function api:object/summon diff --git a/Asset/data/asset/functions/artifact/1320.flare_bloom/trigger/vfx.mcfunction b/Asset/data/asset/functions/artifact/1320.flare_bloom/trigger/vfx.mcfunction new file mode 100644 index 0000000000..ff3ead739f --- /dev/null +++ b/Asset/data/asset/functions/artifact/1320.flare_bloom/trigger/vfx.mcfunction @@ -0,0 +1,36 @@ +#> asset:artifact/1320.flare_bloom/trigger/vfx +# +# +# +# @within function asset:artifact/1320.flare_bloom/trigger/3.main + +# [ImportKey]: NobwRALgngDgpmAXGAxgSwE4oDYIDRgCuhaAJkqgBxwBmAhgJwDsNAtDQEYdOsAslABl6sGANhQpWEjjUoBGSqQCsQ-GAB2dALYJkgMMUABHLAEYdDNoDOScCgD2hdRCQAmSgRRwncDDbAA3OmxCXXAADyQBAihIgF9YggtSNEJrRDkBTKyCSwhzZ0QosDhsbDQYS10Moow7PIhdIrRLAFFS8sqWgEdCIOwoAGUzT3JEemxK+IBdIA_3 +# 円 1 +particle flame ~ ~ ~ ^0 ^ ^-1000000 0.00000030 0 +particle flame ~ ~ ~ ^222520.93396 ^ ^-974927.91218 0.00000030 0 +particle flame ~ ~ ~ ^433883.73912 ^ ^-900968.8679 0.00000030 0 +particle flame ~ ~ ~ ^623489.80186 ^ ^-781831.48247 0.00000030 0 +particle flame ~ ~ ~ ^781831.48247 ^ ^-623489.80186 0.00000030 0 +particle flame ~ ~ ~ ^900968.8679 ^ ^-433883.73912 0.00000030 0 +particle flame ~ ~ ~ ^974927.91218 ^ ^-222520.93396 0.00000030 0 +particle flame ~ ~ ~ ^1000000 ^ ^0 0.00000030 0 +particle flame ~ ~ ~ ^974927.91218 ^ ^222520.93396 0.00000030 0 +particle flame ~ ~ ~ ^900968.8679 ^ ^433883.73912 0.00000030 0 +particle flame ~ ~ ~ ^781831.48247 ^ ^623489.80186 0.00000030 0 +particle flame ~ ~ ~ ^623489.80186 ^ ^781831.48247 0.00000030 0 +particle flame ~ ~ ~ ^433883.73912 ^ ^900968.8679 0.00000030 0 +particle flame ~ ~ ~ ^222520.93396 ^ ^974927.91218 0.00000030 0 +particle flame ~ ~ ~ ^0 ^ ^1000000 0.00000030 0 +particle flame ~ ~ ~ ^-222520.93396 ^ ^974927.91218 0.00000030 0 +particle flame ~ ~ ~ ^-433883.73912 ^ ^900968.8679 0.00000030 0 +particle flame ~ ~ ~ ^-623489.80186 ^ ^781831.48247 0.00000030 0 +particle flame ~ ~ ~ ^-781831.48247 ^ ^623489.80186 0.00000030 0 +particle flame ~ ~ ~ ^-900968.8679 ^ ^433883.73912 0.00000030 0 +particle flame ~ ~ ~ ^-974927.91218 ^ ^222520.93396 0.00000030 0 +particle flame ~ ~ ~ ^-1000000 ^ ^0 0.00000030 0 +particle flame ~ ~ ~ ^-974927.91218 ^ ^-222520.93396 0.00000030 0 +particle flame ~ ~ ~ ^-900968.8679 ^ ^-433883.73912 0.00000030 0 +particle flame ~ ~ ~ ^-781831.48247 ^ ^-623489.80186 0.00000030 0 +particle flame ~ ~ ~ ^-623489.80186 ^ ^-781831.48247 0.00000030 0 +particle flame ~ ~ ~ ^-433883.73912 ^ ^-900968.8679 0.00000030 0 +particle flame ~ ~ ~ ^-222520.93396 ^ ^-974927.91218 0.00000030 0 diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/_index.d.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/_index.d.mcfunction new file mode 100644 index 0000000000..a5572b0b1f --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/_index.d.mcfunction @@ -0,0 +1,14 @@ +#> asset:object/1153.flare_butterfly/_index.d +# @private + +#> tag +# @within function asset:object/1153.flare_butterfly/** + #declare tag 1153.Owner + +#> tag +# @within function asset:object/1153.flare_butterfly/tick/attack/** + #declare score_holder $HealthPer + +#> Private +# @within function asset:object/1153.flare_butterfly/tick/move/to_owner/** + #declare tag 1153.TempMarker diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/init/.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/init/.mcfunction new file mode 100644 index 0000000000..c1d445cd38 --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/init/.mcfunction @@ -0,0 +1,11 @@ +#> asset:object/1153.flare_butterfly/init/ +# +# Objectのinit時の処理 +# +# @within asset:object/alias/1153/init + +# AttackCD初期化 + data modify storage asset:context this.AttackCD._ set from storage asset:context this.AttackCD.Max + +# 演出の関係で真下を向いておく + tp @s ~ ~ ~ ~ 90 diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/predicate/near_enemy.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/predicate/near_enemy.mcfunction new file mode 100644 index 0000000000..c4b080b1fb --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/predicate/near_enemy.mcfunction @@ -0,0 +1,11 @@ +#> asset:object/1153.flare_butterfly/predicate/near_enemy +# +# +# +# @within function asset:object/1153.flare_butterfly/tick/move/** + +# Ownerの周囲に敵が周囲にいないなら失敗 + execute at @p[tag=1153.Owner] unless entity @e[type=#lib:living_without_player,tag=Enemy,tag=!Uninterferable,distance=..12] run return 0 + +# 成功 + return 1 diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/predicate/near_owner.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/predicate/near_owner.mcfunction new file mode 100644 index 0000000000..e3f65af66b --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/predicate/near_owner.mcfunction @@ -0,0 +1,11 @@ +#> asset:object/1153.flare_butterfly/predicate/near_owner +# +# +# +# @within function asset:object/1153.flare_butterfly/** + +# Ownerが近くにいないなら失敗 + execute unless entity @p[tag=1153.Owner,distance=..12] run return 0 + +# 成功 + return 1 diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/predicate/near_target/neutral_near/.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/predicate/near_target/neutral_near/.mcfunction new file mode 100644 index 0000000000..af6e80b5ca --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/predicate/near_target/neutral_near/.mcfunction @@ -0,0 +1,10 @@ +#> asset:object/1153.flare_butterfly/predicate/near_target/neutral_near/ +# +# +# +# @within function asset:object/1153.flare_butterfly/tick/** + +execute store result storage asset:context this.Success int 1 run function asset:object/1153.flare_butterfly/predicate/near_target/neutral_near/m with storage asset:context this + +execute if data storage asset:context this{Success:1} run return 1 +execute if data storage asset:context this{Success:0} run return 0 diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/predicate/near_target/neutral_near/m.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/predicate/near_target/neutral_near/m.mcfunction new file mode 100644 index 0000000000..adf4c52cb7 --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/predicate/near_target/neutral_near/m.mcfunction @@ -0,0 +1,9 @@ +#> asset:object/1153.flare_butterfly/predicate/near_target/neutral_near/m +# +# +# +# @within function asset:object/1153.flare_butterfly/predicate/near_target/neutral_near/ + +$execute if entity @e[type=#lib:living_without_player,tag=Enemy,scores={MobUUID=$(TargetMobUUID)},distance=..12] run return 1 + +return 0 diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/predicate/near_target/very_near/.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/predicate/near_target/very_near/.mcfunction new file mode 100644 index 0000000000..3aa49edd39 --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/predicate/near_target/very_near/.mcfunction @@ -0,0 +1,10 @@ +#> asset:object/1153.flare_butterfly/predicate/near_target/very_near/ +# +# +# +# @within function asset:object/1153.flare_butterfly/** + +execute store result storage asset:context this.Success int 1 run function asset:object/1153.flare_butterfly/predicate/near_target/very_near/m with storage asset:context this + +execute if data storage asset:context this{Success:1} run return 1 +execute if data storage asset:context this{Success:0} run return 0 diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/predicate/near_target/very_near/m.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/predicate/near_target/very_near/m.mcfunction new file mode 100644 index 0000000000..9da1161842 --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/predicate/near_target/very_near/m.mcfunction @@ -0,0 +1,9 @@ +#> asset:object/1153.flare_butterfly/predicate/near_target/very_near/m +# +# +# +# @within function asset:object/1153.flare_butterfly/predicate/near_target/very_near/ + +$execute positioned ~-1.2 ~-1.2 ~-1.2 if entity @e[type=#lib:living_without_player,tag=Enemy,scores={MobUUID=$(TargetMobUUID)},dx=1.4,dy=1.4,dz=1.4] run return 1 + +return 0 diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/register.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/register.mcfunction new file mode 100644 index 0000000000..ea273b55cc --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/register.mcfunction @@ -0,0 +1,53 @@ +#> asset:object/1153.flare_butterfly/register +# +# Objectのデータを指定 +# +# @within function asset:object/alias/1153/register + +# 継承(オプション) + # data modify storage asset:object Extends append value + # 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 1153 +# フィールド(オプション) + +# ダメージ・UserID + data modify storage asset:object Field.Damage.Default set value {Min:1,Max:5} + data modify storage asset:object Field.Damage.LowHealthPer set value {Min:6,Max:10} + data modify storage asset:object Field.Damage.UserID set value -1 + +# 移動速度 + data modify storage asset:object Field.ChaseSpeed set value 0.6 + +# 負荷軽減用のインターバル + data modify storage asset:object Field.SearchInterval._ set value 0 + data modify storage asset:object Field.SearchInterval.Max set value 3 + +# 召喚演出が何tickか?等 + data modify storage asset:object Field.SummonMoveTick set value 45 + data modify storage asset:object Field.SummonMoveEnded set value false + +# 存在時間(召喚が永続化したら要らなくなりそうだが) + data modify storage asset:object Field.Tick set value 445 + +# 最大追跡時間 + data modify storage asset:object Field.ChaseTick._ set value 0 + data modify storage asset:object Field.ChaseTick.Max set value 60 + +# 攻撃発生までのディレイ + data modify storage asset:object Field.AttackDelay._ set value 0 + data modify storage asset:object Field.AttackDelay.Max set value 8 + +# 攻撃のクールダウン + data modify storage asset:object Field.AttackCD._ set value 0 + data modify storage asset:object Field.AttackCD.Max set value 30 + +# 攻撃モードか? + data modify storage asset:object Field.IsAttackMode set value false diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/summon/.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/summon/.mcfunction new file mode 100644 index 0000000000..1367c35ca6 --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/summon/.mcfunction @@ -0,0 +1,11 @@ +#> asset:object/1153.flare_butterfly/summon/ +# +# Object召喚処理の呼び出し時に実行されるfunction +# +# @within asset:object/alias/1153/summon + +# 元となるEntityを召喚する + execute as 0-0-0-0-0 in minecraft:overworld positioned as @s run tp @s ~ ~ ~ ~ 0 + data modify storage asset:temp Args.Rotation set from entity 0-0-0-0-0 Rotation + function asset:object/1153.flare_butterfly/summon/m with storage asset:temp Args + data remove storage asset:temp Args diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/summon/m.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/summon/m.mcfunction new file mode 100644 index 0000000000..388e996acb --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/summon/m.mcfunction @@ -0,0 +1,7 @@ +#> asset:object/1153.flare_butterfly/summon/m +# +# +# +# @within function asset:object/1153.flare_butterfly/summon/ + +$summon armor_stand ~ ~ ~ {Tags:["ObjectInit","Friend"],Rotation:$(Rotation),Marker:1b,Invisible:1b,Passengers:[{id:"minecraft:item_display",Rotation:[90f,0f],Tags:["ProcessCommonTag","AutoKillWhenDieVehicle"],teleport_duration:1,brightness:{sky:10,block:10},item:{id:"minecraft:stick",Count:1b,tag:{CustomModelData:20584}},transformation:{left_rotation:[0.1987f,0f,0f,-0.9801f],right_rotation:[0f,0f,0f,1f],scale:[1f,1f,1f],translation:[0f,-0.5f,0f]}}]} diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/.mcfunction new file mode 100644 index 0000000000..5a11385e9c --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/.mcfunction @@ -0,0 +1,36 @@ +#> asset:object/1153.flare_butterfly/tick/ +# +# Objectのtick時の処理 +# +# @within asset:object/alias/1153/tick + +#> Private +# @private + #declare score_holder $UserID + +# 演出 + function asset:object/1153.flare_butterfly/tick/vfx + +# OwnerにTag付与 + execute store result score $UserID Temporary run data get storage asset:context this.UserID + execute as @a if score @s UserID = $UserID Temporary run tag @s add 1153.Owner + scoreboard players reset $UserID Temporary + +# 召喚時の演出 + execute if data storage asset:context this{SummonMoveEnded:false} run function asset:object/1153.flare_butterfly/tick/move/summon_move/ + +# 移動・追尾・攻撃 + execute if data storage asset:context this{SummonMoveEnded:true} run function asset:object/1153.flare_butterfly/tick/move/ + +# 攻撃のCD + function asset:object/1153.flare_butterfly/tick/attack/cooldown/ + +# 蝶の向きを調整 + execute at @s on passengers run tp @s ~ ~ ~ ~ 0 + +# リセット + tag @p[tag=1153.Owner] remove 1153.Owner + +# 消滅処理 + execute store result storage asset:context this.Tick int 0.9999999999 run data get storage asset:context this.Tick + execute if data storage asset:context this{Tick:0} run function asset:object/1153.flare_butterfly/tick/kill diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/.mcfunction new file mode 100644 index 0000000000..68251442fd --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/.mcfunction @@ -0,0 +1,11 @@ +#> asset:object/1153.flare_butterfly/tick/attack/ +# +# +# +# @within function asset:object/1153.flare_butterfly/tick/move/chase_enemy/m + +# 発生までのディレイ + execute store result storage asset:context this.AttackDelay._ int 0.9999999999 run data get storage asset:context this.AttackDelay._ + +# 攻撃 + execute if data storage asset:context this.AttackDelay{_:0} run function asset:object/1153.flare_butterfly/tick/attack/attack diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/attack.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/attack.mcfunction new file mode 100644 index 0000000000..99c4b80fda --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/attack.mcfunction @@ -0,0 +1,33 @@ +#> asset:object/1153.flare_butterfly/tick/attack/attack +# +# +# +# @within function asset:object/1153.flare_butterfly/tick/attack/ + +#> Private +# @private + #declare score_holder $UserID + #declare score_holder $HealthPer + +# 演出 + playsound entity.blaze.shoot neutral @a ~ ~ ~ 0.6 1.5 + playsound entity.blaze.shoot neutral @a ~ ~ ~ 0.6 1.6 + playsound block.fire.ambient neutral @a ~ ~ ~ 0.8 1 + playsound block.lava.extinguish neutral @a ~ ~ ~ 0.8 1.2 + execute rotated ~90 25 run function asset:object/1153.flare_butterfly/tick/attack/vfx + execute rotated ~90 -25 run function asset:object/1153.flare_butterfly/tick/attack/vfx + +# 自身の体力割合を取得 + execute as @p[tag=1153.Owner] run function api:entity/player/get_health_per + execute store result score $HealthPer Temporary run data get storage api: Return.HealthPer 100 + +# ダメージ + function api:damage/single_damage_session/open + execute positioned ~-2.5 ~-2.5 ~-2.5 as @e[type=#lib:living_without_player,tag=Enemy,tag=!Uninterferable,dx=4,dy=4,dz=4] run function asset:object/1153.flare_butterfly/tick/attack/damage/ + function api:damage/single_damage_session/close + +# リセット + scoreboard players reset $UserID Temporary + scoreboard players reset $HealthPer Temporary + function asset:object/1153.flare_butterfly/tick/attack/cooldown/reset + data modify storage asset:context this.IsAttackMode set value false diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/cooldown/.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/cooldown/.mcfunction new file mode 100644 index 0000000000..cf3a148cd1 --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/cooldown/.mcfunction @@ -0,0 +1,7 @@ +#> asset:object/1153.flare_butterfly/tick/attack/cooldown/ +# +# +# +# @within function asset:object/1153.flare_butterfly/tick/ + + execute store result storage asset:context this.AttackCD._ int 0.9999999999 run data get storage asset:context this.AttackCD._ diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/cooldown/reset.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/cooldown/reset.mcfunction new file mode 100644 index 0000000000..b9a4fbb145 --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/cooldown/reset.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/1153.flare_butterfly/tick/attack/cooldown/reset +# +# +# +# @within function asset:object/1153.flare_butterfly/tick/attack/attack + +# 初期化 + data modify storage asset:context this.AttackCD._ set from storage asset:context this.AttackCD.Max diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/damage/.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/damage/.mcfunction new file mode 100644 index 0000000000..df134e894d --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/damage/.mcfunction @@ -0,0 +1,14 @@ +#> asset:object/1153.flare_butterfly/tick/attack/damage/ +# +# +# +# @within function asset:object/1153.flare_butterfly/tick/attack/attack + +# 体力が50%か否かでダメージ範囲を変える + execute if score $HealthPer Temporary matches 50.. run function asset:object/1153.flare_butterfly/tick/attack/damage/range.m with storage asset:context this.Damage.Default + execute unless score $HealthPer Temporary matches 50.. run function asset:object/1153.flare_butterfly/tick/attack/damage/range.m with storage asset:context this.Damage.LowHealthPer + data modify storage api: Argument.AttackType set value "Physical" + data modify storage api: Argument.ElementType set value "Fire" + execute as @p[tag=1153.Owner] run function api:damage/modifier + function api:damage/ + function api:damage/reset diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/damage/range.m.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/damage/range.m.mcfunction new file mode 100644 index 0000000000..0ec96f14ea --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/damage/range.m.mcfunction @@ -0,0 +1,7 @@ +#> asset:object/1153.flare_butterfly/tick/attack/damage/range.m +# +# +# +# @within function asset:object/1153.flare_butterfly/tick/attack/damage/ + +$execute store result storage api: Argument.Damage int 1 run random value $(Min)..$(Max) diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/vfx.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/vfx.mcfunction new file mode 100644 index 0000000000..26451e4a8c --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/attack/vfx.mcfunction @@ -0,0 +1,36 @@ +#> asset:object/1153.flare_butterfly/tick/attack/vfx +# +# +# +# @within function asset:object/1153.flare_butterfly/tick/attack/attack + +# [ImportKey]: NobwRALgngDgpmAXGAxgSwE4oDYIDRgCuhaAJkqgBxwBmAhgJwDsNAtDQEYdOsAslABl6sGANhQpWEjjUoBGSqQCsQ-GAB2dALYJkgMMUABHLAEYdDNoDOScCgD2hdRCQAmSgRRwncDDbAA3OmxCXXAADyQBAihIgF9YggtSNEJrRDkBTKyCSwhzZ0QosDhsbDQYS10Moow7PIhdIrRLAFFS8sqWgEdCIOwoAGUzT3JEemxK+IBdIA_3 +# 円 1 +particle flame ~ ~ ~ ^0 ^ ^-1000000 0.00000024 0 +particle flame ~ ~ ~ ^222520.93396 ^ ^-974927.91218 0.00000024 0 +particle flame ~ ~ ~ ^433883.73912 ^ ^-900968.8679 0.00000024 0 +particle flame ~ ~ ~ ^623489.80186 ^ ^-781831.48247 0.00000024 0 +particle flame ~ ~ ~ ^781831.48247 ^ ^-623489.80186 0.00000024 0 +particle flame ~ ~ ~ ^900968.8679 ^ ^-433883.73912 0.00000024 0 +particle flame ~ ~ ~ ^974927.91218 ^ ^-222520.93396 0.00000024 0 +particle flame ~ ~ ~ ^1000000 ^ ^0 0.00000024 0 +particle flame ~ ~ ~ ^974927.91218 ^ ^222520.93396 0.00000024 0 +particle flame ~ ~ ~ ^900968.8679 ^ ^433883.73912 0.00000024 0 +particle flame ~ ~ ~ ^781831.48247 ^ ^623489.80186 0.00000024 0 +particle flame ~ ~ ~ ^623489.80186 ^ ^781831.48247 0.00000024 0 +particle flame ~ ~ ~ ^433883.73912 ^ ^900968.8679 0.00000024 0 +particle flame ~ ~ ~ ^222520.93396 ^ ^974927.91218 0.00000024 0 +particle flame ~ ~ ~ ^0 ^ ^1000000 0.00000024 0 +particle flame ~ ~ ~ ^-222520.93396 ^ ^974927.91218 0.00000024 0 +particle flame ~ ~ ~ ^-433883.73912 ^ ^900968.8679 0.00000024 0 +particle flame ~ ~ ~ ^-623489.80186 ^ ^781831.48247 0.00000024 0 +particle flame ~ ~ ~ ^-781831.48247 ^ ^623489.80186 0.00000024 0 +particle flame ~ ~ ~ ^-900968.8679 ^ ^433883.73912 0.00000024 0 +particle flame ~ ~ ~ ^-974927.91218 ^ ^222520.93396 0.00000024 0 +particle flame ~ ~ ~ ^-1000000 ^ ^0 0.00000024 0 +particle flame ~ ~ ~ ^-974927.91218 ^ ^-222520.93396 0.00000024 0 +particle flame ~ ~ ~ ^-900968.8679 ^ ^-433883.73912 0.00000024 0 +particle flame ~ ~ ~ ^-781831.48247 ^ ^-623489.80186 0.00000024 0 +particle flame ~ ~ ~ ^-623489.80186 ^ ^-781831.48247 0.00000024 0 +particle flame ~ ~ ~ ^-433883.73912 ^ ^-900968.8679 0.00000024 0 +particle flame ~ ~ ~ ^-222520.93396 ^ ^-974927.91218 0.00000024 0 diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/kill.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/kill.mcfunction new file mode 100644 index 0000000000..8bd61d89f2 --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/kill.mcfunction @@ -0,0 +1,15 @@ +#> asset:object/1153.flare_butterfly/tick/kill +# +# +# +# @within function asset:object/1153.flare_butterfly/tick/ + +# 演出 + particle flame ~ ~ ~ 0 0 0 0.2 50 normal @a + particle small_flame ~ ~ ~ 0 0 0 0.2 50 normal @a + playsound block.fire.ambient neutral @a ~ ~ ~ 0.8 1 + playsound block.lava.extinguish neutral @a ~ ~ ~ 0.8 1 + +# 消滅 + execute on passengers run kill @s + kill @s diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/.mcfunction new file mode 100644 index 0000000000..abce33c786 --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/.mcfunction @@ -0,0 +1,24 @@ +#> asset:object/1153.flare_butterfly/tick/move/ +# +# +# +# @within function asset:object/1153.flare_butterfly/tick/ + +# ターゲットがいるかどうかチェックする +# ターゲットにできる敵がOwnerの周囲にいなければOwnerを追尾する + +# TargetMobUUIDがない && Ownerの近くに敵がいればTargetMobUUIDを設定 + execute unless data storage asset:context this.TargetMobUUID if function asset:object/1153.flare_butterfly/predicate/near_enemy run function asset:object/1153.flare_butterfly/tick/move/search_target/ + +# TargetMobUUIDがある && Ownerが周囲にいない ならTargetMobUUIDを削除 + execute if data storage asset:context this.TargetMobUUID unless function asset:object/1153.flare_butterfly/predicate/near_owner run function asset:object/1153.flare_butterfly/tick/move/common/reset + +# TargetMobUUIDがある && Ownerの周囲にTargetがいない ならTargetMobUUIDを削除 + execute if data storage asset:context this.TargetMobUUID unless function asset:object/1153.flare_butterfly/predicate/near_target/neutral_near/ run function asset:object/1153.flare_butterfly/tick/move/common/reset + + +# TargetMobUUIDがあれば対象へ追尾する + execute if data storage asset:context this.TargetMobUUID run function asset:object/1153.flare_butterfly/tick/move/chase_enemy/m with storage asset:context this + +# TargetMobUUIDがなければOwnerの方へ移動 + execute unless data storage asset:context this.TargetMobUUID run function asset:object/1153.flare_butterfly/tick/move/to_owner/ diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/chase_enemy/chase.m.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/chase_enemy/chase.m.mcfunction new file mode 100644 index 0000000000..a95b4344fa --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/chase_enemy/chase.m.mcfunction @@ -0,0 +1,24 @@ +#> asset:object/1153.flare_butterfly/tick/move/chase_enemy/chase.m +# +# @input args: +# TargetMobUUID : int +# ChaseSpeed : float +# @within function asset:object/1153.flare_butterfly/tick/move/chase_enemy/m + +# 対象の方へ向きだけ追尾する + $execute facing entity @e[type=#lib:living_without_player,scores={MobUUID=$(TargetMobUUID)},distance=..20,limit=1] eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-250 facing entity @s feet positioned as @s run tp @s ~ ~ ~ ~ ~ + +# 前方がブロックに埋まっているか? + $execute at @s if block ^ ^ ^$(ChaseSpeed) #lib:no_collision/ run data modify storage asset:temp 1153.Success set value true + +# 前方が埋まっていなければ、そのまま進む + $execute if data storage asset:temp 1153{Success:true} at @s run tp @s ^ ^ ^$(ChaseSpeed) + +# 前方が埋まっていれば、ブロック衝突を考慮して進む +# Speedの半分を引数とする + $execute unless data storage asset:temp 1153{Success:true} run data modify storage asset:temp 1153.Speed set value $(ChaseSpeed) + execute unless data storage asset:temp 1153{Success:true} store result storage asset:temp 1153.Speed float 0.005 run data get storage asset:temp 1061.Speed 100 + execute unless data storage asset:temp 1153{Success:true} at @s run function asset:object/1153.flare_butterfly/tick/move/with_collision.m with storage asset:temp 1153 + +# リセット + data remove storage asset:temp 1153 diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/chase_enemy/m.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/chase_enemy/m.mcfunction new file mode 100644 index 0000000000..05051fd2c5 --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/chase_enemy/m.mcfunction @@ -0,0 +1,23 @@ +#> asset:object/1153.flare_butterfly/tick/move/chase_enemy/m +# +# +# +# @within function asset:object/1153.flare_butterfly/tick/move/ + +# ChaseTickが0になるまで敵を追跡する +# - 0になったらその敵への追跡を諦める +# - 0になる前に接触すれば攻撃する + +# 追跡時間 + execute store result storage asset:context this.ChaseTick._ int 0.9999999999 run data get storage asset:context this.ChaseTick._ + execute if data storage asset:context this.ChaseTick{_:0} run return run function asset:object/1153.flare_butterfly/tick/move/common/reset + +# 攻撃前のディレイがない && 対象が近くにいないなら追跡 + execute if data storage asset:context this.AttackDelay{_:0} unless function asset:object/1153.flare_butterfly/predicate/near_target/very_near/ run function asset:object/1153.flare_butterfly/tick/move/chase_enemy/chase.m with storage asset:context this + +# ターゲットが近くにいれば攻撃モードになる + execute if data storage asset:context this{IsAttackMode:false} if data storage asset:context this.AttackCD{_:0} if function asset:object/1153.flare_butterfly/predicate/near_target/very_near/ run function asset:object/1153.flare_butterfly/tick/move/chase_enemy/set_attack_mode + +# 攻撃モードなら攻撃処理 + execute if data storage asset:context this{IsAttackMode:true} run function asset:object/1153.flare_butterfly/tick/attack/ + execute if data storage asset:context this{IsAttackMode:true} run data modify storage asset:context this.ChaseTick._ set from storage asset:context this.ChaseTick.Max diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/chase_enemy/set_attack_mode.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/chase_enemy/set_attack_mode.mcfunction new file mode 100644 index 0000000000..eb2cc44b1c --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/chase_enemy/set_attack_mode.mcfunction @@ -0,0 +1,11 @@ +#> asset:object/1153.flare_butterfly/tick/move/chase_enemy/set_attack_mode +# +# +# +# @within function asset:object/1153.flare_butterfly/tick/move/chase_enemy/m + +# 攻撃モード + data modify storage asset:context this.IsAttackMode set value true + +# 攻撃前のディレイ設定 + data modify storage asset:context this.AttackDelay._ set from storage asset:context this.AttackDelay.Max diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/common/reset.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/common/reset.mcfunction new file mode 100644 index 0000000000..8ff7c0fe4f --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/common/reset.mcfunction @@ -0,0 +1,10 @@ +#> asset:object/1153.flare_butterfly/tick/move/common/reset +# +# +# +# @within function asset:object/1153.flare_butterfly/tick/** + +# 諸々をリセット + data remove storage asset:context this.TargetMobUUID + data modify storage asset:context this.IsAttackMode set value false + data modify storage asset:context this.AttackDelay._ set value 0 diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/search_target/.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/search_target/.mcfunction new file mode 100644 index 0000000000..740624e035 --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/search_target/.mcfunction @@ -0,0 +1,13 @@ +#> asset:object/1153.flare_butterfly/tick/move/search_target/ +# +# +# +# @within function asset:object/1153.flare_butterfly/tick/move/ + +# 状況によっては毎tick大量の再帰をしてしまうため、数tickに1回のみ判定する + execute store result storage asset:context this.SearchInterval._ int 0.9999999999 run data get storage asset:context this.SearchInterval._ + execute unless data storage asset:context this.SearchInterval{_:0} run return fail + data modify storage asset:context this.SearchInterval._ set from storage asset:context this.SearchInterval.Max + +# 召喚者の位置を基準に、壁を貫通してない近くの敵を探す + execute as @p[tag=1153.Owner] at @s anchored eyes positioned ^ ^ ^ as @e[type=#lib:living_without_player,tag=Enemy,tag=!Uninterferable,distance=..12,sort=nearest] facing entity @s eyes run function asset:object/1153.flare_butterfly/tick/move/search_target/recursive diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/search_target/recursive.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/search_target/recursive.mcfunction new file mode 100644 index 0000000000..1216989870 --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/search_target/recursive.mcfunction @@ -0,0 +1,16 @@ +#> asset:object/1153.flare_butterfly/tick/move/search_target/recursive +# +# +# +# @within function +# asset:object/1153.flare_butterfly/tick/move/search_target/ +# asset:object/1153.flare_butterfly/tick/move/search_target/recursive + +# 既にTargetMobUUIDが設定されていればreturn + execute if data storage asset:context this.TargetMobUUID run return fail + +# 自身が近くにいたら成功してreturn + execute positioned ~-0.5 ~-0.5 ~-0.5 if entity @s[dx=0] run return run function asset:object/1153.flare_butterfly/tick/move/search_target/success + +# 再帰 + execute positioned ^ ^ ^0.5 if block ~ ~ ~ #lib:no_collision/ run function asset:object/1153.flare_butterfly/tick/move/search_target/recursive diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/search_target/success.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/search_target/success.mcfunction new file mode 100644 index 0000000000..c455d5eaa9 --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/search_target/success.mcfunction @@ -0,0 +1,11 @@ +#> asset:object/1153.flare_butterfly/tick/move/search_target/success +# +# +# +# @within function asset:object/1153.flare_butterfly/tick/move/search_target/recursive + +# 自身のMobUUIDをフィールドに突っ込む + execute store result storage asset:context this.TargetMobUUID int 1 run scoreboard players get @s MobUUID + +# 追跡時間初期化 + data modify storage asset:context this.ChaseTick._ set from storage asset:context this.ChaseTick.Max diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/summon_move/.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/summon_move/.mcfunction new file mode 100644 index 0000000000..d53e139531 --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/summon_move/.mcfunction @@ -0,0 +1,16 @@ +#> asset:object/1153.flare_butterfly/tick/move/summon_move/ +# +# +# +# @within function asset:object/1153.flare_butterfly/tick/ + +# 一定tick後に召喚演出終了判定を出す + execute store result storage asset:context this.SummonMoveTick int 0.9999999999 run data get storage asset:context this.SummonMoveTick + execute if data storage asset:context this{SummonMoveTick:0} run data modify storage asset:context this.SummonMoveEnded set value true + +# Ownerに近づいてく + function asset:object/1153.flare_butterfly/tick/move/to_owner/ + +# 召喚時だけ演出を濃くする + particle dust 1 0.4 0 0.9 ~ ~ ~ 0.3 0.3 0.3 0 3 normal @a + execute if predicate lib:random_pass_per/35 run particle small_flame ~ ~ ~ 0.3 0.3 0.3 0 3 normal @a diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/to_owner/.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/to_owner/.mcfunction new file mode 100644 index 0000000000..d0be868a69 --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/to_owner/.mcfunction @@ -0,0 +1,21 @@ +#> asset:object/1153.flare_butterfly/tick/move/to_owner/ +# +# +# +# @within function +# asset:object/1153.flare_butterfly/tick/move/ +# asset:object/1153.flare_butterfly/tick/move/summon_move/ + +# Ownerの位置基準でMarkerを召喚し、そこへ追尾する感じで移動する + +# 召喚 + execute as @p[tag=1153.Owner] at @s rotated ~ 0 anchored eyes positioned ^-1.8 ^ ^1.1 run summon marker ~ ~ ~ {Tags:["1153.TempMarker"]} + +# マーカーに近くなければ追尾する + execute unless entity @e[type=marker,tag=1153.TempMarker,distance=..0.35,limit=1] run function asset:object/1153.flare_butterfly/tick/move/to_owner/chase + +# マーカーが近い場合は、自身の向きを少しずつOwnerに合わせる + execute if entity @e[type=marker,tag=1153.TempMarker,distance=..0.35,limit=1] rotated as @p[tag=1153.Owner] positioned ^ ^ ^1 rotated as @s positioned ^ ^ ^10 facing entity @s feet positioned as @s positioned ^ ^ ^1 rotated as @s positioned ^ ^ ^1 facing entity @s feet positioned as @s positioned ^ ^ ^-0.1 rotated as @s positioned ^ ^ ^-1 facing entity @s feet positioned as @s run tp @s ~ ~ ~ ~ ~ + +# リセット + execute at @p[tag=1153.Owner] run kill @e[type=marker,tag=1153.TempMarker,distance=..5] diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/to_owner/chase.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/to_owner/chase.mcfunction new file mode 100644 index 0000000000..b29e562d91 --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/to_owner/chase.mcfunction @@ -0,0 +1,13 @@ +#> asset:object/1153.flare_butterfly/tick/move/to_owner/chase +# +# +# +# @within function asset:object/1153.flare_butterfly/tick/move/to_owner/ + +# 向きだけ追尾 + execute facing entity @e[type=marker,tag=1153.TempMarker,distance=..64,limit=1] eyes positioned ^ ^ ^-100 rotated as @s positioned ^ ^ ^-250 facing entity @s feet positioned as @s run tp @s ~ ~ ~ ~ ~ + +# 該当Markerとの距離に応じて速度を変える + execute unless entity @e[type=marker,tag=1153.TempMarker,distance=..24,limit=1] at @s run return run tp @s ^ ^ ^1.5 + execute unless entity @e[type=marker,tag=1153.TempMarker,distance=..12,limit=1] at @s run return run tp @s ^ ^ ^0.9 + execute at @s run tp @s ^ ^ ^0.3 diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/with_collision.m.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/with_collision.m.mcfunction new file mode 100644 index 0000000000..b7e3c1f1dc --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/move/with_collision.m.mcfunction @@ -0,0 +1,14 @@ +#> asset:object/1153.flare_butterfly/tick/move/with_collision.m +# +# @input args: +# Speed : float 移動量の半分 +# @within function asset:object/1153.flare_butterfly/tick/move/chase_enemy/chase.m + +# x + $execute positioned 0.0 0.0 0.0 positioned ^ ^ ^-1 positioned 0.0 ~ ~ positioned ^ ^ ^0.5 facing 0.0 0.0 0.0 positioned as @s positioned ^ ^ ^-$(Speed) rotated as @s positioned ^ ^ ^$(Speed) if block ~ ~ ~ #lib:no_collision/ run tp @s ~ ~ ~ + +# y + $execute positioned ^ ^ ^$(Speed) rotated ~180 ~ positioned ^ ^ ^$(Speed) if block ~ ~ ~ #lib:no_collision/ run tp @s ~ ~ ~ + +# z + $execute positioned 0.0 0.0 0.0 positioned ^ ^ ^-1 positioned ~ ~ 0.0 positioned ^ ^ ^0.5 facing 0.0 0.0 0.0 positioned as @s positioned ^ ^ ^-$(Speed) rotated as @s positioned ^ ^ ^$(Speed) if block ~ ~ ~ #lib:no_collision/ run tp @s ~ ~ ~ diff --git a/Asset/data/asset/functions/object/1153.flare_butterfly/tick/vfx.mcfunction b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/vfx.mcfunction new file mode 100644 index 0000000000..ce264eb207 --- /dev/null +++ b/Asset/data/asset/functions/object/1153.flare_butterfly/tick/vfx.mcfunction @@ -0,0 +1,10 @@ +#> asset:object/1153.flare_butterfly/tick/vfx +# +# +# +# @within function asset:object/1153.flare_butterfly/tick/ + +# 演出 + execute if predicate lib:random_pass_per/30 run particle dust 1 0.4 0 0.7 ~ ~ ~ 0.3 0.3 0.3 0 1 normal @a + execute if predicate lib:random_pass_per/8 run particle small_flame ~ ~ ~ 0.3 0.3 0.3 0 1 normal @a + execute if predicate lib:random_pass_per/5 run particle dripping_lava ~ ~ ~ 0.3 0 0.3 0 1 normal @a diff --git a/Asset/data/asset/functions/object/alias/1153/init.mcfunction b/Asset/data/asset/functions/object/alias/1153/init.mcfunction new file mode 100644 index 0000000000..564a688b61 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1153/init.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1153/init +# +# Init処理のエイリアス +# +# @within asset_manager:object/init/init.m + +# 元のInit処理を呼び出す + function asset:object/1153.flare_butterfly/init/ diff --git a/Asset/data/asset/functions/object/alias/1153/register.mcfunction b/Asset/data/asset/functions/object/alias/1153/register.mcfunction new file mode 100644 index 0000000000..53f3568698 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1153/register.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1153/register +# +# Objectのデータ指定処理のエイリアス +# +# @within asset_manager:object/summon/register.m + +# 元の登録処理を呼び出す + function asset:object/1153.flare_butterfly/register diff --git a/Asset/data/asset/functions/object/alias/1153/summon.mcfunction b/Asset/data/asset/functions/object/alias/1153/summon.mcfunction new file mode 100644 index 0000000000..b5d3a25c03 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1153/summon.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1153/summon +# +# Object召喚処理のエイリアス +# +# @within asset_manager:object/summon/summon.m + +# 元の召喚処理を呼び出す + function asset:object/1153.flare_butterfly/summon/ diff --git a/Asset/data/asset/functions/object/alias/1153/tick.mcfunction b/Asset/data/asset/functions/object/alias/1153/tick.mcfunction new file mode 100644 index 0000000000..39f06ea961 --- /dev/null +++ b/Asset/data/asset/functions/object/alias/1153/tick.mcfunction @@ -0,0 +1,8 @@ +#> asset:object/alias/1153/tick +# +# Tick時処理のエイリアス +# +# @within asset_manager:object/tick/tick.m + +# 元のTick処理を呼び出す + function asset:object/1153.flare_butterfly/tick/ diff --git a/Asset/data/asset/tags/functions/artifact/click.carrot_on_a_stick.json b/Asset/data/asset/tags/functions/artifact/click.carrot_on_a_stick.json index 5864dbd366..8b236cb44a 100644 --- a/Asset/data/asset/tags/functions/artifact/click.carrot_on_a_stick.json +++ b/Asset/data/asset/tags/functions/artifact/click.carrot_on_a_stick.json @@ -1,5 +1,6 @@ { "values": [ + "asset:artifact/1320.flare_bloom/trigger/1.trigger", "asset:artifact/0005.musket_matchlock/trigger/1.trigger", "asset:artifact/0017.harmful_books/trigger/1.trigger", "asset:artifact/0075.whirlpool_wand/trigger/1.trigger", @@ -90,7 +91,6 @@ "asset:artifact/1265.thunder_ray/trigger/1.trigger", "asset:artifact/1270.raging_passion_pickaxe/trigger/1.trigger", "asset:artifact/1272.big_water_launcher/trigger/1.trigger", - "asset:artifact/0001.book_of_all-seeing/trigger/1.trigger", "asset:artifact/0002.blessing/trigger/1.trigger", "asset:artifact/0007.nitrogen_fixater/trigger/1.trigger", @@ -175,8 +175,6 @@ "asset:artifact/1284.quiver/trigger/1.trigger", "asset:artifact/1285.torch_bag/trigger/1.trigger", "asset:artifact/2001.staff_of_the_willless/trigger/1.trigger", - "asset:artifact/0019.scripture/trigger/1.trigger" - ] -} +} \ 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..7bb2b44482 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/1320.flare_bloom/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..7afa294e98 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/1320.flare_bloom/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